Skip to content

Report workspace_id in bundle debug list-targets - #7182

Merged
pavloKozlov merged 4 commits into
mainfrom
list-targets-workspace-id
Oct 27, 2026
Merged

pavloKozlov merged 4 commits into
mainfrom
list-targets-workspace-id

Conversation

@pavloKozlov

@pavloKozlov pavloKozlov commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Changes

bundle debug list-targets now reports workspace_id next to host. A target uses its own host and workspace_id when set, otherwise the top-level ones. They are then normalized the same way authentication does it: a ?o=, ?w= or ?workspace_id= parameter in the host becomes the workspace ID, an explicit workspace_id wins (also when inherited), and the query is removed from the host. Text output shows the ID as workspace_id:<id>.

Why

On a custom host, several workspaces share one host, so the host alone doesn't tell which workspace a target deploys to. Callers of this command also need the workspace ID, resolved by the same rules the CLI uses.

Tests

The list-targets acceptance tests cover an ID from the host's ?o= query, an explicit ID taking precedence over the query, and a host and ID inherited from the top-level workspace. A strict_profile_match acceptance test checks that list-targets reports the same workspace ID that authentication uses, for a target whose inherited ID wins over ?o= in its host.

This pull request and its description were written by Isaac.

`bundle debug list-targets` now reports each target's workspace ID next to
its host. Both are normalized the same way authentication normalizes them:
a ?o=, ?w= or ?workspace_id= query parameter in the host becomes the
workspace ID, an explicit workspace.workspace_id takes precedence, and the
query is removed from the host.

Co-authored-by: Isaac <no-reply@databricks.com>
@github-actions github-actions Bot added the DABs DABs related issues label Oct 26, 2026
@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Commit: 2493002f0 | Workflow run

Regression test report

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

6 tests: regression=6 unreleased=0 coverage=0 failing=0

test branch main (accb3df) latest (v1.22.1)
TestAccept/bundle/debug/list-targets-root-workspace/DMS= ✅ ❌ ❌
TestAccept/bundle/debug/list-targets-root-workspace/DMS=true ✅ ❌ ❌
TestAccept/bundle/debug/list-targets/DMS= ✅ ❌ ❌
TestAccept/bundle/debug/list-targets/DMS=true ✅ ❌ ❌
TestAccept/bundle/strict_profile_match/list_targets/DMS= ✅ ❌ ❌
TestAccept/bundle/strict_profile_match/list_targets/DMS=true ✅ ❌ ❌
TestAccept/bundle/debug/list-targets-root-workspace/DMS=: branch ✅ | main (accb3df) ❌ | latest (v1.22.1) ❌

main (accb3df):

acceptance_test.go:1311: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1311
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1081
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:659
        	Error:      	Not equal: 
        	            	expected: "\n>>> [CLI] bundle debug list-targets\ninherited (default) https://custom.test workspace_id:5678\nnull_target https://custom.test workspace_id:5678\ntarget_query_id https://custom.test workspace_id:5678\ntarget_workspace_id https://custom.test workspace_id:9012\n\n>>> [CLI] bundle debug list-targets --output json\n{\n  \"targets\": [\n    {\n      \"name\": \"inherited\",\n      \"default\": true,\n      \"host\": \"https://custom.test\",\n      \"workspace_id\": \"5678\"\n    },\n    {\n      \"name\": \"null_target\",\n      \"host\": \"https://custom.test\",\n      \"workspace_id\": \"5678\"\n    },\n    {\n      \"name\": \"target_query_id\",\n      \"host\": \"https://custom.test\",\n      \"workspace_id\": \"5678\"\n    },\n    {\n      \"name\": \"target_workspace_id\",\n      \"host\": \"https://custom.test\",\n      \"workspace_id\": \"9012\"\n    }\n  ]\n}"
        	            	actual  : "\n>>> [CLI] bundle debug list-targets\ninherited (default)\nnull_target\ntarget_query_id https://custom.test/?o=1234\ntarget_workspace_id\n\n>>> [CLI] bundle debug list-targets --output json\n{\n  \"targets\": [\n    {\n      \"name\": \"inherited\",\n      \"default\": true\n    },\n    {\n      \"name\": \"null_target\"\n    },\n    {\n      \"name\": \"target_query_id\",\n      \"host\": \"https://custom.test/?o=1234\"\n    },\n    {\n      \"name\": \"target_workspace_id\"\n    }\n  ]\n}"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -2,6 +2,6 @@
        	            	 >>> [CLI] bundle debug list-targets
        	            	-inherited (default) https://custom.test workspace_id:5678
        	            	-null_target https://custom.test workspace_id:5678
        	            	-target_query_id https://custom.test workspace_id:5678
        	            	-target_workspace_id https://custom.test workspace_id:9012
        	            	+inherited (default)
        	            	+null_target
        	            	+target_query_id https://custom.test/?o=1234
        	            	+target_workspace_id
        	            	 
        	            	@@ -12,10 +12,6 @@
        	            	       "name": "inherited",
        	            	-      "default": true,
        	            	-      "host": "https://custom.test",
        	            	-      "workspace_id": "5678"
        	            	+      "default": true
        	            	     },
        	            	     {
        	            	-      "name": "null_target",
        	            	-      "host": "https://custom.test",
        	            	-      "workspace_id": "5678"
        	            	+      "name": "null_target"
        	            	     },
        	            	@@ -23,9 +19,6 @@
        	            	       "name": "target_query_id",
        	            	-      "host": "https://custom.test",
        	            	-      "workspace_id": "5678"
        	            	+      "host": "https://custom.test/?o=1234"
        	            	     },
        	            	     {
        	            	-      "name": "target_workspace_id",
        	            	-      "host": "https://custom.test",
        	            	-      "workspace_id": "9012"
        	            	+      "name": "target_workspace_id"
        	            	     }
        	Test:       	TestAccept/bundle/debug/list-targets-root-workspace/DMS=
        	Messages:   	bundle/debug/list-targets-root-workspace/output.txt vs /tmp/TestAcceptbundledebuglist-targets-root-workspaceDMS=3742021186/002/output.txt

latest (v1.22.1): same output as main (accb3df)

TestAccept/bundle/debug/list-targets-root-workspace/DMS=true: branch ✅ | main (accb3df) ❌ | latest (v1.22.1) ❌

main (accb3df):

