-
Notifications
You must be signed in to change notification settings - Fork 260
OPRUN-4195,OPRUN-4275,OPRUN-4276: 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. DetailsNeeds 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 57.50% 57.51%
========================================
Files 136 137 +1
Lines 12934 13123 +189
========================================
+ Hits 7438 7548 +110
- Misses 4341 4402 +61
- Partials 1155 1173 +18 ☔ 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. |
30f9439 to
31ef961
Compare
e63f156 to
8df7701
Compare
8df7701 to
63fd4b0
Compare
|
Needs to land after operator-framework/api#454 merges and a new o-f/api release is cut. |
|
merge blocked by operator-framework/api#454 |
63fd4b0 to
1f45837
Compare
|
/hold cancel |
43e002d to
82383cf
Compare
|
@grokspawn: This pull request references OPRUN-4195 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set. This pull request references OPRUN-4275 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set. This pull request references OPRUN-4276 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set. DetailsIn 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 openshift-eng/jira-lifecycle-plugin repository. |
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.
Pull request overview
This PR adds a new bundle-scoped "release" flag to the existing version property to enable more sophisticated replacement strategies with improved transparency. It introduces a new "substitutesFor" catalog template to help users adopt these approaches while avoiding common error scenarios. The implementation updates the API dependency from v0.36.0 to v0.37.0 and provides comprehensive support for release versioning throughout the registry and model layers.
Key Changes:
- Adds Release field to PackageProperty and Bundle structures with corresponding parsing and validation logic
- Implements a new substitutes template for declaratively managing bundle substitutions in upgrade graphs
- Updates property builders and model validation to handle release versions with semantic versioning constraints
Reviewed changes
Copilot reviewed 19 out of 20 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
pkg/registry/types.go |
Adds Release field to PackageProperty struct |
pkg/registry/csv.go |
Implements GetRelease() method to extract release version from CSV spec |
pkg/registry/bundle.go |
Adds Release() method to Bundle type for accessing release version |
pkg/registry/parse.go |
Implements release version extraction from build metadata for substitutesFor bundles |
pkg/registry/registry_to_model.go |
Updates bundle property creation to include release version |
pkg/lib/validation/bundle.go |
Adds validation for CSV release version parsing |
alpha/property/property.go |
Adds Release field and MustBuildPackageRelease helper function |
alpha/model/model.go |
Adds Release field to Bundle, implements version string formatting and name normalization |
alpha/declcfg/declcfg_to_model.go |
Parses and validates release version from package properties |
alpha/template/substitutes/substitutes.go |
New template implementation for bundle substitution workflows |
cmd/opm/alpha/template/substitutes.go |
CLI command for rendering substitutes templates |
cmd/opm/alpha/template/cmd.go |
Integrates substitutes command into template subcommands |
cmd/opm/alpha/convert-template/convert.go |
Adds substitutes converter command |
alpha/template/converter/converter.go |
Extends converter to support substitutes template type |
go.mod, go.sum |
Updates operator-framework/api dependency to v0.37.0 |
| Test files | Comprehensive test coverage for release version functionality and substitutes template |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
cc: @Xia-Zhao-rh ^^ |
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
Signed-off-by: grokspawn <[email protected]>
…possible; fatal if annotation present and build metadata cannot represent release Signed-off-by: grokspawn <[email protected]>
Signed-off-by: grokspawn <[email protected]>
32e3af3 to
604abf4
Compare
Signed-off-by: grokspawn <[email protected]>
604abf4 to
cb43dd4
Compare
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