Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
cdc80c7
Integrate deployment metadata service for server-side locking and state
shreyas-goenka Apr 14, 2026
e7d2877
Restore comments and whitespace removed unnecessarily from deploy/des…
shreyas-goenka Apr 14, 2026
1f936e6
Move LoadStateFromDMS from lock package to statemgmt package
shreyas-goenka Apr 14, 2026
6e19c93
Skip GetDeployment call for fresh deployments
shreyas-goenka Apr 14, 2026
0386ee6
Return error for bind and unbind with deployment metadata service
shreyas-goenka Apr 14, 2026
6592ee9
Remove out.requests.txt golden files from DMS tests
shreyas-goenka Apr 14, 2026
47e1a14
Update DMS acceptance tests: inline request printing, add resource op…
shreyas-goenka Apr 14, 2026
e85a6e0
Write deployment ID to workspace only after CreateDeployment succeeds
shreyas-goenka Apr 14, 2026
79b4027
Restore permission error handling in workspace filesystem lock
shreyas-goenka Apr 14, 2026
6513dd1
Remove out.requests.txt golden files from DMS tests
shreyas-goenka Apr 14, 2026
5e7c839
Fix UnicodeDecodeError in print_requests.py on systems with ASCII locale
shreyas-goenka Apr 14, 2026
b4dc993
Regenerate DMS acceptance test output files
shreyas-goenka Apr 15, 2026
ffefb37
Print DMS requests after each deploy in sequential-deploys test
shreyas-goenka Apr 15, 2026
379ff1b
Remove redundant main dms test, covered by add-resources
shreyas-goenka Apr 15, 2026
65c2aae
Remove unnecessary protoLogs replacement from DMS test config
shreyas-goenka Apr 15, 2026
602310e
DMS state lives in managed_service.json, not resources.json
shreyas-goenka May 7, 2026
a0b74f7
Decouple DMS operation reporting from CRUD workers
shreyas-goenka May 8, 2026
a4d2820
bundle/dms: set deployment display_name from bundle name on create (#…
pavloKozlov Jun 2, 2026
a61d6ef
bundle/dms: record git_info on the deployment version
shreyas-goenka Jun 3, 2026
5fd7b31
Merge remote-tracking branch 'origin/main' into dms-gitinfo
shreyas-goenka Jun 3, 2026
6b810b2
Regenerate DMS acceptance outputs after merge; sort recorded requests…
shreyas-goenka Jun 3, 2026
6bfd008
bundle/dms: fix state round-trip for main's WAL-based StateDB
shreyas-goenka Jun 3, 2026
743830d
bundle/dms: record deployment_id and version_id on jobs and pipelines
shreyas-goenka Jun 3, 2026
14358ce
acceptance/dms: regenerate outputs after merge and deployment_id/vers…
shreyas-goenka Jun 3, 2026
ce81328
bundle/dms: record display_name on the deployment version (#5438)
ilyakuz-db Jun 4, 2026
3da49d7
Merge remote-tracking branch 'origin/main' into dms-gitinfo
shreyas-goenka Jun 4, 2026
53109f9
Merge remote-tracking branch 'origin/shreyas-goenka/deployment-metada…
shreyas-goenka Jun 4, 2026
06061ae
bundle/dms: record deployment_mode on the deployment version (#5445)
ilyakuz-db Jun 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion acceptance/bin/print_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def main():
if not requests_file.exists():
sys.exit(f"File {requests_file.as_posix()} not found")

with open(requests_file) as fobj:
with open(requests_file, encoding="utf-8") as fobj:
data = fobj.read()

if not data:
Expand Down
7 changes: 7 additions & 0 deletions acceptance/bundle/dms/add-resources/databricks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
bundle:
name: add-resources-test

resources:
jobs:
job_a:
name: job-a
4 changes: 4 additions & 0 deletions acceptance/bundle/dms/add-resources/out.test.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

149 changes: 149 additions & 0 deletions acceptance/bundle/dms/add-resources/output.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@

>>> [CLI] bundle deploy
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/add-resources-test/default/files...
Deploying resources...
Deployment complete!

>>> [CLI] bundle deploy
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/add-resources-test/default/files...
Deploying resources...
Deployment complete!

>>> [CLI] bundle plan
update jobs.job_a
update jobs.job_b

Plan: 0 to add, 2 to change, 0 to delete, 0 unchanged

>>> print_requests.py --get --sort //bundle ^//workspace-files ^//import-file
{
"method": "GET",
"path": "/api/2.0/bundle/deployments/[UUID]"
}
{
"method": "GET",
"path": "/api/2.0/bundle/deployments/[UUID]/resources",
"q": {
"page_size": "1000"
},
"body": null
}
{
"method": "GET",
"path": "/api/2.0/bundle/deployments/[UUID]/resources",
"q": {
"page_size": "1000"
},
"body": null
}
{
"method": "POST",
"path": "/api/2.0/bundle/deployments",
"q": {
"deployment_id": "[UUID]"
},
"body": {
"display_name": "add-resources-test",
"target_name": "default"
}
}
{
"method": "POST",
"path": "/api/2.0/bundle/deployments/[UUID]/versions",
"q": {
"version_id": "1"
},
"body": {
"cli_version": "[DEV_VERSION]",
"version_type": "VERSION_TYPE_DEPLOY",
"display_name": "add-resources-test",
"target_name": "default",
"git_info": {}
}
}
{
"method": "POST",
"path": "/api/2.0/bundle/deployments/[UUID]/versions",
"q": {
"version_id": "2"
},
"body": {
"cli_version": "[DEV_VERSION]",
"version_type": "VERSION_TYPE_DEPLOY",
"display_name": "add-resources-test",
"target_name": "default",
"git_info": {}
}
}
{
"method": "POST",
"path": "/api/2.0/bundle/deployments/[UUID]/versions/1/complete",
"body": {
"name": "deployments/[UUID]/versions/1",
"completion_reason": "VERSION_COMPLETE_SUCCESS"
}
}
{
"method": "POST",
"path": "/api/2.0/bundle/deployments/[UUID]/versions/1/operations",
"q": {
"resource_key": "jobs.job_a"
},
"body": {
"resource_key": "jobs.job_a",
"action_type": "OPERATION_ACTION_TYPE_CREATE",
"state": {
"deployment": {
"deployment_id": "[UUID]",
"kind": "BUNDLE",
"metadata_file_path": "/Workspace/Users/[USERNAME]/.bundle/add-resources-test/default/state/metadata.json",
"version_id": "1"
},
"edit_mode": "UI_LOCKED",
"format": "MULTI_TASK",
"max_concurrent_runs": 1,
"name": "job-a",
"queue": {
"enabled": true
}
},
"resource_id": "[NUMID]",
"status": "OPERATION_STATUS_SUCCEEDED"
}
}
{
"method": "POST",
"path": "/api/2.0/bundle/deployments/[UUID]/versions/2/complete",
"body": {
"name": "deployments/[UUID]/versions/2",
"completion_reason": "VERSION_COMPLETE_SUCCESS"
}
}
{
"method": "POST",
"path": "/api/2.0/bundle/deployments/[UUID]/versions/2/operations",
"q": {
"resource_key": "jobs.job_b"
},
"body": {
"resource_key": "jobs.job_b",
"action_type": "OPERATION_ACTION_TYPE_CREATE",
"state": {
"deployment": {
"deployment_id": "[UUID]",
"kind": "BUNDLE",
"metadata_file_path": "/Workspace/Users/[USERNAME]/.bundle/add-resources-test/default/state/metadata.json",
"version_id": "2"
},
"edit_mode": "UI_LOCKED",
"format": "MULTI_TASK",
"max_concurrent_runs": 1,
"name": "job-b",
"queue": {
"enabled": true
}
},
"resource_id": "[NUMID]",
"status": "OPERATION_STATUS_SUCCEEDED"
}
}
34 changes: 34 additions & 0 deletions acceptance/bundle/dms/add-resources/script
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Deploy with one job.
trace $CLI bundle deploy

# Delete local cache to force reading state from DMS.
rm -rf .databricks

# Add a second job and deploy again.
cat > databricks.yml << 'EOF'
bundle:
name: add-resources-test

resources:
jobs:
job_a:
name: job-a
job_b:
name: job-b
EOF
trace $CLI bundle deploy

# Delete local cache again and run plan — should show no changes.
rm -rf .databricks
trace $CLI bundle plan

# Print metadata service requests. Should show:
# - Deploy 1: CREATE for job_a
# - Deploy 2: ListResources + CREATE for job_b (job_a is unchanged)
# - Plan: ListResources (no operations)
trace print_requests.py --get --sort //bundle ^//workspace-files ^//import-file

# Clean up.
rm -rf .databricks
$CLI bundle destroy --auto-approve > /dev/null 2>&1
print_requests.py --get > /dev/null 2>&1 || true
1 change: 1 addition & 0 deletions acceptance/bundle/dms/add-resources/test.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Ignore = [".databricks"]
7 changes: 7 additions & 0 deletions acceptance/bundle/dms/deploy-error/databricks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
bundle:
name: metadata-service-error-test

resources:
jobs:
test_job:
name: test-job
4 changes: 4 additions & 0 deletions acceptance/bundle/dms/deploy-error/out.test.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

74 changes: 74 additions & 0 deletions acceptance/bundle/dms/deploy-error/output.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@

>>> musterr [CLI] bundle deploy
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/metadata-service-error-test/default/files...
Deploying resources...
Error: cannot create resources.jobs.test_job: Invalid job configuration. (400 INVALID_PARAMETER_VALUE)

Endpoint: POST [DATABRICKS_URL]/api/2.2/jobs/create
HTTP Status: 400 Bad Request
API error_code: INVALID_PARAMETER_VALUE
API message: Invalid job configuration.


>>> print_requests.py --get //bundle ^//workspace-files ^//import-file
{
"method": "POST",
"path": "/api/2.0/bundle/deployments",
"q": {
"deployment_id": "[UUID]"
},
"body": {
"display_name": "metadata-service-error-test",
"target_name": "default"
}
}
{
"method": "POST",
"path": "/api/2.0/bundle/deployments/[UUID]/versions",
"q": {
"version_id": "1"
},
"body": {
"cli_version": "[DEV_VERSION]",
"version_type": "VERSION_TYPE_DEPLOY",
"display_name": "metadata-service-error-test",
"target_name": "default",
"git_info": {}
}
}
{
"method": "POST",
"path": "/api/2.0/bundle/deployments/[UUID]/versions/1/operations",
"q": {
"resource_key": "jobs.test_job"
},
"body": {
"resource_key": "jobs.test_job",
"action_type": "OPERATION_ACTION_TYPE_CREATE",
"state": {
"deployment": {
"deployment_id": "[UUID]",
"kind": "BUNDLE",
"metadata_file_path": "/Workspace/Users/[USERNAME]/.bundle/metadata-service-error-test/default/state/metadata.json",
"version_id": "1"
},
"edit_mode": "UI_LOCKED",
"format": "MULTI_TASK",
"max_concurrent_runs": 1,
"name": "test-job",
"queue": {
"enabled": true
}
},
"status": "OPERATION_STATUS_FAILED",
"error_message": "Invalid job configuration."
}
}
{
"method": "POST",
"path": "/api/2.0/bundle/deployments/[UUID]/versions/1/complete",
"body": {
"name": "deployments/[UUID]/versions/1",
"completion_reason": "VERSION_COMPLETE_FAILURE"
}
}
6 changes: 6 additions & 0 deletions acceptance/bundle/dms/deploy-error/script
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Deploy with the metadata service enabled, expecting a resource creation failure.
trace musterr $CLI bundle deploy

# Print the metadata service requests to verify the failed operation is reported.
trace print_requests.py --get //bundle ^//workspace-files ^//import-file
print_requests.py --get > /dev/null 2>&1 || true
9 changes: 9 additions & 0 deletions acceptance/bundle/dms/deploy-error/test.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Ignore = [".databricks"]
EnvMatrix.DATABRICKS_BUNDLE_ENGINE = ["direct"]
EnvMatrix.DATABRICKS_BUNDLE_MANAGED_STATE = ["true"]
RecordRequests = true

[[Server]]
Pattern = "POST /api/2.2/jobs/create"
Response.StatusCode = 400
Response.Body = '{"error_code": "INVALID_PARAMETER_VALUE", "message": "Invalid job configuration."}'
7 changes: 7 additions & 0 deletions acceptance/bundle/dms/plan-and-summary/databricks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
bundle:
name: plan-summary-test

resources:
jobs:
test_job:
name: test-job
4 changes: 4 additions & 0 deletions acceptance/bundle/dms/plan-and-summary/out.test.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading