Dry-run migration to direct engine after terraform deploy#5797
Merged
Conversation
After a successful terraform deploy, convert the state to the direct engine in memory (writing nothing locally or remotely) and report the outcome via telemetry. Surface the error to the user as a warning if it fails; internal warnings are downgraded to info level and reported through telemetry only. Co-authored-by: Isaac
Collaborator
Integration test reportCommit: f1e4c67
23 interesting tests: 13 SKIP, 7 KNOWN, 3 RECOVERED
Top 4 slowest tests (at least 2 minutes):
|
- Revert dstate changes; write the throwaway direct state to a temp file that is deleted afterwards instead of an in-memory write mode. - Keep migration warnings user-visible with a "post-deploy dry-run migration to direct: " prefix instead of downgrading them. - Record the outcome as direct_drymigrate_success / direct_drymigrate_warnings bool telemetry instead of a dedicated proto field. - Run the dry-run after "Deployment complete!". Co-authored-by: Isaac
Redirect the terraform-only direct_drymigrate_* bool_values snapshots (and the migration warning output) to per-engine files so the shared output stays engine-agnostic. Co-authored-by: Isaac
| * direct: Fix spurious update when `apply_policy_default_values: true` is set on job task, for-each-task, or job cluster new_cluster ([#5731](https://github.com/databricks/cli/pull/5731)). Also fix spurious updates for for-each-task clusters due to missing backend defaults for `data_security_mode`, `node_type_id`, `driver_node_type_id`, `driver_instance_pool_id`, `enable_elastic_disk`, and `enable_local_disk_encryption`. | ||
| * direct: Cluster resize now falls back to regular update if resize fails due to `INVALID_STATE` ([#5716](https://github.com/databricks/cli/pull/5716)). | ||
| * Fixed `bundle deployment migrate` failing on `model_serving_endpoints`/`database_instances` with permissions (regression since v1.5.0) ([#5775](https://github.com/databricks/cli/pull/5775)). | ||
| * After a terraform deploy, the CLI now dry-runs an in-memory migration to the direct engine (writing nothing locally or remotely) and reports the outcome via telemetry, warning if the migration could not be completed. |
Contributor
There was a problem hiding this comment.
Suggested change
| * After a terraform deploy, the CLI now dry-runs an in-memory migration to the direct engine (writing nothing locally or remotely) and reports the outcome via telemetry, warning if the migration could not be completed. | |
| * After a terraform deploy, the CLI now dry-runs an in-memory migration to the direct engine (writing nothing locally or remotely) and reports the outcome via telemetry, warning if the migration could not be completed ([#5797](https://github.com/databricks/cli/pull/5797)). |
- Append a notice after dry-run migration warnings pointing users to dabs-feedback@databricks.com and clarifying the deploy is unaffected. - Snapshot common bool_values in shared output and only the terraform-only direct_drymigrate_* entries per-engine, using print_telemetry_bool_values. - Drop obvious doc comment; changelog: drop "in-memory", add PR link. Co-authored-by: Isaac
janniklasrose
approved these changes
Jul 2, 2026
Collaborator
Integration test reportCommit: 253d888
226 interesting tests: 203 FAIL, 13 SKIP, 6 flaky, 2 KNOWN, 2 RECOVERED
Top 4 slowest tests (at least 2 minutes):
|
deco-sdk-tagging Bot
added a commit
that referenced
this pull request
Jul 2, 2026
## Release v1.6.0 ### CLI * `ssh connect` now accepts a `--base-environment` flag to run a serverless session on a custom base environment. It takes an `env.yaml` path, a `workspace-base-environments/...` resource ID, or a base environment display name, and is rejected together with `--environment-version` or `--cluster` ([#5706](#5706)). * `databricks aitools install` is now plugin-first: it installs the Databricks plugin through each agent's own CLI (Claude Code, Codex, GitHub Copilot) instead of copying raw skill files. Agents without a plugin (OpenCode, Antigravity) still get skill files, and Cursor prints the `/add-plugin databricks` step. Use `--skills-only` to force raw skill files for every agent, or `--path <dir>` to write skills to a directory ([#5738](#5738)). * `databricks labs list` now only shows projects that can be installed ([#5560](#5560)). ### Bundles * direct: Fixed persistent drift on `model_serving_endpoints` caused by the `traffic_config` field ([#5708](#5708)). * direct: Fix spurious update when `apply_policy_default_values: true` is set on job task, for-each-task, or job cluster new_cluster ([#5731](#5731)). Also fix spurious updates for for-each-task clusters due to missing backend defaults for `data_security_mode`, `node_type_id`, `driver_node_type_id`, `driver_instance_pool_id`, `enable_elastic_disk`, and `enable_local_disk_encryption`. * direct: Cluster resize now falls back to regular update if resize fails due to `INVALID_STATE` ([#5716](#5716)). * `bundle generate dashboard` now honors the `--key` flag when naming the generated resource, and rejects combining `--existing-path`, `--existing-id`, and `--resource` instead of silently ignoring all but one ([#5492](#5492)). * Fixed `bundle deployment migrate` failing on `model_serving_endpoints`/`database_instances` with permissions (regression since v1.5.0) ([#5775](#5775)). * After a terraform deploy, the CLI now dry-runs a migration to the direct engine (writing nothing locally or remotely) and reports the outcome via telemetry, warning if the migration could not be completed ([#5797](#5797)). ### Dependency updates * Bump `github.com/databricks/databricks-sdk-go` from v0.147.0 to v0.152.0 ([#5773](#5773)). * Bump Terraform provider from v1.118.0 to v1.120.0 ([#5792](#5792)).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After a successful terraform deploy, the CLI now converts the deployment state to the direct engine entirely in memory (writing nothing locally or remotely) and reports the outcome via telemetry, to measure how many bundles could migrate cleanly.
has_warningsflag rather than shown to the user.experimental.terraform_to_direct_migrationtelemetry field recordssuccess/error_message/has_warnings.This pull request and its description were written by Isaac.