Skip to content

bundle/deploy/lock: wire DMS into NewDeploymentLock via experimental.use_managed_state#5395

Draft
shreyas-goenka wants to merge 1 commit into
shreyas-goenka/bundle-dms-implementationfrom
shreyas-goenka/bundle-dms-wire-experimental
Draft

bundle/deploy/lock: wire DMS into NewDeploymentLock via experimental.use_managed_state#5395
shreyas-goenka wants to merge 1 commit into
shreyas-goenka/bundle-dms-implementationfrom
shreyas-goenka/bundle-dms-wire-experimental

Conversation

@shreyas-goenka
Copy link
Copy Markdown
Contributor

Summary

Wires the DMS metadataServiceLock (added in #5386) into NewDeploymentLock behind the experimental.use_managed_state config field. When the field is set, each deploy/destroy registers a versioned record with the Deployment Metadata Service alongside the workspace-filesystem lock.

What changed

bundle/config/experimental.go — adds UseManagedState bool field to Experimental:

experimental:
  use_managed_state: true

bundle/deploy/lock/lock.goNewDeploymentLock checks b.Config.Experimental.UseManagedState; when true, creates a metadataServiceLock and assigns it to l.dms. Acquire/Release already call the DMS helper when l.dms != nil (from #5386).

Behavior when enabled

  • Acquire: acquires the workspace-filesystem lock, then calls svc.CreateVersion to claim a server-side deployment version
  • Release: calls svc.CompleteVersion (with success/failure), then releases the file lock; on GoalDestroy+success, also calls svc.DeleteDeployment
  • Deployment ID is read from / written to managed_service.json in the workspace state directory

Test plan

  • go build ./... clean
  • go test ./bundle/... green
  • CI

…use_managed_state

When experimental.use_managed_state is set in databricks.yml, NewDeploymentLock
now creates a metadataServiceLock alongside the workspace-filesystem lock.
Acquire calls DMS CreateVersion after acquiring the file lock; Release calls
DMS CompleteVersion before releasing it.

Co-authored-by: Shreyas Goenka <shreyas.goenka@databricks.com>
@eng-dev-ecosystem-bot
Copy link
Copy Markdown
Collaborator

Commit: 35de00c

Run: 26755292262

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.

2 participants