Repository navigation
fix(ci): reduce supply-chain scan timeouts with PR-image shards - #11399
Merged
Merged
Conversation
Keep build-tools and enclave-agent on the same runner, isolate agent and service builds, and allow each PR-image shard 60 minutes. Preserve daily cache freshness, per-image cleanup, and the aggregate security gate. Co-authored-by: Copilot App <[email protected]>
Contributor
Documentation PreviewDocumentation has been built for this PR. To view locally:
Built from commit d316504 |
Contributor
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (1 files)
Coverage comparison generated by |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The shard coverage test uses a hard-coded list instead of the build script’s container inventory, allowing newly added images to miss blocking scans without failing CI.
1 open issue
What changed in this PR
Reduces timeout risk in AWF’s supply-chain gate by distributing PR-image builds across three runners, while preserving blocking High/Critical scans and the stable aggregate check.
Changes:
- Gives each PR-image shard 60 minutes; published-image CVE and license scans retain 40-minute limits.
- Keeps build-tools and enclave-agent together and validates shard selections.
- Extends regression coverage and documents the new topology and budgets.
| File | Description |
|---|---|
scripts/ci/docker-registry-ci.test.ts |
Adds per-shard checks for image coverage, failures, caching, and cleanup. |
docs/INTEGRATION-TESTS.md |
Documents shard grouping, time budgets, and aggregate-check behavior. |
.github/workflows/supply-chain-scan.yml |
Defines three PR-image shards with separate budgets and validated image selections. |
Review effort: Max (auto)
Comment on lines
+439
to
+444
| const images = prShards.flatMap(shard => shard.images!); | ||
| expect([...images].sort()).toEqual([ | ||
| 'agent', 'api-proxy', 'build-tools', 'cli-proxy', 'enclave-agent', | ||
| 'enclave-mcp-server', 'enclave-script', 'gh-aw-node', 'router', | ||
| ]); | ||
| expect(new Set(images).size).toBe(images.length); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Why
The PR-image scan in run 42742678454 exhausted its 40-minute job limit. The build-tools apt layer alone took 2,164.7 seconds (36m 5s): index downloads took 9m 12s and package downloads took 25m 46s. Build-tools completed and Grype ran, but the job was cancelled shortly after the next image build began. This was slow native-amd64 package retrieval, not a demonstrated CVE rejection or compilation failure.
Changes
ubuntu-latestrunners are unchanged; no emulation is introduced.Validation
npm exec --no -- jest scripts/ci/docker-registry-ci.test.ts scripts/ci/cloud-hypervisor-enclave-artifacts.test.ts scripts/ci/apt-mirror-dockerfiles.test.ts --runInBand— 114 tests passed.npm run type-check— passed.actionlint .github/workflows/supply-chain-scan.yml— passed.git diff --check— passed.Limitations: Local Docker is installed but its daemon is unavailable, so no Linux image build or live throughput comparison was run. Existing failed-run logs confirm the slow apt transfers; the tests execute the real embedded workflow scripts with mocked Docker boundaries. Sharding isolates slow downloads and adds headroom but cannot guarantee completion during a prolonged upstream outage. It adds two hosted-runner jobs and their scanner/cache setup overhead. No manual workflow dispatch, mirror change, merge, or auto-merge enablement.
Created from current
mainin an isolated worktree; unrelated edits from the original checkout are not included.