chore(deploy): remove local images after push to bound runner disk#712
Open
jaeyunha wants to merge 1 commit into
Open
chore(deploy): remove local images after push to bound runner disk#712jaeyunha wants to merge 1 commit into
jaeyunha wants to merge 1 commit into
Conversation
The shared Mac mini self-hosted runner (forever/opensend/exponential share
one Docker daemon) keeps filling its disk. deploy-ecs.sh builds
`<ecr>/exponential-{api,web}:<sha>` locally then pushes, but never removes the
local copies — and `docker image prune` only reaps *dangling* images, so these
*tagged* per-commit builds leak disk every deploy.
Add a best-effort EXIT trap that deletes this deploy's own api+web image tags.
Runs on EXIT so it fires even if a later step fails; `|| true` so it can never
fail the deploy. Mirrors the fix already merged in forever-agent#420.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Member
Author
|
Controller disposition for current head Evidence:
Blocker:
[Jaeyun Ha] Should this deploy-runner disk cleanup be retargeted/rebuilt through the staging release flow, or is it approved as a direct main hotfix/deploy change? |
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 shared Mac mini self-hosted runner (forever / opensend / exponential all share one Docker daemon) keeps filling its disk.
scripts/deploy-ecs.shbuilds<ecr>/exponential-{api,web}:<sha>locally then pushes, but never removes the local copies.docker image pruneonly reaps dangling images, so these tagged per-commit builds leak disk on every deploy.Fix
A best-effort EXIT trap that deletes this deploy's own
api+webimage tags after the run. Runs on EXIT (fires even if a later step fails);|| trueso it can never fail the deploy. The build/push/ECS logic is untouched.Mirrors the same fix already merged in
forever-agent#420(verified working on a live deploy).Validation
bash -n scripts/deploy-ecs.sh✅ECR_REGISTRY/APP_NAME/IMAGE_TAG, all defined before it.Heads-up
This path (
scripts/deploy-ecs.sh) is in the deploy workflow'spaths:filter, so merging will trigger a deploy — expected and safe.🤖 Generated with Claude Code