Skip to content

AIR CLI: bring air run submit output to parity with the Python CLI - #6241

Merged
riddhibhagwat-db merged 7 commits into
air-clifrom
air-run-ui-parity
Aug 12, 2026
Merged

AIR CLI: bring air run submit output to parity with the Python CLI#6241
riddhibhagwat-db merged 7 commits into
air-clifrom
air-run-ui-parity

Conversation

@riddhibhagwat-db

@riddhibhagwat-db riddhibhagwat-db commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Changes & Why

Aligns databricks experimental air run's submit UX with the Python air CLI:

  • Prints a "Submitting experiment: " line before uploading (text mode).
  • Success line is now green "Submitted workload with Job Run 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.

Tests

Unit & acceptance tests all pass.

Manual verification:
[spinners are present]

Standard air run outputs:
Screenshot 2026-08-11 at 2 39 45 PM

JSON style outputs:
Screenshot 2026-08-11 at 2 40 47 PM

Screenshot 2026-08-11 at 2 44 05 PM

@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 8ae2809

Run: 31641909988

Env 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
💚​ aws linux 4 4 291 1104 4:29
💚​ aws windows 4 4 293 1102 3:25
💚​ azure linux 4 4 290 1104 4:14
💚​ azure windows 4 4 292 1102 3:03
💚​ gcp linux 1 5 291 1104 5:50
💚​ gcp windows 1 5 293 1102 3:24
8 interesting tests: 4 RECOVERED, 4 SKIP
Test Name aws linux aws windows azure linux azure windows gcp linux gcp windows
💚​ TestAccept 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
🙈​ TestAccept/bundle/invariant/no_drift 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_endpoints/drift/recreated_same_name 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_indexes/recreate/embedding_dimension 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/ssh/connection 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
💚​ TestFetchRepositoryInfoAPI_FromRepo 💚​R 💚​R 💚​R 💚​R 🙈​S 🙈​S
💚​ TestFetchRepositoryInfoAPI_FromRepo/root 💚​R 💚​R 💚​R 💚​R
💚​ TestFetchRepositoryInfoAPI_FromRepo/subdir 💚​R 💚​R 💚​R 💚​R

@riddhibhagwat-db
riddhibhagwat-db changed the base branch from main to air-cli August 12, 2026 21:14
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
… --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
…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
@riddhibhagwat-db
riddhibhagwat-db merged commit 0dd6def into air-cli Aug 12, 2026
22 checks passed
@riddhibhagwat-db
riddhibhagwat-db deleted the air-run-ui-parity branch August 12, 2026 21:54
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.
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.

3 participants