Commit 7c310ff
authored
acc: stop bundle-generate tests leaking cloud workspace dirs (#5946)
## Why
Several `bundle/generate` acceptance tests create directories on the
**real workspace** (they have `Cloud = true`) and never reliably remove
them, so leftovers accumulate on shared test workspaces (e.g.
`azure-prod-ucws-is`), bloating `workspace list /`. This was observed
contributing to a workspace-listing integration test hanging.
Two distinct leaks:
1. **`genie_space`, `dashboard`, `alert`** each ran `workspace mkdirs
/Workspace/test-$UNIQUE_NAME` at the **workspace root** and used it as
the `parent_path` for the resource they create. Nothing deleted it: no
`script.cleanup`, and the `eng-dev-ecosystem` env cleaner only sweeps
`/Users`, never the root. The alert test also frequently times out
(`TimeoutCloud = "5m"`, #4221).
2. **`auto-bind`** deployed its bundle to `/Workspace/tmp/$UNIQUE_NAME`.
Its `bundle destroy` removes that on the happy path, but the inline
`trap` only cleaned the `/Users/.../python-*` notebook dirs — so a
failure before `destroy` leaked the root into the shared, unswept
`/Workspace/tmp` namespace.
## What
Every generate test that creates workspace state now cleans up after
itself, in the swept user tree:
- Relocated the three root dirs to
`/Workspace/Users/$CURRENT_USER_NAME/test-$UNIQUE_NAME`, and added a
`script.cleanup` to each that recursively deletes it (removing the genie
space / dashboard / alert created inside).
- Moved `auto-bind`'s bundle root to
`~/.bundle/auto-bind-test-$UNIQUE_NAME`, matching the `~/.bundle`
convention every other bundle acceptance test uses.
Output goldens regenerated with `-update`; the full `bundle/generate`
suite passes locally.
This pull request and its description were written by Isaac, an AI
coding agent.1 parent 9b5273a commit 7c310ff
15 files changed
Lines changed: 22 additions & 13 deletions
File tree
- acceptance/bundle/generate
- alert
- auto-bind
- dashboard
- genie_space
- out/resource
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
0 commit comments