Skip to content

🌱 OPRUN-4772: Extract shared object-management labels - #2946

Merged
openshift-merge-bot[bot] merged 1 commit into
operator-framework:mainfrom
fao89:OPRUN-4772
Sep 25, 2026
Merged

openshift-merge-bot[bot] merged 1 commit into
operator-framework:mainfrom
fao89:OPRUN-4772

Conversation

@fao89

@fao89 fao89 commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Description

Part 1 of 5 smaller PRs split from #2938 for OPRUN-4738.

Move the existing object-management label constants from internal/operator-controller/labels to internal/shared/labels, then update imports in both controllers and their tests. This removes the object-controller's dependency on operator-controller's internal metadata package. Two comments now describe the owner of a ClusterObjectSet more generally. Label keys and reconciliation behavior are unchanged.

Subtask: OPRUN-4772.

Validation: go test -tags containers_image_openpgp -short -count=1 -p 2 ./internal/object-controller/controllers ./internal/operator-controller/applier ./internal/operator-controller/controllers ./internal/shared/labels and git diff --check upstream/main...HEAD.

Reviewer Checklist

  • API Go Documentation
  • Tests: Unit Tests (and E2E Tests, if appropriate)
  • Comprehensive Commit Messages
  • Links to related GitHub Issue(s)

Always review AI generated responses prior to use.
AI-assisted response via openshift-developer plugin

Summary by CodeRabbit

No end-user-visible changes.

Phase 1/7 of OPRUN-4738: remove object-controller's dependency on
operator-controller's internal metadata package.

Move the label constants into internal/shared/labels and update imports
in both controllers and their tests. Generalize the object-controller
comments to describe owners rather than ClusterExtensions.

Review focus: the package move and mechanical import changes. Metadata
keys and reconciliation behavior are unchanged. No generated files.

Refs: OPRUN-4738
Signed-off-by: Fabricio Aguiar <fabricio.aguiar@gmail.com>

rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED
@netlify

netlify Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for olmv1 ready!

Name Link
🔨 Latest commit e4d84ce
🔍 Latest deploy log https://app.netlify.com/projects/olmv1/deploys/6ab54a8794c548000892679a
😎 Deploy Preview https://deploy-preview-2946--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 Sep 24, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 00218f0e-5357-47a7-aa50-6466c87db0af

📥 Commits

Reviewing files that changed from the base of the PR and between 054f5ed and e4d84ce.

📒 Files selected for processing (13)
  • internal/object-controller/controllers/clusterobjectset_controller.go
  • internal/object-controller/controllers/clusterobjectset_controller_internal_test.go
  • internal/object-controller/controllers/clusterobjectset_controller_test.go
  • internal/object-controller/controllers/resolve_ref_test.go
  • internal/operator-controller/applier/boxcutter.go
  • internal/operator-controller/applier/boxcutter_test.go
  • internal/operator-controller/applier/secretpacker.go
  • internal/operator-controller/applier/secretpacker_test.go
  • internal/operator-controller/controllers/boxcutter_reconcile_steps.go
  • internal/operator-controller/controllers/clusterextension_controller.go
  • internal/operator-controller/controllers/clusterextension_controller_test.go
  • internal/operator-controller/controllers/clusterextension_reconcile_steps.go
  • internal/shared/labels/labels.go

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

Label imports in controller and applier code and tests now use the shared package path. The change also updates object-controller comments and adds documentation to the shared labels package.

Changes

Shared labels package

Layer / File(s) Summary
Update label package references
internal/shared/labels/labels.go, internal/operator-controller/applier/boxcutter.go, internal/operator-controller/applier/boxcutter_test.go, internal/operator-controller/applier/secretpacker.go, internal/operator-controller/applier/secretpacker_test.go, internal/operator-controller/controllers/boxcutter_reconcile_steps.go, internal/operator-controller/controllers/clusterextension_controller.go, internal/operator-controller/controllers/clusterextension_controller_test.go, internal/operator-controller/controllers/clusterextension_reconcile_steps.go, internal/object-controller/controllers/clusterobjectset_controller.go, internal/object-controller/controllers/clusterobjectset_controller_internal_test.go, internal/object-controller/controllers/clusterobjectset_controller_test.go, internal/object-controller/controllers/resolve_ref_test.go
Production code and tests now import labels from internal/shared/labels. The shared package gains a package comment, and object-controller comments are revised. Controller logic and function bodies are unchanged.

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

Suggested reviewers: perdasilva, pedjak

Merge Risk: ⚪ Minimal · up to e4d84

The label package move preserves the existing metadata and behavior, so no actionable merge risk remains.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 13 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
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.
Title check ✅ Passed The title clearly describes the main change: extracting shared object-management labels. It uses the required seedling icon and is concise.
Description check ✅ Passed The description explains the change, motivation, scope, related issues, validation commands, and test coverage. The required sections are present. Unchecked documentation and issue-link checklist item…
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@fao89

fao89 commented Sep 24, 2026

Copy link
Copy Markdown
Contributor Author

/cc @perdasilva @fgiudici

@perdasilva

Copy link
Copy Markdown
Contributor

/approve

@openshift-ci

openshift-ci Bot commented Sep 25, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: perdasilva

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 Sep 25, 2026
@tmshort

tmshort commented Sep 25, 2026

Copy link
Copy Markdown
Member

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Sep 25, 2026
@openshift-merge-bot
openshift-merge-bot Bot merged commit fce365c into operator-framework:main Sep 25, 2026
26 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.

3 participants