You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Companion to #3397. Even with the right env and cluster pinned, the E2E suite still relies on each test body to delete every resource it creates; any test that throws or crashes mid-flow leaves a topic/statement behind, and we have no global teardown that picks them up.
mcp-confluent follows a similar pattern in its integration suite with an int- prefix and a shared admin client that cleans up tracked names in afterAll. See tests/harness/unique-name.ts and the withSharedAdminClient() helper in that repo for the worked example.
Suggested approach
Adopt a uniform e2e-vscode- prefix for every test-created resource (topic, statement, subject, artifact). Names like e2e-produce-message-* are already close - pull them under the same prefix. A shared helper (e.g., e2eResourceName("produce")) would make this hard to forget at call sites.
Add a Playwright globalTeardown that lists topics, Flink statements, and any other test-scoped resources in the configured CCloud env+cluster and deletes anything matching the e2e-vscode- prefix older than ~1h. The "older than 1h" guard avoids stomping on concurrently-running CI jobs.
Out of scope here: tightening the underlying API key / test-user permissions so the identity can't reach other envs at all. That's an infra / secret-rotation task that belongs elsewhere.
Companion to #3397. Even with the right env and cluster pinned, the E2E suite still relies on each test body to delete every resource it creates; any test that throws or crashes mid-flow leaves a topic/statement behind, and we have no global teardown that picks them up.
mcp-confluent follows a similar pattern in its integration suite with an
int-prefix and a shared admin client that cleans up tracked names inafterAll. Seetests/harness/unique-name.tsand thewithSharedAdminClient()helper in that repo for the worked example.Suggested approach
e2e-vscode-prefix for every test-created resource (topic, statement, subject, artifact). Names likee2e-produce-message-*are already close - pull them under the same prefix. A shared helper (e.g.,e2eResourceName("produce")) would make this hard to forget at call sites.globalTeardownthat lists topics, Flink statements, and any other test-scoped resources in the configured CCloud env+cluster and deletes anything matching thee2e-vscode-prefix older than ~1h. The "older than 1h" guard avoids stomping on concurrently-running CI jobs.Out of scope here: tightening the underlying API key / test-user permissions so the identity can't reach other envs at all. That's an infra / secret-rotation task that belongs elsewhere.