Skip to content

Warn when bundle run_as may lack file/resource access - #7313

Open
lennartkats-db wants to merge 3 commits into
mainfrom
lennart/warn-bundle-runas-file-access
Open

lennartkats-db wants to merge 3 commits into
mainfrom
lennart/warn-bundle-runas-file-access

Conversation

@lennartkats-db

@lennartkats-db lennartkats-db commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Changes

Warn when a bundle run_as identity may lack access to deployed files or resources. Suggest top-level CAN_VIEW, or folder-level CAN_READ for source-linked and Shared files. Top-level permissions also apply to bundle resources, including clusters (CAN_VIEW maps to CAN_ATTACH_TO).

$ databricks bundle deploy
Warning: run_as identity "sp_test" is not in bundle top-level permissions
  in databricks.yml:5:3

Add a top-level permission so this identity can access deployed files and resources:
  permissions:
    - service_principal_name: sp_test
      level: CAN_VIEW

Why

Access to a job or pipeline does not necessarily grant its run_as identity access to referenced files or resources such as clusters.

Tests

  • go test ./bundle/phases ./bundle/permissions -count=1
  • go test ./acceptance -run 'TestAccept/bundle/run_as' -count=1
  • go test ./acceptance -run 'TestAccept/bundle/telemetry/deploy-(experimental|run-as)' -count=1
  • go test ./acceptance -run 'TestAccept/bundle/migrate/command/runas/DMS=' -count=1

@lennartkats-db
lennartkats-db requested review from a team as code owners November 3, 2026 13:27
@github-actions github-actions Bot added the DABs DABs related issues label Nov 3, 2026
@lennartkats-db lennartkats-db changed the title [draft] Warn when bundle run_as may lack file access [draft] Warn when bundle run_as may lack file/resource access Nov 3, 2026
@lennartkats-db lennartkats-db changed the title [draft] Warn when bundle run_as may lack file/resource access Warn when bundle run_as may lack file/resource access Nov 3, 2026
@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Commit: dd70370de | Workflow run

Regression test report

Selected 12 changed tests (limit=20, 0 not selected)

21 tests: regression=19 unreleased=0 coverage=2 failing=0

test branch main (aae07ca) latest (v1.23.0)
TestAccept/bundle/migrate/command/runas/DMS= ✅ ❌ ❌
TestAccept/bundle/run_as/DMS= ✅ ❌ ❌
TestAccept/bundle/run_as/DMS=true ✅ ❌ ❌
TestAccept/bundle/run_as/allowed/regular_user/DMS= ✅ ❌ ❌
TestAccept/bundle/run_as/allowed/regular_user/DMS=true ✅ ❌ ❌
TestAccept/bundle/run_as/allowed/service_principal/DMS= ✅ ❌ ❌
TestAccept/bundle/run_as/allowed/service_principal/DMS=true ✅ ❌ ❌
TestAccept/bundle/run_as/dashboard_embed/DMS= ✅ ❌ ❌
TestAccept/bundle/run_as/dashboard_embed/DMS=true ✅ ❌ ❌
TestAccept/bundle/run_as/empty_override/DMS= ✅ ❌ ❌
TestAccept/bundle/run_as/empty_override/DMS=true ✅ ❌ ❌
TestAccept/bundle/run_as/empty_run_as_dict/DMS= ✅ ✅ ✅
TestAccept/bundle/run_as/empty_run_as_dict/DMS=true ✅ ✅ ✅
TestAccept/bundle/run_as/pipelines/regular_user/DMS= ✅ ❌ ❌
TestAccept/bundle/run_as/pipelines/regular_user/DMS=true ✅ ❌ ❌
TestAccept/bundle/run_as/pipelines/service_principal/DMS= ✅ ❌ ❌
TestAccept/bundle/run_as/pipelines/service_principal/DMS=true ✅ ❌ ❌
TestAccept/bundle/run_as/pipelines_legacy/DMS= ✅ ❌ ❌
TestAccept/bundle/run_as/pipelines_legacy/DMS=true ✅ ❌ ❌
TestAccept/bundle/telemetry/deploy-experimental/DMS= ✅ ❌ ❌
TestAccept/bundle/telemetry/deploy-run-as/DMS= ✅ ❌ ❌
TestAccept/bundle/migrate/command/runas/DMS=: branch ✅ | main (aae07ca) ❌ | latest (v1.23.0) ❌

main (aae07ca):

acceptance_test.go:1342: Diff:
        --- bundle/migrate/command/runas/output.txt
        +++ /tmp/TestAcceptbundlemigratecommandrunasDMS=2480312248/002/output.txt
        @@ -4,14 +4,6 @@
         >>> print_requests.py //pipelines
         
         >>> print_state.py
        -Warning: run_as identity "[UUID]" is not in bundle top-level permissions
        -  in databricks.yml:22:7
        -
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - service_principal_name: [UUID]
        -      level: CAN_VIEW
        -
         Recommendation: permissions section should explicitly include the current deployment identity '[USERNAME]' or one of its groups
         If it is not included, CAN_MANAGE permissions are only applied if the present identity is used to deploy.
         
        @@ -29,14 +21,6 @@
         >>> [CLI] pipelines get [UUID]
         
         >>> DATABRICKS_BUNDLE_ENGINE= [CLI] bundle deployment migrate
        -Warning: run_as identity "[UUID]" is not in bundle top-level permissions
        -  in databricks.yml:22:7
        -
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - service_principal_name: [UUID]
        -      level: CAN_VIEW
        -
         Recommendation: permissions section should explicitly include the current deployment identity '[USERNAME]' or one of its groups
         If it is not included, CAN_MANAGE permissions are only applied if the present identity is used to deploy.
         
        @@ -61,14 +45,6 @@
         >>> print_state.py
         
         >>> DATABRICKS_BUNDLE_ENGINE= [CLI] bundle plan
        -Warning: run_as identity "[UUID]" is not in bundle top-level permissions
        -  in databricks.yml:22:7
        -
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - service_principal_name: [UUID]
        -      level: CAN_VIEW
        -
         Recommendation: permissions section should explicitly include the current deployment identity '[USERNAME]' or one of its groups
         If it is not included, CAN_MANAGE permissions are only applied if the present identity is used to deploy.
         
        @@ -84,14 +60,6 @@
         Plan: 0 to add, 0 to change, 0 to delete, 2 unchanged
         
         >>> DATABRICKS_BUNDLE_ENGINE= [CLI] bundle plan -o json
        -Warning: run_as identity "[UUID]" is not in bundle top-level permissions
        -  in databricks.yml:22:7
        -
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - service_principal_name: [UUID]
        -      level: CAN_VIEW
        -
         Recommendation: permissions section should explicitly include the current deployment identity '[USERNAME]' or one of its groups
         If it is not included, CAN_MANAGE permissions are only applied if the present identity is used to deploy.
         
        @@ -106,14 +74,6 @@
         
         
         >>> DATABRICKS_BUNDLE_ENGINE= [CLI] bundle destroy --auto-approve
        -Warning: run_as identity "[UUID]" is not in bundle top-level permissions
        -  in databricks.yml:22:7
        -
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - service_principal_name: [UUID]
        -      level: CAN_VIEW
        -
         Recommendation: permissions section should explicitly include the current deployment identity '[USERNAME]' or one of its groups
         If it is not included, CAN_MANAGE permissions are only applied if the present identity is used to deploy.

