-
Notifications
You must be signed in to change notification settings - Fork 110
Revert "OCPBUGS-65675: externaloidc: return errors when node statuses cannot be used to determine oidc state" #815
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… cannot be used to determine oidc state"
|
@neisw: This pull request references Jira Issue OCPBUGS-65675, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. In 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. |
WalkthroughThis pull request refactors the OIDC availability checking logic by removing informer synchronization requirements and error conditions, then propagates corresponding changes across controller initialization code. A test helper for synchronized informers is removed and replaced with a simpler generic wrapper in specific tests. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: neisw The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/payload-aggregate periodic-ci-openshift-release-master-ci-4.21-e2e-gcp-ovn-upgrade 3 |
|
@neisw: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command
See details on https://pr-payload-tests.ci.openshift.org/runs/ci/3f52a2f0-d040-11f0-91e1-f79c7859c533-0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
pkg/controllers/common/external_oidc_test.go (1)
321-331: DuplicatefakeInformerhelper across test files.This generic
fakeInformertype is identical to the one incontroller_test.go. Consider extracting it to a shared test utility (e.g.,test/library/informer.go) to avoid duplication.+// Consider moving fakeInformer to test/library/informer.go +// and importing it in both test files to reduce duplication
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting
📒 Files selected for processing (11)
pkg/controllers/common/external_oidc.go(1 hunks)pkg/controllers/common/external_oidc_test.go(17 hunks)pkg/controllers/deployment/deployment_controller.go(1 hunks)pkg/controllers/ingressnodesavailable/ingress_nodes_available_controller.go(0 hunks)pkg/controllers/ingressstate/ingress_state_controller.go(0 hunks)pkg/controllers/oauthendpoints/oauth_endpoints_controller.go(3 hunks)pkg/controllers/proxyconfig/proxyconfig_controller.go(0 hunks)pkg/controllers/readiness/wellknown_ready_controller.go(0 hunks)pkg/controllers/routercerts/controller_test.go(2 hunks)pkg/operator/starter.go(1 hunks)test/library/informer.go(0 hunks)
💤 Files with no reviewable changes (5)
- pkg/controllers/ingressnodesavailable/ingress_nodes_available_controller.go
- pkg/controllers/readiness/wellknown_ready_controller.go
- pkg/controllers/ingressstate/ingress_state_controller.go
- test/library/informer.go
- pkg/controllers/proxyconfig/proxyconfig_controller.go
🧰 Additional context used
📓 Path-based instructions (1)
**
⚙️ CodeRabbit configuration file
-Focus on major issues impacting performance, readability, maintainability and security. Avoid nitpicks and avoid verbosity.
Files:
pkg/controllers/common/external_oidc.gopkg/controllers/deployment/deployment_controller.gopkg/controllers/routercerts/controller_test.gopkg/controllers/oauthendpoints/oauth_endpoints_controller.gopkg/operator/starter.gopkg/controllers/common/external_oidc_test.go
🔇 Additional comments (9)
pkg/controllers/deployment/deployment_controller.go (1)
126-130: Informer wiring change looks correct for the revert.The inline informer slice correctly includes Ingresses, Proxies, and Node informers. The removal of
AuthConfigCheckerInformersaligns with reverting to the previous behavior where the controller didn't react to changes in authentication configuration resources.pkg/operator/starter.go (1)
518-518: Simplified informer wiring aligns with the revert.The change removes the aggregated informer set and uses only the operator client informer, consistent with the broader PR pattern of removing
AuthConfigCheckerInformersfrom controller initialization.pkg/controllers/routercerts/controller_test.go (2)
266-269: Test helper change is appropriate.The
newFakeInformerwrapper correctly provides the lister functionality needed for the test. PassingnilforKubeAPIServerListerandConfigMapListeris acceptable since this test focuses on theIntegratedOAuthauthentication type path, which returns early before accessing those listers.
483-497: GenericfakeInformerhelper is well-designed.The helper provides a minimal implementation suitable for testing. Note that
Informer()returningnilmeans any code path that callsHasSynced()or similar methods on the informer will panic. This is acceptable for these tests since the reverted code removes sync checks.pkg/controllers/oauthendpoints/oauth_endpoints_controller.go (3)
65-70: Inline informer list correctly captures data dependencies.The informer list includes
cmInformer,secretInformer,routeInformer, andingressInformerwhich are all used byendpointListFuncandgetTLSConfigFunc. This is consistent with the revert pattern.
95-98: Informer list matches controller's data dependencies.The ConfigMaps and Services informers align with what
endpointsListFuncandgetTLSConfigFuncaccess.
124-127: Informer list is appropriate for the endpoint check controller.The Endpoints and ConfigMaps informers match the resources accessed by the controller's functions.
pkg/controllers/common/external_oidc.go (1)
75-78: Behavioral change: Empty node statuses now returnfalseinstead of an error.This reverts to treating the absence of node statuses as "OIDC not available" rather than an error condition. This is less strict but may be intentional for the testing scenario (TRT-2460).
Be aware that during cluster bootstrap or if KAS hasn't reported any node statuses, this will silently return
falserather than surfacing the condition as an error. Ensure this behavior is acceptable for your use case.pkg/controllers/common/external_oidc_test.go (1)
32-36: Test case validates the reverted behavior.The "no node statuses observed" case correctly expects
(false, nil)instead of an error, matching the code change inexternal_oidc.goat lines 75-78.
|
/hold |
|
We suspect the issue we are investigating might be fixed by openshift/operator-framework-operator-controller#574. Still holding for analysis but will close on verification. |
|
/close openshift/operator-framework-operator-controller#574 appears to be the fix |
|
@neisw: Closed this PR. In 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. |
|
@neisw: This pull request references Jira Issue OCPBUGS-65675. The bug has been updated to no longer refer to the pull request using the external bug tracker. In 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. |
Reverts #801
Testing revert for TRT-2460