Skip to content

Conversation

@cardil
Copy link

@cardil cardil commented Nov 6, 2021

Description of the change:

Fixes #5342

Checklist

If the pull request includes user-facing changes, extra documentation is required:

@cardil cardil force-pushed the bugfix/5342-allow-v-in-version branch from 7b49670 to 32e676b Compare November 6, 2021 11:58
Copy link
Member

@varshaprasad96 varshaprasad96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 8, 2021
@asmacdo
Copy link
Member

asmacdo commented Nov 8, 2021

@cardil thanks for the PR! Once the changelog fragment is added, we should be good to merge this :)

@joelanford
Copy link
Member

joelanford commented Nov 10, 2021

Before we merge this, I just wanted to double check a few things.

  1. Are we talking about the version derived from csv.spec.version?
  2. If so, are we sure OLM supports versions that include a v prefix?

/hold

(feel free to unhold if the above questions are sufficiently answered)

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 10, 2021
@jmrodri
Copy link
Member

jmrodri commented Jan 14, 2022

/cc @jmrodri get an answer to Joe's comment above

Copy link
Member

@varshaprasad96 varshaprasad96 left a 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.

@openshift-bot
Copy link

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@openshift-ci openshift-ci bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 14, 2022
@cardil
Copy link
Author

cardil commented Apr 26, 2022

/remove-lifecycle stale

@openshift-ci openshift-ci bot removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. lgtm Indicates that a PR is ready to be merged. labels Apr 26, 2022
@cardil cardil force-pushed the bugfix/5342-allow-v-in-version branch 2 times, most recently from 544e68e to b2fc3b4 Compare April 26, 2022 11:10
@cardil cardil force-pushed the bugfix/5342-allow-v-in-version branch from b2fc3b4 to 08a9d1c Compare April 26, 2022 12:11
@cardil
Copy link
Author

cardil commented Apr 26, 2022

At @joelanford:

With the latest changes to this PR, I'm removing the v prefix if there is any. This means any other behavior of operator-sdk is unchanged.

@cardil cardil changed the title Allow v char in version string Allows the v char in the version string Apr 26, 2022
Comment on lines 5 to 7
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`.
Copy link
Member

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.

Copy link
Author

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.

Copy link
Author

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!

@openshift-ci openshift-ci bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 13, 2022
@cardil cardil force-pushed the bugfix/5342-allow-v-in-version branch from 08a9d1c to 24f8b1b Compare June 22, 2022 13:49
@openshift-ci openshift-ci bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 22, 2022
 - Adding test to cover version validation
 - Stripping `v` prefix in version

Signed-off-by: Chris Suszyński <ksuszyns@redhat.com>
@cardil cardil force-pushed the bugfix/5342-allow-v-in-version branch from 24f8b1b to 813607c Compare June 22, 2022 13:57
@cardil cardil requested a review from joelanford June 22, 2022 14:03
@openshift-ci openshift-ci bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 26, 2022
…-v-in-version

Conflicts fixed:

 * internal/cmd/operator-sdk/generate/bundle/bundle.go
@openshift-ci openshift-ci bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 13, 2022
@cardil
Copy link
Author

cardil commented Aug 25, 2022

Ping!

@cardil
Copy link
Author

cardil commented Oct 10, 2022

Can I get re-review?

@varshaprasad96
Copy link
Member

varshaprasad96 commented Jan 4, 2023

/approve
/lgtm
/ok-to-test
The change looks good to me. @joelanford any objections in merging this?

@openshift-ci openshift-ci bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. lgtm Indicates that a PR is ready to be merged. labels Jan 4, 2023
@openshift-bot
Copy link

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@openshift-ci openshift-ci bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 5, 2023
@openshift-bot
Copy link

Stale issues rot after 30d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle rotten
/remove-lifecycle stale

@openshift-ci openshift-ci bot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels May 5, 2023
@openshift-bot
Copy link

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Exclude this issue from closing again by commenting /lifecycle frozen.

/close

@openshift-ci openshift-ci bot closed this Jun 5, 2023
@openshift-ci
Copy link

openshift-ci bot commented Jun 5, 2023

@openshift-bot: Closed this PR.

In response to this:

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Exclude this issue from closing again by commenting /lifecycle frozen.

/close

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm Indicates that a PR is ready to be merged. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. ok-to-test Indicates a non-member PR verified by an org member that is safe to test.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Operator SDK doesn't support v char in version, claiming it's not semantic

7 participants