Skip to content

🌱 stop stamping owner-name on ClusterObjectSet managed objects - #3038

Merged
openshift-merge-bot[bot] merged 1 commit into
operator-framework:mainfrom
perdasilva:cos-managed-object-labels
Oct 20, 2026
Merged

openshift-merge-bot[bot] merged 1 commit into
operator-framework:mainfrom
perdasilva:cos-managed-object-labels

Conversation

@perdasilva

@perdasilva perdasilva commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Description

Follow-up to a review discussion on #3034: the ClusterObjectSet controller copied the olm.operatorframework.io/owner-name label off the COS onto every managed object. This removes that propagation.

The copy was:

  • Redundant — in the ClusterExtension path, the applier already bakes owner-kind and owner-name onto every managed object (operator-controller builds objLbls in boxcutter_reconcile_steps.go; the applier applies them via obj.SetLabels(merge(..., objectLabels)) in boxcutter.go). The removed line re-set owner-name to the value already present. Managed objects are also labeled app.kubernetes.io/managed-by: olm.operatorframework.io by the boxcutter revision engine (matching orb-operator).
  • Fragile — it read the label off the COS's own metadata (cos.Labels[owner-name]), which is absent for standalone ClusterObjectSets created without it.
  • Unused by the controller — revision lookups use the .spec.group index and teardown uses owner references.

Changes

  • Remove the owner-name propagation in buildBoxcutterPhases (keeping the collision-protection handling that shared the loop) and drop the now-unused labels import.

e2e impact

Safe. uninstall.feature (ClusterExtensionResourcesCreatedAndAreLabeled) asserts managed objects carry owner-kind+owner-name, and that continues to hold because those labels come from the applier's baked-in objectLabels, not from the removed line. No e2e asserts owner-name on managed objects created by a standalone ClusterObjectSet.

Scope / compatibility

  • Only the managed-object propagation changes. owner-name on the ClusterObjectSet objects themselves and on referred secrets (both applier-set, asserted by the install e2e) is untouched.

Testing

  • go build ./..., full ./internal/object-controller/... suite, and golangci-lint all pass.
  • Verified on an experimental KIND cluster: make e2e/uninstall → 2 scenarios passed, 26 steps passed (BoxcutterRuntime enabled, no scenarios skipped), including the @BoxcutterRuntime scenario and the ClusterExtension resources are created and labeled step that checks managed objects still carry owner-kind/owner-name.

🤖 Generated with Claude Code

The ClusterObjectSet controller copied the owner-name label off the COS onto
every managed object. That label is redundant and fragile: managed objects are
already labeled app.kubernetes.io/managed-by by the boxcutter revision engine,
the controller never reads owner-name (revision lookups use the spec.group
index and teardown uses owner references), and copying it off the COS breaks for
standalone ClusterObjectSets created without the label. Remove the propagation;
managed-object labeling is now just the managed-by label (matching orb-operator).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Per G. da Silva <pegoncal@redhat.com>
@openshift-ci
openshift-ci Bot requested review from dtfranz and pedjak October 20, 2026 16:04
@netlify

netlify Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for olmv1 ready!

Name Link
🔨 Latest commit dda6232
🔍 Latest deploy log https://app.netlify.com/projects/olmv1/deploys/6ad7910e91a585c41ceb50d2
😎 Deploy Preview https://deploy-preview-3038--olmv1.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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

@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: 46ac48ab-a186-40d8-9490-247f03be80c8
📥 Commits

Reviewing files that changed from the base of the PR and between 19aa30d and dda6232.

📒 Files selected for processing: 1
  • internal/object-controller/controllers/clusterobjectset_controller.go

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.

📝 Walkthrough

The controller no longer adds owner labels to resolved objects before passing them to the boxcutter revision engine. Collision-protection options remain unchanged.

Changes: ClusterObjectSet owner labels

Layer / File(s) Summary
Pass objects to the revision engine
internal/object-controller/controllers/clusterobjectset_controller.go
The controller no longer adds owner labels to managed objects. Comments state that the boxcutter revision engine applies app.kubernetes.io/managed-by.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: fgiudici

Merge Risk: ⚪ Minimal · up to dda62

No actionable merge-blocking risk is identified; the change is mergeable after normal checks.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title is concise, uses the required seedling icon, and accurately identifies the primary change: stopping owner-name stamping on ClusterObjectSet managed objects.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The pull request description is complete and relevant. It explains the motivation, implementation changes, compatibility impact, testing, and related issue. It does not explicitly address API Go Docum…
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files.

Full details: Description check

Explanation

The pull request description is complete and relevant. It explains the motivation, implementation changes, compatibility impact, testing, and related issue. It does not explicitly address API Go Documentation or Comprehensive Commit Messages, and the reviewer checklist remains unchecked, but these are non-critical omissions because the change has no exported API changes and the description provides sufficient validation details.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@joelanford

Copy link
Copy Markdown
Member

/lgtm
/approve

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Oct 20, 2026
@openshift-ci

openshift-ci Bot commented Oct 20, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: joelanford

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-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 20, 2026
@openshift-merge-bot
openshift-merge-bot Bot merged commit e2b424a into operator-framework:main Oct 20, 2026
38 checks passed
perdasilva pushed a commit to perdasilva/operator-controller that referenced this pull request Oct 20, 2026
With the ClusterObjectSet controller no longer propagating owner-name onto
managed objects (operator-framework#3038), the owner-name label on COD-created revisions serves no
purpose: ownership is expressed through the controller owner reference and the
revision's spec.group, and the controller never reads owner-name. Generated
revisions now carry only the template-hash label.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Per G. da Silva <pegoncal@redhat.com>
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.

2 participants