Support bundle deployment bind/unbind for DMS-recorded deployments - #6590
Draft
shreyas-goenka wants to merge 2 commits into
Draft
Support bundle deployment bind/unbind for DMS-recorded deployments#6590shreyas-goenka wants to merge 2 commits into
shreyas-goenka wants to merge 2 commits into
Conversation
Bind and unbind now record their change with the deployment metadata service instead of refusing when experimental.deployment_history is on, using bind/unbind operation action types. Enables the DMS variant for the bind/unbind acceptance tests; the few that assert job/pipeline deployment stamps or dumped state stay opted out. Co-authored-by: Isaac <no-reply@databricks.com>
Collaborator
Integration test reportCommit: 3f9074a
41 interesting tests: 40 FAIL, 1 KNOWN
Top 1 slowest tests (at least 2 minutes):
|
- Always complete the DMS version (with failure on error) after starting it, so a bind/unbind recording failure does not leak the version's lease, matching the deploy and destroy paths. - FetchDeployment now returns the parsed last version id, dropping the duplicate parse in phases and process.go, and keeps the half-created-deployment TODO that was dropped when it moved to libs/dms. - Extract openRecordedState and tighten comments. - New bundle/dms/record-op-fault test asserts the version completes with failure when the operation upload fails; bundle/dms/bind-unbind now cleans up and asserts the resource is managed after bind and re-created after unbind. Co-authored-by: Isaac <no-reply@databricks.com>
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.
Changes
databricks bundle deployment bindandunbindnow work when the bundle records deployment history (experimental.deployment_history) instead of erroring. They record abind/unbindoperation with the deployment metadata service (DMS). This also enables the DMS variant of thebundle deployment bind/unbindacceptance suites.Why
For a DMS-recorded deployment the resource state lives in the service, not the state file, so the old code refused. Bind now reuses the engine's file-based bind against a throwaway snapshot of what the service holds (to get the plan preview and resolved state), then records that state as a
bindoperation so the next deploy sees the resource as managed. Unbind clears the resource and its permissions/grants asunbindoperations. Both always complete the version — with failure on a recording error — so a version's lease is never leaked, matching the deploy/destroy paths.Tests
acceptance/bundle/dms/bind-unbindasserts the recordedbind/unbindaction types and that the job is managed after bind and re-created after unbind.acceptance/bundle/dms/record-op-faultasserts the version is completed with failure when the operation upload fails, rather than left dangling.EnvMatrix.DMS = [""]opt-out so the bind/unbind suites run under DMS; only the subtests that assert job/pipeline deployment stamps or dumped state (engine-level differences) stay opted out.This pull request and its description were written by Isaac.