Skip to content

Commit 89bf0cc

Browse files
committed
pipelines run_as
1 parent 9eafee2 commit 89bf0cc

File tree

3 files changed

+5
-41
lines changed

3 files changed

+5
-41
lines changed

acceptance/bundle/migrate/runas/out.plan.json

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,7 @@
55
"serial": 5,
66
"plan": {
77
"resources.pipelines.foo": {
8-
"action": "update",
9-
"new_state": {
10-
"value": {
11-
"catalog": "main",
12-
"channel": "CURRENT",
13-
"deployment": {
14-
"kind": "BUNDLE",
15-
"metadata_file_path": "/Workspace/Users/[USERNAME]/.bundle/dabs_revenue-[UNIQUE_NAME]/production/state/metadata.json"
16-
},
17-
"edition": "ADVANCED",
18-
"libraries": [
19-
{
20-
"notebook": {
21-
"path": "/Workspace/Users/[USERNAME]/.bundle/dabs_revenue-[UNIQUE_NAME]/production/files/sql"
22-
}
23-
}
24-
],
25-
"name": "DABs Revenue Pipeline",
26-
"run_as": {
27-
"service_principal_name": "[UUID]"
28-
},
29-
"serverless": true,
30-
"target": "team_eng_deco"
31-
}
32-
},
8+
"action": "skip",
339
"remote_state": {
3410
"creator_user_name": "[USERNAME]",
3511
"last_modified": [UNIX_TIME_MILLIS],
@@ -60,7 +36,8 @@
6036
},
6137
"changes": {
6238
"run_as": {
63-
"action": "update",
39+
"action": "skip",
40+
"reason": "field_triggers",
6441
"old": {
6542
"service_principal_name": "[UUID]"
6643
},

acceptance/bundle/migrate/runas/output.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,7 @@ Consider using a adding a top-level permissions section such as the following:
119119
See https://docs.databricks.com/dev-tools/bundles/permissions.html to learn more about permission configuration.
120120
in databricks.yml:5:3
121121

122-
update pipelines.foo
123-
124-
Plan: 0 to add, 1 to change, 0 to delete, 1 unchanged
122+
Plan: 0 to add, 0 to change, 0 to delete, 2 unchanged
125123

126124
>>> DATABRICKS_BUNDLE_ENGINE= [CLI] bundle plan -o json
127125
Recommendation: permissions section should explicitly include the current deployment identity '[USERNAME]' or one of its groups

bundle/direct/dresources/pipeline.go

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -125,20 +125,9 @@ func (*ResourcePipeline) FieldTriggers() map[string]deployplan.ActionType {
125125
"storage": deployplan.ActionTypeRecreate,
126126
"ingestion_definition.connection_name": deployplan.ActionTypeRecreate,
127127
"ingestion_definition.ingestion_gateway_id": deployplan.ActionTypeRecreate,
128+
"run_as": deployplan.ActionTypeSkip,
128129
}
129130

130-
/*
131-
132-
if !isLocal {
133-
// We've seen that run_as is not consistently set by the backend
134-
// TF also ignores it (by not copying it here:
135-
// https://github.com/databricks/terraform-provider-databricks/blob/15e951f976e3857d9f01651c4b2513657f137796/pipelines/resource_pipeline.go#L304-L317
136-
// TODO: Rather than skipping, consider ignoring the change if run_as is not present but still triggering an update if run_as is different.
137-
result["run_as"] = deployplan.ActionTypeSkip
138-
}
139-
140-
*/
141-
142131
return result
143132
}
144133

0 commit comments

Comments
 (0)