-
Notifications
You must be signed in to change notification settings - Fork 263
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
default semver constraint for empty string #552
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #552 +/- ##
==========================================
+ Coverage 74.82% 74.85% +0.03%
==========================================
Files 31 31
Lines 3912 3917 +5
==========================================
+ Hits 2927 2932 +5
Misses 850 850
Partials 135 135 ☔ View full report in Codecov by Sentry. |
14240f6
to
e3991dd
Compare
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.
Thanks for your contribution and apologies that it took so long to come back to this PR.
Would you mind to rebase this PR (some of the lint changes have already been merged through another PR), and to supply a unit test for the *
case?
Thanks a lot!
Signed-off-by: Zeyuan Cao <[email protected]>
e3991dd
to
5625cdb
Compare
@zywillc I've rebased and the result is 1 file change in
|
I did some manual testing with the current master, WITHOUT changes in this PR, and here are my findings:
dist/argocd-image-updater test quay.io/cfang/argocd-operator --update-strategy semver
INFO[0002] latest image according to constraint is quay.io/cfang/argocd-operator:1.2.0-rc1
dist/argocd-image-updater test quay.io/cfang/argocd-operator --update-strategy semver --semver-constraint="*"
INFO[0004] latest image according to constraint is quay.io/cfang/argocd-operator:1.1.0
dist/argocd-image-updater test quay.io/cfang/argocd-operator --update-strategy semver --semver-constraint="x.x.x-0"
INFO[0001] latest image according to constraint is quay.io/cfang/argocd-operator:1.2.0-rc1 I think the current behavior already matches the doc and your expectation, and no changes are needed. |
Closes #556
This PR is to fix 2 issues:
current tags filtering behavior will skip semver constraint for prereleases versions (although they are valid semver versions) when there is no explicit constraint parsed from image tags (i.e. empty string) which is inconsistent with the document description.
https://github.com/argoproj-labs/argocd-image-updater/blob/master/pkg/image/version.go#L135-L147
some complex prerelease constraint rules are actually not supported untilsemver > 3.2.0