Skip to content
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

Tag/name images with branch name #92

Open
wants to merge 25 commits into
base: main
Choose a base branch
from

Conversation

KyleFromNVIDIA
Copy link

To support building multiple branches in parallel, include the branch name, either as a tag or as part of the image name.

Contributes to https://github.com/nv-gha-runners/roadmap/issues/127

Copy link
Member

@ajschmidt8 ajschmidt8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Appreciate you working on this, @KyleFromNVIDIA. I left a few comments.

Here are some additional thoughts:

We'll need to update the main.yaml workflow so that it gets triggered to build/deploy images on branches other than main. I think we should use the test/* branch filter to ensure all test/ prefixed branches publish images

It'd also be good to add a small snippet about this in the README.

ci/compute-image-name.sh Show resolved Hide resolved
gc/main.py Outdated Show resolved Hide resolved
@ajschmidt8
Copy link
Member

Oh, one more comment.

Can you remove the runner version strings/tags from the publishes images/AMIs?

I mentioned that briefly in https://github.com/nv-gha-runners/roadmap/issues/127.

We will coordinate with @jjacobelli to ensure this change doesn't cause any breakages.

ci/image-name/deserialize.test Show resolved Hide resolved
amis = sorted(
amis, key=lambda x: parser.parse(x["CreationDate"]), reverse=True
)
if img_name in self.current_images:
if branch_name in self.current_branches:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure the logic here is correct.

Branches publish many AMIs. If we only save a single AMI from a current branch (as done in the next line), we'd discard many legitimate AMIs.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've given the GC logic another go based on our discussion. Please take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants