AIR CLI Integration: Scaffold experimental AIR CLI command package#5564
AIR CLI Integration: Scaffold experimental AIR CLI command package#5564riddhibhagwat-db wants to merge 5 commits into
Conversation
Approval status: pending
|
Integration test reportCommit: e04b698
22 interesting tests: 15 SKIP, 7 KNOWN
Top 24 slowest tests (at least 2 minutes):
|
simonfaltum
left a comment
There was a problem hiding this comment.
Thanks for the scaffold. The Go code itself is in good shape and the acceptance setup follows the existing patterns (the EnvMatrix override and the committed out.test.toml are exactly right). Requesting changes for three things:
- The
tools/list_embeds.pychange needs to come out, see the inline comment. It's unrelated to this PR and the stated rationale doesn't match the repo. - Package location should follow the established experimental layout (
experimental/air/cmd), see the inline comment. - The description needs fixing: it says 7 stub subcommands but lists and implements 6 (your own Tests section says six). Also drop the
list_embeds.pybullet together with that change.
Two questions:
- Which Python
airCLI source/version were the flags mapped from? Please link it in the description; flag parity isn't verifiable from this repo. - Was a seventh subcommand intentionally dropped, or is "7" a typo?
The remaining inline comments (test assertion, help case, --retry help text, cancel args, test.toml defaults) are all quick fixes.
0474207 to
3ff5a77
Compare
3ff5a77 to
30d284d
Compare
30d284d to
d8652c2
Compare
d8652c2 to
8462709
Compare
8462709 to
80144e6
Compare
80144e6 to
d96e64f
Compare
Add the experimental `air` command group as the Go port surface for the Python `air` CLI. Every subcommand (run, status, list, logs, cancel, register-image) is registered as a stub that returns a not-implemented error; the real implementations land in later milestones. The package lives under experimental/air/cmd (imported as aircmd), matching the layout of the other experimental features (aitools, genie, postgres); cmd/experimental/ keeps only the dispatcher. TEST_PACKAGES in Taskfile.yml gains ./experimental/air/... so the unit tests keep running after the move. Includes unit tests for the command-tree wiring and the not-implemented stubs, plus an acceptance test exercising the stubs end-to-end. Co-authored-by: Isaac
d96e64f to
6c80f23
Compare
|
Thanks for the review, I have made the changes and updated the branch with the changes. Regarding your questions:
Yes, the seventh subcommand in the original air CLI is the One more thing I updated: the latest name for the |
Rename the run-details subcommand from `status` to `get`, matching the Python air CLI's current `air get run` naming (it replaced `get status`). Renames the file, constructor, command name, and updates the stub/help/unimplemented tests and goldens accordingly. Co-authored-by: Isaac
ben-hansen-db
left a comment
There was a problem hiding this comment.
LGTM with one nit that affects a couple places
| cmd.Args = func(cmd *cobra.Command, args []string) error { | ||
| switch { | ||
| case all && len(args) > 0: | ||
| return &root.InvalidArgsError{Command: cmd, Message: "cannot combine RUN_ID arguments with --all"} |
There was a problem hiding this comment.
nit: to disambiguate with mlflow run ID say JOB_RUN_ID here and below
| cmd.Flags().IntVar(&lines, "lines", 10000, "For completed runs, print the last N lines") | ||
| cmd.Flags().IntVar(&retry, "retry", -1, "View logs from a specific retry attempt; -1 means latest") | ||
| cmd.Flags().StringVar(&downloadTo, "download-to", "", "Download all logs to this directory instead of printing") | ||
| cmd.Flags().BoolVar(&review, "review", false, "Download logs from all nodes and filter for error signatures") |
There was a problem hiding this comment.
--review is hidden in the Python CLI (help=argparse.SUPPRESS). If it's meant to stay internal, add cmd.Flags().MarkHidden("review") to match.
There was a problem hiding this comment.
fixed, thanks for the catch!
|
|
||
| cmd.Flags().StringVar(&scope, "scope", "", "Databricks secret scope holding registry credentials") | ||
| cmd.Flags().StringVar(&key, "key", "", "Databricks secret key holding registry credentials") | ||
| cmd.Flags().BoolVar(&interactiveAuth, "interactive-authenticate", false, "Prompt for registry credentials and store them as a secret") |
There was a problem hiding this comment.
Python exposes both -i and --interactive-authenticate; the -i short alias was dropped here. Consider BoolVarP(&interactiveAuth, "interactive-authenticate", "i", ...).
There was a problem hiding this comment.
fixed, thanks for the catch!
Rename the RUN_ID arg placeholder to JOB_RUN_ID across get/logs/cancel to disambiguate it from other run identifiers. Hide the `logs --review` flag to match the Python CLI (help=argparse.SUPPRESS), and add the `-i` shorthand for `register-image --interactive-authenticate`. Co-authored-by: Isaac


Changes
cmd/experimental/air/package containing an air parent command plus 7 stub subcommands: run, status, list, logs, cancel, register-imageWhy
The AI runtime CLI ships today as a separately installed Python wheel with its own auth, output, and packaging. Folding it into the main Go CLI gives users one databricks install with consistent profiles, authentication, and -o json output, and removes a parallel toolchain to maintain. Landing the package scaffold first lets the individual commands be ported in small, reviewable PRs (status is next) instead of one large drop. Every stub is wired and navigable, so the command tree and registration are reviewable now without functional code.
Tests
test with:
go test ./cmd/experimental/air/...go test ./acceptance -run 'TestAccept/experimental/air'