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🙈​skipTime
🟨​aws linux731323010378:09
🟨​aws windows731323210359:41
💚​aws-ucws linux101331495511:24
🔄​aws-ucws windows191331695312:11
💚​azure linux41523010367:38
🔄​azure windows131523210347:38
🟨​azure-ucws linux111531695213:49
🟨​azure-ucws windows311531895013:16
💚​gcp linux41522910388:03
💚​gcp windows41523110366:07
23 interesting tests: 13 SKIP, 10 KNOWN
Test Nameaws linuxaws windowsaws-ucws linuxaws-ucws windowsazure linuxazure windowsazure-ucws linuxazure-ucws windowsgcp linuxgcp 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):
durationenvtestname
3:10gcp linuxTestFilerRecursiveDelete/dbfs
2:11aws-ucws windowsTestFilerRecursiveDelete/dbfs
2:07aws-ucws linuxTestFsCpDirToDirWithOverwriteFlag/dbfs_to_dbfs
2:03azure-ucws windowsTestAccept/bundle/deploy/mlops-stacks/DATABRICKS_BUNDLE_ENGINE=terraform

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

Copy link
Copy Markdown
MemberAuthor

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

@simonfaltum
simonfaltum added this pull request to the merge queueJul 2, 2026
Merged via the queue into main with commit b0b9394Jul 2, 2026
25 checks passed
@simonfaltum
simonfaltum deleted the simonfaltum/b29-trampoline-collision branch July 2, 2026 08:40
Sign up for freeto 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

@simonfaltum@eng-dev-ecosystem-bot@janniklasrose