databricks-cli/bundle/run
Andrew Nester dd554412a6
Retry app deployment if there is an active deployment in progress (#2153)
## Changes
If before running an app, the app was stopped with an active deployment,
then Apps backend start it and does the auto-deploy of the last active
deployment. In such cases StartApp API won't return any active or
pending deployments in its response but doing the deploy immediately
after the start might result in the error `Cannot deploy app *** as
there is an active deployment in progress`.

From DABs side, we have to do a new deployment on every `bundle run`
(command which start the app and does deployment) because local files in
bundle might have been changed and users expect to have the app running
with new code.

Thus this PR works around the error by catching “deployment in progress”
error, getting any active / pending deployments, waits for them to
finish and start the new deployment again. If 2nd attempts fails, the
whole command fails.

## Tests
Added unit test.
2025-01-15 12:51:06 +01:00
..
output Enable perfsprint linter and apply autofix (#2071) 2025-01-07 10:49:23 +00:00
progress Enable perfsprint linter and apply autofix (#2071) 2025-01-07 10:49:23 +00:00
app.go Retry app deployment if there is an active deployment in progress (#2153) 2025-01-15 12:51:06 +01:00
app_test.go Retry app deployment if there is an active deployment in progress (#2153) 2025-01-15 12:51:06 +01:00
args.go Processing and completion of positional args to bundle run (#1120) 2024-04-22 11:50:13 +00:00
args_test.go Processing and completion of positional args to bundle run (#1120) 2024-04-22 11:50:13 +00:00
job.go Enable perfsprint linter and apply autofix (#2071) 2025-01-07 10:49:23 +00:00
job_args.go Enable gofumpt and goimports in golangci-lint (#1999) 2024-12-12 10:28:42 +01:00
job_args_test.go Processing and completion of positional args to bundle run (#1120) 2024-04-22 11:50:13 +00:00
job_options.go Enable perfsprint linter and apply autofix (#2071) 2025-01-07 10:49:23 +00:00
job_options_test.go Group bundle run flags by job and pipeline types (#1174) 2024-02-06 14:51:02 +00:00
job_test.go Enable testifylint and fix the issues (#2065) 2025-01-02 12:03:41 +01:00
options.go Make sure grouped flags are added to the command flag set (#1180) 2024-02-07 10:27:13 +00:00
pipeline.go Enable perfsprint linter and apply autofix (#2071) 2025-01-07 10:49:23 +00:00
pipeline_options.go Add `--validate-only` flag to run validate-only pipeline update (#1251) 2024-03-04 08:38:32 +00:00
pipeline_options_test.go Add `--validate-only` flag to run validate-only pipeline update (#1251) 2024-03-04 08:38:32 +00:00
pipeline_test.go Remove unnecessary GET call in pipeline runner (#1850) 2024-12-31 09:51:13 +00:00
runner.go Added support for Databricks Apps in DABs (#1928) 2025-01-13 16:43:48 +00:00
runner_test.go Reuse resource resolution code for the run command (#1858) 2024-10-24 13:24:30 +00:00