Skip to content

Commit f954342

Browse files
committed
Add integration test plan
1 parent f56dc41 commit f954342

File tree

1 file changed

+43
-19
lines changed
  • keps/sig-api-machinery/4330-compatibility-versions

1 file changed

+43
-19
lines changed

keps/sig-api-machinery/4330-compatibility-versions/README.md

Lines changed: 43 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ tags, and then generate with `hack/update-toc.sh`.
100100
- [Integration tests](#integration-tests)
101101
- [e2e tests](#e2e-tests)
102102
- [Graduation Criteria](#graduation-criteria)
103+
- [Alpha](#alpha)
104+
- [Beta](#beta)
103105
- [Upgrade / Downgrade Strategy](#upgrade--downgrade-strategy)
104106
- [Version Skew Strategy](#version-skew-strategy)
105107
- [Production Readiness Review Questionnaire](#production-readiness-review-questionnaire)
@@ -210,7 +212,7 @@ Kubernetes control-plane, by means of:
210212

211213
### Non-Goals
212214

213-
- Changes to CAPI/kubeadm/KIND/minikube to absorb the compatibility versions
215+
- Changes to Cluster API/kubeadm/KIND/minikube to absorb the compatibility versions
214216
will be addressed separate from this KEP
215217

216218
## Proposal
@@ -392,7 +394,7 @@ when drafting this test plan.
392394
[testing-guidelines]: https://git.k8s.io/community/contributors/devel/sig-testing/testing.md
393395
-->
394396

395-
[ ] I/we understand the owners of the involved components may require updates to
397+
[x] I/we understand the owners of the involved components may require updates to
396398
existing tests to make this code solid enough prior to committing the changes necessary
397399
to implement this enhancement.
398400

@@ -424,26 +426,31 @@ This can inform certain test coverage improvements that we want to do before
424426
extending the production code to implement this enhancement.
425427
-->
426428

429+
For Alpha, we will fill this out as we implement.
430+
427431
- `<package>`: `<date>` - `<test coverage>`
428432

429433
##### Integration tests
430434

431-
<!--
432-
Integration tests are contained in k8s.io/kubernetes/test/integration.
433-
Integration tests allow control of the configuration parameters used to start the binaries under test.
434-
This is different from e2e tests which do not allow configuration of parameters.
435-
Doing this allows testing non-default options and multiple different and potentially conflicting command line options.
436-
-->
437-
438-
<!--
439-
This question should be filled when targeting a release.
440-
For Alpha, describe what tests will be added to ensure proper quality of the enhancement.
441-
442-
For Beta and GA, add links to added tests together with links to k8s-triage for those tests:
443-
https://storage.googleapis.com/k8s-triage/index.html
444-
-->
445-
446-
- <test>: <link to test coverage>
435+
For Alpha we will add integration test to ensure `--compatibility-version` behaves expected according to the following grid:
436+
437+
**Transition**|**N-1 Behavior**|**N Behavior**|**Expect when compatibility-version=N-1**|**Expect when compatibility-version=N (or is unset)**
438+
-----|-----|-----|-----|-----
439+
Alpha feature introduced|-|off-by-default|feature does not exist, feature gate may not be set|feature enabled only when `--feature-gates=<feature>=true`
440+
Alpha feature graduated to Beta|off-by-default|on-by-default|feature enabled only when `--feature-gates=<feature>=true`|feature enabled unless `--feature-gates=<feature>=false`
441+
Beta feature graduated to GA|on-by-default|on|feature enabled unless `--feature-gates=<feature>=false`|feature always enabled, feature gate may not be set
442+
Beta feature removed|on-by-default|-|feature enabled unless `--feature-gates=<feature>=false`|feature does not exist
443+
Alpha API introduced|-|off-by-default|feature does not exist, feature gate may not be set|API available only when `--runtime-config=api/<api>=true`
444+
Beta API graduated to GA|off-by-default|on|API available only when `--runtime-config=api/<api>=true`|API available
445+
Beta API removed|off-by-default|-|API available only when `--runtime-config=api/<api>=true`|API does not exist
446+
on-by-default Beta API removed|on-by-default|-|API available unless `--runtime-config=api/<api>=false`|API does not exist
447+
API Storage version changed|v1beta1|v1|Resources stored as v1beta1|Resources stored as v1
448+
new CEL function|-|function in StoredExpressions CEL environment|CEL function does not exist|Resources already containing CEL expression can be evaluated
449+
introduced CEL function|function in StoredExpressions CEL environment|function in NewExpressions CEL environment|Resources already containing CEL expression can be evaluated|CEL expression can be written to resources and can be evaluted from storage
450+
451+
- The other edge cases we will test are:
452+
- `--compatibility-version=<N-2>` - fails validation
453+
- `--compatibility-version=<N+1>` - fails validation
447454

448455
##### e2e tests
449456

@@ -457,10 +464,27 @@ https://storage.googleapis.com/k8s-triage/index.html
457464
We expect no non-infra related flakes in the last month as a GA graduation criteria.
458465
-->
459466

460-
- <test>: <link to test coverage>
467+
For e2e testing, we intend to run e2e tests from the N-1 minor version of kubernetes
468+
against the version being tested with --compatibility-version set to the N-1 minor versions.
469+
470+
This is a new kind of testing-- it requires running the tests from a release branch against
471+
the the branch being tested (either master or another release branch).
472+
473+
We intend to have this up and running for Beta
461474

462475
### Graduation Criteria
463476

477+
#### Alpha
478+
479+
- Feature implemented behind a feature flag
480+
- Compatibility version support for N-1 minor versions
481+
- Integration tests completed and enabled
482+
483+
#### Beta
484+
485+
- Initial cross-branch e2e tests completed and enabled
486+
- Compatibility version support for N-3 minor versions
487+
464488
<!--
465489
**Note:** *Not required until targeted at a release.*
466490

0 commit comments

Comments
 (0)