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: 1941ff7

Run: 38239238424

Env ✅​pass 🙈​skip Time
✅​ aws linux-2core-8gb 276 16 5:45
✅​ aws-windows-latest-4core-16gb 278 14 3:47
✅​ azure linux-2core-8gb 275 16 5:53
✅​ azure-windows-latest-4core-16gb 277 14 3:28
✅​ gcp linux-2core-8gb 276 16 5:27
✅​ gcp-windows-latest-4core-16gb 278 14 3:52
Top 6 slowest tests (at least 2 minutes):
duration env testname
3:56 gcp linux-2core-8gb TestAccept
3:54 azure linux-2core-8gb TestAccept
3:50 gcp-windows-latest-4core-16gb TestAccept
3:47 aws linux-2core-8gb TestAccept
3:45 aws-windows-latest-4core-16gb TestAccept
3:00 azure-windows-latest-4core-16gb TestAccept

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 4380709 to 1941ff7 Compare October 12, 2026 10:53

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