Skip to content

direct: fail bind when the deployment state cannot be read - #6331

Merged
denik merged 5 commits into
mainfrom
denik/bind-state-open-error
Oct 14, 2026
Merged

denik merged 5 commits into
mainfrom
denik/bind-state-open-error

Conversation

@denik

@denik denik commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

bundle deployment bind treated any failure to open the state as "resource not bound": it skipped the already-managed check, bound over state whose ownership was never verified, and overwrote it — while reporting success. A crashed deploy that left a WAL behind was enough to trigger this.

A state file that does not exist opens as an empty one, so the absence of a binding is already covered by a successful open. Return the error instead.

Tests

New acceptance test that deploys a job, leaves a WAL from a different lineage next to the state, and binds: it used to print "Successfully bound" and replace the state file.

@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Aug 20, 2026 •

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 6a20618

Run: 38559522087

Env ✅​pass 🙈​skip Time
✅​ aws linux-2core-8gb 276 16 4:18
✅​ aws-windows-latest-4core-16gb 278 14 4:52
✅​ azure linux-2core-8gb 275 16 4:21
✅​ azure-windows-latest-4core-16gb 277 14 3:15
✅​ gcp linux-2core-8gb 276 16 4:37
✅​ gcp-windows-latest-4core-16gb 278 14 3:45
Top 3 slowest tests (at least 2 minutes):
duration env testname
4:48 aws-windows-latest-4core-16gb TestAccept
3:11 gcp-windows-latest-4core-16gb TestAccept
3:01 azure-windows-latest-4core-16gb TestAccept

@denik
denik force-pushed the denik/bind-state-open-error branch from 70ec539 to 134ca03 Compare August 24, 2026 09:35
denik and others added 3 commits October 14, 2026 11:18
Bind treated any failure to open the state as "resource not bound": it
skipped the already-managed check and then bound over state whose
ownership was never verified, overwriting it. A crashed deploy that left a
WAL behind was enough to trigger this, and bind still reported success.

A state file that does not exist opens as an empty one, so absence of a
binding is already covered; return the error instead.

Co-authored-by: Isaac
Existence only shows a file is there; diff.py shows bind left the WAL byte
for byte as it was, so a truncated or rewritten WAL fails the test.

Co-authored-by: Isaac
Co-authored-by: Isaac <no-reply@databricks.com>
@denik
denik force-pushed the denik/bind-state-open-error branch from 7748fcb to 4846972 Compare October 14, 2026 11:27
@denik
denik requested review from a team as code owners October 14, 2026 11:27
@denik
denik requested a review from pietern October 14, 2026 11:27
@github-actions github-actions Bot added the DABs DABs related issues label Oct 14, 2026
denik and others added 2 commits October 14, 2026 11:30
Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
@denik
denik added this pull request to the merge queue Oct 14, 2026
Merged via the queue into main with commit af05206 Oct 14, 2026
26 checks passed
@denik
denik deleted the denik/bind-state-open-error branch October 14, 2026 13:00
deco-sdk-tagging Bot added a commit that referenced this pull request Oct 14, 2026
## Release v1.21.0

### CLI

 * Support pipeline IDs in `pipelines history`. ([#6995](#6995))
 * Show a hint for previewing more rows in `pipelines show`. ([#6995](#6995))
 * `databricks environments setup-local` now uses the environment in `UV_PROJECT_ENVIRONMENT` when it is set, as `uv sync` does. ([#7026](#7026))
 * `databricks environments setup-local` now supports uv workspace members: it uses the shared `.venv` at the workspace root and writes the dependency constraints to the root `pyproject.toml`. ([#7018](#7018))

### AI Runtime

 * Limit `databricks air run` submission preflight validation to one five-second attempt before continuing when the service is unavailable. ([#6994](#6994))

### Bundles

 * Bundle file uploads now use the multipart `POST /api/2.0/workspace/import` endpoint instead of the deprecated `POST /api/2.0/workspace-files/import-file`, raising the per-workspace upload rate limit and improving deploy throughput under concurrency. ([#6149](#6149))
 * Diagnostic paths now quote map keys that are not identifiers, e.g. `resources.jobs['${var.env}_job']`. ([#6980](#6980))
 * No longer include `CLAUDE.md` in the bundle templates, now that Claude supports `AGENTS.md`. ([#7000](#7000))
 * Fix `bundle deployment bind` silently binding over a deployment state it could not read, which could take over a resource that was already managed by the bundle. ([#6331](#6331))
 * `databricks bundle deploy`, `databricks bundle sync` and `databricks sync` now retry file, library, state and metadata uploads that fail with a transient server error (5xx or 408), instead of failing. ([#7014](#7014))
 * `databricks bundle deploy`, `databricks bundle sync` and `databricks sync` now retry the workspace path check (`workspace/get-status`) when it fails with a transient server error (5xx or 408) or an HTTP/2 `REFUSED_STREAM`, instead of failing. ([#7044](#7044))
 * Fixed `experimental.immutable_folder` failing validation for targets with `mode: development` ("file_path must start with '~/' or contain the current username"). ([#7027](#7027))
 * Fixed `experimental.immutable_folder` failing with `experimental.deployment_history` ("workspace_info.file_path must be an absolute workspace path") and failing `bundle validate` when top-level `permissions` are set. ([#7001](#7001))
 * Translate relative `.env` file paths in a job's `environment_variables[].spec.files` to their deployed workspace locations. ([#6985](#6985))
 * Resolve job `project_environment` paths relative to the YAML file that defines them. ([#6983](#6983))

### Dependency Updates

 * Bump Go toolchain to 1.26.9. ([#6996](#6996))
 * Update Go SDK to 0.188.0. ([#7038](#7038))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DABs DABs related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants