Skip to content

Fix race condition in TestJobRunWaitAbandonedLinksTheRun - #6504

Merged
janniklasrose merged 1 commit into
mainfrom
janniklasrose/job-run-flaky-tests
Sep 3, 2026
Merged

Fix race condition in TestJobRunWaitAbandonedLinksTheRun#6504
janniklasrose merged 1 commit into
mainfrom
janniklasrose/job-run-flaky-tests

Conversation

@janniklasrose

Copy link
Copy Markdown
Contributor

Changes

Don't rely on timing - slower machines like CI runners don't guarantee completion

Why

Observed it during 2 different PR's CI runs, e.g. https://github.com/databricks/cli/actions/runs/33664383046/job/100362562756?pr=6454

=== FAIL: bundle/direct/dresources TestJobRunWaitAbandonedLinksTheRun (0.01s)
    job_run_test.go:244: 
        	Error Trace:	/Users/runner/work/cli/cli/bundle/direct/dresources/job_run_test.go:244
        	Error:      	Error "interrupted while waiting for the run to finish: context deadline exceeded" does not contain "run page: https://myworkspace.databricks.test/jobs/456/runs/123?o=900800700600"
        	Test:       	TestJobRunWaitAbandonedLinksTheRun

=== FAIL: bundle/direct/dresources TestJobRunWaitAbandonedLinksTheRun (re-run 1) (0.01s)
    job_run_test.go:244: 
        	Error Trace:	/Users/runner/work/cli/cli/bundle/direct/dresources/job_run_test.go:244
        	Error:      	Error "interrupted while waiting for the run to finish: context deadline exceeded" does not contain "run page: https://myworkspace.databricks.test/jobs/456/runs/123?o=900800700600"
        	Test:       	TestJobRunWaitAbandonedLinksTheRun

=== FAIL: bundle/direct/dresources TestJobRunWaitAbandonedLinksTheRun (re-run 2) (0.00s)
    job_run_test.go:244: 
        	Error Trace:	/Users/runner/work/cli/cli/bundle/direct/dresources/job_run_test.go:244
        	Error:      	Error "interrupted while waiting for the run to finish: context deadline exceeded" does not contain "run page: https://myworkspace.databricks.test/jobs/456/runs/123?o=900800700600"
        	Test:       	TestJobRunWaitAbandonedLinksTheRun

Tests

Ran repeatedly in local, all passed (before failure rate was ~8%)

@janniklasrose
janniklasrose requested a review from denik September 2, 2026 22:31

@denik denik left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, thanks!

@janniklasrose
janniklasrose added this pull request to the merge queue Sep 3, 2026
Merged via the queue into main with commit ace5573 Sep 3, 2026
34 checks passed
@janniklasrose
janniklasrose deleted the janniklasrose/job-run-flaky-tests branch September 3, 2026 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants