Repository navigation
fix(docker): sanitize inherited runtime config when recreating a container for rollback - #1132
Conversation
…ainer for rollback DR-126: Docker.recreateContainer passed logContainer as cloneContainer's runtime-config options instead of resolving them through getCloneRuntimeConfigOptions, the way the update path does. sourceImageConfig, targetImageConfig and runtimeFieldOrigins were always undefined on rollback, so sourceImageKnown was false and the UNKNOWN-origin sanitization never dropped a runtime field the daemon materialized from the newer image (e.g. Entrypoint), cloning it verbatim onto the older image on auto-rollback and manual restore.
|
Deployment failed for project drydock-website with the following error: |
|
Warning Review limit reachedNext included review available in 30 minutes. View limit detailsLimit details: You’ve used all 2 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (1)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
Included review availability: Your plan provides up to 2 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthrough
Merge Risk: ⚪ Minimal · up to Rollback container recreation now removes runtime Entrypoint values inherited from a newer image when absent from the rollback image, while preserving target-defined values. The covered behavior is ready to merge. 🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
Deployment failed for project drydockdemo-website with the following error: |
biggest-littlest
left a comment
There was a problem hiding this comment.
fix(docker): sanitize inherited runtime config when recreating a container for rollback (#1132)
ALARGECOMPANY
left a comment
There was a problem hiding this comment.
fix(docker): sanitize inherited runtime config when recreating a container for rollback (#1132)
…xes (#1134) * fix(docker): sanitize inherited runtime config when recreating a container for rollback (#1132) * fix(docker): sanitize inherited runtime config when recreating a container for rollback DR-126: Docker.recreateContainer passed logContainer as cloneContainer's runtime-config options instead of resolving them through getCloneRuntimeConfigOptions, the way the update path does. sourceImageConfig, targetImageConfig and runtimeFieldOrigins were always undefined on rollback, so sourceImageKnown was false and the UNKNOWN-origin sanitization never dropped a runtime field the daemon materialized from the newer image (e.g. Entrypoint), cloning it verbatim onto the older image on auto-rollback and manual restore. * test(docker): prove rollback keeps only runtime fields the target image defines (cherry picked from commit 22e9f6f) * fix(watcher): require an exact variant suffix match when climbing tag families (#1133) * fix(watcher): require an exact variant suffix match when climbing tag families * test(watcher): cover loose family matching with include filters and digit precision suffixes (cherry picked from commit 378a705) * fix(watcher): require a digit placeholder in precision-only suffix extensions (cherry picked from commit 5717239)
Roadmap DR-126, found by the DR-93 audit verification.
Docker.recreateContainerpassed the log container where the update path passes runtime-config options, so on the auto-rollback (HealthMonitor) and manual restore (backup API) paths the source image was unknown and the UNKNOWN-origin sanitization never fired. An entrypoint or command the newer image introduced was cloned verbatim onto the older image, which lacks the file, and the rolled-back container failed to start.recreateContainernow resolves clone options throughgetCloneRuntimeConfigOptionswith the current spec's image as source and the rollback image as target, the same shape the update path uses.Port to v1.7 follows.
Changelog
Docker.recreateContainerto usegetCloneRuntimeConfigOptions.Entrypointvalues and preserving target-image values.Concerns
Commandvalues.