Skip to content

Added support for lifecycle.started for SQL warehouses#5348

Merged
andrewnester merged 4 commits into
mainfrom
feat/lifecycle-started-sql-warehouse
Jun 3, 2026
Merged

Added support for lifecycle.started for SQL warehouses#5348
andrewnester merged 4 commits into
mainfrom
feat/lifecycle-started-sql-warehouse

Conversation

@andrewnester
Copy link
Copy Markdown
Contributor

Changes

Added support for lifecycle.started for SQL warehouses

Why

Without this field, warehouses defined in a bundle are always left in whatever state the API puts them in after creation.
Users have no way to declare "ensure this sql warehouse is running after every deploy."

lifecycle.started: true guarantees the warehouse is RUNNING after bundle deploy.
lifecycle.started: false creates the warehouse but immediately terminates it, and subsequent deploys that detect drift (e.g., someone started the warehouse manually) will stop it again.

Tests

Added acceptance tests

@eng-dev-ecosystem-bot
Copy link
Copy Markdown
Collaborator

eng-dev-ecosystem-bot commented May 27, 2026

Commit: fafcc91

Run: 26873384225

WarehouseType: sql.CreateWarehouseRequestWarehouseType(warehouse.WarehouseType),
ForceSendFields: utils.FilterFields[sql.CreateWarehouseRequest](warehouse.ForceSendFields),
},
Lifecycle: &StateLifecycle{Started: &started},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already do this check in DoRead. Can this just be:

Suggested change
Lifecycle: &StateLifecycle{Started: &started},
Lifecycle: warehouse.Lifecycle

@andrewnester andrewnester enabled auto-merge June 3, 2026 08:35
@andrewnester andrewnester added this pull request to the merge queue Jun 3, 2026
envsubst < databricks.yml.tmpl > databricks.yml

title "bundle plan fails with lifecycle.started on terraform engine"
trace errcode $CLI bundle plan
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: we also have 'musterr' helper to assert that it indeed fails.


[[Repls]]
Old = "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"
New = "[UUID]"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you know the UUID of the resources in question, you can add them to replacement dynamically with add_repl.py. It's better, since it's targeted, function as assert that id is correct, and distinguishes different ids.

Merged via the queue into main with commit 37deaed Jun 3, 2026
25 checks passed
@andrewnester andrewnester deleted the feat/lifecycle-started-sql-warehouse branch June 3, 2026 09:34
@eng-dev-ecosystem-bot
Copy link
Copy Markdown
Collaborator

Commit: 37deaed

Run: 26876340100

deco-sdk-tagging Bot added a commit that referenced this pull request Jun 4, 2026
## Release v1.2.0

### CLI
* `experimental open` now opens every DABs resource type that has a workspace URL, picking up `catalogs`, `schemas`, `volumes`, `database_instances`, `database_catalogs`, `synced_database_tables`, `postgres_catalogs`, `postgres_synced_tables`, `quality_monitors`, `vector_search_endpoints`, and `vector_search_indexes` ([#5346](#5346)).

### Bundles
* Retry transient HTTP 5xx and 408 errors in direct deployment engine ([#5349](#5349), [#5364](#5364)).
* Preserve `.designer.ipynb` suffix when translating notebook task paths so Lakeflow Designer files referenced from a `notebook_task` resolve correctly in the workspace ([#5370](#5370)).
* Fix script output dropping last line without trailing newline ([#4995](#4995)).
* engine/direct: Add `--select` flag to `bundle plan` and `bundle deploy` to plan/deploy a subset of resources (e.g. `--select my_job` or `--select jobs.my_job`); resources referenced by the selection are included transitively ([#5413](#5413)).
* Support `purge_on_delete: true` on `postgres_projects` so bundles can hard-delete a Lakebase project on destroy (skipping the soft-delete retention window) ([#5414](#5414)).
* Support terraform references in direct engine ([#5392](#5392))
* Support lifecycle.started for SQL warehouses ([#5348](#5348))

### Dependency updates
* Bump Go toolchain to 1.26.4 ([#5420](#5420)).
* Bump `github.com/databricks/databricks-sdk-go` from v0.136.0 to v0.141.0 ([#5361](#5361))
* Bump Terraform provider from v1.115.0 to v1.117.0 ([#5421](#5421))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants