api icon indicating copy to clipboard operation
api copied to clipboard

WIP: add Release version as an optional field in the CSV

Open grokspawn opened this issue 1 month ago • 3 comments

grokspawn avatar Oct 24 '25 20:10 grokspawn

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Once this PR has been reviewed and has the lgtm label, please assign perdasilva for approval. For more information see the Code Review Process.

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 /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

openshift-ci[bot] avatar Oct 24 '25 20:10 openshift-ci[bot]

Codecov Report

:x: Patch coverage is 47.61905% with 22 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 37.78%. Comparing base (d6a5128) to head (4f11d6e). :warning: Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
pkg/lib/release/release.go 48.00% 11 Missing and 2 partials :warning:
pkg/validation/internal/bundle.go 40.00% 4 Missing and 2 partials :warning:
pkg/manifests/bundleloader.go 60.00% 1 Missing and 1 partial :warning:
pkg/operators/v1alpha1/zz_generated.deepcopy.go 0.00% 1 Missing :warning:
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     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

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

codecov[bot] avatar Oct 27 '25 14:10 codecov[bot]

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.package
value:
  packageName: amq-broker-rhel8
  version: 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.package
value:
  packageName: amq-broker-rhel8
  release: 0.1676475747.p
  version: 7.10.2-opr-2

grokspawn avatar Oct 27 '25 20:10 grokspawn

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

grokspawn avatar Nov 21 '25 19:11 grokspawn

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 avatar Nov 21 '25 21:11 grokspawn

/hold cancel

opening the floodgates to reviewers ;)

grokspawn avatar Dec 02 '25 21:12 grokspawn

cc /assign @Xia-Zhao-rh

jianzhangbjz avatar Dec 03 '25 03:12 jianzhangbjz