bundle run on an app fails with "not in RUNNING state" when the app's compute is UPDATING
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 76/100
Línea de trabajo
Start with bundle/run/app.go, especially appRunner.Run, which the issue identifies as the failing state check. Trace how it handles compute states and how WaitGetAppActive responds when compute stops during startup. Done when bundle run <app> waits through transient states and handles a STARTING compute that returns to STOPPED, with tests covering these cases.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the issue
databricks bundle run <app> can fail on a newly created app because it checks the app's compute state only once. It starts a compute that is STOPPED or ERROR and waits on one that is STARTING. In any other state, such as UPDATING, it tries to deploy straight away and fails with "not in RUNNING state". The relevant code is bundle/run/app.go, appRunner.Run. It is the same in v1.16.1 and v1.25.0.
There is a related case in the same code. A new app's compute can go from STARTING back to STOPPED on its own. If bundle run reads it during STARTING, it waits for ACTIVE (WaitGetAppActive), and that wait fails when the compute stops instead.
Steps to reproduce the behavior
The failure is intermittent, because it depends on the compute's state at the moment bundle run reads it.
- Define an app in a bundle, with a job that runs before the app is started.
- Run
databricks bundle deploy -t <target>, which creates the app. - Run the job with
databricks bundle run <job> -t <target>. In our case it took about 50 seconds. - Run
databricks bundle run <app> -t <target>. - Sometimes the compute is UPDATING at step 4, and the command fails. In our case this happened in 1 of 4 deploys of a new app.
Polling databricks apps get <app> -o json every 3 seconds during a new-app deploy showed the compute go from STARTING to STOPPED about 20 seconds after bundle deploy created the app.
Expected Behavior
bundle run <app> waits until the compute settles in ACTIVE, STOPPED or ERROR before it starts or deploys the app. It should tolerate transient states such as UPDATING and STOPPING, and a STARTING compute that ends STOPPED.
Actual Behavior
✓ Getting the status of the app my-app
✓ App is in UNAVAILABLE state
✓ App compute is in UPDATING state
Error: Cannot deploy app my-app as it is not in RUNNING state. Please start the app first.
OS and CLI version
Databricks CLI v1.16.1 on Linux, run non-interactively in a deployment pipeline as a service principal, against an AWS workspace. The code path is unchanged in v1.25.0.
Is this a regression?
Not known. We have only run v1.16.1. bundle/run/app.go is the same in v1.16.1 and v1.25.0.
Debug Logs
We don't have a debug-level log of a failing run. The failure is intermittent, and it happened in an unattended pipeline. The output above is the command's normal output, with the app name redacted.
Workaround we use: before bundle run <app>, poll databricks apps get <app> -o json until .compute_status.state is ACTIVE, STOPPED or ERROR, or the status is absent, with a time limit. Then run bundle run <app>.
- Lenguaje dominante
- Go
- Estrellas
- 427
- Forks
- 267
- Merge medio
- 2 d 1 h
- PR fusionados (30 d)
- 233
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de databricks/cli
-
Apps commands only accept relative path to app.ymlPosiblemente ocupada @yuri-rod la tomó hace 38 días. AbiertoCLI
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
databricks/cli#6910 ·
Los mantenedores suelen responder en 1 día
-
DABs
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
databricks/cli#6670 · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
Bump vulnerable dependencies workflow is failingPosiblemente ocupada @shreyas-goenka la tomó hoy. Abiertobump-vuln-deps-failure
databricks/cli#7531 · 1 comentario · 7 asignados ·
Los mantenedores suelen responder en 1 día
-
Bundle deploy of an AI/BI dashboard breaks viewers' private bookmarks (UI save + publish does not)Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
databricks/cli#7419 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 66/100
databricks/cli#7387 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de databricks/cli
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
coder/openstorage#807 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
coder/coder-logstream-kube#255 · 1 comentario ·
-
kind/features
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
TencentBlueKing/bk-nodemgr#3991 ·
Los mantenedores suelen responder en 1 día