bundle run on an app fails with "not in RUNNING state" when the app's compute is UPDATING

Ouverte
#7,451 0 commentaires 0 réactions 1 personne assignée Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

@andrewnester y travaille déjà.

Depuis le 11/11/2026.

  • #7460 par @andrewnester — ouverte

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
76/100
Type d'issue
Bug
Clarté
Clairement spécifiée
Activité
Active
Stack technique
go
Domaine
cli

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

Bug DABs
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.

  1. Define an app in a bundle, with a job that runs before the app is started.
  2. Run databricks bundle deploy -t <target>, which creates the app.
  3. Run the job with databricks bundle run <job> -t <target>. In our case it took about 50 seconds.
  4. Run databricks bundle run <app> -t <target>.
  5. 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>.

Langage dominant
Go
Étoiles
427
Forks
267
Merge moyen
2 j 1 h
PR mergées (30 j)
233

Préparer son environnement

  • Fournit un Dockerfile ou un fichier Docker Compose
  • Propose un modèle de pull request
  • Aucun guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de databricks/cli

Toutes les issues de databricks/cli

Issues similaires

Plus d'issues Go

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.