CORS-2877: Install Config Feature Gate Validation#7413
CORS-2877: Install Config Feature Gate Validation#7413openshift-merge-bot[bot] merged 3 commits intoopenshift:masterfrom
Conversation
|
Skipping CI for Draft Pull Request. |
|
/test e2e-aws-ovn |
|
/test ? |
|
@patrickdillon: The following commands are available to trigger required jobs:
The following commands are available to trigger optional jobs:
Use
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/test-infra repository. |
|
/test golint |
|
@patrickdillon: This pull request references CORS-2877 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.15.0" version, but no target version was set. 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/test-infra repository. |
There was a problem hiding this comment.
There was a problem hiding this comment.
Not updating this because it will be removed by #7570, which should merge soon.
There was a problem hiding this comment.
@MaysaMacedo @EmilienM @pierreprinetti @mandre PTAL for future feature gating needs
|
/cc @JoelSpeed |
Adds a featuregate package to allow feature gating based on openshift/api. This commit copies code from other repos (acknowledged in the headers) rather than importing because the sources are well-contained and we want to minimize imports to pkg/types as pkg/types is intended to be imported by other codebases and by doing this we minimize their dependencies. This code is mostly borrowed from: https://github.com/openshift/cluster-config-operator/blob/636a2dc303037e2561a243ae1ab5c5b953ddad04/pkg/cmd/render/render.go#L153
Enable checking install config fields with the feature gate package. Allows install config fields to be validated with CustomNoUpgrade feature sets in addition to the TechPreviewNoUpgrade feature set.
This commit removes error checking from the GenerateCustomFeatures function. There are two possible errors that are caught in this function, and both are already handled separately by validation. So continually checking for errors throughout the code makes using feature gate checks less ergonomic for no benefit. The two potential errors are: 1. Unknown feature set within FeatureGateFromFeatureSets, which is already validated here: https://github.com/openshift/installer/blob/b36d7c201e0114aa0e9261cf8ae5b8d68c74bf07/pkg/types/validation/installconfig.go#L1051 2. The other is that a custom feature gate was incorrectly entered, which is validated here: https://github.com/openshift/installer/blob/master/pkg/types/validation/installconfig.go#L1103
|
/lgtm |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: patrickdillon The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@patrickdillon: The following tests 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/test-infra repository. I understand the commands that are listed here. |
Adds the ability to validate install config fields using feature gates.
Fields can be gated based on any feature set: Default, TechPreviewNoUpgrade, or CustomNoUpgrade.
This means that features can be promoted without changing validation code by vendoring the updated API, where the feature has been promoted to the Default feature set.
Also enables more targeted testing for technical quality.