-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
[v1.15] ci/ipsec: Fix downgrade version for release preparation commits #30718
Merged
michi-covalent
merged 2 commits into
v1.15
from
pr/qmonnet/ipsec/patch-release-downgrade-fix-1.15
Feb 12, 2024
Merged
[v1.15] ci/ipsec: Fix downgrade version for release preparation commits #30718
michi-covalent
merged 2 commits into
v1.15
from
pr/qmonnet/ipsec/patch-release-downgrade-fix-1.15
Feb 12, 2024
Conversation
This file contains 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
Member
qmonnet
commented
Feb 12, 2024
- contrib/scripts: Remove special handling for patch release number 90 #30413
- ci/ipsec: Fix downgrade version for release preparation commits #30532
[ upstream commit 4d7902f ] In commit 56dfec2 ("contrib/scripts: Support patch releases in print-downgrade-version.sh"), we added support to disaply the previous patch release for a given version number to the print-downgrade-version.sh script. We treated to patch release values as special cases: 0, because this means that we don't have a previous patch release on the branch, and 90, because it used to be a temporary value used during release processes. But as Joe commented, we no longer use this "90" convention, but we use something like vX.Y.Z-dev instead. Let's remove the reverence to 90 from the script (and the workflow calling it). Comparing with the commit introducing the special cases in the script, the output remains nearly the same as when it was introduced, only the previous patch release for "1.13.90" naturally turns to "1.13.89" instead of providing an error. VERSION Previous minor Previous patch release 1.14.3 v1.13 v1.14.2 1.14.1 v1.13 v1.14.0 1.14.0 v1.13 <error> 1.14.1-dev v1.13 v1.14.0 1.15.0-dev v1.14 <error> 1.13.90 v1.12 v1.13.89 Reported-by: Joe Stringer <joe@cilium.io> Signed-off-by: Quentin Monnet <quentin@isovalent.com>
[ upstream commit 3803f53 ] For the IPsec upgrade/downgrade CI test, for the jobs where we upgrade/downgrade to the closest patch release, the script print-downgrade-version.sh determines the patch release by picking up the value in file VERSION. This works most of the time. For release preparation commits, however, this approach fails because the reference in VERSION points to a release that has not been tagged or published yet. We need to pick the previous patch release in that case. However, it's non-trivial to figure out whether we're on a release preparation commit, in particular because the CI workflow does a shallow Git clone and we don't have access to the Git history. I couldn't find an ideal solution, so this commit changes the shallow-clone and makes it fetch the tags, as well, so that we're allow to check for the tag existence before returning it. If the tag is not available, we decrement the patch version found in VERSION before computing the patch release to downgrade to. Note that we do not expect this second attempt (with the patch release number decremented) to fail, so we do not check for its existence in the Git history: if we did, and printed an error in the script but returned an empty value, we'd skip the rest of the CI workflow. Instead, if we're in a situation where this decremented patch release number is returned but is not a valid one, CI will attempt to run the workflow with it, and fail loudly, which is what we want in that case. Sample output from the script: VERSION Prevous minor Previous patch release 1.14.3 v1.13 v1.14.3 1.14.1 v1.13 v1.14.1 1.14.0 v1.13 <error> 1.14.1-dev v1.13 v1.14.1 1.15.0-dev v1.14 <error> 1.13.90 v1.12 v1.13.89 <-- decremented 2.0.1 <error> v2.0.0 <-- decremented Fixes: 5581963 ("ci/ipsec: Fix version retrieval for downgrades to closest patch release") Signed-off-by: Quentin Monnet <quentin@isovalent.com>
maintainer-s-little-helper
bot
added
backport/1.15
This PR represents a backport for Cilium 1.15.x of a PR that was merged to main.
kind/backports
This PR provides functionality previously merged into master.
labels
Feb 12, 2024
/test-backport-1.15 |
viktor-kurchenko
approved these changes
Feb 12, 2024
michi-covalent
approved these changes
Feb 12, 2024
michi-covalent
deleted the
pr/qmonnet/ipsec/patch-release-downgrade-fix-1.15
branch
February 12, 2024 18:02
maintainer-s-little-helper
bot
added
the
ready-to-merge
This PR has passed all tests and received consensus from code owners to merge.
label
Feb 12, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
backport/1.15
This PR represents a backport for Cilium 1.15.x of a PR that was merged to main.
kind/backports
This PR provides functionality previously merged into master.
ready-to-merge
This PR has passed all tests and received consensus from code owners to merge.
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.