Skip to content

Upload the planned patched wheels in bundle deploy --plan - #8157

Open
denik wants to merge 6 commits into
denik/acc-record-readplan-dynamic-wheelsfrom
denik/fix-readplan-dynamic-wheels
Open

denik wants to merge 6 commits into
denik/acc-record-readplan-dynamic-wheelsfrom
denik/fix-readplan-dynamic-wheels

Conversation

@denik

@denik denik commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Changes

bundle deploy --plan picks the local files to upload as follows:

  • LocalLibraryPaths applies patchwheel.FilterLatestWheels to globbed library paths and to artifact file globs, as ExpandGlobReferences and artifacts.expandGlobs do on the plain deploy path. It also patches every wheel an artifact glob matches instead of only the first one.
  • The new PlanLocalLibraryPaths (bundle/libraries/plan_paths.go) adds every file that the plan's resources reference under the artifact upload path and that the set above lacks. It reads the planned state of the resources the plan changes, and the remote state of the ones it leaves unchanged, leaving out values the plan marks as unmanaged. It finds each file among the patched wheels in the local cache and the files any library or artifact glob matches, or by re-patching a matching wheel. When a wheel the plan is about to deploy has no local file, it fails before anything is cleaned up or uploaded, and asks to run bundle plan again.

Why

After a version bump, or with several packages built into one dist/, deploy --plan uploaded the patched old wheel and the unpatched new ones, while the job referenced patched wheels that were never uploaded. Recorded in #8156.

Choosing the latest wheel again at apply time is not enough on its own. The plan recorded the names that existed at bundle plan time, and those differ when the local files change in between: a newer build into the same dist/, another target's build, or a touched wheel, whose patched name comes from its mtime. They also differ for references that SwitchToPatchedWheels does not rewrite, such as pipeline environment.dependencies on a dynamic_version wheel, which keep the unpatched name. The upload step empties the remote directory first, so a referenced file that is not uploaded is lost. Reading the references from the plan covers all of these. It also avoids copying SwitchToPatchedWheels' rules, which #5306 changes.

Gaps and risks

  • Only wheels referenced by resources the plan changes are required. Names that only unchanged resources reference are uploaded when a local file exists, and are otherwise skipped. They can be files the bundle does not produce: a library a job run installed on a cluster, or an upload kept by experimental.skip_artifact_cleanup.
  • References are found by text: any string, or part of a string, that starts with the upload path. That covers library fields, %pip install lines and --wheel= arguments. This includes file:///Volumes/..., which contains the upload path. A reference that names the same location another way, such as dbfs:/Volumes/..., is not seen.
  • With experimental.python_wheel_wrapper, the wheel is installed by a %pip install line in a generated notebook, which is not part of the plan. If the local wheels change between plan and apply, that notebook can name a wheel that was not uploaded, as before this PR.
  • When an older plan is applied after a newer build, the newest patched wheel is still uploaded even though no resource references it. That is one extra upload, and the job is still correct.
  • A file that is matched by basename but sits in a different directory than at plan time is taken as the same file. Two library files with one basename already collide in the upload directory.
  • Not changed: a non-dynamic artifact that lists the same file as a dynamic_version artifact gets only the patched copy uploaded, and no resource names the raw one. An exact library path whose file was deleted after the plan still fails during upload, after cleanup, as before.
  • deploy --plan --select uploads only the latest version for unselected resources too, like plain deploy --select.
  • Tested locally against the testserver only, with no cloud run: the change is about which local files are picked, plus one new error before any request. Only bundle deploy --plan reaches this code, so plain deploy is unchanged.

Risk: medium. Changes are limited to deploy --plan, but they change which files it uploads and add an error that fails a deploy which used to report success with missing wheels.

Tests

  • bundle/artifacts/whl_dynamic_readplan (from #8156) now uploads exactly the wheels the job references, so its output is updated and the Badness is removed. Reverting any of the three LocalLibraryPaths changes fails it: the stale 0.0.2 build that nothing references catches the library glob filter, the pinned task that names 0.0.1 by its exact path catches the artifact glob filter, and the second package catches the removed break.

  • New bundle/artifacts/whl_dynamic_readplan_refs has a job and a pipeline on a dynamic_version artifact with two packages. It covers four cases:

    1. A plan made before a newer build uploads the wheels it references, including the pipeline's unpatched ones.
    2. A touched wheel whose planned patched copy is still cached deploys with the planned name.
    3. An unchanged pipeline keeps its wheels.
    4. A touched wheel with the cache gone fails before any cleanup, upload or resource change.

    It has two variants (DMS off and on) at about 3s each. Each of these fails it: going back to LocalLibraryPaths, dropping the cache lookup, or dropping the remote-state read.

  • New unit test TestPlanUploadReferences covers planned and unchanged references, deletes, unmanaged values, extras, nested paths and embedded paths.

  • The acceptance tests under bundle/artifacts, bundle/deploy, bundle/integration_whl, bundle/resources/{pipelines,clusters,jobs} and bundle/environments pass locally, except bundle/deploy/mlops-stacks, which fails on main as well. The bundle and libs/patchwheel unit tests pass too.

This PR was created by analyzing coverage gaps.
Coverage: http://go/cli/dashboard/coverage/file/bundle/libraries/remote_path.go (LocalLibraryPaths, lines 25-87).

🤖 AI agent (opus5.5, isaac_claude)

This pull request and its description were written by Isaac.

denik and others added 2 commits November 28, 2026 00:11
When applying a saved plan, Build is skipped and LocalLibraryPaths
expands artifact and library globs itself. It patched only the first
wheel each artifact glob matched and kept every version, so after a
version bump it uploaded the patched old wheel and unpatched new ones
while the job referenced patched wheels that were never uploaded. Keep
the latest wheel per distribution, as ExpandGlobReferences does, and
patch every match.

Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
@github-actions

github-actions Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Regression test report ✅

Commit: 849d9832e | Workflow run

Selected 1 changed tests (limit=20, 0 not selected)

2 tests: regression=2 unreleased=0 coverage=0 failing=0
test branch main (e6f3460) latest (v1.28.0)
TestAccept/bundle/artifacts/whl_dynamic_readplan/DMS=/READPLAN=1 ✅ ❌ ❌
TestAccept/bundle/artifacts/whl_dynamic_readplan/DMS=true/READPLAN=1 ✅ ❌ ❌
TestAccept/bundle/artifacts/whl_dynamic_readplan/DMS=/READPLAN=1: branch ✅ | main (e6f3460) ❌ | latest (v1.28.0) ❌

main (e6f3460):

acceptance_test.go:1402: Diff:
        --- bundle/artifacts/whl_dynamic_readplan/output.txt
        +++ /tmp/TestAcceptbundleartifactswhl_dynamic_readplanDMS=READPLAN=12338429163/002/output.txt
        @@ -8,9 +8,10 @@
         my_test_code/dist/other_test_code-0.0.1-py3-none-any.whl
         
         >>> [CLI] bundle deploy --plan tmp.plan.json
        -Uploading .databricks/bundle/default/patched_wheels/my_test_code_my_test_code/my_test_code-0.0.3+[UNIX_TIME_NANOS]-py3-none-any.whl...
        -Uploading .databricks/bundle/default/patched_wheels/my_test_code_other_test_code/other_test_code-0.0.1+1577836800000000000-py3-none-any.whl...
        -Uploading my_test_code/dist/my_test_code-0.0.1-py3-none-any.whl...
        +Uploading .databricks/bundle/default/patched_wheels/my_test_code_my_test_code/my_test_code-0.0.1+[UNIX_TIME_NANOS][0]-py3-none-any.whl...
        +Uploading my_test_code/dist/my_test_code-0.0.2-py3-none-any.whl...
        +Uploading my_test_code/dist/my_test_code-0.0.3-py3-none-any.whl...
        +Uploading my_test_code/dist/other_test_code-0.0.1-py3-none-any.whl...
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/whl-dynamic-readplan/default/files...
         Updated jobs.my_job
         Resources: 0 created, 1 changed, 0 deleted, 0 unchanged
        @@ -18,13 +19,14 @@
         === Wheels the job references
         
         >>> print_requests.py --keep //jobs/reset
        -"/Workspace/Users/[USERNAME]/.bundle/whl-dynamic-readplan/default/artifacts/.internal/my_test_code-0.0.3+[UNIX_TIME_NANOS]-py3-none-any.whl"
        +"/Workspace/Users/[USERNAME]/.bundle/whl-dynamic-readplan/default/artifacts/.internal/my_test_code-0.0.3+[UNIX_TIME_NANOS][1]-py3-none-any.whl"
         "/Workspace/Users/[USERNAME]/.bundle/whl-dynamic-readplan/default/artifacts/.internal/other_test_code-0.0.1+1577836800000000000-py3-none-any.whl"
         "/Workspace/Users/[USERNAME]/.bundle/whl-dynamic-readplan/default/artifacts/.internal/my_test_code-0.0.1-py3-none-any.whl"
         
         === Wheels uploaded, the same as the job references
         
         >>> print_requests.py --sort //.internal/
        -"/api/2.0/workspace-files/import-file/Workspace/Users/[USERNAME]/.bundle/whl-dynamic-readplan/default/artifacts/.internal/my_test_code-0.0.1-py3-none-any.whl"
        -"/api/2.0/workspace-files/import-file/Workspace/Users/[USERNAME]/.bundle/whl-dynamic-readplan/default/artifacts/.internal/my_test_code-0.0.3+[UNIX_TIME_NANOS]-py3-none-any.whl"
        -"/api/2.0/workspace-files/import-file/Workspace/Users/[USERNAME]/.bundle/whl-dynamic-readplan/default/artifacts/.internal/other_test_code-0.0.1+1577836800000000000-py3-none-any.whl"
        +"/api/2.0/workspace-files/import-file/Workspace/Users/[USERNAME]/.bundle/whl-dynamic-readplan/default/artifacts/.internal/my_test_code-0.0.1+[UNIX_TIME_NANOS][0]-py3-none-any.whl"
        +"/api/2.0/workspace-files/import-file/Workspace/Users/[USERNAME]/.bundle/whl-dynamic-readplan/default/artifacts/.internal/my_test_code-0.0.2-py3-none-any.whl"
        +"/api/2.0/workspace-files/import-file/Workspace/Users/[USERNAME]/.bundle/whl-dynamic-readplan/default/artifacts/.internal/my_test_code-0.0.3-py3-none-any.whl"
        +"/api/2.0/workspace-files/import-file/Workspace/Users/[USERNAME]/.bundle/whl-dynamic-readplan/default/artifacts/.internal/other_test_code-0.0.1-py3-none-any.whl"
        
    acceptance_test.go:1180: 
        LOG.deploy: Uploading .databricks/bundle/default/patched_wheels/my_test_code_my_test_code/my_test_code-0.0.1+1795831879156249631-py3-none-any.whl...
        LOG.deploy: Uploading bundle files to /Workspace/Users/tester@databricks.com/.bundle/whl-dynamic-readplan/default/files...
        LOG.deploy: Created jobs.my_job
        LOG.deploy: Files: 16 uploaded, 0 deleted
        LOG.deploy: Resources: 1 created, 0 changed, 0 deleted, 0 unchanged
    acceptance_test.go:1180: 
        LOG.plan: Building my_test_code...
        LOG.plan: Building my_test_code...
        LOG.plan: Building my_test_code...
FAIL

latest (v1.28.0):

acceptance_test.go:1402: Diff:
        --- bundle/artifacts/whl_dynamic_readplan/output.txt
        +++ /tmp/TestAcceptbundleartifactswhl_dynamic_readplanDMS=READPLAN=14027510978/002/output.txt
        @@ -8,9 +8,10 @@
         my_test_code/dist/other_test_code-0.0.1-py3-none-any.whl
         
         >>> [CLI] bundle deploy --plan tmp.plan.json
        -Uploading .databricks/bundle/default/patched_wheels/my_test_code_my_test_code/my_test_code-0.0.3+[UNIX_TIME_NANOS]-py3-none-any.whl...
        -Uploading .databricks/bundle/default/patched_wheels/my_test_code_other_test_code/other_test_code-0.0.1+1577836800000000000-py3-none-any.whl...
        -Uploading my_test_code/dist/my_test_code-0.0.1-py3-none-any.whl...
        +Uploading .databricks/bundle/default/patched_wheels/my_test_code_my_test_code/my_test_code-0.0.1+[UNIX_TIME_NANOS][0]-py3-none-any.whl...
        +Uploading my_test_code/dist/my_test_code-0.0.2-py3-none-any.whl...
        +Uploading my_test_code/dist/my_test_code-0.0.3-py3-none-any.whl...
        +Uploading my_test_code/dist/other_test_code-0.0.1-py3-none-any.whl...
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/whl-dynamic-readplan/default/files...
         Updated jobs.my_job
         Resources: 0 created, 1 changed, 0 deleted, 0 unchanged
        @@ -18,13 +19,14 @@
         === Wheels the job references
         
         >>> print_requests.py --keep //jobs/reset
        -"/Workspace/Users/[USERNAME]/.bundle/whl-dynamic-readplan/default/artifacts/.internal/my_test_code-0.0.3+[UNIX_TIME_NANOS]-py3-none-any.whl"
        +"/Workspace/Users/[USERNAME]/.bundle/whl-dynamic-readplan/default/artifacts/.internal/my_test_code-0.0.3+[UNIX_TIME_NANOS][1]-py3-none-any.whl"
         "/Workspace/Users/[USERNAME]/.bundle/whl-dynamic-readplan/default/artifacts/.internal/other_test_code-0.0.1+1577836800000000000-py3-none-any.whl"
         "/Workspace/Users/[USERNAME]/.bundle/whl-dynamic-readplan/default/artifacts/.internal/my_test_code-0.0.1-py3-none-any.whl"
         
         === Wheels uploaded, the same as the job references
         
         >>> print_requests.py --sort //.internal/
        -"/api/2.0/workspace-files/import-file/Workspace/Users/[USERNAME]/.bundle/whl-dynamic-readplan/default/artifacts/.internal/my_test_code-0.0.1-py3-none-any.whl"
        -"/api/2.0/workspace-files/import-file/Workspace/Users/[USERNAME]/.bundle/whl-dynamic-readplan/default/artifacts/.internal/my_test_code-0.0.3+[UNIX_TIME_NANOS]-py3-none-any.whl"
        -"/api/2.0/workspace-files/import-file/Workspace/Users/[USERNAME]/.bundle/whl-dynamic-readplan/default/artifacts/.internal/other_test_code-0.0.1+1577836800000000000-py3-none-any.whl"
        +"/api/2.0/workspace-files/import-file/Workspace/Users/[USERNAME]/.bundle/whl-dynamic-readplan/default/artifacts/.internal/my_test_code-0.0.1+[UNIX_TIME_NANOS][0]-py3-none-any.whl"
        +"/api/2.0/workspace-files/import-file/Workspace/Users/[USERNAME]/.bundle/whl-dynamic-readplan/default/artifacts/.internal/my_test_code-0.0.2-py3-none-any.whl"
        +"/api/2.0/workspace-files/import-file/Workspace/Users/[USERNAME]/.bundle/whl-dynamic-readplan/default/artifacts/.internal/my_test_code-0.0.3-py3-none-any.whl"
        +"/api/2.0/workspace-files/import-file/Workspace/Users/[USERNAME]/.bundle/whl-dynamic-readplan/default/artifacts/.internal/other_test_code-0.0.1-py3-none-any.whl"
        
    acceptance_test.go:1180: 
        LOG.deploy: Uploading .databricks/bundle/default/patched_wheels/my_test_code_my_test_code/my_test_code-0.0.1+1795831890645028792-py3-none-any.whl...
        LOG.deploy: Uploading bundle files to /Workspace/Users/tester@databricks.com/.bundle/whl-dynamic-readplan/default/files...
        LOG.deploy: Created jobs.my_job
        LOG.deploy: Files: 16 uploaded, 0 deleted
        LOG.deploy: Resources: 1 created, 0 changed, 0 deleted, 0 unchanged
    acceptance_test.go:1180: 
        LOG.plan: Building my_test_code...
        LOG.plan: Building my_test_code...
        LOG.plan: Building my_test_code...
FAIL
TestAccept/bundle/artifacts/whl_dynamic_readplan/DMS=true/READPLAN=1: branch ✅ | main (e6f3460) ❌ | latest (v1.28.0) ❌

main (e6f3460):

acceptance_test.go:1402: Diff:
        --- bundle/artifacts/whl_dynamic_readplan/output.txt
        +++ /tmp/TestAcceptbundleartifactswhl_dynamic_readplanDMS=trueREADPL2584903437/002/output.txt
        @@ -8,9 +8,10 @@
         my_test_code/dist/other_test_code-0.0.1-py3-none-any.whl
         
         >>> [CLI] bundle deploy --plan tmp.plan.json
        -Uploading .databricks/bundle/default/patched_wheels/my_test_code_my_test_code/my_test_code-0.0.3+[UNIX_TIME_NANOS]-py3-none-any.whl...
        -Uploading .databricks/bundle/default/patched_wheels/my_test_code_other_test_code/other_test_code-0.0.1+1577836800000000000-py3-none-any.whl...
        -Uploading my_test_code/dist/my_test_code-0.0.1-py3-none-any.whl...
        +Uploading .databricks/bundle/default/patched_wheels/my_test_code_my_test_code/my_test_code-0.0.1+[UNIX_TIME_NANOS][0]-py3-none-any.whl...
        +Uploading my_test_code/dist/my_test_code-0.0.2-py3-none-any.whl...
        +Uploading my_test_code/dist/my_test_code-0.0.3-py3-none-any.whl...
        +Uploading my_test_code/dist/other_test_code-0.0.1-py3-none-any.whl...
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/whl-dynamic-readplan/default/files...
         Updated jobs.my_job
         Resources: 0 created, 1 changed, 0 deleted, 0 unchanged
        @@ -18,13 +19,14 @@
         === Wheels the job references
         
         >>> print_requests.py --keep //jobs/reset
        -"/Workspace/Users/[USERNAME]/.bundle/whl-dynamic-readplan/default/artifacts/.internal/my_test_code-0.0.3+[UNIX_TIME_NANOS]-py3-none-any.whl"
        +"/Workspace/Users/[USERNAME]/.bundle/whl-dynamic-readplan/default/artifacts/.internal/my_test_code-0.0.3+[UNIX_TIME_NANOS][1]-py3-none-any.whl"
         "/Workspace/Users/[USERNAME]/.bundle/whl-dynamic-readplan/default/artifacts/.internal/other_test_code-0.0.1+1577836800000000000-py3-none-any.whl"
         "/Workspace/Users/[USERNAME]/.bundle/whl-dynamic-readplan/default/artifacts/.internal/my_test_code-0.0.1-py3-none-any.whl"
         
         === Wheels uploaded, the same as the job references
         
         >>> print_requests.py --sort //.internal/
        -"/api/2.0/workspace-files/import-file/Workspace/Users/[USERNAME]/.bundle/whl-dynamic-readplan/default/artifacts/.internal/my_test_code-0.0.1-py3-none-any.whl"
        -"/api/2.0/workspace-files/import-file/Workspace/Users/[USERNAME]/.bundle/whl-dynamic-readplan/default/artifacts/.internal/my_test_code-0.0.3+[UNIX_TIME_NANOS]-py3-none-any.whl"
        -"/api/2.0/workspace-files/import-file/Workspace/Users/[USERNAME]/.bundle/whl-dynamic-readplan/default/artifacts/.internal/other_test_code-0.0.1+1577836800000000000-py3-none-any.whl"
        +"/api/2.0/workspace-files/import-file/Workspace/Users/[USERNAME]/.bundle/whl-dynamic-readplan/default/artifacts/.internal/my_test_code-0.0.1+[UNIX_TIME_NANOS][0]-py3-none-any.whl"
        +"/api/2.0/workspace-files/import-file/Workspace/Users/[USERNAME]/.bundle/whl-dynamic-readplan/default/artifacts/.internal/my_test_code-0.0.2-py3-none-any.whl"
        +"/api/2.0/workspace-files/import-file/Workspace/Users/[USERNAME]/.bundle/whl-dynamic-readplan/default/artifacts/.internal/my_test_code-0.0.3-py3-none-any.whl"
        +"/api/2.0/workspace-files/import-file/Workspace/Users/[USERNAME]/.bundle/whl-dynamic-readplan/default/artifacts/.internal/other_test_code-0.0.1-py3-none-any.whl"
        
    acceptance_test.go:1180: 
        LOG.deploy: Uploading .databricks/bundle/default/patched_wheels/my_test_code_my_test_code/my_test_code-0.0.1+1795831879068251323-py3-none-any.whl...
        LOG.deploy: Uploading bundle files to /Workspace/Users/tester@databricks.com/.bundle/whl-dynamic-readplan/default/files...
        LOG.deploy: Current Deployment Version: http://127.0.0.1:39791/deployments/4000000000000048?version=1
        LOG.deploy: Created jobs.my_job
        LOG.deploy: Files: 16 uploaded, 0 deleted
        LOG.deploy: Resources: 1 created, 0 changed, 0 deleted, 0 unchanged
    acceptance_test.go:1180: 
        LOG.plan: Building my_test_code...
        LOG.plan: Building my_test_code...
        LOG.plan: Building my_test_code...

latest (v1.28.0):

acceptance_test.go:1402: Diff:
        --- bundle/artifacts/whl_dynamic_readplan/output.txt
        +++ /tmp/TestAcceptbundleartifactswhl_dynamic_readplanDMS=trueREADPL4147945658/002/output.txt
        @@ -8,9 +8,10 @@
         my_test_code/dist/other_test_code-0.0.1-py3-none-any.whl
         
         >>> [CLI] bundle deploy --plan tmp.plan.json
        -Uploading .databricks/bundle/default/patched_wheels/my_test_code_my_test_code/my_test_code-0.0.3+[UNIX_TIME_NANOS]-py3-none-any.whl...
        -Uploading .databricks/bundle/default/patched_wheels/my_test_code_other_test_code/other_test_code-0.0.1+1577836800000000000-py3-none-any.whl...
        -Uploading my_test_code/dist/my_test_code-0.0.1-py3-none-any.whl...
        +Uploading .databricks/bundle/default/patched_wheels/my_test_code_my_test_code/my_test_code-0.0.1+[UNIX_TIME_NANOS][0]-py3-none-any.whl...
        +Uploading my_test_code/dist/my_test_code-0.0.2-py3-none-any.whl...
        +Uploading my_test_code/dist/my_test_code-0.0.3-py3-none-any.whl...
        +Uploading my_test_code/dist/other_test_code-0.0.1-py3-none-any.whl...
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/whl-dynamic-readplan/default/files...
         Updated jobs.my_job
         Resources: 0 created, 1 changed, 0 deleted, 0 unchanged
        @@ -18,13 +19,14 @@
         === Wheels the job references
         
         >>> print_requests.py --keep //jobs/reset
        -"/Workspace/Users/[USERNAME]/.bundle/whl-dynamic-readplan/default/artifacts/.internal/my_test_code-0.0.3+[UNIX_TIME_NANOS]-py3-none-any.whl"
        +"/Workspace/Users/[USERNAME]/.bundle/whl-dynamic-readplan/default/artifacts/.internal/my_test_code-0.0.3+[UNIX_TIME_NANOS][1]-py3-none-any.whl"
         "/Workspace/Users/[USERNAME]/.bundle/whl-dynamic-readplan/default/artifacts/.internal/other_test_code-0.0.1+1577836800000000000-py3-none-any.whl"
         "/Workspace/Users/[USERNAME]/.bundle/whl-dynamic-readplan/default/artifacts/.internal/my_test_code-0.0.1-py3-none-any.whl"
         
         === Wheels uploaded, the same as the job references
         
         >>> print_requests.py --sort //.internal/
        -"/api/2.0/workspace-files/import-file/Workspace/Users/[USERNAME]/.bundle/whl-dynamic-readplan/default/artifacts/.internal/my_test_code-0.0.1-py3-none-any.whl"
        -"/api/2.0/workspace-files/import-file/Workspace/Users/[USERNAME]/.bundle/whl-dynamic-readplan/default/artifacts/.internal/my_test_code-0.0.3+[UNIX_TIME_NANOS]-py3-none-any.whl"
        -"/api/2.0/workspace-files/import-file/Workspace/Users/[USERNAME]/.bundle/whl-dynamic-readplan/default/artifacts/.internal/other_test_code-0.0.1+1577836800000000000-py3-none-any.whl"
        +"/api/2.0/workspace-files/import-file/Workspace/Users/[USERNAME]/.bundle/whl-dynamic-readplan/default/artifacts/.internal/my_test_code-0.0.1+[UNIX_TIME_NANOS][0]-py3-none-any.whl"
        +"/api/2.0/workspace-files/import-file/Workspace/Users/[USERNAME]/.bundle/whl-dynamic-readplan/default/artifacts/.internal/my_test_code-0.0.2-py3-none-any.whl"
        +"/api/2.0/workspace-files/import-file/Workspace/Users/[USERNAME]/.bundle/whl-dynamic-readplan/default/artifacts/.internal/my_test_code-0.0.3-py3-none-any.whl"
        +"/api/2.0/workspace-files/import-file/Workspace/Users/[USERNAME]/.bundle/whl-dynamic-readplan/default/artifacts/.internal/other_test_code-0.0.1-py3-none-any.whl"
        
    acceptance_test.go:1180: 
        LOG.deploy: Uploading .databricks/bundle/default/patched_wheels/my_test_code_my_test_code/my_test_code-0.0.1+1795831890697027792-py3-none-any.whl...
        LOG.deploy: Uploading bundle files to /Workspace/Users/tester@databricks.com/.bundle/whl-dynamic-readplan/default/files...
        LOG.deploy: Current Deployment Version: http://127.0.0.1:40817/deployments/4000000000000083?version=1
        LOG.deploy: Created jobs.my_job
        LOG.deploy: Files: 16 uploaded, 0 deleted
        LOG.deploy: Resources: 1 created, 0 changed, 0 deleted, 0 unchanged
    acceptance_test.go:1180: 
        LOG.plan: Building my_test_code...
        LOG.plan: Building my_test_code...
        LOG.plan: Building my_test_code...

…x-readplan-dynamic-wheels

# Conflicts:
#	acceptance/bundle/artifacts/whl_dynamic_readplan/output.txt
#	acceptance/bundle/artifacts/whl_dynamic_readplan/script
#	acceptance/bundle/artifacts/whl_dynamic_readplan/test.toml
@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Integration test report

Commit: 849d983

Run: 46096424882

Env 💚​RECOVERED ✅​pass 🙈​skip Time
💚​ aws linux-2core-8gb 1 173 18 3:45
💚​ aws-windows-latest-4core-16gb 1 173 18 3:54
💚​ azure linux-2core-8gb 1 172 18 3:43
💚​ azure-windows-latest-4core-16gb 1 172 18 2:56
💚​ gcp linux-2core-8gb 1 173 18 4:38
💚​ gcp-windows-latest-4core-16gb 1 173 18 3:18
Test Name aws linux-2core-8gb aws-windows-latest-4core-16gb azure linux-2core-8gb azure-windows-latest-4core-16gb gcp linux-2core-8gb gcp-windows-latest-4core-16gb
💚​ TestAccept 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
Top 6 slowest tests (at least 2 minutes):
duration env testname
4:16 gcp linux-2core-8gb TestAccept
3:52 aws-windows-latest-4core-16gb TestAccept
3:28 azure linux-2core-8gb TestAccept
3:27 aws linux-2core-8gb TestAccept
3:16 gcp-windows-latest-4core-16gb TestAccept
2:55 azure-windows-latest-4core-16gb TestAccept

…x-readplan-dynamic-wheels

# Conflicts:
#	acceptance/bundle/artifacts/whl_dynamic_readplan/output.txt
#	acceptance/bundle/artifacts/whl_dynamic_readplan/test.toml
@denik
denik marked this pull request as ready for review November 28, 2026 02:24
@denik
denik requested review from a team as code owners November 28, 2026 02:24

@review-oss-bot review-oss-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review at 849d983. Each finding was verified against the code.

No blocking issues found. 2 non-blocking comment(s) below.

This PR makes LocalLibraryPaths (used only by bundle deploy --plan) keep only the latest version of each wheel, for both library globs and artifact file globs, and patch every wheel an artifact glob matches instead of only the first. That fixes the common case recorded in whl_dynamic_readplan. Two of the regressions you list in the description hold up when traced through the code. Each one ends in a successful deploy whose job or pipeline points at a wheel that was never uploaded. They're worth closing here, or at least pinning with a test, before the Badness note is removed.

Comment thread bundle/libraries/remote_path.go Resolved
Comment thread bundle/libraries/remote_path.go Resolved
denik and others added 2 commits November 28, 2026 03:14
…x-readplan-dynamic-wheels

# Conflicts:
#	acceptance/bundle/artifacts/whl_dynamic_readplan/test.toml
deploy --plan picks the upload set from the local files again, while
the plan recorded the names that existed at plan time. They differ when
the files change in between, and for references SwitchToPatchedWheels
does not rewrite, such as pipeline environment dependencies on a
dynamic_version wheel. Add each referenced file that the upload set
lacks, and fail before uploading anything when a referenced file has no
local counterpart.

Co-authored-by: Isaac <no-reply@databricks.com>
@denik
denik requested a review from andrewnester November 28, 2026 03:58

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants