Skip to content

Fix uploading libraries when running bundle deploy --plan - #6682

Merged
andrewnester merged 8 commits into
mainfrom
fix/libraries-upload-plan
Sep 17, 2026
Merged

andrewnester merged 8 commits into
mainfrom
fix/libraries-upload-plan

Conversation

@andrewnester

Copy link
Copy Markdown
Contributor

Changes

Fix uploading libraries when running bundle deploy --plan

Why

Previously bundles skipped uploading libraries when reading from existing plan which made plans not really reusable

Tests

Covered by acceptance test

Comment thread cmd/bundle/utils/process.go Resolved
@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 6a8f23b

Run: 35201296869

Env ✅​pass 🙈​skip Time
✅​ aws linux 276 16 4:05
✅​ aws windows 278 14 3:52
✅​ azure linux 275 16 4:08
✅​ azure windows 277 14 3:40
✅​ gcp linux 276 16 4:26
✅​ gcp windows 278 14 3:34
Top 3 slowest tests (at least 2 minutes):
duration env testname
3:49 aws windows TestAccept
3:38 azure windows TestAccept
3:31 gcp windows TestAccept

@andrewnester
andrewnester requested a review from denik September 15, 2026 11:57
Comment thread bundle/phases/build.go Resolved
Comment thread bundle/phases/build.go Resolved

@Sankalp-Mittal Sankalp-Mittal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@andrewnester
andrewnester added this pull request to the merge queue Sep 17, 2026
Merged via the queue into main with commit 27eaa3e Sep 17, 2026
32 checks passed
@andrewnester
andrewnester deleted the fix/libraries-upload-plan branch September 17, 2026 09:51
Sankalp-Mittal added a commit that referenced this pull request Sep 21, 2026
Fix uploading libraries when running bundle deploy --plan (#6682) landed on
main, so the local wheel is now uploaded and rewritten by both bundle deploy
and bundle deploy --plan. Restore EnvMatrix.READPLAN on clusters/libraries and
clusters/libraries-content-change (removed while the bug stood) and record the
interesting slice of the plan:

- libraries: the plan carries the wheel rewritten to its uploaded .internal/ path.
- libraries-content-change: a content-only change plans as "skip" (the known
  limitation the test already encodes).

Delete the libraries-readplan-not-uploaded tripwire; the behaviour it pinned is
fixed, so its golden now shows the wheel being uploaded.

Co-authored-by: Isaac <no-reply@databricks.com>
antonyprasad-db pushed a commit to antonyprasad-db/cli that referenced this pull request Oct 1, 2026
…6873)

## Changes
- Enable `EnvMatrix.READPLAN = ["", "1"]` on the
`acceptance/bundle/artifacts` tests that deploy and upload libraries,
using the standard `bundle plan -o json > tmp.plan.json` + `bundle
deploy $(readplanarg tmp.plan.json)` pattern.
- `deploy --plan` skips the build, so it doesn't print `Building ...`.
Tests that build a wheel send deploy output to `LOG.deploy` and assert
the upload with `contains.py` (same as
`bundle/resources/clusters/libraries`). The uploaded paths are still
checked through the recorded requests.
- `whl_change_version` is left unchanged: with a saved plan, deploy
uploads every wheel matching `./dist/*.whl`, so its output differs from
a regular deploy by design.

## Why
Follow-up to databricks#6490 / databricks#6682. Running the existing artifact upload tests
with READPLAN covers the saved-plan library upload path across many
configurations, alongside `deploy/readplan/whl-upload`. Checked locally:
reverting the databricks#6682 upload path in `bundle/phases/deploy.go` makes the
READPLAN=1 variants fail.

## Tests
`go test ./acceptance -run 'TestAccept/bundle/artifacts'` passes for all
variants.

This pull request and its description were written by Isaac.

---------

Co-authored-by: Isaac <no-reply@databricks.com>
apeforest pushed a commit to apeforest/cli that referenced this pull request Nov 25, 2026
…icks#7920)

## Changes
Correct the `Badness` notes in the deploy-related acceptance tests
(`bundle/resource_deps`, `bundle/deploy`, `bundle/artifacts`,
`bundle/migrate`, `bundle/dms`) so they match what the expected output
records today. This is a one-time scan of existing tests; only
`test.toml` lines and script comments change, no outputs.

Removed (fixed or no longer true):
- `artifacts/globs_in_files_in_include`: fixed in databricks#2540. Globs resolve
against `resources/` from every cwd (`"source":
"[TEST_TMP_DIR]/resources/a1.txt"` in all three runs).
- `deploy/readplan/whl-not-uploaded/test.toml`: the bug was fixed and
the test moved to `readplan/whl-upload` in databricks#6682, which left only this
test.toml behind.
- `resource_deps/jobs_update/script`: "output should not be different
per engine". Terraform left the matrix in databricks#6877, and there is one output
file.
- `migrate/command/dashboards/script`: said the plan shows `recreate`,
but the next lines show `Plan: ... 1 unchanged`.

Updated (accurate but stale or vague):
- `artifacts/artifact_path_with_volume/volume_not_deployed`: says what
fails (`volume ... does not exist` on the first deploy) and why
(artifacts upload before resources are created).
- `deploy/mlops-stacks`: names the two warnings: `expected a string
value, found null` at `targets.dev.workspace.host` and `unknown field:
description` at `resources.experiments.experiment`.
- `resource_deps/bad_syntax`: `${resources.volumes.bar.bad..syntax}` is
not reported. Validate, plan and deploy all accept it, and deploy
succeeds (`Unexpected success`).
- `resource_deps/loop_self`: `Validation OK!`, then files uploaded
before `cycle detected`.
- `resource_deps/missing_ingestion_definition`: dropped the Terraform
half. Direct creates `pipelines.foo`, then fails with
`ingestion_definition: cannot access nil value`.
- `resource_deps/missing_map_key`: adds that `jobs.test` is created
before `key "missing_tag" not found in map`.
- `resource_deps/non_existent_field`: "could be nicer" was vague. The
error names internal types (`dresources.VolumeState`,
`catalog.VolumeInfo`).
- `resource_deps/unicode_reference`: the old text described the fix
rather than a problem. The real gap is that nothing recorded shows the
unicode reference resolving: `RecordRequests = false`, and `bundle
summary` prints `Name: ${resources.jobs.变量.id}` because it never
resolves resource references, for ASCII keys too.
- `migrate/command/default-python/script` (first note): the plan no
longer has `num_workers` changes, only `libraries[0].whl`.

Added:
- `dms/empty-grants`: the recorded `PATCH
.../operations/schemas.foo.grants` without a state field is the known
bug (the real service rejects it). It is the same bug as the
`grants/schemas/remove_all` Badness. The Badness is now its only
description, and the comment keeps just the `Cloud = false` reason.
- Comments: `migrate/command/dashboards` keeps the databricks#3966 link on the
commented-out recreate steps; removed the stale per-engine comment in
`resource_deps/jobs_update`.

Kept as accurate: `deploy/files/out-of-band-delete`,
`resource_deps/loop_jobs`,
`resource_deps/preset_tags_not_applied_to_whole_map_reference`,
`migrate/command/default-python/script` (second note).

## Why
Stale or vague Badness misleads readers and hides which tests record
real bugs.

## Tests
All touched tests pass locally (Badness does not affect how a test
runs). No outputs change.

Dashboard: none. This does not fix a failing test or error.

AI agent (opus5.5, isaac_claude)

This pull request and its description were written by Isaac.

---------

Co-authored-by: Isaac <no-reply@databricks.com>
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.

4 participants