Skip to content

Support DMS migration during bundle deploy - #6989

Open
shreyas-goenka wants to merge 12 commits into
mainfrom
shreyas-goenka_data/shreyas-goenka/dms-deploy-migration
Open

shreyas-goenka wants to merge 12 commits into
mainfrom
shreyas-goenka_data/shreyas-goenka/dms-deploy-migration

Conversation

@shreyas-goenka

@shreyas-goenka shreyas-goenka commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Changes

Enabling experimental.deployment_history for an existing bundle target will automatically migrate the bundle.

  • Run migration as a separate, committed phase before normal deployment: select state, register resources, upload the history marker, then reopen state from DMS before planning.
  • Back up remote resources.json to resources.json.backup before migration.
  • Register resource IDs, state, and dependencies from the normally selected state with INITIAL_REGISTER in a dedicated version, then apply deployment changes in a subsequent version.
  • Start registration at max(state serial, latest DMS version) + 1. Re-register when the selected state has no deployment-history marker, including repeated migration.
  • Print separate migration and deployment version links. Saved direct-state plans remain unsupported during migration.
  • Terraform state must first be migrated to direct with deployment history disabled. Combined Terraform-to-direct-to-DMS migration is deferred to GA.

Migration uses the already-selected, open state and acquires its own deployment lock only when migration is needed. Once committed, it remains committed even if the subsequent deployment fails planning or is declined. Normal deployment has no pending-migration object or migration-specific plan patching. Read-only plan commands do not commit migration.

Tests

  • Acceptance coverage for initial/repeated migration, backups, IDs/dependencies, rereading DMS before planning, and independent migration commit across planning failure or declined approval.
  • Scoped Go tests and lint pass. The DMS, migration, and state acceptance run passes 86/87 directories; the Python-template migration test has a 19-vs-20 upload-count mismatch also reproduced with pre-change source.

@github-actions github-actions Bot added the DABs DABs related issues label Oct 8, 2026
@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 3ddeba6

Run: 39293399360

Env ✅​pass 🙈​skip Time
✅​ aws linux-2core-8gb 284 17 5:37
✅​ aws-windows-latest-4core-16gb 286 15 4:54
✅​ azure linux-2core-8gb 283 17 5:27
✅​ azure-windows-latest-4core-16gb 285 15 5:29
✅​ gcp linux-2core-8gb 284 17 5:37
✅​ gcp-windows-latest-4core-16gb 286 15 5:31
Top 6 slowest tests (at least 2 minutes):
duration env testname
4:50 azure-windows-latest-4core-16gb TestAccept
4:44 gcp-windows-latest-4core-16gb TestAccept
4:16 aws-windows-latest-4core-16gb TestAccept
3:50 aws linux-2core-8gb TestAccept
3:45 gcp linux-2core-8gb TestAccept
3:37 azure linux-2core-8gb TestAccept

@shreyas-goenka
shreyas-goenka marked this pull request as ready for review October 12, 2026 15:27
@shreyas-goenka
shreyas-goenka requested review from a team as code owners October 12, 2026 15:27
Comment thread cmd/bundle/debug/states.go Outdated
@denik

denik commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

Adds support for disabling DMS when experimental.deployment_history: false is set, same as bundle.direct.

This seems a bit narrow? In direct we have env var and config setting. Config setting is consulted first, then env var, then state-derived, then the default.

Important also that state is sticky, so if you are on DMS and neither config nor env var are set, you still remain on DMS and not migrated back. Do we have that?

The config setting/env var/stickiness is complex enough so that it warrants its own PR, what do you think?

Comment thread bundle/statemgmt/state_pull.go
@shreyas-goenka
shreyas-goenka changed the base branch from main to shreyas-goenka_data/shreyas-goenka/dms-serial-stack October 14, 2026 12:22
@shreyas-goenka
shreyas-goenka added this pull request to stack #7047 October 14, 2026 12:22
Base automatically changed from shreyas-goenka_data/shreyas-goenka/dms-serial-stack to main October 19, 2026 11:33
@shreyas-goenka
shreyas-goenka force-pushed the shreyas-goenka_data/shreyas-goenka/dms-deploy-migration branch from f90499d to bc86051 Compare October 19, 2026 12:30
@shreyas-goenka
shreyas-goenka requested a review from denik October 19, 2026 13:22
Comment thread bundle/phases/deploy.go Outdated
musterr trace DATABRICKS_BUNDLE_DEPLOYMENT_HISTORY=true $CLI bundle deploy
trace print_requests.py --dms //api/2.0/bundle --oneline
title "Normal state selection prefers local serial 2 over remote serial 1"
trace update_file.py .databricks/bundle/default/resources.json '"serial": 1' '"serial": 2'

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.

I don't understand why we have this serial update here? what its purpose, does migration below not work without it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No it absolutely does. This just simulates that if local state is ahead, the local state is used and thus the version created us at version 3.

I can see this test being a bit hard to read, let me simplify this just to the core assertions.

trace MSYS_NO_PATHCONV=1 $CLI bundle-deployments list-versions "deployments/${deployment_id}" -o json |
jq 'map(select((.version_id | tonumber) >= 4))' |
jq -c 'sort_by(.version_id | tonumber) | map({version_id, previous_version_id, version_type, status, completion_reason})' |
jq -r '.[] | "version \(.version_id): previous=\(.previous_version_id) type=\(.version_type | ltrimstr("VERSION_TYPE_")) status=\(.status | ltrimstr("VERSION_STATUS_")) completion=\(.completion_reason | ltrimstr("VERSION_COMPLETE_"))"'

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.

what is this post processing, cannot we record original json here?

Comment thread bundle/phases/deploy.go
// Upgrade from read (opened by process.go, or by Migrate) to write mode. After approval
// and the migration commit above, so a declined deploy never opens a WAL it must discard,
// and the migration's tf+1 push lands before this advances the WAL header to tf+2.
if err := b.DeploymentBundle.StateDB.UpgradeToWrite(); err != nil {

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.

Do we need this if we're on DMS?

Comment thread bundle/phases/deploy.go Outdated
}
}

if b.MigratingToDMS {

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.

Are we reusing & patching the plan that we've created again resources.json? I thought we discussed following tf-to-direct migration and calculating plan with DMS before comitting?

@github-actions

Copy link
Copy Markdown
Contributor

Commit: 3ddeba6f1 | Workflow run

Regression test report

Selected 4 changed tests (limit=20, 0 not selected)

4 tests: regression=4 unreleased=0 coverage=0 failing=0

test branch main (9a01571) latest (v1.21.0)
TestAccept/bundle/dms/existing-state/DMS= ✅ ❌ ❌
TestAccept/bundle/dms/migration-before-deploy/DMS=true ✅ ❌ ❌
TestAccept/bundle/dms/repeated-migration/DMS=true ✅ ❌ ❌
TestAccept/bundle/migrate/auto/dms-migration/DMS= ✅ ❌ ❌
TestAccept/bundle/dms/existing-state/DMS=: branch ✅ | main (9a01571) ❌ | latest (v1.21.0) ❌

main (9a01571):

acceptance_test.go:1308: Diff:
        --- bundle/dms/existing-state/output.txt
        +++ /tmp/TestAcceptbundledmsexisting-stateDMS=1590840588/002/output.txt
        @@ -24,96 +24,14 @@
         
         === Config enables recording despite the disabled environment: register version 3, then deploy version 4
         >>> [CLI] bundle deploy
        -Enabling deployment history...
        -Deployment history enabled: [DATABRICKS_URL]/deployments/[DEPLOYMENT_ID]?version=3
        -Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/dms-existing-state-[UNIQUE_NAME]/default/files...
        -Current Deployment Version: [DATABRICKS_URL]/deployments/[DEPLOYMENT_ID]?version=4
        -Updated jobs.one
        -Updated jobs.two
        -Files: 1 uploaded, 0 deleted
        -Resources: 0 created, 2 changed, 0 deleted, 0 unchanged
        +Error: deployment history setting (true) does not match the existing state (false)
         
        ->>> find.py resources[.]json[.]wal --expect 0
        +Update experimental.deployment_history to match the existing deployment, or run "databricks bundle destroy" to start over
         
        ->>> jq {serial, features, state} .databricks/bundle/default/resources.json
        -{
        -  "serial": 4,
        -  "features": {
        -    "deployment_history": {}
        -  },
        -  "state": {}
        -}
        +contains error: '?version=3' not found in the output.
        +contains error: '?version=4' not found in the output.
        +contains error: 'Current Deployment Version: ' not found in the output.
        +contains error: 'Deployment history enabled: ' not found in the output.
        +contains error: 'Enabling deployment history...' not found in the output.
         
        -=== Inspect the remote backup's original pre-migration resource IDs, state, and dependencies
        ->>> MSYS_NO_PATHCONV=1 [CLI] workspace export /Workspace/Users/[USERNAME]/.bundle/dms-existing-state-[UNIQUE_NAME]/default/state/resources.json.backup --format AUTO --file .databricks/resources.backup.first.json
        -
        ->>> cat .databricks/resources.backup.first.json
        -{
        - "state_version": 3,
        - "cli_version": "[CLI_VERSION]",
        - "lineage": "[UUID]",
        - "serial": 1,
        - "state": {
        -  "resources.jobs.one": {
        -   "__id__": "[ONE_ID]",
        -   "state": {
        -    "deployment": {
        -     "kind": "BUNDLE",
        -     "metadata_file_path": "/Workspace/Users/[USERNAME]/.bundle/dms-existing-state-[UNIQUE_NAME]/default/state/metadata.json"
        -    },
        -    "edit_mode": "UI_LOCKED",
        -    "format": "MULTI_TASK",
        -    "max_concurrent_runs": 1,
        -    "name": "one",
        -    "queue": {
        -     "enabled": true
        -    }
        -   }
        -  },
        -  "resources.jobs.two": {
        -   "__id__": "[TWO_ID]",
        -   "state": {
        -    "deployment": {
        -     "kind": "BUNDLE",
        -     "metadata_file_path": "/Workspace/Users/[USERNAME]/.bundle/dms-existing-state-[UNIQUE_NAME]/default/state/metadata.json"
        -    },
        -    "edit_mode": "UI_LOCKED",
        -    "format": "MULTI_TASK",
        -    "max_concurrent_runs": 1,
        -    "name": "two",
        -    "queue": {
        -     "enabled": true
        -    },
        -    "tasks": [
        -     {
        -      "run_job_task": {
        -       "job_id": [ONE_ID]
        -      },
        -      "task_key": "run_one"
        -     }
        -    ]
        -   },
        -   "depends_on": [
        -    {
        -     "node": "resources.jobs.one",
        -     "label": "${resources.jobs.one.id}"
        -    }
        -   ]
        -  }
        - }
        -}
        -=== The backup equals the remote pre-migration snapshot byte for byte
        ->>> cmp .databricks/resources.before-dms.json .databricks/resources.backup.first.json
        -
        -=== Read back the completed migration and deploy versions with their recorded resource state
        ->>> MSYS_NO_PATHCONV=1 [CLI] bundle-deployments list-versions deployments/[DEPLOYMENT_ID] -o json
        -[{"version_id":"3","previous_version_id":null,"version_type":"VERSION_TYPE_DEPLOY","status":"VERSION_STATUS_COMPLETED","completion_reason":"VERSION_COMPLETE_SUCCESS"},{"version_id":"4","previous_version_id":"3","version_type":"VERSION_TYPE_DEPLOY","status":"VERSION_STATUS_COMPLETED","completion_reason":"VERSION_COMPLETE_SUCCESS"}]
        -
        ->>> MSYS_NO_PATHCONV=1 [CLI] bundle-deployments list-operations deployments/[DEPLOYMENT_ID]/versions/3 -o json
        -[{"resource_key":"jobs.one","resource_id":"[ONE_ID]","action_type":"OPERATION_ACTION_TYPE_INITIAL_REGISTER","status":"OPERATION_STATUS_SUCCEEDED"},{"resource_key":"jobs.two","resource_id":"[TWO_ID]","action_type":"OPERATION_ACTION_TYPE_INITIAL_REGISTER","status":"OPERATION_STATUS_SUCCEEDED"}]
        -
        ->>> MSYS_NO_PATHCONV=1 [CLI] bundle-deployments list-operations deployments/[DEPLOYMENT_ID]/versions/4 -o json
        -[{"resource_key":"jobs.one","resource_id":"[ONE_ID]","action_type":"OPERATION_ACTION_TYPE_UPDATE","status":"OPERATION_STATUS_SUCCEEDED"},{"resource_key":"jobs.two","resource_id":"[TWO_ID]","action_type":"OPERATION_ACTION_TYPE_UPDATE","status":"OPERATION_STATUS_SUCCEEDED"}]
        -
        ->>> MSYS_NO_PATHCONV=1 [CLI] bundle-deployments list-resources deployments/[DEPLOYMENT_ID] -o json
        -[{"resource_key":"jobs.one","resource_id":"[ONE_ID]","last_action_type":"OPERATION_ACTION_TYPE_UPDATE","last_version_id":"4","state":{"name":"updated","tasks":[],"depends_on":[]}},{"resource_key":"jobs.two","resource_id":"[TWO_ID]","last_action_type":"OPERATION_ACTION_TYPE_UPDATE","last_version_id":"4","state":{"name":"two","tasks":[{"task_key":"run_one","job_id":[ONE_ID]}],"depends_on":[{"node":"resources.jobs.one","label":"${resources.jobs.one.id}"}]}}]
        +Exit code: 1

latest (v1.21.0):

acceptance_test.go:1308: Diff:
        --- bundle/dms/existing-state/output.txt
        +++ /tmp/TestAcceptbundledmsexisting-stateDMS=1859334787/002/output.txt
        @@ -24,96 +24,14 @@
         
         === Config enables recording despite the disabled environment: register version 3, then deploy version 4
         >>> [CLI] bundle deploy
        -Enabling deployment history...
        -Deployment history enabled: [DATABRICKS_URL]/deployments/[DEPLOYMENT_ID]?version=3
        -Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/dms-existing-state-[UNIQUE_NAME]/default/files...
        -Current Deployment Version: [DATABRICKS_URL]/deployments/[DEPLOYMENT_ID]?version=4
        -Updated jobs.one
        -Updated jobs.two
        -Files: 1 uploaded, 0 deleted
        -Resources: 0 created, 2 changed, 0 deleted, 0 unchanged
        +Error: deployment history setting (true) does not match the existing state (false)
         
        ->>> find.py resources[.]json[.]wal --expect 0
        +Update experimental.deployment_history to match the existing deployment, or run "databricks bundle destroy" to start over
         
        ->>> jq {serial, features, state} .databricks/bundle/default/resources.json
        -{
        -  "serial": 4,
        -  "features": {
        -    "deployment_history": {}
        -  },
        -  "state": {}
        -}
        +contains error: '?version=3' not found in the output.
        +contains error: '?version=4' not found in the output.
        +contains error: 'Current Deployment Version: ' not found in the output.
        +contains error: 'Deployment history enabled: ' not found in the output.
        +contains error: 'Enabling deployment history...' not found in the output.
         
        -=== Inspect the remote backup's original pre-migration resource IDs, state, and dependencies
        ->>> MSYS_NO_PATHCONV=1 [CLI] workspace export /Workspace/Users/[USERNAME]/.bundle/dms-existing-state-[UNIQUE_NAME]/default/state/resources.json.backup --format AUTO --file .databricks/resources.backup.first.json
        -
        ->>> cat .databricks/resources.backup.first.json
        -{
        - "state_version": 3,
        - "cli_version": "[CLI_VERSION]",
        - "lineage": "[UUID]",
        - "serial": 1,
        - "state": {
        -  "resources.jobs.one": {
        -   "__id__": "[ONE_ID]",
        -   "state": {
        -    "deployment": {
        -     "kind": "BUNDLE",
        -     "metadata_file_path": "/Workspace/Users/[USERNAME]/.bundle/dms-existing-state-[UNIQUE_NAME]/default/state/metadata.json"
        -    },
        -    "edit_mode": "UI_LOCKED",
        -    "format": "MULTI_TASK",
        -    "max_concurrent_runs": 1,
        -    "name": "one",
        -    "queue": {
        -     "enabled": true
        -    }
        -   }
        -  },
        -  "resources.jobs.two": {
        -   "__id__": "[TWO_ID]",
        -   "state": {
        -    "deployment": {
        -     "kind": "BUNDLE",
        -     "metadata_file_path": "/Workspace/Users/[USERNAME]/.bundle/dms-existing-state-[UNIQUE_NAME]/default/state/metadata.json"
        -    },
        -    "edit_mode": "UI_LOCKED",
        -    "format": "MULTI_TASK",
        -    "max_concurrent_runs": 1,
        -    "name": "two",
        -    "queue": {
        -     "enabled": true
        -    },
        -    "tasks": [
        -     {
        -      "run_job_task": {
        -       "job_id": [ONE_ID]
        -      },
        -      "task_key": "run_one"
        -     }
        -    ]
        -   },
        -   "depends_on": [
        -    {
        -     "node": "resources.jobs.one",
        -     "label": "${resources.jobs.one.id}"
        -    }
        -   ]
        -  }
        - }
        -}
        -=== The backup equals the remote pre-migration snapshot byte for byte
        ->>> cmp .databricks/resources.before-dms.json .databricks/resources.backup.first.json
        -
        -=== Read back the completed migration and deploy versions with their recorded resource state
        ->>> MSYS_NO_PATHCONV=1 [CLI] bundle-deployments list-versions deployments/[DEPLOYMENT_ID] -o json
        -[{"version_id":"3","previous_version_id":null,"version_type":"VERSION_TYPE_DEPLOY","status":"VERSION_STATUS_COMPLETED","completion_reason":"VERSION_COMPLETE_SUCCESS"},{"version_id":"4","previous_version_id":"3","version_type":"VERSION_TYPE_DEPLOY","status":"VERSION_STATUS_COMPLETED","completion_reason":"VERSION_COMPLETE_SUCCESS"}]
        -
        ->>> MSYS_NO_PATHCONV=1 [CLI] bundle-deployments list-operations deployments/[DEPLOYMENT_ID]/versions/3 -o json
        -[{"resource_key":"jobs.one","resource_id":"[ONE_ID]","action_type":"OPERATION_ACTION_TYPE_INITIAL_REGISTER","status":"OPERATION_STATUS_SUCCEEDED"},{"resource_key":"jobs.two","resource_id":"[TWO_ID]","action_type":"OPERATION_ACTION_TYPE_INITIAL_REGISTER","status":"OPERATION_STATUS_SUCCEEDED"}]
        -
        ->>> MSYS_NO_PATHCONV=1 [CLI] bundle-deployments list-operations deployments/[DEPLOYMENT_ID]/versions/4 -o json
        -[{"resource_key":"jobs.one","resource_id":"[ONE_ID]","action_type":"OPERATION_ACTION_TYPE_UPDATE","status":"OPERATION_STATUS_SUCCEEDED"},{"resource_key":"jobs.two","resource_id":"[TWO_ID]","action_type":"OPERATION_ACTION_TYPE_UPDATE","status":"OPERATION_STATUS_SUCCEEDED"}]
        -
        ->>> MSYS_NO_PATHCONV=1 [CLI] bundle-deployments list-resources deployments/[DEPLOYMENT_ID] -o json
        -[{"resource_key":"jobs.one","resource_id":"[ONE_ID]","last_action_type":"OPERATION_ACTION_TYPE_UPDATE","last_version_id":"4","state":{"name":"updated","tasks":[],"depends_on":[]}},{"resource_key":"jobs.two","resource_id":"[TWO_ID]","last_action_type":"OPERATION_ACTION_TYPE_UPDATE","last_version_id":"4","state":{"name":"two","tasks":[{"task_key":"run_one","job_id":[ONE_ID]}],"depends_on":[{"node":"resources.jobs.one","label":"${resources.jobs.one.id}"}]}}]
        +Exit code: 1
TestAccept/bundle/dms/migration-before-deploy/DMS=true: branch ✅ | main (9a01571) ❌ | latest (v1.21.0) ❌

main (9a01571):

acceptance_test.go:1308: Diff:
        --- bundle/dms/migration-before-deploy/output.txt
        +++ /tmp/TestAcceptbundledmsmigration-before-deployDMS=true4179093484/002/output.txt
        @@ -4,68 +4,10 @@
         >>> fault.py GET /api/2.2/jobs/get* 403 0 1
         
         >>> musterr [CLI] bundle deploy -qq
        -Enabling deployment history...
        -Deployment history enabled: [DATABRICKS_URL]/deployments/[DEPLOYMENT_ID]?version=2
        -Error: cannot plan resources.jobs.job: reading id="[JOB_ID]": Fault injected by test. (403 INJECTED)
        +Error: deployment history setting (true) does not match the existing state (false)
         
        -Endpoint: GET [DATABRICKS_URL]/api/2.2/jobs/get?job_id=[JOB_ID]
        -HTTP Status: 403 Forbidden
        -API error_code: INJECTED
        -API message: Fault injected by test.
        +Update experimental.deployment_history to match the existing deployment, or run "databricks bundle destroy" to start over
         
        -Error: planning failed
        +Error: Path (/Workspace/Users/[USERNAME]/.bundle/dms-migration-before-deploy-[UNIQUE_NAME]/default/state/resources.deployment.json) doesn't exist.
         
        -
        ->>> print_requests.py --dms --get //api/2.0/bundle //jobs/get //workspace/import //workspace-files/import-file --oneline
        -{"method":"POST","path":"/api/2.0/bundle/deployments/[DEPLOYMENT_ID]/versions/2/complete"}
        -{"method":"POST","path":"/Workspace/Users/[USERNAME]/.bundle/dms-migration-before-deploy-[UNIQUE_NAME]/default/state/resources.json"}
        -{"method":"GET","path":"/api/2.0/bundle/deployments/[DEPLOYMENT_ID]/resources"}
        -{"method":"GET","path":"/api/2.2/jobs/get"}
        -
        ->>> MSYS_NO_PATHCONV=1 [CLI] workspace export /Workspace/Users/[USERNAME]/.bundle/dms-migration-before-deploy-[UNIQUE_NAME]/default/state/resources.json --format AUTO --file .databricks/resources.marker.json
        -
        ->>> jq -c {serial, features, state} .databricks/resources.marker.json
        -{"serial":2,"features":{"deployment_history":{}},"state":{}}
        -
        ->>> MSYS_NO_PATHCONV=1 [CLI] workspace export /Workspace/Users/[USERNAME]/.bundle/dms-migration-before-deploy-[UNIQUE_NAME]/default/state/resources.json.backup --format AUTO --file .databricks/resources.backup.json
        -
        ->>> cmp .databricks/resources.before-migration.json .databricks/resources.backup.json
        -
        ->>> MSYS_NO_PATHCONV=1 [CLI] bundle-deployments list-versions deployments/[DEPLOYMENT_ID] -o json
        -[{"version_id":"2","status":"VERSION_STATUS_COMPLETED","completion_reason":"VERSION_COMPLETE_SUCCESS"}]
        -
        ->>> MSYS_NO_PATHCONV=1 [CLI] bundle-deployments list-operations deployments/[DEPLOYMENT_ID]/versions/2 -o json
        -[{"resource_key":"jobs.job","action_type":"OPERATION_ACTION_TYPE_INITIAL_REGISTER","status":"OPERATION_STATUS_SUCCEEDED"},{"resource_key":"schemas.schema","action_type":"OPERATION_ACTION_TYPE_INITIAL_REGISTER","status":"OPERATION_STATUS_SUCCEEDED"}]
        -
        -=== 2. Destructive deployment is declined; committed migration is not repeated
        ->>> musterr [CLI] bundle deploy -qq
        -
        -This action will result in the deletion or recreation of the following UC schemas. Any underlying data may be lost:
        -  recreate resources.schemas.schema
        -Error: the deployment requires destructive actions, but the current console does not support prompting.
        -Deleting data assets such as schemas, pipelines, or volumes may cause permanent data loss and should be carefully reviewed.
        -To proceed, use --auto-approve after reviewing the plan above.
        -
        -
        ->>> cmp .databricks/resources.marker.json .databricks/bundle/default/resources.json
        -
        ->>> MSYS_NO_PATHCONV=1 [CLI] workspace export /Workspace/Users/[USERNAME]/.bundle/dms-migration-before-deploy-[UNIQUE_NAME]/default/state/resources.json --format AUTO --file .databricks/resources.after-decline.json
        -
        ->>> cmp .databricks/resources.marker.json .databricks/resources.after-decline.json
        -
        ->>> print_requests.py --dms //api/2.0/bundle
        -
        ->>> MSYS_NO_PATHCONV=1 [CLI] bundle-deployments list-versions deployments/[DEPLOYMENT_ID] -o json
        -[{"version_id":"2","status":"VERSION_STATUS_COMPLETED","completion_reason":"VERSION_COMPLETE_SUCCESS"}]
        -
        -=== 3. Approval creates ordinary deployment version 3, not another registration
        ->>> [CLI] bundle deploy --auto-approve -qq
        -
        -This action will result in the deletion or recreation of the following UC schemas. Any underlying data may be lost:
        -  recreate resources.schemas.schema
        -
        ->>> [CLI] bundle summary -o json
        -{"latest_version_id":3}
        -
        ->>> MSYS_NO_PATHCONV=1 [CLI] bundle-deployments list-versions deployments/[DEPLOYMENT_ID] -o json
        -[{"version_id":"2","status":"VERSION_STATUS_COMPLETED","completion_reason":"VERSION_COMPLETE_SUCCESS"},{"version_id":"3","status":"VERSION_STATUS_COMPLETED","completion_reason":"VERSION_COMPLETE_SUCCESS"}]
        +Exit code: 1
        
    acceptance_test.go:1115: 
        LOG.cleanup: Warn: planning resources.jobs.job: reading resources.jobs.job id="8792430982041474756": Fault injected by test.
        LOG.cleanup: The following resources will be deleted:
        LOG.cleanup:   delete resources.jobs.job
        LOG.cleanup:   delete resources.schemas.schema
        LOG.cleanup: 
        LOG.cleanup: This action will result in the deletion of the following UC schemas. Any underlying data may be lost:
        LOG.cleanup:   delete resources.schemas.schema
        LOG.cleanup: 
        LOG.cleanup: All files and directories at the following location will be deleted: /Workspace/Users/tester@databricks.com/.bundle/dms-migration-before-deploy-kg3k3u6tlrc2thpzhxuyrmhjfe/default
        LOG.cleanup: 
        LOG.cleanup: Destroy: 2 deleted
    acceptance_test.go:1115: 
        LOG.setup: {
        LOG.setup:   "catalog_type": "MANAGED_CATALOG",
        LOG.setup:   "created_at": 1792430982154,
        LOG.setup:   "created_by": "tester@databricks.com",
        LOG.setup:   "full_name": "dms_other_kg3k3u6tlrc2thpzhxuyrmhjfe",
        LOG.setup:   "metastore_id": "7a04fd64-db75-f283-7a04-fd64db75f391",
        LOG.setup:   "name": "dms_other_kg3k3u6tlrc2thpzhxuyrmhjfe",
        LOG.setup:   "owner": "tester@databricks.com",
        LOG.setup:   "updated_at": 1792430982154,
        LOG.setup:   "updated_by": "tester@databricks.com"
        LOG.setup: }

latest (v1.21.0):

acceptance_test.go:1308: Diff:
        --- bundle/dms/migration-before-deploy/output.txt
        +++ /tmp/TestAcceptbundledmsmigration-before-deployDMS=true4434333/002/output.txt
        @@ -4,68 +4,10 @@
         >>> fault.py GET /api/2.2/jobs/get* 403 0 1
         
         >>> musterr [CLI] bundle deploy -qq
        -Enabling deployment history...
        -Deployment history enabled: [DATABRICKS_URL]/deployments/[DEPLOYMENT_ID]?version=2
        -Error: cannot plan resources.jobs.job: reading id="[JOB_ID]": Fault injected by test. (403 INJECTED)
        +Error: deployment history setting (true) does not match the existing state (false)
         
        -Endpoint: GET [DATABRICKS_URL]/api/2.2/jobs/get?job_id=[JOB_ID]
        -HTTP Status: 403 Forbidden
        -API error_code: INJECTED
        -API message: Fault injected by test.
        +Update experimental.deployment_history to match the existing deployment, or run "databricks bundle destroy" to start over
         
        -Error: planning failed
        +Error: Path (/Workspace/Users/[USERNAME]/.bundle/dms-migration-before-deploy-[UNIQUE_NAME]/default/state/resources.deployment.json) doesn't exist.
         
        -
        ->>> print_requests.py --dms --get //api/2.0/bundle //jobs/get //workspace/import //workspace-files/import-file --oneline
        -{"method":"POST","path":"/api/2.0/bundle/deployments/[DEPLOYMENT_ID]/versions/2/complete"}
        -{"method":"POST","path":"/Workspace/Users/[USERNAME]/.bundle/dms-migration-before-deploy-[UNIQUE_NAME]/default/state/resources.json"}
        -{"method":"GET","path":"/api/2.0/bundle/deployments/[DEPLOYMENT_ID]/resources"}
        -{"method":"GET","path":"/api/2.2/jobs/get"}
        -
        ->>> MSYS_NO_PATHCONV=1 [CLI] workspace export /Workspace/Users/[USERNAME]/.bundle/dms-migration-before-deploy-[UNIQUE_NAME]/default/state/resources.json --format AUTO --file .databricks/resources.marker.json
        -
        ->>> jq -c {serial, features, state} .databricks/resources.marker.json
        -{"serial":2,"features":{"deployment_history":{}},"state":{}}
        -
        ->>> MSYS_NO_PATHCONV=1 [CLI] workspace export /Workspace/Users/[USERNAME]/.bundle/dms-migration-before-deploy-[UNIQUE_NAME]/default/state/resources.json.backup --format AUTO --file .databricks/resources.backup.json
        -
        ->>> cmp .databricks/resources.before-migration.json .databricks/resources.backup.json
        -
        ->>> MSYS_NO_PATHCONV=1 [CLI] bundle-deployments list-versions deployments/[DEPLOYMENT_ID] -o json
        -[{"version_id":"2","status":"VERSION_STATUS_COMPLETED","completion_reason":"VERSION_COMPLETE_SUCCESS"}]
        -
        ->>> MSYS_NO_PATHCONV=1 [CLI] bundle-deployments list-operations deployments/[DEPLOYMENT_ID]/versions/2 -o json
        -[{"resource_key":"jobs.job","action_type":"OPERATION_ACTION_TYPE_INITIAL_REGISTER","status":"OPERATION_STATUS_SUCCEEDED"},{"resource_key":"schemas.schema","action_type":"OPERATION_ACTION_TYPE_INITIAL_REGISTER","status":"OPERATION_STATUS_SUCCEEDED"}]
        -
        -=== 2. Destructive deployment is declined; committed migration is not repeated
        ->>> musterr [CLI] bundle deploy -qq
        -
        -This action will result in the deletion or recreation of the following UC schemas. Any underlying data may be lost:
        -  recreate resources.schemas.schema
        -Error: the deployment requires destructive actions, but the current console does not support prompting.
        -Deleting data assets such as schemas, pipelines, or volumes may cause permanent data loss and should be carefully reviewed.
        -To proceed, use --auto-approve after reviewing the plan above.
        -
        -
        ->>> cmp .databricks/resources.marker.json .databricks/bundle/default/resources.json
        -
        ->>> MSYS_NO_PATHCONV=1 [CLI] workspace export /Workspace/Users/[USERNAME]/.bundle/dms-migration-before-deploy-[UNIQUE_NAME]/default/state/resources.json --format AUTO --file .databricks/resources.after-decline.json
        -
        ->>> cmp .databricks/resources.marker.json .databricks/resources.after-decline.json
        -
        ->>> print_requests.py --dms //api/2.0/bundle
        -
        ->>> MSYS_NO_PATHCONV=1 [CLI] bundle-deployments list-versions deployments/[DEPLOYMENT_ID] -o json
        -[{"version_id":"2","status":"VERSION_STATUS_COMPLETED","completion_reason":"VERSION_COMPLETE_SUCCESS"}]
        -
        -=== 3. Approval creates ordinary deployment version 3, not another registration
        ->>> [CLI] bundle deploy --auto-approve -qq
        -
        -This action will result in the deletion or recreation of the following UC schemas. Any underlying data may be lost:
        -  recreate resources.schemas.schema
        -
        ->>> [CLI] bundle summary -o json
        -{"latest_version_id":3}
        -
        ->>> MSYS_NO_PATHCONV=1 [CLI] bundle-deployments list-versions deployments/[DEPLOYMENT_ID] -o json
        -[{"version_id":"2","status":"VERSION_STATUS_COMPLETED","completion_reason":"VERSION_COMPLETE_SUCCESS"},{"version_id":"3","status":"VERSION_STATUS_COMPLETED","completion_reason":"VERSION_COMPLETE_SUCCESS"}]
        +Exit code: 1
        
    acceptance_test.go:1115: 
        LOG.cleanup: Warn: planning resources.jobs.job: reading resources.jobs.job id="8792430986608318324": Fault injected by test.
        LOG.cleanup: The following resources will be deleted:
        LOG.cleanup:   delete resources.jobs.job
        LOG.cleanup:   delete resources.schemas.schema
        LOG.cleanup: 
        LOG.cleanup: This action will result in the deletion of the following UC schemas. Any underlying data may be lost:
        LOG.cleanup:   delete resources.schemas.schema
        LOG.cleanup: 
        LOG.cleanup: All files and directories at the following location will be deleted: /Workspace/Users/tester@databricks.com/.bundle/dms-migration-before-deploy-27bybkrv4racfkbep7wcxcbto4/default
        LOG.cleanup: 
        LOG.cleanup: Destroy: 2 deleted
    acceptance_test.go:1115: 
        LOG.setup: {
        LOG.setup:   "catalog_type": "MANAGED_CATALOG",
        LOG.setup:   "created_at": 1792430986721,
        LOG.setup:   "created_by": "tester@databricks.com",
        LOG.setup:   "full_name": "dms_other_27bybkrv4racfkbep7wcxcbto4",
        LOG.setup:   "metastore_id": "7a04fd65-eba9-2299-7a04-fd65eba92389",
        LOG.setup:   "name": "dms_other_27bybkrv4racfkbep7wcxcbto4",
        LOG.setup:   "owner": "tester@databricks.com",
        LOG.setup:   "updated_at": 1792430986721,
        LOG.setup:   "updated_by": "tester@databricks.com"
        LOG.setup: }
TestAccept/bundle/dms/repeated-migration/DMS=true: branch ✅ | main (9a01571) ❌ | latest (v1.21.0) ❌

main (9a01571):

acceptance_test.go:1308: Diff:
        --- bundle/dms/repeated-migration/output.txt
        +++ /tmp/TestAcceptbundledmsrepeated-migrationDMS=true3073337184/002/output.txt
        @@ -2,94 +2,4 @@
         === Setup (LOG.setup)
         Current: job=updated; DMS version=3; old backup=one.
         
        -=== 1. Before
        -Expect: old backup=one; latest snapshot=updated.
        -
        ->>> gron.py .databricks/resources.backup.first.json
        -json.state.resources.jobs.one.state.name = "one";
        -
        ->>> gron.py .databricks/resources.before-repeat.json
        -json.state.resources.jobs.one.state.name = "updated";
        -PASS: names checked
        -
        -=== 2. Repeat deploy
        -Expect: register=4; deploy=5; name=repeated; created=0.
        -
        ->>> MSYS_NO_PATHCONV=1 [CLI] workspace import /Workspace/Users/[USERNAME]/.bundle/dms-repeated-migration-[UNIQUE_NAME]/default/state/resources.json --file .databricks/resources.before-repeat.json --format AUTO --overwrite
        -
        ->>> cp .databricks/resources.before-repeat.json .databricks/bundle/default/resources.json
        -
        ->>> update_file.py databricks.yml name: updated name: repeated
        -
        ->>> [CLI] bundle deploy
        -Enabling deployment history...
        -Deployment history enabled: [DATABRICKS_URL]/deployments/[DEPLOYMENT_ID]?version=4
        -Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/dms-repeated-migration-[UNIQUE_NAME]/default/files...
        -Current Deployment Version: [DATABRICKS_URL]/deployments/[DEPLOYMENT_ID]?version=5
        -Updated jobs.one
        -Files: 1 uploaded, 0 deleted
        -Resources: 0 created, 1 changed, 0 deleted, 0 unchanged
        -PASS: repeat deployed
        -
        -=== 3. DMS records
        -Expect: versions complete; original ID preserved; name=repeated.
        -
        ->>> MSYS_NO_PATHCONV=1 [CLI] bundle-deployments list-versions deployments/[DEPLOYMENT_ID] -o json
        -version 4: previous=3 type=DEPLOY status=COMPLETED completion=SUCCESS
        -version 5: previous=4 type=DEPLOY status=COMPLETED completion=SUCCESS
        -
        ->>> MSYS_NO_PATHCONV=1 [CLI] bundle-deployments list-operations deployments/[DEPLOYMENT_ID]/versions/4 -o json
        -operation 4: key=jobs.one id=[ONE_ID] action=INITIAL_REGISTER status=SUCCEEDED
        -
        ->>> MSYS_NO_PATHCONV=1 [CLI] bundle-deployments list-operations deployments/[DEPLOYMENT_ID]/versions/5 -o json
        -operation 5: key=jobs.one id=[ONE_ID] action=UPDATE status=SUCCEEDED
        -
        ->>> MSYS_NO_PATHCONV=1 [CLI] bundle-deployments list-resources deployments/[DEPLOYMENT_ID] -o json
        -resource: key=jobs.one id=[ONE_ID]
        -  last_action=UPDATE version=5 name=repeated
        -  tasks=[] dependencies=[]
        -
        -=== 4. Backup copy
        -Expect: backup=updated; bytes match latest and differ from first.
        -
        ->>> MSYS_NO_PATHCONV=1 [CLI] workspace export /Workspace/Users/[USERNAME]/.bundle/dms-repeated-migration-[UNIQUE_NAME]/default/state/resources.json.backup --format AUTO --file .databricks/resources.backup.repeat.json
        -
        ->>> cat .databricks/resources.backup.repeat.json
        -{
        -  "state_version": 3,
        -  "cli_version": "[CLI_VERSION]",
        -  "lineage": "[UUID]",
        -  "serial": 3,
        -  "resources": {
        -    "resources.jobs.one": {
        -      "id": "[ONE_ID]",
        -      "name": "updated"
        -    }
        -  }
        -}
        -
        ->>> cmp .databricks/resources.before-repeat.json .databricks/resources.backup.repeat.json
        -
        ->>> diff.py .databricks/resources.backup.first.json .databricks/resources.backup.repeat.json
        ---- .databricks/resources.backup.first.json
        -+++ .databricks/resources.backup.repeat.json
        -@@ -3,5 +3,5 @@
        -  "cli_version": "[CLI_VERSION]",
        -  "lineage": "[UUID]",
        -- "serial": 1,
        -+ "serial": 3,
        -  "state": {
        -   "resources.jobs.one": {
        -@@ -15,5 +15,5 @@
        -     "format": "MULTI_TASK",
        -     "max_concurrent_runs": 1,
        --    "name": "one",
        -+    "name": "updated",
        -     "queue": {
        -      "enabled": true
        -@@ -22,3 +22,3 @@
        -   }
        -  }
        --}
        -+}
        -PASS: backup checked
        +Exit code: 1
        
    acceptance_test.go:1115: 
        LOG.setup: 
        LOG.setup: >>> /tmp/TestAccept2678046522/001/databricks bundle deploy
        LOG.setup: Uploading bundle files to /Workspace/Users/tester@databricks.com/.bundle/dms-repeated-migration-qsmhq2m7hnfpfcp73xcnj5owli/default/files...
        LOG.setup: Created jobs.one
        LOG.setup: Files: 2 uploaded, 0 deleted
        LOG.setup: Resources: 1 created, 0 changed, 0 deleted, 0 unchanged
        LOG.setup: 
        LOG.setup: >>> DATABRICKS_BUNDLE_DEPLOYMENT_HISTORY=false replace_ids.py
        LOG.setup: 
        LOG.setup: >>> update_file.py databricks.yml deployment_history: false deployment_history: true
        LOG.setup: 
        LOG.setup: >>> update_file.py databricks.yml name: one name: updated
        LOG.setup: 
        LOG.setup: >>> /tmp/TestAccept2678046522/001/databricks bundle deploy
        LOG.setup: Error: deployment history setting (true) does not match the existing state (false)
        LOG.setup: 
        LOG.setup: Update experimental.deployment_history to match the existing deployment, or run "databricks bundle destroy" to start over

latest (v1.21.0):

acceptance_test.go:1308: Diff:
        --- bundle/dms/repeated-migration/output.txt
        +++ /tmp/TestAcceptbundledmsrepeated-migrationDMS=true1321303723/002/output.txt
        @@ -2,94 +2,4 @@
         === Setup (LOG.setup)
         Current: job=updated; DMS version=3; old backup=one.
         
        -=== 1. Before
        -Expect: old backup=one; latest snapshot=updated.
        -
        ->>> gron.py .databricks/resources.backup.first.json
        -json.state.resources.jobs.one.state.name = "one";
        -
        ->>> gron.py .databricks/resources.before-repeat.json
        -json.state.resources.jobs.one.state.name = "updated";
        -PASS: names checked
        -
        -=== 2. Repeat deploy
        -Expect: register=4; deploy=5; name=repeated; created=0.
        -
        ->>> MSYS_NO_PATHCONV=1 [CLI] workspace import /Workspace/Users/[USERNAME]/.bundle/dms-repeated-migration-[UNIQUE_NAME]/default/state/resources.json --file .databricks/resources.before-repeat.json --format AUTO --overwrite
        -
        ->>> cp .databricks/resources.before-repeat.json .databricks/bundle/default/resources.json
        -
        ->>> update_file.py databricks.yml name: updated name: repeated
        -
        ->>> [CLI] bundle deploy
        -Enabling deployment history...
        -Deployment history enabled: [DATABRICKS_URL]/deployments/[DEPLOYMENT_ID]?version=4
        -Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/dms-repeated-migration-[UNIQUE_NAME]/default/files...
        -Current Deployment Version: [DATABRICKS_URL]/deployments/[DEPLOYMENT_ID]?version=5
        -Updated jobs.one
        -Files: 1 uploaded, 0 deleted
        -Resources: 0 created, 1 changed, 0 deleted, 0 unchanged
        -PASS: repeat deployed
        -
        -=== 3. DMS records
        -Expect: versions complete; original ID preserved; name=repeated.
        -
        ->>> MSYS_NO_PATHCONV=1 [CLI] bundle-deployments list-versions deployments/[DEPLOYMENT_ID] -o json
        -version 4: previous=3 type=DEPLOY status=COMPLETED completion=SUCCESS
        -version 5: previous=4 type=DEPLOY status=COMPLETED completion=SUCCESS
        -
        ->>> MSYS_NO_PATHCONV=1 [CLI] bundle-deployments list-operations deployments/[DEPLOYMENT_ID]/versions/4 -o json
        -operation 4: key=jobs.one id=[ONE_ID] action=INITIAL_REGISTER status=SUCCEEDED
        -
        ->>> MSYS_NO_PATHCONV=1 [CLI] bundle-deployments list-operations deployments/[DEPLOYMENT_ID]/versions/5 -o json
        -operation 5: key=jobs.one id=[ONE_ID] action=UPDATE status=SUCCEEDED
        -
        ->>> MSYS_NO_PATHCONV=1 [CLI] bundle-deployments list-resources deployments/[DEPLOYMENT_ID] -o json
        -resource: key=jobs.one id=[ONE_ID]
        -  last_action=UPDATE version=5 name=repeated
        -  tasks=[] dependencies=[]
        -
        -=== 4. Backup copy
        -Expect: backup=updated; bytes match latest and differ from first.
        -
        ->>> MSYS_NO_PATHCONV=1 [CLI] workspace export /Workspace/Users/[USERNAME]/.bundle/dms-repeated-migration-[UNIQUE_NAME]/default/state/resources.json.backup --format AUTO --file .databricks/resources.backup.repeat.json
        -
        ->>> cat .databricks/resources.backup.repeat.json
        -{
        -  "state_version": 3,
        -  "cli_version": "[CLI_VERSION]",
        -  "lineage": "[UUID]",
        -  "serial": 3,
        -  "resources": {
        -    "resources.jobs.one": {
        -      "id": "[ONE_ID]",
        -      "name": "updated"
        -    }
        -  }
        -}
        -
        ->>> cmp .databricks/resources.before-repeat.json .databricks/resources.backup.repeat.json
        -
        ->>> diff.py .databricks/resources.backup.first.json .databricks/resources.backup.repeat.json
        ---- .databricks/resources.backup.first.json
        -+++ .databricks/resources.backup.repeat.json
        -@@ -3,5 +3,5 @@
        -  "cli_version": "[CLI_VERSION]",
        -  "lineage": "[UUID]",
        -- "serial": 1,
        -+ "serial": 3,
        -  "state": {
        -   "resources.jobs.one": {
        -@@ -15,5 +15,5 @@
        -     "format": "MULTI_TASK",
        -     "max_concurrent_runs": 1,
        --    "name": "one",
        -+    "name": "updated",
        -     "queue": {
        -      "enabled": true
        -@@ -22,3 +22,3 @@
        -   }
        -  }
        --}
        -+}
        -PASS: backup checked
        +Exit code: 1
        
    acceptance_test.go:1115: 
        LOG.setup: 
        LOG.setup: >>> /home/runner/work/cli/cli/acceptance/build/linux_amd64/1.21.0/databricks bundle deploy
        LOG.setup: Uploading bundle files to /Workspace/Users/tester@databricks.com/.bundle/dms-repeated-migration-kz5hegk5snauthu3retvihhaui/default/files...
        LOG.setup: Created jobs.one
        LOG.setup: Files: 2 uploaded, 0 deleted
        LOG.setup: Resources: 1 created, 0 changed, 0 deleted, 0 unchanged
        LOG.setup: 
        LOG.setup: >>> DATABRICKS_BUNDLE_DEPLOYMENT_HISTORY=false replace_ids.py
        LOG.setup: 
        LOG.setup: >>> update_file.py databricks.yml deployment_history: false deployment_history: true
        LOG.setup: 
        LOG.setup: >>> update_file.py databricks.yml name: one name: updated
        LOG.setup: 
        LOG.setup: >>> /home/runner/work/cli/cli/acceptance/build/linux_amd64/1.21.0/databricks bundle deploy
        LOG.setup: Error: deployment history setting (true) does not match the existing state (false)
        LOG.setup: 
        LOG.setup: Update experimental.deployment_history to match the existing deployment, or run "databricks bundle destroy" to start over
TestAccept/bundle/migrate/auto/dms-migration/DMS=: branch ✅ | main (9a01571) ❌ | latest (v1.21.0) ❌

main (9a01571):

acceptance_test.go:1308: Diff:
        --- bundle/migrate/auto/dms-migration/output.txt
        +++ /tmp/TestAcceptbundlemigrateautodms-migrationDMS=2632175066/002/output.txt
        @@ -4,11 +4,19 @@
         
         === Deployment history rejects Terraform state before conversion, for both plan and deploy
         >>> DATABRICKS_BUNDLE_DEPLOYMENT_HISTORY=true musterr [CLI] bundle plan
        -Error: deployment history is not supported with Terraform state; first migrate to direct deployment with deployment history disabled
        +Notice: migrating your bundle to direct deployment engine (https://github.com/databricks/cli/issues/6765).
        +Error: deployment history setting (true) does not match the existing state (false)
         
        +Update experimental.deployment_history to match the existing deployment, or run "databricks bundle destroy" to start over
        +
        +
         >>> DATABRICKS_BUNDLE_DEPLOYMENT_HISTORY=true musterr [CLI] bundle deploy
        -Error: deployment history is not supported with Terraform state; first migrate to direct deployment with deployment history disabled
        +Notice: migrating your bundle to direct deployment engine (https://github.com/databricks/cli/issues/6765).
        +Error: deployment history setting (true) does not match the existing state (false)
         
        +Update experimental.deployment_history to match the existing deployment, or run "databricks bundle destroy" to start over
        +
        +
         >>> find.py resources[.]json|tfstate[.]backup --expect 0
         
         >>> print_requests.py --dms //api/2.0/bundle //jobs
        @@ -23,21 +28,9 @@
         
         === Then enable deployment history on the direct state, preserving the job ID
         >>> DATABRICKS_BUNDLE_ENGINE=direct DATABRICKS_BUNDLE_DEPLOYMENT_HISTORY=true [CLI] bundle deploy
        -Enabling deployment history...
        -Deployment history enabled: [DATABRICKS_URL]/deployments/[DEPLOYMENT_ID]?version=4
        -Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...
        -Updated jobs.test_job
        -Files: 0 uploaded, 0 deleted
        -Resources: 0 created, 1 changed, 0 deleted, 0 unchanged
        +Error: deployment history setting (true) does not match the existing state (false)
         
        ->>> find.py \.databricks/.*(\.tfstate|resources.*\.json|\.wal)
        -.databricks/bundle/default/resources.json
        -.databricks/bundle/default/terraform/terraform.tfstate.backup
        +Update experimental.deployment_history to match the existing deployment, or run "databricks bundle destroy" to start over
         
        ->>> find.py resources[.]json[.]wal --expect 0
         
        ->>> DATABRICKS_BUNDLE_DEPLOYMENT_HISTORY=true [CLI] bundle summary -o json
        -{"job_id":"[TEST_JOB_ID]","version":5}
        -
        ->>> MSYS_NO_PATHCONV=1 [CLI] workspace export /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/state/resources.json --format AUTO
        -{"features":{"deployment_history":{}},"state":{}}
        +Exit code: 1
        
FAIL

latest (v1.21.0):

acceptance_test.go:1308: Diff:
        --- bundle/migrate/auto/dms-migration/output.txt
        +++ /tmp/TestAcceptbundlemigrateautodms-migrationDMS=1905129850/002/output.txt
        @@ -4,11 +4,19 @@
         
         === Deployment history rejects Terraform state before conversion, for both plan and deploy
         >>> DATABRICKS_BUNDLE_DEPLOYMENT_HISTORY=true musterr [CLI] bundle plan
        -Error: deployment history is not supported with Terraform state; first migrate to direct deployment with deployment history disabled
        +Notice: migrating your bundle to direct deployment engine (https://github.com/databricks/cli/issues/6765).
        +Error: deployment history setting (true) does not match the existing state (false)
         
        +Update experimental.deployment_history to match the existing deployment, or run "databricks bundle destroy" to start over
        +
        +
         >>> DATABRICKS_BUNDLE_DEPLOYMENT_HISTORY=true musterr [CLI] bundle deploy
        -Error: deployment history is not supported with Terraform state; first migrate to direct deployment with deployment history disabled
        +Notice: migrating your bundle to direct deployment engine (https://github.com/databricks/cli/issues/6765).
        +Error: deployment history setting (true) does not match the existing state (false)
         
        +Update experimental.deployment_history to match the existing deployment, or run "databricks bundle destroy" to start over
        +
        +
         >>> find.py resources[.]json|tfstate[.]backup --expect 0
         
         >>> print_requests.py --dms //api/2.0/bundle //jobs
        @@ -23,21 +28,9 @@
         
         === Then enable deployment history on the direct state, preserving the job ID
         >>> DATABRICKS_BUNDLE_ENGINE=direct DATABRICKS_BUNDLE_DEPLOYMENT_HISTORY=true [CLI] bundle deploy
        -Enabling deployment history...
        -Deployment history enabled: [DATABRICKS_URL]/deployments/[DEPLOYMENT_ID]?version=4
        -Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...
        -Updated jobs.test_job
        -Files: 0 uploaded, 0 deleted
        -Resources: 0 created, 1 changed, 0 deleted, 0 unchanged
        +Error: deployment history setting (true) does not match the existing state (false)
         
        ->>> find.py \.databricks/.*(\.tfstate|resources.*\.json|\.wal)
        -.databricks/bundle/default/resources.json
        -.databricks/bundle/default/terraform/terraform.tfstate.backup
        +Update experimental.deployment_history to match the existing deployment, or run "databricks bundle destroy" to start over
         
        ->>> find.py resources[.]json[.]wal --expect 0
         
        ->>> DATABRICKS_BUNDLE_DEPLOYMENT_HISTORY=true [CLI] bundle summary -o json
        -{"job_id":"[TEST_JOB_ID]","version":5}
        -
        ->>> MSYS_NO_PATHCONV=1 [CLI] workspace export /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/state/resources.json --format AUTO
        -{"features":{"deployment_history":{}},"state":{}}
        +Exit code: 1
        
FAIL

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DABs DABs related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants