Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions acceptance/experimental/air/run-submit/output.txt
Original file line numberDiff line numberDiff line change
Expand Up@@ -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",
Expand Down
6 changes: 1 addition & 5 deletions experimental/air/cmd/runsubmit.go
Original file line numberDiff line numberDiff line change
Expand Up@@ -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
Expand Down
14 changes: 7 additions & 7 deletions experimental/air/cmd/runsubmit_test.go
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,6 +2,7 @@ package aircmd

import (
"encoding/json"
"path/filepath"
"strings"
"testing"

Expand DownExpand Up@@ -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) {
Expand Down
Loading