Add digest-aware AWF runtime image pinning via image-tag metadata#2086
Add digest-aware AWF runtime image pinning via image-tag metadata#2086
image-tag metadata#2086Conversation
|
| Metric | Base | PR | Delta |
|---|---|---|---|
| Lines | 84.33% | 84.39% | 📈 +0.06% |
| Statements | 83.56% | 83.63% | 📈 +0.07% |
| Functions | 87.39% | 87.46% | 📈 +0.07% |
| Branches | 74.78% | 74.76% | 📉 -0.02% |
📁 Per-file Coverage Changes (1 files)
| File | Lines (Before → After) | Statements (Before → After) |
|---|---|---|
src/docker-manager.ts |
86.8% → 87.1% (+0.31%) | 86.4% → 86.7% (+0.30%) |
✨ New Files (1 files)
src/image-tag.ts: 80.6% lines
Coverage comparison generated by scripts/ci/compare-coverage.ts
image-tag metadata
There was a problem hiding this comment.
Pull request overview
Updates AWF runtime container image resolution to support digest pinning, allowing the CLI and setup action to produce/pull name:tag@sha256:... references when digest metadata is available.
Changes:
- Added digest-aware
--image-tagparsing and runtime image reference construction. - Switched Docker Compose generation and
predownloadimage lists to use digest-pinned image references when provided. - Updated setup action and docs/tests to propagate and validate digest-enriched image-tag metadata.
Show a summary per file
| File | Description |
|---|---|
src/image-tag.ts |
Introduces parsing for digest-enriched image tags and builds registry/name:tag@digest refs. |
src/docker-manager.ts |
Uses digest-aware image refs for squid/agent/api-proxy/cli-proxy in generated compose. |
src/docker-manager.test.ts |
Adds coverage to assert compose images include per-image digests. |
src/commands/predownload.ts |
Resolves images using digest-aware refs for preset runtime images. |
src/commands/predownload.test.ts |
Adds tests for digest metadata handling and rejection of invalid digests. |
src/cli.ts |
Updates --image-tag help text to mention digest metadata format. |
docs/usage.md |
Documents optional digest metadata format for --image-tag. |
docs/github_actions.md |
Updates action output documentation for digest-enriched image-tag. |
action.yml |
Enhances setup action to read containers.txt, emit digest-enriched image-tag, and pull pinned images when available. |
.github/workflows/test-action.yml |
Adjusts workflow assertion to accept image-tag metadata with optional digest suffixes. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comments suppressed due to low confidence (1)
src/cli.ts:2279
- The
predownload --image-tagoption description lists onlysquid,agent, andapi-proxy, butresolveImages()now also supports digest metadata forcli-proxyandagent-act. Please update the description/example so users know which digest keys are accepted.
.option(
'--image-tag <tag>',
'Container image tag. Supports optional digest metadata: <tag>,squid=sha256:...,agent=sha256:...,api-proxy=sha256:...',
'latest'
)
- Files reviewed: 10/10 changed files
- Comments generated: 3
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
| Metric | Base | PR | Delta |
|---|---|---|---|
| Lines | 84.33% | 84.39% | 📈 +0.06% |
| Statements | 83.56% | 83.63% | 📈 +0.07% |
| Functions | 87.39% | 87.46% | 📈 +0.07% |
| Branches | 74.78% | 74.76% | 📉 -0.02% |
📁 Per-file Coverage Changes (1 files)
| File | Lines (Before → After) | Statements (Before → After) |
|---|---|---|
src/docker-manager.ts |
86.8% → 87.1% (+0.31%) | 86.4% → 86.7% (+0.30%) |
✨ New Files (1 files)
src/image-tag.ts: 80.6% lines
Coverage comparison generated by scripts/ci/compare-coverage.ts
1 similar comment
|
| Metric | Base | PR | Delta |
|---|---|---|---|
| Lines | 84.33% | 84.39% | 📈 +0.06% |
| Statements | 83.56% | 83.63% | 📈 +0.07% |
| Functions | 87.39% | 87.46% | 📈 +0.07% |
| Branches | 74.78% | 74.76% | 📉 -0.02% |
📁 Per-file Coverage Changes (1 files)
| File | Lines (Before → After) | Statements (Before → After) |
|---|---|---|
src/docker-manager.ts |
86.8% → 87.1% (+0.31%) | 86.4% → 86.7% (+0.30%) |
✨ New Files (1 files)
src/image-tag.ts: 80.6% lines
Coverage comparison generated by scripts/ci/compare-coverage.ts
|
Smoke Test Results ✅ GitHub MCP Testing — Last 2 merged PRs retrieved Status: PASS
|
🤖 Smoke Test Results
Overall: PASS PR by
|
This comment has been minimized.
This comment has been minimized.
Smoke Test: GitHub Actions Services Connectivity ✅All checks passed:
|
Chroot Version Comparison Results
Overall: ❌ Not all tests passed. Python and Node.js versions differ between host and chroot environments.
|
🏗️ Build Test Suite Results
Overall: 8/8 ecosystems passed — ✅ PASS
|
🔥 Smoke Test: Copilot BYOK (Offline Mode)
Running in BYOK offline mode ( Overall: PARTIAL PASS (scheduled run; no PR context for pre-step data) PR #2086 author:
|
AWF workflows were SHA-pinning the setup action but still pulling runtime containers by mutable tag only (
squid,agent/agent-act,iptables-initvia agent image,api-proxy,cli-proxy). This change adds optional per-image digest pinning to close that integrity gap while keeping backward compatibility for tag-only releases.Digest-aware image-tag format (new shared contract)
src/image-tag.ts.0.25.180.25.18,squid=sha256:...,agent=sha256:...,agent-act=sha256:...,api-proxy=sha256:...,cli-proxy=sha256:...repo/image:tag@sha256:...when digest metadata is present.Runtime compose image resolution
src/docker-manager.tsnow resolves GHCR image refs through the new parser/builder.squid-proxyagent/agent-actiptables-init(inherits the agent image, so digest pin follows automatically)api-proxycli-proxyPredownload path parity
src/commands/predownload.tsnow uses the same digest-aware resolution, so pre-pulled images match runtime refs.Setup action output now carries digest metadata
action.ymlnow fetches releasecontainers.txt(if available), extracts per-image digests, normalizes case, and emits enrichedimage-tagoutput.pull-images: truenow pulls pinned refs when digests exist; otherwise falls back to tag-only behavior.Docs/workflow updates
docs/github_actions.mdanddocs/usage.mdto document digest metadata format..github/workflows/test-action.ymlto validateimage-tagas0.7.0*(base tag with optional digest metadata).Targeted test coverage
src/docker-manager.test.tsandsrc/commands/predownload.test.tsfor digest-appended refs and invalid digest metadata handling.