From b4d26cf4e982c146ea3e8b907c0bf516962ed49b Mon Sep 17 00:00:00 2001 From: Rada Kamysheva Date: Tue, 11 Aug 2026 12:51:16 +0000 Subject: [PATCH] regen: cascade_on_destroy pydabs model and destroy-prompt golden #5846 added cascade_on_destroy but left two generated artifacts stale, which keeps main red: - validate-generated: python/databricks/bundles/pipelines/_models/pipeline.py was never regenerated (./task pydabs-codegen) - task test: acceptance/bundle/config-remote-sync/split/positional/output.txt still has the pre-cascade destroy prompt wording The Local=true Undecoded-key failure is fixed separately in #6232. --- .../config-remote-sync/split/positional/output.txt | 2 +- .../databricks/bundles/pipelines/_models/pipeline.py | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/acceptance/bundle/config-remote-sync/split/positional/output.txt b/acceptance/bundle/config-remote-sync/split/positional/output.txt index fe7fd191521..5abcd0de88e 100644 --- a/acceptance/bundle/config-remote-sync/split/positional/output.txt +++ b/acceptance/bundle/config-remote-sync/split/positional/output.txt @@ -65,7 +65,7 @@ The following resources will be deleted: delete resources.pipelines.split_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: +Streaming Tables (STs) and Materialized Views (MVs) managed by them. Set 'cascade_on_destroy: false' on a pipeline to retain datasets on pipeline deletion: delete resources.pipelines.split_pipeline All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/dev diff --git a/python/databricks/bundles/pipelines/_models/pipeline.py b/python/databricks/bundles/pipelines/_models/pipeline.py index 6437977d959..a54a284644c 100644 --- a/python/databricks/bundles/pipelines/_models/pipeline.py +++ b/python/databricks/bundles/pipelines/_models/pipeline.py @@ -73,6 +73,11 @@ class Pipeline(Resource): [Public Preview] Budget policy of this pipeline. """ + cascade_on_destroy: VariableOrOptional[bool] = None + """ + Whether destroying the pipeline also deletes its datasets (MVs, STs, Views). Defaults to true (the server default). Set to false to retain the datasets when the pipeline is deleted. Only affects the delete operation. + """ + catalog: VariableOrOptional[str] = None """ A catalog in Unity Catalog to publish data from this pipeline to. If `target` is specified, tables in this pipeline are published to a `target` schema inside `catalog` (for example, `catalog`.`target`.`table`). If `target` is not specified, no data is published to Unity Catalog. @@ -259,6 +264,11 @@ class PipelineDict(TypedDict, total=False): [Public Preview] Budget policy of this pipeline. """ + cascade_on_destroy: VariableOrOptional[bool] + """ + Whether destroying the pipeline also deletes its datasets (MVs, STs, Views). Defaults to true (the server default). Set to false to retain the datasets when the pipeline is deleted. Only affects the delete operation. + """ + catalog: VariableOrOptional[str] """ A catalog in Unity Catalog to publish data from this pipeline to. If `target` is specified, tables in this pipeline are published to a `target` schema inside `catalog` (for example, `catalog`.`target`.`table`). If `target` is not specified, no data is published to Unity Catalog.