OCPBUGS-65497: Add debug-useful ClusterOperator relatedObjects - #404
OCPBUGS-65497: Add debug-useful ClusterOperator relatedObjects#404RadekManak wants to merge 1 commit into
Conversation
|
@RadekManak: This pull request references Jira Issue OCPBUGS-65497, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
WalkthroughThe PR adds the control-plane-machine-set operator’s ClusterRole and ClusterRoleBinding to runtime related-object tracking and the ClusterOperator manifest, with a test that compares both declarations. ChangesControl-plane related object tracking
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
pkg/controllers/controlplanemachineset/cluster_operator.go (1)
54-98: ⚡ Quick winAdd a parity test for the duplicated related-object list.
relatedObjects()is now a second hard-coded source of truth next tomanifests/0000_30_control-plane-machine-set-operator_04_clusteroperator.yaml. A small test that compares the two would catch future renames/additions before inspect or must-gather coverage drifts.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@pkg/controllers/controlplanemachineset/cluster_operator.go` around lines 54 - 98, Add a parity unit test that ensures the hard-coded relatedObjects() list matches the relatedObjects declared in the manifest file manifests/0000_30_control-plane-machine-set-operator_04_clusteroperator.yaml: write a test (e.g., controlplanemachineset_relatedobjects_test.go) that calls relatedObjects(), loads and parses the ClusterOperator YAML from the manifest file, extracts the relatedObjects entries (group, resource, name, namespace), normalizes both lists into comparable sets (ignore ordering), and fails if there is any difference so future renames/additions are caught automatically.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@pkg/controllers/controlplanemachineset/cluster_operator.go`:
- Around line 54-98: Add a parity unit test that ensures the hard-coded
relatedObjects() list matches the relatedObjects declared in the manifest file
manifests/0000_30_control-plane-machine-set-operator_04_clusteroperator.yaml:
write a test (e.g., controlplanemachineset_relatedobjects_test.go) that calls
relatedObjects(), loads and parses the ClusterOperator YAML from the manifest
file, extracts the relatedObjects entries (group, resource, name, namespace),
normalizes both lists into comparable sets (ignore ordering), and fails if there
is any difference so future renames/additions are caught automatically.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 9d39db61-8275-4aaa-84bb-b8115826240f
📒 Files selected for processing (2)
manifests/0000_30_control-plane-machine-set-operator_04_clusteroperator.yamlpkg/controllers/controlplanemachineset/cluster_operator.go
0f554ed to
2c4c707
Compare
Add ClusterRole/ClusterRoleBinding, ValidatingWebhookConfiguration, and ControlPlaneMachineSet/Machine references to relatedObjects so inspect and must-gather collect the resources needed to debug CPMS. Keep Go and the ClusterOperator manifest in sync with a parity test.
2c4c707 to
eeff6a8
Compare
|
@RadekManak: This pull request references Jira Issue OCPBUGS-65497, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
Requesting review from QA contact: DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
@openshift-ci-robot: GitHub didn't allow me to request PR reviews from the following users: sunzhaohua2. Note that only openshift members and repo collaborators can review this PR, and authors cannot review their own PRs. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/retest-required |
|
@RadekManak: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Expand
control-plane-machine-setClusterOperatorrelatedObjectswith the operator ClusterRole / ClusterRoleBinding so must-gather collects them.Keeps the existing namespace, ControlPlaneMachineSet, and Machine relatedObjects.
Added relatedObjects
control-plane-machine-set-operatorcontrol-plane-machine-set-operatorTests
Parity test keeping the Go list in sync with the ClusterOperator manifest.