Skip to content

✨ Add bundle-config annotation to ClusterExtensionRevision#2549

Draft
perdasilva wants to merge 3 commits intooperator-framework:mainfrom
perdasilva:bundle-config-annotation
Draft

✨ Add bundle-config annotation to ClusterExtensionRevision#2549
perdasilva wants to merge 3 commits intooperator-framework:mainfrom
perdasilva:bundle-config-annotation

Conversation

@perdasilva
Copy link
Contributor

@perdasilva perdasilva commented Mar 10, 2026

Summary

  • Adds olm.operatorframework.io/bundle-config annotation to ClusterExtensionRevision when the owning ClusterExtension has .spec.config.inline set
  • The annotation value is the JSON string of the inline configuration
  • Adds unit tests covering annotation presence/absence for inline config, nil config, and nil inline
  • Adds e2e scenario verifying the annotation is set on the revision when inline config is used
  • Adds a limit of 50KB to the value to not blow metadata limits

Test plan

  • Unit tests pass (Test_SimpleRevisionGenerator_BundleConfigAnnotation)
  • E2e scenario: ClusterExtensionRevision is annotated with bundle config when inline config is set

🤖 Generated with Claude Code

When a ClusterExtension has .spec.config.inline set, propagate the
inline configuration as a JSON annotation on the ClusterExtensionRevision
using the key olm.operatorframework.io/bundle-config.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 10, 2026 11:52
@openshift-ci openshift-ci bot requested a review from oceanc80 March 10, 2026 11:52
@netlify
Copy link

netlify bot commented Mar 10, 2026

Deploy Preview for olmv1 ready!

Name Link
🔨 Latest commit ad2ae29
🔍 Latest deploy log https://app.netlify.com/projects/olmv1/deploys/69b03e607af3600008963585
😎 Deploy Preview https://deploy-preview-2549--olmv1.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@openshift-ci
Copy link

openshift-ci bot commented Mar 10, 2026

[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 kevinrizza for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds support for persisting a ClusterExtension’s inline configuration onto the generated ClusterExtensionRevision via a new olm.operatorframework.io/bundle-config annotation, with accompanying unit + e2e coverage.

Changes:

  • Introduce labels.BundleConfigKey constant for the new revision annotation key.
  • Set the bundle-config annotation on generated ClusterExtensionRevisions when .spec.config.inline is present.
  • Add unit test coverage and a new e2e scenario validating annotation presence/value.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
test/e2e/features/install.feature Adds an e2e scenario asserting the revision is annotated with the inline bundle config JSON.
internal/operator-controller/labels/labels.go Defines the olm.operatorframework.io/bundle-config annotation key constant.
internal/operator-controller/applier/boxcutter_test.go Adds unit tests for presence/absence of the bundle-config annotation.
internal/operator-controller/applier/boxcutter.go Applies the bundle-config annotation during ClusterExtensionRevision generation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link

codecov bot commented Mar 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.71%. Comparing base (6f23a79) to head (735d4c5).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2549      +/-   ##
==========================================
+ Coverage   68.60%   68.71%   +0.11%     
==========================================
  Files         131      131              
  Lines        9330     9335       +5     
==========================================
+ Hits         6401     6415      +14     
+ Misses       2438     2430       -8     
+ Partials      491      490       -1     
Flag Coverage Δ
e2e 42.44% <0.00%> (+0.19%) ⬆️
experimental-e2e 51.84% <60.00%> (+0.26%) ⬆️
unit 53.82% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

@perdasilva perdasilva marked this pull request as draft March 10, 2026 12:23
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 10, 2026
Append "<truncated due to size limit>" suffix when the inline
configuration JSON exceeds 50KB to stay within annotation size limits.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 10, 2026 13:05
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@perdasilva perdasilva force-pushed the bundle-config-annotation branch 2 times, most recently from ef269c9 to e3bac01 Compare March 10, 2026 13:32
Copilot AI review requested due to automatic review settings March 10, 2026 14:07
@perdasilva perdasilva force-pushed the bundle-config-annotation branch from e3bac01 to a495755 Compare March 10, 2026 14:07
@perdasilva perdasilva force-pushed the bundle-config-annotation branch from a495755 to e82f9d9 Compare March 10, 2026 14:10
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Account for the suffix length when truncating so the final annotation
value (content + suffix) does not exceed the 50KB limit.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Per G. da Silva <pegoncal@redhat.com>
@perdasilva perdasilva force-pushed the bundle-config-annotation branch from e82f9d9 to ad2ae29 Compare March 10, 2026 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants