Repository navigation
Wait for app compute to settle before bundle run - #7460
Open
andrewnester wants to merge 4 commits into
Open
andrewnester wants to merge 4 commits into
andrewnester wants to merge 4 commits into
Conversation
bundle run read the app compute state once, so it could act on a transient state. An app whose compute was UPDATING failed with "not in RUNNING state", and a compute that went from STARTING back to STOPPED left the run waiting for ACTIVE. Poll until the compute is ACTIVE, STOPPED or ERROR before starting or deploying the app. Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
Collaborator
✅ Integration test reportCommit: 4bd5d5d
Top 7 slowest tests (at least 2 minutes):
|
andrewnester
requested review from
denik,
janniklasrose and
pietern
and removed request for
rclarey
November 11, 2026 12:49
waitForComputeToSettle polled through every state it did not list, so a DELETING app kept bundle run waiting for the full 20 minute budget before it failed anyway. GET returns the app (not 404) for up to ~20 minutes after DELETE, so there is nothing to wait for; halt with an error pointing at redeploying the bundle, matching how IsGone in the direct engine treats a DELETING app. Reword the doc comment so it states the contract: ACTIVE, STOPPED and ERROR return, DELETING fails, every other state is polled through. Co-authored-by: Isaac <no-reply@databricks.com>
Sankalp-Mittal
approved these changes
Nov 12, 2026
andrewnester
enabled auto-merge
November 13, 2026 10:22
pietern
reviewed
Nov 13, 2026
| } | ||
|
|
||
| if app.ComputeStatus == nil { | ||
| return app, nil |
Contributor
There was a problem hiding this comment.
Is this supposed to be a terminal condition, or can it happen as an initial transient condition?
Contributor
Author
There was a problem hiding this comment.
Terminal. The API always returns compute_status (the SDK waiters and dresources dereference it unconditionally, a no_compute app reports STOPPED), so nil is just a guard; added a comment saying why.
Co-authored-by: Isaac <no-reply@databricks.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
bundle runon an app now polls the app until its compute is ACTIVE, STOPPED or ERROR (or the app has no compute status) before it starts or deploys the app. Transient states (STARTING, UPDATING, STOPPING) are polled through. The separateWaitGetAppActivecall for STARTING is removed, because the poll covers it.Files:
bundle/run/app.go: newwaitForComputeToSettlehelper replaces the singleApps.GetinappRunner.Run.bundle/run/app_test.go: table-driven test covering UPDATING, STARTING and STOPPING transitions..nextchanges/bundles/fix-app-run-compute-state.md: changelog fragment.Why
appRunner.Runchecked the compute state once. If it read UPDATING, it tried to deploy straight away and failed with "not in RUNNING state". If it read STARTING and the compute then went back to STOPPED,WaitGetAppActivefailed instead of starting the app again.Tests
go test ./bundle/run/...passes, including the newTestAppRunWaitsForComputeToSettlecases.go test ./acceptance -run 'TestAccept/bundle/run/app|TestAccept/bundle/resources/apps|TestAccept/bundle/apps/'passes locally.golangci-lintreports no issues on./bundle/run/....The transient-state behaviour is covered by unit tests with mocked transitions. The fake app server in
libs/testserverreturns a fixed compute state, so an acceptance test cannot reproduce the transition without a stateful change to the fake.Fixes #7451
This pull request and its description were written by Isaac.