-
Notifications
You must be signed in to change notification settings - Fork 694
[ci] stage images with final version during external release pipelines #1232
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
Open
cdesiniotis
wants to merge
1
commit into
NVIDIA:main
Choose a base branch
from
cdesiniotis:update-release-staging-job-for-tags
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
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.
I don't think this is required. Why don't we ONLY use SHAs in staging? We would then promote SHA-tagged images to prod (re-versioning) then.
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.
I think pushing tags to staging makes it easier to track images. SHAs are difficult to read
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.
With the new publishing flow, we need to register images in nspect before release. I think I would prefer if we registered release tags rather than SHAs.
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.
I'm not going to fight too hard on this, but I don't want to underestimate the value consistency. Up to now, we've always used a SHA for unreleased images and only tagged the images in the final release process. I understand that this is unwieldly in nspect, but could be made a lot simpler with automation (I know that nspect does allow SHAs as "versions").
Also, since we are now pushing to staging in our internal pipelines, pushing a tag only needs to trigger the release steps:
Is it possible to push both?
Uh oh!
There was an error while loading. Please reload this page.
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.
I am open to discussing this further before moving forward with this PR. I will make another iteration on my document to cover these details.
Could you clarify what you are asking here?
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.
I mean could we reach a state where we have both a SHA-tagged image and a version-taged image in the staging repository? (I assume that this is already the case since this pipeline runs for both the repo sync and a tag push).
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.
Hi @elezar , I disagree that we should push SHA-tagged images to a staging repository. The purpose of the staging repository is to push the images that are staged for production release. If we stick to this convention, it becomes a lot easier to track the history of images. And if we were to push SHA-tagged images to staging, the number of images in the staging repository would grow over time. The sha-tagged images represent our daily-builds and they should be published in a different registry IMO
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.
@tariq1890 how do we handle multiple rc's in this case? Let us say we tag some sha with
v1.2.3
in preparation for the release. This pushes the image to staging with the image tagv1.2.3
. In final scanning / testing we discover that a change is required. How do we handle this? Do we force-push the tagv1.2.3
? How do we keep track that we are testing the updatev1.2.3
image and not the previous one.We use a short-SHA git reference for images and build artifacts because these uniquely identify a particular state of the codebase. We also only build these images once in public and all other operations are essentially moving these around.
If our concern is that we are going to fill up some storage, that is a different problem and one that can be addressed in a number of ways. Two that I can think of are:
Note that any branches in a pipeline that are only triggered occasionally have a higher risk of breaking precisely at the point in time when they are critical. Ensuring that as much of the release process is covered by every commit ensures that we detect problems sooner. One example where we had such problems in the past is container scans -- which were only triggered on release.