Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
3066eb7
[air] Prototype: air run/list/cancel/get via DABs (convert -> deploy …
vinchenzo-db Jul 15, 2026
a12413e
[air] Make DABs the default (and only) submit path for air run
vinchenzo-db Jul 15, 2026
f01b540
[air] Deliver code_source via DABs immutable_folder; trim comments
vinchenzo-db Jul 15, 2026
e05d89e
[air] Add unit tests for the DABs deploy-path helpers
vinchenzo-db Jul 15, 2026
f711157
[air] Deliver env vars only via the common Jobs env-var API (no sidecar)
vinchenzo-db Jul 15, 2026
e8780b8
[air] Restore env-var sidecar dual-write alongside the common API
vinchenzo-db Jul 15, 2026
4b68158
[air] Fix lint: maps.Copy, testifylint, in converter + test
vinchenzo-db Jul 16, 2026
f66ebd8
[air] Run command.sh from the synced code dir so code_source works
vinchenzo-db Jul 16, 2026
920c552
[air] Remove dead snapshot code-upload machinery
vinchenzo-db Jul 16, 2026
3128180
[air] Emit job permissions from config + add --permissions flag
vinchenzo-db Jul 16, 2026
2a7f1ab
[air] Update acceptance tests for the DABs run path
vinchenzo-db Jul 16, 2026
8f887e3
[air] Always upload requirements.yaml so no-dependency runs work
vinchenzo-db Jul 17, 2026
4ac0822
[air] Simplify air list to a single runs/list scan
vinchenzo-db Jul 17, 2026
83228e4
[air] Verb-noun commands + bundle management (list/get/delete)
vinchenzo-db Jul 17, 2026
e8e8440
[air] Make air list fast: drop the per-row MLflow-link column
vinchenzo-db Jul 17, 2026
46725b4
Revert "[air] Make air list fast: drop the per-row MLflow-link column"
vinchenzo-db Jul 17, 2026
6828306
[air] Use the server-side AI-Runtime run filter, fall back to scan
vinchenzo-db Jul 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions acceptance/experimental/air/get-ai-runtime/output.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

=== get (text)
>>> [CLI] experimental air get 123
>>> [CLI] experimental air get run 123

╭─ Configuration ────────────────────────────────────────────────╮
│ │
Expand Down Expand Up @@ -35,7 +35,7 @@ Run URL: [DATABRICKS_URL]/jobs/runs/123?o=[NUMID]
MLflow URL: [DATABRICKS_URL]/ml/experiments/exp1/runs/run1

=== get (json)
>>> [CLI] experimental air get 123 -o json
>>> [CLI] experimental air get run 123 -o json
{
"v": 1,
"ts": "[TIMESTAMP]",
Expand Down
4 changes: 2 additions & 2 deletions acceptance/experimental/air/get-ai-runtime/script
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ $CLI workspace mkdirs "/Workspace/Users/user@example.com/.air/cli_launch/my-exp/
$CLI workspace import "/Workspace/Users/user@example.com/.air/cli_launch/my-exp/my-exp_abc/training_config.yaml" --file training_config.yaml --format AUTO &> LOG.import

title "get (text)"
trace $CLI experimental air get 123
trace $CLI experimental air get run 123

title "get (json)"
trace $CLI experimental air get 123 -o json
trace $CLI experimental air get run 123 -o json
8 changes: 4 additions & 4 deletions acceptance/experimental/air/get/output.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

=== get (text)
>>> [CLI] experimental air get 123
>>> [CLI] experimental air get run 123

╭─ Configuration ────────────────────────────────────────────────╮
│ │
Expand Down Expand Up @@ -35,7 +35,7 @@ Run URL: [DATABRICKS_URL]/jobs/runs/123?o=[NUMID]
MLflow URL: [DATABRICKS_URL]/ml/experiments/exp1/runs/run1

=== get (json)
>>> [CLI] experimental air get 123 -o json
>>> [CLI] experimental air get run 123 -o json
{
"v": 1,
"ts": "[TIMESTAMP]",
Expand All @@ -52,13 +52,13 @@ MLflow URL: [DATABRICKS_URL]/ml/experiments/exp1/runs/run1
}

=== invalid run id
>>> [CLI] experimental air get notanumber
>>> [CLI] experimental air get run notanumber
Error: invalid JOB_RUN_ID "notanumber": must be a positive integer

Exit code: 1

=== invalid run id (json)
>>> [CLI] experimental air get notanumber -o json
>>> [CLI] experimental air get run notanumber -o json
{
"v": 1,
"ts": "[TIMESTAMP]",
Expand Down
8 changes: 4 additions & 4 deletions acceptance/experimental/air/get/script
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
title "get (text)"
trace $CLI experimental air get 123
trace $CLI experimental air get run 123

title "get (json)"
trace $CLI experimental air get 123 -o json
trace $CLI experimental air get run 123 -o json

title "invalid run id"
errcode trace $CLI experimental air get notanumber
errcode trace $CLI experimental air get run notanumber

title "invalid run id (json)"
errcode trace $CLI experimental air get notanumber -o json
errcode trace $CLI experimental air get run notanumber -o json
11 changes: 6 additions & 5 deletions acceptance/experimental/air/help/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ Usage:

Available Commands:
cancel Cancel one or more runs
get Show status, configuration, and timing details for a specific run
list List your active runs for the current profile (use --all-status for finished runs)
delete Delete a resource (bundle)
get Show details for a specific resource (run or bundle)
list List a collection of resources (runs or bundles)
logs Stream or fetch logs for a run
register-image Mirror a Docker image into the workspace registry
run Submit a training workload from a YAML config
Expand All @@ -29,17 +30,17 @@ Global Flags:
Use "databricks experimental air [command] --help" for more information about a command.

=== list help
>>> [CLI] experimental air list --help
>>> [CLI] experimental air list runs --help
List your active runs for the current profile (use --all-status for finished runs)

Usage:
databricks experimental air list [flags]
databricks experimental air list runs [flags]

Flags:
--all-status Show runs in all states (default: active only)
--all-users Show runs from all users
--filter stringArray Filter runs, e.g. experiment=foo* (repeatable)
-h, --help help for list
-h, --help help for runs
--limit int Maximum number of runs to show (default 20)

Global Flags:
Expand Down
2 changes: 1 addition & 1 deletion acceptance/experimental/air/help/script
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ title "help"
trace $CLI experimental air --help

title "list help"
trace $CLI experimental air list --help
trace $CLI experimental air list runs --help
29 changes: 19 additions & 10 deletions acceptance/experimental/air/list/output.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@

=== list (text)
>>> [CLI] experimental air list
Run ID Experiment Status Started Duration MLflow User Accelerators
[NUMID] qwen-train ● SUCCESS [TIMESTAMP] 12s …/runs/run1 [USERNAME] 8x H100
>>> [CLI] experimental air list runs
Run ID Experiment Status Started Duration MLflow User Accelerators
[NUMID] qwen-train ● RUNNING [TIMESTAMP] [DURATION] …/runs/run1 [USERNAME] 8x H100

=== list (json)
>>> [CLI] experimental air list -o json
>>> [CLI] experimental air list runs -o json
{
"v": 1,
"ts": "[TIMESTAMP]",
Expand All @@ -15,21 +15,22 @@
"run_id": "[NUMID]",
"run_name": "qwen-train",
"user": "[USERNAME]",
"status": "SUCCESS",
"status": "RUNNING",
"started_at": "[TIMESTAMP]",
"is_sweep": false
}
]
}
}

