Skip to content

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

Open
denik wants to merge 1 commit into
mainfrom
denik/bind-state-open-error
Open

direct: fail bind when the deployment state cannot be read#6331
denik wants to merge 1 commit 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.

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
@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 70ec539

Run: 32352562370

Env 🔄​flaky 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
💚​ aws linux 1 4 274 1163 5:30
💚​ aws windows 1 4 276 1161 3:24
💚​ azure linux 1 4 273 1163 6:47
💚​ azure windows 1 4 275 1161 3:43
🔄​ gcp linux 2 1 4 272 1163 5:48
🔄​ gcp windows 8 1 4 268 1161 4:52
15 interesting tests: 10 flaky, 4 SKIP, 1 RECOVERED
Test Name aws linux aws windows azure linux azure windows gcp linux gcp windows
💚​ TestAccept 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
🙈​ TestAccept/bundle/invariant/no_drift 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_endpoints/drift/recreated_same_name 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_indexes/recreate/embedding_dimension 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/ssh/connection 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🔄​ TestFsCpDirToDirWithOverwriteFlag ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f
🔄​ TestFsCpDirToDirWithOverwriteFlag/uc-volumes_to_uc-volumes ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f
🔄​ TestFsCpFileToDir ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f
🔄​ TestFsCpFileToDir/local_to_uc-volumes ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f
🔄​ TestFsCpFileToNonExistentDir ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f
🔄​ TestFsCpFileToNonExistentDir/local_to_uc-volumes ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f
🔄​ TestFilerReadDir ✅​p ✅​p ✅​p ✅​p 🔄​f ✅​p
🔄​ TestFilerReadDir/files ✅​p ✅​p ✅​p ✅​p 🔄​f ✅​p
🔄​ TestFilerReadWrite ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f
🔄​ TestFilerReadWrite/files ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f
Top 6 slowest tests (at least 2 minutes):
duration env testname
3:50 aws linux TestAccept
3:48 gcp linux TestAccept
3:47 azure linux TestAccept
3:15 aws windows TestAccept
3:10 azure windows TestAccept
3:05 gcp windows TestAccept

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.

3 participants