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
2 changes: 1 addition & 1 deletion acceptance/bundle/run_as/job_default/out.test.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion acceptance/bundle/run_as/job_default/test.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Badness = "run_as is still set even though it's not in bundle and not in reset request"
Ignore = [".databricks/.gitignore"]

Local = false
Local = true
Cloud = true
RecordRequests = true

Expand Down
8 changes: 8 additions & 0 deletions libs/testserver/jobs.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,14 @@ func (s *FakeWorkspace) JobsReset(req Request) Response {
return Response{StatusCode: 403, Body: "{}"}
}

// Known cloud quirk (see the test's Badness note): jobs/reset is a full
// replace, but omitting run_as from new_settings does NOT clear it — cloud
// keeps the previously configured identity. Mirror that so the local
// testserver matches cloud against one golden.
if request.NewSettings.RunAs == nil {
request.NewSettings.RunAs = prevjob.Settings.RunAs
}

s.Jobs[jobId] = jobs.Job{
JobId: jobId,
CreatorUserName: prevjob.CreatorUserName,
Expand Down
Loading