-
-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use digest instead of tag so VM uses right image. #3206
Conversation
cd9c1bd
to
4fb1a9e
Compare
b16245f
to
46594a7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When this gets merged we should probably merge it all the way down to main
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! Using the digest seems like a better way to ensure we're pulling the correct image.
Seems weird that there is a delay between the image getting uploaded and the digest updating. I'm assuming there are plenty of systems that pull images as soon as they are uploaded.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #3206 +/- ##
=======================================
- Coverage 92.6% 92.6% -0.0%
=======================================
Files 140 140
Lines 12841 12841
=======================================
- Hits 11894 11892 -2
- Misses 947 949 +2 ☔ View full report in Codecov by Sentry. |
I think @jdangerx has gone AFK for the night and it would be great to get this integrated with the other nightly build stuff that was merged today so I'm going to push the button. |
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