Skip to content

add Release version as an optional field in the CSV - #454

Merged
openshift-merge-bot[bot] merged 2 commits into
operator-framework:masterfrom
grokspawn:release-version
Dec 11, 2025
Merged

add Release version as an optional field in the CSV#454
openshift-merge-bot[bot] merged 2 commits into
operator-framework:masterfrom
grokspawn:release-version

Conversation

@grokspawn

@grokspawngrokspawn commented Oct 24, 2025

Copy link
Copy Markdown
Contributor

As part of the epic, in order for bundle authors to be able to specify release information, it must be part of the CSV.

This PR proposes an optional additional release field which expresses this information, enabling its use in the catalog creation / consumption flows both on- and off-cluster.

Now with a bonus bundle manifest validator to enforce the release version bundle naming convention, which is used by the operator-verify tool.

@openshift-ciopenshift-ciBot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 24, 2025
@codecov

codecovBot commented Oct 27, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 47.61905% with 22 lines in your changes missing coverage. Please review.
✅ Project coverage is 37.78%. Comparing base (d6a5128) to head (9984aa0).
⚠️ Report is 5 commits behind head on master.

Files with missing linesPatch %Lines
pkg/lib/release/release.go48.00%11 Missing and 2 partials ⚠️
pkg/validation/internal/bundle.go40.00%4 Missing and 2 partials ⚠️
pkg/manifests/bundleloader.go60.00%1 Missing and 1 partial ⚠️
pkg/operators/v1alpha1/zz_generated.deepcopy.go0.00%1 Missing ⚠️
Additional details and impacted files
@@ Coverage Diff @@## master #454 +/- ##
==========================================
+ Coverage 37.71% 37.78% +0.07% 
==========================================
Files 56 57 +1 Lines 4516 4557 +41 ==========================================
+ Hits 1703 1722 +19 - Misses 2661 2678 +17 - Partials 152 157 +5 

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@grokspawn
grokspawnforce-pushed the release-version branch 4 times, most recently from f8bf7e2 to bddcea6CompareOctober 27, 2025 15:36
@grokspawn

grokspawn commented Oct 27, 2025

Copy link
Copy Markdown
ContributorAuthor

Respects the legacy ability to encode a release version implicitly in semver build metadata when adding a bundle-level olm.substitutesFor annotation by detecting the presence annotation in the bundle, and extracting the build metadata as a release version.

Before:

./bin/opm render registry.redhat.io/amq7/amq-broker-rhel8-operator-bundle@sha256:ce274a661f64f3b872b69f2c5b6f6c93f841f456037f69b813ede777c944489b -o yaml | yq 'select(.schema == "olm.bundle").properties[]| select(.type == "olm.package")'
type: olm.packagevalue:
packageName: amq-broker-rhel8version: 7.10.2-opr-2+0.1676475747.p

After:

./bin/opm render registry.redhat.io/amq7/amq-broker-rhel8-operator-bundle@sha256:ce274a661f64f3b872b69f2c5b6f6c93f841f456037f69b813ede777c944489b -o yaml | yq 'select(.schema == "olm.bundle").properties[]| select(.type == "olm.package")'
type: olm.packagevalue:
packageName: amq-broker-rhel8release: 0.1676475747.pversion: 7.10.2-opr-2

Signed-off-by: grokspawn <jordan@nimblewidget.com>
Assisted-by: claude
@grokspawngrokspawn changed the title WIP: add Release version as an optional field in the CSVadd Release version as an optional field in the CSVNov 21, 2025
@openshift-ciopenshift-ciBot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 21, 2025
@grokspawn

Copy link
Copy Markdown
ContributorAuthor

I'm clearing the WIP because I'm hoping to get some reviews/eyes here, but I'm putting on a hold because we want to control the sequence of merges for this and related PRs.

/hold

@openshift-ciopenshift-ciBot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 21, 2025
@grokspawn

grokspawn commented Nov 21, 2025

Copy link
Copy Markdown
ContributorAuthor

Want to note here that all the off- and on-cluster tooling in o-f and known derivatives is set to unmarshal with tolerance for unknown fields, so the use of this feature with old tooling will result in the field getting dropped/ignored, not a functional impact.

@grokspawn

Copy link
Copy Markdown
ContributorAuthor

/hold cancel

opening the floodgates to reviewers ;)

@openshift-ciopenshift-ciBot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 2, 2025
Comment threadpkg/lib/release/release_test.go

@rashmigottipatirashmigottipati left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not super clear behind the motivations for this PR, but changes look good overall.

One question I have is: currently I dont think this would reject invalid release strings. What do you think about adding validation to ensure semver correctness?

@jianzhangbjz

jianzhangbjz commented Dec 3, 2025

Copy link
Copy Markdown
Contributor

cc
/assign @Xia-Zhao-rh

Comment threadpkg/lib/release/release.go
Comment threadpkg/operators/v1alpha1/clusterserviceversion_types.go
Comment threadpkg/lib/release/release.go Outdated
Comment threadpkg/operators/v1alpha1/clusterserviceversion_types.go
@grokspawn
grokspawnforce-pushed the release-version branch 3 times, most recently from 78e27ed to 663bbccCompareDecember 3, 2025 21:22
Comment threadcrds/operators.coreos.com_clusterserviceversions.yaml Outdated
Comment threadcrds/operators.coreos.com_clusterserviceversions.yaml Outdated
Comment threadpkg/operators/v1alpha1/clusterserviceversion_types.go Outdated
Comment threadcrds/operators.coreos.com_clusterserviceversions.yaml
@joelanford

Copy link
Copy Markdown
Member

/approve

@openshift-ciopenshift-ciBot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 10, 2025
Signed-off-by: grokspawn <jordan@nimblewidget.com>

@rashmigottipatirashmigottipati left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/lgtm

@openshift-ciopenshift-ciBot added the lgtm Indicates that a PR is ready to be merged. label Dec 11, 2025
@openshift-ci

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: joelanford, rashmigottipati

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot
openshift-merge-botBot merged commit f65ea7e into operator-framework:masterDec 11, 2025
8 checks passed
@grokspawn
grokspawn deleted the release-version branch December 11, 2025 14:47
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approvedIndicates a PR has been approved by an approver from all required OWNERS files.lgtmIndicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@grokspawn@jianzhangbjz@joelanford@rashmigottipati@tmshort@everettraven@Xia-Zhao-rh