Skip to content

acc: record deploy --select deleting the wheels of unselected resources - #8291

Draft
denik wants to merge 1 commit into
mainfrom
acc-select-unselected-libraries
Draft

denik wants to merge 1 commit into
mainfrom
acc-select-unselected-libraries

Conversation

@denik

@denik denik commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

Changes

Three acceptance tests under acceptance/bundle/select record what plain bundle deploy --select does to the artifact upload directory (${workspace.artifact_path}/.internal) and to the resources it leaves out. They record today's behavior; the wrong parts are marked with Badness notes in the scripts, and the unspecified part with an Undefined note.

  • unselected_libraries: jobs b (task libraries), c (environments[].spec.dependencies) and pipeline p (environment.dependencies) run ./dist/*.whl, deployed at 0.0.1. After 0.0.2 is built and job a changes, deploy --select jobs.a deletes .internal and uploads only 0.0.2. b, c and p still name 0.0.1, which no longer exists, so their next run fails to install it. A full deploy moves them to 0.0.2. Cloud = true, and the last commit names it for the AWS run.
  • unselected_dynamic_wheel: the same with a dynamic_version artifact. The uploaded name carries the wheel's mtime, so no version bump is needed: touching the wheel and deploying one job is enough to break the other.
  • unselected_wheel_wrapper: with experimental.python_wheel_wrapper, the file sync (always complete, also with --select) rewrites the wrapper notebook of the unselected job b to install 0.0.2, which is uploaded. b therefore keeps working, but runs a wheel that --select did not deploy. Recorded as Undefined.

Why

artifacts.CleanUp (bundle/artifacts/upload.go) empties .internal before every upload, and phases.uploadLibraries runs it unconditionally. --select only filters the plan afterwards, so a partial deploy deletes the files that the unselected resources still reference, and uploads only what the current local files produce. Introduced in #5413, which added --select. #8157 fixed the same problem for deploy --plan with a partial plan (uploadPlanLibraries keeps the files when plan.NotSelected > 0, see bundle/deploy/readplan/select-unselected-wheel) and left plain --select unchanged.

Every library collectLocalLibraries uploads is affected: job task and for_each_task libraries (whl, jar), job environment dependencies, pipeline environment and testing.environment dependencies, cluster libraries, AI Runtime code_source_path archives, and artifact files. Synced files (notebooks, the wheel-wrapper notebooks) are not: the sync is complete on every deploy.

Dashboard: none, the tests are new.

Tests

The three tests, both DMS variants, pass locally. unselected_libraries also passed against an AWS workspace (see the comment below for the run).

Gaps and risks

Test-only change, no production code. Risk: low. The dynamic-version test relies on touch changing the wheel's mtime, which the patched version is derived from; the two patched names are distinct on every platform the suite runs on because a build happened in between.

🤖 AI agent (claude-fable-5-1, isaac_claude)

This pull request and its description were written by Isaac.

Three tests under acceptance/bundle/select record what plain `bundle deploy
--select` does to the artifact upload directory and to the resources it leaves
out: the directory is emptied and only the current local libraries are
uploaded, so unselected jobs and pipelines keep naming deleted files.

aws: TestAccept/bundle/select/unselected_libraries

Co-authored-by: Isaac <no-reply@databricks.com>
@github-actions github-actions Bot added DABs DABs related issues test-only-fix PRs that update failing of flaky tests without changing CLI code. labels Dec 2, 2026
@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

Regression test report ✅

Commit: 02ec66fcc | Workflow run

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

6 tests: regression=0 unreleased=0 coverage=6 failing=0
test branch main (21589ba) latest (v1.28.0)
TestAccept/bundle/select/unselected_dynamic_wheel/DMS= ✅ ✅ ✅
TestAccept/bundle/select/unselected_dynamic_wheel/DMS=true ✅ ✅ ✅
TestAccept/bundle/select/unselected_libraries/DMS= ✅ ✅ ✅
TestAccept/bundle/select/unselected_libraries/DMS=true ✅ ✅ ✅
TestAccept/bundle/select/unselected_wheel_wrapper/DMS= ✅ ✅ ✅
TestAccept/bundle/select/unselected_wheel_wrapper/DMS=true ✅ ✅ ✅
@denik

denik commented Dec 2, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Cloud run: TestAccept/bundle/select/unselected_libraries ran locally against an AWS workspace with the branch's binary. Both variants pass with the same output as the testserver run:

--- PASS: TestAccept/bundle/select/unselected_libraries/DMS= (22.27s)
--- PASS: TestAccept/bundle/select/unselected_libraries/DMS=true (24.63s)

So the real backend behaves the same: the recursive delete of .internal removes the wheel the unselected job and pipeline still name, and jobs get / pipelines get keep returning that path.

AI agent (claude-fable-5-1, isaac_claude)

@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

✅ Integration test report

Commit: 02ec66f

Run: 46848145723

Env 💚​RECOVERED ✅​pass 🙈​skip Time
💚​ aws linux-2core-8gb 1 63 8 2:18
💚​ aws-windows-latest-4core-16gb 1 63 8 3:54
💚​ azure linux-2core-8gb 1 63 8 2:26
💚​ azure-windows-latest-4core-16gb 1 63 8 3:39
💚​ gcp linux-2core-8gb 1 63 8 2:07
💚​ gcp-windows-latest-4core-16gb 1 63 8 3:51
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 3 slowest tests (at least 2 minutes):
duration env testname
3:09 aws-windows-latest-4core-16gb TestAccept
3:03 gcp-windows-latest-4core-16gb TestAccept
2:59 azure-windows-latest-4core-16gb TestAccept

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

Labels

DABs DABs related issues factory-generated test-only-fix PRs that update failing of flaky tests without changing CLI code.

2 participants