-
Notifications
You must be signed in to change notification settings - Fork 6
fix: add --no-cache to docker build commands in CI workflows #674
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Prevent stale apt package index errors (e.g., libexpat1 404) caused by Docker layer cache reusing outdated apt-get update results. This ensures CI builds always fetch fresh package indexes from Ubuntu mirrors. Affected workflows: test-chroot, container-scan, smoke-chroot. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
|
Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded. |
|
🎬 THE END — Smoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨ |
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 |
✅ Coverage Check PassedOverall Coverage
Coverage comparison generated by |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR updates CI workflows to build container images without using Docker’s layer cache, reducing failures caused by stale apt-get update layers referencing removed Ubuntu packages.
Changes:
- Add
--no-cacheto alldocker buildcommands in the chroot integration test workflow. - Add
--no-cacheto container image builds in the container security scan workflow. - Add
--no-cacheto container builds in the smoke chroot workflow definitions.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| .github/workflows/test-chroot.yml | Forces fresh container rebuilds across all chroot test jobs to avoid stale apt index layers. |
| .github/workflows/container-scan.yml | Ensures scanned images are built from scratch to prevent cached-layer related build failures. |
| .github/workflows/smoke-chroot.md | Updates smoke chroot container builds to avoid Docker cache reuse. |
| .github/workflows/smoke-chroot.lock.yml | Keeps the locked smoke chroot workflow in sync by applying the same no-cache builds. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Smoke Test ResultsLast 2 Merged PRs:
Test Results:
Overall Status: PASS
|
Smoke Test ResultsLast 2 Merged PRs:
Test Results:
Overall: PASS cc @Mossaka
|
C++ Build Test Results
Overall: PASS ✅ All C++ projects built successfully.
|
.NET Build Test Results
Overall: PASS ✅ All .NET projects successfully restored, built, and ran.
|
Bun Build Test Results
Overall: PASS ✅ All Bun projects built and tested successfully.
|
Go Build Test Results
Overall: PASS ✅ All Go projects built and tested successfully.
|
Node.js Build Test ResultsAll Node.js projects tested successfully! ✅
Overall: ✅ PASS All projects installed dependencies and passed their test suites without errors.
|
|
GitHub MCP (merged PR titles): ✅ fix: update testPathPattern to testPathPatterns for Jest 30; fix: use lowercase discussion categories to restore create_discussion tool
|
Chroot Version Comparison Test Results
Overall Status: ❌ Tests Failed Not all runtime versions match between host and chroot environments. Only Go versions match correctly.
|
Java Build Test ResultsAll Java build tests PASSED ✅
Overall: PASS Both projects compiled successfully and all tests passed through the AWF firewall with Maven proxy configuration.
|
…st 30 Jest 30.x replaced --testPathPattern with --testPathPatterns. The singular form now causes a hard error instead of running tests. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
|
Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded. |
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
|
🎬 THE END — Smoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨ |
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 |
|
Smoke Test Results for Claude Engine (Run #21886284615) Last 2 merged PRs:
✅ GitHub MCP: PASS Overall Status: PASS
|
C++ Build Test Results
Overall: PASS All C++ projects built successfully.
|
Go Build Test Results
Overall: PASS ✅ All Go projects successfully downloaded dependencies and passed their test suites.
|
|
Smoke Test Results ✅ GitHub MCP: Retrieved last 2 merged PRs
✅ Playwright: Navigated to github.com, title verified Status: PASS ✅ cc @Mossaka
|
Deno Build Test Results
Overall: ✅ PASS All Deno tests completed successfully.
|
Build Test: Bun - ResultsAll tests completed successfully! ✅
Overall: PASS Both projects installed dependencies and ran tests successfully using Bun v1.3.9.
|
Build Test: Node.js - Results
Overall: PASS ✅ All Node.js projects built and tested successfully.
|
Build Test: Rust - ❌ FAILEDError: Missing Rust toolchain (rustc/cargo) in GitHub Actions runner environment. Test Results
Overall: ❌ FAIL Error DetailsResolutionThe workflow needs to install Rust before running tests. Add this step to the workflow: - name: Setup Rust
uses: actions-rust-lang/setup-rust-toolchain@v1Or manually install via rustup: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source $HOME/.cargo/env
|
Chroot Runtime Version Test Results
Overall Result: ❌ FAILED - Not all runtime versions match between host and chroot environment. Analysis
The chroot mode successfully accesses host binaries, but version mismatches indicate the container's bundled runtimes are being used instead of the host's for Python and Node.js.
|
|
fix: update testPathPattern to testPathPatterns for Jest 30
|
Build Test: Java - Results
Overall: PASS ✅ All Java projects compiled successfully and all tests passed through the AWF firewall.
|
Summary
--no-cacheflag to alldocker buildcommands in CI workflow files to prevent stale apt package index errors (e.g.,libexpat1404 Not Found).debfiles from mirrors, Docker's build cache can reuse a staleapt-get updatelayer that references the now-removed packages, causingapt-get installto fail with 404 errors--no-cacheflag forces Docker to rebuild every layer from scratch, ensuringapt-get updatealways fetches the latest package indexesAffected workflows
test-chroot.yml(4 jobs, 8docker buildcommands)container-scan.yml(2 jobs, 2docker buildcommands)smoke-chroot.md+smoke-chroot.lock.yml(1 job, 2docker buildcommands each)Why not modify Dockerfiles?
The Dockerfiles already follow best practice of combining
apt-get update && apt-get installin a singleRUNcommand. The issue is Docker's build layer caching, not the Dockerfile structure. Adding--no-cacheat the build command level in CI is the most targeted fix that avoids impacting local development or GHCR release builds.Test plan
test-chroot.ymlpasses on CI (the workflow that was failing)container-scan.ymlpasses on CIsmoke-chrootworkflow passes on CI🤖 Generated with Claude Code