=== list --all-status (text, via AiTrainingService index)
>>> [CLI] experimental air list --all-status
Run ID Experiment Status Started Duration MLflow User Accelerators
[NUMID] qwen-train ● SUCCESS [TIMESTAMP] 12s …/runs/run1 [USERNAME] 8x H100
=== list --all-status (text)
>>> [CLI] experimental air list runs --all-status
Run ID Experiment Status Started Duration MLflow User Accelerators
[NUMID] qwen-train ● RUNNING [TIMESTAMP] [DURATION] …/runs/run1 [USERNAME] 8x H100
[NUMID] llama-train ● SUCCESS [TIMESTAMP] 1m 11s …/runs/run1 [USERNAME] 1x A10

=== list --all-status (json)
>>> [CLI] experimental air list --all-status -o json
>>> [CLI] experimental air list runs --all-status -o json
{
"v": 1,
"ts": "[TIMESTAMP]",
Expand All @@ -39,6 +40,14 @@
"run_id": "[NUMID]",
"run_name": "qwen-train",
"user": "[USERNAME]",
"status": "RUNNING",
"started_at": "[TIMESTAMP]",
"is_sweep": false
},
{
"run_id": "[NUMID]",
"run_name": "llama-train",
"user": "[USERNAME]",
"status": "SUCCESS",
"started_at": "[TIMESTAMP]",
"is_sweep": false
Expand Down
10 changes: 5 additions & 5 deletions acceptance/experimental/air/list/script
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
title "list (text)"
trace $CLI experimental air list
trace $CLI experimental air list runs

title "list (json)"
trace $CLI experimental air list -o json
trace $CLI experimental air list runs -o json

title "list --all-status (text, via AiTrainingService index)"
trace $CLI experimental air list --all-status
title "list --all-status (text)"
trace $CLI experimental air list runs --all-status

title "list --all-status (json)"
trace $CLI experimental air list --all-status -o json
trace $CLI experimental air list runs --all-status -o json
69 changes: 29 additions & 40 deletions acceptance/experimental/air/list/test.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,26 @@
[EnvMatrix]
DATABRICKS_BUNDLE_ENGINE = []

# Disable the on-disk run cache so --all-status output is deterministic across runs.
[Env]
DATABRICKS_CACHE_ENABLED = "false"
# A running run's duration is measured against now (no end_time), so mask the
# hours-minutes-seconds cell to keep the golden deterministic.
[[Repls]]
Old = '\d+h \d+m \d+s'
New = "[DURATION]"
Order = 20

# The SDK occasionally probes host reachability with a HEAD request; stub it so
# the test is deterministic.
[[Server]]
Pattern = "HEAD /"
Response.Body = ''

# `air list` reads Jobs runs/list directly (expand_tasks), filtering to AIR runs.
# The current runs carry an ai_runtime_task (not modeled by the typed SDK), which
# is why the CLI parses the response raw. Both runs belong to the default user
# (tester@databricks.com, from the built-in scim/v2/Me handler). The second run
# has no AI task and must be filtered out.
# `air list` reads Jobs runs/list (expand_tasks), filtering to AIR runs. It first
# tries the server-side AI-Runtime filter (filter=runType=AI_RUNTIME); this fake
# ignores query params and serves the same body, exercising the parse + client-side
# filtering (AIR task-shape, active-only). All runs belong to the default user
# (tester@databricks.com, from the built-in scim/v2/Me handler). qwen-train is
# RUNNING so it shows in the active default; the terminated run shows only under
# --all-status; the notebook run has no AI task and is filtered out.
[[Server]]
Pattern = "GET /api/2.2/jobs/runs/list"
Response.Body = '''
Expand All @@ -27,8 +32,7 @@ Response.Body = '''
"run_name": "qwen-train",
"creator_user_name": "tester@databricks.com",
"start_time": 1717608759000,
"end_time": 1717608771000,
"state": {"life_cycle_state": "TERMINATED", "result_state": "SUCCESS"},
"state": {"life_cycle_state": "RUNNING"},
"tasks": [{
"run_id": 334747067049497,
"ai_runtime_task": {
Expand All @@ -37,6 +41,21 @@ Response.Body = '''
}
}]
},
{
"run_id": 334747067049400,
"run_name": "llama-train",
"creator_user_name": "tester@databricks.com",
"start_time": 1717608700000,
"end_time": 1717608771000,
"state": {"life_cycle_state": "TERMINATED", "result_state": "SUCCESS"},
"tasks": [{
"run_id": 334747067049401,
"ai_runtime_task": {
"experiment": "/Users/tester@databricks.com/llama-train",
"deployments": [{"compute": {"accelerator_type": "GPU_1xA10", "accelerator_count": 1}}]
}
}]
},
{
"run_id": 999000999000,
"run_name": "not-an-air-run",
Expand All @@ -55,33 +74,3 @@ Pattern = "GET /api/2.2/jobs/runs/get-output"
Response.Body = '''
{"ai_runtime_task_output": {"mlflow_experiment_id": "exp1", "mlflow_run_id": "run1"}}
'''

# `air list --all-status` scoped to the current user is served by the
# AiTrainingService index: it returns cheap (job_run_id, submit_time) pairs, which
# the CLI orders and then hydrates into full runs via runs/get.
[[Server]]
Pattern = "GET /api/2.0/ai-training/workflows"
Response.Body = '''
{"training_workflows": [{"job_run_id": "334747067049496", "submit_time": "2024-06-05T17:32:39Z"}]}
'''

# runs/get hydrates one index id into the same shape as a runs/list element.
[[Server]]
Pattern = "GET /api/2.2/jobs/runs/get"
Response.Body = '''
{
"run_id": 334747067049496,
"run_name": "qwen-train",
"creator_user_name": "tester@databricks.com",
"start_time": 1717608759000,
"end_time": 1717608771000,
"state": {"life_cycle_state": "TERMINATED", "result_state": "SUCCESS"},
"tasks": [{
"run_id": 334747067049497,
"ai_runtime_task": {
"experiment": "/Users/tester@databricks.com/qwen-train",
"deployments": [{"compute": {"accelerator_type": "GPU_8xH100", "accelerator_count": 8}}]
}
}]
}
'''
2 changes: 0 additions & 2 deletions acceptance/experimental/air/run-submit/databricks.yml

This file was deleted.

3 changes: 0 additions & 3 deletions acceptance/experimental/air/run-submit/out.test.toml

This file was deleted.

46 changes: 0 additions & 46 deletions acceptance/experimental/air/run-submit/output.txt

This file was deleted.

11 changes: 0 additions & 11 deletions acceptance/experimental/air/run-submit/run.yaml.tmpl

This file was deleted.

18 changes: 0 additions & 18 deletions acceptance/experimental/air/run-submit/script

This file was deleted.

Loading
Loading