Repository navigation
Deploy the app when the deployment triggered by start failed - #7780
Merged
Merged
Conversation
Since #6399, Create sends source_code_path, so starting a stopped app makes the backend deploy that source with its own app.yaml, without the bundle's inline config. When that deployment fails, bundle run and lifecycle.started returned its error instead of running the bundle's deployment, which replaces it. cloud: TestAccept/bundle/resources/apps/inline_config Co-authored-by: Isaac <no-reply@databricks.com>
Collaborator
✅ Integration test reportCommit: 1b56ccf
Top 21 slowest tests (at least 2 minutes):
|
denik
marked this pull request as ready for review
November 18, 2026 18:26
denik
requested review from
Sankalp-Mittal,
andrewnester,
renaudhartert-db and
shreyas-goenka
and removed request for
renaudhartert-db
November 18, 2026 18:26
andrewnester
left a comment
Contributor
There was a problem hiding this comment.
No blocking findings from a full pass; I'll take a manual look at the appdeploy changes before approving.
Sankalp-Mittal
left a comment
Contributor
There was a problem hiding this comment.
[AI Generated] Review by review-factory (Claude Fable 5.2 + Claude Opus 5.5, cross-verified). Only points the reviewers agreed on are posted.
…turned cloud: TestAccept/bundle/resources/apps/inline_config Co-authored-by: Isaac <no-reply@databricks.com>
andrewnester
left a comment
Contributor
There was a problem hiding this comment.
No blocking findings from a full pass; I'll take a manual look at the appdeploy changes before approving.
Sankalp-Mittal
left a comment
Contributor
There was a problem hiding this comment.
[AI Generated] Follow-up review by review-factory (Claude Fable 5.2 + Claude Opus 5.5, cross-verified). Only points the reviewers agreed on are posted.
No new issues found.
janniklasrose
approved these changes
Nov 19, 2026
andrewnester
approved these changes
Nov 19, 2026
Collaborator
❌ Integration test reportCommit: a4661b0
1259 interesting tests: 1233 MISS, 9 RECOVERED, 8 KNOWN, 5 PANIC, 4 FAIL
Top 50 slowest tests (at least 2 minutes):
|
idelafuente-oc
pushed a commit
to idelafuente-oc/cli
that referenced
this pull request
Nov 20, 2026
…cks#7804) ## Changes Fix a race in the interactive list pager (`libs/cmdio/pager.go`) that could drop or reorder a page of rows, and the macOS flake it caused in `TestPagedTemplateRespectsLimit`. A non-final page was printed by returning a bare `tea.Println` cmd. bubbletea runs every returned cmd on its own goroutine, so nothing ordered that print before later messages. When ENTER (or SPACE) started the next fetch and that page was the last one, its `tea.Sequence(print, tea.Quit)` could reach the event loop first, and the program quit before the earlier page was printed. In the test (page size 5, limit 7) that leaves only the last 2 rows: `expected: 7, actual: 2`. A non-final page is now followed by a `pagePrintedMsg` in the same `tea.Sequence` as its print. `tea.Sequence` delivers each message before running the next cmd, and `p.Send` is unbuffered, so when `pagePrintedMsg` arrives the page's lines are already queued. Until then a new `printing` flag holds keys back: SPACE is ignored, ENTER sets `drainAll`, and `q`/`esc`/Ctrl+C set `quitPending`. The `pagePrintedMsg` handler then quits or chains the next fetch, replacing the old `Sequence(print, fetch)` branch. `View` is unchanged: the prompt shows as soon as the batch arrives. Also in the tests: `countContentLines` and `TestPagedTemplateMatchesNonPagedForSmallList` now read the output the way a terminal shows it, keeping only the text after each line's last `\r`. tea redraws its spinner and prompt in place, so plain ANSI stripping left that text glued to real rows (`"\r⣽ loading...\r1 1"`). `TestPagedTemplateMatchesNonPagedForSmallList` failed once that way, and `countContentLines` would skip a row that lands on the prompt's line. Introduced with the pager in databricks#5015. ## Why Users can lose rows of `list` output in the pager. It is rare at human typing speed, but it fails CI on unrelated PRs (macOS runners). ## Tests - New `TestPagerModelKeysWaitForPagePrint` and `TestPagerModelQuitWaitsForPagePrint` fail without the fix (SPACE/ENTER fetch, q quits, before the page is printed). `TestPagedTemplateDrainsFullIterator` now checks row order, not just presence. Updated `TestPagerModelBatchPromptsWhenMore` and `TestPagerModelBatchDrainingChainsFetch` to the new message flow. - Reproduced the flake deterministically by adding a 20ms sleep to the page print cmd: before the fix, `TestPagedTemplateDrainsFullIterator` got 18 of 23 rows and `TestPagedTemplateRespectsLimit` 2 of 7. With the fix, every `TestPagedTemplate*` passes with the sleep in place. - `go test -race ./libs/cmdio/ -count=200`, `go test ./libs/cmdio/ -count=1000` and `GOMAXPROCS=1 ... -count=200` pass. ## Dashboard | error / test | failure | |---|---| | [error/3590](http://go/cli/dashboard/error/3590?main=1&pr=1&end=2026-11-19T12:00:00Z&last=7d) | `paged_template_test.go:90: Not equal: expected: 7 actual : 2` (3 failures in 3 days, macOS, PRs databricks#4738, databricks#7552, databricks#7780) | | [libs/cmdio.TestPagedTemplateRespectsLimit](http://go/cli/dashboard/test/libs/cmdio.TestPagedTemplateRespectsLimit?main=1&pr=1&end=2026-11-19T12:00:00Z&last=7d) | same | | [libs/cmdio.TestPagedTemplateMatchesNonPagedForSmallList](http://go/cli/dashboard/test/libs/cmdio.TestPagedTemplateMatchesNonPagedForSmallList?main=1&pr=1&end=2026-11-19T12:00:00Z&last=7d) | `expected: "1 1" actual : "\r⣽ loading...\r1 1"` (1 failure, 2026-11-16, Windows) | This pull request and its description were written by Isaac. --------- Co-authored-by: Isaac <no-reply@databricks.com>
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
appdeploy.WaitForDeploymentToCompleteno longer fails when the active or pending deployment it waits for ends inFAILED. It logs the failure and returns, and the caller runs the bundle's own deployment. Both callers (bundle runfor apps andlifecycle.startedin the direct engine) deploy right after waiting, so the new deployment replaces the failed one.Why
Since #6399, Create sends
source_code_path, so the app records adefault_source_code_path. Starting a stopped app then makes the backend deploy that source with theapp.yamlit contains, not the bundle's inlineconfig. If that config doesn't run (ininline_config,app.yamlrunspython app.py, which exits right away), the deployment fails withapp exited unexpectedly.bundle runwaited on that deployment, returned its error, and never deployed the inline config.This is a regression from #6399. It is unreleased, so there is no changelog entry.
Decision: I fixed the wait instead of reverting
source_code_pathon Create, which #6399 added on purpose. A failed earlier deployment never needs to block the new one.Tests
bundle/appdeploy: a FAILED deployment no longer returns an error. The test fails without the fix.TestAccept/bundle/resources/apps/inline_config(both DMS variants) passes on AWS with the fix and fails without it. The run log showsDeployment ... failed (Error: app exited unexpectedly. ...), deploying again, followed byApp started successfully.inline_configon every cloud.Dashboard
error/3769: 74 failures in 11 main runs on aws, azure and gcp, starting with the first run after #6399.
This pull request and its description were written by Isaac.