Repository navigation
Deploy the testing property of pipelines and show remote changes in bundle plan - #7438
tharunbhuk-db wants to merge 1 commit into
Conversation
|
Commit: Regression test reportSelected 4 changed tests (limit=20, 0 not selected) 8 tests: regression=8 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-same-name-libraries/DMS=: branch ✅ | main (cec3f63) ❌ | latest (v1.26.0) ❌main (cec3f63): latest (v1.26.0): TestAccept/bundle/resources/pipelines/testing-same-name-libraries/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): same output as main (cec3f63) |
✅ Integration test reportCommit: 2126212
6 interesting tests: 5 flaky, 1 RECOVERED
Top 6 slowest tests (at least 2 minutes):
|
48e4a95 to
fd9fedb
Compare
1fd5e11 to
3af4a58
Compare
fd9fedb to
b10a21e
Compare
3af4a58 to
7498e1b
Compare
b10a21e to
e5ff44c
Compare
7498e1b to
e79333b
Compare
| trace print_requests.py //api/2.0/pipelines --nostamp | jq '{method, path, testing: .body.testing}' | ||
|
|
||
| title "No changes after the deploy\n" | ||
| trace $CLI bundle plan |
There was a problem hiding this comment.
Just to double check: on dogfood, did bundle plan show 0 changes right after deploying a pipeline with testing? The description covers existing pipelines and removing it, but the fake server echoes the body back, so it can't tell us whether the backend normalizes glob.include or the -e /Workspace/...[test] dependency on read.
| } | ||
|
|
||
| func (r *ResourcePipeline) DoRead(ctx context.Context, id string) (*PipelineRemote, error) { | ||
| if env.ExperimentalPipelineTesting(ctx) { |
There was a problem hiding this comment.
Why gate the read on the env var when create and update are gated on config (config.Testing != nil)? The raw GET is the same request, so always reading spec.testing would be free, and as is two people running bundle plan on a pipeline that got testing added in the UI see different plans depending on their env.
|
|
||
| // doRaw sends a request that the Go SDK cannot express yet because it lacks the testing field. | ||
| func (r *ResourcePipeline) doRaw(ctx context.Context, method, path string, request, response any) error { | ||
| apiClient, err := client.New(r.client.Config) |
There was a problem hiding this comment.
nit: this builds a new API client on every call, and DoRead runs once per pipeline per plan. Can we create it once in New like the cmd/air callers do?
| update_file.py databricks.yml "$(sed -n '/^ testing:/,$p' databricks.yml)" "" | ||
| trace $CLI bundle plan | ||
| trace $CLI bundle deploy | ||
| trace print_requests.py //api/2.0/pipelines --nostamp | jq '{method, path, testing: .body.testing}' |
There was a problem hiding this comment.
nit: null here can mean either an absent key or "testing": null in the body. .body | has("testing") would make the assertion explicit.
e79333b to
35031d3
Compare
…undle plan bundle deploy sends a pipeline's testing on Create and Edit, and bundle plan reads it back, so a change made outside the bundle shows in the plan and the next deploy undoes it. The Go SDK does not have the field yet, so these calls are raw: a pipeline without testing is still created and edited with the SDK, and the raw read is used only with DATABRICKS_BUNDLE_ENABLE_EXPERIMENTAL_PIPELINE_TESTING=true. The test server stores spec.testing on Create and Edit and returns it on Get. Co-authored-by: Isaac <no-reply@databricks.com>
858d4df to
52dc912
Compare
35031d3 to
2126212
Compare
🥞 Stacked PR
bundle deploysendstesting, andbundle planshows changes made to it outside the bundle. The calls are raw because the Go SDK does not have the field.testinguse the same SDK calls as before.testingclears it.Tests:
TestPipelineRawRequests,TestPipelineReadReturnsTesting; acceptancebundle/resources/pipelines/testing.This pull request and its description were written by Isaac.