-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
feat(versioning/redhat): Support for Red Hat release versioning #16294
Merged
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
viceice
reviewed
Jun 28, 2022
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.
otherwise LGTM
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
rarkins
approved these changes
Jun 29, 2022
HonkingGoose
approved these changes
Jun 29, 2022
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.
Docs are good to go.
viceice
approved these changes
Jun 29, 2022
🎉 This PR is included in version 32.105.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Changes
This PR adds support for the versioning pattern used by Red Hat-maintained container images. This enables updates for ubi8-minimal, rhel7, ubi9/perl-532 and further images that follow this versioning.
Workaround patterns are added for all container libraries which are maintained exclusively by Red Hat and which only images that follow this versioning concept. So, no false positives should occur, as all images in these paths indeed use this versioning (Yes, I verified that). Note: the absence of trailing slashes in some cases is totally on purpose, as there is e.g.
ubi7-minimal
but alsoubi7/ubi-minimal
.Red Hat version definitions (e.g..
8.0-7
) consist of:Test repositories:
Implementation Notes
#15781 (comment) mentioned a promising RegEx, which, unfortunately, only works in very specific cases:
ubi-minimal:8.6
->"skipReason": "invalid-value"
ubi-minimal:8.5-218
->8.6-751
8.6-751
is not the newest versionIt is possible to make this RegEx more "flexible", e.g. like this:
"versioning": "regex:^(?<major>\\d+)(?:\\.(?<minor>\\d+))?(?:[-\\.](?<patch>\\d+))?(?:[-\\.](?<build>\\d+))?(?:\\.(?<prerelease>\\d+))?$"
-> this will recognize the "major release version" in
patch
and handle an occasional "minor release version" inbuild
. This is still spurious because withubi9/ubi-minimal
, patch versions were introduced and then this doesn't work anymore. In addition, precedence is not handled correctly because higher minor release versions should trigger an update (e.g. 1-19 -> 1-19.1655193074).The solution implemented in this PR works with ubi8, ubi9 and any other image following this versioning. Tested also with many different version variations (https://regex101.com/r/MKZaMQ/1).
Context
Closes #15781
Documentation (please check one with an [x])
How I've tested my work (please tick one)
I have verified these changes via: