Skip to content

air: reject code_source include_paths entries that match no files - #7643

Merged
dimk0 merged 6 commits into
mainfrom
cnxt-2649-include-paths-unmatched
Nov 17, 2026
Merged

dimk0 merged 6 commits into
mainfrom
cnxt-2649-include-paths-unmatched

Conversation

@dimk0

@dimk0 dimk0 commented Nov 15, 2026 •

Copy link
Copy Markdown
Member

Changes

  • air run: for a working-tree snapshot (no code_source.git), reject code_source.include_paths entries that select no files, and name them, before packaging. Commit-pinned snapshots already reject missing include paths. Glob patterns, pathspec magic (:!x, :(exclude)x, :/x) and backslash escapes are left to git, which matches them as patterns.
  • Drop listing entries the tarball writer does not pack (directories such as a nested git repository or a submodule), so the empty and unmatched checks see what is uploaded.
  • Reject listed files outside root_path, which pathspec magic such as :(top)x can select.
  • The all-entries-empty error from air: refuse to upload an empty code_source snapshot #7570 still fires first. Its messages now say that nested git repositories and submodules add no files, and both errors suggest git check-ignore -v only when root_path is in a git repository.

Why

git ls-files ignores a pathspec that matches nothing, so a mistyped or stale entry was dropped from the snapshot without a warning, --dry-run passed, and the run failed on the node after compute was provisioned. A realistic case is the AI Runtime cookbook's getting-started Ray recipes, which list the shared bootstrap and the recipe directory in include_paths: include_paths: [ray_bootstrap.sh, my_job] for a my-job directory uploaded only ray_bootstrap.sh.

Replaces #7639, opened from a fork where CI could not get its OIDC token.

Tests

  • TestSnapshotFiles_IncludePathMatching accepts ., ./, a file, ? and [...] globs, and :!/:(exclude) exclusions with the expected files, and rejects [data_v2, data] naming only data.
  • TestSnapshotFiles_NestedRepoSelectsNoFiles and TestSnapshotFiles_RejectsPathspecOutsideRoot cover nested repositories and the containment check; TestSnapshotFiles_AcceptsBackslashEscapedIncludePath (not on Windows) and TestSnapshotFiles_OmitsIgnoreRuleHintOutsideGit cover backslash escapes and the hint. The earlier rejection and accepted-forms tests still pass.
  • Each behavior (the . shortcut, the path-component boundary, the glob, magic and backslash skips, the nested-repository skip, containment) fails its test when removed.
  • acceptance/air/run adds two dry-run cases: an include_paths entry that selects no files next to one that does, and a :(top) pathspec that selects a file outside root_path. Both fail against main's snapshot_package.go, where the dry runs succeed.
  • go test ./cmd/air/... and go test ./acceptance -run TestAccept/air pass, and golangci-lint run ./cmd/air/... reports no issues. Locally TestLogsCommandRepeatsRunLinkAfterStreaming fails on main too when DATABRICKS_WORKSPACE_ID is exported; it passes with the variable unset.
  • Not covered here: for a non-git root_path, ls-files runs without -C, so the listing depends on the working directory. Run from a subdirectory of root_path, it lists the wrong files: v1.26.0 can upload an empty snapshot, and with this change an include_paths entry that exists can be reported as selecting no files. That predates this change; air: list a non-git code_source root_path from root_path, not the working directory #7646 adds -C.

This pull request and its description were written by Isaac.

dimk0 and others added 4 commits November 14, 2026 23:42
For a working-tree snapshot, git ls-files silently ignores a pathspec that
matches nothing, so a mistyped or stale include_paths entry was left out of
the snapshot. The run then failed on the node after compute was provisioned.
Commit-pinned snapshots already reject missing include_paths; working-tree
snapshots now do the same before packaging.

Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
- Skip the unmatched-entry check for pathspec magic (":!x", ":(exclude)x",
  ":/x") and backslash escapes, as for globs. These are patterns, and an
  exclusion can never select a file, so the check rejected valid configs.
- Drop entries that the tarball writer does not pack (directories such as a
  nested git repository or a submodule) from the listing, so the empty and
  unmatched checks see what is uploaded.
- Reject listed files outside root_path, which pathspec magic such as
  ":(top)x" can select.
- Reword the error: it lists only the unmatched entries, and empty
  directories, nested repositories and submodules add no files.
- Cover the "." shortcut, the path-component boundary, globs, exclusions,
  nested repositories and the containment check in tests.

Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
@github-actions github-actions Bot added the AIR Databricks AI Runtime CLI label Nov 15, 2026
@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Integration test report

Commit: 144f772

Run: 43777443208

Env 💚​RECOVERED ✅​pass 🙈​skip Time
💚​ aws linux-2core-8gb 1 270 16 3:35
💚​ aws-windows-latest-4core-16gb 1 272 14 3:28
💚​ azure linux-2core-8gb 1 269 16 3:41
💚​ azure-windows-latest-4core-16gb 1 271 14 3:28
💚​ gcp linux-2core-8gb 1 270 16 3:39
💚​ gcp-windows-latest-4core-16gb 1 272 14 3:10
Test Name aws linux-2core-8gb aws-windows-latest-4core-16gb azure linux-2core-8gb azure-windows-latest-4core-16gb gcp linux-2core-8gb gcp-windows-latest-4core-16gb
💚​ TestAccept 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
Top 3 slowest tests (at least 2 minutes):
duration env testname
3:23 azure-windows-latest-4core-16gb TestAccept
3:23 aws-windows-latest-4core-16gb TestAccept
3:04 gcp-windows-latest-4core-16gb TestAccept

dimk0 and others added 2 commits November 15, 2026 07:25
… repositories

- Only suggest `git check-ignore -v` when root_path is in a git repository;
  outside one the command fails.
- The empty-snapshot errors now say that nested git repositories and
  submodules add no files, since such entries no longer count as files.
- Test a backslash-escaped entry, which git reads as a pattern, and the hint
  outside git.

Co-authored-by: Isaac <no-reply@databricks.com>
Extend the air/run dry-run script with the two include_paths errors this
PR adds: an entry that selects no files next to one that does, and a
:(top) pathspec that selects a file outside root_path. Both cases run in
the git repo the script already creates, so the first error carries the
check-ignore hint.

Co-authored-by: Isaac <no-reply@databricks.com>
@github-actions

Copy link
Copy Markdown
Contributor

Commit: 144f772ce | Workflow run

Regression test report

Selected 1 changed tests (limit=20, 0 not selected)

1 tests: regression=1 unreleased=0 coverage=0 failing=0
test branch main (20fef7c) latest (v1.26.0)
TestAccept/air/run ✅ ❌ ❌
TestAccept/air/run: branch ✅ | main (20fef7c) ❌ | latest (v1.26.0) ❌

main (20fef7c):

acceptance_test.go:1374: Diff:
        --- air/run/output.txt
        +++ /tmp/TestAcceptairrun262637244/002/output.txt
        @@ -58,59 +58,9 @@
         === include_paths entry that selects no files is rejected
         
         >>> [CLI] air run -f include-unmatched.yaml --dry-run
        -Error: code_source include_paths select no files under [TEST_TMP_DIR]: data. Check that these paths exist under root_path and hold files git does not ignore (`git check-ignore -v <file>` shows the rule for a file); empty directories, nested git repositories and submodules add no files
        +Dry run: code_source snapshot would include 1 file(s).
        +Dry run: configuration for "smoke-test" is valid; not submitting.
         
        -Tip: use the --debug flag to see more details and a trace of this error:
        -  databricks --debug air run …
        +Unexpected success
         
        -=== include_paths pathspec that selects files outside root_path is rejected
        -
        ->>> [CLI] air run -f include-outside-root.yaml --dry-run
        -Error: code_source include_paths select "../valid.yaml", which is outside root_path [TEST_TMP_DIR]/src
        -
        -Tip: use the --debug flag to see more details and a trace of this error:
        -  databricks --debug air run …
        -
        -=== git-ignored root_path is rejected instead of selecting no files
        -
        ->>> [CLI] air run -f ignored-root.yaml --dry-run
        -Error: code_source snapshot of [TEST_TMP_DIR]/.scratch/proj contains no files; refusing to upload an empty snapshot: root_path is ignored by git (.gitignore:1:.scratch/), and the snapshot only includes files git does not ignore. Move the project out of the ignored directory, un-ignore it, or change code_source.root_path. Inspect the rule with `git -C [TEST_TMP_DIR]/.scratch/proj check-ignore -v .`
        -
        -Tip: use the --debug flag to see more details and a trace of this error:
        -  databricks --debug air run …
        -
         Exit code: 1
        -
        -=== git.remote is rejected
        -
        ->>> [CLI] air run -f git-remote.yaml --dry-run
        -Error: git.remote is no longer supported: the snapshot archives your local copy, so a branch resolves to its local HEAD. To deploy a specific committed revision, use git.commit
        -
        -Tip: use the --debug flag to see more details and a trace of this error:
        -  databricks --debug air run …
        -
        -Exit code: 1
        -
        -=== invalid config is rejected
        -
        ->>> [CLI] air run -f invalid.yaml --dry-run
        -Error: invalid experiment_name "bad.name": only alphanumeric characters, hyphens (-), and underscores (_) are allowed
        -
        -Tip: use the --debug flag to see more details and a trace of this error:
        -  databricks --debug air run …
        -
        -Exit code: 1
        -
        -=== missing --file
        -
        ->>> [CLI] air run --dry-run
        -Error: required flag(s) "file" not set
        -
        -Exit code: 1
        -
        -=== experimental path directs users to the top-level command
        -
        ->>> [CLI] experimental air run -f valid.yaml --dry-run
        -Error: the AIR commands have moved out of experimental; use "databricks air" instead
        -
        -Exit code: 1
        
    acceptance_test.go:1164: Test produced unexpected files:
        .git/COMMIT_EDITMSG
        .git/HEAD
        .git/config
        .git/description
        .git/hooks/applypatch-msg.sample
        .git/hooks/commit-msg.sample
        .git/hooks/fsmonitor-watchman.sample
        .git/hooks/post-update.sample
        .git/hooks/pre-applypatch.sample
        .git/hooks/pre-commit.sample
        .git/hooks/pre-merge-commit.sample
        .git/hooks/pre-push.sample
        .git/hooks/pre-rebase.sample
        .git/hooks/pre-receive.sample
        .git/hooks/prepare-commit-msg.sample
        .git/hooks/push-to-checkout.sample
        .git/hooks/sendemail-validate.sample
        .git/hooks/update.sample
        .git/index
        .git/info/exclude
        .git/logs/HEAD
        .git/logs/refs/heads/main
        .git/objects/11/ffaffad96c4f0c6bf97e45bf3c26484b81a3ba
        .git/objects/3f/86ab51815820beeade888a2e5b8b8295577b88
        .git/objects/83/0f0f7fb5dda35f10d2f6cabffa8ab26e9d9589
        .git/objects/c8/59094afdfabaac03fb2f7841190baea745c770
        .git/refs/heads/main
FAIL

latest (v1.26.0):

