Hello Kubernetes contributors! Late in 1.33 we landed improvements to the e2e framework that you should adopt for your 1.33+ tests, Action Required:
If your e2e test is related to feature gated functionality pass the k8s.io/kubernetes/pkg/features featuregate like framework.WithFeatureGate(features.DeclarativeValidation) to the test. The featuregate details including Alpha/Beta/GA/Deprecated and OffByDefault will be communicated to the test framework and runners as ginkgo labels.
If your test is related to multiple featuregates, pass each of them.
If your test depends on a cluster e2e “feature” such as a “LoadBalancer”, continue passing features.LoadBalancer (k8s.io/kubernetes/test/e2e/feature). This includes any special configuration (e.g. IPv6 or DualStack) or additional components (LoadBalancer) that we cannot assume all clusters have available/configured by default that are not merely enabling feature gates.
If you previously had an e2e “feature” that was merely a stand-in for feature gate enablement, please migrate your tests to 1) and remove the e2e “feature” in favor of WithFeatureGate.
Some tests may require both, if they are linked to a feature gate AND require special configuration / additional components, in which case you should pass both WithFeatureGate and the e2e framework “feature”. For example DRA e2e tests require both DRA feature gates and the DRA e2e “feature” for container runtime support in the test cluster. Example:
Setting these appropriately will ensure we can correctly run them in the right CI jobs.
In particular, if your test only depends on feature gates and not e2e “features” and you adopt 1) & 3), we can now automatically run them by default in shared alpha / beta feature test jobs without any action on your part (you should still verify that your tests are running).
When reviewing / approving feature promotions, please ask for evidence of healthy running tests. Changing the featuregate state will change the test labels (e.g. from Alpha to Beta or Beta to GA) and therefore “promote” which CI jobs we run them in for any tests using WithFeatureGate associated with the featuregate.
For more details / tracking see: https://github.com/kubernetes/kubernetes/issues/131040
Also, I’d like to announce that we have finally achieved zero hard-coded test skips in pull-kubernetes-e2e-kind and related jobs, running roughly --ginkgo.label-filter=’Feature: isEmpty && !Slow && !Disruptive && !Flaky’. This is near parity with pull-kubernetes-e2e-gce (1056 tests vs 1080) in approximately half the runtime (~30m vs ~1h). Thank you to everyone who helped debug and fix these.
We’ll have more updates as we iterate on #131040 and the alpha/beta CI jobs in particular.
If you have any questions, feel free to reach out to me directly or to #sig-testing.
Thanks!
- Ben