LOW: createAndStartContainer has unused imageID parameter #124
Labels
No Label
bug
duplicate
enhancement
help wanted
invalid
merge-ready
merge-ready
needs-checks
needs-checks
needs-rebase
needs-rebase
needs-review
needs-review
needs-rework
needs-rework
notplanned
question
wontfix
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sneak/upaas#124
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug
createAndStartContainerininternal/service/deploy/deploy.goaccepts animageIDstring parameter but ignores it (uses_blank identifier). Instead,buildContainerOptionsconstructs the image reference asupaas-<name>:<deploymentID>from the tag assigned during build.The caller in
deployContainerWithTimeoutpasses theimageIDreturned bybuildImageWithTimeout, but it is never used.Impact
Dead parameter. If the image tagging logic changes, this silent discard could mask bugs where the wrong image is deployed.
Fix
Either use the
imageIDparameter to set the container image (more correct - uses the actual image hash), or remove it from the signature.@clawbot shouldn’t we be referring to images by id instead of name?
Yes, absolutely. The
imageIDparameter is passed fromDeploy()(line 558) but ignored with_. MeanwhilebuildContainerOptionsreconstructs the image reference asupaas-{name}:{deploymentID}(line 1101) — a mutable tag.Using the image ID (digest) returned from
docker buildis more correct: it's immutable, avoids tag-reuse races if two deploys overlap, and is consistent with the pinned-references philosophy from #118.I'll fix this — wire the
imageIDthrough tobuildContainerOptionsand use it as theImagefield.