AIR CLI: bring air run submit output to parity with the Python CLI - #6241
Merged
Conversation
riddhibhagwat-db
requested review from
ben-hansen-db,
maggiewang-db and
vinchenzo-db
August 11, 2026 21:46
Collaborator
Integration test reportCommit: 8ae2809
8 interesting tests: 4 RECOVERED, 4 SKIP
|
vinchenzo-db
approved these changes
Aug 12, 2026
Aligns `databricks experimental air run`'s submit UX with the Python `air`
CLI:
- Prints a "Submitting experiment: <name>" line before uploading (text mode).
- Success line is now green "Submitted workload with Job Run ID: <id>", and
the run URL is a terminal hyperlink ("View job run at:").
- Adds hyperlinked "View MLflow run at:" / "View MLflow experiment at:" links.
The MLflow IDs are assigned only once the task run starts, so a short
best-effort poll (bounded, ctx-cancellable) resolves them; the confirmation
and job-run link print first so a bare submit is never blocked on links that
usually aren't ready yet, and the two MLflow links are omitted on timeout.
- Shows stderr spinners for the upload and snapshot-packaging phases (text
mode, interactive terminals only).
- The non-watch JSON envelope now reports status "PENDING" (matching Python),
distinct from the --watch JSONL "SUBMITTED" event type.
Colors, hyperlinks, and spinners degrade to plain output on non-TTY / NO_COLOR
and are suppressed in JSON mode, so piped output and the JSON envelope stream
stay clean.
Co-authored-by: Isaac
Co-authored-by: Isaac
… --watch Add a dim, centered "Logs" divider (and a blank-line break) between the submission summary and the streamed logs, so the two blocks read as distinct sections. Degrades to plain characters on non-rich terminals. Co-authored-by: Isaac
Ports the Python CLI's waiting-status behavior into the log-stream spinner. While
a run is waiting with no logs yet, the spinner now shows the server-set STATUS
message (e.g. "Waiting for GPU capacity...") when present, falls back to
"Waiting for accelerator compute capacity to become available..." for a native
PENDING run, and otherwise keeps the default "Waiting for run to start (node N)..."
The status message is read from ai_runtime_task_output.status_message
("STATUS:<payload>", normalized like Python's extract_status_message) and the
fetch is throttled to every Nth poll. Best-effort: any fetch failure keeps the
prior text.
Co-authored-by: Isaac
…ences Co-authored-by: Isaac
…s task run id - Remove train.yaml, a scratch workload config accidentally committed at the repo root. - Correct printLogsDivider's comment: only the dim color degrades on non-rich terminals; the rule characters are always printed. - serverStatusMessage now re-resolves the latest task run id each call instead of caching it, so a retried run's new task output is picked up. Co-authored-by: Isaac
Co-authored-by: Isaac
riddhibhagwat-db
force-pushed
the
air-run-ui-parity
branch
from
August 12, 2026 21:17
02f73cb to
8ae2809
Compare
riddhibhagwat-db
added a commit
that referenced
this pull request
Aug 13, 2026
## Summary **#6153 ("AIR CLI Migration: `--download-to` flag for logs") was lost from `air-cli`.** It merged on 2026-08-06, but `air-cli` was later rewound to `1fcb3c09a` before #6239 merged (08-12), and the rebuilt line (#6239 → #6244 → #6241) bypassed #6153. As a result `air-cli` today still carries the **pre-#6153 stub**: - `logs.go`: `--download-to is not implemented yet` (the flag is rejected) - no `logdownload.go` / `logdownload_test.go` - no `acceptance/experimental/air/logs-download/` test dir This PR restores #6153's change set onto the current `air-cli` tip. ## How Cherry-pick of #6153's original squash commit (`60cd876910cd`) onto `air-cli`. Verified equivalence to the original: - Every file except `logstream.go` is **byte-identical** to what #6153 landed. - `logstream.go` is re-merged against #6241's later edits to that file (git auto-merged it cleanly; both changes coexist). ## Testing - `go build ./experimental/air/...` — ok - `go test ./experimental/air/...` — 548 pass - `go test ./acceptance -run TestAccept/experimental/air` — 29 pass (incl. `logs` and the restored `logs-download`) - Package lints clean - Confirmed the `--download-to is not implemented` stub is gone and `logs.go` now wires the real implementation This pull request and its description were written by Isaac.
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 & Why
Aligns
databricks experimental air run's submit UX with the PythonairCLI:Colors, hyperlinks, and spinners degrade to plain output on non-TTY / NO_COLOR and are suppressed in JSON mode, so piped output and the JSON envelope stream stay clean.
Tests
Unit & acceptance tests all pass.
Manual verification:
[spinners are present]
Standard air run outputs:

JSON style outputs:
