-
Notifications
You must be signed in to change notification settings - Fork 428
MCO-1661: Feature Gate handling rework #5029
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?
Conversation
Skipping CI for Draft Pull Request. |
@pablintino: This pull request references MCO-1661 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. |
98d0cad
to
eec056e
Compare
eec056e
to
c896109
Compare
/test e2e-hypershift |
c896109
to
d118434
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: pablintino 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 |
d118434
to
0fcaf58
Compare
This commit implements a wrapper around featuregates.FeatureGateAccess to centralize the way we handle FeatureGates checks. The handler exposes a few error-free methods to check if a FeatureGate is enabled or not or if it exist or not.
0fcaf58
to
c1a40ce
Compare
/test unit |
This commit replaces plain accesses to FeatureGateAccess with proper usages of the new FeatureGatesHandler and simplifies most of the error checks needed in the previous approach.
c1a40ce
to
afd01b6
Compare
@pablintino: This pull request references MCO-1661 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. |
@pablintino: This pull request references MCO-1661 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. |
@pablintino: This pull request references MCO-1661 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. |
/test unit |
@pablintino: The following tests failed, say
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. |
- What I did
This change reworks the way we interact with
configv1.FeatureGate
. Till this change we interacted with them using thefeaturegates.FeatureGateAccess
interface directly, making us handle fetching errors each time we simply need to check for a FeatureGate.This change still fetches FeatureGates through
featuregates.FeatureGateAccess
but it creates an easy to use wrapper around it that handles the only error that can happen (checking FeatureGates before the internal go routine finishes grabing them) in a common block that is now reused in each of our components.Access to FeatureGates with the workflow the wrapper leaves is as simple as calling
Enabled
passing the FeatureGate as value and that's all.- How to verify it
Deploy two OCP clusters, one with TechPreviewNoUpgrade enabled and other without it. Our features
MachineConfigNodes
andPinnedImages
should be properly showing up and working.- Description for the changelog
This change implements a wrapper around featuregates.FeatureGateAccess to centralize the way we handle FeatureGates checks. The handler exposes a few error-free methods to check if a FeatureGate is enabled or not or if it exist or not.