chore: remove dead Test/TestSuite v3 code - #8019
Conversation
Test and TestSuite (tests.testkube.io) are deprecated CRDs, retained only so existing cluster resources are not garbage-collected. Nothing serves or reconciles them: no API routes, no CLI commands, no controller, no client. This removes the surface that has no callers at all. - delete pkg/tcl/mappertcl/tests (no importers) - delete pkg/mapper/testworkflows/kube.go; all three roots (MapTestKubeToTestWorkflowKube, MapTestSuiteKubeToTestWorkflowKube, MapExecutorKubeToTestWorkflowTemplateKube) were unreferenced, leaving the whole file orphaned - drop the unused crd.Template consts and their .tmpl files, keeping webhook, webhooktemplate and testtrigger - drop vestigial testsuitev3/testsv3/testsourcev1 AddToScheme calls in pkg/triggers/watcher.go; no informer for those types exists - delete the typed tests/v2 and tests/v3 clientsets and their fakes. v2 was additionally broken: tests.testkube.io/v2 was never registered in the scheme builder, so any call would have failed at request time. The CRDs, api/tests/v3 and api/testsuite/v3 are left untouched, along with the sub-types (Variable, ArtifactRequest, EnvReference, GitAuthType, ArgsModeType) that TestWorkflow v1 and TestTrigger v1 embed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This is a summary headlineThis is a really cool summary for you to look at, we have also included links to the Testkube Dashboard |
Greptile SummaryThe PR removes unused legacy Test/TestSuite conversion, CRD-rendering, scheme-registration, and generated clientset surfaces while retaining the deprecated CRD definitions needed to preserve existing cluster resources. Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains in the reviewed removal paths, and no eligible follow-up finding was identified. Important Files Changed
Reviews (2): Last reviewed commit: "fix: remove const" | Re-trigger Greptile |
There was a problem hiding this comment.
Pull request overview
This PR removes unused/dead code paths related to deprecated tests.testkube.io Test/TestSuite v3 (and related) surfaces, including orphaned mappers, clientsets, and CRD templating assets, leaving only the still-supported trigger/webhook CRD template flow and watcher scheme registrations.
Changes:
- Removed unused scheme registrations and Kubernetes watcher wiring for deprecated Test/TestSuite/TestSource types.
- Deleted unreferenced mapping/helpers (
pkg/tcl/mappertcl/tests,pkg/mapper/testworkflows/kube.go) and deprecated CRD template assets/constants. - Removed typed operator clientsets (and fakes) for
tests.testkube.iov2/v3 and updated the versioned clientset accordingly.
Reviewed changes
Copilot reviewed 30 out of 30 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pkg/triggers/watcher.go | Drops unused AddToScheme calls/imports for deprecated Test/TestSuite/TestSource types in the trigger watcher. |
| pkg/tcl/mappertcl/tests/openapi_kube.go | Removes dead TCL mapper for Test v3 execution request fields. |
| pkg/tcl/mappertcl/tests/kube_openapi.go | Removes dead TCL mapper for Test v3 execution request fields (reverse mapping). |
| pkg/operator/clientset/versioned/typed/tests/v3/testsuite.go | Deletes unused v3 typed client for TestSuite resources. |
| pkg/operator/clientset/versioned/typed/tests/v3/tests_client.go | Deletes unused v3 typed client root. |
| pkg/operator/clientset/versioned/typed/tests/v3/test.go | Deletes unused v3 typed client for Test resources. |
| pkg/operator/clientset/versioned/typed/tests/v3/generated_expansion.go | Deletes unused v3 typed client expansion interfaces. |
| pkg/operator/clientset/versioned/typed/tests/v3/fake/fake_testsuite.go | Deletes unused fake v3 TestSuite client. |
| pkg/operator/clientset/versioned/typed/tests/v3/fake/fake_tests.go | Deletes unused fake v3 Test client. |
| pkg/operator/clientset/versioned/typed/tests/v3/fake/fake_tests_client.go | Deletes unused fake v3 typed client root. |
| pkg/operator/clientset/versioned/typed/tests/v3/fake/doc.go | Deletes unused fake v3 package doc. |
| pkg/operator/clientset/versioned/typed/tests/v3/doc.go | Deletes unused v3 package doc. |
| pkg/operator/clientset/versioned/typed/tests/v2/testsuite.go | Deletes unused v2 typed client for TestSuite resources. |
| pkg/operator/clientset/versioned/typed/tests/v2/tests_client.go | Deletes unused v2 typed client root. |
| pkg/operator/clientset/versioned/typed/tests/v2/generated_expansion.go | Deletes unused v2 typed client expansion interface. |
| pkg/operator/clientset/versioned/typed/tests/v2/fake/fake_testsuite.go | Deletes unused fake v2 TestSuite client. |
| pkg/operator/clientset/versioned/typed/tests/v2/fake/fake_tests_client.go | Deletes unused fake v2 typed client root. |
| pkg/operator/clientset/versioned/typed/tests/v2/fake/doc.go | Deletes unused fake v2 package doc. |
| pkg/operator/clientset/versioned/typed/tests/v2/doc.go | Deletes unused v2 package doc. |
| pkg/operator/clientset/versioned/scheme/register.go | Removes v3 Test/TestSuite scheme registration from the operator clientset scheme. |
| pkg/operator/clientset/versioned/fake/register.go | Removes v3 Test/TestSuite scheme registration from the fake operator clientset scheme. |
| pkg/operator/clientset/versioned/fake/clientset_generated.go | Removes fake clientset accessors for TestsV2/TestsV3. |
| pkg/operator/clientset/versioned/clientset.go | Removes TestsV2/TestsV3 from the public clientset interface and initialization. |
| pkg/mapper/testworkflows/kube.go | Deletes orphaned mapping layer from Test/TestSuite/Executor CRDs to TestWorkflow CRDs. |
| pkg/crd/templates/testsuite.tmpl | Removes deprecated TestSuite CRD YAML template. |
| pkg/crd/templates/testsource.tmpl | Removes deprecated TestSource CRD YAML template. |
| pkg/crd/templates/test.tmpl | Removes deprecated Test CRD YAML template. |
| pkg/crd/templates/template.tmpl | Removes deprecated Template CRD YAML template. |
| pkg/crd/templates/executor.tmpl | Removes deprecated Executor CRD YAML template. |
| pkg/crd/crd.go | Removes template constants for deprecated CRD templates (keeping webhook/webhooktemplate/testtrigger). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Vladislav Sukhin <vladislav@kubeshop.io>
Test and TestSuite (tests.testkube.io) are deprecated CRDs, retained only so existing cluster resources are not garbage-collected. Nothing serves or reconciles them: no API routes, no CLI commands, no controller, no client. This removes the surface that has no callers at all.
The CRDs, api/tests/v3 and api/testsuite/v3 are left untouched, along with the sub-types (Variable, ArtifactRequest, EnvReference, GitAuthType, ArgsModeType) that TestWorkflow v1 and TestTrigger v1 embed.
Pull request description
Checklist (choose whats happened)
Breaking changes
Changes
Fixes