Experimental features configuration and validation#5214
Conversation
|
Skipping CI for Draft Pull Request. |
|
How do I register "experimental features"? |
There is no need to "register" an experimental feature:
|
not fully getting how the how would that apply to a timeout field? |
|
@matzew the field still has to be in the api data structure, but it will be rejected by the webhook if the feature is not enabled. I'll explain it in the doc I'm writing 😄 |
| @@ -0,0 +1 @@ | |||
| core/configmaps/experimental-features.yaml No newline at end of file | |||
There was a problem hiding this comment.
Can we call this just features.yaml, to be consistent with Knative Serving? A feature can be Alpha, ie experimental. A feature can also be stable and still be disabled if a vendor doesn't want it for X reason.
There was a problem hiding this comment.
I added a comment in the doc about that. I don't like mixing up the concepts, I would prefer that if a feature still needs a flag to enable/disable, it even after GA, that flag should live somewhere else, wherever it makes more sense to do so. e.g. a feature related to broker config should live in the broker config map.
This approach of keeping it separate from experimental features also fits in the various scoping of configurations we already implement for every component. I don't want experimental features to end up re-doing that.
| apiVersion: v1 | ||
| kind: ConfigMap | ||
| metadata: | ||
| name: config-experimental-features |
|
|
||
| if (fieldVal.Kind() == reflect.Ptr || fieldVal.Kind() == reflect.Slice || fieldVal.Kind() == reflect.Map) && !fieldVal.IsNil() { | ||
| errs = errs.Also(&apis.FieldError{ | ||
| Message: fmt.Sprintf("Disallowed field because the experimental feature '%s' is disabled", featureName), |
Codecov Report
@@ Coverage Diff @@
## main #5214 +/- ##
==========================================
+ Coverage 82.68% 82.77% +0.08%
==========================================
Files 194 197 +3
Lines 6006 6071 +65
==========================================
+ Hits 4966 5025 +59
- Misses 717 721 +4
- Partials 323 325 +2
Continue to review full report at Codecov.
|
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
…conformance tests Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
19ead48 to
fbf82c2
Compare
|
I've added a directory (and modified the GH action) where we can place the experimental features e2e/conformance tests. These are not going to cause any troubles to existing e2e/conformance tests. |
Fix e2e tests Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
|
The following is the coverage report on the affected files.
|
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: matzew, slinkydeveloper 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 |
Signed-off-by: Francesco Guardiani francescoguard@gmail.com
Details: https://docs.google.com/document/d/1AoH0FyLeuHIg5snrlCKzELQv-NEA6bbjTU2Qv3zlW5k/edit?usp=sharing
Proposed Changes
Release Note
Docs