fix: use imageID in createAndStartContainer (closes #124) #127
Посилання в новій задачі
Заблокувати користувача
Видалити гілку "fix/use-image-id-in-container"
Видалення гілки є незворотним. Хоча видалена гілка може продовжувати існувати ще деякий час до того, як її буде видалено остаточно, у більшості випадків це НЕМОЖЛИВО скасувати. Продовжити?
Wire the
imageIDparameter (returned from docker build) throughcreateAndStartContainerandbuildContainerOptionsinstead of reconstructing a mutable tag viafmt.Sprintf.This ensures containers reference the immutable image digest, avoiding tag-reuse races when deploys overlap.
Changes
_ stringtoimageID stringincreateAndStartContainerbuildContainerOptionsto acceptimageID stringinstead ofdeploymentID int64imageIDdirectly as theImagefield in container optionspreviousImageIDdirectly (removing redundant override)database.NewTestDatabaseandlogger.NewForTesttest helpersmake check
Code Review: ✅ LGTM
Summary: Fixes
buildContainerOptionsto use the actual Docker image ID instead of constructing a tag fromdeploymentID. Also fixes rollback to passimageIDcorrectly.Changes reviewed:
buildContainerOptionsnow acceptsimageID stringinstead ofdeploymentID int64— correctcreateAndStartContainerpassesimageIDthrough properly — correctpreviousImageIDdirectly tobuildContainerOptionsinstead of overwritingopts.Imageafter the fact — cleanerTestBuildContainerOptionsUsesImageID) validates the fixdatabase/testing.go,logger/testing.go,export_test.go) are cleanmake check: PASS — all tests pass, build succeeds.Labeled
merge-ready, assigned to @sneak.