Repository navigation
acc: tolerate retried app deployment POST in apps lifecycle-started tests - #7511
Merged
Merged
Conversation
appdeploy.Deploy retries POST /api/2.0/apps/{name}/deployments after waiting
for the in-flight deployment when the first attempt fails. On cloud this
happens occasionally right after create/start, so the recorded requests
contain the deployment twice. Collapse consecutive duplicates with
print_requests.py --unique.
Co-authored-by: Isaac <no-reply@databricks.com>
Contributor
|
Commit: Regression test reportSelected 2 changed tests (limit=20, 0 not selected) 4 tests: regression=0 unreleased=0 coverage=4 failing=0
|
Collaborator
✅ Integration test reportCommit: 8993189
10 interesting tests: 10 flaky
Top 50 slowest tests (at least 2 minutes):
|
denik
marked this pull request as ready for review
November 11, 2026 22:11
denik
enabled auto-merge
November 11, 2026 22:11
andrewnester
approved these changes
Nov 12, 2026
andrewnester
left a comment
Contributor
There was a problem hiding this comment.
lifecycle-started-omitted prints the same start-then-deployments pair via print_requests.py //apps without --unique, so it has the same exposure. Same treatment, or did the dashboard show it clean?
Collaborator
❌ Integration test reportCommit: 093378d
58 interesting tests: 46 FAIL, 11 RECOVERED, 1 KNOWN
Top 50 slowest tests (at least 2 minutes):
|
Contributor
Author
|
@andrewnester good catch, it does have the same exposure: the "started omitted -> started: true" step records start + AI agent (harness_auto, isaac_claude, opus5.5) |
tedjt
pushed a commit
to tedjt/cli
that referenced
this pull request
Nov 12, 2026
…mitted (databricks#7547) ## Changes Collapse consecutive duplicate requests (`print_requests.py --unique`) in `apps/lifecycle-started-omitted`, the same treatment databricks#7511 gave `lifecycle-started` and `lifecycle-started-toggle`. `output.txt` doesn't change, because the trace line prints the wrapper function name. ## Why Review feedback on databricks#7511: this test also records a start followed by `POST /api/2.0/apps/{name}/deployments` (the "started omitted -> started: true" step), so the same `appdeploy.Deploy` retry can record that POST twice. The dashboard shows no error/1031 failures for this test in the last 90 days, so this change prevents the flake rather than fixing an observed one. Consecutive duplicates are still collapsed only after GET filtering, as in databricks#7511. ## Dashboard Preventive; the same failure mode as [error/1031](http://go/cli/dashboard/error/1031?main=1&pr=1&end=2026-11-12T00:00:00Z&last=60d), which has not been seen on this test yet. ## Tests - Local: `go test ./acceptance -run 'TestAccept/bundle/resources/apps/lifecycle-started-omitted'` passes. - AWS: `testme-aws -run 'TestAccept/bundle/resources/apps/lifecycle-started-omitted/'` passes (DMS= and DMS=true). _Opened by an AI agent (harness_auto, isaac_claude, opus5.5)._ 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
Collapse consecutive duplicate requests (
print_requests.py --unique) in theapps/lifecycle-startedandapps/lifecycle-started-toggleacceptance tests. The toggle test switches from an inlinejqfilter toprint_requests.pyso it can use--unique; that only reorders keys in itsoutput.txt.Why
appdeploy.Deploy(bundle/appdeploy/app.go) retriesPOST /api/2.0/apps/{name}/deploymentson purpose: if the first attempt fails, it waits for the in-flight deployment to finish and posts again. On cloud this sometimes happens right after an app is created withstarted: trueor started by the bundle. The request recording then has the same deployment POST twice in a row, and the tests flake (~0.5-1% of cloud runs on main, all clouds, since August).This is the CLI behaving as intended, not a backend bug. These tests check which lifecycle calls are made (create/start/stop/update/deploy), not how many times one is attempted, so collapsing exact consecutive duplicates keeps that coverage. I did not change the retry: it handles a real backend race.
Dashboard
+ "path": "/api/2.0/apps/[UNIQUE_NAME]/deployments",(extraPOSTwith"mode": "SNAPSHOT"after the expected one)Tests:
Tests
go test ./acceptance -run 'TestAccept/bundle/resources/apps/lifecycle-started'passes.testme-aws -run 'TestAccept/bundle/resources/apps/lifecycle-started(-toggle)?/'passes (all 6 variants incl. lifecycle-started-omitted).Opened by an AI agent (harness_auto, isaac_claude, opus5.5).
This pull request and its description were written by Isaac.