acceptance_test.go:1311: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1311
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1081
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:659
        	Error:      	Not equal: 
        	            	expected: "\n>>> [CLI] bundle debug list-targets\ninherited (default) https://custom.test workspace_id:5678\nnull_target https://custom.test workspace_id:5678\ntarget_query_id https://custom.test workspace_id:5678\ntarget_workspace_id https://custom.test workspace_id:9012\n\n>>> [CLI] bundle debug list-targets --output json\n{\n  \"targets\": [\n    {\n      \"name\": \"inherited\",\n      \"default\": true,\n      \"host\": \"https://custom.test\",\n      \"workspace_id\": \"5678\"\n    },\n    {\n      \"name\": \"null_target\",\n      \"host\": \"https://custom.test\",\n      \"workspace_id\": \"5678\"\n    },\n    {\n      \"name\": \"target_query_id\",\n      \"host\": \"https://custom.test\",\n      \"workspace_id\": \"5678\"\n    },\n    {\n      \"name\": \"target_workspace_id\",\n      \"host\": \"https://custom.test\",\n      \"workspace_id\": \"9012\"\n    }\n  ]\n}"
        	            	actual  : "\n>>> [CLI] bundle debug list-targets\ninherited (default)\nnull_target\ntarget_query_id https://custom.test/?o=1234\ntarget_workspace_id\n\n>>> [CLI] bundle debug list-targets --output json\n{\n  \"targets\": [\n    {\n      \"name\": \"inherited\",\n      \"default\": true\n    },\n    {\n      \"name\": \"null_target\"\n    },\n    {\n      \"name\": \"target_query_id\",\n      \"host\": \"https://custom.test/?o=1234\"\n    },\n    {\n      \"name\": \"target_workspace_id\"\n    }\n  ]\n}"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -2,6 +2,6 @@
        	            	 >>> [CLI] bundle debug list-targets
        	            	-inherited (default) https://custom.test workspace_id:5678
        	            	-null_target https://custom.test workspace_id:5678
        	            	-target_query_id https://custom.test workspace_id:5678
        	            	-target_workspace_id https://custom.test workspace_id:9012
        	            	+inherited (default)
        	            	+null_target
        	            	+target_query_id https://custom.test/?o=1234
        	            	+target_workspace_id
        	            	 
        	            	@@ -12,10 +12,6 @@
        	            	       "name": "inherited",
        	            	-      "default": true,
        	            	-      "host": "https://custom.test",
        	            	-      "workspace_id": "5678"
        	            	+      "default": true
        	            	     },
        	            	     {
        	            	-      "name": "null_target",
        	            	-      "host": "https://custom.test",
        	            	-      "workspace_id": "5678"
        	            	+      "name": "null_target"
        	            	     },
        	            	@@ -23,9 +19,6 @@
        	            	       "name": "target_query_id",
        	            	-      "host": "https://custom.test",
        	            	-      "workspace_id": "5678"
        	            	+      "host": "https://custom.test/?o=1234"
        	            	     },
        	            	     {
        	            	-      "name": "target_workspace_id",
        	            	-      "host": "https://custom.test",
        	            	-      "workspace_id": "9012"
        	            	+      "name": "target_workspace_id"
        	            	     }
        	Test:       	TestAccept/bundle/debug/list-targets-root-workspace/DMS=true
        	Messages:   	bundle/debug/list-targets-root-workspace/output.txt vs /tmp/TestAcceptbundledebuglist-targets-root-workspaceDMS=true3406544884/002/output.txt
FAIL

latest (v1.22.1):

acceptance_test.go:1311: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1311
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1081
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:659
        	Error:      	Not equal: 
        	            	expected: "\n>>> [CLI] bundle debug list-targets\ninherited (default) https://custom.test workspace_id:5678\nnull_target https://custom.test workspace_id:5678\ntarget_query_id https://custom.test workspace_id:5678\ntarget_workspace_id https://custom.test workspace_id:9012\n\n>>> [CLI] bundle debug list-targets --output json\n{\n  \"targets\": [\n    {\n      \"name\": \"inherited\",\n      \"default\": true,\n      \"host\": \"https://custom.test\",\n      \"workspace_id\": \"5678\"\n    },\n    {\n      \"name\": \"null_target\",\n      \"host\": \"https://custom.test\",\n      \"workspace_id\": \"5678\"\n    },\n    {\n      \"name\": \"target_query_id\",\n      \"host\": \"https://custom.test\",\n      \"workspace_id\": \"5678\"\n    },\n    {\n      \"name\": \"target_workspace_id\",\n      \"host\": \"https://custom.test\",\n      \"workspace_id\": \"9012\"\n    }\n  ]\n}"
        	            	actual  : "\n>>> [CLI] bundle debug list-targets\ninherited (default)\nnull_target\ntarget_query_id https://custom.test/?o=1234\ntarget_workspace_id\n\n>>> [CLI] bundle debug list-targets --output json\n{\n  \"targets\": [\n    {\n      \"name\": \"inherited\",\n      \"default\": true\n    },\n    {\n      \"name\": \"null_target\"\n    },\n    {\n      \"name\": \"target_query_id\",\n      \"host\": \"https://custom.test/?o=1234\"\n    },\n    {\n      \"name\": \"target_workspace_id\"\n    }\n  ]\n}"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -2,6 +2,6 @@
        	            	 >>> [CLI] bundle debug list-targets
        	            	-inherited (default) https://custom.test workspace_id:5678
        	            	-null_target https://custom.test workspace_id:5678
        	            	-target_query_id https://custom.test workspace_id:5678
        	            	-target_workspace_id https://custom.test workspace_id:9012
        	            	+inherited (default)
        	            	+null_target
        	            	+target_query_id https://custom.test/?o=1234
        	            	+target_workspace_id
        	            	 
        	            	@@ -12,10 +12,6 @@
        	            	       "name": "inherited",
        	            	-      "default": true,
        	            	-      "host": "https://custom.test",
        	            	-      "workspace_id": "5678"
        	            	+      "default": true
        	            	     },
        	            	     {
        	            	-      "name": "null_target",
        	            	-      "host": "https://custom.test",
        	            	-      "workspace_id": "5678"
        	            	+      "name": "null_target"
        	            	     },
        	            	@@ -23,9 +19,6 @@
        	            	       "name": "target_query_id",
        	            	-      "host": "https://custom.test",
        	            	-      "workspace_id": "5678"
        	            	+      "host": "https://custom.test/?o=1234"
        	            	     },
        	            	     {
        	            	-      "name": "target_workspace_id",
        	            	-      "host": "https://custom.test",
        	            	-      "workspace_id": "9012"
        	            	+      "name": "target_workspace_id"
        	            	     }
        	Test:       	TestAccept/bundle/debug/list-targets-root-workspace/DMS=true
        	Messages:   	bundle/debug/list-targets-root-workspace/output.txt vs /tmp/TestAcceptbundledebuglist-targets-root-workspaceDMS=true38953974/002/output.txt
TestAccept/bundle/debug/list-targets/DMS=: branch ✅ | main (accb3df) ❌ | latest (v1.22.1) ❌

main (accb3df):

acceptance_test.go:1311: Diff:
        --- bundle/debug/list-targets/output.txt
        +++ /tmp/TestAcceptbundledebuglist-targetsDMS=345232508/002/output.txt
        @@ -1,8 +1,8 @@
         
         >>> [CLI] bundle debug list-targets
        -custom_host_explicit_id https://custom.test workspace_id:5678
        -custom_host_explicit_id_over_query https://custom.test workspace_id:5678
        -custom_host_query_id https://custom.test workspace_id:1234
        +custom_host_explicit_id https://custom.test
        +custom_host_explicit_id_over_query https://custom.test/?o=1234
        +custom_host_query_id https://custom.test/?o=1234
         dev (default) development https://dev.example.com
         prod production https://prod.example.com
         staging
        @@ -15,18 +15,15 @@
           "targets": [
             {
               "name": "custom_host_explicit_id",
        -      "host": "https://custom.test",
        -      "workspace_id": "5678"
        +      "host": "https://custom.test"
             },
             {
               "name": "custom_host_explicit_id_over_query",
        -      "host": "https://custom.test",
        -      "workspace_id": "5678"
        +      "host": "https://custom.test/?o=1234"
             },
             {
               "name": "custom_host_query_id",
        -      "host": "https://custom.test",
        -      "workspace_id": "1234"
        +      "host": "https://custom.test/?o=1234"
             },
             {
               "name": "dev",

latest (v1.22.1): same output as main (accb3df)

TestAccept/bundle/debug/list-targets/DMS=true: branch ✅ | main (accb3df) ❌ | latest (v1.22.1) ❌

main (accb3df):

acceptance_test.go:1311: Diff:
        --- bundle/debug/list-targets/output.txt
        +++ /tmp/TestAcceptbundledebuglist-targetsDMS=true2791958205/002/output.txt
        @@ -1,8 +1,8 @@
         
         >>> [CLI] bundle debug list-targets
        -custom_host_explicit_id https://custom.test workspace_id:5678
        -custom_host_explicit_id_over_query https://custom.test workspace_id:5678
        -custom_host_query_id https://custom.test workspace_id:1234
        +custom_host_explicit_id https://custom.test
        +custom_host_explicit_id_over_query https://custom.test/?o=1234
        +custom_host_query_id https://custom.test/?o=1234
         dev (default) development https://dev.example.com
         prod production https://prod.example.com
         staging
        @@ -15,18 +15,15 @@
           "targets": [
             {
               "name": "custom_host_explicit_id",
        -      "host": "https://custom.test",
        -      "workspace_id": "5678"
        +      "host": "https://custom.test"
             },
             {
               "name": "custom_host_explicit_id_over_query",
        -      "host": "https://custom.test",
        -      "workspace_id": "5678"
        +      "host": "https://custom.test/?o=1234"
             },
             {
               "name": "custom_host_query_id",
        -      "host": "https://custom.test",
        -      "workspace_id": "1234"
        +      "host": "https://custom.test/?o=1234"
             },
             {
               "name": "dev",

latest (v1.22.1): same output as main (accb3df)

TestAccept/bundle/strict_profile_match/list_targets/DMS=: branch ✅ | main (accb3df) ❌ | latest (v1.22.1) ❌

main (accb3df):

acceptance_test.go:1311: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1311
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1081
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:659
        	Error:      	Not equal: 
        	            	expected: "\n=== list-targets reports the inherited workspace ID\n>>> [CLI] bundle debug list-targets -o json\n{\n  \"targets\": [\n    {\n      \"name\": \"inherited_workspace_id\",\n      \"default\": true,\n      \"host\": \"[CUSTOM_HOST]\",\n      \"workspace_id\": \"[WORKSPACE_ID]\"\n    }\n  ]\n}\n=== Authentication uses the same workspace ID\n>>> errcode [CLI] bundle run -t inherited_workspace_id show_auth\nprofile=workspace_custom_host host=[CUSTOM_HOST] workspace_id=[WORKSPACE_ID]\n"
        	            	actual  : "\n=== list-targets reports the inherited workspace ID\n>>> [CLI] bundle debug list-targets -o json\n{\n  \"targets\": [\n    {\n      \"name\": \"inherited_workspace_id\",\n      \"default\": true,\n      \"host\": \"[CUSTOM_HOST]/?o=2222222222\"\n    }\n  ]\n}\n=== Authentication uses the same workspace ID\n>>> errcode [CLI] bundle run -t inherited_workspace_id show_auth\nprofile=workspace_custom_host host=[CUSTOM_HOST] workspace_id=[WORKSPACE_ID]\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -8,4 +8,3 @@
        	            	       "default": true,
        	            	-      "host": "[CUSTOM_HOST]",
        	            	-      "workspace_id": "[WORKSPACE_ID]"
        	            	+      "host": "[CUSTOM_HOST]/?o=2222222222"
        	            	     }
        	Test:       	TestAccept/bundle/strict_profile_match/list_targets/DMS=
        	Messages:   	bundle/strict_profile_match/list_targets/output.txt vs /tmp/TestAcceptbundlestrict_profile_matchlist_targetsDMS=3683463095/002/output.txt

latest (v1.22.1): same output as main (accb3df)

TestAccept/bundle/strict_profile_match/list_targets/DMS=true: branch ✅ | main (accb3df) ❌ | latest (v1.22.1) ❌

main (accb3df):

acceptance_test.go:1311: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1311
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1081
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:659
        	Error:      	Not equal: 
        	            	expected: "\n=== list-targets reports the inherited workspace ID\n>>> [CLI] bundle debug list-targets -o json\n{\n  \"targets\": [\n    {\n      \"name\": \"inherited_workspace_id\",\n      \"default\": true,\n      \"host\": \"[CUSTOM_HOST]\",\n      \"workspace_id\": \"[WORKSPACE_ID]\"\n    }\n  ]\n}\n=== Authentication uses the same workspace ID\n>>> errcode [CLI] bundle run -t inherited_workspace_id show_auth\nprofile=workspace_custom_host host=[CUSTOM_HOST] workspace_id=[WORKSPACE_ID]\n"
        	            	actual  : "\n=== list-targets reports the inherited workspace ID\n>>> [CLI] bundle debug list-targets -o json\n{\n  \"targets\": [\n    {\n      \"name\": \"inherited_workspace_id\",\n      \"default\": true,\n      \"host\": \"[CUSTOM_HOST]/?o=2222222222\"\n    }\n  ]\n}\n=== Authentication uses the same workspace ID\n>>> errcode [CLI] bundle run -t inherited_workspace_id show_auth\nprofile=workspace_custom_host host=[CUSTOM_HOST] workspace_id=[WORKSPACE_ID]\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -8,4 +8,3 @@
        	            	       "default": true,
        	            	-      "host": "[CUSTOM_HOST]",
        	            	-      "workspace_id": "[WORKSPACE_ID]"
        	            	+      "host": "[CUSTOM_HOST]/?o=2222222222"
        	            	     }
        	Test:       	TestAccept/bundle/strict_profile_match/list_targets/DMS=true
        	Messages:   	bundle/strict_profile_match/list_targets/output.txt vs /tmp/TestAcceptbundlestrict_profile_matchlist_targetsDMS=true3769124688/002/output.txt

latest (v1.22.1):

acceptance_test.go:1311: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1311
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1081
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:659
        	Error:      	Not equal: 
        	            	expected: "\n=== list-targets reports the inherited workspace ID\n>>> [CLI] bundle debug list-targets -o json\n{\n  \"targets\": [\n    {\n      \"name\": \"inherited_workspace_id\",\n      \"default\": true,\n      \"host\": \"[CUSTOM_HOST]\",\n      \"workspace_id\": \"[WORKSPACE_ID]\"\n    }\n  ]\n}\n=== Authentication uses the same workspace ID\n>>> errcode [CLI] bundle run -t inherited_workspace_id show_auth\nprofile=workspace_custom_host host=[CUSTOM_HOST] workspace_id=[WORKSPACE_ID]\n"
        	            	actual  : "\n=== list-targets reports the inherited workspace ID\n>>> [CLI] bundle debug list-targets -o json\n{\n  \"targets\": [\n    {\n      \"name\": \"inherited_workspace_id\",\n      \"default\": true,\n      \"host\": \"[CUSTOM_HOST]/?o=2222222222\"\n    }\n  ]\n}\n=== Authentication uses the same workspace ID\n>>> errcode [CLI] bundle run -t inherited_workspace_id show_auth\nprofile=workspace_custom_host host=[CUSTOM_HOST] workspace_id=[WORKSPACE_ID]\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -8,4 +8,3 @@
        	            	       "default": true,
        	            	-      "host": "[CUSTOM_HOST]",
        	            	-      "workspace_id": "[WORKSPACE_ID]"
        	            	+      "host": "[CUSTOM_HOST]/?o=2222222222"
        	            	     }
        	Test:       	TestAccept/bundle/strict_profile_match/list_targets/DMS=true
        	Messages:   	bundle/strict_profile_match/list_targets/output.txt vs /tmp/TestAcceptbundlestrict_profile_matchlist_targetsDMS=true3910281477/002/output.txt
FAIL

list-targets normalized only the target's own workspace section, so a
target inherited neither the top-level host nor the top-level
workspace_id. With a top-level workspace_id of 5678 and a target host of
https://custom.test/?o=1234, it reported 1234 while authentication uses
5678. Merge the target's workspace over the top-level one, as
MergeTargetOverrides does, before normalizing.

Co-authored-by: Isaac <no-reply@databricks.com>
@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 2493002

Run: 40502900514

Env ✅​pass 🙈​skip Time
✅​ aws linux-2core-8gb 281 18 5:35
✅​ aws-windows-latest-4core-16gb 283 16 3:57
✅​ azure linux-2core-8gb 280 18 5:18
✅​ azure-windows-latest-4core-16gb 282 16 3:50
✅​ gcp linux-2core-8gb 281 18 5:35
✅​ gcp-windows-latest-4core-16gb 283 16 7:50
Top 6 slowest tests (at least 2 minutes):
duration env testname
7:46 gcp-windows-latest-4core-16gb TestAccept
4:00 aws linux-2core-8gb TestAccept
3:52 aws-windows-latest-4core-16gb TestAccept
3:52 gcp linux-2core-8gb TestAccept
3:47 azure linux-2core-8gb TestAccept
3:44 azure-windows-latest-4core-16gb TestAccept

@pavloKozlov
pavloKozlov marked this pull request as ready for review October 26, 2026 12:58
@pavloKozlov
pavloKozlov requested review from a team as code owners October 26, 2026 12:58
The value cases were already covered by the list-targets acceptance tests.
Replace the check against MergeTargetOverrides with an acceptance test that
compares the workspace ID list-targets reports with the one authentication
uses for the same target.

Co-authored-by: Isaac <no-reply@databricks.com>
Read the host and workspace ID from the typed top-level and target
workspace settings instead of merging dynamic values, and drop
Root.TargetWorkspace. An explicit empty value in the target can't be
told apart from an unset one, so it no longer clears the top-level value.

Co-authored-by: Isaac <no-reply@databricks.com>
@pavloKozlov
pavloKozlov requested a review from denik October 27, 2026 13:01
@pavloKozlov
pavloKozlov added this pull request to the merge queue Oct 27, 2026
Merged via the queue into main with commit 1d5ca29 Oct 27, 2026
27 checks passed
@pavloKozlov
pavloKozlov deleted the list-targets-workspace-id branch October 27, 2026 13:27
@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 1d5ca29

Run: 40512329915

Env ❌​FAIL 🔄​flaky ✅​pass 🙈​skip Time
❌​ aws linux-2core-8gb 4 2 1461 1212 155:40
❌​ aws-windows-latest-4core-16gb 4 2 1386 1237 175:11
✅​ azure linux-2core-8gb 1316 1264 116:52
✅​ azure-windows-latest-4core-16gb 1241 1289 141:48
🔄​ gcp linux-2core-8gb 3 1300 1269 140:45
✅​ gcp-windows-latest-4core-16gb 1228 1294 152:37
10 interesting tests: 6 flaky, 4 FAIL
Test Name aws linux-2core-8gb aws-windows-latest-4core-16gb gcp linux-2core-8gb
❌​ TestAccept ❌​F ❌​F 🔄​f
🔄​ TestAccept/bundle/invariant/no_drift ✅​p ✅​p 🔄​f
🔄​ TestAccept/bundle/invariant/no_drift/DMS=/INPUT_CONFIG=genie_space.yml.tmpl/READPLAN= ✅​p ✅​p 🔄​f
🔄​ TestAccept/bundle/resources/model_provider_services/lifecycle ✅​p 🔄​f ✅​p
🔄​ TestAccept/bundle/resources/model_provider_services/lifecycle/DMS=true ✅​p 🔄​f ✅​p
❌​ TestAccept/bundle/resources/postgres_databases/live_errors/bad_role_ref ❌​F ❌​F 🙈​s
❌​ TestAccept/bundle/resources/postgres_databases/live_errors/bad_role_ref/DMS= ❌​F ❌​F
❌​ TestAccept/bundle/resources/postgres_databases/live_errors/bad_role_ref/DMS=true ❌​F ❌​F
🔄​ TestAccept/bundle/resources/postgres_synced_tables/recreate 🔄​f ✅​p 🙈​s
🔄​ TestAccept/bundle/resources/postgres_synced_tables/recreate/DMS=true 🔄​f ✅​p
Top 50 slowest tests (at least 2 minutes):
duration env testname
13:58 gcp linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=true
13:55 aws-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=
12:42 aws linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=
12:38 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=
10:49 aws-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DMS=
10:42 gcp linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=
10:02 aws linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=true
10:02 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=true
10:01 gcp linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=true
9:37 gcp linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=
9:21 azure-windows-latest-4core-16gb TestAccept/bundle/invariant/destroy_idempotent/DMS=/INPUT_CONFIG=cluster.yml.tmpl/READPLAN=1
8:38 aws-windows-latest-4core-16gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=true
8:33 aws linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=
8:28 aws-windows-latest-4core-16gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=
8:11 aws-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=true
8:05 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=true
8:05 azure-windows-latest-4core-16gb TestAccept/bundle/invariant/destroy_idempotent/DMS=/INPUT_CONFIG=cluster_apply_policy_default_values.yml.tmpl/READPLAN=1
7:56 gcp-windows-latest-4core-16gb TestAccept/bundle/invariant/no_drift/DMS=true/INPUT_CONFIG=cluster_libraries.yml.tmpl/READPLAN=
7:51 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/deploy/local_ssd_count/DMS=
7:49 gcp linux-2core-8gb TestAccept/bundle/resources/clusters/deploy/local_ssd_count/DMS=
7:46 gcp-windows-latest-4core-16gb TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=cluster_apply_policy_default_values.yml.tmpl/READPLAN=1
7:45 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/deploy/local_ssd_count/DMS=true
7:44 aws linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=true
7:40 aws-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DMS=true
7:40 gcp-windows-latest-4core-16gb TestAccept/bundle/invariant/no_drift/DMS=true/INPUT_CONFIG=cluster_libraries.yml.tmpl/READPLAN=1
7:36 gcp linux-2core-8gb TestAccept/bundle/resources/clusters/deploy/local_ssd_count/DMS=true
7:30 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=
7:24 azure-windows-latest-4core-16gb TestAccept/bundle/invariant/destroy_idempotent/DMS=/INPUT_CONFIG=cluster_libraries.yml.tmpl/READPLAN=
7:21 aws linux-2core-8gb TestAccept/bundle/invariant/no_drift/DMS=true/INPUT_CONFIG=cluster_apply_policy_default_values.yml.tmpl/READPLAN=
7:20 aws linux-2core-8gb TestAccept/bundle/invariant/destroy_idempotent/DMS=/INPUT_CONFIG=cluster_libraries.yml.tmpl/READPLAN=1
7:15 aws linux-2core-8gb TestAccept/bundle/invariant/destroy_idempotent/DMS=/INPUT_CONFIG=cluster_libraries.yml.tmpl/READPLAN=
7:15 aws linux-2core-8gb TestAccept/bundle/invariant/no_drift/DMS=/INPUT_CONFIG=cluster_libraries.yml.tmpl/READPLAN=1
7:13 aws linux-2core-8gb TestAccept/bundle/invariant/no_drift/DMS=/INPUT_CONFIG=cluster_libraries.yml.tmpl/READPLAN=
7:07 azure-windows-latest-4core-16gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=
7:02 azure-windows-latest-4core-16gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=true
6:59 azure linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=
6:56 aws-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/resize-terminated-fallback/DMS=
6:55 aws-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/resize-terminated-fallback/DMS=true
6:54 gcp linux-2core-8gb TestAccept/bundle/invariant/destroy_idempotent/DMS=/INPUT_CONFIG=cluster.yml.tmpl/READPLAN=
6:41 azure linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=true
6:41 aws linux-2core-8gb TestAccept/bundle/config-remote-sync/multiple_resources/DMS=true
6:35 aws-windows-latest-4core-16gb TestAccept/bundle/invariant/destroy_idempotent/DMS=/INPUT_CONFIG=cluster_libraries.yml.tmpl/READPLAN=1
6:35 gcp linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DMS=
6:31 gcp linux-2core-8gb TestAccept/bundle/config-remote-sync/multiple_resources/DMS=true
6:29 aws linux-2core-8gb TestAccept/bundle/invariant/no_drift/DMS=/INPUT_CONFIG=cluster_apply_policy_default_values.yml.tmpl/READPLAN=1
6:20 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/apps/lifecycle-started-toggle/DMS=true
6:20 aws linux-2core-8gb TestAccept/bundle/config-remote-sync/multiple_resources/DMS=
6:18 azure-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=true
6:12 gcp linux-2core-8gb TestAccept/bundle/config-remote-sync/multiple_resources/DMS=
6:08 aws-windows-latest-4core-16gb TestAccept/bundle/invariant/destroy_idempotent/DMS=/INPUT_CONFIG=cluster.yml.tmpl/READPLAN=

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