latest (v1.23.0): same output as main (aae07ca)

TestAccept/bundle/run_as/DMS=: branch ✅ | main (aae07ca) ❌ | latest (v1.23.0) ❌

main (aae07ca):

acceptance_test.go:1342: Diff:
        --- bundle/run_as/output.txt
        +++ /tmp/TestAcceptbundlerun_asDMS=3007208044/002/output.txt
        @@ -8,14 +8,6 @@
         pipelines.pipeline_two: {"service_principal_name":"sp_override"}
         
         >>> [CLI] bundle validate -o json -t with_user_run_as
        -Warning: run_as identity "user_base" is not in bundle top-level permissions
        -  in databricks.yml:39:7
        -
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - user_name: user_base
        -      level: CAN_VIEW
        -
         jobs.job_one: {"user_name":"user_base"}
         jobs.job_three: {"user_name":"user_override"}
         jobs.job_two: {"service_principal_name":"sp_override"}
        @@ -24,14 +16,6 @@
         pipelines.pipeline_two: {"service_principal_name":"sp_override"}
         
         >>> [CLI] bundle validate -o json -t with_sp_run_as
        -Warning: run_as identity "sp_base" is not in bundle top-level permissions
        -  in databricks.yml:43:7
        -
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - service_principal_name: sp_base
        -      level: CAN_VIEW
        -
         jobs.job_one: {"service_principal_name":"sp_base"}
         jobs.job_three: {"user_name":"user_override"}
         jobs.job_two: {"service_principal_name":"sp_override"}

latest (v1.23.0): same output as main (aae07ca)

TestAccept/bundle/run_as/DMS=true: branch ✅ | main (aae07ca) ❌ | latest (v1.23.0) ❌

main (aae07ca):

acceptance_test.go:1342: Diff:
        --- bundle/run_as/output.txt
        +++ /tmp/TestAcceptbundlerun_asDMS=true1477755891/002/output.txt
        @@ -8,14 +8,6 @@
         pipelines.pipeline_two: {"service_principal_name":"sp_override"}
         
         >>> [CLI] bundle validate -o json -t with_user_run_as
        -Warning: run_as identity "user_base" is not in bundle top-level permissions
        -  in databricks.yml:39:7
        -
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - user_name: user_base
        -      level: CAN_VIEW
        -
         jobs.job_one: {"user_name":"user_base"}
         jobs.job_three: {"user_name":"user_override"}
         jobs.job_two: {"service_principal_name":"sp_override"}
        @@ -24,14 +16,6 @@
         pipelines.pipeline_two: {"service_principal_name":"sp_override"}
         
         >>> [CLI] bundle validate -o json -t with_sp_run_as
        -Warning: run_as identity "sp_base" is not in bundle top-level permissions
        -  in databricks.yml:43:7
        -
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - service_principal_name: sp_base
        -      level: CAN_VIEW
        -
         jobs.job_one: {"service_principal_name":"sp_base"}
         jobs.job_three: {"user_name":"user_override"}
         jobs.job_two: {"service_principal_name":"sp_override"}

latest (v1.23.0): same output as main (aae07ca)

TestAccept/bundle/run_as/allowed/regular_user/DMS=: branch ✅ | main (aae07ca) ❌ | latest (v1.23.0) ❌

main (aae07ca):

acceptance_test.go:1342: Diff:
        --- bundle/run_as/allowed/regular_user/output.txt
        +++ /tmp/TestAcceptbundlerun_asallowedregular_userDMS=1781871487/002/output.txt
        @@ -1,14 +1,6 @@
         
         >>> [CLI] bundle validate -o json
        -Warning: run_as identity "my_service_principal" is not in bundle top-level permissions
        -  in databricks.yml:5:3
         
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - service_principal_name: my_service_principal
        -      level: CAN_VIEW
        -
        -
         >>> jq .run_as
         {
           "service_principal_name": "my_service_principal"
        @@ -46,15 +37,7 @@
         }
         
         >>> [CLI] bundle validate -o json -t development
        -Warning: run_as identity "my_user_name" is not in bundle top-level permissions
        -  in databricks.yml:13:7
         
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - user_name: my_user_name
        -      level: CAN_VIEW
        -
        -
         >>> jq .run_as
         {
           "user_name": "my_user_name"

latest (v1.23.0): same output as main (aae07ca)

TestAccept/bundle/run_as/allowed/regular_user/DMS=true: branch ✅ | main (aae07ca) ❌ | latest (v1.23.0) ❌

main (aae07ca):

acceptance_test.go:1342: Diff:
        --- bundle/run_as/allowed/regular_user/output.txt
        +++ /tmp/TestAcceptbundlerun_asallowedregular_userDMS=true3012358139/002/output.txt
        @@ -1,14 +1,6 @@
         
         >>> [CLI] bundle validate -o json
        -Warning: run_as identity "my_service_principal" is not in bundle top-level permissions
        -  in databricks.yml:5:3
         
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - service_principal_name: my_service_principal
        -      level: CAN_VIEW
        -
        -
         >>> jq .run_as
         {
           "service_principal_name": "my_service_principal"
        @@ -46,15 +37,7 @@
         }
         
         >>> [CLI] bundle validate -o json -t development
        -Warning: run_as identity "my_user_name" is not in bundle top-level permissions
        -  in databricks.yml:13:7
         
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - user_name: my_user_name
        -      level: CAN_VIEW
        -
        -
         >>> jq .run_as
         {
           "user_name": "my_user_name"
        
FAIL

latest (v1.23.0): same output as main (aae07ca)

TestAccept/bundle/run_as/allowed/service_principal/DMS=: branch ✅ | main (aae07ca) ❌ | latest (v1.23.0) ❌

main (aae07ca):

acceptance_test.go:1342: Diff:
        --- bundle/run_as/allowed/service_principal/output.txt
        +++ /tmp/TestAcceptbundlerun_asallowedservice_principalDMS=1571532780/002/output.txt
        @@ -1,14 +1,6 @@
         
         >>> [CLI] bundle validate -o json
        -Warning: run_as identity "my_service_principal" is not in bundle top-level permissions
        -  in databricks.yml:5:3
         
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - service_principal_name: my_service_principal
        -      level: CAN_VIEW
        -
        -
         >>> jq .run_as
         {
           "service_principal_name": "my_service_principal"
        @@ -46,15 +37,7 @@
         }
         
         >>> [CLI] bundle validate -o json -t development
        -Warning: run_as identity "my_user_name" is not in bundle top-level permissions
        -  in databricks.yml:13:7
         
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - user_name: my_user_name
        -      level: CAN_VIEW
        -
        -
         >>> jq .run_as
         {
           "user_name": "my_user_name"

latest (v1.23.0): same output as main (aae07ca)

TestAccept/bundle/run_as/allowed/service_principal/DMS=true: branch ✅ | main (aae07ca) ❌ | latest (v1.23.0) ❌

main (aae07ca):

acceptance_test.go:1342: Diff:
        --- bundle/run_as/allowed/service_principal/output.txt
        +++ /tmp/TestAcceptbundlerun_asallowedservice_principalDMS=true1933766993/002/output.txt
        @@ -1,14 +1,6 @@
         
         >>> [CLI] bundle validate -o json
        -Warning: run_as identity "my_service_principal" is not in bundle top-level permissions
        -  in databricks.yml:5:3
         
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - service_principal_name: my_service_principal
        -      level: CAN_VIEW
        -
        -
         >>> jq .run_as
         {
           "service_principal_name": "my_service_principal"
        @@ -46,15 +37,7 @@
         }
         
         >>> [CLI] bundle validate -o json -t development
        -Warning: run_as identity "my_user_name" is not in bundle top-level permissions
        -  in databricks.yml:13:7
         
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - user_name: my_user_name
        -      level: CAN_VIEW
        -
        -
         >>> jq .run_as
         {
           "user_name": "my_user_name"

latest (v1.23.0): same output as main (aae07ca)

TestAccept/bundle/run_as/dashboard_embed/DMS=: branch ✅ | main (aae07ca) ❌ | latest (v1.23.0) ❌

main (aae07ca):

acceptance_test.go:1342: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1342
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1083
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:660
        	Error:      	Not equal: 
        	            	expected: "\n>>> errcode [CLI] bundle validate --var embed=false\nWarning: run_as identity \"sp-name\" is not in bundle top-level permissions\n  in databricks.yml:5:3\n\nAdd a top-level permission so this identity can access deployed files and resources:\n  permissions:\n    - service_principal_name: sp-name\n      level: CAN_VIEW\n\nName: dashboard_embed\nTarget: default\nWorkspace:\n  User: [USERNAME]\n  Path: /Workspace/Users/[USERNAME]/.bundle/dashboard_embed/default\n\nFound 1 warning\n\n>>> errcode [CLI] bundle validate --var embed=true\nError: dashboards with embed_credentials set to true do not support a setting a run_as user that is different from the owner.\nCurrent identity: [USERNAME]. Run as identity: sp-name.\nSee https://docs.databricks.com/dev-tools/bundles/run-as.html to learn more about the run_as property.\n  in databricks.yml:14:7\n\nName: dashboard_embed\nTarget: default\nWorkspace:\n  User: [USERNAME]\n  Path: /Workspace/Users/[USERNAME]/.bundle/dashboard_embed/default\n\nFound 1 error\n\nExit code: 1\n"
        	            	actual  : "\n>>> errcode [CLI] bundle validate --var embed=false\nName: dashboard_embed\nTarget: default\nWorkspace:\n  User: [USERNAME]\n  Path: /Workspace/Users/[USERNAME]/.bundle/dashboard_embed/default\n\nValidation OK!\n\n>>> errcode [CLI] bundle validate --var embed=true\nError: dashboards with embed_credentials set to true do not support a setting a run_as user that is different from the owner.\nCurrent identity: [USERNAME]. Run as identity: sp-name.\nSee https://docs.databricks.com/dev-tools/bundles/run-as.html to learn more about the run_as property.\n  in databricks.yml:14:7\n\nName: dashboard_embed\nTarget: default\nWorkspace:\n  User: [USERNAME]\n  Path: /Workspace/Users/[USERNAME]/.bundle/dashboard_embed/default\n\nFound 1 error\n\nExit code: 1\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -2,10 +2,2 @@
        	            	 >>> errcode [CLI] bundle validate --var embed=false
        	            	-Warning: run_as identity "sp-name" is not in bundle top-level permissions
        	            	-  in databricks.yml:5:3
        	            	-
        	            	-Add a top-level permission so this identity can access deployed files and resources:
        	            	-  permissions:
        	            	-    - service_principal_name: sp-name
        	            	-      level: CAN_VIEW
        	            	-
        	            	 Name: dashboard_embed
        	            	@@ -16,3 +8,3 @@
        	            	 
        	            	-Found 1 warning
        	            	+Validation OK!
        	            	 
        	Test:       	TestAccept/bundle/run_as/dashboard_embed/DMS=
        	Messages:   	bundle/run_as/dashboard_embed/output.txt vs /tmp/TestAcceptbundlerun_asdashboard_embedDMS=3619061114/002/output.txt

latest (v1.23.0): same output as main (aae07ca)

TestAccept/bundle/run_as/dashboard_embed/DMS=true: branch ✅ | main (aae07ca) ❌ | latest (v1.23.0) ❌

main (aae07ca):

acceptance_test.go:1342: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1342
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1083
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:660
        	Error:      	Not equal: 
        	            	expected: "\n>>> errcode [CLI] bundle validate --var embed=false\nWarning: run_as identity \"sp-name\" is not in bundle top-level permissions\n  in databricks.yml:5:3\n\nAdd a top-level permission so this identity can access deployed files and resources:\n  permissions:\n    - service_principal_name: sp-name\n      level: CAN_VIEW\n\nName: dashboard_embed\nTarget: default\nWorkspace:\n  User: [USERNAME]\n  Path: /Workspace/Users/[USERNAME]/.bundle/dashboard_embed/default\n\nFound 1 warning\n\n>>> errcode [CLI] bundle validate --var embed=true\nError: dashboards with embed_credentials set to true do not support a setting a run_as user that is different from the owner.\nCurrent identity: [USERNAME]. Run as identity: sp-name.\nSee https://docs.databricks.com/dev-tools/bundles/run-as.html to learn more about the run_as property.\n  in databricks.yml:14:7\n\nName: dashboard_embed\nTarget: default\nWorkspace:\n  User: [USERNAME]\n  Path: /Workspace/Users/[USERNAME]/.bundle/dashboard_embed/default\n\nFound 1 error\n\nExit code: 1\n"
        	            	actual  : "\n>>> errcode [CLI] bundle validate --var embed=false\nName: dashboard_embed\nTarget: default\nWorkspace:\n  User: [USERNAME]\n  Path: /Workspace/Users/[USERNAME]/.bundle/dashboard_embed/default\n\nValidation OK!\n\n>>> errcode [CLI] bundle validate --var embed=true\nError: dashboards with embed_credentials set to true do not support a setting a run_as user that is different from the owner.\nCurrent identity: [USERNAME]. Run as identity: sp-name.\nSee https://docs.databricks.com/dev-tools/bundles/run-as.html to learn more about the run_as property.\n  in databricks.yml:14:7\n\nName: dashboard_embed\nTarget: default\nWorkspace:\n  User: [USERNAME]\n  Path: /Workspace/Users/[USERNAME]/.bundle/dashboard_embed/default\n\nFound 1 error\n\nExit code: 1\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -2,10 +2,2 @@
        	            	 >>> errcode [CLI] bundle validate --var embed=false
        	            	-Warning: run_as identity "sp-name" is not in bundle top-level permissions
        	            	-  in databricks.yml:5:3
        	            	-
        	            	-Add a top-level permission so this identity can access deployed files and resources:
        	            	-  permissions:
        	            	-    - service_principal_name: sp-name
        	            	-      level: CAN_VIEW
        	            	-
        	            	 Name: dashboard_embed
        	            	@@ -16,3 +8,3 @@
        	            	 
        	            	-Found 1 warning
        	            	+Validation OK!
        	            	 
        	Test:       	TestAccept/bundle/run_as/dashboard_embed/DMS=true
        	Messages:   	bundle/run_as/dashboard_embed/output.txt vs /tmp/TestAcceptbundlerun_asdashboard_embedDMS=true2314093579/002/output.txt

latest (v1.23.0): same output as main (aae07ca)

TestAccept/bundle/run_as/empty_override/DMS=: branch ✅ | main (aae07ca) ❌ | latest (v1.23.0) ❌

main (aae07ca):

acceptance_test.go:1342: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1342
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1083
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:660
        	Error:      	Not equal: 
        	            	expected: "Warning: run_as identity \"my_user_name\" is not in bundle top-level permissions\n  in databricks.yml:5:3\n\nAdd a top-level permission so this identity can access deployed files and resources:\n  permissions:\n    - user_name: my_user_name\n      level: CAN_VIEW\n\n        \"run_as\": {\n  \"run_as\": {\n"
        	            	actual  : "        \"run_as\": {\n  \"run_as\": {\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1,9 +1 @@
        	            	-Warning: run_as identity "my_user_name" is not in bundle top-level permissions
        	            	-  in databricks.yml:5:3
        	            	-
        	            	-Add a top-level permission so this identity can access deployed files and resources:
        	            	-  permissions:
        	            	-    - user_name: my_user_name
        	            	-      level: CAN_VIEW
        	            	-
        	            	         "run_as": {
        	Test:       	TestAccept/bundle/run_as/empty_override/DMS=
        	Messages:   	bundle/run_as/empty_override/output.txt vs /tmp/TestAcceptbundlerun_asempty_overrideDMS=4227355320/002/output.txt

latest (v1.23.0): same output as main (aae07ca)

TestAccept/bundle/run_as/empty_override/DMS=true: branch ✅ | main (aae07ca) ❌ | latest (v1.23.0) ❌

main (aae07ca):

acceptance_test.go:1342: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1342
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1083
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:660
        	Error:      	Not equal: 
        	            	expected: "Warning: run_as identity \"my_user_name\" is not in bundle top-level permissions\n  in databricks.yml:5:3\n\nAdd a top-level permission so this identity can access deployed files and resources:\n  permissions:\n    - user_name: my_user_name\n      level: CAN_VIEW\n\n        \"run_as\": {\n  \"run_as\": {\n"
        	            	actual  : "        \"run_as\": {\n  \"run_as\": {\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1,9 +1 @@
        	            	-Warning: run_as identity "my_user_name" is not in bundle top-level permissions
        	            	-  in databricks.yml:5:3
        	            	-
        	            	-Add a top-level permission so this identity can access deployed files and resources:
        	            	-  permissions:
        	            	-    - user_name: my_user_name
        	            	-      level: CAN_VIEW
        	            	-
        	            	         "run_as": {
        	Test:       	TestAccept/bundle/run_as/empty_override/DMS=true
        	Messages:   	bundle/run_as/empty_override/output.txt vs /tmp/TestAcceptbundlerun_asempty_overrideDMS=true3627209163/002/output.txt

latest (v1.23.0): same output as main (aae07ca)

TestAccept/bundle/run_as/pipelines/regular_user/DMS=: branch ✅ | main (aae07ca) ❌ | latest (v1.23.0) ❌

main (aae07ca):

acceptance_test.go:1342: Diff:
        --- bundle/run_as/pipelines/regular_user/output.txt
        +++ /tmp/TestAcceptbundlerun_aspipelinesregular_userDMS=272287141/002/output.txt
        @@ -25,53 +25,21 @@
         \nProcessing target: t_user_name_different
         
         >>> [CLI] bundle validate -t t_user_name_different
        -Warning: run_as identity "different@databricks.com" is not in bundle top-level permissions
        -  in databricks.yml:13:7
        -
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - user_name: different@databricks.com
        -      level: CAN_VIEW
        -
         Name: run_as
         Target: t_user_name_different
         Workspace:
           User: [USERNAME]
           Path: /Workspace/Users/[USERNAME]/.bundle/run_as/t_user_name_different
         
        -Found 1 warning
        +Validation OK!
         
         >>> [CLI] bundle plan -t t_user_name_different
        -Warning: run_as identity "different@databricks.com" is not in bundle top-level permissions
        -  in databricks.yml:13:7
        -
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - user_name: different@databricks.com
        -      level: CAN_VIEW
        -
         create pipelines.nyc_taxi_pipeline
         create pipelines.nyc_taxi_pipeline.permissions
         
         Plan: 2 to add, 0 to change, 0 to delete, 0 unchanged
        -Warning: run_as identity "different@databricks.com" is not in bundle top-level permissions
        -  in databricks.yml:13:7
         
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - user_name: different@databricks.com
        -      level: CAN_VIEW
        -
        -
         >>> [CLI] bundle deploy -t t_user_name_different
        -Warning: run_as identity "different@databricks.com" is not in bundle top-level permissions
        -  in databricks.yml:13:7
        -
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - user_name: different@databricks.com
        -      level: CAN_VIEW
        -
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/run_as/t_user_name_different/files...
         Created pipelines.nyc_taxi_pipeline
         Created pipelines.nyc_taxi_pipeline.permissions
        @@ -80,53 +34,21 @@
         \nProcessing target: t_service_principal_name
         
         >>> [CLI] bundle validate -t t_service_principal_name
        -Warning: run_as identity "[UUID]" is not in bundle top-level permissions
        -  in databricks.yml:10:7
        -
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - service_principal_name: [UUID]
        -      level: CAN_VIEW
        -
         Name: run_as
         Target: t_service_principal_name
         Workspace:
           User: [USERNAME]
           Path: /Workspace/Users/[USERNAME]/.bundle/run_as/t_service_principal_name
         
        -Found 1 warning
        +Validation OK!
         
         >>> [CLI] bundle plan -t t_service_principal_name
        -Warning: run_as identity "[UUID]" is not in bundle top-level permissions
        -  in databricks.yml:10:7
        -
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - service_principal_name: [UUID]
        -      level: CAN_VIEW
        -
         create pipelines.nyc_taxi_pipeline
         create pipelines.nyc_taxi_pipeline.permissions
         
         Plan: 2 to add, 0 to change, 0 to delete, 0 unchanged
        -Warning: run_as identity "[UUID]" is not in bundle top-level permissions
        -  in databricks.yml:10:7
         
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - service_principal_name: [UUID]
        -      level: CAN_VIEW
        -
        -
         >>> [CLI] bundle deploy -t t_service_principal_name
        -Warning: run_as identity "[UUID]" is not in bundle top-level permissions
        -  in databricks.yml:10:7
        -
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - service_principal_name: [UUID]
        -      level: CAN_VIEW
        -
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/run_as/t_service_principal_name/files...
         Created pipelines.nyc_taxi_pipeline
         Created pipelines.nyc_taxi_pipeline.permissions
        @@ -135,53 +43,21 @@
         \nProcessing target: t_service_principal_name_different
         
         >>> [CLI] bundle validate -t t_service_principal_name_different
        -Warning: run_as identity "[UUID]" is not in bundle top-level permissions
        -  in databricks.yml:16:7
        -
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - user_name: [UUID]
        -      level: CAN_VIEW
        -
         Name: run_as
         Target: t_service_principal_name_different
         Workspace:
           User: [USERNAME]
           Path: /Workspace/Users/[USERNAME]/.bundle/run_as/t_service_principal_name_different
         
        -Found 1 warning
        +Validation OK!
         
         >>> [CLI] bundle plan -t t_service_principal_name_different
        -Warning: run_as identity "[UUID]" is not in bundle top-level permissions
        -  in databricks.yml:16:7
        -
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - user_name: [UUID]
        -      level: CAN_VIEW
        -
         create pipelines.nyc_taxi_pipeline
         create pipelines.nyc_taxi_pipeline.permissions
         
         Plan: 2 to add, 0 to change, 0 to delete, 0 unchanged
        -Warning: run_as identity "[UUID]" is not in bundle top-level permissions
        -  in databricks.yml:16:7
         
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - user_name: [UUID]
        -      level: CAN_VIEW
        -
        -
         >>> [CLI] bundle deploy -t t_service_principal_name_different
        -Warning: run_as identity "[UUID]" is not in bundle top-level permissions
        -  in databricks.yml:16:7
        -
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - user_name: [UUID]
        -      level: CAN_VIEW
        -
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/run_as/t_service_principal_name_different/files...
         Created pipelines.nyc_taxi_pipeline
         Created pipelines.nyc_taxi_pipeline.permissions

latest (v1.23.0): same output as main (aae07ca)

TestAccept/bundle/run_as/pipelines/regular_user/DMS=true: branch ✅ | main (aae07ca) ❌ | latest (v1.23.0) ❌

main (aae07ca):

acceptance_test.go:1342: Diff:
        --- bundle/run_as/pipelines/regular_user/output.txt
        +++ /tmp/TestAcceptbundlerun_aspipelinesregular_userDMS=true1064487394/002/output.txt
        @@ -25,53 +25,21 @@
         \nProcessing target: t_user_name_different
         
         >>> [CLI] bundle validate -t t_user_name_different
        -Warning: run_as identity "different@databricks.com" is not in bundle top-level permissions
        -  in databricks.yml:13:7
        -
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - user_name: different@databricks.com
        -      level: CAN_VIEW
        -
         Name: run_as
         Target: t_user_name_different
         Workspace:
           User: [USERNAME]
           Path: /Workspace/Users/[USERNAME]/.bundle/run_as/t_user_name_different
         
        -Found 1 warning
        +Validation OK!
         
         >>> [CLI] bundle plan -t t_user_name_different
        -Warning: run_as identity "different@databricks.com" is not in bundle top-level permissions
        -  in databricks.yml:13:7
        -
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - user_name: different@databricks.com
        -      level: CAN_VIEW
        -
         create pipelines.nyc_taxi_pipeline
         create pipelines.nyc_taxi_pipeline.permissions
         
         Plan: 2 to add, 0 to change, 0 to delete, 0 unchanged
        -Warning: run_as identity "different@databricks.com" is not in bundle top-level permissions
        -  in databricks.yml:13:7
         
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - user_name: different@databricks.com
        -      level: CAN_VIEW
        -
        -
         >>> [CLI] bundle deploy -t t_user_name_different
        -Warning: run_as identity "different@databricks.com" is not in bundle top-level permissions
        -  in databricks.yml:13:7
        -
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - user_name: different@databricks.com
        -      level: CAN_VIEW
        -
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/run_as/t_user_name_different/files...
         Created pipelines.nyc_taxi_pipeline
         Created pipelines.nyc_taxi_pipeline.permissions
        @@ -80,53 +34,21 @@
         \nProcessing target: t_service_principal_name
         
         >>> [CLI] bundle validate -t t_service_principal_name
        -Warning: run_as identity "[UUID]" is not in bundle top-level permissions
        -  in databricks.yml:10:7
        -
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - service_principal_name: [UUID]
        -      level: CAN_VIEW
        -
         Name: run_as
         Target: t_service_principal_name
         Workspace:
           User: [USERNAME]
           Path: /Workspace/Users/[USERNAME]/.bundle/run_as/t_service_principal_name
         
        -Found 1 warning
        +Validation OK!
         
         >>> [CLI] bundle plan -t t_service_principal_name
        -Warning: run_as identity "[UUID]" is not in bundle top-level permissions
        -  in databricks.yml:10:7
        -
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - service_principal_name: [UUID]
        -      level: CAN_VIEW
        -
         create pipelines.nyc_taxi_pipeline
         create pipelines.nyc_taxi_pipeline.permissions
         
         Plan: 2 to add, 0 to change, 0 to delete, 0 unchanged
        -Warning: run_as identity "[UUID]" is not in bundle top-level permissions
        -  in databricks.yml:10:7
         
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - service_principal_name: [UUID]
        -      level: CAN_VIEW
        -
        -
         >>> [CLI] bundle deploy -t t_service_principal_name
        -Warning: run_as identity "[UUID]" is not in bundle top-level permissions
        -  in databricks.yml:10:7
        -
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - service_principal_name: [UUID]
        -      level: CAN_VIEW
        -
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/run_as/t_service_principal_name/files...
         Created pipelines.nyc_taxi_pipeline
         Created pipelines.nyc_taxi_pipeline.permissions
        @@ -135,53 +43,21 @@
         \nProcessing target: t_service_principal_name_different
         
         >>> [CLI] bundle validate -t t_service_principal_name_different
        -Warning: run_as identity "[UUID]" is not in bundle top-level permissions
        -  in databricks.yml:16:7
        -
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - user_name: [UUID]
        -      level: CAN_VIEW
        -
         Name: run_as
         Target: t_service_principal_name_different
         Workspace:
           User: [USERNAME]
           Path: /Workspace/Users/[USERNAME]/.bundle/run_as/t_service_principal_name_different
         
        -Found 1 warning
        +Validation OK!
         
         >>> [CLI] bundle plan -t t_service_principal_name_different
        -Warning: run_as identity "[UUID]" is not in bundle top-level permissions
        -  in databricks.yml:16:7
        -
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - user_name: [UUID]
        -      level: CAN_VIEW
        -
         create pipelines.nyc_taxi_pipeline
         create pipelines.nyc_taxi_pipeline.permissions
         
         Plan: 2 to add, 0 to change, 0 to delete, 0 unchanged
        -Warning: run_as identity "[UUID]" is not in bundle top-level permissions
        -  in databricks.yml:16:7
         
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - user_name: [UUID]
        -      level: CAN_VIEW
        -
        -
         >>> [CLI] bundle deploy -t t_service_principal_name_different
        -Warning: run_as identity "[UUID]" is not in bundle top-level permissions
        -  in databricks.yml:16:7
        -
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - user_name: [UUID]
        -      level: CAN_VIEW
        -
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/run_as/t_service_principal_name_different/files...
         Created pipelines.nyc_taxi_pipeline
         Created pipelines.nyc_taxi_pipeline.permissions

latest (v1.23.0): same output as main (aae07ca)

TestAccept/bundle/run_as/pipelines/service_principal/DMS=: branch ✅ | main (aae07ca) ❌ | latest (v1.23.0) ❌

main (aae07ca):

acceptance_test.go:1342: Diff:
        --- bundle/run_as/pipelines/service_principal/output.txt
        +++ /tmp/TestAcceptbundlerun_aspipelinesservice_principalDMS=1494744541/002/output.txt
        @@ -2,53 +2,21 @@
         === run_as should succeed in all cases\nProcessing target: t_user_name
         
         >>> [CLI] bundle validate -t t_user_name
        -Warning: run_as identity "tester@databricks.com" is not in bundle top-level permissions
        -  in databricks.yml:7:7
        -
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - user_name: tester@databricks.com
        -      level: CAN_VIEW
        -
         Name: run_as
         Target: t_user_name
         Workspace:
           User: [USERNAME]
           Path: /Workspace/Users/[USERNAME]/.bundle/run_as/t_user_name
         
        -Found 1 warning
        +Validation OK!
         
         >>> [CLI] bundle plan -t t_user_name
        -Warning: run_as identity "tester@databricks.com" is not in bundle top-level permissions
        -  in databricks.yml:7:7
        -
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - user_name: tester@databricks.com
        -      level: CAN_VIEW
        -
         create pipelines.nyc_taxi_pipeline
         create pipelines.nyc_taxi_pipeline.permissions
         
         Plan: 2 to add, 0 to change, 0 to delete, 0 unchanged
        -Warning: run_as identity "tester@databricks.com" is not in bundle top-level permissions
        -  in databricks.yml:7:7
         
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - user_name: tester@databricks.com
        -      level: CAN_VIEW
        -
        -
         >>> [CLI] bundle deploy -t t_user_name
        -Warning: run_as identity "tester@databricks.com" is not in bundle top-level permissions
        -  in databricks.yml:7:7
        -
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - user_name: tester@databricks.com
        -      level: CAN_VIEW
        -
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/run_as/t_user_name/files...
         Created pipelines.nyc_taxi_pipeline
         Created pipelines.nyc_taxi_pipeline.permissions
        @@ -57,53 +11,21 @@
         \nProcessing target: t_user_name_different
         
         >>> [CLI] bundle validate -t t_user_name_different
        -Warning: run_as identity "different@databricks.com" is not in bundle top-level permissions
        -  in databricks.yml:13:7
        -
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - user_name: different@databricks.com
        -      level: CAN_VIEW
        -
         Name: run_as
         Target: t_user_name_different
         Workspace:
           User: [USERNAME]
           Path: /Workspace/Users/[USERNAME]/.bundle/run_as/t_user_name_different
         
        -Found 1 warning
        +Validation OK!
         
         >>> [CLI] bundle plan -t t_user_name_different
        -Warning: run_as identity "different@databricks.com" is not in bundle top-level permissions
        -  in databricks.yml:13:7
        -
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - user_name: different@databricks.com
        -      level: CAN_VIEW
        -
         create pipelines.nyc_taxi_pipeline
         create pipelines.nyc_taxi_pipeline.permissions
         
         Plan: 2 to add, 0 to change, 0 to delete, 0 unchanged
        -Warning: run_as identity "different@databricks.com" is not in bundle top-level permissions
        -  in databricks.yml:13:7
         
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - user_name: different@databricks.com
        -      level: CAN_VIEW
        -
        -
         >>> [CLI] bundle deploy -t t_user_name_different
        -Warning: run_as identity "different@databricks.com" is not in bundle top-level permissions
        -  in databricks.yml:13:7
        -
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - user_name: different@databricks.com
        -      level: CAN_VIEW
        -
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/run_as/t_user_name_different/files...
         Created pipelines.nyc_taxi_pipeline
         Created pipelines.nyc_taxi_pipeline.permissions
        @@ -135,53 +43,21 @@
         \nProcessing target: t_service_principal_name_different
         
         >>> [CLI] bundle validate -t t_service_principal_name_different
        -Warning: run_as identity "[UUID]" is not in bundle top-level permissions
        -  in databricks.yml:16:7
        -
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - user_name: [UUID]
        -      level: CAN_VIEW
        -
         Name: run_as
         Target: t_service_principal_name_different
         Workspace:
           User: [USERNAME]
           Path: /Workspace/Users/[USERNAME]/.bundle/run_as/t_service_principal_name_different
         
        -Found 1 warning
        +Validation OK!
         
         >>> [CLI] bundle plan -t t_service_principal_name_different
        -Warning: run_as identity "[UUID]" is not in bundle top-level permissions
        -  in databricks.yml:16:7
        -
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - user_name: [UUID]
        -      level: CAN_VIEW
        -
         create pipelines.nyc_taxi_pipeline
         create pipelines.nyc_taxi_pipeline.permissions
         
         Plan: 2 to add, 0 to change, 0 to delete, 0 unchanged
        -Warning: run_as identity "[UUID]" is not in bundle top-level permissions
        -  in databricks.yml:16:7
         
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - user_name: [UUID]
        -      level: CAN_VIEW
        -
        -
         >>> [CLI] bundle deploy -t t_service_principal_name_different
        -Warning: run_as identity "[UUID]" is not in bundle top-level permissions
        -  in databricks.yml:16:7
        -
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - user_name: [UUID]
        -      level: CAN_VIEW
        -
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/run_as/t_service_principal_name_different/files...
         Created pipelines.nyc_taxi_pipeline
         Created pipelines.nyc_taxi_pipeline.permissions

latest (v1.23.0): same output as main (aae07ca)

TestAccept/bundle/run_as/pipelines/service_principal/DMS=true: branch ✅ | main (aae07ca) ❌ | latest (v1.23.0) ❌

main (aae07ca):

acceptance_test.go:1342: Diff:
        --- bundle/run_as/pipelines/service_principal/output.txt
        +++ /tmp/TestAcceptbundlerun_aspipelinesservice_principalDMS=true1017971253/002/output.txt
        @@ -2,53 +2,21 @@
         === run_as should succeed in all cases\nProcessing target: t_user_name
         
         >>> [CLI] bundle validate -t t_user_name
        -Warning: run_as identity "tester@databricks.com" is not in bundle top-level permissions
        -  in databricks.yml:7:7
        -
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - user_name: tester@databricks.com
        -      level: CAN_VIEW
        -
         Name: run_as
         Target: t_user_name
         Workspace:
           User: [USERNAME]
           Path: /Workspace/Users/[USERNAME]/.bundle/run_as/t_user_name
         
        -Found 1 warning
        +Validation OK!
         
         >>> [CLI] bundle plan -t t_user_name
        -Warning: run_as identity "tester@databricks.com" is not in bundle top-level permissions
        -  in databricks.yml:7:7
        -
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - user_name: tester@databricks.com
        -      level: CAN_VIEW
        -
         create pipelines.nyc_taxi_pipeline
         create pipelines.nyc_taxi_pipeline.permissions
         
         Plan: 2 to add, 0 to change, 0 to delete, 0 unchanged
        -Warning: run_as identity "tester@databricks.com" is not in bundle top-level permissions
        -  in databricks.yml:7:7
         
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - user_name: tester@databricks.com
        -      level: CAN_VIEW
        -
        -
         >>> [CLI] bundle deploy -t t_user_name
        -Warning: run_as identity "tester@databricks.com" is not in bundle top-level permissions
        -  in databricks.yml:7:7
        -
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - user_name: tester@databricks.com
        -      level: CAN_VIEW
        -
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/run_as/t_user_name/files...
         Created pipelines.nyc_taxi_pipeline
         Created pipelines.nyc_taxi_pipeline.permissions
        @@ -57,53 +11,21 @@
         \nProcessing target: t_user_name_different
         
         >>> [CLI] bundle validate -t t_user_name_different
        -Warning: run_as identity "different@databricks.com" is not in bundle top-level permissions
        -  in databricks.yml:13:7
        -
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - user_name: different@databricks.com
        -      level: CAN_VIEW
        -
         Name: run_as
         Target: t_user_name_different
         Workspace:
           User: [USERNAME]
           Path: /Workspace/Users/[USERNAME]/.bundle/run_as/t_user_name_different
         
        -Found 1 warning
        +Validation OK!
         
         >>> [CLI] bundle plan -t t_user_name_different
        -Warning: run_as identity "different@databricks.com" is not in bundle top-level permissions
        -  in databricks.yml:13:7
        -
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - user_name: different@databricks.com
        -      level: CAN_VIEW
        -
         create pipelines.nyc_taxi_pipeline
         create pipelines.nyc_taxi_pipeline.permissions
         
         Plan: 2 to add, 0 to change, 0 to delete, 0 unchanged
        -Warning: run_as identity "different@databricks.com" is not in bundle top-level permissions
        -  in databricks.yml:13:7
         
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - user_name: different@databricks.com
        -      level: CAN_VIEW
        -
        -
         >>> [CLI] bundle deploy -t t_user_name_different
        -Warning: run_as identity "different@databricks.com" is not in bundle top-level permissions
        -  in databricks.yml:13:7
        -
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - user_name: different@databricks.com
        -      level: CAN_VIEW
        -
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/run_as/t_user_name_different/files...
         Created pipelines.nyc_taxi_pipeline
         Created pipelines.nyc_taxi_pipeline.permissions
        @@ -135,53 +43,21 @@
         \nProcessing target: t_service_principal_name_different
         
         >>> [CLI] bundle validate -t t_service_principal_name_different
        -Warning: run_as identity "[UUID]" is not in bundle top-level permissions
        -  in databricks.yml:16:7
        -
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - user_name: [UUID]
        -      level: CAN_VIEW
        -
         Name: run_as
         Target: t_service_principal_name_different
         Workspace:
           User: [USERNAME]
           Path: /Workspace/Users/[USERNAME]/.bundle/run_as/t_service_principal_name_different
         
        -Found 1 warning
        +Validation OK!
         
         >>> [CLI] bundle plan -t t_service_principal_name_different
        -Warning: run_as identity "[UUID]" is not in bundle top-level permissions
        -  in databricks.yml:16:7
        -
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - user_name: [UUID]
        -      level: CAN_VIEW
        -
         create pipelines.nyc_taxi_pipeline
         create pipelines.nyc_taxi_pipeline.permissions
         
         Plan: 2 to add, 0 to change, 0 to delete, 0 unchanged
        -Warning: run_as identity "[UUID]" is not in bundle top-level permissions
        -  in databricks.yml:16:7
         
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - user_name: [UUID]
        -      level: CAN_VIEW
        -
        -
         >>> [CLI] bundle deploy -t t_service_principal_name_different
        -Warning: run_as identity "[UUID]" is not in bundle top-level permissions
        -  in databricks.yml:16:7
        -
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - user_name: [UUID]
        -      level: CAN_VIEW
        -
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/run_as/t_service_principal_name_different/files...
         Created pipelines.nyc_taxi_pipeline
         Created pipelines.nyc_taxi_pipeline.permissions

latest (v1.23.0): same output as main (aae07ca)

TestAccept/bundle/run_as/pipelines_legacy/DMS=: branch ✅ | main (aae07ca) ❌ | latest (v1.23.0) ❌

main (aae07ca):

acceptance_test.go:1342: Diff:
        --- bundle/run_as/pipelines_legacy/output.txt
        +++ /tmp/TestAcceptbundlerun_aspipelines_legacyDMS=799772367/002/output.txt
        @@ -4,15 +4,7 @@
           at experimental.use_legacy_run_as
           in databricks.yml:8:22
         
        -Warning: run_as identity "my_service_principal" is not in bundle top-level permissions
        -  in databricks.yml:5:3
         
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - service_principal_name: my_service_principal
        -      level: CAN_VIEW
        -
        -
         >>> jq .run_as
         {
           "service_principal_name": "my_service_principal"

latest (v1.23.0): same output as main (aae07ca)

TestAccept/bundle/run_as/pipelines_legacy/DMS=true: branch ✅ | main (aae07ca) ❌ | latest (v1.23.0) ❌

main (aae07ca):

acceptance_test.go:1342: Diff:
        --- bundle/run_as/pipelines_legacy/output.txt
        +++ /tmp/TestAcceptbundlerun_aspipelines_legacyDMS=true219638286/002/output.txt
        @@ -4,15 +4,7 @@
           at experimental.use_legacy_run_as
           in databricks.yml:8:22
         
        -Warning: run_as identity "my_service_principal" is not in bundle top-level permissions
        -  in databricks.yml:5:3
         
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - service_principal_name: my_service_principal
        -      level: CAN_VIEW
        -
        -
         >>> jq .run_as
         {
           "service_principal_name": "my_service_principal"

latest (v1.23.0): same output as main (aae07ca)

TestAccept/bundle/telemetry/deploy-experimental/DMS=: branch ✅ | main (aae07ca) ❌ | latest (v1.23.0) ❌

main (aae07ca):

acceptance_test.go:1342: Diff:
        --- bundle/telemetry/deploy-experimental/output.txt
        +++ /tmp/TestAcceptbundletelemetrydeploy-experimentalDMS=3161056889/002/output.txt
        @@ -4,14 +4,6 @@
           at experimental.use_legacy_run_as
           in databricks.yml:5:22
         
        -Warning: run_as identity "abcd" is not in bundle top-level permissions
        -  in databricks.yml:8:3
        -
        -Add a top-level permission so this identity can access deployed files and resources:
        -  permissions:
        -    - user_name: abcd
        -      level: CAN_VIEW
        -
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...
         Created jobs.foo
         Files: 1 uploaded, 0 deleted

latest (v1.23.0): same output as main (aae07ca)

1 more failure details omitted, see the full report in the run.

@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: dd70370

Run: 41647565932

Env ✅​pass 🙈​skip Time
✅​ aws linux-2core-8gb 271 27 12:58
✅​ aws-windows-latest-4core-16gb 273 25 6:42
✅​ azure linux-2core-8gb 270 27 10:11
✅​ azure-windows-latest-4core-16gb 272 25 5:54
✅​ gcp linux-2core-8gb 271 27 9:52
✅​ gcp-windows-latest-4core-16gb 273 25 5:48
Top 9 slowest tests (at least 2 minutes):
duration env testname
4:24 azure linux-2core-8gb TestAccept
4:20 gcp linux-2core-8gb TestAccept
4:08 aws linux-2core-8gb TestAccept
3:16 aws-windows-latest-4core-16gb TestAccept
3:10 azure-windows-latest-4core-16gb TestAccept
3:00 gcp-windows-latest-4core-16gb TestAccept
2:48 aws linux-2core-8gb TestExportDir
2:12 aws linux-2core-8gb TestImportDirDoesNotOverwrite
2:10 azure-windows-latest-4core-16gb TestFilerWorkspaceFilesExtensionsDelete


func (m *permissionDiagnostics) Apply(ctx context.Context, b *bundle.Bundle) diag.Diagnostics {
diags := runAsAccessDiagnostics(b)
// Only recommend deployment-identity access when top-level permissions are explicit.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment and the conditional below disagree; it recommends deployment identity access without top-level permissions being set. I agree this should only show up when users are using the top-level permissions block. I think this is also why this shows up in the acc test output so much.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DABs DABs related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants