fix(ci): retry apt metadata refreshes during release builds#93
Merged
Conversation
Adding .gitkeep for PR creation (default mode). This file will be removed when the task is complete. Issue: #92
Member
Author
Working session summaryImplemented and finalized PR 93: #93 What changed:
Verification:
Official references used in the case study: GitHub Actions contexts, GitHub Docker publishing docs, docker/login-action, and Ubuntu apt.conf. This summary was automatically extracted from the AI working session output. |
Member
Author
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
📊 Context and tokens usage:
Total: (858.9K + 19.2M cached) input tokens, 72.8K output tokens, $31.072050 cost 🤖 Models used:
📎 Log file uploaded as Repository (98264KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
Member
Author
🎉 Auto-mergedThis pull request has been automatically merged by hive-mind.
Auto-merged by hive-mind with --auto-merge flag |
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.
Summary
Fixes #92 by making apt metadata refreshes in release image builds resilient to transient Ubuntu mirror-sync windows.
Root Cause
The failed main release run after PR 91 was not caused by the Docker Hub manifest guard. The failing job was
build-dind-amd64 (python)in run26983601067, whereapt-get updateinside the dind image build hit an Ubuntu mirror metadata mismatch:Buildx retried the full build step, but the Dockerfile/install scripts still performed unguarded apt metadata refreshes, so each retry could fail on the same mirror state. The dind script also did not source
/tmp/common.shwhen copied into Docker builds, so shared helper behavior was not available in that path.During PR CI validation, two branch-introduced Dockerfile issues were also caught and fixed:
RUNdefaults to/bin/sh, whilecommon.shis Bash-only because it usesset -euo pipefail.essentials-box/install.shcleans/tmp/*, so the ACL layer needscommon.shcopied again before sourcing it.Changes
apt_update_with_retryinubuntu/24.04/common.shwith aptAcquire::Retries, HTTP/HTTPS timeouts, exponential backoff, and apt-list cleanup between attempts.apt-get update/apt update -ycall sites in Ubuntu 24.04 Dockerfiles, install scripts, release measurement workflow, and install helper scripts with the shared retry helper or a local fallback./tmp/common.shis used when scripts are copied into image build contexts.common.shrun with Bash before the source operation.common.shbefore the essentials ACL layer after the install layer cleanup removes/tmp/*.docs/case-studies/issue-92/.Verification
bash experiments/test-issue92-apt-retry-policy.shbash experiments/verify-script-syntax.shbash experiments/test-issue90-release-workflow-policy.shbash experiments/test-issue82-dockerhub-login-tolerance.shbash experiments/test-issue82-pr-parallel-tests.shbash experiments/test-issue84-apply-changesets-quotes.shbash -n scripts/ubuntu-24-server-install.sh scripts/measure-disk-space.sh ubuntu/24.04/common.sh ubuntu/24.04/assembly/install.sh ubuntu/24.04/cpp/install.sh ubuntu/24.04/dind/install.sh ubuntu/24.04/dotnet/install.sh ubuntu/24.04/essentials-box/install.sh ubuntu/24.04/full-box/install.sh ubuntu/24.04/js/install.sh ubuntu/24.04/php/install.sh ubuntu/24.04/r/install.sh experiments/verify-script-syntax.sh experiments/test-issue92-apt-retry-policy.shruby -ryaml -e 'ARGV.each { |path| YAML.load_file(path); puts "parsed #{path}" }' .github/workflows/release.yml .github/workflows/measure-disk-space.ymlGITHUB_BASE_REF=main GITHUB_HEAD_REF=issue-92-78df2acc5d94 bash scripts/release/validate-changeset.shgit diff --checkLocal Docker CLI was not available in the workspace, so Docker image validation was verified by GitHub Actions.
CI
Latest run for head SHA
8baa3c9f08d4f1aaba71ed7384730c7ec495e08cpassed: https://github.com/link-foundation/box/actions/runs/26988202555Evidence
See
docs/case-studies/issue-92/CASE-STUDY.mdand archived raw logs underdocs/case-studies/issue-92/raw/.