Repository navigation
Validate the test dependencies of pipelines in bundle validate - #7428
tharunbhuk-db wants to merge 3 commits into
Conversation
…oyed folder With DATABRICKS_BUNDLE_ENABLE_EXPERIMENTAL_PIPELINE_TESTING=true, a local project folder after -e, with optional extras such as -e ./project[test], maps to its deployed folder instead of failing. This applies to job and pipeline environment dependencies. With the variable off, the old behavior stays.
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. Relative paths in testing are translated like libraries. Local wheels in test dependencies are uploaded like other libraries, and the same-name check covers them. bundle plan shows changes to testing made outside the bundle, and bundle deploy undoes them. The CLI uses its own types and raw calls for testing, because the Go SDK does not have the field yet. The test server stores spec.testing on Create and Edit and returns it on Get.
bundle validate rejects the testing.environment.dependencies that the API rejects: package names, URLs, and a requirements file without -r. It runs after TranslatePaths, so it checks the paths that deploy sends.
286aa60 to
9791a45
Compare
46e86b1 to
1b48966
Compare
|
Commit: Regression test reportSelected 6 changed tests (limit=20, 0 not selected) 12 tests: regression=12 unreleased=0 coverage=0 failing=0
TestAccept/bundle/environments/editable-folder/DMS=: branch ✅ | main (b694c4c) ❌ | latest (v1.25.0) ❌main (b694c4c): latest (v1.25.0): same output as main (b694c4c) TestAccept/bundle/environments/editable-folder/DMS=true: branch ✅ | main (b694c4c) ❌ | latest (v1.25.0) ❌main (b694c4c): latest (v1.25.0): same output as main (b694c4c) TestAccept/bundle/refschema/DMS=: branch ✅ | main (b694c4c) ❌ | latest (v1.25.0) ❌main (b694c4c): latest (v1.25.0): same output as main (b694c4c) TestAccept/bundle/refschema/DMS=true: branch ✅ | main (b694c4c) ❌ | latest (v1.25.0) ❌main (b694c4c): latest (v1.25.0): TestAccept/bundle/resources/pipelines/testing-dependencies/DMS=: branch ✅ | main (b694c4c) ❌ | latest (v1.25.0) ❌main (b694c4c): latest (v1.25.0): same output as main (b694c4c) TestAccept/bundle/resources/pipelines/testing-dependencies/DMS=true: branch ✅ | main (b694c4c) ❌ | latest (v1.25.0) ❌main (b694c4c): latest (v1.25.0): same output as main (b694c4c) TestAccept/bundle/resources/pipelines/testing-disabled/DMS=: branch ✅ | main (b694c4c) ❌ | latest (v1.25.0) ❌main (b694c4c): latest (v1.25.0): same output as main (b694c4c) TestAccept/bundle/resources/pipelines/testing-disabled/DMS=true: branch ✅ | main (b694c4c) ❌ | latest (v1.25.0) ❌main (b694c4c): latest (v1.25.0): same output as main (b694c4c) TestAccept/bundle/resources/pipelines/testing-same-name-libraries/DMS=: branch ✅ | main (b694c4c) ❌ | latest (v1.25.0) ❌main (b694c4c): latest (v1.25.0): same output as main (b694c4c) TestAccept/bundle/resources/pipelines/testing-same-name-libraries/DMS=true: branch ✅ | main (b694c4c) ❌ | latest (v1.25.0) ❌main (b694c4c): latest (v1.25.0): same output as main (b694c4c) TestAccept/bundle/resources/pipelines/testing/DMS=: branch ✅ | main (b694c4c) ❌ | latest (v1.25.0) ❌main (b694c4c): latest (v1.25.0): same output as main (b694c4c) TestAccept/bundle/resources/pipelines/testing/DMS=true: branch ✅ | main (b694c4c) ❌ | latest (v1.25.0) ❌main (b694c4c): latest (v1.25.0): |
✅ Integration test reportCommit: 1b48966
Top 3 slowest tests (at least 2 minutes):
|
08916f8 to
4c21f8b
Compare
🥞 Stacked PR
Changes
bundle validaterejects thetesting.environment.dependenciesthat the API rejects: package names, URLs, and a requirements file without-r.TranslatePaths, so it checks the paths that deploy sends.Why
These mistakes otherwise fail only at deploy time, with a service error. Open question from review: whether the CLI should validate test dependencies at all, or rely on the service as it does for
testing.sources. This PR is separate so that it can be decided, or dropped, on its own.Tests
bundle/config/validate/pipeline_testing_dependencies_test.go.acceptance/bundle/resources/pipelines/testing-dependencies.This pull request and its description were written by Cursor.