AIR CLI: implement air run --watch (stream logs until completion) - #6080
AIR CLI: implement air run --watch (stream logs until completion)#6080riddhibhagwat-db wants to merge 1 commit into
air run --watch (stream logs until completion)#6080Conversation
After submitting a workload, --watch follows the run's logs to completion and exits with the run's outcome, reusing the same Bricklens-with-MLflow-fallback pipeline as `air logs`. - Text mode: prints "Submitted run", the dashboard link, and "Monitoring run and streaming logs...", then streams the logs. - JSON mode: emits a SUBMITTED event with the run id, a STATUS event on each lifecycle transition, the streamed LOG/ALERT events, and a closing terminal-status envelope (SUCCESS/FAILED/CANCELED) — matching the Python CLI's --watch JSONL contract. - Without --watch, the plain submit path now prints a tip about --watch. - STATUS events are watch-scoped (opt-in via logRequest.onStatusChange), so the merged `air logs` output is unchanged. --dry-run still takes precedence over --watch (nothing is submitted or streamed). Co-authored-by: Isaac
Approval status: pending
|
Integration test reportCommit: caa28f8
16 interesting tests: 8 FAIL, 4 KNOWN, 4 SKIP
|
maggiewang-db
left a comment
There was a problem hiding this comment.
Can you do a manual test with the fallback mlflow path?
| // envelope after streaming. Mirrors the Python CLI's --watch JSONL contract. | ||
| out := cmd.OutOrStdout() | ||
| printSubmittedEvent(out, runIDStr, dashboardURL) | ||
| terminalStatus := "FAILED" |
There was a problem hiding this comment.
Isaac claims this terminalStatus is never updated in the fallback mlflow code path. Can you double check?
Changes & Why
After submitting a workload, --watch follows the run's logs to completion and exits with the run's outcome, reusing the same Bricklens-with-MLflow-fallback pipeline as
air logs.air logsoutput is unchanged.--dry-run still takes precedence over --watch (nothing is submitted or streamed).
Tests
Unit tests (experimental/air/cmd/)
Acceptance tests (acceptance/experimental/air/)
Manual verification:

Properly monitors and outputs logs from runs on manual test: