Repository navigation
fix(compose): regenerate overrides on recreation - #1407
Conversation
✅ Deploy Preview for images-devsy-sh canceled.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (6)
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review. 📝 WalkthroughWalkthroughCompose recreation now skips persisted override restoration. Unit and end-to-end tests cover override handling and lifecycle hooks after recreation. ChangesCompose recreation
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~15 minutes Change: Bug fix · Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The recreation change has no identified issue requiring a fix before merge; normal checks remain appropriate. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to Recreation now regenerates settings from current configuration before stopping the existing container. No introduced security issue was established. Generated-file cleanup and overlapping recreation attempts remain partially verified. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 3 files. (3 skipped: 3 unsupported.)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
✨ Simplify code
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 |
✅ Deploy Preview for devsydev canceled.
|
96c98f3 to
3d48770
Compare
|
@greptileai review |
|
|
@greptileai review |
|
@coderabbitai full review |
✅ Action performedFull review finished. |
|
This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again. |
Explicit Compose recreation restored the previous container's generated overrides, allowing removed or changed lifecycle hooks to survive in the replacement container's metadata. Bypass that cache when
Recreateis set so overrides are regenerated from the current configuration before the old container is stopped or deleted.Ordinary starts retain persisted-override reuse, and the existing secret-migration refresh path remains intact. Compose project identity and teardown ordering are preserved. Recreation intentionally performs fresh build/metadata generation while retaining Docker layer caching. The change introduces no new cache state or migration; existing generated-file cleanup remains outside this fix.
Regression coverage:
--recreateand--reset --recreateprove generation errors occur before stop/delete. Both fail on the original implementation.up-docker-composeCI matrix.Validation on final head
d2e421af78d976a6b3ba668b369f373036d382e2:Full local Compose sweep: 47 passed, 6 failed, including passes for both new regression cases. Existing failures were a Debian repository connection timeout during a multistage build, three first-start mount-count assertions observing an additional secrets tmpfs, and two UID expectations on macOS while UID mapping is Linux-gated. These do not exercise the changed persisted-override recreation branch. The origin of the extra local secret mount has not been established; the full Linux CI suite passed.
Fixes #1404. Based on the reported diagnosis and cache-invalidation approach in the contributor's proposed fix.