Repository navigation
Do not recreate a whole pool when scaling it up - #164
Conversation
buildx's default provenance attestation records when the build ran, so every `up --build` -- even one served entirely from cache -- produced a new image ID. Compose then saw every running container as out of date and recreated them all, cancelling their jobs: a scale-up, an autoscale grow or a rerun of startRunners.sh restarted the pool instead of adding to it. Set BUILDX_NO_DEFAULT_ATTESTATIONS=1 for the build so an unchanged build is the same image. compose.yaml's `provenance: false` does not work here: compose 5 drops it from the bake definition it hands buildx. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
DeepSeek AI Code Review2. Bugs and logic errorsThe fix is correct in intent, but the comment is misleading about why it works and could cause a future maintainer to remove it. The comment claims One real concern: 4. Test coverageNo test or validation step is included. The bug being fixed is exactly the kind that's hard to catch in CI (it manifests as "pool got recreated and jobs were cancelled"), but it's also exactly the kind that a cheap regression test could catch: run 5. Suggested follow-up issues
APPROVE — the fix is correct and scoped; the deprecation risk and missing regression test are real but non-blocking. Reviewed by DeepSeek via deepseek-pr-review.yml. Advisory only. |
GPT AI Code ReviewSkipped: API key not configured The To enable GPT reviews, add
Once the secret is configured, re-run this workflow or push a new commit to trigger a fresh review. REVIEW SKIPPED - API KEY NOT CONFIGURED Reviewed by GPT via gpt-pr-review.yml. Advisory only. |
BUILDX_NO_DEFAULT_ATTESTATIONS env var to --provenance=false build flag
#166
Problem
Adding runners to a busy Docker pool (
startRunners.ps1/.sh,pools.sh scale, autoscale growth) recreated every existing container in the pool, cancelling in-progress jobs.Cause
cmd_uprunsdocker compose up -d --build --scale runner=N. buildx attaches a provenance attestation by default, which records the build time, so every build -- even a fully cached one -- yields a new image ID. Compose then treats all running containers as out of date and recreates them.Fix
Run the build with
BUILDX_NO_DEFAULT_ATTESTATIONS=1, making an unchanged build produce the same image ID. (provenance: falseincompose.yamlwas tried first but Compose 5 drops it from the bake definition.)Verification
sleep): before, scaling 1→2 recreated runner-1; after, scaling 3→4 left runners 1–3Runningand only created runner-4.tests/pools_test.shpasses.Note
The first
upafter this lands still recreates each pool once, since running containers are on the old attested images. Do it while idle. Genuine Dockerfile/entrypoint/label/limit changes still recreate the pool, by design.🤖 Generated with Claude Code