-
Notifications
You must be signed in to change notification settings - Fork 208
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
Replace versioncheck.Version with semver.ParseTolerant #1561
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
michi-covalent
force-pushed
the
pr/michi/remove-parse-version
branch
from
May 2, 2023 00:31
c9b81ed
to
d4fa6a9
Compare
michi-covalent
requested review from
youngnick,
chancez,
squeed and
YutaroHayakawa
May 2, 2023 01:20
rolinh
approved these changes
May 2, 2023
youngnick
approved these changes
May 2, 2023
chancez
reviewed
May 2, 2023
chancez
reviewed
May 2, 2023
chancez
requested changes
May 2, 2023
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.
A few questions about the approach being taken.
ParseCiliumVersion uses versioncheck.Version from Cilium's versioncheck package ([1]), which ignores certain pre-release identifiers. Silently ignoring certain pre-release identifiers can be confusing since you might end up installing a different version of Cilium than what you specified. This commit replaces versioncheck.Version with semver.ParseTolerant ([2]) in ParseCiliumVersion function so that cilium-cli interprets the version provided via the --version flag as is. [1]: https://pkg.go.dev/github.com/cilium/cilium/pkg/versioncheck#Version [2]: https://pkg.go.dev/github.com/blang/semver#ParseTolerant Signed-off-by: Michi Mutsuzaki <[email protected]>
michi-covalent
force-pushed
the
pr/michi/remove-parse-version
branch
from
May 2, 2023 21:18
d4fa6a9
to
74d64d9
Compare
michi-covalent
changed the title
Replace ParseCiliumVersion with semver.ParseTolerant
Replace versioncheck.Version with semver.ParseTolerant
May 2, 2023
chancez
reviewed
May 2, 2023
chancez
approved these changes
May 2, 2023
squeed
approved these changes
May 3, 2023
tklauser
approved these changes
May 3, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
ParseCiliumVersion uses versioncheck.Version from Cilium's versioncheck
package (1), which ignores certain pre-release identifiers. Silently
ignoring certain pre-release identifiers can be confusing since you
might end up installing a different version of Cilium than what you
specified.
This commit replaces versioncheck.Version with semver.ParseTolerant (2)
in ParseCiliumVersion function so that cilium-cli interprets the version
provided via the --version flag as is.
Signed-off-by: Michi Mutsuzaki [email protected]