acc: stop bundle-generate tests leaking cloud workspace dirs#5946
Merged
Conversation
The genie_space, dashboard, and alert bundle-generate acceptance tests created their parent directory at the workspace root (/Workspace/test-$UNIQUE_NAME). On cloud runs this dir is created on the real workspace, and nothing deletes it: these tests have no script.cleanup, and even one would not help the alert test, which frequently times out (see #4221) before cleanup could run. The eng-dev-ecosystem env cleaner only sweeps /Users, not the workspace root, so these dirs accumulated indefinitely and bloated `workspace list /`. Move the parent dir under /Workspace/Users/$CURRENT_USER_NAME/ so it lands in the swept user tree. The root path was not required for any of these features. Co-authored-by: Isaac
Make each bundle-generate test that creates cloud workspace state remove it, so nothing is left behind on the real workspace after a cloud run. - genie_space, dashboard, alert: add a script.cleanup that recursively deletes the per-run /Workspace/Users/$CURRENT_USER_NAME/test-$UNIQUE_NAME directory (and the genie space / dashboard / alert created inside it). - auto-bind: deploy the bundle to ~/.bundle/auto-bind-test-$UNIQUE_NAME instead of /tmp/$UNIQUE_NAME. The old root landed in the shared, unswept /Workspace/tmp namespace and leaked whenever the script failed before `bundle destroy`. This matches the ~/.bundle convention used by every other bundle acceptance test. Co-authored-by: Isaac
Collaborator
Integration test reportCommit: 21de3b6
10 interesting tests: 4 SKIP, 3 flaky, 3 RECOVERED
Top 9 slowest tests (at least 2 minutes):
|
andrewnester
approved these changes
Jul 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Several
bundle/generateacceptance tests create directories on the real workspace (they haveCloud = true) and never reliably remove them, so leftovers accumulate on shared test workspaces (e.g.azure-prod-ucws-is), bloatingworkspace list /. This was observed contributing to a workspace-listing integration test hanging.Two distinct leaks:
genie_space,dashboard,alerteach ranworkspace mkdirs /Workspace/test-$UNIQUE_NAMEat the workspace root and used it as theparent_pathfor the resource they create. Nothing deleted it: noscript.cleanup, and theeng-dev-ecosystemenv cleaner only sweeps/Users, never the root. The alert test also frequently times out (TimeoutCloud = "5m", Add 5-minute timeout to alert tests to prevent CI hangs #4221).auto-binddeployed its bundle to/Workspace/tmp/$UNIQUE_NAME. Itsbundle destroyremoves that on the happy path, but the inlinetraponly cleaned the/Users/.../python-*notebook dirs — so a failure beforedestroyleaked the root into the shared, unswept/Workspace/tmpnamespace.What
Every generate test that creates workspace state now cleans up after itself, in the swept user tree:
/Workspace/Users/$CURRENT_USER_NAME/test-$UNIQUE_NAME, and added ascript.cleanupto each that recursively deletes it (removing the genie space / dashboard / alert created inside).auto-bind's bundle root to~/.bundle/auto-bind-test-$UNIQUE_NAME, matching the~/.bundleconvention every other bundle acceptance test uses.Output goldens regenerated with
-update; the fullbundle/generatesuite passes locally.This pull request and its description were written by Isaac, an AI coding agent.