acceptance_test.go:1374: Diff:
        --- air/run/output.txt
        +++ /tmp/TestAcceptairrun473311862/002/output.txt
        @@ -52,65 +52,13 @@
         === code_source config passes validation and reports the selected files
         
         >>> [CLI] air run -f with-code-source.yaml --dry-run
        -Dry run: code_source snapshot would include 1 file(s).
         Dry run: configuration for "smoke-test" is valid; not submitting.
         
         === include_paths entry that selects no files is rejected
         
         >>> [CLI] air run -f include-unmatched.yaml --dry-run
        -Error: code_source include_paths select no files under [TEST_TMP_DIR]: data. Check that these paths exist under root_path and hold files git does not ignore (`git check-ignore -v <file>` shows the rule for a file); empty directories, nested git repositories and submodules add no files
        +Dry run: configuration for "smoke-test" is valid; not submitting.
         
        -Tip: use the --debug flag to see more details and a trace of this error:
        -  databricks --debug air run …
        +Unexpected success
         
        -=== include_paths pathspec that selects files outside root_path is rejected
        -
        ->>> [CLI] air run -f include-outside-root.yaml --dry-run
        -Error: code_source include_paths select "../valid.yaml", which is outside root_path [TEST_TMP_DIR]/src
        -
        -Tip: use the --debug flag to see more details and a trace of this error:
        -  databricks --debug air run …
        -
        -=== git-ignored root_path is rejected instead of selecting no files
        -
        ->>> [CLI] air run -f ignored-root.yaml --dry-run
        -Error: code_source snapshot of [TEST_TMP_DIR]/.scratch/proj contains no files; refusing to upload an empty snapshot: root_path is ignored by git (.gitignore:1:.scratch/), and the snapshot only includes files git does not ignore. Move the project out of the ignored directory, un-ignore it, or change code_source.root_path. Inspect the rule with `git -C [TEST_TMP_DIR]/.scratch/proj check-ignore -v .`
        -
        -Tip: use the --debug flag to see more details and a trace of this error:
        -  databricks --debug air run …
        -
         Exit code: 1
        -
        -=== git.remote is rejected
        -
        ->>> [CLI] air run -f git-remote.yaml --dry-run
        -Error: git.remote is no longer supported: the snapshot archives your local copy, so a branch resolves to its local HEAD. To deploy a specific committed revision, use git.commit
        -
        -Tip: use the --debug flag to see more details and a trace of this error:
        -  databricks --debug air run …
        -
        -Exit code: 1
        -
        -=== invalid config is rejected
        -
        ->>> [CLI] air run -f invalid.yaml --dry-run
        -Error: invalid experiment_name "bad.name": only alphanumeric characters, hyphens (-), and underscores (_) are allowed
        -
        -Tip: use the --debug flag to see more details and a trace of this error:
        -  databricks --debug air run …
        -
        -Exit code: 1
        -
        -=== missing --file
        -
        ->>> [CLI] air run --dry-run
        -Error: required flag(s) "file" not set
        -
        -Exit code: 1
        -
        -=== experimental path directs users to the top-level command
        -
        ->>> [CLI] experimental air run -f valid.yaml --dry-run
        -Error: the AIR commands have moved out of experimental; use "databricks air" instead
        -
        -Exit code: 1
        
    acceptance_test.go:1164: Test produced unexpected files:
        .git/COMMIT_EDITMSG
        .git/HEAD
        .git/config
        .git/description
        .git/hooks/applypatch-msg.sample
        .git/hooks/commit-msg.sample
        .git/hooks/fsmonitor-watchman.sample
        .git/hooks/post-update.sample
        .git/hooks/pre-applypatch.sample
        .git/hooks/pre-commit.sample
        .git/hooks/pre-merge-commit.sample
        .git/hooks/pre-push.sample
        .git/hooks/pre-rebase.sample
        .git/hooks/pre-receive.sample
        .git/hooks/prepare-commit-msg.sample
        .git/hooks/push-to-checkout.sample
        .git/hooks/sendemail-validate.sample
        .git/hooks/update.sample
        .git/index
        .git/info/exclude
        .git/logs/HEAD
        .git/logs/refs/heads/main
        .git/objects/3f/86ab51815820beeade888a2e5b8b8295577b88
        .git/objects/45/fc0b181befe420f2aa3058fe6f78e641e27570
        .git/objects/83/0f0f7fb5dda35f10d2f6cabffa8ab26e9d9589
        .git/objects/c8/59094afdfabaac03fb2f7841190baea745c770
        .git/refs/heads/main
FAIL

@dimk0
dimk0 marked this pull request as ready for review November 16, 2026 00:17
@dimk0
dimk0 requested review from a team as code owners November 16, 2026 00:17
@dimk0
dimk0 requested a review from denik November 16, 2026 00:17
@dimk0
dimk0 added this pull request to the merge queue Nov 17, 2026
Merged via the queue into main with commit 1de313f Nov 17, 2026
28 checks passed
@dimk0
dimk0 deleted the cnxt-2649-include-paths-unmatched branch November 17, 2026 04:25
@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

❌ Integration test report

Commit: 1de313f

Run: 44017183535

