databricks-cli/bundle/phases
shreyas-goenka e6241e196f
Move to a single prompt during bundle destroy (#1583)
## Changes
Right now we ask users for two confirmations when destroying a bundle.
One to destroy the resources and one to delete the files. This PR
consolidates the two prompts into one.

## Tests
Manually

Destroying a bundle with no resources:
```
➜  bundle-playground git:(master) ✗ cli bundle destroy
All files and directories at the following location will be deleted: /Users/shreyas.goenka@databricks.com/.bundle/bundle-playground/default

Would you like to proceed? [y/n]: y
No resources to destroy
Updating deployment state...
Deleting files...
Destroy complete!
```

Destroying a bundle with no remote state:
```
➜  bundle-playground git:(master) ✗ cli bundle destroy
No active deployment found to destroy!
```

When a user cancells a deployment:
```
➜  bundle-playground git:(master) ✗ cli bundle destroy
The following resources will be deleted:
  delete job job_1
  delete job job_2
  delete pipeline foo

All files and directories at the following location will be deleted: /Users/shreyas.goenka@databricks.com/.bundle/bundle-playground/default

Would you like to proceed? [y/n]: n
Destroy cancelled!
```

When a user destroys resources:
```
➜  bundle-playground git:(master) ✗ cli bundle destroy
The following resources will be deleted:
  delete job job_1
  delete job job_2
  delete pipeline foo

All files and directories at the following location will be deleted: /Users/shreyas.goenka@databricks.com/.bundle/bundle-playground/default

Would you like to proceed? [y/n]: y
Updating deployment state...
Deleting files...
Destroy complete!
```
2024-07-24 13:02:19 +00:00
..
bind.go Added `bundle deployment bind` and `unbind` command (#1131) 2024-02-14 18:04:45 +00:00
build.go Split artifact cleanup into prepare step before build (#1618) 2024-07-24 09:13:49 +00:00
deploy.go Don't merge-in remote resources during depolyments (#1432) 2024-05-15 12:41:44 +00:00
destroy.go Move to a single prompt during bundle destroy (#1583) 2024-07-24 13:02:19 +00:00
initialize.go Replace `vfs.Path` with extension-aware filer when running on DBR (#1556) 2024-07-03 11:55:42 +00:00
load.go Load bundle configuration from mutator (#1318) 2024-03-27 10:49:05 +00:00
phase.go Return `diag.Diagnostics` from mutators (#1305) 2024-03-25 14:18:47 +00:00