Skip to content

air run: package code_source tarball via DABs artifact upload#6015

Open
vinchenzo-db wants to merge 1 commit into
mainfrom
air-cli-tar-snapshot
Open

air run: package code_source tarball via DABs artifact upload#6015
vinchenzo-db wants to merge 1 commit into
mainfrom
air-cli-tar-snapshot

Conversation

@vinchenzo-db

@vinchenzo-db vinchenzo-db commented Jul 21, 2026

Copy link
Copy Markdown

Package the code_source working tree into a tarball and upload it through DABs' artifact-upload plumbing (libraries.ReplaceWithRemotePath + libraries.Upload over a minimal in-memory bundle), rewriting ai_runtime_task.code_source_path to the uploaded remote path. The packaging + upload orchestration is CLI-owned (experimental/air/cmd, OWNERS = us); it only reuses DABs' uploader so we don't reimplement workspace/volume upload.

snapshot_dabs.go: build the plain-tar tarball (createPlainTarball), carry it as a file-valued code_source_path on a minimal bundle, and drive the DABs upload. runsubmit.go swaps the old raw-filer snapshot upload for this. Removes the retired raw-filer upload path (snapshot.go uploader, snapshot_test.go).

Tar snapshotting only; git pinning follows in the next PR (its git helpers are removed here and reintroduced there).

Co-authored-by: Isaac

Changes

Why

Tests

image
# v.chen at ip-10-90-29-234 in ~/databricks-cli (git:air-cli-git-pinning) [19:09:56]
$ cd /home/v.chen/databricks-cli
go build -o /tmp/dbcli-air ./main.go
# v.chen at ip-10-90-29-234 in ~/databricks-cli (git:air-cli-git-pinning) [19:10:32]
$ rm -rf /tmp/air-e2e && mkdir -p /tmp/air-e2e/src
cat > /tmp/air-e2e/src/train.py <<'PY'
import os
print("cwd:", os.getcwd(), "CODE_SOURCE_PATH:", os.environ.get("CODE_SOURCE_PATH"))
PY
cat > /tmp/air-e2e/train.yaml <<'YAML'
experiment_name: vchen_clistack_e2e
command: cd $CODE_SOURCE_PATH && python train.py
compute:
  accelerator_type: GPU_1xA10
  num_accelerators: 1
environment:
  version: "4"
  dependencies: []
code_source:
  type: snapshot
  snapshot:
    root_path: src
YAML
# v.chen at ip-10-90-29-234 in ~/databricks-cli (git:air-cli-git-pinning) [19:10:41]
$ cd /tmp/air-e2e
/tmp/dbcli-air experimental air run -f train.yaml -p dbc-04ac0685-8857
Uploading src.tar.gz...
Submitted run 282829443240803
View at: https://dbc-04ac0685-8857.staging.cloud.databricks.com/jobs/runs/282829443240803
# v.chen at ip-10-90-29-234 in /tmp/air-e2e (git:) [19:10:58]
$ /tmp/dbcli-air workspace list /Workspace/Users/v.chen@databricks.com/.air/repo_snapshots/.internal -p dbc-04ac0685-8857
ID                Type  Language  Path
4370802146211389  FILE            /Workspace/Users/v.chen@databricks.com/.air/repo_snapshots/.internal/src.tar.gz
# v.chen at ip-10-90-29-234 in /tmp/air-e2e (git:) [19:15:46]
$ /tmp/dbcli-air experimental air get 282829443240803 -p dbc-04ac0685-8857

╭─ Configuration ────────────────────────────────────────────────╮
│                                                                │
│  experiment_name: vchen_clistack_e2e                           │
│  command: cd $CODE_SOURCE_PATH && python train.py              │
│  compute:                                                      │
│    accelerator_type: GPU_1xA10                                 │
│    num_accelerators: 1                                         │
│  environment:                                                  │
│    version: "4"                                                │
│    dependencies: []                                            │
│  code_source:                                                  │
│    type: snapshot                                              │
│    snapshot:                                                   │
│      root_path: src                                            │
│                                                                │
╰────────────────────────────────────────────────────────────────╯

╭─ Metadata ─────────────────────────────────────────────────────╮
│                                                                │
│  Run ID        282829443240803                                 │
│  Status        ● SUCCESS                                       │
│  Submitted     2026-07-21 19:10 UTC                            │
│  Retries       0                                               │
│  Max Retries   0                                               │
│  Duration      1m 22s                                          │
│  Experiment    vchen_clistack_e2e                              │
│  MLflow Run    vchen_clistack_e2e-350226244858021              │
│  User          v.chen@databricks.com                           │
│  Accelerators  1x A10                                          │
│  Environment   N/A                                             │
│                                                                │
╰────────────────────────────────────────────────────────────────╯

Run URL:    https://dbc-04ac0685-8857.staging.cloud.databricks.com/jobs/runs/282829443240803?o=3360802220363900
MLflow URL: https://dbc-04ac0685-8857.staging.cloud.databricks.com/ml/experiments/4370802146211390/runs/6e7fcbb599764aab8fd1f0a050ca6860
# v.chen at ip-10-90-29-234 in /tmp/air-e2e (git:) [19:16:29]
$ 

Package the code_source working tree into a tarball and upload it through DABs'
artifact-upload plumbing (libraries.ReplaceWithRemotePath + libraries.Upload over
a minimal in-memory bundle), rewriting ai_runtime_task.code_source_path to the
uploaded remote path. The packaging + upload orchestration is CLI-owned
(experimental/air/cmd, OWNERS = us); it only reuses DABs' uploader so we don't
reimplement workspace/volume upload.

snapshot_dabs.go: build the plain-tar tarball (createPlainTarball), carry it as a
file-valued code_source_path on a minimal bundle, and drive the DABs upload.
runsubmit.go swaps the old raw-filer snapshot upload for this. Removes the retired
raw-filer upload path (snapshot.go uploader, snapshot_test.go).

Tar snapshotting only; git pinning follows in the next PR (its git helpers are
removed here and reintroduced there).

Co-authored-by: Isaac
@github-actions

Copy link
Copy Markdown
Contributor

Waiting for approval

Based on git history, these people are best suited to review:

  • @riddhibhagwat-db -- recent work in experimental/air/cmd/

Eligible reviewers: @apeforest, @ben-hansen-db, @bfontain, @lu-wang-dl, @maggiewang-db, @panchalhp-db, @pardis-beikzadeh-db

Suggestions based on git history. See OWNERS for ownership rules.

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.

1 participant