Skip to content

air list: drop the up-front /Me calls - #7615

Merged
stevenchen-db merged 2 commits into
mainfrom
air/list-drop-me
Nov 13, 2026
Merged

stevenchen-db merged 2 commits into
mainfrom
air/list-drop-me

Conversation

@stevenchen-db

Copy link
Copy Markdown
Contributor

Changes

air list called /Me twice before listing: once for the current user name and once, via CurrentWorkspaceID, for the run links' ?o= hint. The detail pane made another call for the same hint.

  • The workspace ID now comes from workspaceIDForRunLink (as in air run): profile, environment, or host metadata, with /Me only when none is set.
  • The user name is resolved lazily. The AiTrainingService index (--all-status) is already scoped to the caller and never needs it; the Jobs scan fetches it alongside the first runs/list page.

Why

On df1 (median of 3): default air list 252ms -> 101ms, --all-users 182ms -> 105ms, --all-status drops both /Me calls (9518ms -> 9355ms).

Tests

  • New: the index path never resolves the user; the scan resolves it once and filters to it; a lookup failure is reported; the index fallback still filters to the current user.
  • go test ./cmd/air, TestAccept/air, lint pass. (TestIndexStrategyOrdersAndLimits has a pre-existing data race in its test server under -race, also on main.)
  • df1 e2e vs main: identical text and JSON output and exit codes across 9 modes (default, JSON, --all-status, --all-users, user, accelerator and no-match filters); identical ?o= links; the TUI detail pane renders the same with no /Me call.

This pull request and its description were written by Isaac.

`air list` called /Me twice before listing: once for the current user
name and once, via CurrentWorkspaceID, for the run links' ?o= hint. The
detail pane made a third call for the same hint.

Resolve the workspace ID with workspaceIDForRunLink, which reads the
profile, environment, or host metadata and calls /Me only when none is
set. Resolve the user name lazily: the AiTrainingService index is already
scoped to the caller and never needs it, and the Jobs scan fetches it
alongside the first runs/list page, waiting for it only when it first
matches an AIR run's creator.

Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
@github-actions github-actions Bot added the AIR Databricks AI Runtime CLI label Nov 13, 2026
@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

✅ Integration test report

Commit: 93c4a9c

Run: 43499368739

Env 💚​RECOVERED ✅​pass 🙈​skip Time
💚​ aws linux-2core-8gb 1 270 15 4:46
💚​ aws-windows-latest-4core-16gb 1 272 13 3:37
💚​ azure linux-2core-8gb 1 269 15 4:19
💚​ azure-windows-latest-4core-16gb 1 271 13 3:52
💚​ gcp linux-2core-8gb 1 270 15 5:59
💚​ gcp-windows-latest-4core-16gb 1 272 13 3:44
Test Name aws linux-2core-8gb aws-windows-latest-4core-16gb azure linux-2core-8gb azure-windows-latest-4core-16gb gcp linux-2core-8gb gcp-windows-latest-4core-16gb
💚​ TestAccept 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
Top 3 slowest tests (at least 2 minutes):
duration env testname
3:39 gcp-windows-latest-4core-16gb TestAccept
3:33 aws-windows-latest-4core-16gb TestAccept
3:14 azure-windows-latest-4core-16gb TestAccept

@stevenchen-db
stevenchen-db added this pull request to the merge queue Nov 13, 2026
Merged via the queue into main with commit 9a9d739 Nov 13, 2026
28 checks passed
@stevenchen-db
stevenchen-db deleted the air/list-drop-me branch November 13, 2026 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AIR Databricks AI Runtime CLI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants