Hello everyone,
I have been working on the Ginkgo V2 migration for a while recently, the impact was far beyond my expectations when I first saw that something might benefit from the Ginkgo V2. e.g. the issue[1].
Seen from the Ginkgo website[2], the Ginkgo V1 was deprecated and all the development will be on version2 only, we'd better to migrate to V2 accordingly so that
- we can remove the workaround introduced by [1].
- benefit from the new features, e.g. there is no need to write custom reporter for generating JUnit reports only as this is already a built-in feature for Ginkgo V2.
Most of work items has been done with the PR[3], which is including,
1) Replace all the imports statement from Ginkgo V1 to V2.
2) Refactoring on the consts and parameters , such as "GINKGO_PANIC", "timeout" parameters.
3) Switch to the new way to config suite and report, for example, how to config "EmitSpecProgress" and "RandomizeAllSpecs" for test suite.
4) Define `SkipStrings` in `BeforeEach`, the old way to config `SkipStrings` doesn't work anymore.
5) Switch to use `SuiteConfig.ParallelProcess` to define the number of parallel processes.
6) Update the signature for the custom reporters. These custom reporters are non-op now and will be cleaned after the migration.
7) Support to build the Ginkgo V2 binary.
8) Cleanup all the tests around the custom reporters.
9) Workaround the spec dump with dry-run mode, see [5] (will upgrade the Ginkgo to the minor version once the release is out).
10) Support to generate conformance test spec with V2 as the stacktrace is dropped in V2, see [6].
11) Change the way to verify the test spec as the struct of test spec has been changed.
12) update the CI which are hard-coded with Ginkgo v1 binary, e.g. [4]
...
Here are some work items left to address,
1) "pull-kubernetes-e2e-aks-engine-windows-containerd", "pull-kubernetes-e2e-ubuntu-gce-network-policies", one testcase failed with timeout exception, need to investigate.
2) Cleanup all the custom reporters, this can be done later in a separate PR, the most important custom report "NewDetailsReporterFile" has been already implemented in the PR[3], junit custom report can be simply removed.
3) remove all the workaround introduced by V1.
Since the change is big and the impact is big too, at least "test-infra" and "kind" should update the Ginkgo binary from v1 to v2 (could be conditionally build the binary). I am wrote this email to hope get your feedback on this.
And last, is a KEP is needed for the change like this? If yes, I'd happy to wrote a KEP firstly for review.
Best Regards,
Dave Chen