Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 213
test-only: Add cascade field to pipeline resource for destroy#5874
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| bundle: | ||
| name: test-pipeline-destroy-cascade | ||
| resources: | ||
| pipelines: | ||
| my_pipeline: | ||
| name: test-pipeline-cascade | ||
| cascade: false |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| === Deploy a pipeline configured with cascade: false | ||
| >>> [CLI] pipelines deploy | ||
| Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-pipeline-destroy-cascade/default/files... | ||
| Deploying resources... | ||
| Updating deployment state... | ||
| Deployment complete! | ||
| View your pipeline my_pipeline here: [DATABRICKS_URL]/pipelines/[UUID]?w=[NUMID] | ||
| >>> print_requests.py //api/2.0/pipelines | ||
| { | ||
| "method": "POST", | ||
| "path": "/api/2.0/pipelines", | ||
| "body": { | ||
| "channel": "CURRENT", | ||
| "deployment": { | ||
| "kind": "BUNDLE", | ||
| "metadata_file_path": "/Workspace/Users/[USERNAME]/.bundle/test-pipeline-destroy-cascade/default/state/metadata.json" | ||
| }, | ||
| "edition": "ADVANCED", | ||
| "name": "test-pipeline-cascade" | ||
| } | ||
| } | ||
| === Change only cascade (false -> true): expect a state-only update, no pipeline update API call | ||
| >>> [CLI] pipelines deploy | ||
| Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-pipeline-destroy-cascade/default/files... | ||
| Deploying resources... | ||
| Updating deployment state... | ||
| Deployment complete! | ||
| View your pipeline my_pipeline here: [DATABRICKS_URL]/pipelines/[UUID]?w=[NUMID] | ||
| >>> print_requests.py //api/2.0/pipelines | ||
| === Destroy: delete reads the updated cascade=true from persisted state | ||
| >>> [CLI] pipelines destroy --auto-approve | ||
| The following resources will be deleted: | ||
| delete resources.pipelines.my_pipeline | ||
| This action will result in the deletion of the following Lakeflow Spark Declarative Pipelines along with the | ||
| Streaming Tables (STs) and Materialized Views (MVs) managed by them: | ||
| delete resources.pipelines.my_pipeline | ||
| All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/test-pipeline-destroy-cascade/default | ||
| Deleting files... | ||
| Destroy complete! | ||
| >>> print_requests.py //api/2.0/pipelines | ||
| { | ||
| "method": "DELETE", | ||
| "path": "/api/2.0/pipelines/[UUID]", | ||
| "q": { | ||
| "cascade": "true" | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| title "Deploy a pipeline configured with cascade: false" | ||
| trace $CLI pipelines deploy | ||
| # Flush the deploy requests: cascade is delete-time-only, so the create request must not carry it. | ||
| trace print_requests.py //api/2.0/pipelines | ||
| title "Change only cascade (false -> true): expect a state-only update, no pipeline update API call" | ||
| update_file.py databricks.yml "cascade: false" "cascade: true" | ||
| trace $CLI pipelines deploy | ||
| # No POST/PATCH to /pipelines is expected here; the cascade-only change is persisted to state. | ||
| trace print_requests.py //api/2.0/pipelines | ||
| title "Destroy: delete reads the updated cascade=true from persisted state" | ||
| trace $CLI pipelines destroy --auto-approve | ||
| trace print_requests.py //api/2.0/pipelines |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| # --cascade only affects the direct engine's delete request; the terraform engine deletes | ||
| # pipelines through the provider and ignores it. Restrict to direct so the recorded request | ||
| # is meaningful and the single variant does not diverge. | ||
| EnvMatrix.DATABRICKS_BUNDLE_ENGINE = ["direct"] | ||
| RecordRequests = true |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.