-
Notifications
You must be signed in to change notification settings - Fork 73
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
Implement a script to update dockers.json if necessary #273
Conversation
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.
The logic of the program seems sound to me. I've made several aesthetic suggestions. The only things I'd say are true "problems" are the two bits just after the argument parsing where I've made suggestions for raising Exceptions.
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.
Thank you @VJalili this is great! I have a couple of suggestions relating to design.
While testing a new tag mw-gnomad-superscale-dev-ca70fa3
I noticed that the script successfully found 3/4 of the images I was expecting. The one it did not update was the following:
"sv_pipeline_docker" : "us.gcr.io/broad-dsde-methods/eph/sv-pipeline:eph_hotfix_no_evidence-1f461ed",
when I was expecting it to be
"sv_pipeline_docker" : "us.gcr.io/broad-dsde-methods/markw/sv-pipeline:mw-gnomad-superscale-dev-ca70fa3",
the reason apparently being that these two images reside in different repositories: us.gcr.io/broad-dsde-methods/eph
and us.gcr.io/broad-dsde-methods/markw
. This won't be an issue with CI/CD since we can consistently use us.gcr.io/broad-dsde-methods/gatk-sv
. But for use outside CI/CD, can you add an optional parameter --repo
so users can specify this manually? Also a line in the documentation explaining this would be helpful.
I also think it would be good practice to only look at dockers that can be built with build_docker.py
, ie exclude gatk_docker
, gatk_docker_pesr_override
, genomes_in_the_cloud_docker
, linux_docker
, cloud_sdk_docker
. Rather than hard-coding this, allow this to be a list parameter with these as the default. This will cut down a little on the run time and also prevent any accidental collisions with third-party docker tags (though unlikely in CI/CD, I could image someone running this with a generic tag like latest
which could be a problem).
Co-authored-by: TedBrookings <[email protected]>
Co-authored-by: TedBrookings <[email protected]>
Co-authored-by: TedBrookings <[email protected]>
Co-authored-by: TedBrookings <[email protected]>
Co-authored-by: TedBrookings <[email protected]>
Co-authored-by: Mark Walker <[email protected]>
Co-authored-by: Mark Walker <[email protected]>
Co-authored-by: Mark Walker <[email protected]>
Co-authored-by: Mark Walker <[email protected]>
Co-authored-by: Mark Walker <[email protected]>
Thank you @TedBrookings and @mwalker174, I guess the code reads and works better now.
Very good suggestion, thank you. I added the
I added the line in the documentation. But I am not sure if it is clear to me how the |
I have a thought on the idea of a
Obviously slightly more complicated, but I think not hugely so, and it would help migrate from our current situation where all the dockers are in different repos. One step greater complexity would be to allow |
As @TedBrookings mentioned, if you use
Again I can't really think of a case where there would be a set of updated images with the same tag scattered across different repos. I think it would be safer and clearer to make |
I agree with what Mark just said. One last thing: My build_docker.py changes will introduce |
Thanks for elaborating on that. Please check the updated code if it implements the |
I'm happy with how the |
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.
My concerns have been satisfied, I'm fine with the current state.
Sure, I refactored the argument from |
This PR implements a script to update the
dockers.json
file with the images with a given tag if an image with that tag exists in the container registry that is different from the image already referenced in thedockers.json
The intent of this script is to update
dockers.json
with the images rebuilt and pushed bybuild_docker.py
. Since fora given list of images,
build_docker.py
may rebuild additional images, the list of all the built and pushed images may be different from the user-requested list. However, thebuild_docker.py
does not export the list of all the built images, hence, this script takes a brute-force approach and checks for all the images if they are updated by a given tag (i.e., the tag used by thebuild_docker.py
to tag all the updated images).An output of this script reads as the following: