Skip to content

[WIP] Add the testing property of pipelines to bundles - #7300

Draft
tharunbhuk-db wants to merge 10 commits into
tharun/pipelines-test-pr3-junitfrom
tharun/pipelines-test-pr4-bundles
Draft

tharunbhuk-db wants to merge 10 commits into
tharun/pipelines-test-pr3-junitfrom
tharun/pipelines-test-pr4-bundles

Conversation

@tharunbhuk-db

@tharunbhuk-db tharunbhuk-db commented Nov 2, 2026 •

Copy link
Copy Markdown

🥞 Stacked PR


Design doc: https://docs.google.com/document/d/1atW-JG_hQu-G-YX-m1M7OodNZdH7LMc9H7CBlQAv5gw/edit

Changes

  • Add resources.pipelines.<key>.testing, with the test sources and test-only dependencies that databricks pipelines test runs with.
  • The property is experimental. It needs DATABRICKS_BUNDLE_ENABLE_EXPERIMENTAL_PIPELINE_TESTING=true. While the variable is off, bundle validate rejects testing and names the variable, and bundles deploy exactly as before: pipelines are read with the SDK, and the existing path rules are unchanged.
  • Relative paths in testing are translated like libraries. bundle validate catches common mistakes in test dependencies, such as package names, URLs and a requirements file without -r.
  • Local wheels in test dependencies are uploaded like other libraries, and the same-name check covers them, so two wheels with one file name cannot overwrite each other.
  • bundle plan shows changes to testing made outside the bundle, and bundle deploy undoes them.
  • With the variable on, a local project folder after -e, such as -e ./project[test], maps to its deployed folder instead of failing.

Why

A bundle needs to declare where a pipeline's tests and their dependencies live. The CLI uses its own types and raw calls for testing, because the Go SDK does not have the field yet. Depends on API support for testing on Create and Edit. Keep as draft until then.

Tests

  • Unit tests for path translation, the dependency checks and the read-back. The translation and read-back tests also cover the variable off, where the old behavior stays.
  • Acceptance tests in acceptance/bundle/resources/pipelines/testing* (testing-disabled covers the variable unset), acceptance/bundle/environments/editable-folder and acceptance/pipelines/test. The live test also installs a local test dependency.

This pull request and its description were written by Isaac.

@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Commit: 286aa6045 | Workflow run

Regression test report

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

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

test branch main (aed6702) latest (v1.23.0)
TestAccept/bundle/environments/editable-folder/DMS= ✅ ❌ ❌
TestAccept/bundle/environments/editable-folder/DMS=true ✅ ❌ ❌
TestAccept/bundle/refschema/DMS= ✅ ❌ ❌
TestAccept/bundle/refschema/DMS=true ✅ ❌ ❌
TestAccept/bundle/resources/pipelines/testing-dependencies/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/pipelines/testing-dependencies/DMS=true ✅ ❌ ❌
TestAccept/bundle/resources/pipelines/testing-disabled/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/pipelines/testing-disabled/DMS=true ✅ ❌ ❌
TestAccept/bundle/resources/pipelines/testing-same-name-libraries/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/pipelines/testing-same-name-libraries/DMS=true ✅ ❌ ❌
TestAccept/bundle/resources/pipelines/testing/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/pipelines/testing/DMS=true ✅ ❌ ❌
TestAccept/pipelines/databricks-cli-help ✅ ❌ ❌
TestAccept/pipelines/test/arguments ✅ ❌ ❌
TestAccept/pipelines/test/immutable ✅ ❌ ❌
TestAccept/pipelines/test/live ✅ ❌ ❌
TestAccept/pipelines/test/many-cases ✅ ❌ ❌
TestAccept/pipelines/test/pipeline-id ✅ ❌ ❌
TestAccept/pipelines/test/results ✅ ❌ ❌
TestAccept/pipelines/test/run-control ✅ ❌ ❌
TestAccept/pipelines/test/selection ✅ ❌ ❌
TestAccept/pipelines/test/submit-error ✅ ❌ ❌
TestAccept/bundle/environments/editable-folder/DMS=: branch ✅ | main (aed6702) ❌ | latest (v1.23.0) ❌

main (aed6702):

acceptance_test.go:1341: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1341
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1082
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:659
        	Error:      	Not equal: 
        	            	expected: "\n>>> [CLI] bundle validate -o json\n{\n  \"job\": [\n    \"-e /Workspace/Users/[USERNAME]/.bundle/editable-folder/default/files/project\"\n  ],\n  \"pipeline\": [\n    \"-e /Workspace/Users/[USERNAME]/.bundle/editable-folder/default/files/project\"\n  ],\n  \"testing\": [\n    \"-e /Workspace/Users/[USERNAME]/.bundle/editable-folder/default/files/project[test]\"\n  ]\n}\n"
        	            	actual  : "\n>>> [CLI] bundle validate -o json\nWarning: unknown field: testing\n  at resources.pipelines.my_pipeline\n  in databricks.yml:27:7\n\nError: unable to determine if [TEST_TMP_DIR]/project is not a notebook: read [TEST_TMP_DIR]/project: is a directory\n\n{\n  \"job\": [\n    \"-e project\"\n  ],\n  \"pipeline\": [\n    \"-e project\"\n  ],\n  \"testing\": null\n}\n\nExit code: 1\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -2,13 +2,19 @@
        	            	 >>> [CLI] bundle validate -o json
        	            	+Warning: unknown field: testing
        	            	+  at resources.pipelines.my_pipeline
        	            	+  in databricks.yml:27:7
        	            	+
        	            	+Error: unable to determine if [TEST_TMP_DIR]/project is not a notebook: read [TEST_TMP_DIR]/project: is a directory
        	            	+
        	            	 {
        	            	   "job": [
        	            	-    "-e /Workspace/Users/[USERNAME]/.bundle/editable-folder/default/files/project"
        	            	+    "-e project"
        	            	   ],
        	            	   "pipeline": [
        	            	-    "-e /Workspace/Users/[USERNAME]/.bundle/editable-folder/default/files/project"
        	            	+    "-e project"
        	            	   ],
        	            	-  "testing": [
        	            	-    "-e /Workspace/Users/[USERNAME]/.bundle/editable-folder/default/files/project[test]"
        	            	-  ]
        	            	+  "testing": null
        	            	 }
        	            	 
        	            	+Exit code: 1
        	            	+
        	Test:       	TestAccept/bundle/environments/editable-folder/DMS=
        	Messages:   	bundle/environments/editable-folder/output.txt vs /tmp/TestAcceptbundleenvironmentseditable-folderDMS=2521714007/002/output.txt

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

TestAccept/bundle/environments/editable-folder/DMS=true: branch ✅ | main (aed6702) ❌ | latest (v1.23.0) ❌

main (aed6702):

