Skip to content
Draft
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
6 changes: 1 addition & 5 deletions experimental/air/cmd/runsubmit.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,7 @@
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,

Check failure on line 60 in experimental/air/cmd/runsubmit.go

View workflow job for this annotation

GitHub Actions / lint

unknown field CodeSourcePath in struct literal of type "github.com/databricks/databricks-sdk-go/service/jobs".AiRuntimeTask

Check failure on line 60 in experimental/air/cmd/runsubmit.go

View workflow job for this annotation

GitHub Actions / validate-generated

unknown field CodeSourcePath in struct literal of type jobs.AiRuntimeTask

Check failure on line 60 in experimental/air/cmd/runsubmit.go

View workflow job for this annotation

GitHub Actions / task test (linux, terraform)

unknown field CodeSourcePath in struct literal of type jobs.AiRuntimeTask

Check failure on line 60 in experimental/air/cmd/runsubmit.go

View workflow job for this annotation

GitHub Actions / task test (macos, terraform)

unknown field CodeSourcePath in struct literal of type jobs.AiRuntimeTask

Check failure on line 60 in experimental/air/cmd/runsubmit.go

View workflow job for this annotation

GitHub Actions / task test (linux, direct)

unknown field CodeSourcePath in struct literal of type jobs.AiRuntimeTask

Check failure on line 60 in experimental/air/cmd/runsubmit.go

View workflow job for this annotation

GitHub Actions / task test (windows, direct)

unknown field CodeSourcePath in struct literal of type jobs.AiRuntimeTask

Check failure on line 60 in experimental/air/cmd/runsubmit.go

View workflow job for this annotation

GitHub Actions / task test (macos, direct)

unknown field CodeSourcePath in struct literal of type jobs.AiRuntimeTask

Check failure on line 60 in experimental/air/cmd/runsubmit.go

View workflow job for this annotation

GitHub Actions / task test (windows, terraform)

unknown field CodeSourcePath in struct literal of type jobs.AiRuntimeTask
// 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 number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

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

Expand Down Expand Up @@ -192,13 +193,12 @@
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)+"/")

Check failure on line 200 in experimental/air/cmd/runsubmit_test.go

View workflow job for this annotation

GitHub Actions / lint

at.CodeSourcePath undefined (type *"github.com/databricks/databricks-sdk-go/service/jobs".AiRuntimeTask has no field or method CodeSourcePath)
assert.True(t, strings.HasSuffix(at.CodeSourcePath, ".tar.gz"), at.CodeSourcePath)

Check failure on line 201 in experimental/air/cmd/runsubmit_test.go

View workflow job for this annotation

GitHub Actions / lint

at.CodeSourcePath undefined (type *"github.com/databricks/databricks-sdk-go/service/jobs".AiRuntimeTask has no field or method CodeSourcePath) (typecheck)
}

func TestSubmitWorkloadGuards(t *testing.T) {
Expand Down
Loading