You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
e2e framework: clarify Alpha/Beta requirement for feature gates
We want:
- To keep test annotations simple, using both WithFeatureGate
and WithFeature should only be necessary when a test really
has requirements that go beyond "feature gate needs to be enabled".
- To run tests which depend only on feature gates being enabled
in the ci-kubernetes-e2e-kind-alpha-features resp.
ci-kubernetes-e2e-kind-beta-features, because otherwise we
may have a proliferation of many bespoke jobs which only run
very few tests. This would make testing more expensive for
Kubernetes.
- To enable those tests only once in the ci-kubernetes-e2e-kind-alpha-features
and ci-kubernetes-e2e-kind-beta-features definition instead
of having to update those each time feature gates change.
This can be achieved by adding `Feature:Alpha` resp. `Feature:Beta` as Ginkgo
labels instead of just `Alpha` and `Beta`. Then jobs which are configured to
skip tests with feature dependencies via --label-filter=!/Feature:.+/ will skip
tests which are labeled with just WithFeatureGate. The ci-kubernetes jobs
can select to include such tests with a special regexp that mimicks
a negative lookahead (see k8s.io/community/contributors/devel/sig-testing/e2e-tests.md)
Note that removing WithFeature depends on first updating job definitions to use
--label-filter or to skip based on the inline `[Alpha]` or `[Beta]` text,
otherwise tests that were previously skipped because of WithFeature might
start to run in jobs which don't have the feature gate enabled.
recordTextBug(location, fmt.Sprintf("[%s] in plain text is deprecated and must be added through With%s instead", tag, tag))
310
311
}
311
312
ifdeprecatedStability.Has(tag) {
313
+
ifslices.Contains(labels, "Feature:"+tag) {
314
+
// Okay, was also set as label.
315
+
continue
316
+
}
312
317
recordTextBug(location, fmt.Sprintf("[%s] in plain text is deprecated and must be added by defining the feature gate through WithFeatureGate instead", tag))
0 commit comments