acceptance_test.go:1341: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1341
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1082
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:659
        	Error:      	Not equal: 
        	            	expected: "\n>>> [CLI] bundle validate -o json\n{\n  \"job\": [\n    \"-e /Workspace/Users/[USERNAME]/.bundle/editable-folder/default/files/project\"\n  ],\n  \"pipeline\": [\n    \"-e /Workspace/Users/[USERNAME]/.bundle/editable-folder/default/files/project\"\n  ],\n  \"testing\": [\n    \"-e /Workspace/Users/[USERNAME]/.bundle/editable-folder/default/files/project[test]\"\n  ]\n}\n"
        	            	actual  : "\n>>> [CLI] bundle validate -o json\nWarning: unknown field: testing\n  at resources.pipelines.my_pipeline\n  in databricks.yml:27:7\n\nError: unable to determine if [TEST_TMP_DIR]/project is not a notebook: read [TEST_TMP_DIR]/project: is a directory\n\n{\n  \"job\": [\n    \"-e project\"\n  ],\n  \"pipeline\": [\n    \"-e project\"\n  ],\n  \"testing\": null\n}\n\nExit code: 1\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -2,13 +2,19 @@
        	            	 >>> [CLI] bundle validate -o json
        	            	+Warning: unknown field: testing
        	            	+  at resources.pipelines.my_pipeline
        	            	+  in databricks.yml:27:7
        	            	+
        	            	+Error: unable to determine if [TEST_TMP_DIR]/project is not a notebook: read [TEST_TMP_DIR]/project: is a directory
        	            	+
        	            	 {
        	            	   "job": [
        	            	-    "-e /Workspace/Users/[USERNAME]/.bundle/editable-folder/default/files/project"
        	            	+    "-e project"
        	            	   ],
        	            	   "pipeline": [
        	            	-    "-e /Workspace/Users/[USERNAME]/.bundle/editable-folder/default/files/project"
        	            	+    "-e project"
        	            	   ],
        	            	-  "testing": [
        	            	-    "-e /Workspace/Users/[USERNAME]/.bundle/editable-folder/default/files/project[test]"
        	            	-  ]
        	            	+  "testing": null
        	            	 }
        	            	 
        	            	+Exit code: 1
        	            	+
        	Test:       	TestAccept/bundle/environments/editable-folder/DMS=true
        	Messages:   	bundle/environments/editable-folder/output.txt vs /tmp/TestAcceptbundleenvironmentseditable-folderDMS=true738201178/002/output.txt

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

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

main (aed6702):

acceptance_test.go:1341: Diff:
        --- bundle/refschema/output/pipelines.txt
        +++ /tmp/TestAcceptbundlerefschemaDMS=4090363354/001/output/pipelines.txt
        @@ -867,14 +867,6 @@
         resources.pipelines.*.tags	map[string]string	ALL
         resources.pipelines.*.tags.*	string	ALL
         resources.pipelines.*.target	string	ALL
        -resources.pipelines.*.testing	*resources.PipelineTesting	ALL
        -resources.pipelines.*.testing.environment	*resources.PipelineTestEnvironment	ALL
        -resources.pipelines.*.testing.environment.dependencies	[]string	ALL
        -resources.pipelines.*.testing.environment.dependencies[*]	string	ALL
        -resources.pipelines.*.testing.sources	[]resources.PipelineTestSource	ALL
        -resources.pipelines.*.testing.sources[*]	resources.PipelineTestSource	ALL
        -resources.pipelines.*.testing.sources[*].glob	*pipelines.PathPattern	ALL
        -resources.pipelines.*.testing.sources[*].glob.include	string	ALL
         resources.pipelines.*.trigger	*pipelines.PipelineTrigger	ALL
         resources.pipelines.*.trigger.cron	*pipelines.CronTrigger	ALL
         resources.pipelines.*.trigger.cron.quartz_cron_schedule	string	ALL

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

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

main (aed6702):

acceptance_test.go:1341: Diff:
        --- bundle/refschema/output/pipelines.txt
        +++ /tmp/TestAcceptbundlerefschemaDMS=true701706705/001/output/pipelines.txt
        @@ -867,14 +867,6 @@
         resources.pipelines.*.tags	map[string]string	ALL
         resources.pipelines.*.tags.*	string	ALL
         resources.pipelines.*.target	string	ALL
        -resources.pipelines.*.testing	*resources.PipelineTesting	ALL
        -resources.pipelines.*.testing.environment	*resources.PipelineTestEnvironment	ALL
        -resources.pipelines.*.testing.environment.dependencies	[]string	ALL
        -resources.pipelines.*.testing.environment.dependencies[*]	string	ALL
        -resources.pipelines.*.testing.sources	[]resources.PipelineTestSource	ALL
        -resources.pipelines.*.testing.sources[*]	resources.PipelineTestSource	ALL
        -resources.pipelines.*.testing.sources[*].glob	*pipelines.PathPattern	ALL
        -resources.pipelines.*.testing.sources[*].glob.include	string	ALL
         resources.pipelines.*.trigger	*pipelines.PipelineTrigger	ALL
         resources.pipelines.*.trigger.cron	*pipelines.CronTrigger	ALL
         resources.pipelines.*.trigger.cron.quartz_cron_schedule	string	ALL
        
FAIL

latest (v1.23.0):

acceptance_test.go:1341: Diff:
        --- bundle/refschema/output/pipelines.txt
        +++ /tmp/TestAcceptbundlerefschemaDMS=true2590053670/001/output/pipelines.txt
        @@ -867,14 +867,6 @@
         resources.pipelines.*.tags	map[string]string	ALL
         resources.pipelines.*.tags.*	string	ALL
         resources.pipelines.*.target	string	ALL
        -resources.pipelines.*.testing	*resources.PipelineTesting	ALL
        -resources.pipelines.*.testing.environment	*resources.PipelineTestEnvironment	ALL
        -resources.pipelines.*.testing.environment.dependencies	[]string	ALL
        -resources.pipelines.*.testing.environment.dependencies[*]	string	ALL
        -resources.pipelines.*.testing.sources	[]resources.PipelineTestSource	ALL
        -resources.pipelines.*.testing.sources[*]	resources.PipelineTestSource	ALL
        -resources.pipelines.*.testing.sources[*].glob	*pipelines.PathPattern	ALL
        -resources.pipelines.*.testing.sources[*].glob.include	string	ALL
         resources.pipelines.*.trigger	*pipelines.PipelineTrigger	ALL
         resources.pipelines.*.trigger.cron	*pipelines.CronTrigger	ALL
         resources.pipelines.*.trigger.cron.quartz_cron_schedule	string	ALL
TestAccept/bundle/resources/pipelines/testing-dependencies/DMS=: branch ✅ | main (aed6702) ❌ | latest (v1.23.0) ❌

main (aed6702):

acceptance_test.go:1341: Diff:
        --- bundle/resources/pipelines/testing-dependencies/output.txt
        +++ /tmp/TestAcceptbundleresourcespipelinestesting-dependenciesDMS=2830581053/002/output.txt
        @@ -1,39 +1,17 @@
         
         >>> musterr [CLI] bundle validate
        -Error: testing.environment.dependencies must point at files, not "faker==33.0"
        -  at resources.pipelines.orders.testing.environment.dependencies[3]
        -  in databricks.yml:19:15
        +Warning: unknown field: testing
        +  at resources.pipelines.orders
        +  in databricks.yml:8:7
         
        -A test dependency is a project folder, a wheel, or a requirements file after -r, in the bundle, under /Workspace/, or under /Volumes/. Declare test packages in a project file, such as the test extra of a pyproject.toml, and reference its folder, for example -e ./project[test]. For a path in the bundle, use -e or -r followed by a space. URLs, other pip options, and .. are not supported.
        -
        -Error: testing.environment.dependencies must point at files, not "git+https://github.com/example/helpers"
        -  at resources.pipelines.orders.testing.environment.dependencies[4]
        -  in databricks.yml:20:15
        -
        -A test dependency is a project folder, a wheel, or a requirements file after -r, in the bundle, under /Workspace/, or under /Volumes/. Declare test packages in a project file, such as the test extra of a pyproject.toml, and reference its folder, for example -e ./project[test]. For a path in the bundle, use -e or -r followed by a space. URLs, other pip options, and .. are not supported.
        -
        -Error: testing.environment.dependencies needs -r before the requirements file "/Workspace/Shared/orders/requirements.txt"
        -  at resources.pipelines.orders.testing.environment.dependencies[5]
        -  in databricks.yml:21:15
        -
        -Without -r, pip treats the file as a package to install. For example: -r ./tests/requirements.txt.
        -
        -Error: testing.environment.dependencies must point at files, not "--requirement ./orders/requirements.txt"
        -  at resources.pipelines.orders.testing.environment.dependencies[6]
        -  in databricks.yml:22:15
        -
        -A test dependency is a project folder, a wheel, or a requirements file after -r, in the bundle, under /Workspace/, or under /Volumes/. Declare test packages in a project file, such as the test extra of a pyproject.toml, and reference its folder, for example -e ./project[test]. For a path in the bundle, use -e or -r followed by a space. URLs, other pip options, and .. are not supported.
        -
        -Error: testing.environment.dependencies must point at files, not "/Workspace/Shared/orders -i https://example.com/simple"
        -  at resources.pipelines.orders.testing.environment.dependencies[7]
        -  in databricks.yml:23:15
        -
        -A test dependency is a project folder, a wheel, or a requirements file after -r, in the bundle, under /Workspace/, or under /Volumes/. Declare test packages in a project file, such as the test extra of a pyproject.toml, and reference its folder, for example -e ./project[test]. For a path in the bundle, use -e or -r followed by a space. URLs, other pip options, and .. are not supported.
        -
         Name: pipeline-testing-dependencies
         Target: default
         Workspace:
           User: [USERNAME]
           Path: /Workspace/Users/[USERNAME]/.bundle/pipeline-testing-dependencies/default
         
        -Found 5 errors
        +Found 1 warning
        +
        +Unexpected success
        +
        +Exit code: 1
        
    acceptance_test.go:1131: Test produced unexpected files:
        .databricks/.gitignore

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

TestAccept/bundle/resources/pipelines/testing-dependencies/DMS=true: branch ✅ | main (aed6702) ❌ | latest (v1.23.0) ❌

main (aed6702):

acceptance_test.go:1341: Diff:
        --- bundle/resources/pipelines/testing-dependencies/output.txt
        +++ /tmp/TestAcceptbundleresourcespipelinestesting-dependenciesDMS=t2583314780/002/output.txt
        @@ -1,39 +1,17 @@
         
         >>> musterr [CLI] bundle validate
        -Error: testing.environment.dependencies must point at files, not "faker==33.0"
        -  at resources.pipelines.orders.testing.environment.dependencies[3]
        -  in databricks.yml:19:15
        +Warning: unknown field: testing
        +  at resources.pipelines.orders
        +  in databricks.yml:8:7
         
        -A test dependency is a project folder, a wheel, or a requirements file after -r, in the bundle, under /Workspace/, or under /Volumes/. Declare test packages in a project file, such as the test extra of a pyproject.toml, and reference its folder, for example -e ./project[test]. For a path in the bundle, use -e or -r followed by a space. URLs, other pip options, and .. are not supported.
        -
        -Error: testing.environment.dependencies must point at files, not "git+https://github.com/example/helpers"
        -  at resources.pipelines.orders.testing.environment.dependencies[4]
        -  in databricks.yml:20:15
        -
        -A test dependency is a project folder, a wheel, or a requirements file after -r, in the bundle, under /Workspace/, or under /Volumes/. Declare test packages in a project file, such as the test extra of a pyproject.toml, and reference its folder, for example -e ./project[test]. For a path in the bundle, use -e or -r followed by a space. URLs, other pip options, and .. are not supported.
        -
        -Error: testing.environment.dependencies needs -r before the requirements file "/Workspace/Shared/orders/requirements.txt"
        -  at resources.pipelines.orders.testing.environment.dependencies[5]
        -  in databricks.yml:21:15
        -
        -Without -r, pip treats the file as a package to install. For example: -r ./tests/requirements.txt.
        -
        -Error: testing.environment.dependencies must point at files, not "--requirement ./orders/requirements.txt"
        -  at resources.pipelines.orders.testing.environment.dependencies[6]
        -  in databricks.yml:22:15
        -
        -A test dependency is a project folder, a wheel, or a requirements file after -r, in the bundle, under /Workspace/, or under /Volumes/. Declare test packages in a project file, such as the test extra of a pyproject.toml, and reference its folder, for example -e ./project[test]. For a path in the bundle, use -e or -r followed by a space. URLs, other pip options, and .. are not supported.
        -
        -Error: testing.environment.dependencies must point at files, not "/Workspace/Shared/orders -i https://example.com/simple"
        -  at resources.pipelines.orders.testing.environment.dependencies[7]
        -  in databricks.yml:23:15
        -
        -A test dependency is a project folder, a wheel, or a requirements file after -r, in the bundle, under /Workspace/, or under /Volumes/. Declare test packages in a project file, such as the test extra of a pyproject.toml, and reference its folder, for example -e ./project[test]. For a path in the bundle, use -e or -r followed by a space. URLs, other pip options, and .. are not supported.
        -
         Name: pipeline-testing-dependencies
         Target: default
         Workspace:
           User: [USERNAME]
           Path: /Workspace/Users/[USERNAME]/.bundle/pipeline-testing-dependencies/default
         
        -Found 5 errors
        +Found 1 warning
        +
        +Unexpected success
        +
        +Exit code: 1
        
    acceptance_test.go:1131: Test produced unexpected files:
        .databricks/.gitignore

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

TestAccept/bundle/resources/pipelines/testing-disabled/DMS=: branch ✅ | main (aed6702) ❌ | latest (v1.23.0) ❌

main (aed6702):

acceptance_test.go:1341: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1341
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1082
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:659
        	Error:      	Not equal: 
        	            	expected: "\n>>> musterr [CLI] bundle validate\nError: the testing property of pipelines is experimental. Set DATABRICKS_BUNDLE_ENABLE_EXPERIMENTAL_PIPELINE_TESTING=true to enable it\n  at resources.pipelines.orders.testing\n  in databricks.yml:9:9\n\nName: pipeline-testing-disabled\nTarget: default\n\nFound 1 error\n"
        	            	actual  : "\n>>> musterr [CLI] bundle validate\nWarning: unknown field: testing\n  at resources.pipelines.orders\n  in databricks.yml:8:7\n\nName: pipeline-testing-disabled\nTarget: default\nWorkspace:\n  User: [USERNAME]\n  Path: /Workspace/Users/[USERNAME]/.bundle/pipeline-testing-disabled/default\n\nFound 1 warning\n\nUnexpected success\n\nExit code: 1\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -2,5 +2,5 @@
        	            	 >>> musterr [CLI] bundle validate
        	            	-Error: the testing property of pipelines is experimental. Set DATABRICKS_BUNDLE_ENABLE_EXPERIMENTAL_PIPELINE_TESTING=true to enable it
        	            	-  at resources.pipelines.orders.testing
        	            	-  in databricks.yml:9:9
        	            	+Warning: unknown field: testing
        	            	+  at resources.pipelines.orders
        	            	+  in databricks.yml:8:7
        	            	 
        	            	@@ -8,4 +8,11 @@
        	            	 Target: default
        	            	+Workspace:
        	            	+  User: [USERNAME]
        	            	+  Path: /Workspace/Users/[USERNAME]/.bundle/pipeline-testing-disabled/default
        	            	 
        	            	-Found 1 error
        	            	+Found 1 warning
        	            	 
        	            	+Unexpected success
        	            	+
        	            	+Exit code: 1
        	            	+
        	Test:       	TestAccept/bundle/resources/pipelines/testing-disabled/DMS=
        	Messages:   	bundle/resources/pipelines/testing-disabled/output.txt vs /tmp/TestAcceptbundleresourcespipelinestesting-disabledDMS=3197547939/002/output.txt
    acceptance_test.go:1131: Test produced unexpected files:
        .databricks/.gitignore

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

TestAccept/bundle/resources/pipelines/testing-disabled/DMS=true: branch ✅ | main (aed6702) ❌ | latest (v1.23.0) ❌

main (aed6702):

acceptance_test.go:1341: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1341
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1082
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:659
        	Error:      	Not equal: 
        	            	expected: "\n>>> musterr [CLI] bundle validate\nError: the testing property of pipelines is experimental. Set DATABRICKS_BUNDLE_ENABLE_EXPERIMENTAL_PIPELINE_TESTING=true to enable it\n  at resources.pipelines.orders.testing\n  in databricks.yml:9:9\n\nName: pipeline-testing-disabled\nTarget: default\n\nFound 1 error\n"
        	            	actual  : "\n>>> musterr [CLI] bundle validate\nWarning: unknown field: testing\n  at resources.pipelines.orders\n  in databricks.yml:8:7\n\nName: pipeline-testing-disabled\nTarget: default\nWorkspace:\n  User: [USERNAME]\n  Path: /Workspace/Users/[USERNAME]/.bundle/pipeline-testing-disabled/default\n\nFound 1 warning\n\nUnexpected success\n\nExit code: 1\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -2,5 +2,5 @@
        	            	 >>> musterr [CLI] bundle validate
        	            	-Error: the testing property of pipelines is experimental. Set DATABRICKS_BUNDLE_ENABLE_EXPERIMENTAL_PIPELINE_TESTING=true to enable it
        	            	-  at resources.pipelines.orders.testing
        	            	-  in databricks.yml:9:9
        	            	+Warning: unknown field: testing
        	            	+  at resources.pipelines.orders
        	            	+  in databricks.yml:8:7
        	            	 
        	            	@@ -8,4 +8,11 @@
        	            	 Target: default
        	            	+Workspace:
        	            	+  User: [USERNAME]
        	            	+  Path: /Workspace/Users/[USERNAME]/.bundle/pipeline-testing-disabled/default
        	            	 
        	            	-Found 1 error
        	            	+Found 1 warning
        	            	 
        	            	+Unexpected success
        	            	+
        	            	+Exit code: 1
        	            	+
        	Test:       	TestAccept/bundle/resources/pipelines/testing-disabled/DMS=true
        	Messages:   	bundle/resources/pipelines/testing-disabled/output.txt vs /tmp/TestAcceptbundleresourcespipelinestesting-disabledDMS=true2120844221/002/output.txt
    acceptance_test.go:1131: Test produced unexpected files:
        .databricks/.gitignore

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

TestAccept/bundle/resources/pipelines/testing-same-name-libraries/DMS=: branch ✅ | main (aed6702) ❌ | latest (v1.23.0) ❌

main (aed6702):

acceptance_test.go:1341: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1341
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1082
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:659
        	Error:      	Not equal: 
        	            	expected: "\n>>> errcode [CLI] bundle deploy\nError: Duplicate local library names: test_helpers-0.1-py3-none-any.whl\n  at resources.pipelines.orders.environment.dependencies[0]\n     resources.pipelines.orders.testing.environment.dependencies[0]\n  in databricks.yml:13:13\n     databricks.yml:21:15\n\nLocal library names must be unique but found libraries with the same name: pipeline/test_helpers-0.1-py3-none-any.whl, tests/test_helpers-0.1-py3-none-any.whl\n\n\nExit code: 1\n"
        	            	actual  : "\n>>> errcode [CLI] bundle deploy\nWarning: unknown field: testing\n  at resources.pipelines.orders\n  in databricks.yml:14:7\n\nUploading pipeline/test_helpers-0.1-py3-none-any.whl...\nUploading bundle files to /Workspace/Users/[USERNAME]/.bundle/pipeline-testing-same-name-libraries/default/files...\nCreated pipelines.orders\nFiles: 5 uploaded, 0 deleted\nResources: 1 created, 0 changed, 0 deleted, 0 unchanged\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -2,12 +2,11 @@
        	            	 >>> errcode [CLI] bundle deploy
        	            	-Error: Duplicate local library names: test_helpers-0.1-py3-none-any.whl
        	            	-  at resources.pipelines.orders.environment.dependencies[0]
        	            	-     resources.pipelines.orders.testing.environment.dependencies[0]
        	            	-  in databricks.yml:13:13
        	            	-     databricks.yml:21:15
        	            	+Warning: unknown field: testing
        	            	+  at resources.pipelines.orders
        	            	+  in databricks.yml:14:7
        	            	 
        	            	-Local library names must be unique but found libraries with the same name: pipeline/test_helpers-0.1-py3-none-any.whl, tests/test_helpers-0.1-py3-none-any.whl
        	            	+Uploading pipeline/test_helpers-0.1-py3-none-any.whl...
        	            	+Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/pipeline-testing-same-name-libraries/default/files...
        	            	+Created pipelines.orders
        	            	+Files: 5 uploaded, 0 deleted
        	            	+Resources: 1 created, 0 changed, 0 deleted, 0 unchanged
        	            	 
        	            	-
        	            	-Exit code: 1
        	            	-
        	Test:       	TestAccept/bundle/resources/pipelines/testing-same-name-libraries/DMS=
        	Messages:   	bundle/resources/pipelines/testing-same-name-libraries/output.txt vs /tmp/TestAcceptbundleresourcespipelinestesting-same-name-librarie1142635473/002/output.txt

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

TestAccept/bundle/resources/pipelines/testing-same-name-libraries/DMS=true: branch ✅ | main (aed6702) ❌ | latest (v1.23.0) ❌

main (aed6702):

acceptance_test.go:1341: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1341
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1082
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:659
        	Error:      	Not equal: 
        	            	expected: "\n>>> errcode [CLI] bundle deploy\nError: Duplicate local library names: test_helpers-0.1-py3-none-any.whl\n  at resources.pipelines.orders.environment.dependencies[0]\n     resources.pipelines.orders.testing.environment.dependencies[0]\n  in databricks.yml:13:13\n     databricks.yml:21:15\n\nLocal library names must be unique but found libraries with the same name: pipeline/test_helpers-0.1-py3-none-any.whl, tests/test_helpers-0.1-py3-none-any.whl\n\n\nExit code: 1\n"
        	            	actual  : "\n>>> errcode [CLI] bundle deploy\nWarning: unknown field: testing\n  at resources.pipelines.orders\n  in databricks.yml:14:7\n\nUploading pipeline/test_helpers-0.1-py3-none-any.whl...\nUploading bundle files to /Workspace/Users/[USERNAME]/.bundle/pipeline-testing-same-name-libraries/default/files...\nCreated pipelines.orders\nFiles: 5 uploaded, 0 deleted\nResources: 1 created, 0 changed, 0 deleted, 0 unchanged\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -2,12 +2,11 @@
        	            	 >>> errcode [CLI] bundle deploy
        	            	-Error: Duplicate local library names: test_helpers-0.1-py3-none-any.whl
        	            	-  at resources.pipelines.orders.environment.dependencies[0]
        	            	-     resources.pipelines.orders.testing.environment.dependencies[0]
        	            	-  in databricks.yml:13:13
        	            	-     databricks.yml:21:15
        	            	+Warning: unknown field: testing
        	            	+  at resources.pipelines.orders
        	            	+  in databricks.yml:14:7
        	            	 
        	            	-Local library names must be unique but found libraries with the same name: pipeline/test_helpers-0.1-py3-none-any.whl, tests/test_helpers-0.1-py3-none-any.whl
        	            	+Uploading pipeline/test_helpers-0.1-py3-none-any.whl...
        	            	+Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/pipeline-testing-same-name-libraries/default/files...
        	            	+Created pipelines.orders
        	            	+Files: 5 uploaded, 0 deleted
        	            	+Resources: 1 created, 0 changed, 0 deleted, 0 unchanged
        	            	 
        	            	-
        	            	-Exit code: 1
        	            	-
        	Test:       	TestAccept/bundle/resources/pipelines/testing-same-name-libraries/DMS=true
        	Messages:   	bundle/resources/pipelines/testing-same-name-libraries/output.txt vs /tmp/TestAcceptbundleresourcespipelinestesting-same-name-librarie1851322288/002/output.txt

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

TestAccept/bundle/resources/pipelines/testing/DMS=: branch ✅ | main (aed6702) ❌ | latest (v1.23.0) ❌

main (aed6702):

acceptance_test.go:1341: Diff:
        --- bundle/resources/pipelines/testing/output.txt
        +++ /tmp/TestAcceptbundleresourcespipelinestestingDMS=4060696030/002/output.txt
        @@ -1,25 +1,17 @@
         
         === Relative test paths resolve to the deployed workspace paths
         >>> [CLI] bundle validate -o json
        -{
        -  "environment": {
        -    "dependencies": [
        -      "--editable /Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/files[test]",
        -      "-r /Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/files/tests/requirements.txt",
        -      "./dist/*.whl"
        -    ]
        -  },
        -  "sources": [
        -    {
        -      "glob": {
        -        "include": "/Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/files/tests/**"
        -      }
        -    }
        -  ]
        -}
        +Warning: unknown field: testing
        +  at resources.pipelines.orders
        +  in databricks.yml:11:7
         
        +null
        +
         >>> [CLI] bundle deploy
        -Uploading dist/test_helpers-0.1-py3-none-any.whl...
        +Warning: unknown field: testing
        +  at resources.pipelines.orders
        +  in databricks.yml:11:7
        +
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/files...
         Created pipelines.orders
         Files: 5 uploaded, 0 deleted
        @@ -43,164 +33,73 @@
                 }
               }
             ],
        -    "name": "orders",
        -    "testing": {
        -      "sources": [
        -        {
        -          "glob": {
        -            "include": "/Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/files/tests/**"
        -          }
        -        }
        -      ],
        -      "environment": {
        -        "dependencies": [
        -          "--editable /Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/files[test]",
        -          "-r /Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/files/tests/requirements.txt",
        -          "/Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/artifacts/.internal/test_helpers-0.1-py3-none-any.whl"
        -        ]
        -      }
        -    }
        +    "name": "orders"
           }
         }
         
         === No changes after the deploy
         >>> [CLI] bundle plan
        +Warning: unknown field: testing
        +  at resources.pipelines.orders
        +  in databricks.yml:11:7
        +
         Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged
         
         === A remote edit that drops testing shows in the plan
         >>> [CLI] bundle plan -o json
        -{
        -  "action": "update",
        -  "old": {
        -    "sources": [
        -      {
        -        "glob": {
        -          "include": "/Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/files/tests/**"
        -        }
        -      }
        -    ],
        -    "environment": {
        -      "dependencies": [
        -        "--editable /Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/files[test]",
        -        "-r /Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/files/tests/requirements.txt",
        -        "/Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/artifacts/.internal/test_helpers-0.1-py3-none-any.whl"
        -      ]
        -    }
        -  },
        -  "new": {
        -    "sources": [
        -      {
        -        "glob": {
        -          "include": "/Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/files/tests/**"
        -        }
        -      }
        -    ],
        -    "environment": {
        -      "dependencies": [
        -        "--editable /Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/files[test]",
        -        "-r /Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/files/tests/requirements.txt",
        -        "/Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/artifacts/.internal/test_helpers-0.1-py3-none-any.whl"
        -      ]
        -    }
        -  }
        -}
        +Warning: unknown field: testing
        +  at resources.pipelines.orders
        +  in databricks.yml:11:7
         
        +null
        +
         >>> [CLI] bundle deploy
        -Uploading dist/test_helpers-0.1-py3-none-any.whl...
        +Warning: unknown field: testing
        +  at resources.pipelines.orders
        +  in databricks.yml:11:7
        +
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/files...
        -Updated pipelines.orders
         Files: 1 uploaded, 0 deleted
        -Resources: 0 created, 1 changed, 0 deleted, 0 unchanged
        +Resources: 0 created, 0 changed, 0 deleted, 1 unchanged
         
         >>> [CLI] bundle plan
        +Warning: unknown field: testing
        +  at resources.pipelines.orders
        +  in databricks.yml:11:7
        +
         Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged
         
         === Changing testing updates the pipeline
         >>> update_file.py databricks.yml ./tests/** ./tests/unit/**
         
         >>> [CLI] bundle plan
        -update pipelines.orders
        +Warning: unknown field: testing
        +  at resources.pipelines.orders
        +  in databricks.yml:11:7
         
        -Plan: 0 to add, 1 to change, 0 to delete, 0 unchanged
        +Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged
         
         >>> [CLI] bundle deploy
        -Uploading dist/test_helpers-0.1-py3-none-any.whl...
        +Warning: unknown field: testing
        +  at resources.pipelines.orders
        +  in databricks.yml:11:7
        +
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/files...
        -Updated pipelines.orders
         Files: 1 uploaded, 0 deleted
        -Resources: 0 created, 1 changed, 0 deleted, 0 unchanged
        +Resources: 0 created, 0 changed, 0 deleted, 1 unchanged
         
         >>> print_requests.py //api/2.0/pipelines --nostamp
        -{
        -  "method": "PUT",
        -  "path": "/api/2.0/pipelines/[ORDERS_ID]",
        -  "body": {
        -    "channel": "CURRENT",
        -    "deployment": {
        -      "kind": "BUNDLE",
        -      "metadata_file_path": "/Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/state/metadata.json"
        -    },
        -    "edition": "ADVANCED",
        -    "libraries": [
        -      {
        -        "glob": {
        -          "include": "/Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/files/transformations/**"
        -        }
        -      }
        -    ],
        -    "name": "orders",
        -    "testing": {
        -      "sources": [
        -        {
        -          "glob": {
        -            "include": "/Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/files/tests/unit/**"
        -          }
        -        }
        -      ],
        -      "environment": {
        -        "dependencies": [
        -          "--editable /Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/files[test]",
        -          "-r /Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/files/tests/requirements.txt",
        -          "/Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/artifacts/.internal/test_helpers-0.1-py3-none-any.whl"
        -        ]
        -      }
        -    }
        -  }
        -}
         
         === Removing testing sends an update without it
         >>> [CLI] bundle plan
        -update pipelines.orders
        +Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged
         
... (35 more lines truncated, raise DATABRICKS_CLI_TEST_MAX_LOG to see more)

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

TestAccept/bundle/resources/pipelines/testing/DMS=true: branch ✅ | main (aed6702) ❌ | latest (v1.23.0) ❌

main (aed6702):

acceptance_test.go:1341: Diff:
        --- bundle/resources/pipelines/testing/output.txt
        +++ /tmp/TestAcceptbundleresourcespipelinestestingDMS=true3130475678/002/output.txt
        @@ -1,25 +1,17 @@
         
         === Relative test paths resolve to the deployed workspace paths
         >>> [CLI] bundle validate -o json
        -{
        -  "environment": {
        -    "dependencies": [
        -      "--editable /Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/files[test]",
        -      "-r /Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/files/tests/requirements.txt",
        -      "./dist/*.whl"
        -    ]
        -  },
        -  "sources": [
        -    {
        -      "glob": {
        -        "include": "/Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/files/tests/**"
        -      }
        -    }
        -  ]
        -}
        +Warning: unknown field: testing
        +  at resources.pipelines.orders
        +  in databricks.yml:11:7
         
        +null
        +
         >>> [CLI] bundle deploy
        -Uploading dist/test_helpers-0.1-py3-none-any.whl...
        +Warning: unknown field: testing
        +  at resources.pipelines.orders
        +  in databricks.yml:11:7
        +
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/files...
         Created pipelines.orders
         Files: 5 uploaded, 0 deleted
        @@ -43,164 +33,73 @@
                 }
               }
             ],
        -    "name": "orders",
        -    "testing": {
        -      "sources": [
        -        {
        -          "glob": {
        -            "include": "/Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/files/tests/**"
        -          }
        -        }
        -      ],
        -      "environment": {
        -        "dependencies": [
        -          "--editable /Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/files[test]",
        -          "-r /Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/files/tests/requirements.txt",
        -          "/Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/artifacts/.internal/test_helpers-0.1-py3-none-any.whl"
        -        ]
        -      }
        -    }
        +    "name": "orders"
           }
         }
         
         === No changes after the deploy
         >>> [CLI] bundle plan
        +Warning: unknown field: testing
        +  at resources.pipelines.orders
        +  in databricks.yml:11:7
        +
         Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged
         
         === A remote edit that drops testing shows in the plan
         >>> [CLI] bundle plan -o json
        -{
        -  "action": "update",
        -  "old": {
        -    "sources": [
        -      {
        -        "glob": {
        -          "include": "/Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/files/tests/**"
        -        }
        -      }
        -    ],
        -    "environment": {
        -      "dependencies": [
        -        "--editable /Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/files[test]",
        -        "-r /Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/files/tests/requirements.txt",
        -        "/Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/artifacts/.internal/test_helpers-0.1-py3-none-any.whl"
        -      ]
        -    }
        -  },
        -  "new": {
        -    "sources": [
        -      {
        -        "glob": {
        -          "include": "/Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/files/tests/**"
        -        }
        -      }
        -    ],
        -    "environment": {
        -      "dependencies": [
        -        "--editable /Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/files[test]",
        -        "-r /Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/files/tests/requirements.txt",
        -        "/Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/artifacts/.internal/test_helpers-0.1-py3-none-any.whl"
        -      ]
        -    }
        -  }
        -}
        +Warning: unknown field: testing
        +  at resources.pipelines.orders
        +  in databricks.yml:11:7
         
        +null
        +
         >>> [CLI] bundle deploy
        -Uploading dist/test_helpers-0.1-py3-none-any.whl...
        +Warning: unknown field: testing
        +  at resources.pipelines.orders
        +  in databricks.yml:11:7
        +
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/files...
        -Updated pipelines.orders
         Files: 1 uploaded, 0 deleted
        -Resources: 0 created, 1 changed, 0 deleted, 0 unchanged
        +Resources: 0 created, 0 changed, 0 deleted, 1 unchanged
         
         >>> [CLI] bundle plan
        +Warning: unknown field: testing
        +  at resources.pipelines.orders
        +  in databricks.yml:11:7
        +
         Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged
         
         === Changing testing updates the pipeline
         >>> update_file.py databricks.yml ./tests/** ./tests/unit/**
         
         >>> [CLI] bundle plan
        -update pipelines.orders
        +Warning: unknown field: testing
        +  at resources.pipelines.orders
        +  in databricks.yml:11:7
         
        -Plan: 0 to add, 1 to change, 0 to delete, 0 unchanged
        +Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged
         
         >>> [CLI] bundle deploy
        -Uploading dist/test_helpers-0.1-py3-none-any.whl...
        +Warning: unknown field: testing
        +  at resources.pipelines.orders
        +  in databricks.yml:11:7
        +
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/files...
        -Updated pipelines.orders
         Files: 1 uploaded, 0 deleted
        -Resources: 0 created, 1 changed, 0 deleted, 0 unchanged
        +Resources: 0 created, 0 changed, 0 deleted, 1 unchanged
         
         >>> print_requests.py //api/2.0/pipelines --nostamp
        -{
        -  "method": "PUT",
        -  "path": "/api/2.0/pipelines/[ORDERS_ID]",
        -  "body": {
        -    "channel": "CURRENT",
        -    "deployment": {
        -      "kind": "BUNDLE",
        -      "metadata_file_path": "/Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/state/metadata.json"
        -    },
        -    "edition": "ADVANCED",
        -    "libraries": [
        -      {
        -        "glob": {
        -          "include": "/Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/files/transformations/**"
        -        }
        -      }
        -    ],
        -    "name": "orders",
        -    "testing": {
        -      "sources": [
        -        {
        -          "glob": {
        -            "include": "/Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/files/tests/unit/**"
        -          }
        -        }
        -      ],
        -      "environment": {
        -        "dependencies": [
        -          "--editable /Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/files[test]",
        -          "-r /Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/files/tests/requirements.txt",
        -          "/Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/artifacts/.internal/test_helpers-0.1-py3-none-any.whl"
        -        ]
        -      }
        -    }
        -  }
        -}
         
         === Removing testing sends an update without it
         >>> [CLI] bundle plan
        -update pipelines.orders
        +Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged
         
... (35 more lines truncated, raise DATABRICKS_CLI_TEST_MAX_LOG to see more)

latest (v1.23.0):

acceptance_test.go:1341: Diff:
        --- bundle/resources/pipelines/testing/output.txt
        +++ /tmp/TestAcceptbundleresourcespipelinestestingDMS=true1032749725/002/output.txt
        @@ -1,25 +1,17 @@
         
         === Relative test paths resolve to the deployed workspace paths
         >>> [CLI] bundle validate -o json
        -{
        -  "environment": {
        -    "dependencies": [
        -      "--editable /Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/files[test]",
        -      "-r /Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/files/tests/requirements.txt",
        -      "./dist/*.whl"
        -    ]
        -  },
        -  "sources": [
        -    {
        -      "glob": {
        -        "include": "/Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/files/tests/**"
        -      }
        -    }
        -  ]
        -}
        +Warning: unknown field: testing
        +  at resources.pipelines.orders
        +  in databricks.yml:11:7
         
        +null
        +
         >>> [CLI] bundle deploy
        -Uploading dist/test_helpers-0.1-py3-none-any.whl...
        +Warning: unknown field: testing
        +  at resources.pipelines.orders
        +  in databricks.yml:11:7
        +
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/files...
         Created pipelines.orders
         Files: 5 uploaded, 0 deleted
        @@ -43,164 +33,73 @@
                 }
               }
             ],
        -    "name": "orders",
        -    "testing": {
        -      "sources": [
        -        {
        -          "glob": {
        -            "include": "/Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/files/tests/**"
        -          }
        -        }
        -      ],
        -      "environment": {
        -        "dependencies": [
        -          "--editable /Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/files[test]",
        -          "-r /Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/files/tests/requirements.txt",
        -          "/Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/artifacts/.internal/test_helpers-0.1-py3-none-any.whl"
        -        ]
        -      }
        -    }
        +    "name": "orders"
           }
         }
         
         === No changes after the deploy
         >>> [CLI] bundle plan
        +Warning: unknown field: testing
        +  at resources.pipelines.orders
        +  in databricks.yml:11:7
        +
         Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged
         
         === A remote edit that drops testing shows in the plan
         >>> [CLI] bundle plan -o json
        -{
        -  "action": "update",
        -  "old": {
        -    "sources": [
        -      {
        -        "glob": {
        -          "include": "/Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/files/tests/**"
        -        }
        -      }
        -    ],
        -    "environment": {
        -      "dependencies": [
        -        "--editable /Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/files[test]",
        -        "-r /Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/files/tests/requirements.txt",
        -        "/Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/artifacts/.internal/test_helpers-0.1-py3-none-any.whl"
        -      ]
        -    }
        -  },
        -  "new": {
        -    "sources": [
        -      {
        -        "glob": {
        -          "include": "/Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/files/tests/**"
        -        }
        -      }
        -    ],
        -    "environment": {
        -      "dependencies": [
        -        "--editable /Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/files[test]",
        -        "-r /Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/files/tests/requirements.txt",
        -        "/Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/artifacts/.internal/test_helpers-0.1-py3-none-any.whl"
        -      ]
        -    }
        -  }
        -}
        +Warning: unknown field: testing
        +  at resources.pipelines.orders
        +  in databricks.yml:11:7
         
        +null
        +
         >>> [CLI] bundle deploy
        -Uploading dist/test_helpers-0.1-py3-none-any.whl...
        +Warning: unknown field: testing
        +  at resources.pipelines.orders
        +  in databricks.yml:11:7
        +
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/files...
        -Updated pipelines.orders
         Files: 1 uploaded, 0 deleted
        -Resources: 0 created, 1 changed, 0 deleted, 0 unchanged
        +Resources: 0 created, 0 changed, 0 deleted, 1 unchanged
         
         >>> [CLI] bundle plan
        +Warning: unknown field: testing
        +  at resources.pipelines.orders
        +  in databricks.yml:11:7
        +
         Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged
         
         === Changing testing updates the pipeline
         >>> update_file.py databricks.yml ./tests/** ./tests/unit/**
         
         >>> [CLI] bundle plan
        -update pipelines.orders
        +Warning: unknown field: testing
        +  at resources.pipelines.orders
        +  in databricks.yml:11:7
         
        -Plan: 0 to add, 1 to change, 0 to delete, 0 unchanged
        +Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged
         
         >>> [CLI] bundle deploy
        -Uploading dist/test_helpers-0.1-py3-none-any.whl...
        +Warning: unknown field: testing
        +  at resources.pipelines.orders
        +  in databricks.yml:11:7
        +
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/files...
        -Updated pipelines.orders
         Files: 1 uploaded, 0 deleted
        -Resources: 0 created, 1 changed, 0 deleted, 0 unchanged
        +Resources: 0 created, 0 changed, 0 deleted, 1 unchanged
         
         >>> print_requests.py //api/2.0/pipelines --nostamp
        -{
        -  "method": "PUT",
        -  "path": "/api/2.0/pipelines/[ORDERS_ID]",
        -  "body": {
        -    "channel": "CURRENT",
        -    "deployment": {
        -      "kind": "BUNDLE",
        -      "metadata_file_path": "/Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/state/metadata.json"
        -    },
        -    "edition": "ADVANCED",
        -    "libraries": [
        -      {
        -        "glob": {
        -          "include": "/Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/files/transformations/**"
        -        }
        -      }
        -    ],
        -    "name": "orders",
        -    "testing": {
        -      "sources": [
        -        {
        -          "glob": {
        -            "include": "/Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/files/tests/unit/**"
        -          }
        -        }
        -      ],
        -      "environment": {
        -        "dependencies": [
        -          "--editable /Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/files[test]",
        -          "-r /Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/files/tests/requirements.txt",
        -          "/Workspace/Users/[USERNAME]/.bundle/pipeline-testing/default/artifacts/.internal/test_helpers-0.1-py3-none-any.whl"
        -        ]
        -      }
        -    }
        -  }
        -}
         
         === Removing testing sends an update without it
         >>> [CLI] bundle plan
        -update pipelines.orders
        +Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged
         
... (36 more lines truncated, raise DATABRICKS_CLI_TEST_MAX_LOG to see more)
TestAccept/pipelines/databricks-cli-help: branch ✅ | main (aed6702) ❌ | latest (v1.23.0) ❌

main (aed6702):

acceptance_test.go:1341: Diff:
        --- pipelines/databricks-cli-help/output.txt
        +++ /tmp/TestAcceptpipelinesdatabricks-cli-help906572682/002/output.txt
        @@ -30,7 +30,6 @@
           run                   Run a pipeline
           show                  Preview a table's columns and sample rows
           stop                  Stop a pipeline
        -  test                  *Preview* Run the tests of a pipeline
         
         Management Commands
           apply-environment     *Public Preview* Apply the latest environment to the pipeline.

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

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

@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 286aa60

Run: 41701798687

Env 🔄​flaky ✅​pass 🙈​skip Time
✅​ aws linux-2core-8gb 281 31 8:47
🔄​ aws-windows-latest-4core-16gb 1 282 29 6:21
🔄​ azure linux-2core-8gb 1 279 31 13:17
🔄​ azure-windows-latest-4core-16gb 2 280 29 6:54
🔄​ gcp linux-2core-8gb 1 280 31 15:33
🔄​ gcp-windows-latest-4core-16gb 1 282 29 9:07
Test Name aws-windows-latest-4core-16gb azure linux-2core-8gb azure-windows-latest-4core-16gb gcp linux-2core-8gb gcp-windows-latest-4core-16gb
🔄​ TestSyncEnsureRemotePathIsUsableIfRepoExists 🔄​f ✅​p ✅​p ✅​p 🔄​f
🔄​ TestSyncFullFileSync ✅​p ✅​p ✅​p 🔄​f ✅​p
🔄​ TestSyncNestedFolderSync ✅​p 🔄​f ✅​p ✅​p ✅​p
🔄​ TestFilerWorkspaceNotebook ✅​p ✅​p 🔄​f ✅​p ✅​p
🔄​ TestFilerWorkspaceNotebook/pyNb.py ✅​p ✅​p 🔄​f ✅​p ✅​p
Top 12 slowest tests (at least 2 minutes):
duration env testname
4:17 gcp linux-2core-8gb TestFilerWorkspaceFilesExtensionsReadDir
3:59 azure linux-2core-8gb TestAccept
3:55 gcp linux-2core-8gb TestAccept
3:47 aws linux-2core-8gb TestAccept
3:01 gcp-windows-latest-4core-16gb TestAccept
2:55 azure-windows-latest-4core-16gb TestAccept
2:52 aws-windows-latest-4core-16gb TestAccept
2:17 azure linux-2core-8gb TestFilerWorkspaceFilesExtensionsStat
2:16 gcp linux-2core-8gb TestFilerWorkspaceFilesExtensionsRead
2:11 azure linux-2core-8gb TestImportDirWithOverwriteFlag
2:06 azure linux-2core-8gb TestFilerRecursiveDelete/workspace_files_extensions
2:05 azure-windows-latest-4core-16gb TestFilerWorkspaceFilesExtensionsDelete

@tharunbhuk-db
tharunbhuk-db force-pushed the tharun/pipelines-test-pr3-junit branch from cc2e61a to b4df318 Compare November 3, 2026 00:53
@tharunbhuk-db
tharunbhuk-db force-pushed the tharun/pipelines-test-pr4-bundles branch from 9c9d9c8 to 742ef87 Compare November 3, 2026 00:53
@tharunbhuk-db
tharunbhuk-db force-pushed the tharun/pipelines-test-pr4-bundles branch from e038a13 to e895d35 Compare November 3, 2026 17:34
@tharunbhuk-db
tharunbhuk-db force-pushed the tharun/pipelines-test-pr3-junit branch from b4df318 to 7c61f68 Compare November 3, 2026 17:34
tharunbhuk-db and others added 3 commits November 3, 2026 18:15
…t create pipelines

Co-authored-by: Isaac <no-reply@databricks.com>
Reading a directory fails with "is a directory" on Linux and macOS but with
"Incorrect function." on Windows.

Co-authored-by: Isaac <no-reply@databricks.com>
Turn off Git Bash path conversion only for the API calls with "/" paths,
so the Python helpers keep working, and write library paths with forward
slashes as the other same-name library case does.

Co-authored-by: Isaac <no-reply@databricks.com>
skipRewrite: noSkipRewrite,
},
{
pattern: base.Append(dyn.Key("testing"), dyn.Key("sources"), dyn.AnyIndex(), dyn.Key("glob"), dyn.Key("include")),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Question on scope: this PR validates testing.environment.dependencies client-side, but not testing.sources. The service checks sources (workspace root, .py or /**, no .., no overlap with libraries) and bundle deploy reports its error. Relying on the service is reasonable and keeps the CLI smaller, but could we pick one approach for both settings? Either the service is the source of truth for both (and the dependency validator could go, so the two can't drift), or both are validated here.


// With pipeline testing enabled, the path after -e can also be a project folder, with optional
// extras such as ./project[test].
if opts.Mode == paths.TranslateModeEnvironmentPipFlag && flag == "-e" && env.ExperimentalPipelineTesting(ctx) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The -e ./folder mapping is gated by the pipeline-testing flag, but editable-project-folder.md calls it a fix, and job environments take the same path (job_libraries_paths_visitor.go). If it restores intended behavior, it shouldn't need the flag. If it stays gated, could the changelog say so and mention jobs?

Related: since this mapping is its own behavior change, and covers job environments too, it might be easier as a small separate PR together with acceptance/bundle/environments/editable-folder and TestTranslatePathEditableProjectFolder. That takes about 10 files out of this PR and lets the gating question be settled on its own.

}
// Path translation rewrites a path in the bundle after "-r " or "-e ", so a relative path that
// remains after an option was not rewritten.
case option != "" || !libraries.IsLibraryLocal(filePath):

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

--editable ./project[test] lands here as "not a file", which doesn't tell users what to do. Could the message say to use -e ./project[test], or could --editable be translated like -e? Also, strings.Contains(filePath, " -") at line 86 rejects valid paths such as /Workspace/a -b/project; checking only for a leading option would avoid that.

if config.Testing != nil {
return nil, r.doWithTesting(ctx, http.MethodPut, "/api/2.0/pipelines/"+id, request, config.Testing, nil)
}
return nil, r.client.Pipelines.Update(ctx, request)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Removing testing goes through this SDK PUT, which sends no testing field, so clearing it relies on the service replacing spec.testing on PUT. Could we verify on staging that a deploy removes it, and that bundle plan shows 0 changes for both a testing and a plain pipeline with the flag on?

"$fields":
"dependencies":
"description": |-
A list of files that declare the packages the tests need: a project folder, a requirements file, or a wheel, in the workspace or a UC volume. A project folder can take `--editable` and an extra, for example `--editable ${workspace.file_path}[test]`. Package names and URLs are rejected.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Public docs text:

  • Bundle paths such as -e ./project[test] and -r ./tests/requirements.txt also work, and they're relative to the YAML file that defines them. Worth saying.
  • The glob description should state the rules: a .py file or a folder followed by /**, no other wildcards, no overlap with libraries.
  • Mention that it needs DATABRICKS_BUNDLE_ENABLE_EXPERIMENTAL_PIPELINE_TESTING.

if message != "" {
return Response{
StatusCode: 400,
Body: map[string]string{"error_code": "INVALID_PARAMETER_VALUE", "message": message},

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nit: the fake returns INVALID_PARAMETER_VALUE for a pipeline with no test sources. The service's class for this is PIPELINE_TEST_NO_TEST_SOURCES, and matching it lets CLI tests catch a mismatch. Related: when the bundle YAML has testing but the deployed pipeline doesn't, this error could tell users to run databricks pipelines deploy.

Files: 5 uploaded, 0 deleted
Resources: 1 created, 0 changed, 0 deleted, 0 unchanged

>>> print_requests.py //api/2.0/pipelines --nostamp

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Non-blocking: the three full request dumps and the 47-line plan JSON pin the whole pipeline body (channel, edition, libraries, metadata path) to check a single testing field. They'll need updating whenever an unrelated default changes. Piping through jq '.body.testing' and jq '.changes.testing', as the validate step above already does, keeps the same assertions with about 90 fewer golden lines.

at resources.pipelines.orders.testing.environment.dependencies[3]
in databricks.yml:19:15

A test dependency is a project folder, a wheel, or a requirements file after -r, in the bundle, under /Workspace/, or under /Volumes/. Declare test packages in a project file, such as the test extra of a pyproject.toml, and reference its folder, for example -e ./project[test]. For a path in the bundle, use -e or -r followed by a space. URLs, other pip options, and .. are not supported.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Non-blocking: each of the five errors repeats the same three-line explanation, and which inputs are accepted or rejected is already unit-tested in pipeline_testing_dependencies_test.go. One or two errors here would pin the message text, with less prose to keep in sync.

assert.Empty(t, workspace.collectPipelineTests(nil))
}

func TestPipelineTestTargets(t *testing.T) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Non-blocking: TestPipelineTestTargets and TestPipelineEditReplacesTestSources test the fake's own rules. The behavior they guard is already golden in pipeline-id, selection (the outside-sources and no-sources messages) and bundle/resources/pipelines/testing (removing testing on edit). Both could go.

@@ -0,0 +1 @@
trace musterr $CLI bundle validate

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Non-blocking: this case is a single bundle validate with the gate off, and it takes a whole directory (6 files). It could be a step in testing/script that reuses that bundle, for example trace musterr env -u DATABRICKS_BUNDLE_ENABLE_EXPERIMENTAL_PIPELINE_TESTING $CLI bundle validate. (testing-same-name-libraries does need its own conflicting config, so keeping that one separate makes sense.)

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants