OCPBUGS-86008: Gate Route watch on management cluster capability#8484
OCPBUGS-86008: Gate Route watch on management cluster capability#8484smrtrfszm wants to merge 1 commit into
Conversation
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
Skipping CI for Draft Pull Request. |
📝 WalkthroughWalkthroughThe Sequence Diagram(s)sequenceDiagram
participant Controller
participant DiscoveryClient
participant ManagementClusterAPI
participant CapabilitiesDetector
participant RouteAPI
Controller->>DiscoveryClient: create discovery client
DiscoveryClient->>ManagementClusterAPI: query API resources
ManagementClusterAPI-->>DiscoveryClient: API resource list
DiscoveryClient->>CapabilitiesDetector: provide resource list
CapabilitiesDetector-->>Controller: capabilities (Route present / absent)
alt Route capability present
Controller->>RouteAPI: register watch for Route resources
RouteAPI-->>Controller: watch started
else Route capability absent
Controller-->>Controller: skip Route watch
end
🚥 Pre-merge checks | ✅ 11 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (11 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: smrtrfszm 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 |
daa5044 to
94461ec
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8484 +/- ##
==========================================
- Coverage 40.00% 39.99% -0.01%
==========================================
Files 751 751
Lines 92863 92872 +9
==========================================
Hits 37147 37147
- Misses 53024 53033 +9
Partials 2692 2692
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
All the facts are now clear. Here is the analysis: Test Failure Analysis CompleteJob Information
Test Failure AnalysisErrorSummaryThe Root CauseThe PR modifies the
The This is strictly a missing-test-coverage issue. The functional logic itself is sound — gating the Route watch on Recommendations
Evidence
|
The hosted-cluster-config-operator unconditionally watches route.openshift.io/v1 Routes against the management cluster to react to hostname changes on the metrics-proxy Route. On management clusters that do not expose the Routes API (e.g. non-OpenShift management clusters) this watch fails during controller setup and prevents HCCO from starting. Detect the management cluster Route capability using the existing capabilities.DetectManagementClusterCapabilities helper and only register the watch when route.openshift.io is registered. This mirrors the pattern already used in other parts of the code.
94461ec to
f54aa29
Compare
|
@smrtrfszm: This pull request references Jira Issue OCPBUGS-86008, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
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. |
|
@smrtrfszm: This pull request references Jira Issue OCPBUGS-86008, which is valid. 3 validation(s) were run on this bug
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. |
What this PR does / why we need it:
The hosted-cluster-config-operator unconditionally watches route.openshift.io/v1 Routes against the management cluster to react to hostname changes on the metrics-proxy Route. On management clusters that do not expose the Routes API (e.g. non-OpenShift management clusters) this watch fails during controller setup and prevents HCCO from starting.
Detect the management cluster Route capability using the existing
capabilities.DetectManagementClusterCapabilitieshelper and only register the watch when route.openshift.io is registered. This mirrors the pattern already used in other parts of the code.Which issue(s) this PR fixes:
Fixes #OCPBUGS-86008
Special notes for your reviewer:
Checklist:
Summary by CodeRabbit