Skip to content

render package-level info from channel head in semver template#1933

Merged
openshift-merge-bot[bot] merged 2 commits intooperator-framework:masterfrom
grokspawn:semver-package-info
Mar 26, 2026
Merged

render package-level info from channel head in semver template#1933
openshift-merge-bot[bot] merged 2 commits intooperator-framework:masterfrom
grokspawn:semver-package-info

Conversation

@grokspawn
Copy link
Contributor

Description of the change:
when expanding semver catalog templates, pulls the package info for generated FBC from the default channel head bundle, solving #1837

Motivation for the change:

Reviewer Checklist

  • Implementation matches the proposed design, or proposal is updated to match implementation
  • Sufficient unit test coverage
  • Sufficient end-to-end test coverage
  • Docs updated or added to /docs
  • Commit messages sensible and descriptive

Signed-off-by: grokspawn <jordan@nimblewidget.com>
@openshift-ci openshift-ci bot requested review from kevinrizza and tmshort March 13, 2026 18:16
@codecov
Copy link

codecov bot commented Mar 13, 2026

Codecov Report

❌ Patch coverage is 87.50000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 57.67%. Comparing base (9d741cf) to head (64b4ed7).
⚠️ Report is 16 commits behind head on master.

Files with missing lines Patch % Lines
alpha/template/semver/semver.go 87.50% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1933      +/-   ##
==========================================
+ Coverage   57.52%   57.67%   +0.15%     
==========================================
  Files         139      139              
  Lines       13339    13363      +24     
==========================================
+ Hits         7673     7707      +34     
+ Misses       4484     4469      -15     
- Partials     1182     1187       +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 grokspawn requested a review from joelanford March 19, 2026 12:42
@grokspawn grokspawn force-pushed the semver-package-info branch from 77032b4 to ea21fb2 Compare March 19, 2026 12:48
// Parse CSV JSON to extract metadata
var csv registry.ClusterServiceVersion
if err := json.Unmarshal([]byte(cfg.Bundles[bundleIdx].CsvJSON), &csv); err != nil {
return fmt.Errorf("unmarshal CSV JSON for bundle %q: %v", cfg.Bundles[bundleIdx].Name, err)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the only error return, and I'm pretty confident we could eliminate this since at this point all the schema content should be validated already. Then this function could be more consistent with what I believe is a reasonable expectation that the package info is only provided in olm.package if it is provided in olm.bundle.
We could do an exhaustive check to ensure that we've "bubbled up" any reasonable data to fill vacancies, but that seems excessive.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Made the update to eliminate the error return, since it doesn't make sense to have to RE-verify the schema anew here.

Copy link
Contributor

@oceanc80 oceanc80 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 Mar 26, 2026
@grokspawn grokspawn force-pushed the semver-package-info branch from ea21fb2 to acfc4db Compare March 26, 2026 17:40
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Mar 26, 2026
Copy link
Contributor

@oceanc80 oceanc80 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 Mar 26, 2026
Copy link
Member

@rashmigottipati rashmigottipati left a comment

Choose a reason for hiding this comment

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

/lgtm

Signed-off-by: grokspawn <jordan@nimblewidget.com>
@grokspawn grokspawn force-pushed the semver-package-info branch from acfc4db to 64b4ed7 Compare March 26, 2026 17:53
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Mar 26, 2026
@tmshort
Copy link
Contributor

tmshort commented Mar 26, 2026

/approve

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 26, 2026
Copy link
Member

@rashmigottipati rashmigottipati 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 Mar 26, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 26, 2026

[APPROVALNOTIFIER] This PR is APPROVED

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

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-bot bot merged commit 2095729 into operator-framework:master Mar 26, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants