Skip to content

Fix trampoline notebook filename collision#5508

Merged
simonfaltum merged 5 commits into
mainfrom
simonfaltum/b29-trampoline-collision
Jul 2, 2026
Merged

Fix trampoline notebook filename collision#5508
simonfaltum merged 5 commits into
mainfrom
simonfaltum/b29-trampoline-collision

Conversation

@simonfaltum

Copy link
Copy Markdown
Member

Why

Found during a full-repo review of the CLI. The python wheel wrapper (trampoline) names its generated notebook notebook_<job_key>_<task_key>. Both keys can contain underscores, so distinct pairs can produce the same name: job a_b with task c and job a with task b_c both map to notebook_a_b_c. The second wrapper overwrites the first, and both tasks point at the same notebook, so one task silently runs the other task's wrapper.

Changes

Before, two different (job key, task key) pairs could collide on one wrapper filename; now every pair gets a unique name. The name is now notebook_<job_key_length>_<job_key>_<task_key> (in bundle/trampoline/trampoline.go). The length prefix makes the encoding unambiguous for any keys, with no new dependencies. The example above becomes notebook_3_a_b_c vs notebook_1_a_b_c.

Existing wrapper notebooks get a new path on the next deploy. This only affects bundles with experimental.python_wheel_wrapper: true, and the wrapper is regenerated and the job spec updated on every deploy, so no action is needed.

Test plan

  • New unit test TestGenerateTrampolineWithCollidingKeys covering the colliding pair, asserting two distinct wrapper files and notebook paths (fails without the fix)
  • Updated existing expectations in bundle/trampoline tests for the new naming
  • go test ./bundle/trampoline/ -count=1 passes
  • ./task fmt-q, ./task lint-q, and ./task checks pass

This pull request and its description were written by Isaac.

Wrapper notebooks were named notebook_<job_key>_<task_key>. Since both keys can contain underscores, distinct pairs like (a_b, c) and (a, b_c) mapped to the same filename and one task silently ran the other task's wrapper. Prefix the job key length to make the name unique per pair.

Co-authored-by: Isaac
@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: d122c6c

Run: 28501465754

Env 🟨​KNOWN 🔄​flaky 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
🟨​ aws linux 7 3 13 230 1037 8:09
🟨​ aws windows 7 3 13 232 1035 9:41
💚​ aws-ucws linux 10 13 314 955 11:24
🔄​ aws-ucws windows 1 9 13 316 953 12:11
💚​ azure linux 4 15 230 1036 7:38
🔄​ azure windows 1 3 15 232 1034 7:38
🟨​ azure-ucws linux 1 1 15 316 952 13:49
🟨​ azure-ucws windows 3 1 15 318 950 13:16
💚​ gcp linux 4 15 229 1038 8:03
💚​ gcp windows 4 15 231 1036 6:07
23 interesting tests: 13 SKIP, 10 KNOWN
Test Name aws linux aws windows aws-ucws linux aws-ucws windows azure linux azure windows azure-ucws linux azure-ucws windows gcp linux gcp windows
🟨​ TestAccept 🟨​K 🟨​K 💚​R 🔄​f 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
🙈​ TestAccept/bundle/invariant/no_drift 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/permissions 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions 🟨​K 🟨​K 💚​R 💚​R 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=direct 🟨​K 🟨​K 💚​R 💚​R
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=terraform 🟨​K 🟨​K 💚​R 💚​R
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions 🟨​K 🟨​K 💚​R 💚​R 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions/DATABRICKS_BUNDLE_ENGINE=direct 🟨​K 🟨​K 💚​R 💚​R
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions/DATABRICKS_BUNDLE_ENGINE=terraform 🟨​K 🟨​K 💚​R 💚​R
🙈​ TestAccept/bundle/resources/postgres_branches/basic 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/recreate 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/replace_existing 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/update_protected 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/without_branch_id 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_endpoints/basic 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_projects/update_display_name 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/synced_database_tables/basic 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_endpoints/drift/recreated_same_name 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_indexes/recreate/embedding_dimension 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/ssh/connection 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🟨​ TestFetchRepositoryInfoAPI_FromRepo 💚​R 💚​R 💚​R 💚​R 💚​R 🔄​f 🟨​K 🟨​K 💚​R 💚​R
🟨​ TestFetchRepositoryInfoAPI_FromRepo/root 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 🟨​K 💚​R 💚​R
🟨​ TestFetchRepositoryInfoAPI_FromRepo/subdir 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 🟨​K 💚​R 💚​R
Top 4 slowest tests (at least 2 minutes):
duration env testname
3:10 gcp linux TestFilerRecursiveDelete/dbfs
2:11 aws-ucws windows TestFilerRecursiveDelete/dbfs
2:07 aws-ucws linux TestFsCpDirToDirWithOverwriteFlag/dbfs_to_dbfs
2:03 azure-ucws windows TestAccept/bundle/deploy/mlops-stacks/DATABRICKS_BUNDLE_ENGINE=terraform

Co-authored-by: Isaac
@simonfaltum simonfaltum requested review from mihaimitrea-db and removed request for andrewnester June 12, 2026 10:45
@simonfaltum simonfaltum requested review from andrewnester and pietern and removed request for mihaimitrea-db June 17, 2026 07:34
@simonfaltum simonfaltum requested review from janniklasrose and removed request for andrewnester and pietern July 1, 2026 14:49
@simonfaltum

Copy link
Copy Markdown
Member Author

@janniklasrose Up for taking a look at these smaller PR's ? (#5508, #5496, #5492, #5488)

@simonfaltum simonfaltum added this pull request to the merge queue Jul 2, 2026
Merged via the queue into main with commit b0b9394 Jul 2, 2026
25 checks passed
@simonfaltum simonfaltum deleted the simonfaltum/b29-trampoline-collision branch July 2, 2026 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants