-
Couldn't load subscription status.
- Fork 261
release bundle attribute in version property #1792
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
base: master
Are you sure you want to change the base?
Conversation
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #1792 +/- ##
==========================================
+ Coverage 55.37% 55.53% +0.16%
==========================================
Files 136 137 +1
Lines 16003 16175 +172
==========================================
+ Hits 8861 8983 +122
- Misses 5987 6030 +43
- Partials 1155 1162 +7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
64f5075 to
ecf7b3a
Compare
7dd8b56 to
30f9439
Compare
|
Please note that this repo's merge method is set to squash, so all of these commits will get squished to a single one even if I forget to do it manually. They're preserved here mostly because there has been a lot of ground covered over the lifetime of this feature w.r.t. different implementation strategies, and I didn't want to lose that. |
Signed-off-by: grokspawn <[email protected]>
Signed-off-by: grokspawn <[email protected]>
Signed-off-by: grokspawn <[email protected]>
Signed-off-by: grokspawn <[email protected]>
Signed-off-by: grokspawn <[email protected]>
Signed-off-by: grokspawn <[email protected]>
Signed-off-by: grokspawn <[email protected]> Helped-by: Claude-LLM
30f9439 to
31ef961
Compare
Signed-off-by: grokspawn <[email protected]>
| // Parse release version from the package property. | ||
| var relver semver.Version | ||
| if props.Packages[0].Release != "" { | ||
| relver, err = semver.Parse(fmt.Sprintf("0.0.0-%s", props.Packages[0].Release)) |
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.
This would parse successfully if the value of props.Packages[0].Release was 1+1. We would correctly get an error from line 146, but it would be confusing to a user, I think, because we're leaking that we expect the release to only contain "prerelease", which is kind of a out of left field unless you know that we just happen to use prerelease syntax for our release value specification.
I think it may be better to do something like this: https://github.com/joelanford/operator-controller/blob/2cf768082d2e4f129e6ec82740afab55201cbd8e/internal/operator-controller/bundle/versionrelease.go#L79-L101
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.
The reason that I wanted to use this approach is because I wanted to leverage the version.Compare and version.Validate (as well as PRVersion.Compare)... including all the consistent messaging that semver offers from version.Parse in addition to our layered-on validations.
…possible; fatal if annotation present and build metadata cannot represent release Signed-off-by: grokspawn <[email protected]>
861b842 to
677995d
Compare
Signed-off-by: grokspawn <[email protected]>
Description of the change:
Adds a new bundle-scoped "release" flag to the existing version property to allow for more sophisticated replacement strategies with improved transparency.
Adds a new substitutesFor catalog template to help folks trivially adopt the new approaches and avoid common error scenarios.
Motivation for the change:
As brief and RFC state, the imperative upgrade graph building process had a CSV attribute "substitutesFor" which allowed tooling to perform bundle-level replacement in resulting graphs. We had no equivalent FBC approach to the problem where there is a packaging-only change which we need to insert into an existing graph in a way that it didn't pretend to be the original bundle, but made it possible to prefer the new bundle over the old one, and even upgrade from the old to the new.
Reviewer Checklist
/docs