Skip to content

air list: cache terminal runs' MLflow links on the Jobs scan path - #7627

Open
stevenchen-db wants to merge 2 commits into
mainfrom
air/list-scan-mlflow-cache
Open

stevenchen-db wants to merge 2 commits into
mainfrom
air/list-scan-mlflow-cache

Conversation

@stevenchen-db

Copy link
Copy Markdown
Contributor

Changes

air list modes served by the Jobs scan (--all-users, --filter user=…, and the default active list) build their rows from runs/list on every call and re-resolve each row's MLflow link with a get-output and an MLflow request. A terminal run's link never changes, so it is now cached on disk, like the index path (--all-status for your own runs) already caches its rows.

  • The scan uses its own cache component holding only the MLflow link, label, and experiment URL, so its entries never stand in for the index path's full rows.
  • An entry is used only while the run's task runs and attempt numbers match the ones it was resolved from, so a run repaired after it was cached is refetched. Active runs are never cached. JSON output (which has no MLflow column) is unchanged.
  • Like the index path, a run renamed in MLflow after it finished keeps its old label until the entry expires (60 days).

Why

On df1, air list --all-users --all-status and air list --all-status --filter user=<me> go from ~2.0s to ~0.6s once warm (20 terminal rows, ~40 requests skipped). The first call is unchanged.

Tests

  • New TestJobsScanCachesTerminalMLflowLinks: a terminal run is resolved once and then served from the cache; a repaired run (new attempt) is refetched; an active run is never cached; nothing is written to the index path's cache. Removing the cache hook or the task-run check each fails it.
  • go test ./cmd/air (list tests also with -race), TestAccept/air, lint pass.
  • df1 vs main: cold and warm output identical for both scan modes; after warming, --all-status, JSON, and the default list are identical to main.

This pull request and its description were written by Isaac.

The Jobs scan (default list, --all-users, user= filters) builds its rows
from runs/list on every call and re-resolves each row's MLflow link with a
get-output and an MLflow request, about 40 requests for 20 rows. A
terminal run's link does not change, so cache it, like the index path
already does for its rows.

The scan uses its own cache component holding only the MLflow fields, so
its entries never stand in for the index path's full rows. An entry is
used only while the run's task runs and attempts match the ones it was
resolved from, so a run repaired after it was cached is refetched. Active
runs are never cached.

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 14, 2026
@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

✅ Integration test report

Commit: 38e141a

Run: 43536245030

Env 🔄​flaky 💚​RECOVERED ✅​pass 🙈​skip Time
🔄​ aws linux-2core-8gb 1 1 269 15 6:50
💚​ aws-windows-latest-4core-16gb 1 272 13 4:51
💚​ azure linux-2core-8gb 1 269 15 5:16
💚​ azure-windows-latest-4core-16gb 1 271 13 4:21
💚​ gcp linux-2core-8gb 1 270 15 5:48
💚​ gcp-windows-latest-4core-16gb 1 272 13 3:29
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
🔄​ TestSyncIncrementalFileSync 🔄​f ✅​p ✅​p ✅​p ✅​p ✅​p
Top 3 slowest tests (at least 2 minutes):
duration env testname
3:18 azure-windows-latest-4core-16gb TestAccept
3:15 aws-windows-latest-4core-16gb TestAccept
2:52 gcp-windows-latest-4core-16gb TestAccept

This branch has not been deployed

No deployments
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.

2 participants