-
Couldn't load subscription status.
- Fork 1.8k
Allows the v char in the version string
#5343
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
Allows the v char in the version string
#5343
Conversation
7b49670 to
32e676b
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.
/lgtm
|
@cardil thanks for the PR! Once the changelog fragment is added, we should be good to merge this :) |
|
Before we merge this, I just wanted to double check a few things.
/hold (feel free to unhold if the above questions are sufficiently answered) |
|
/cc @jmrodri get an answer to Joe's comment above |
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.
Based on what Joe said, even if csv.Spec.Version accepts string with v, I think with this change we would still error here:
| if base.Spec.Version.Version, err = semver.Parse(g.Version); err != nil { |
I think olm may accept spec.Version with v prefixed. Looks like csv.spec.Version is of type OperatorVersion, and atleast while Umarshalling it they sanitize the string. Nevertheless, it would also be helpful to have a test to verify if we need to change semver.Parse() to semver.ParseTolerant() while generating csv with this change.
|
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
|
/remove-lifecycle stale |
544e68e to
b2fc3b4
Compare
b2fc3b4 to
08a9d1c
Compare
|
At @joelanford: With the latest changes to this PR, I'm removing the |
v char in version stringv char in the version string
| Allows the `v` char as a prefix in version string. The `v` char in | ||
| version string, is extremely common, for example the `git describe` | ||
| command produces an output like this: `v0.2.0-13-ga74dac1`. |
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.
Could you expand on (a) which versions are allowed to have the v prefix and (b) what commands will translate those versions to non-v-prefixed versions and (c) which output artifacts will drop the v prefix and which won't?
IIRC there's a handful of places where versions are specified by users and a separate handful where versions are written/pushed by the operator-sdk commands or the project Makefile.
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.
Hope the new description is more informative. Please, re-evaluate @joelanford.
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.
@joelanford please take a look once again. Thanks!
08a9d1c to
24f8b1b
Compare
- Adding test to cover version validation - Stripping `v` prefix in version Signed-off-by: Chris Suszyński <ksuszyns@redhat.com>
24f8b1b to
813607c
Compare
…-v-in-version Conflicts fixed: * internal/cmd/operator-sdk/generate/bundle/bundle.go
|
Ping! |
|
Can I get re-review? |
|
/approve |
|
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
|
Stale issues rot after 30d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle rotten |
|
Rotten issues close after 30d of inactivity. Reopen the issue by commenting /close |
|
@openshift-bot: Closed this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Description of the change:
Fixes #5342
Checklist
If the pull request includes user-facing changes, extra documentation is required:
changelog/fragments(seechangelog/fragments/00-template.yaml)website/content/en/docs