Use digest instead of tag so VM uses right image. #3206
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Follow-up to #3195 ; Related to #3140 .
We were getting inconsistent behavior pulling the latest image for a certain tag off of Dockerhub - often we would get an out-of-date image running on the VM.
While investigating Google Batch, I found that this was due to Dockerhub not updating its tag references quickly enough. However, we can just refer to the actual image digest we just built, which is unambiguously the correct image.
Given how small this change is, I decided to pull this logic over to the non-Batch world as well, so we don't have to wait for me to get all the Batch stuff working.
Testing
I short-circuited
gcp_pudl_etl.sh
and had it echo a short message to the logs.Then:
build-deploy-pudl.yml
Then, I went back to how it works on
main
/dev
now - using the branch name as the image tag, instead of the image digest. Repeating the flow above updated the changed line on the first iteration, but subsequent changes were not picked up.So I'm convinced that this should alleviate our "VM doesn't pick up the latest image version" woes.
To-do list