docker_build ref injection doesn't inject into :latest when two images
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 10.1k
- Forks
- 413
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 6
Description
Reported by Cameron in the tilt channel:
He had a Tiltfile with two docker_builds:
docker_build(image, ...)
docker_build(image + ':init', ...)
He also had Kuberentes YAML that referenced "image:latest" and "image:init".
Tilt complained that the image was not used in any deploy config. This was confusing, because this worked fine with the plain "docker_build(image)"
Workaround
The workaround is to change docker_build(image) to docker_build(image + ":latest")
Possible fixes
There's two different fixes here. We could do one or both.
- Make
docker_build(image)matchimage:latestwhen there are multiple image builds for the same name. This seems like a reasonable expectation (given that :latest is implied in other contexts) - Improve the error message for the case when you the image name matches but the tag name does not match
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the docker_build image/tag matching and ref-injection path, using the two-image example with image:latest and image:init as the reproduction. Done means docker_build(image) correctly matches image:latest alongside another tag, or the error clearly explains the tag mismatch; the issue names no files or tests to run.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, kubernetes
- Domain
- build-system, devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100