Skip to content

bundle: close the migration WAL before removing the temp state - #6977

Draft
denik wants to merge 1 commit into
mainfrom
denik/migrate-discard-temp-state
Draft

denik wants to merge 1 commit into
mainfrom
denik/migrate-discard-temp-state

Conversation

@denik

@denik denik commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

When converting Terraform state to the direct engine failed after the temp state's WAL was opened, the conversion returned with the WAL handle still open, so removing the temp files failed on Windows and left them until the next run. Adds DeploymentState.Discard (close without persisting, then remove the state file and its WAL) and dstate.RemoveFiles, and uses them for the auto-migration's temp state. #6973 will reuse Discard for bundle deployment migrate.

This pull request and its description were written by Isaac.

@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 94e41e5

Run: 38872908165

Env ✅​pass 🙈​skip Time
✅​ aws linux-2core-8gb 276 15 5:30
✅​ aws-windows-latest-4core-16gb 278 13 3:33
✅​ azure linux-2core-8gb 275 15 5:25
✅​ azure-windows-latest-4core-16gb 277 13 3:27
✅​ gcp linux-2core-8gb 276 15 5:13
✅​ gcp-windows-latest-4core-16gb 278 13 3:26
Top 6 slowest tests (at least 2 minutes):
duration env testname
3:54 aws linux-2core-8gb TestAccept
3:52 gcp linux-2core-8gb TestAccept
3:51 azure linux-2core-8gb TestAccept
3:26 aws-windows-latest-4core-16gb TestAccept
3:22 azure-windows-latest-4core-16gb TestAccept
3:19 gcp-windows-latest-4core-16gb TestAccept

@denik
denik force-pushed the denik/migrate-discard-temp-state branch 2 times, most recently from 1941ff7 to 9788566 Compare October 14, 2026 14:34
A failed Terraform state conversion returned with the temp state's WAL still
open, so removing it failed on Windows and left the files until the next run.
Add DeploymentState.Discard (close without persisting, remove the file and WAL)
and dstate.RemoveFiles, and use them for the migration's temp state.

Co-authored-by: Isaac <no-reply@databricks.com>
@denik
denik force-pushed the denik/migrate-discard-temp-state branch from 9788566 to 94e41e5 Compare October 16, 2026 08:18

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants