Skip to content

scale e2e test is not cleaning up test namespaces after test #13019

@sbueringer

Description

@sbueringer

I just noticed that we have a huge number of error logs in our e2e tests that look like this

E1115 09:40:33.696629 1 controller.go:474] "Reconciler error" err="failed to discover variables for ClusterClass in-memory-1: failed to call DiscoverVariables for patch test-patch: failed to call extension handler "discover-variables.scale": failed to get extension handler "discover-variables.scale" from registry: handler with name "discover-variables.scale" has not been registered" controller="clusterclass" controllerGroup="cluster.x-k8s.io" controllerKind="ClusterClass" ClusterClass="scale/in-memory-1" namespace="scale" name="in-memory-1" reconcileID="5ab76484-5d97-4d73-a2d2-7a86507f5d18"
https://storage.googleapis.com/kubernetes-ci-logs/logs/periodic-cluster-api-e2e-main/1989612616221200384/artifacts/clusters/bootstrap/logs/capi-system/capi-controller-manager/capi-controller-manager-5cdf4c75bc-8zr27/manager.log

I think the root cause is that the scale e2e test () is not cleaning up the test namespace and its ClusterClasses at the end of the test. We should probably do that
(xref:

AfterEach(func() {
if !input.SkipCleanup {
if input.ExtensionServiceNamespace != "" && input.ExtensionServiceName != "" {
Eventually(func() error {
return input.BootstrapClusterProxy.GetClient().Delete(ctx, &runtimev1.ExtensionConfig{ObjectMeta: metav1.ObjectMeta{Name: input.ExtensionConfigName}})
}, 10*time.Second, 1*time.Second).Should(Succeed(), "Deleting ExtensionConfig failed")
}
}
cancelWatches()
})
)

Metadata

Metadata

Assignees

Labels

area/e2e-testingIssues or PRs related to e2e testinghelp wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/cleanupCategorizes issue or PR as related to cleaning up code, process, or technical debt.priority/backlogHigher priority than priority/awaiting-more-evidence.triage/acceptedIndicates an issue or PR is ready to be actively worked on.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions