Skip to content

fix(ci): check release image job times in devops ci job-time - #6635

Merged
dan-petty merged 2 commits into
mainfrom
fix/6522-release-image-jobs-average-over-the
Nov 22, 2026
Merged

dan-petty merged 2 commits into
mainfrom
fix/6522-release-image-jobs-average-over-the

Conversation

@devops-cli-service

@devops-cli-service devops-cli-service Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

The two release image jobs of the release workflow average over the 6 min bound of AGENTS.md rule 5, and devops ci job-time reads only the test job. The check gains a list of three: Tests & Coverage of ci.yml over 20 runs, and MCP Server Image and Runner Image of release.yml over 10 runs, each at the 360 s limit. The daily job reads all three, prints one mean for each, files one P0 issue for each job over the limit, and exits 1 on a short read. A run that names an option reads that one check. The help, the generated pages, the testing guide and the workflow step name say so.

Closes #6522

Change: openspec/changes/6522-release-image-jobs-average-over-the/

@devops-cli-service devops-cli-service Bot added type/docs Type docs: a change to the documents scope/openspec OpenSpec changes, specs and their checks labels Nov 21, 2026
@devops-cli-service
devops-cli-service Bot force-pushed the fix/6522-release-image-jobs-average-over-the branch from 9385113 to 746b4c1 Compare November 21, 2026 15:50
@devops-cli-service

Copy link
Copy Markdown
Contributor Author

@devops-cli-service
devops-cli-service Bot marked this pull request as ready for review November 21, 2026 23:46
devops-cli-service Bot and others added 2 commits November 22, 2026 01:03
Add MCP Server Image and Runner Image of release.yml to the daily job-time check.
Hold each release image job to the 360 s bound over 10 runs of main.
File a P0 issue when an average run time exceeds the limit.
Update the workflow step name, documentation, and OpenSpec tasks.

Closes #6522

Change: openspec/changes/6522-release-image-jobs-average-over-the/
@dan-petty
dan-petty force-pushed the fix/6522-release-image-jobs-average-over-the branch from 746b4c1 to 18e7c2c Compare November 22, 2026 01:07
@dan-petty dan-petty changed the title docs(openspec): plan #6522 Check the release image job times fix(ci): check release image job times in devops ci job-time Nov 22, 2026
@dan-petty

Copy link
Copy Markdown
Owner

Check results

Head commit: 18e7c2cf09b35b11a9aa89a90a58f18b008b2e6f

Check Conclusion Link
Tests & Coverage success run
Plan Check skipped run
Fail-to-Pass Check success run
Semantic PR title success run
devops-cli success run
zizmor success run
trivy-config success run
Trivy success run
Changed-Test Independence success run
CodeQL success run
Dependency Freshness skipped run
Tests on Main skipped run
Test Job Duration skipped run
Analyze (python) success run
Changed-Test Independence (run 2 of 3) success run
Tests & Coverage (shard 1 of 5) success run
MCP Server Image success run
Changed-Test Independence (run 1 of 3) success run
Runner Image success run
Tests & Coverage (shard 5 of 5) success run
Design Tokens success run
Static Analysis success run
Changed-Test Independence (run 3 of 3) success run
Tests & Coverage (shard 4 of 5) success run
Analyze (actions) success run
Tests & Coverage (shard 3 of 5) success run
Tests & Coverage (shard 2 of 5) success run
Service Image success run
Docs Site Build success run

Fail-to-pass run: https://github.com/dan-petty/devops-cli/actions/runs/44970203245/job/137048107849

Skipped check: Plan Check
Skipped check: Dependency Freshness
Skipped check: Tests on Main
Skipped check: Test Job Duration

@dan-petty
dan-petty merged commit 1b1a25e into main Nov 22, 2026
30 of 32 checks passed
@dan-petty
dan-petty deleted the fix/6522-release-image-jobs-average-over-the branch November 22, 2026 01:15
dan-petty-release Bot added a commit that referenced this pull request Nov 22, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.191.0](v0.190.0...v0.191.0)
(2026-11-22)


### Features

* **infra:** add node drain, uncordon, restart and reboot
([#6706](#6706))
([8af846c](8af846c)),
closes [#5128](#5128)
* **monitoring:** keep the cAdvisor container_threads series
([#6711](#6711))
([349adda](349adda))


### Bug Fixes

* **ci:** check release image job times in devops ci job-time
([#6635](#6635))
([1b1a25e](1b1a25e))
* **k8s:** narrow the in-namespace egress of the object store
([#6712](#6712))
([f14cb8b](f14cb8b)),
closes [#6707](#6707)

---
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>
@dan-petty

Copy link
Copy Markdown
Owner

Advisory post-merge review (automated; a person decides).

Recommendation: hold. This PR merged, and a follow-up fix on main is necessary: the two new release image checks cannot read a real run, and the PR did not archive its OpenSpec change.

Findings

  1. Blocker. src/devops_cli/ci/job_time.py:46-51 (RELEASE_IMAGE_JOB_NAMES) and tests/github/test_ci_job_time.py:102-126 (_route_release_runs).

    • Problem: The Actions API has no job with the name MCP Server Image or Runner Image. The image job of release.yml calls the reusable workflow release-image.yml (since ci(release): push each image once, then verify and tag that digest #6571). Thus GitHub names the jobs <Title> Image / Build, <Title> Image / Verify and <Title> Image / Attest & Tag. In a run that makes no release, GitHub shows one skipped job with the literal name ${{ matrix.title }} Image. _job_run_time accepts only an exact name or a shard prefix <job> (. Thus no real run gives a time for the two new checks. The report is never complete, raise_alarm never runs for these jobs, and the alarm of fix(ci): release image jobs average over the 6 min bound #6522 never fires. The test fake makes jobs with the bare names, which is a shape that GitHub does not return. Thus the tests pass, but the real check fails.
    • Evidence: release.yml:297 is name: ${{ matrix.title }} Image and release.yml:334 is uses: ./.github/workflows/release-image.yml. release-image.yml:54,127,215 name the jobs Build, Verify and Attest & Tag. The jobs of run 44977064803 (a release run) are MCP Server Image / Build|Verify|Attest & Tag and Runner Image / Build|Verify|Attest & Tag. No job has the bare name. Runs 44979901604, 44979669901 and 44979135037 (no release) show ${{ matrix.title }} Image = skipped. Runs before ci(release): push each image once, then verify and tag that digest #6571 show Build & Publish <Title> Image. client.py:795 is j.name == job and j.conclusion in _JOB_ENDED_CONCLUSIONS. client.py:802 is j.name.startswith(f"{job} ("). A real run of devops ci job-time --workflow release.yml --job "MCP Server Image" --runs 10 found no run and was stopped by a 300 s timeout (exit 124). A control run with --job "MCP Server Image / Build" --runs 1 read run 44977064803 at 114 s and exited 0. proposal.md:47 planned this real-system check before the build.
    • Fix: Time the real jobs. For example, measure the span from the first start to the last end of the jobs named <Title> Image / ..., or check each called job. Make the fake use the job names that the live API returns, and add skipped ${{ matrix.title }} Image jobs for runs that make no release. Run the real command once against this repository before you mark the follow-up ready. First, make sure that the jobs still go over the limit after ci(release): push each image once, then verify and tag that digest #6571, because the proof in the issue is from before that change.
  2. Major. src/devops_cli/commands/ci.py:2862-2873 with src/devops_cli/github/client.py:770-779.

    • Problem: No release run holds a matching job, so get_job_run_times never gets count times. It reads every completed push run of release.yml and makes one jobs request for each run. The daily job has timeout-minutes: 5, and GITHUB_TOKEN has a limit of REST requests for each hour. Thus the daily job hits the timeout or the rate limit. If it ends in time, it reports a short read and exits 1 each day.
    • Evidence: actions/workflows/release.yml/runs?branch=main&event=push&status=completed gives total_count 2384. src/devops_cli/config/defaults.py:879-880 sets 100 pages of 100, so the 24 pages are read with no cap error. The loop at client.py:770-779 stops only at len(times) >= count. The job-time job in ci.yml has timeout-minutes: 5. The real run in finding 1 did not end in 300 s.
    • Fix: Fix the job names (finding 1). Also put a cap on the runs that one check scans, so that a wrong or renamed job name fails fast with a clear message.
  3. Major. openspec/changes/6522-release-image-jobs-average-over-the/ and openspec/specs/ci-job-time/spec.md.

    • Problem: The PR closes fix(ci): release image jobs average over the 6 min bound #6522, but it did not archive its change. The base spec does not get the ADDED requirement. Now main holds an active change folder for a closed issue.
    • Evidence: openspec/config.yaml:52: "The pull request that closes the issue archives its own change as its last commit." All tasks in tasks.md (1.1 to 5.1) are ticked. git diff 18e7c2cf 1b1a25eaf is empty, so the merged tree is the reviewed head. git ls-tree -r --name-only origin/main openspec | grep 6522 lists only the five files of the active folder. openspec/specs/ci-job-time/spec.md on main has 11 requirements and no release image requirement. Other changes that merged on the same day are archived (for example archive/2026-11-22-6633-* and archive/2026-11-22-6681-*). implement_pull.py:154-155 stops readiness with draft_change_not_archived, but this PR merged.
    • Fix: In the follow-up PR, run uv run devops openspec archive 6522-release-image-jobs-average-over-the. Find out why the readiness check let an unarchived change merge, and comment on or file an issue for that.
  4. Minor. tests/github/test_ci_job_time.py:786-940 (the new cases).

    • Problem: Three acceptance scenarios of fix(ci): release image jobs average over the 6 min bound #6522 and of the spec delta have no test for a release image job.
    • Evidence: No test routes an Upload Release Assets job (grep finds no match). No case puts the release image jobs at 360 s with --file-issue. The on-the-limit case at line 329 tests only the test job. No case routes an open Runner Image alarm issue at 364 s. The short-read case at lines 869-882 does not pass --file-issue.
    • Fix: Add these cases: release image jobs at 360 s with --file-issue (no issue request, exit 0); an open Runner Image alarm issue at 364 s (one PATCH, no POST); and a release run that also holds an Upload Release Assets job. Pass --file-issue in the short-read case and assert that no issue request occurs.
  5. Minor. tests/github/test_ci_job_time.py:732-748 (test_no_issue_is_searched_or_filed_without_a_full_read_over_the_limit).

    • Problem: The diff adds a second cli(...) call and a second copy of the same assertion before the original pair. The test runs the same command two times with the same routes. This adds no coverage.
    • Evidence: Hunk @@ -690,6 +732,14 @@ adds cli("ci", "job-time", "--repo", _REPO, "--file-issue") and the assertion block. The original call and assertion block follow at lines 744-748.
    • Fix: Remove the added duplicate call and assertion. Keep only the _route_release_runs(github_api) line.
  6. Minor. .github/workflows/ci.yml:395.

    • Problem: The PR rewrote this comment block, but the block still says that the job "comments on the open P0 issue". The code posts no comment. It writes the report into the issue body. AGENTS.md rule 8 says to fix a document that the change makes wrong.
    • Evidence: ci.yml:395: "comments on the open P0 issue of the check, or files one when none is open". src/devops_cli/ci/job_time.py:10: "with no comment (fix(ci): Job-time alarm, conflict and review comments post once #6199)". job_time.py:222: "posts no comment".
    • Fix: Write: "Then it writes its report into the body of the open P0 issue of the check, or files one when none is open."
  7. Minor. docs/TESTING.md:204.

    • Problem: A new sentence says that .github/workflows/ci.yml shows the alarm line of each job. ci.yml does not show an alarm line. The alarm marker is in src/devops_cli/ci/job_time.py:39 (ALARM_MARKER).
    • Evidence: grep -n -i alarm .github/workflows/ci.yml gives only line 399 ("a red alarm on each push to main").
    • Fix: Write: "Each job has its own alarm issue, because the alarm line in the issue body names the job, the workflow and the branch (src/devops_cli/ci/job_time.py)."
  8. Nit. openspec/changes/6522-release-image-jobs-average-over-the/design.md (decision "Read release.yml on main only").

    • Problem: The design says that the release workflow runs on each push to main, so ten completed runs exist. But the image jobs run only on a push that makes a release. No test routes a release run with skipped image jobs.
    • Evidence: release.yml:299: if: needs.release-please.outputs.release_created == 'true'. _route_release_runs makes every routed run hold both image jobs.
    • Fix: Correct the reason in the design. Add one case in which some release runs hold skipped image jobs.
  9. Nit. src/devops_cli/lang/en/help.py (job_time_job).

    • Problem: The new --job help removes facts that are still true: the shard rule and the queue time rule.
    • Evidence: The diff removes "the run time of the job of that name plus the run time of the slowest of its shard jobs named ' (...)'. Time in the queue is shown but not counted." client.py:781-802 still does this.
    • Fix: Put the sentence back and regenerate docs/commands/ci.md.
  10. Nit. src/devops_cli/ci/job_time.py:46-51.

    • Problem: RELEASE_WORKFLOW_FILE, RELEASE_IMAGE_JOB_NAMES and RELEASE_IMAGE_RUNS have public names, but only this module reads them.
    • Evidence: CONTRIBUTING.md:205: "Constant | _<NAME> in the one module that reads it." A grep in src and tests finds no other reader.
    • Fix: Rename them with a leading underscore.
  11. Nit. openspec/changes/6522-release-image-jobs-average-over-the/tasks.md:28,37,45-46.

    • Problem: Task 3.2 repeats 3.1, task 4.2 repeats 4.1, and task 5.1 has the same verification line two times.
    • Evidence: tasks.md:45 and tasks.md:46 are the same line.
    • Fix: Remove the duplicates. The plan generator probably makes this repeat, so look at the generator too.
  12. Nit. tests/github/test_ci_job_time.py:882 (test_an_option_narrows_the_run_to_one_check).

    • Problem: This test passes on the base too. It is a good guard, but it is not fail-to-pass evidence.
    • Evidence: devops ci fail-to-pass lists it as "passed on base".
    • Fix: No code change. Do not name it as fail-to-pass evidence.

One finding was dropped. A lens said that the owner closed #6522 with no commit. The close event is at 01:15:28Z, 3 s after the merge at 01:15:25Z, so the merge closed the issue through "Closes #6522".

Checks that ran

  • devops gh api pulls/6635: merged at 2026-11-22T01:15:25Z as 1b1a25eaf. git diff 18e7c2cf 1b1a25eaf is empty.
  • uv sync --locked in the review worktree: exit 0.
  • uv run devops ci test tests/github/test_ci_job_time.py tests/commands/test_ci.py: 162 passed.
  • uv run devops ci fail-to-pass --base <merge-base>: 7 tests fail on the base and pass at the head. One new test passes on the base (finding 12).
  • uv run devops ci --check --only lint,format,docs,constructs,openspec,test-settings,test-tree,startup-imports,swallowed-failures: all rows passed. The worktree had no changed files after the run.
  • uv run ruff check on the 5 changed Python files: all checks passed. uv run mypy on the changed files: no error in the changed src files.
  • Check runs of head 18e7c2cf: all success or skipped at the time of merge.
  • Live Actions API reads of the jobs of 7 release.yml runs, and of the run count: the job names and the count in findings 1 and 2.
  • Real command run against this repository: --job "MCP Server Image" did not end in 300 s; --job "MCP Server Image / Build" --runs 1 read 114 s and exited 0.
  • git ls-tree origin/main openspec: the change folder is not archived (finding 3).
  • Private-data grep on the added lines: no private data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/openspec OpenSpec changes, specs and their checks type/docs Type docs: a change to the documents

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(ci): release image jobs average over the 6 min bound

1 participant