-
Notifications
You must be signed in to change notification settings - Fork 196
OTA-1531: [6/6] cvo: use early gate checker to avoid delayed initialization #1196
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
base: main
Are you sure you want to change the base?
OTA-1531: [6/6] cvo: use early gate checker to avoid delayed initialization #1196
Conversation
Improve comments to clarify some concerns from earlier PR feedback.
@petr-muller: This pull request references OTA-1531 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.20.0" version, but no target version was set. 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. |
@petr-muller: This pull request references OTA-1531 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.20.0" version, but no target version was set. 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. |
/retest |
Previous changes prepared the code for this switch by adding code to detect enabled CVO gates and featureset early in the CVO execution, right before the controllers are initialized (well before CVO acquires its leader lease and actually starts the controllers). These early detected gate checker was not used anywhere yet. This change makes CVO stop using its late detected gate checker (detected while loading its initial payload) and start using the early one instead. This eliminates the need for the panicking gate checker that was used to guard against checking gates before the actual checker could be established. The change also allows to simplify some code layers. Late initialization on initial payload load is now only necessary for the actual CVO controller, not the featurechangestopper (it is already initialized at that time), so the `Context` layer does not need to coordinate anymore. The starting features set can be initialized in CVO right away, avoiding the need to wire it through call chains; it can simply be an `Operator` member.
1ae48cf
to
cb32cb8
Compare
The meaning about the first of the sentence is not very clear to me without reading more about CVO controller. /lgtm |
/test e2e-agnostic-operator-devpreview |
/test e2e-agnostic-operator |
/test e2e-agnostic-operator-devpreview e2e-agnostic-operator |
/hold ci/prow/e2e-agnostic-operator-devpreview is persistent and suspicious |
/test ci/prow/e2e-agnostic-operator-techpreview |
@petr-muller: The specified target(s) for
The following commands are available to trigger optional jobs:
Use
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. |
/test e2e-agnostic-operator-techpreview |
/retest-required |
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.
/lgtm
/hold
in case you want to address the nit and align the namings.
Free to cancel if you do not think it is worth another round of CI.
Bad naming got me here. I used the CV-specific informer factory instead of the generic one, resulting in tests always seeing the default featureset because of the `IsNotFound` branch after the GET.
14bd699
to
c55bdea
Compare
/hold cancel |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hongkailiu, petr-muller The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@petr-muller: all tests passed! Full PR test history. Your PR dashboard. 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. I understand the commands that are listed here. |
Previous changes prepared the code for this switch by adding code to detect enabled CVO gates and featureset early in the CVO execution, right before the controllers are initialized (well before CVO acquires its leader lease and actually starts the controllers). These early detected gate checker was not used anywhere yet.
This change makes CVO stop using its late detected gate checker (detected while loading its initial payload) and start using the early one instead. This eliminates the need for the panicking gate checker that was used to guard against checking gates before the actual checker could be established.
The change also allows to simplify some code layers. Late initialization on initial payload load is now only necessary for the actual CVO controller, not the featurechangestopper (it is already initialized at that time), so the
Context
layer does not need to coordinate anymore. The starting features set can be initialized in CVO right away, avoiding the need to wire it through call chains; it can simply be anOperator
member.