Skip to content

direct: tolerate DELETING apps at apply-time delete#6061

Open
denik wants to merge 1 commit into
mainfrom
denik/apps-delete-deleting-apply
Open

direct: tolerate DELETING apps at apply-time delete#6061
denik wants to merge 1 commit into
mainfrom
denik/apps-delete-deleting-apply

Conversation

@denik

@denik denik commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #6045, which consulted the new IsGone hook only at plan time. A saved plan (deploy --plan) records Gone=false if the app was still ACTIVE when planned; if it enters DELETING before apply — a concurrent delete, or an interrupted destroy — apply calls DoDelete on the stale entry and the backend rejects the second delete with 400 BAD_REQUEST.

On an otherwise-fatal delete error, re-read the resource and consult IsGone (and IsMissing); treat it as already deleted if so. Applies to both Delete and Recreate. Detection re-reads rather than matching the error because the backend returns a generic 400 with no distinct SDK sentinel.

IsGone is consulted at plan time, but a saved plan (deploy --plan) records
Gone=false if the app was still ACTIVE when planned. If the app enters
DELETING before apply -- a concurrent delete, or an interrupted destroy --
apply calls DoDelete on the stale entry and the backend rejects the second
delete with 400 BAD_REQUEST.

On an otherwise-fatal delete error, re-read the resource and consult IsGone
(and IsMissing); treat it as already deleted if so. Applies to both Delete
(destroy / delete-by-removal) and Recreate. Detection re-reads rather than
matching the error because the backend returns a generic 400 with no
distinct SDK sentinel.

Co-authored-by: Isaac
@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 03fc5ef

Run: 30085540690

Env 🔄​flaky 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
🔄​ aws linux 1 4 4 321 1060 15:08
🔄​ aws windows 2 4 4 322 1058 10:44
💚​ azure linux 4 4 322 1059 11:22
🔄​ azure windows 1 4 4 323 1057 10:59
💚​ gcp linux 1 5 321 1061 12:19
🔄​ gcp windows 1 1 5 322 1059 8:53
12 interesting tests: 4 RECOVERED, 4 SKIP, 4 flaky
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
🔄​ TestSyncIncrementalFileOverwritesFolder 🔄​f ✅​p ✅​p 🔄​f ✅​p ✅​p
🔄​ TestSyncIncrementalFileSync ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f
🔄​ TestSyncIncrementalSyncPythonNotebookToFile ✅​p 🔄​f ✅​p ✅​p ✅​p ✅​p
🔄​ TestSyncNestedFolderSync ✅​p 🔄​f ✅​p ✅​p ✅​p ✅​p
💚​ TestFetchRepositoryInfoAPI_FromRepo 💚​R 💚​R 💚​R 💚​R 🙈​S 🙈​S
💚​ TestFetchRepositoryInfoAPI_FromRepo/root 💚​R 💚​R 💚​R 💚​R
💚​ TestFetchRepositoryInfoAPI_FromRepo/subdir 💚​R 💚​R 💚​R 💚​R
Top 23 slowest tests (at least 2 minutes):
duration env testname
3:30 aws windows TestAccept
3:25 azure windows TestAccept
3:23 gcp windows TestAccept/bundle/deploy/mlops-stacks/DATABRICKS_BUNDLE_ENGINE=direct
3:17 gcp windows TestAccept
3:13 aws linux TestFilerWorkspaceFilesExtensionsStat
3:12 aws windows TestAccept/bundle/deploy/mlops-stacks/DATABRICKS_BUNDLE_ENGINE=terraform
3:00 azure windows TestFilerWorkspaceFilesExtensionsStat
2:56 gcp windows TestAccept/bundle/deploy/mlops-stacks/DATABRICKS_BUNDLE_ENGINE=terraform
2:51 gcp windows TestFilerRecursiveDelete/workspace_files_extensions
2:47 aws windows TestFilerWorkspaceFilesExtensionsStat
2:45 aws linux TestFilerWorkspaceFilesExtensionsRead
2:42 gcp linux TestAccept/bundle/deploy/mlops-stacks/DATABRICKS_BUNDLE_ENGINE=terraform
2:38 aws windows TestFilerReadWrite/workspace_files
2:26 gcp linux TestAccept/bundle/deploy/mlops-stacks/DATABRICKS_BUNDLE_ENGINE=direct
2:24 aws linux TestFilerWorkspaceFilesExtensionsReadDir
2:24 azure windows TestAccept/bundle/deploy/mlops-stacks/DATABRICKS_BUNDLE_ENGINE=terraform
2:24 aws linux TestAccept/bundle/deploy/mlops-stacks/DATABRICKS_BUNDLE_ENGINE=direct
2:18 azure linux TestAccept/bundle/deploy/mlops-stacks/DATABRICKS_BUNDLE_ENGINE=terraform
2:16 gcp linux TestFilerWorkspaceNotebook/sqlNb.sql
2:13 aws windows TestFilerReadWrite/workspace_files_extensions
2:11 azure windows TestFilerWorkspaceFilesExtensionsRead
2:05 aws windows TestFilerWorkspaceNotebook/sqlJupyterNotebook.ipynb
2:00 aws windows TestSyncFullFileSync

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