Skip to content

perf(ci): build the devcontainer only on its own inputs - #4977

Merged
dan-petty merged 3 commits into
mainfrom
perf/4658-devcontainer-inputs
Nov 12, 2026
Merged

dan-petty merged 3 commits into
mainfrom
perf/4658-devcontainer-inputs

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

The DevContainer Image job of ci.yml took a runner on each push to a pull request. Its step filter held src/, so it built the image on almost every push. The image installs the CLI with --no-deps, and Static Analysis builds the package (owner decision O2).

  • The job moves to devcontainer-image.yml with its check name and limit. It runs daily, on workflow_dispatch, and on a pull request that changes an image input other than src/. The native paths filter stops other runs before a runner starts.
  • A new invariant requires the schedule, the manual run and each file that .devcontainer/Dockerfile copies other than src/, and refuses a run for src/ alone.

A src/ defect that only the image shows appears in the next daily run. The check is not required.

Closes #4658

Change: openspec/changes/archive/2026-11-12-4658-build-the-devcontainer-only-on-its/

The DevContainer Image job of ci.yml started on each push to a pull
request and tested its paths in a step. Its filter held src/, so it
built the image on almost every push. The job moves to a workflow of
its own, devcontainer-image.yml, with the native pull_request paths
filter, the daily schedule and workflow_dispatch. A pull request that
changes only src/ starts no job of it.

Closes #4658
@dan-petty dan-petty added type/infra Type infra: the build, CI, images or cluster scope/ci GitHub Actions workflows, pre-commit hooks, CI gates, and runners labels Nov 12, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Before and after measurements

Before: the Actions API, the last 30 completed pull request runs of ci.yml (2026-11-12, 03:47Z to 06:19Z).

Value Before
DevContainer Image jobs started 30 of 30 runs (1 in each)
Runs that built the image 26 of 30 (4 skipped the build in a step)
Mean job time of a build 354 s (5.9 runner-min)
Mean queue time before a build started 96 s
Runner time of the 30 jobs 154.2 runner-min (5.1 for each run)
Release pull request runs in the sample 7 of 30

After: the native paths filter of devcontainer-image.yml, applied to the files of the last 131 merged topic pull requests on main (git log --name-only, release commits excluded).

Value Old step filter New paths filter
Pull requests that build the image 102 of 131 9 of 131
Pull requests that start a DevContainer job 131 of 131 9 of 131

So about 93% of topic pull requests start no DevContainer Image job, and each of their pushes keeps about 5 to 6 runner-min and one of the 20 concurrent job slots. The schedule adds one build each day (about 6 runner-min). The release pull request changes pyproject.toml, so it still builds the image until #4637.

This pull request changes the workflow file, so it starts the new workflow itself and shows the check under its old name.

@dan-petty

dan-petty commented Nov 12, 2026 •

Copy link
Copy Markdown
Owner Author

Test first: devops ci fail-to-pass --base origin/main

The command replayed the changed test files on the base tree: 11 failed on base, and 348 passed (0 errored).

  • tests/invariants/test_architectural_invariants.py::test_the_devcontainer_image_builds_daily_and_on_its_own_inputs: all 8 cases fail on base, because devcontainer-image.yml does not exist there.
  • tests/commands/test_ci.py::test_the_pull_request_builds_and_starts_the_devcontainer_image_the_way_the_release_does and ::test_only_the_shared_actions_build_and_start_the_devcontainer_image fail on base.
  • tests/invariants/test_workflow_contracts.py::test_each_job_limit_is_about_two_times_its_longest_run fails on base.

On head: tests/invariants/test_architectural_invariants.py and tests/commands/test_ci.py give 212 passed; tests/invariants/test_workflow_contracts.py and tests/core/test_renovate_config.py give 190 passed. devops ci --only actionlint,zizmor passes, and so does devops ci --check --only docs.

Owner steps

None is necessary. DevContainer Image is not a required check, so the ruleset does not change. To see the schedule path before 04:15 UTC, start the workflow once by hand after the merge: uv run devops gh api -X POST repos/dan-petty/devops-cli/actions/workflows/devcontainer-image.yml/dispatches -f ref=main.

@dan-petty
dan-petty marked this pull request as ready for review November 12, 2026 08:35
@dan-petty
dan-petty merged commit c5b15ac into main Nov 12, 2026
23 checks passed
@dan-petty
dan-petty deleted the perf/4658-devcontainer-inputs branch November 12, 2026 12:05
dan-petty pushed a commit that referenced this pull request Nov 12, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.118.0](v0.117.2...v0.118.0)
(2026-11-12)


### Features

* **ci:** devops ci stops its rows when timeout ends it
([#5031](#5031))
([1fa4e9c](1fa4e9c))
* **roadmap:** keep the stage gate problems as a list with a code
([#5022](#5022))
([5819627](5819627))
* **roadmap:** log one result line for each roadmap job attempt
([#4966](#4966))
([2b6fe3f](2b6fe3f))
* **telemetry:** record each CLI usage error by name and kind
([#4973](#4973))
([a179fd9](a179fd9))


### Bug Fixes

* **ai:** chat loads each persona prompt and challenger gets tools
([#5037](#5037))
([c40b0ad](c40b0ad))
* **ai:** keep the HTTP status of a Claude reply after retries
([#4976](#4976))
([5bf9466](5bf9466))
* **deps:** keep Renovate uv bumps green and groups on Monday
([#4987](#4987))
([b19e153](b19e153))
* **k8s:** raise the limits that 7 d of use shows are too low
([#5030](#5030))
([028c62b](028c62b))
* **roadmap:** a job posts no comment that repeats a recent one
([#4978](#4978))
([fff903a](fff903a))
* **service:** alert when GitHub cannot deliver a webhook
([#5045](#5045))
([2bfbfcb](2bfbfcb))
* **service:** delete the stream route that sends canned verified text
([#5038](#5038))
([e9d51b5](e9d51b5))
* **telemetry:** keep one upstream status series per service
([#4986](#4986))
([3e4ca56](3e4ca56))
* **tests:** remove the runner variable in the test floor
([#4988](#4988))
([093aa61](093aa61))


### Performance Improvements

* **ai:** make the ast graph walk and call search faster
([#5039](#5039))
([3b25cc6](3b25cc6)),
closes [#4662](#4662)
* **ci:** build the devcontainer only on its own inputs
([#4977](#4977))
([c5b15ac](c5b15ac))
* **ci:** test each merge once, on the push to main
([#5043](#5043))
([c6992b1](c6992b1))
* **tests:** remove fixed waste in six slow tests
([#4995](#4995))
([1c7044e](1c7044e))


### Code Refactoring

* **ai:** delete devops ai pipeline and persona leftovers
([#5044](#5044))
([d5fefde](d5fefde)),
closes [#4827](#4827)
* **openspec:** split big capabilities into nested ones
([#4981](#4981))
([dfb09bd](dfb09bd))
* **pr:** devops pr update acts only on a failed check
([#4990](#4990))
([aa4fa1a](aa4fa1a))

---
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/infra Type infra: the build, CI, images or cluster

Projects

None yet

Development

Successfully merging this pull request may close these issues.

perf(ci): build the devcontainer only on its own inputs

1 participant