Repository navigation
[CNXT-2531] air run: include ?o=<workspace-id> in the job run URL - #7573
Merged
Merged
Conversation
`air run` built the run URL by hand, without the `?o=<workspace-id>` suffix that `air get` and `air list` add through dashboardURL(). The two commands printed different URLs for the same run, and the `air run` one does not deep-link to the right workspace on multi-workspace accounts. submitWorkload now resolves the workspace ID and uses the same helper. The run already exists at that point, so a failed lookup falls back to the URL without the suffix instead of failing the submit. Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
Contributor
|
Commit: Regression test reportSelected 4 changed tests (limit=20, 0 not selected) 4 tests: regression=4 unreleased=0 coverage=0 failing=0
TestAccept/air/run-submit: branch ✅ | main (c7d55d3) ❌ | latest (v1.26.0) ❌main (c7d55d3): latest (v1.26.0): same output as main (c7d55d3) TestAccept/air/run-submit-databricks-ai: branch ✅ | main (c7d55d3) ❌ | latest (v1.26.0) ❌main (c7d55d3): latest (v1.26.0): TestAccept/air/run-submit-deps: branch ✅ | main (c7d55d3) ❌ | latest (v1.26.0) ❌main (c7d55d3): latest (v1.26.0): TestAccept/air/run-submit-overrides: branch ✅ | main (c7d55d3) ❌ | latest (v1.26.0) ❌main (c7d55d3): latest (v1.26.0): |
Collaborator
✅ Integration test reportCommit: 1faea47
Top 24 slowest tests (at least 2 minutes):
|
The workspace ID lookup for the run link sat between creating the run and printing its ID, so a slow or retrying lookup could hold back the ID of a run that already existed. Resolve it alongside validation and staging instead, bounded by a short timeout, and prefer the ID already on the client config so the common case makes no extra request. dashboardURL now omits ?o= for an unknown workspace ID, which replaces the hand-built fallback URL and stops `air list` linking to ?o=0 when its own lookup fails. Co-authored-by: Isaac <no-reply@databricks.com>
pardis-beikzadeh-db
approved these changes
Nov 12, 2026
Co-authored-by: Isaac <no-reply@databricks.com>
Member
Author
Collaborator
❌ Integration test reportCommit: 53dc945
54 interesting tests: 42 FAIL, 9 RECOVERED, 3 KNOWN
Top 50 slowest tests (at least 2 minutes):
|
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
databricks air runnow prints the job run URL with the?o=<workspace-id>suffix, the same formair getandair listalready use:submitWorkloadbuilt the URL by hand; it now goes through the shareddashboardURL()helper. The same URL feedsdashboard_urlinair run -o jsonand the submitted/terminal events of--watch, so those gain the suffix too.The workspace ID is resolved before the run is submitted, alongside validation and artifact staging, so nothing sits between creating a run and showing its ID. It uses
auth.ResolveWorkspaceID, which returns the ID already on the client config and only falls back to a/Merequest when there is none; that request is bounded by a 10-second timeout.The lookup is best-effort. If it fails,
air runprints the URL without the suffix rather than failing the submit.dashboardURL()now omits?o=for an unknown (zero) workspace ID, which also changesair list: when its own lookup fails it used to link to?o=0, and now links without the suffix.air getstill fails when its lookup fails; this PR leaves that alone.Why
air runandair getprinted different URLs for the same run, and the quickstart documents the?o=form. Without?o=, the link does not deep-link to the right workspace for users who are signed in to several.Tests
TestSubmitWorkloadasserts the exact URL, including?o=<workspace-id>. It fails without the fix.TestSubmitWorkloadWithoutWorkspaceID: with no workspace ID on the config and a/Meresponse that lacks the org ID header, the submit succeeds, the URL has no?o=, and the lookup happened before the run was created.TestDashboardURLcovers the zero workspace ID.acceptance/air/run-submit*outputs; the only diff is the?o=[WORKSPACE_ID]suffix on theView job run at:lines.go test ./cmd/air/andgo test ./acceptance -run 'TestAccept/air'pass.Not verified against a live workspace.
This pull request and its description were written by Isaac.