Skip to content

fix(ci): match the real release image job names in job-time - #6740

Merged
dan-petty merged 6 commits into
mainfrom
fix/6734-release-image-job-names
Nov 22, 2026
Merged

dan-petty merged 6 commits into
mainfrom
fix/6734-release-image-job-names

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

The release image check of devops ci job-time (#6522) asked for MCP Server Image and Runner Image. No run holds these jobs. Since #6571, the Actions API names them <Title> Image / Build, / Verify and / Attest & Tag. Thus the check read the jobs of each of the 2,385 runs of release.yml, and the daily job did not end inside its 5 min timeout.

  • The default list checks the six real jobs of the two images, each over 10 release runs at 360 s.
  • The checks of one workflow share one read, with one request for the jobs of each run.
  • A read stops after the jobs of 100 runs (DEFAULT_CI_JOB_TIME_MAX_RUNS). The short-read message names this bound.
  • The test fake uses the job names of the live API, with skipped ${{ matrix.title }} Image runs.
  • The change of fix(ci): release image jobs average over the 6 min bound #6522 is archived. The help, docs/TESTING.md and the ci.yml comment are correct again.

Closes #6734

Change: openspec/changes/archive/2026-11-22-6734-release-image-job-names/

@dan-petty dan-petty added type/bug Type bug: the code does not do what it must scope/ci GitHub Actions workflows, pre-commit hooks, CI gates, and runners labels Nov 22, 2026
A read of the job times stops after the jobs of 100 runs. The --runs
options of job-time and durations now take at most 100, so a larger
count is a usage error that names the bound.

A new test proves that a job with its runs takes no older run while the
read continues for another job.

The comment of the release image checks gives the scope of #6522 as the
reason. TESTING.md and the archived tasks of #6734 agree with the help.
@dan-petty
dan-petty force-pushed the fix/6734-release-image-job-names branch from f57b755 to 7a00795 Compare November 22, 2026 04:26
@dan-petty

Copy link
Copy Markdown
Owner Author

Review of #6734 (commit 374e5d428)

Recommendation: fix-minor-first.

No blocker or major finding stands. No verdict refuted a finding. Three minor findings stand. Fix them before you mark the pull request ready.

Minor findings

1. The comment gives a reason that also applies to jobs that are not checked

2. No test proves the guard that stops a full job from collecting more runs

  • Where: src/devops_cli/github/client.py:793, the guard if len(held) < count in get_run_times_of_jobs; tests/github/test_ci_job_time.py, _release_jobs.
  • Problem: Each release run in the fake holds all six image jobs as ended. Thus all six jobs get their tenth run on the same run. If you remove the guard, no test fails. Without the guard, a full job collects older runs while the read continues for a slower job. Its mean then covers more than 10 runs. This can occur in production: when Verify fails, Attest & Tag is skipped, and the read continues.
  • Evidence: _release_jobs gives conclusion success to each job of each release run. test_the_checks_of_one_workflow_ask_for_the_jobs_of_each_run_one_time stops at the tenth release run for all six jobs together. The bound test holds no image job. The lens found this by reasoning. It did not run a mutant.
  • Fix: Add a test where one release run has Runner Image / Attest & Tag skipped, and Build has a different time in the eleventh release run. Assert that the mean of Build covers only its newest 10 runs. Assert that the read stops at the run that gives Attest & Tag its tenth run.

3. The bound of 100 runs caps --runs with no limit on the option and no message for durations

  • Where: src/devops_cli/github/client.py:796; src/devops_cli/commands/ci.py:2831 (job-time --runs) and ci.py:2952 (durations --runs); HELP.ci.job_time_runs.
  • Problem: The bound is in the shared client method, so it applies to each caller. Both --runs options have min=1 and no maximum. With job-time --runs N and N above 100, the read can never be complete, so the command always exits 1. With durations --runs N and N above 100, the read is cut with no message, and the dry-run plan does not name the bound. The default counts (20 and 10) do not change.
  • Evidence: The loop stops when read >= DEFAULT_CI_JOB_TIME_MAX_RUNS, before it compares the count. record_durations calls get_job_run_times(count=runs) through the same loop. Only the short-read message of job-time names the bound. No test covers the changed behavior of durations.
  • Fix: Add max=DEFAULT_CI_JOB_TIME_MAX_RUNS to both --runs options, and add a test. Or name the bound in the durations output and in the help text of both options.

Nits (optional)

  • openspec/specs/ci-job-time/spec.md:173-175: The MODIFIED text drops the sentence about --file-issue and the "300 seconds and 60 seconds of tolerance" text of fix(ci): release image jobs average over the 6 min bound #6522. Scenarios still specify the behavior. Optional fix: put the --file-issue sentence back.
  • tests/github/test_ci_job_time.py: Two tests no longer assert "Tests & Coverage". Use the full sentence "The last 20 runs of Tests & Coverage took 200 s on average", and add "Tests & Coverage" to the job list of the dry-run test.
  • tests/github/test_ci_job_time.py, test_a_read_that_finds_no_release_image_job_stops_after_a_fixed_count_of_runs: On the base, it fails with an AttributeError on the new constant, not on the behavior. The builder showed by hand that it also fails on the request list. No action is necessary.
  • docs/TESTING.md:205: The new sentence has 42 words. STE allows 25. Vale reports STE.SentenceLength. Split it into three sentences.
  • openspec/changes/archive/2026-11-22-6734-release-image-job-names/tasks.md, task 4.1: The task says that HELP.ci.job_time names "the bound of 100 runs". The help text says "a fixed count of runs". Make the two texts agree.

Notes from the builder

Checks that ran

  • devops ci test tests/github/test_ci_job_time.py: 47 passed (fidelity, correctness).
  • devops ci test tests/github/test_ci_job_time.py tests/ci: 298 passed (tests).
  • devops ci test on tests/commands/test_ci.py, test_global_dry_run.py, the stage tests, test_workflow_contracts.py and tests/lang: 419 passed (tests).
  • devops ci test on the other callers of the reader (stage time, test_ci.py, test_ci_durations.py): 139 passed (correctness).
  • devops ci fail-to-pass --base origin/main: exit 0. 11 changed tests fail on the base and pass at the head.
  • devops ci --check --only lint,format,docs,constructs,openspec,test-settings,test-tree,startup-imports,swallowed-failures: exit 0, all 9 rows pass.
  • devops openspec check: passed.
  • actionlint .github/workflows/ci.yml: exit 0.
  • ruff check and ruff format --check on the 7 changed Python files: pass.
  • mypy on the 7 changed Python files: no error in the changed files. 14 errors are in tests/support/fakes/{github,model,process}.py, which the diff does not touch.
  • Live read (no --file-issue): devops ci job-time --repo dan-petty/devops-cli exits 0 in 47 s to 89 s with 7 means. Runner Image / Build is 175 s, below the limit of 360 s.
  • Live control: --workflow release.yml --job 'MCP Server Image' --runs 10 exits 1 with a short read that names the bound of 100 runs.
  • vale on docs/TESTING.md and the 6734 change folder: suggestions only.
  • PR body: 959 characters, ends with Closes #6734. The claims agree with the diff and the live API.

Follow-up commit (head 7a00795, rebased on main)

The commit fixes the three minor findings and two nits:

  • The comment in src/devops_cli/ci/job_time.py gives the real reason for the six checks: the plan of fix(ci): release image jobs average over the 6 min bound #6522 names the MCP Server and Runner images.
  • A new test makes the guard len(held) < count in get_run_times_of_jobs necessary. When Attest & Tag is skipped in one release run, Build averages only its newest 10 runs, and the read stops at the tenth run that holds Attest & Tag. The test fails when the guard goes.
  • --runs of devops ci job-time and of devops ci durations now has the maximum 100, the bound of one read. A larger value is a usage error that names the range, and the command sends no request. Two new tests cover it, and the spec has the scenario "A count above the bound".
  • The long sentences of docs/TESTING.md and task 4.1 of the archived tasks are now short STE sentences.

Checks: the tests of tests/github/test_ci_job_time.py, tests/ci and tests/commands/test_ci.py pass, the scoped devops ci --check rows and devops openspec check pass, and fail-to-pass gives 14 tests that fail on the base. A live run of devops ci job-time ended in 47 s with the means of all six release image jobs.

@dan-petty
dan-petty marked this pull request as ready for review November 22, 2026 04:35
@dan-petty
dan-petty merged commit d2dd628 into main Nov 22, 2026
29 checks passed
@dan-petty
dan-petty deleted the fix/6734-release-image-job-names branch November 22, 2026 04:47
dan-petty-release Bot added a commit that referenced this pull request Nov 22, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.193.0](v0.192.2...v0.193.0)
(2026-11-22)


### Features

* **k8s:** apply store buckets and rules from git
([#6724](#6724))
([0036c70](0036c70))


### Bug Fixes

* **ci:** match the real release image job names in job-time
([#6740](#6740))
([d2dd628](d2dd628))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/ci GitHub Actions workflows, pre-commit hooks, CI gates, and runners type/bug Type bug: the code does not do what it must

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(ci): match the real release image job names in job-time

1 participant