From 143b9628977463f6edbc5075b14e6d71fce3b0d6 Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Tue, 21 Jul 2026 08:33:05 +0000 Subject: [PATCH 1/2] Restore code_source_path wiring in the air run-submit command MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Terraform provider (v1.122.0) and SDK (v0.160.0) bumps dropped `code_source_path` from `ai_runtime_task`, and #5982 temporarily disabled its use in the `air` command. Re-enable the typed CodeSourcePath assignment in buildSubmitPayload and re-instate the corresponding test assertions. This does not build against SDK v0.160.0, which lacks jobs.AiRuntimeTask.CodeSourcePath; it is staged so it can be merged after the next SDK bump re-adds the field. The generated files (TF schema, dabs map, bundle schema, Python bindings, acceptance goldens) are intentionally left untouched — they reappear on codegen once the field returns. Co-authored-by: Isaac --- experimental/air/cmd/runsubmit.go | 6 +----- experimental/air/cmd/runsubmit_test.go | 14 +++++++------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/experimental/air/cmd/runsubmit.go b/experimental/air/cmd/runsubmit.go index 8dbeffc1098..8c0be55260d 100644 --- a/experimental/air/cmd/runsubmit.go +++ b/experimental/air/cmd/runsubmit.go @@ -57,11 +57,7 @@ func buildSubmitPayload(cfg *runConfig, commandPath, dlImage string, snap snapsh AcceleratorCount: cfg.Compute.NumAccelerators, }, }}, - // TEMP: CodeSourcePath was removed from jobs.AiRuntimeTask in SDK v0.160.0 and - // is expected to return in a later SDK bump. Until then the snapshot path - // (snap.CodeSourcePath) cannot be carried on the typed task. Re-wire it here - // once the field is regenerated. - // CodeSourcePath: snap.CodeSourcePath, + CodeSourcePath: snap.CodeSourcePath, // TEMP: git_state_path / git_diff_path are intentionally NOT sent. The typed // jobs.AiRuntimeTask (and its source proto, ai_runtime_task.proto) has no such // fields, so the typed SDK path cannot carry them. This is safe today because diff --git a/experimental/air/cmd/runsubmit_test.go b/experimental/air/cmd/runsubmit_test.go index cc39bdff89d..fd5103599df 100644 --- a/experimental/air/cmd/runsubmit_test.go +++ b/experimental/air/cmd/runsubmit_test.go @@ -2,6 +2,7 @@ package aircmd import ( "encoding/json" + "path/filepath" "strings" "testing" @@ -192,13 +193,12 @@ code_source: require.NoError(t, err) at := got.Tasks[0].AiRuntimeTask - require.NotNil(t, at) - // TEMP: CodeSourcePath was removed from jobs.AiRuntimeTask in SDK v0.160.0 and is - // expected to return in a later SDK bump. Until then the snapshot path cannot be - // carried on the typed task, so these assertions are disabled (see the TEMP note in - // buildSubmitPayload). The git_state sidecar upload is still covered by TestRunSnapshot. - // assert.Contains(t, at.CodeSourcePath, "/.air/repo_snapshots/"+filepath.Base(repo)+"/") - // assert.True(t, strings.HasSuffix(at.CodeSourcePath, ".tar.gz"), at.CodeSourcePath) + // The tarball path is under the user's repo_snapshots dir. git_state_path / + // git_diff_path are not asserted: the typed jobs.AiRuntimeTask has no such fields + // (see the TEMP note in buildSubmitPayload), so they aren't sent. The git_state + // sidecar file is still uploaded next to the tarball — covered by TestRunSnapshot. + assert.Contains(t, at.CodeSourcePath, "/.air/repo_snapshots/"+filepath.Base(repo)+"/") + assert.True(t, strings.HasSuffix(at.CodeSourcePath, ".tar.gz"), at.CodeSourcePath) } func TestSubmitWorkloadGuards(t *testing.T) { From 21c3f54777838383d10da9c261bec8ee1335580e Mon Sep 17 00:00:00 2001 From: Andrew Nester Date: Wed, 29 Jul 2026 17:33:18 +0200 Subject: [PATCH 2/2] update outputs --- acceptance/experimental/air/run-submit/output.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/acceptance/experimental/air/run-submit/output.txt b/acceptance/experimental/air/run-submit/output.txt index 0452d99b379..8d52eed1dab 100644 --- a/acceptance/experimental/air/run-submit/output.txt +++ b/acceptance/experimental/air/run-submit/output.txt @@ -23,6 +23,7 @@ View at: [DATABRICKS_URL]/jobs/runs/555 "tasks": [ { "ai_runtime_task": { + "code_source_path": "/Workspace/Users/[USERNAME]/.air/repo_snapshots/001/[SNAPSHOT_TARBALL]", "deployments": [ { "command_path": "/Workspace/Users/[USERNAME]/.air/cli_launch/submit-smoke/submit-smoke_[RUN_ID]/command.sh",