diff --git a/acceptance/bundle/artifacts/whl_dynamic/out.plan_update.direct.json b/acceptance/bundle/artifacts/whl_dynamic/out.plan_update.direct.json index 4baab1f343..aaa546d048 100644 --- a/acceptance/bundle/artifacts/whl_dynamic/out.plan_update.direct.json +++ b/acceptance/bundle/artifacts/whl_dynamic/out.plan_update.direct.json @@ -148,13 +148,19 @@ "changes": { "local": { "environments[0].spec.dependencies[0]": { - "action": "update" + "action": "update", + "old": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/artifacts/.internal/my_test_code-0.0.1+[UNIX_TIME_NANOS][2]-py3-none-any.whl", + "new": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/artifacts/.internal/my_test_code-0.0.1+[UNIX_TIME_NANOS][0]-py3-none-any.whl" }, "tasks[task_key='TestTask'].for_each_task.task.libraries[0].whl": { - "action": "update" + "action": "update", + "old": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/artifacts/.internal/my_test_code-0.0.1+[UNIX_TIME_NANOS][2]-py3-none-any.whl", + "new": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/artifacts/.internal/my_test_code-0.0.1+[UNIX_TIME_NANOS][0]-py3-none-any.whl" }, "tasks[task_key='TestTask'].libraries[0].whl": { - "action": "update" + "action": "update", + "old": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/artifacts/.internal/my_test_code-0.0.1+[UNIX_TIME_NANOS][2]-py3-none-any.whl", + "new": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/artifacts/.internal/my_test_code-0.0.1+[UNIX_TIME_NANOS][0]-py3-none-any.whl" } }, "remote": { diff --git a/acceptance/bundle/migrate/basic/out.plan_update.json b/acceptance/bundle/migrate/basic/out.plan_update.json index f062cefae2..6ee99fbb9d 100644 --- a/acceptance/bundle/migrate/basic/out.plan_update.json +++ b/acceptance/bundle/migrate/basic/out.plan_update.json @@ -59,7 +59,9 @@ "changes": { "local": { "name": { - "action": "update" + "action": "update", + "old": "Test Migration Job", + "new": "Test Migrated Job" } }, "remote": { @@ -173,10 +175,14 @@ "changes": { "local": { "name": { - "action": "update" + "action": "update", + "old": "Test Migration Pipeline", + "new": "Test Migrated Pipeline" }, "tags['myjob_name']": { - "action": "update" + "action": "update", + "old": "Test Migration Job", + "new": "Test Migrated Job" } }, "remote": { diff --git a/acceptance/bundle/migrate/dashboards/out.plan_after_migrate.json b/acceptance/bundle/migrate/dashboards/out.plan_after_migrate.json index b314f8ab29..d7d30a4516 100644 --- a/acceptance/bundle/migrate/dashboards/out.plan_after_migrate.json +++ b/acceptance/bundle/migrate/dashboards/out.plan_after_migrate.json @@ -18,12 +18,15 @@ "changes": { "local": { "etag": { - "action": "skip" + "action": "skip", + "old": "[NUMID]" } }, "remote": { "serialized_dashboard": { - "action": "skip" + "action": "skip", + "old": "{\"pages\":[{\"name\":\"02724bf2\",\"displayName\":\"Dashboard test bundle-deploy-dashboard\"}]}\n", + "new": "{\"pages\":[{\"displayName\":\"Dashboard test bundle-deploy-dashboard\",\"name\":\"02724bf2\",\"pageType\":\"PAGE_TYPE_CANVAS\"}]}\n" } } } diff --git a/acceptance/bundle/migrate/runas/out.plan.json b/acceptance/bundle/migrate/runas/out.plan.json index 404fde7500..cccdaaa042 100644 --- a/acceptance/bundle/migrate/runas/out.plan.json +++ b/acceptance/bundle/migrate/runas/out.plan.json @@ -33,7 +33,10 @@ "changes": { "remote": { "run_as": { - "action": "skip" + "action": "skip", + "old": { + "service_principal_name": "[UUID]" + } } } } diff --git a/acceptance/bundle/resource_deps/id_chain/out.plan_update.direct.json b/acceptance/bundle/resource_deps/id_chain/out.plan_update.direct.json index 6236db4ed4..12b6870dc3 100644 --- a/acceptance/bundle/resource_deps/id_chain/out.plan_update.direct.json +++ b/acceptance/bundle/resource_deps/id_chain/out.plan_update.direct.json @@ -44,7 +44,9 @@ "changes": { "local": { "description": { - "action": "update" + "action": "update", + "old": "aa_desc", + "new": "aa_new_desc" } }, "remote": { @@ -113,7 +115,9 @@ "changes": { "local": { "description": { - "action": "update" + "action": "update", + "old": "prefix [NUMID]", + "new": "new_prefix [NUMID]" } }, "remote": { @@ -182,7 +186,9 @@ "changes": { "local": { "description": { - "action": "update" + "action": "update", + "old": "prefix [NUMID]", + "new": "new_prefix [NUMID]" } }, "remote": { @@ -251,7 +257,9 @@ "changes": { "local": { "description": { - "action": "update" + "action": "update", + "old": "prefix [NUMID]", + "new": "new_prefix [NUMID]" } }, "remote": { @@ -320,7 +328,9 @@ "changes": { "local": { "description": { - "action": "update" + "action": "update", + "old": "prefix [NUMID]", + "new": "new_prefix [NUMID]" } }, "remote": { diff --git a/acceptance/bundle/resource_deps/jobs_update_remote/out.plan_update.direct.json b/acceptance/bundle/resource_deps/jobs_update_remote/out.plan_update.direct.json index f4e9aa6385..41dd61c254 100644 --- a/acceptance/bundle/resource_deps/jobs_update_remote/out.plan_update.direct.json +++ b/acceptance/bundle/resource_deps/jobs_update_remote/out.plan_update.direct.json @@ -130,7 +130,9 @@ "reason": "server_side_default" }, "trigger.periodic.unit": { - "action": "update" + "action": "update", + "old": "DAYS", + "new": "HOURS" }, "webhook_notifications": { "action": "skip", diff --git a/acceptance/bundle/resource_deps/pipelines_recreate/out.plan_update.direct.json b/acceptance/bundle/resource_deps/pipelines_recreate/out.plan_update.direct.json index e54d91068f..239bdcfef9 100644 --- a/acceptance/bundle/resource_deps/pipelines_recreate/out.plan_update.direct.json +++ b/acceptance/bundle/resource_deps/pipelines_recreate/out.plan_update.direct.json @@ -53,7 +53,9 @@ "changes": { "local": { "description": { - "action": "update" + "action": "update", + "old": "depends on foo id [FOO_ID]", + "new": "depends on foo id ${resources.pipelines.foo.id}" } }, "remote": { @@ -89,7 +91,9 @@ "changes": { "local": { "catalog": { - "action": "recreate" + "action": "recreate", + "old": "mycatalog", + "new": "mynewcatalog" } } } diff --git a/acceptance/bundle/resources/clusters/deploy/update-and-resize-autoscale/out.plan_.direct.json b/acceptance/bundle/resources/clusters/deploy/update-and-resize-autoscale/out.plan_.direct.json index a74ee47050..dfff7bd1f1 100644 --- a/acceptance/bundle/resources/clusters/deploy/update-and-resize-autoscale/out.plan_.direct.json +++ b/acceptance/bundle/resources/clusters/deploy/update-and-resize-autoscale/out.plan_.direct.json @@ -41,10 +41,15 @@ "changes": { "local": { "autoscale": { - "action": "update" + "action": "update", + "new": { + "max_workers": 4, + "min_workers": 2 + } }, "num_workers": { - "action": "update" + "action": "update", + "old": 2 } } } @@ -81,10 +86,14 @@ "changes": { "local": { "autoscale.max_workers": { - "action": "update" + "action": "update", + "old": 4, + "new": 5 }, "autoscale.min_workers": { - "action": "update" + "action": "update", + "old": 2, + "new": 3 } } } @@ -122,10 +131,14 @@ "changes": { "local": { "autoscale.max_workers": { - "action": "resize" + "action": "resize", + "old": 5, + "new": 6 }, "autoscale.min_workers": { - "action": "resize" + "action": "resize", + "old": 3, + "new": 4 } } } @@ -160,10 +173,15 @@ "changes": { "local": { "autoscale": { - "action": "resize" + "action": "resize", + "old": { + "max_workers": 6, + "min_workers": 4 + } }, "num_workers": { - "action": "resize" + "action": "resize", + "new": 3 } } } diff --git a/acceptance/bundle/resources/clusters/deploy/update-and-resize/out.plan_.direct.json b/acceptance/bundle/resources/clusters/deploy/update-and-resize/out.plan_.direct.json index c49bfb9fce..ead50a60af 100644 --- a/acceptance/bundle/resources/clusters/deploy/update-and-resize/out.plan_.direct.json +++ b/acceptance/bundle/resources/clusters/deploy/update-and-resize/out.plan_.direct.json @@ -47,7 +47,9 @@ "changes": { "local": { "num_workers": { - "action": "update" + "action": "update", + "old": 2, + "new": 3 } } } @@ -85,7 +87,9 @@ "changes": { "local": { "num_workers": { - "action": "resize" + "action": "resize", + "old": 3, + "new": 4 } } } @@ -123,10 +127,14 @@ "changes": { "local": { "num_workers": { - "action": "resize" + "action": "resize", + "old": 4, + "new": 5 }, "spark_conf['spark.executor.memory']": { - "action": "update" + "action": "update", + "old": "2g", + "new": "4g" } } } diff --git a/acceptance/bundle/resources/dashboards/delete-trashed-out-of-band/out.plan.direct.json b/acceptance/bundle/resources/dashboards/delete-trashed-out-of-band/out.plan.direct.json index 6dd8450a3e..0c9073bd56 100644 --- a/acceptance/bundle/resources/dashboards/delete-trashed-out-of-band/out.plan.direct.json +++ b/acceptance/bundle/resources/dashboards/delete-trashed-out-of-band/out.plan.direct.json @@ -14,7 +14,8 @@ "changes": { "local": { "etag": { - "action": "skip" + "action": "skip", + "old": [ETAG] } } } diff --git a/acceptance/bundle/resources/dashboards/simple/out.plan.direct.json b/acceptance/bundle/resources/dashboards/simple/out.plan.direct.json index 50998fc622..0f458f43ca 100644 --- a/acceptance/bundle/resources/dashboards/simple/out.plan.direct.json +++ b/acceptance/bundle/resources/dashboards/simple/out.plan.direct.json @@ -18,12 +18,15 @@ "changes": { "local": { "etag": { - "action": "skip" + "action": "skip", + "old": [ETAG] } }, "remote": { "serialized_dashboard": { - "action": "skip" + "action": "skip", + "old": "{ }\n", + "new": "{}\n" } } } diff --git a/acceptance/bundle/resources/grants/schemas/change_privilege/out.plan2.direct.json b/acceptance/bundle/resources/grants/schemas/change_privilege/out.plan2.direct.json index 62f205416c..8de7edde63 100644 --- a/acceptance/bundle/resources/grants/schemas/change_privilege/out.plan2.direct.json +++ b/acceptance/bundle/resources/grants/schemas/change_privilege/out.plan2.direct.json @@ -52,10 +52,14 @@ "changes": { "local": { "grants[0].privileges[0]": { - "action": "update" + "action": "update", + "old": "CREATE_TABLE", + "new": "APPLY_TAG" }, "grants[0].privileges[1]": { - "action": "update" + "action": "update", + "old": "USE_SCHEMA", + "new": "CREATE_TABLE" } } } diff --git a/acceptance/bundle/resources/grants/volumes/out.plan2.direct.json b/acceptance/bundle/resources/grants/volumes/out.plan2.direct.json index f15cce8c61..1d246967a7 100644 --- a/acceptance/bundle/resources/grants/volumes/out.plan2.direct.json +++ b/acceptance/bundle/resources/grants/volumes/out.plan2.direct.json @@ -80,10 +80,14 @@ "changes": { "local": { "grants[0].privileges[0]": { - "action": "update" + "action": "update", + "old": "READ_VOLUME", + "new": "MANAGE" }, "grants[0].privileges[1]": { - "action": "update" + "action": "update", + "old": "WRITE_VOLUME", + "new": "READ_VOLUME" } } } diff --git a/acceptance/bundle/resources/jobs/delete_task/out.plan_update.direct.json b/acceptance/bundle/resources/jobs/delete_task/out.plan_update.direct.json index 5c809bfe39..640e304059 100644 --- a/acceptance/bundle/resources/jobs/delete_task/out.plan_update.direct.json +++ b/acceptance/bundle/resources/jobs/delete_task/out.plan_update.direct.json @@ -97,7 +97,20 @@ "changes": { "local": { "tasks[task_key='TestTask1']": { - "action": "update" + "action": "update", + "old": { + "existing_cluster_id": "0717-132531-5opeqon1", + "libraries": [ + { + "whl": "/Workspace/Users/foo@bar.com/mywheel.whl" + } + ], + "python_wheel_task": { + "entry_point": "run", + "package_name": "whl" + }, + "task_key": "TestTask1" + } } }, "remote": { diff --git a/acceptance/bundle/resources/jobs/remote_add_tag/out.plan_post_update.direct.json b/acceptance/bundle/resources/jobs/remote_add_tag/out.plan_post_update.direct.json index af69b5e087..dabd921250 100644 --- a/acceptance/bundle/resources/jobs/remote_add_tag/out.plan_post_update.direct.json +++ b/acceptance/bundle/resources/jobs/remote_add_tag/out.plan_post_update.direct.json @@ -83,7 +83,8 @@ "reason": "server_side_default" }, "tags['new_tag']": { - "action": "update" + "action": "update", + "new": "new_value" }, "timeout_seconds": { "action": "skip", diff --git a/acceptance/bundle/resources/jobs/update/out.plan_update.direct.json b/acceptance/bundle/resources/jobs/update/out.plan_update.direct.json index e999e15d45..68ba2e7545 100644 --- a/acceptance/bundle/resources/jobs/update/out.plan_update.direct.json +++ b/acceptance/bundle/resources/jobs/update/out.plan_update.direct.json @@ -74,7 +74,9 @@ "changes": { "local": { "trigger.periodic.unit": { - "action": "update" + "action": "update", + "old": "DAYS", + "new": "HOURS" } }, "remote": { diff --git a/acceptance/bundle/resources/jobs/update_single_node/out.plan_update.direct.json b/acceptance/bundle/resources/jobs/update_single_node/out.plan_update.direct.json index f0db36467e..a3dd6c6a3f 100644 --- a/acceptance/bundle/resources/jobs/update_single_node/out.plan_update.direct.json +++ b/acceptance/bundle/resources/jobs/update_single_node/out.plan_update.direct.json @@ -88,7 +88,9 @@ "changes": { "local": { "trigger.periodic.unit": { - "action": "update" + "action": "update", + "old": "DAYS", + "new": "HOURS" } }, "remote": { diff --git a/acceptance/bundle/resources/model_serving_endpoints/basic/out.second-plan.direct.json b/acceptance/bundle/resources/model_serving_endpoints/basic/out.second-plan.direct.json index 969e991dbe..ef65db32a6 100644 --- a/acceptance/bundle/resources/model_serving_endpoints/basic/out.second-plan.direct.json +++ b/acceptance/bundle/resources/model_serving_endpoints/basic/out.second-plan.direct.json @@ -10,7 +10,9 @@ "changes": { "local": { "name": { - "action": "recreate" + "action": "recreate", + "old": "[ENDPOINT_NAME_1]", + "new": "[ENDPOINT_NAME_2]" } } } @@ -57,7 +59,9 @@ "changes": { "local": { "object_id": { - "action": "update" + "action": "update", + "old": "/serving-endpoints/[ENDPOINT_ID_1]", + "new": "" } } } diff --git a/acceptance/bundle/resources/model_serving_endpoints/recreate/catalog-name/out.second-plan.direct.json b/acceptance/bundle/resources/model_serving_endpoints/recreate/catalog-name/out.second-plan.direct.json index 7b7dfc62e5..6f4dfe0408 100644 --- a/acceptance/bundle/resources/model_serving_endpoints/recreate/catalog-name/out.second-plan.direct.json +++ b/acceptance/bundle/resources/model_serving_endpoints/recreate/catalog-name/out.second-plan.direct.json @@ -30,7 +30,9 @@ "changes": { "local": { "config.auto_capture_config.catalog_name": { - "action": "recreate" + "action": "recreate", + "old": "main", + "new": "other_catalog" } } } diff --git a/acceptance/bundle/resources/model_serving_endpoints/recreate/name-change/out.second-plan.direct.json b/acceptance/bundle/resources/model_serving_endpoints/recreate/name-change/out.second-plan.direct.json index 2028815119..bb6cb7ad9b 100644 --- a/acceptance/bundle/resources/model_serving_endpoints/recreate/name-change/out.second-plan.direct.json +++ b/acceptance/bundle/resources/model_serving_endpoints/recreate/name-change/out.second-plan.direct.json @@ -25,7 +25,9 @@ "changes": { "local": { "name": { - "action": "recreate" + "action": "recreate", + "old": "[ORIGINAL_ENDPOINT_ID]", + "new": "[NEW_ENDPOINT_ID]" } } } diff --git a/acceptance/bundle/resources/model_serving_endpoints/recreate/route-optimized/out.second-plan.direct.json b/acceptance/bundle/resources/model_serving_endpoints/recreate/route-optimized/out.second-plan.direct.json index 6c33db5fd9..c4df477feb 100644 --- a/acceptance/bundle/resources/model_serving_endpoints/recreate/route-optimized/out.second-plan.direct.json +++ b/acceptance/bundle/resources/model_serving_endpoints/recreate/route-optimized/out.second-plan.direct.json @@ -22,7 +22,9 @@ "changes": { "local": { "route_optimized": { - "action": "recreate" + "action": "recreate", + "old": false, + "new": true } } } diff --git a/acceptance/bundle/resources/model_serving_endpoints/recreate/schema-name/out.second-plan.direct.json b/acceptance/bundle/resources/model_serving_endpoints/recreate/schema-name/out.second-plan.direct.json index 4b1657d1a6..30b2f6fedb 100644 --- a/acceptance/bundle/resources/model_serving_endpoints/recreate/schema-name/out.second-plan.direct.json +++ b/acceptance/bundle/resources/model_serving_endpoints/recreate/schema-name/out.second-plan.direct.json @@ -30,7 +30,9 @@ "changes": { "local": { "config.auto_capture_config.schema_name": { - "action": "recreate" + "action": "recreate", + "old": "default", + "new": "other_schema" } } } diff --git a/acceptance/bundle/resources/model_serving_endpoints/recreate/table-prefix/out.second-plan.direct.json b/acceptance/bundle/resources/model_serving_endpoints/recreate/table-prefix/out.second-plan.direct.json index 67990ab5a9..9bf7148b41 100644 --- a/acceptance/bundle/resources/model_serving_endpoints/recreate/table-prefix/out.second-plan.direct.json +++ b/acceptance/bundle/resources/model_serving_endpoints/recreate/table-prefix/out.second-plan.direct.json @@ -30,7 +30,9 @@ "changes": { "local": { "config.auto_capture_config.table_name_prefix": { - "action": "recreate" + "action": "recreate", + "old": "my_table", + "new": "other_table" } } } diff --git a/acceptance/bundle/resources/model_serving_endpoints/update/ai-gateway/out.plan.direct.json b/acceptance/bundle/resources/model_serving_endpoints/update/ai-gateway/out.plan.direct.json index 82b0c5e8ab..7408070620 100644 --- a/acceptance/bundle/resources/model_serving_endpoints/update/ai-gateway/out.plan.direct.json +++ b/acceptance/bundle/resources/model_serving_endpoints/update/ai-gateway/out.plan.direct.json @@ -61,7 +61,9 @@ "changes": { "local": { "ai_gateway.inference_table_config.catalog_name": { - "action": "update" + "action": "update", + "old": "first-inference-catalog", + "new": "second-inference-catalog" } } } diff --git a/acceptance/bundle/resources/model_serving_endpoints/update/both_gateway_and_tags/out.plan.direct.json b/acceptance/bundle/resources/model_serving_endpoints/update/both_gateway_and_tags/out.plan.direct.json index 2c2b7bdee0..f4637df371 100644 --- a/acceptance/bundle/resources/model_serving_endpoints/update/both_gateway_and_tags/out.plan.direct.json +++ b/acceptance/bundle/resources/model_serving_endpoints/update/both_gateway_and_tags/out.plan.direct.json @@ -73,10 +73,14 @@ "changes": { "local": { "ai_gateway.inference_table_config.catalog_name": { - "action": "update" + "action": "update", + "old": "first-inference-catalog", + "new": "second-inference-catalog" }, "tags[0].value": { - "action": "update" + "action": "update", + "old": "my-team-one", + "new": "my-team-two" } } } diff --git a/acceptance/bundle/resources/model_serving_endpoints/update/config/out.plan.direct.json b/acceptance/bundle/resources/model_serving_endpoints/update/config/out.plan.direct.json index d824bcf469..1fa187c69b 100644 --- a/acceptance/bundle/resources/model_serving_endpoints/update/config/out.plan.direct.json +++ b/acceptance/bundle/resources/model_serving_endpoints/update/config/out.plan.direct.json @@ -51,7 +51,9 @@ "changes": { "local": { "config.served_entities[0].external_model.name": { - "action": "update" + "action": "update", + "old": "gpt-4o-mini", + "new": "gpt-5o-mini" } } } diff --git a/acceptance/bundle/resources/model_serving_endpoints/update/email-notifications/out.plan.direct.json b/acceptance/bundle/resources/model_serving_endpoints/update/email-notifications/out.plan.direct.json index 32b2b72b9b..970e978e5a 100644 --- a/acceptance/bundle/resources/model_serving_endpoints/update/email-notifications/out.plan.direct.json +++ b/acceptance/bundle/resources/model_serving_endpoints/update/email-notifications/out.plan.direct.json @@ -61,7 +61,9 @@ "changes": { "local": { "email_notifications.on_update_success[0]": { - "action": "update" + "action": "update", + "old": "user1@example.com", + "new": "user2@example.com" } } } diff --git a/acceptance/bundle/resources/model_serving_endpoints/update/tags/out.plan.direct.json b/acceptance/bundle/resources/model_serving_endpoints/update/tags/out.plan.direct.json index 7d08c85c59..6a66e8e450 100644 --- a/acceptance/bundle/resources/model_serving_endpoints/update/tags/out.plan.direct.json +++ b/acceptance/bundle/resources/model_serving_endpoints/update/tags/out.plan.direct.json @@ -63,7 +63,9 @@ "changes": { "local": { "tags[0].value": { - "action": "update" + "action": "update", + "old": "my-team-one", + "new": "my-team-two" } } } diff --git a/acceptance/bundle/resources/permissions/jobs/added_remotely/out.plan.direct.json b/acceptance/bundle/resources/permissions/jobs/added_remotely/out.plan.direct.json index 344d30b011..34bb19d582 100644 --- a/acceptance/bundle/resources/permissions/jobs/added_remotely/out.plan.direct.json +++ b/acceptance/bundle/resources/permissions/jobs/added_remotely/out.plan.direct.json @@ -93,7 +93,11 @@ "changes": { "remote": { "permissions[group_name='admin-team']": { - "action": "update" + "action": "update", + "new": { + "group_name": "admin-team", + "permission_level": "CAN_MANAGE" + } } } } diff --git a/acceptance/bundle/resources/permissions/jobs/delete_one/local/out.plan_update.direct.json b/acceptance/bundle/resources/permissions/jobs/delete_one/local/out.plan_update.direct.json index 1366b05c71..1890680e3e 100644 --- a/acceptance/bundle/resources/permissions/jobs/delete_one/local/out.plan_update.direct.json +++ b/acceptance/bundle/resources/permissions/jobs/delete_one/local/out.plan_update.direct.json @@ -101,7 +101,11 @@ "changes": { "local": { "permissions[user_name='test-dabs-1@databricks.com']": { - "action": "update" + "action": "update", + "old": { + "permission_level": "CAN_MANAGE_RUN", + "user_name": "test-dabs-1@databricks.com" + } } } } diff --git a/acceptance/bundle/resources/permissions/jobs/deleted_remotely/out.plan_restore.direct.json b/acceptance/bundle/resources/permissions/jobs/deleted_remotely/out.plan_restore.direct.json index f79a3b3e73..27bce12e36 100644 --- a/acceptance/bundle/resources/permissions/jobs/deleted_remotely/out.plan_restore.direct.json +++ b/acceptance/bundle/resources/permissions/jobs/deleted_remotely/out.plan_restore.direct.json @@ -89,10 +89,18 @@ "changes": { "remote": { "permissions[group_name='data-team']": { - "action": "update" + "action": "update", + "old": { + "group_name": "data-team", + "permission_level": "CAN_MANAGE" + } }, "permissions[user_name='viewer@example.com']": { - "action": "update" + "action": "update", + "old": { + "permission_level": "CAN_VIEW", + "user_name": "viewer@example.com" + } } } } diff --git a/acceptance/bundle/resources/permissions/jobs/update/out.plan_delete_one.direct.json b/acceptance/bundle/resources/permissions/jobs/update/out.plan_delete_one.direct.json index 4cd774c170..a2a1d2dfbe 100644 --- a/acceptance/bundle/resources/permissions/jobs/update/out.plan_delete_one.direct.json +++ b/acceptance/bundle/resources/permissions/jobs/update/out.plan_delete_one.direct.json @@ -93,7 +93,11 @@ "changes": { "local": { "permissions[group_name='data-team']": { - "action": "update" + "action": "update", + "old": { + "group_name": "data-team", + "permission_level": "CAN_MANAGE" + } } } } diff --git a/acceptance/bundle/resources/permissions/jobs/update/out.plan_update.direct.json b/acceptance/bundle/resources/permissions/jobs/update/out.plan_update.direct.json index b407988457..d873010fe5 100644 --- a/acceptance/bundle/resources/permissions/jobs/update/out.plan_update.direct.json +++ b/acceptance/bundle/resources/permissions/jobs/update/out.plan_update.direct.json @@ -97,7 +97,9 @@ "changes": { "local": { "permissions[user_name='viewer@example.com'].permission_level": { - "action": "update" + "action": "update", + "old": "CAN_VIEW", + "new": "CAN_MANAGE" } } } diff --git a/acceptance/bundle/resources/permissions/pipelines/update/out.plan_delete_one.direct.json b/acceptance/bundle/resources/permissions/pipelines/update/out.plan_delete_one.direct.json index 76c46e7a58..4ee7f4dcea 100644 --- a/acceptance/bundle/resources/permissions/pipelines/update/out.plan_delete_one.direct.json +++ b/acceptance/bundle/resources/permissions/pipelines/update/out.plan_delete_one.direct.json @@ -73,7 +73,11 @@ "changes": { "local": { "permissions[group_name='data-team']": { - "action": "update" + "action": "update", + "old": { + "group_name": "data-team", + "permission_level": "CAN_MANAGE" + } } } } diff --git a/acceptance/bundle/resources/permissions/pipelines/update/out.plan_update.direct.json b/acceptance/bundle/resources/permissions/pipelines/update/out.plan_update.direct.json index cb547063ee..a2baa6c849 100644 --- a/acceptance/bundle/resources/permissions/pipelines/update/out.plan_update.direct.json +++ b/acceptance/bundle/resources/permissions/pipelines/update/out.plan_update.direct.json @@ -77,7 +77,9 @@ "changes": { "local": { "permissions[user_name='viewer@example.com'].permission_level": { - "action": "update" + "action": "update", + "old": "CAN_VIEW", + "new": "CAN_MANAGE" } } } diff --git a/acceptance/bundle/resources/pipelines/recreate-keys/change-catalog/out.plan_recreate.direct.json b/acceptance/bundle/resources/pipelines/recreate-keys/change-catalog/out.plan_recreate.direct.json index ba5e87fab9..5a8eb3a19e 100644 --- a/acceptance/bundle/resources/pipelines/recreate-keys/change-catalog/out.plan_recreate.direct.json +++ b/acceptance/bundle/resources/pipelines/recreate-keys/change-catalog/out.plan_recreate.direct.json @@ -24,7 +24,9 @@ "changes": { "local": { "catalog": { - "action": "recreate" + "action": "recreate", + "old": "mycatalog1", + "new": "mycatalog2" } } } diff --git a/acceptance/bundle/resources/pipelines/recreate-keys/change-ingestion-definition/out.plan_recreate.direct.json b/acceptance/bundle/resources/pipelines/recreate-keys/change-ingestion-definition/out.plan_recreate.direct.json index 4dedbfbcb6..4d2e6b9dfe 100644 --- a/acceptance/bundle/resources/pipelines/recreate-keys/change-ingestion-definition/out.plan_recreate.direct.json +++ b/acceptance/bundle/resources/pipelines/recreate-keys/change-ingestion-definition/out.plan_recreate.direct.json @@ -29,7 +29,9 @@ "changes": { "local": { "ingestion_definition.connection_name": { - "action": "recreate" + "action": "recreate", + "old": "my_connection", + "new": "my_new_connection" } } } diff --git a/acceptance/bundle/resources/pipelines/recreate-keys/change-storage/out.plan_recreate.direct.json b/acceptance/bundle/resources/pipelines/recreate-keys/change-storage/out.plan_recreate.direct.json index 50f5ab5d10..226b27322d 100644 --- a/acceptance/bundle/resources/pipelines/recreate-keys/change-storage/out.plan_recreate.direct.json +++ b/acceptance/bundle/resources/pipelines/recreate-keys/change-storage/out.plan_recreate.direct.json @@ -24,7 +24,9 @@ "changes": { "local": { "storage": { - "action": "recreate" + "action": "recreate", + "old": "dbfs:/pipelines/custom", + "new": "dbfs:/pipelines/newcustom" } } } diff --git a/acceptance/bundle/resources/volumes/change-name/out.plan.direct.json b/acceptance/bundle/resources/volumes/change-name/out.plan.direct.json index 8655bccdcc..ad0ee09b62 100644 --- a/acceptance/bundle/resources/volumes/change-name/out.plan.direct.json +++ b/acceptance/bundle/resources/volumes/change-name/out.plan.direct.json @@ -27,7 +27,9 @@ "changes": { "local": { "name": { - "action": "update_id" + "action": "update_id", + "old": "myvolume", + "new": "mynewvolume" } }, "remote": { diff --git a/bundle/deployplan/plan.go b/bundle/deployplan/plan.go index 710131b40b..774f884bce 100644 --- a/bundle/deployplan/plan.go +++ b/bundle/deployplan/plan.go @@ -45,13 +45,15 @@ type DependsOnEntry struct { } type Changes struct { - Local map[string]Trigger `json:"local,omitempty"` - Remote map[string]Trigger `json:"remote,omitempty"` + Local map[string]ChangeDesc `json:"local,omitempty"` + Remote map[string]ChangeDesc `json:"remote,omitempty"` } -type Trigger struct { +type ChangeDesc struct { Action string `json:"action"` Reason string `json:"reason,omitempty"` + Old any `json:"old,omitempty"` + New any `json:"new,omitempty"` } // HasChange checks if there are any changes for fields with the given prefix. diff --git a/bundle/direct/bundle_plan.go b/bundle/direct/bundle_plan.go index 08669bd29e..605ced24bd 100644 --- a/bundle/direct/bundle_plan.go +++ b/bundle/direct/bundle_plan.go @@ -176,7 +176,7 @@ func (b *DeploymentBundle) CalculatePlan(ctx context.Context, client *databricks entry.RemoteState = remoteState var remoteAction deployplan.ActionType - var remoteChangeMap map[string]deployplan.Trigger + var remoteChangeMap map[string]deployplan.ChangeDesc if remoteState == nil { remoteAction = deployplan.ActionTypeCreate @@ -233,9 +233,9 @@ func (b *DeploymentBundle) CalculatePlan(ctx context.Context, client *databricks return plan, nil } -func localChangesToTriggers(ctx context.Context, adapter *dresources.Adapter, diff []structdiff.Change, remoteState any) (deployplan.ActionType, map[string]deployplan.Trigger) { +func localChangesToTriggers(ctx context.Context, adapter *dresources.Adapter, diff []structdiff.Change, remoteState any) (deployplan.ActionType, map[string]deployplan.ChangeDesc) { action := deployplan.ActionTypeSkip - var m map[string]deployplan.Trigger + var m map[string]deployplan.ChangeDesc for _, ch := range diff { fieldAction, err := adapter.ClassifyChange(ch, remoteState, true) @@ -247,17 +247,21 @@ func localChangesToTriggers(ctx context.Context, adapter *dresources.Adapter, di action = fieldAction } if m == nil { - m = make(map[string]deployplan.Trigger) + m = make(map[string]deployplan.ChangeDesc) + } + m[ch.Path.String()] = deployplan.ChangeDesc{ + Action: fieldAction.String(), + Old: ch.Old, + New: ch.New, } - m[ch.Path.String()] = deployplan.Trigger{Action: fieldAction.String()} } return action, m } -func interpretOldStateVsRemoteState(ctx context.Context, adapter *dresources.Adapter, diff []structdiff.Change, remoteState any) (deployplan.ActionType, map[string]deployplan.Trigger) { +func interpretOldStateVsRemoteState(ctx context.Context, adapter *dresources.Adapter, diff []structdiff.Change, remoteState any) (deployplan.ActionType, map[string]deployplan.ChangeDesc) { action := deployplan.ActionTypeSkip - m := make(map[string]deployplan.Trigger) + m := make(map[string]deployplan.ChangeDesc) for _, ch := range diff { if ch.Old == nil && ch.Path.IsDotString() { @@ -265,7 +269,7 @@ func interpretOldStateVsRemoteState(ctx context.Context, adapter *dresources.Ada // This could either be server-side default or a policy. // In any case, this is not a change we should react to. // Note, we only consider struct fields here. Adding/removing elements to/from maps and slices should trigger updates. - m[ch.Path.String()] = deployplan.Trigger{ + m[ch.Path.String()] = deployplan.ChangeDesc{ Action: deployplan.ActionTypeSkipString, Reason: "server_side_default", } @@ -279,7 +283,11 @@ func interpretOldStateVsRemoteState(ctx context.Context, adapter *dresources.Ada if fieldAction > action { action = fieldAction } - m[ch.Path.String()] = deployplan.Trigger{Action: fieldAction.String()} + m[ch.Path.String()] = deployplan.ChangeDesc{ + Action: fieldAction.String(), + Old: ch.Old, + New: ch.New, + } } if len(m) == 0 {