Env ❌​FAIL 🟨​KNOWN 🔄​flaky 💚​RECOVERED ✅​pass 🙈​skip Time
❌​ aws linux-2core-8gb 9 1 12 1613 1335 206:29
💚​ aws-windows-latest-4core-16gb 13 1541 1362 206:33
❌​ azure linux-2core-8gb 9 1 4 12 1589 1343 207:01
🔄​ azure-windows-latest-4core-16gb 4 13 1517 1370 208:58
❌​ gcp linux-2core-8gb 9 1 12 1600 1341 190:29
🔄​ gcp-windows-latest-4core-16gb 3 12 1526 1368 212:40
32 interesting tests: 12 RECOVERED, 10 flaky, 9 FAIL, 1 KNOWN
Test Name aws linux-2core-8gb aws-windows-latest-4core-16gb azure linux-2core-8gb azure-windows-latest-4core-16gb gcp linux-2core-8gb gcp-windows-latest-4core-16gb
🟨​ TestAccept 🟨​K 💚​R 🟨​K 💚​R 🟨​K 🔄​f
❌​ TestAccept/bundle/config-remote-sync/cluster_policy_cross_target ❌​F 🙈​s ❌​F 🙈​s ❌​F 🙈​s
❌​ TestAccept/bundle/config-remote-sync/cluster_policy_cross_target/DMS= ❌​F ❌​F ❌​F
❌​ TestAccept/bundle/config-remote-sync/cluster_policy_cross_target/DMS=true ❌​F ❌​F ❌​F
❌​ TestAccept/bundle/config-remote-sync/cluster_policy_remote_addition ❌​F 🙈​s ❌​F 🙈​s ❌​F 🙈​s
❌​ TestAccept/bundle/config-remote-sync/cluster_policy_remote_addition/DMS= ❌​F ❌​F ❌​F
❌​ TestAccept/bundle/config-remote-sync/cluster_policy_remote_addition/DMS=true ❌​F ❌​F ❌​F
🔄​ TestAccept/bundle/config-remote-sync/multiple_resources/DMS= ✅​p 🔄​f ✅​p
🔄​ TestAccept/bundle/config-remote-sync/multiple_resources/DMS=true ✅​p 🔄​f ✅​p
❌​ TestAccept/bundle/config-remote-sync/policy_injected_cluster_fields ❌​F 🙈​s ❌​F 🙈​s ❌​F 🙈​s
❌​ TestAccept/bundle/config-remote-sync/policy_injected_cluster_fields/DMS= ❌​F ❌​F ❌​F
❌​ TestAccept/bundle/config-remote-sync/policy_injected_cluster_fields/DMS=true ❌​F ❌​F ❌​F
💚​ TestAccept/bundle/resources/apps/lifecycle-started 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
💚​ TestAccept/bundle/resources/apps/lifecycle-started-omitted 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
💚​ TestAccept/bundle/resources/apps/lifecycle-started-omitted/DMS= 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
💚​ TestAccept/bundle/resources/apps/lifecycle-started-omitted/DMS=true 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
💚​ TestAccept/bundle/resources/apps/lifecycle-started-toggle 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
💚​ TestAccept/bundle/resources/apps/lifecycle-started-toggle/DMS= 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
💚​ TestAccept/bundle/resources/apps/lifecycle-started-toggle/DMS=true 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
💚​ TestAccept/bundle/resources/apps/lifecycle-started/DMS= 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
💚​ TestAccept/bundle/resources/apps/lifecycle-started/DMS=true 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
🔄​ TestAccept/bundle/resources/clusters/deploy/data_security_mode ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f
🔄​ TestAccept/bundle/resources/clusters/deploy/data_security_mode/DMS=true ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f
🔄​ TestAccept/bundle/resources/materialization_sets/immutable ✅​p ✅​p 🔄​f ✅​p ✅​p ✅​p
🔄​ TestAccept/bundle/resources/materialization_sets/immutable/DMS=true ✅​p ✅​p 🔄​f ✅​p ✅​p ✅​p
💚​ TestAccept/bundle/resources/postgres_synced_tables/recreate 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
💚​ TestAccept/bundle/resources/postgres_synced_tables/recreate/DMS= 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
💚​ TestAccept/bundle/resources/postgres_synced_tables/recreate/DMS=true 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
🔄​ TestAccept/bundle/resources/schemas/recreate_out_of_band ✅​p ✅​p ✅​p 🔄​f ✅​p ✅​p
🔄​ TestAccept/bundle/resources/schemas/recreate_out_of_band/DMS=true ✅​p ✅​p ✅​p 🔄​f ✅​p ✅​p
🔄​ TestAccept/bundle/resources/schemas/rename ✅​p ✅​p ✅​p 🔄​f ✅​p ✅​p
🔄​ TestAccept/bundle/resources/schemas/rename/DMS=true ✅​p ✅​p ✅​p 🔄​f ✅​p ✅​p
Top 50 slowest tests (at least 2 minutes):
duration env testname
11:57 gcp linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=
11:16 aws-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=true
10:07 aws linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=true
9:34 gcp linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=true
9:33 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=true
9:02 aws-windows-latest-4core-16gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=
8:57 aws linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=
8:52 azure-windows-latest-4core-16gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=true
8:51 aws-windows-latest-4core-16gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=true
8:49 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=
8:16 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=
8:12 azure linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=true
7:59 azure linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=
7:53 azure-windows-latest-4core-16gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=
7:43 gcp linux-2core-8gb TestAccept/bundle/resources/clusters/deploy/local_ssd_count/DMS=
7:42 gcp linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=true
7:42 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/deploy/local_ssd_count/DMS=
7:33 aws linux-2core-8gb TestAccept/bundle/config-remote-sync/multiple_resources/DMS=true
7:24 aws linux-2core-8gb TestAccept/bundle/invariant/no_drift/DMS=true/INPUT_CONFIG=cluster.yml.tmpl/READPLAN=
7:19 gcp linux-2core-8gb TestAccept/bundle/resources/clusters/deploy/local_ssd_count/DMS=true
7:17 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=true
7:15 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/deploy/local_ssd_count/DMS=true
7:12 gcp linux-2core-8gb TestAccept/bundle/config-remote-sync/multiple_resources/DMS=
7:12 gcp linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=
7:09 azure linux-2core-8gb TestAccept/bundle/config-remote-sync/multiple_resources/DMS=
7:08 aws linux-2core-8gb TestAccept/bundle/config-remote-sync/multiple_resources/DMS=
6:14 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DMS=
6:13 gcp linux-2core-8gb TestAccept/bundle/config-remote-sync/multiple_resources/DMS=true
6:03 aws-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=
5:46 azure linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=
5:41 aws linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=true
5:40 gcp linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DMS=true
5:38 aws linux-2core-8gb TestAccept/bundle/deploy/spark-jar-task/DMS=
5:35 aws linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=
5:31 azure-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=true
5:30 azure-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=
5:29 azure linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DMS=true
5:26 aws linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DMS=
5:21 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DMS=true
5:08 azure linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=true
5:08 gcp linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DMS=
4:53 azure-windows-latest-4core-16gb TestAccept/pipelines/run/refresh-flags
4:34 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/apps/inline_config/DMS=
4:33 azure linux-2core-8gb TestAccept/pipelines/run/refresh-flags
4:27 gcp linux-2core-8gb TestAccept/bundle/resources/apps/inline_config/DMS=true
4:26 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/apps/lifecycle-started-toggle/DMS=true
4:21 aws-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DMS=true
4:21 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/apps/lifecycle-started-omitted/DMS=
4:18 gcp-windows-latest-4core-16gb TestAccept/pipelines/run/refresh-flags
4:18 azure linux-2core-8gb TestAccept/bundle/deploy/spark-jar-task/DMS=

deco-sdk-tagging Bot added a commit that referenced this pull request Nov 19, 2026
## Release v1.27.0

### Notable Changes

 * `databricks aitools install`, `update` and `uninstall` now exit with code 1 when they do nothing they were asked to. `install` fails when it sets up nothing: no coding agent is detected, every agent is skipped or fails to install, or no skill in the release can be installed (also with `--path`). `update` fails when every update or check it attempts fails, and `uninstall` when every removal it attempts fails. Scripts that ran these commands as a best-effort step and relied on exit code 0 should handle the new exit code. ([#7481](#7481))
 * Add `file:<path>` selectors to `pipelines run` and pipeline `bundle run`. `--refresh` and `--full-refresh` now use space-separated lists, such as `--refresh "orders payments"`, instead of comma-separated lists. Single names containing spaces now require backticks, e.g. ``--refresh 'table:`order details`'``. ([#7184](#7184))
 * The Databricks CLI is now available on PyPI as `databricks`: run it with `uvx databricks`, or install it with `uv tool install databricks`, `pipx install databricks` or `pip install databricks`. The package contains only the prebuilt CLI binary. Uninstall the legacy `databricks-cli` package first, since both install a `databricks` command. ([#7704](#7704), [#7777](#7777))

### CLI

 * Add `databricks sandbox fs` commands (`cp`, `ls`, `cat`, `mkdir`, `rm`) to transfer files between your local filesystem and sandboxes using `<sandbox-id>:/path`. ([#7372](#7372))
 * `databricks fs` commands retry reads (stat, list, open) and deletes on DBFS and Volumes when the server returns a transient error or does not respond within the HTTP timeout. ([#7556](#7556))
 * Retry UC Volumes file operations (`fs cp`, `fs ls`, `fs rm`, bundle uploads to Volumes) when the Files API returns HTTP 408, 429, 502, 503 or 504 (for example "AWS S3 is throttling requests"), or on a transient network error; this regressed in v1.10.0. ([#7559](#7559))
 * Stop warning when the host metadata request (`/.well-known/databricks-config`) times out; the CLI already falls back to your config, and the message is still shown with `--debug`. ([#7752](#7752))
 * Add `databricks aitools auto-install disable` and `enable` to turn off (or back on) the automatic installation of Databricks AI tools on CLI upgrades. A global-scope `databricks aitools uninstall` also turns it off. ([#7701](#7701))
 * Stop printing the Databricks AI tooling install hint on `auth`, `configure`, `current-user me`, `version`, `help`, and shell-completion commands. ([#7452](#7452))
 * When Codex, Cursor, GitHub Copilot CLI, OpenCode, Gemini CLI, Antigravity, Pi, Goose or Kiro run the CLI without Databricks skills installed for that agent, the CLI now prints a one-line hint to install them with `databricks aitools install --agents <agent> --scope global`, previously shown only to Claude Code. ([#7586](#7586))
 * `databricks aitools install` now rejects an unknown `--agents` name before it shows the scope prompt, instead of after. ([#7469](#7469))
 * `databricks aitools install` no longer asks "Proceed?" after the agent picker; the picker selection confirms the plan. The picker title now shows the install scope, its hint says Enter installs, `--skills-only` runs label plugin agents "skills" and pre-check every agent whose config dir exists, and the plan summary after it is reduced to the scope line. ([#7478](#7478))
 * `databricks aitools install --output json` reports more specific `error_category` values: `SKILLS_FETCH_FAILED`, `RELEASE_LOOKUP_FAILED`, `RATE_LIMITED`, `MANIFEST_INVALID`, `STATE_INVALID` and `PLUGIN_CLI_TIMEOUT`. A coding agent CLI that does not answer in time is now reported as `timed out after <duration>`, followed by any stderr it wrote before it was stopped. ([#7475](#7475))
 * `databricks aitools install` no longer prompts when a coding agent runs it, even in a pseudo-terminal; it uses the non-interactive defaults instead and prints a note saying so. ([#7477](#7477))
 * `databricks aitools install` now prints the directory it installed skills into (for example `Installed 1 skill in ~/.databricks/aitools/skills.`), so agents can open the installed `SKILL.md` files without searching for them. ([#7668](#7668))
 * `databricks aitools install` now ends a failed install with a step to recover, in the text output and in a new `recovery` field of `--output json`. ([#7480](#7480))
 * `databricks aitools install` now installs plugins for the other coding agents even when installing skill files fails. ([#7479](#7479))
 * `databricks aitools install` now installs skill files for a detected coding agent whose CLI is not on PATH (for example a Claude Code desktop or IDE install), unless it already has the plugin, says how to switch to the plugin later, and warns when the current project also has the plugin. `databricks aitools update` no longer tries to install the plugin for such an agent, and no longer writes skill files next to a plugin that such an agent already has. ([#7482](#7482))
 * Fix `databricks aitools install` waiting a long time on an unreachable or slow workspace while it resolves authentication for telemetry; that wait is now limited to a few seconds. ([#7468](#7468))
 * `databricks aitools install`, `update` and `list` now refuse a skills manifest that names a skill or file outside the skills directory, before writing any skill files. A skill whose name or file paths are not portable is skipped with a warning, and `update` keeps its installed copy. ([#7722](#7722))
 * `databricks aitools install` and `databricks aitools update` refresh only the marketplace the Databricks plugin is listed in, so another unreachable marketplace no longer blocks them. When that refresh fails, both commands warn, install or update the plugin from the local copy of the marketplace, and record the plugin version as unknown. ([#7473](#7473))
 * `databricks aitools install` and `databricks aitools update` now wait up to 20 seconds instead of 5 for a coding agent's CLI to answer the plugin capability check, so a slow first start is less likely to report the agent as unavailable. ([#7472](#7472))
 * `databricks aitools install` no longer fails a plugin-only install when the lookup of the latest skills release on GitHub fails or is rate-limited. The plugin is installed and its version is recorded as unknown. ([#7474](#7474))
 * `databricks aitools` commands now send usage telemetry, and the CLI records when it recommends installing Databricks AI tools. When the configured workspace is slow or unreachable, `aitools install`, `update` and `uninstall` can take up to about 6 seconds longer, and `list`, `version` and runs that stop early up to about 3 seconds. Set `DATABRICKS_CLI_DISABLE_TELEMETRY=1` to opt out. ([#7467](#7467), [#7469](#7469), [#7470](#7470))
 * `databricks aitools install` and `databricks aitools update` now report a coding agent CLI shim (`.cmd` or `.bat`) on Windows that prints its plugin help and then exits with an error as `shim-exited-with-error`, with the command to run to see the error, instead of reporting the CLI as not on PATH. ([#7476](#7476))
 * `apps init` no longer suggests installing skills when every detected coding agent already has the Databricks plugin. ([#7467](#7467))
 * `databricks auth login` now gives up on the optional workspace lookup after about 5 seconds instead of retrying for about 5 minutes, and explains the fallback to the manual workspace ID prompt. ([#7522](#7522))
 * Throttle Claude Code's native plugin install hint separately from the text hint: it prints at most once per 10 minutes per session, so the install dialog still comes up when a subagent, a hook, or a command outside a Claude Code subprocess runs the session's first `databricks` command. ([#7692](#7692))
 * Print Claude Code's native plugin install hint alongside the text hint, so Claude Code offers a one-click install of the Databricks plugin. Claude Code now counts as having the tooling only when it loads it: skills only in `~/.databricks/aitools/skills` don't count, and a project- or local-scope plugin counts only when the CLI runs inside that project. `auth token`, `auth docker token` and CLI subprocesses no longer print install hints. ([#7585](#7585))
 * Interactive prompts and pagers now work in Git for Windows' bash and other MSYS2 shells when they run under ConPTY (the default since Git for Windows 2.47) or directly in a Windows console. ([#7699](#7699))
 * Add the `databricks feedback` command to send feedback about the CLI to Databricks. ([#7724](#7724))
 * Fix shell completion in `databricks fs` commands for local paths typed with a leading `./` or repeated separators, which previously offered no suggestions. ([#7679](#7679))
 * Fix a panic in `databricks labs` commands when a non-string SDK setting such as `DATABRICKS_DEBUG_HEADERS` or `DATABRICKS_RATE_LIMIT` is set in the environment. ([#7673](#7673))
 * Fix a panic in `databricks labs install` for projects whose `labs.yml` has no `install` section. ([#7673](#7673))
 * `NO_COLOR` no longer disables prompts, spinners or the list pager; they run without color. ([#7700](#7700))
 * Add the Beta `databricks pipelines test` command, which runs the tests of a pipeline, and the `testing` property of pipelines in bundles. ([#7429](#7429))
 * Add `databricks sandbox forward`, which serves an app running in a sandbox at a local URL. ([#7395](#7395))
 * Bound the whole telemetry upload at exit, including config resolution and authentication, by its timeout, so a stalled auth or telemetry endpoint no longer keeps a command from exiting. ([#7467](#7467))
 * `databricks version --check` now suggests `databricks aitools install` on stderr when a coding agent is detected without the Databricks plugin or skills. ([#7471](#7471))

### AI Runtime

 * `air get -o json` now reports `PENDING` while the run waits for compute, matching `air list`, and includes the run's `status_message`. ([#7455](#7455))
 * Wrap long failure reasons and log lines in the `air list` info and logs panes, keep the MLflow link (labeled with its retry) when a run's last retry failed before starting, and point `air logs` at earlier retries when the last one has no logs. ([#7456](#7456))
 * `databricks air logs --node` now reports an out-of-range node index when it can determine the run's node count, instead of looking like a successful run with no logs. ([#7516](#7516))
 * Add experiment, duration, accelerator, and dashboard metadata to `air list --output json`. For retried runs, `started_at` now reports the latest attempt, matching `air get`. ([#7568](#7568))
 * `air list` shortens MLflow run names and unnamed-run IDs by keeping their end behind a leading `…`, and its columns no longer overflow on wide (for example CJK) text; `air get` shows an unnamed run's full MLflow run ID. ([#7582](#7582))
 * Shrink the Experiment and User columns of the interactive `air list` table to fit the terminal width, keeping the end of a shortened experiment name. ([#7583](#7583))
 * Show the experiment, accelerators and configuration in the `air list` info pane for runs where it showed `N/A`. ([#7587](#7587))
 * Strip terminal control characters from the MLflow run, experiment and user names shown by `air list` and `air get`, so a run name cannot clear or retitle the terminal of whoever lists it. ([#7601](#7601))
 * `air logs`, `air get`, and `air run --watch` no longer make an extra credential-check request before fetching the run, and `air get` reuses the configured workspace ID instead of looking it up. ([#7613](#7613))
 * `air list` no longer waits on extra current-user requests before listing runs, which makes the default list about 150ms faster. ([#7615](#7615))
 * `air list --all-status` requests larger index pages, so it makes far fewer round trips once the server supports `page_size`. ([#7616](#7616))
 * Fit the interactive `air list` table to narrow terminals: when the Experiment and User columns are at their floors, shorten Started to `MM-DD HH:MM` and size the MLflow column to its labels, then hide Accelerators, User, MLflow and Progress in that order, naming the hidden columns in the hint line. ([#7629](#7629))
 * `air get -o json` now includes `mlflow_run_id` and `mlflow_experiment_id`, so a run can be handed to MLflow-based steps without parsing `mlflow_url`. They identify the MLflow run `mlflow_url` links to, including one from an earlier retry that `mlflow_retry` names. ([#7636](#7636))
 * `air get` and the `air list` info pane now show the environment of runs on the Databricks AI environment (`databricks_ai_v*`) instead of `N/A`. ([#7637](#7637))
 * `air run` now rejects a `code_source.include_paths` path that selects no files instead of uploading a snapshot without it; glob patterns and pathspec magic are left to git. ([#7643](#7643))
 * `air convert-to-dabs` now suggests the `--output-dir` that converts a working-tree workload whose `code_source.root_path` is outside the bundle directory, instead of suggesting `sync.paths`. ([#7644](#7644))
 * `air run` now lists a `code_source.root_path` outside a git repository relative to `root_path`, so running from a subdirectory of `root_path` no longer uploads an empty or partial snapshot. ([#7646](#7646))
 * `air list --all-status` now fills `--limit` past purged or inaccessible indexed runs. ([#7743](#7743))
 * `air run` now warns about missing PyTorch when a pinned snapshot's `include_paths` selects a Python file. ([#7744](#7744))
 * `air cancel JOB_RUN_ID` now rejects run IDs that are not AI Runtime runs instead of cancelling unrelated Jobs runs. In `-o json` output, the `failed[].error` text for a run that does not exist or that you cannot view now starts with `failed to get run <id>:` instead of the cancel API error. ([#7569](#7569))
 * `air get -o json` now reports `mlflow_retry` when the MLflow link comes from an earlier retry because the run's last retry never reached MLflow. ([#7620](#7620))
 * `databricks air run --help` now shows how to install the databricks-ai-runtime coding agent skill. ([#7652](#7652))
 * `air run --watch -o json` now reports each lifecycle `STATUS` transition once and never reports a non-terminal state after the run has ended, including when logs are served from MLflow artifacts. ([#7621](#7621))
 * `air convert-to-dabs` now explains the `--output-dir` workaround when `code_source.root_path` resolves to the bundle root, and notes when the generated job carries the default `max_retries`. ([#7579](#7579))
 * `air run` now refuses to upload a `code_source` snapshot that selects no files (for example when `root_path` is git-ignored) and explains the cause, and `--dry-run` runs the snapshot file selection and reports the file count. ([#7570](#7570))
 * Repeat the Jobs run link after live log streaming ends. ([#7571](#7571))
 * `air get -o json` includes run details including flat `accelerator_type` and `num_accelerators`. Use `--include-config` to include stored config, which may contain plaintext `env_variables` and parameters; downloads over 1 MiB are omitted, and config-dependent `max_retries` is otherwise null. ([#7624](#7624))
 * `air get` and the `air list` info pane no longer show `Max Retries 0` when the Jobs API leaves the task's retry limit out. For a run submitted with `air run`, the limit now comes from the run's uploaded config, shown as `3 (CLI default)` when the config doesn't set `max_retries`; it shows `N/A` when the limit can't be known (job runs, multi-container runs, legacy runs with no explicit value, or an unreadable config). ([#7623](#7623))
 * Reorganize `databricks air` help: subcommands are grouped by task, `air run` has examples, and YAML fields are listed under headings, with pool fields marked optional and `command`, `compute.num_accelerators`, and `compute.accelerator_type` correctly marked required. ([#7512](#7512))
 * `air run -h config` now lists the environment variables AI Runtime sets on every node (such as `MLFLOW_RUN_ID` and `CODE_SOURCE_PATH`), and `air logs --help` notes that `--download-to` cannot be combined with `--tail` or `--minutes`. ([#7655](#7655))
 * Support full workspace accelerator types in `air list` filters while preserving family matching, and reject invalid filter values. ([#7515](#7515))
 * `databricks air list --all-status` now warns when the AI Runtime run index is unavailable and it falls back to scanning Jobs runs. That fallback scan is capped at 250 runs, and a stuck index request fails after 15 seconds instead of retrying for minutes. `--all-status --filter user=<your email>` now uses the run index instead of scanning the workspace's full run history. ([#7619](#7619))
 * Return structured JSON errors for invalid `air list --filter` values when `-o json` is used. ([#7612](#7612))
 * `air list --all-status` no longer fails when a listed run has been purged. ([#7523](#7523))
 * **Behavior change:** `databricks air logs` now prints the logs available now and exits, also for an active run, matching `kubectl logs`, `docker logs` and `databricks apps logs`. Pass `--follow` (`-f`) to stream new lines until the run completes; `--tail N --follow` prints the last N lines first. `databricks air run --watch` still submits and streams. ([#7658](#7658))
 * `databricks air logs -o json` and `databricks air run --watch -o json` now emit a `WAITING` event, for example `{"type":"WAITING","message":"Waiting for accelerator compute capacity..."}`, when the reported waiting status changes. ([#7695](#7695))
 * `databricks air logs` on a run that ended in the last two minutes now waits for the log index to settle before printing, instead of sometimes dropping lines that were indexed late. ([#7663](#7663))
 * `air logs` and `air run --watch` now print the waiting status (for example `Waiting for accelerator compute capacity...`) as a line on stderr when stderr is not a terminal, instead of printing nothing until the run produces logs. ([#7657](#7657))
 * Route AIR log links to the MLflow Logs page instead of the hidden artifact path. ([#7491](#7491))
 * Invalid `compute.accelerator_type` errors and `air run -h config.compute` no longer list the CLI's built-in accelerator types, which could differ from the workspace's. ([#7520](#7520))
 * `databricks air --help` now notes that GPU pools are not required to run workloads. ([#7581](#7581))
 * `air run` now prints the job run URL with the `?o=<workspace-id>` suffix, matching `air get` and `air list`; `dashboard_url` in `air run -o json` and the `--watch` events gains it too. When `air list` cannot resolve the workspace ID, its links now omit `?o=` instead of ending in `?o=0`. ([#7573](#7573))
 * `databricks air run` now reports an unknown workload YAML key by its field path, suggests the closest valid field, and points to `-h config` instead of naming an internal Go type. ([#7574](#7574))
 * `air run` (including `--dry-run`) now warns before submitting when the `code_source` imports `torch` but PyTorch is not declared: the environment is the Standard environment (version 5 or later) with no `torch` dependency, so the run may fail after it waits for a GPU. ([#7656](#7656))

### Bundles

 * Add `isolation_mode` to the `catalogs` resource, so a catalog can be deployed as `OPEN` or `ISOLATED`. ([#7463](#7463))
 * `bundle validate` no longer warns when resource permissions and top-level or target permissions name the same principal. ([#7291](#7291))
 * Retry bundle file uploads, reads and deletes when the server does not respond within the HTTP timeout ("request timed out after ... of inactivity"). ([#7521](#7521))
 * Show how to recover when `bundle deploy` fails because an app's service principal does not exist or was deleted. ([#7533](#7533))
 * Retry transient server errors when creating Lakebase (`postgres_*`) resources in the direct deployment engine. ([#7557](#7557))
 * Fix `bundle plan` reporting the `spark_conf` and `custom_tags` the backend derives from `is_single_node: true` as drift on clusters. ([#7577](#7577))
 * Stop planning a spurious update for Lakeflow Connect pipelines whose `ingestion_definition.data_staging_options` is filled in by the backend. ([#7603](#7603))
 * Retry the root path check in `bundle destroy` on transient errors, so a dropped connection no longer fails the destroy. ([#7597](#7597))
 * Use the Lakebase branch when its create request times out but the branch was created, instead of failing the deploy, in the direct deployment engine. ([#7602](#7602))
 * Retry transient server errors when deleting resources in the direct deployment engine. ([#7708](#7708))
 * Use the Lakebase project when its create request times out but the project was created, instead of failing the deploy with "already exists", in the direct deployment engine. ([#7747](#7747))
 * Use the feature, model serving endpoint or dashboard that a create request created despite timing out, instead of failing the deploy, in the direct deployment engine. ([#7757](#7757))
 * Use the Lakebase role when its create request fails with a transient error but the role was created, instead of failing the deploy, in the direct deployment engine. ([#7767](#7767))
 * Use the MCP service, model service or model provider service that a create request created despite failing with a timeout, a 499 or a reset stream, instead of failing the deploy, in the direct deployment engine. Create recovery for features, serving endpoints and dashboards now also covers 499 and reset streams. ([#7782](#7782))
 * Retry app updates and deletes in the direct deployment engine when they fail with 400 BAD_REQUEST because the app compute is `UPDATING`, after waiting for the compute to settle. ([#7606](#7606))
 * Enable drift detection for `source_code_path` and `git_source` on apps. ([#6399](#6399))
 * `bundle destroy` and `bundle deploy` no longer fail with "internal error, missing in state" when the state holds an empty-ID entry left by an interrupted recreate in an older CLI. ([#7676](#7676))
 * Fix a feature whose `full_name` contains uppercase letters being recreated on every deploy. ([#7398](#7398))
 * Fix `bundle deployment bind` (and `bundle generate --bind`) failing with `no such node "resources.internal_immutable_snapshots.immutable"` when `workspace.sync_mode` is `immutable`, as reported in [#7306](#7306). ([#7329](#7329))
 * Retry creating the deployment lock (without `--force-lock`) when the request fails with a transient server error, times out ("request timed out after ... of inactivity") or loses its connection ("unexpected EOF"). ([#7594](#7594))
 * Fix a materialization set member whose `feature_name` contains uppercase letters failing to deploy, or recreating the set on every deploy. ([#7398](#7398))
 * Delete the old resource when its name follows a renamed schema. ([#7718](#7718))
 * Fix `pipelines dry-run` starting a real run when given a job KEY, and a crash in its shell completion. ([#7672](#7672))
 * Rename schemas in place; schemas and volumes follow a renamed catalog or schema. ([#7343](#7343))
 * Fix a panic when validating or deploying jobs with local libraries and serverless job clusters. ([#7725](#7725))
 * Fix `tgz` artifacts with `git` set producing an empty tarball or failing when the bundle is in a subdirectory of the git repository. ([#7674](#7674))
 * Apply `presets.trigger_pause_status` and the development mode pause default to `triggers[]` entries on jobs. ([#7450](#7450))

### Dependency Updates

 * Bump dependencies with known vulnerabilities. ([#7750](#7750))
 * Update the Go SDK to [v0.198.0](https://github.com/databricks/databricks-sdk-go/releases/tag/v0.198.0). ([#7530](#7530))
 * Update the Go SDK to [v0.199.0](https://github.com/databricks/databricks-sdk-go/releases/tag/v0.199.0). ([#7584](#7584))
 * Update the Go SDK to [v0.200.0](https://github.com/databricks/databricks-sdk-go/releases/tag/v0.200.0). ([#7653](#7653))
 * Update the Go SDK to [v0.201.0](https://github.com/databricks/databricks-sdk-go/releases/tag/v0.201.0). ([#7769](#7769))
idelafuente-oc pushed a commit to idelafuente-oc/cli that referenced this pull request Nov 20, 2026
…king directory (databricks#7646)

## Changes
`air run` lists the files of a `code_source.root_path` that isn't in a
git repository by running `git ls-files` against a temporary git
directory. That call now passes `-C <root_path>`, as the call for git
repositories already does, so the listing no longer depends on the
directory the CLI runs from.

Follow-up to databricks#7643, which notes this in its description. The two changes
are independent and can merge in either order.

## Why
Without `-C`, git resolves `include_paths` and prints file names
relative to the working directory. Run from a subdirectory of
`root_path`, for example the workload's own directory with `root_path:
..`, the snapshot silently drops files or packs a same-named file from
`root_path` instead:
- With `include_paths: [ray_bootstrap.sh, train]`, run from `train/`,
v1.26.0 uploads an empty snapshot. The run then fails on the node with
`Could not determine top-level component from tarball`. On `main`, the
empty-snapshot check rejects the upload instead, with an error that
names paths that exist.
- Without `include_paths`, run from `train/`, only `train/`'s files are
listed, and each is read from `root_path`: the snapshot holds the root's
`README.md` instead of `train/README.md`.

This affects copies of a project that aren't git checkouts, such as a
downloaded archive of the AI Runtime cookbook, whose getting-started Ray
recipes use `root_path: ..` and are run from their own directories. Git
checkouts already list relative to `root_path`.

## Tests
- `TestSnapshotFiles_NonGitRootFromSubdirectory` runs from `root/sub`,
where `sub/main.py` shadows `main.py`. With `include_paths: [main.py,
data]` it now selects `data/x.csv` and `main.py` (before: `main.py`
only); without `include_paths` it selects all three files (before:
`main.py` only).
- `acceptance/air/run` adds a dry run from a subdirectory of a non-git
`root_path`, which reports 2 files (before: 1).
- Both fail without the fix. `go test ./cmd/air/...` and `go test
./acceptance -run TestAccept/air` pass, and `golangci-lint` reports no
issues on `cmd/air`. `TestLogsCommandRepeatsRunLinkAfterStreaming` needs
`DATABRICKS_WORKSPACE_ID` unset locally, as on `main`.

This pull request and its description were written by Isaac.

---------

Co-authored-by: Isaac <no-reply@databricks.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AIR Databricks AI Runtime CLI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants