Repository navigation
Add the testing property of pipelines to bundles - #7300
tharunbhuk-db wants to merge 1 commit into
Conversation
cf934e0 to
cc2e61a
Compare
52e5f6b to
9c9d9c8
Compare
|
Commit: Regression test reportSelected 3 changed tests (limit=20, 0 not selected) 6 tests: regression=6 unreleased=0 coverage=0 failing=0
TestAccept/bundle/environments/dependencies/DMS=: branch ✅ | main (cec3f63) ❌ | latest (v1.26.0) ❌main (cec3f63): latest (v1.26.0): same output as main (cec3f63) TestAccept/bundle/environments/dependencies/DMS=true: branch ✅ | main (cec3f63) ❌ | latest (v1.26.0) ❌main (cec3f63): latest (v1.26.0): same output as main (cec3f63) TestAccept/bundle/refschema/DMS=: branch ✅ | main (cec3f63) ❌ | latest (v1.26.0) ❌main (cec3f63): latest (v1.26.0): TestAccept/bundle/refschema/DMS=true: branch ✅ | main (cec3f63) ❌ | latest (v1.26.0) ❌main (cec3f63): latest (v1.26.0): TestAccept/bundle/resources/pipelines/testing/DMS=: branch ✅ | main (cec3f63) ❌ | latest (v1.26.0) ❌main (cec3f63): latest (v1.26.0): same output as main (cec3f63) TestAccept/bundle/resources/pipelines/testing/DMS=true: branch ✅ | main (cec3f63) ❌ | latest (v1.26.0) ❌main (cec3f63): latest (v1.26.0): |
✅ Integration test reportCommit: 86997dc
Top 7 slowest tests (at least 2 minutes):
|
cc2e61a to
b4df318
Compare
9c9d9c8 to
742ef87
Compare
e038a13 to
e895d35
Compare
b4df318 to
7c61f68
Compare
abc52a2 to
6092358
Compare
286aa60 to
9791a45
Compare
6092358 to
7e4c017
Compare
9791a45 to
239501f
Compare
7e4c017 to
bf6225d
Compare
239501f to
bc013c0
Compare
bf6225d to
e98a9f7
Compare
bc013c0 to
08916f8
Compare
e98a9f7 to
9a2cc3c
Compare
08916f8 to
4c21f8b
Compare
|
Follow-ups from the review:
|
pranshupand-db
left a comment
There was a problem hiding this comment.
Thanks Tharun. Splitting the -e mapping and the deploy path into their own PRs made this much easier to check. LGTM for Stack B (#7427 → #7300 → #7437 → #7438 → #7429 → #7439).
What I checked for "doesn't change existing behavior":
- Code. The new paths only run when
testingis set orDATABRICKS_BUNDLE_ENABLE_EXPERIMENTAL_PIPELINE_TESTINGis on. The new path patterns only matchtesting.*, the resource field isomitempty, and outside the feature only the refschema and help goldens change. - Live on dogfood staging. I built the stack top (
5b1b0b0) and itsmainbase. For a bundle with a plain pipeline and a job deployed bymain, Stack B's plan and deploy showed 0 changes with the variable off and on,bundle validate -o jsonwas identical tomain, andmainread the state Stack B wrote with 0 changes. A plain pipeline's Get has notestingkey, so there's no spurious drift. - The
testinglifecycle. Addingtestingand deploying sets it, and the next plan shows 0 changes. Removing it from YAML and deploying clearsspec.testingon the server, which answers the open PUT question from the earlier review.testingset outside the bundle shows as drift and is undone with the variable on, and is untouched with it off, as the changelog says.
Notes (not blocking):
- Mixed CLI versions. A released CLI only warns
unknown field: testing, and a deploy from it that changes the pipeline clearsspec.testing(verified). That's how PUT works, not this stack, but let's say in the release note or docs that everyone deploying the bundle needs the new CLI with the variable set. - Public text. The schema description for
testing(annotations.yml, which feeds the JSON schema and Python docstrings) says "[Private Preview]". If that label shouldn't reach customers yet, let's reword it. - Follow-up. Map
--editable ./project[...]like-e(your item from the earlier thread).
| } | ||
| var diags diag.Diagnostics | ||
| pipelines := b.Config.Resources.Pipelines | ||
| for _, key := range slices.Sorted(maps.Keys(pipelines)) { |
There was a problem hiding this comment.
pipeline_development_deprecated.go right above this in initialize.go does the same walk with dyn.MapByPattern on resources.pipelines.*.development, which gives the path and locations directly. Can we do the same here for resources.pipelines.*.testing instead of iterating the typed map and calling dyn.GetByPath per key?
| "github.com/stretchr/testify/require" | ||
| ) | ||
|
|
||
| func TestPipelineTestingEnabled(t *testing.T) { |
There was a problem hiding this comment.
Do we need this unit test? The acceptance test already shows the error with its location and path (the env -u ... bundle validate step) and the enabled case, and we try not to unit test mutators that an acceptance output covers.
| "file_path", | ||
| }, | ||
| "pipelines": { | ||
| // The experimental testing property is not deployed yet. |
There was a problem hiding this comment.
If this lands before #7438, a bundle with the variable on and testing set deploys fine and testing is silently dropped (PrepareState copies only CreatePipeline and CascadeOnDestroy). Fine for an experimental flag while the stack merges together, or do we want validate to say the property isn't deployed yet?
4c21f8b to
33085b7
Compare
Add resources.pipelines.<key>.testing, with the test sources and test-only dependencies that databricks pipelines test runs with. The CLI has its own types for it, because the Go SDK does not have the field yet. 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. Bundles without testing are not changed. Later PRs translate its paths and deploy it. Co-authored-by: Isaac <no-reply@databricks.com>
33085b7 to
86997dc
Compare
2a9184c to
24212b4
Compare
🥞 Stacked PR
resources.pipelines.<key>.testing(sources,environment.dependencies). The CLI has its own types because the Go SDK does not have the field yet. The schema and Python models are generated.bundle validaterejectstesting. Bundles withouttestingdo not change.Tests:
TestPipelineTestingEnabled; acceptancebundle/resources/pipelines/testing.This pull request and its description were written by Isaac.