From f66fc6fac245b0846e38404f2dc9f431d8360993 Mon Sep 17 00:00:00 2001 From: "databricks-ci-ghec-1[bot]" <184311507+databricks-ci-ghec-1[bot]@users.noreply.github.com> Date: Thu, 12 Nov 2026 04:05:34 +0000 Subject: [PATCH 1/4] Update Go SDK to v0.198.0 --- .codegen/_openapi_sha | 2 +- .codegen/cli.json | 108 +++++++-------- .../dependency-updates/go-sdk-v0.198.0.md | 1 + .../deploy/readplan/postgres_role/output.txt | 5 +- .../bundle/invariant/no_drift/output.txt | 131 ++++++++++++++++++ .../purge_on_delete_transitions/output.txt | 9 +- .../postgres_branches/recreate/out.plan.txt | 3 +- .../recreate/out.requests.update.txt | 19 +++ .../postgres_branches/recreate/output.txt | 3 +- .../recreate_source_branch_time/out.plan.json | 3 +- .../out.requests.json | 13 ++ .../recreate_source_branch_time/output.txt | 6 +- .../update_expire_time/out.requests.json | 13 ++ .../update_expire_time/output.txt | 6 +- .../update_protected/out.plan.no_change.json | 13 +- .../update_protected/out.plan.restore.json | 3 +- .../update_protected/out.plan.update.json | 3 +- .../out.requests.no_change.json | 32 ++++- .../out.requests.restore.json | 21 ++- .../update_protected/out.requests.update.json | 21 ++- .../update_protected/output.txt | 21 ++- .../update_ttl/out.requests.json | 13 ++ .../postgres_branches/update_ttl/output.txt | 6 +- .../postgres_catalogs/recreate/output.txt | 12 +- .../basic/out.requests.remove.json | 38 +++++ .../postgres_data_apis/basic/output.txt | 16 ++- .../postgres_data_apis/out-of-band/output.txt | 26 +++- .../recreate/out.requests.recreate.json | 51 +++++++ .../postgres_data_apis/recreate/output.txt | 12 +- .../update/out.requests.remove_field.json | 38 +++++ .../update/out.requests.update.json | 38 +++++ .../postgres_data_apis/update/output.txt | 26 +++- .../url_reference/output.txt | 16 ++- .../postgres_databases/recreate/output.txt | 34 ++++- .../replace_existing/out.requests.deploy.json | 26 +++- .../replace_existing/output.txt | 8 +- .../update/out.plan.no_change.json | 16 ++- .../update/out.plan.restore.json | 3 +- .../update/out.plan.update.json | 3 +- .../update/out.requests.no_change.json | 39 +++++- .../update/out.requests.restore.json | 28 +++- .../update/out.requests.update.json | 28 +++- .../postgres_databases/update/output.txt | 27 +++- .../add_settings/out.requests.json | 34 ++++- .../add_settings/output.txt | 18 ++- .../postgres_endpoints/recreate/output.txt | 39 +++++- .../remove_suspend_timeout/out.deploy.txt | 13 +- .../out.plan.drift.json | 16 +-- .../remove_suspend_timeout/out.plan.drift.txt | 6 +- .../remove_suspend_timeout/out.plan.json | 15 +- .../remove_suspend_timeout/out.requests.json | 34 ++++- .../remove_suspend_timeout/output.txt | 8 +- .../out.plan.no_change.json | 25 ++-- .../update_autoscaling/out.plan.restore.json | 12 +- .../update_autoscaling/out.plan.update.json | 12 +- .../out.requests.no_change.json | 47 ++++++- .../out.requests.restore.json | 36 ++++- .../out.requests.update.json | 36 ++++- .../update_autoscaling/output.txt | 35 +++-- .../update_pg_settings/out.plan.json | 12 +- .../update_pg_settings/out.requests.json | 34 ++++- .../update_pg_settings/output.txt | 18 ++- .../update_suspend_timeout/out.plan.json | 12 +- .../update_suspend_timeout/out.requests.json | 34 ++++- .../update_suspend_timeout/output.txt | 12 +- .../out.deploy.txt | 2 +- .../out.plan.json | 6 +- .../remove_history_retention/out.deploy.txt | 11 +- .../out.plan.drift.json | 7 +- .../remove_history_retention/out.plan.json | 6 +- .../out.requests.json | 2 +- .../out.requests.json | 2 +- .../output.txt | 4 +- .../out.plan.json | 3 +- .../out.requests.json | 2 +- .../out.plan.no_change.json | 24 +++- .../update_display_name/out.plan.restore.json | 6 +- .../update_display_name/out.plan.update.json | 6 +- .../out.requests.no_change.json | 19 +++ .../out.requests.restore.json | 2 +- .../out.requests.update.json | 2 +- .../update_display_name/output.txt | 7 +- .../update_history_retention/out.plan.json | 3 +- .../out.requests.json | 2 +- .../update_keeps_children/output.txt | 6 +- .../inherited-role-bind/output.txt | 4 +- .../inherited-role-conflict/output.txt | 6 +- .../recreate-postgres-role/output.txt | 34 ++++- .../postgres_roles/recreate/output.txt | 34 ++++- .../replace_existing/out.requests.deploy.json | 26 +++- .../replace_existing/output.txt | 8 +- .../update/out.plan.no_change.json | 15 +- .../update/out.requests.no_change.json | 41 +++++- .../update/out.requests.restore.json | 26 +++- .../update/out.requests.update.json | 26 +++- .../postgres_roles/update/output.txt | 27 +++- .../basic/out.requests.remove.txt | 13 ++ .../basic/out.requests.update.txt | 15 +- .../basic/output.txt | 10 +- .../out-of-band/output.txt | 6 +- .../recreate/output.txt | 12 +- .../recreate_capped/output.txt | 1 + .../workspace/apps/run-local-node/output.txt | 26 +--- acceptance/ssh/agent-launchers/output.txt | 48 +------ .../materialization_sets.generated.yml | 2 - .../configs/postgres_branches.generated.yml | 10 -- .../configs/postgres_databases.generated.yml | 7 - .../configs/postgres_endpoints.generated.yml | 18 --- .../configs/postgres_projects.generated.yml | 18 --- .../configs/postgres_roles.generated.yml | 4 - bundle/schema/jsonschema.json | 16 ++- cmd/workspace/lakewatch/lakewatch.go | 2 - cmd/workspace/rfa/rfa.go | 6 +- go.mod | 2 +- go.sum | 4 +- .../bundles/alerts/_models/alert.py | 8 +- .../_models/materialization_notifications.py | 3 +- .../_models/materialized_feature.py | 22 +++ .../core/_generated/alerts.py | 5 + 119 files changed, 1549 insertions(+), 526 deletions(-) create mode 100644 .nextchanges/dependency-updates/go-sdk-v0.198.0.md delete mode 100644 bundle/direct/dresources/configs/postgres_databases.generated.yml diff --git a/.codegen/_openapi_sha b/.codegen/_openapi_sha index e66f5e65372..60205f80aa8 100644 --- a/.codegen/_openapi_sha +++ b/.codegen/_openapi_sha @@ -1 +1 @@ -6fdee6b2790c8a487592a5371b478d55b4c9f185 \ No newline at end of file +0a8a9c3e98b49cbd21bb5d6c859971d0406d2267 \ No newline at end of file diff --git a/.codegen/cli.json b/.codegen/cli.json index daad408e81f..603802a304a 100644 --- a/.codegen/cli.json +++ b/.codegen/cli.json @@ -40125,20 +40125,6 @@ "lakewatch.CommonConfig": { "description": "Catch-all per-catalog config — settings that don't belong to any one\nresource family. Singleton. Name format: `catalogs/{catalog}/commonConfig`.", "fields": { - "custom_content_pack_path": { - "description": "UC volume path holding user-authored custom content packs, e.g.\n`/Volumes/{catalog}/{schema}/{volume}`. User-provided with no default:\nwhen unset, custom content packs are unavailable (referencing one is\nrejected) and only built-in content packs apply.", - "launch_stage": "PUBLIC_BETA", - "behaviors": [ - "OPTIONAL" - ] - }, - "custom_presets_path": { - "description": "UC volume path holding user-authored custom presets, e.g.\n`/Volumes/{catalog}/{schema}/{volume}`. User-provided with no default:\nwhen unset, custom presets are unavailable and only built-in presets apply.", - "launch_stage": "PUBLIC_BETA", - "behaviors": [ - "OPTIONAL" - ] - }, "etag": { "description": "Opaque entity tag for optimistic concurrency. Returned on every read;\npass it back as the Update request's `etag` to make the update\nconditional on the resource being unchanged.", "launch_stage": "PUBLIC_BETA", @@ -41146,7 +41132,7 @@ ] }, "runbook": { - "description": "Long-form operational guidance carried from the authored rule metadata. Supports up to 4096\ncharacters. Requests exceeding this limit are rejected.", + "description": "Long-form operational guidance carried from the authored rule metadata. Supports up to 4096\ncharacters. Requests exceeding this limit are rejected. Supports Markdown; analysts and the\ninvestigation agent follow it when triaging this rule's alerts.", "launch_stage": "PUBLIC_BETA", "behaviors": [ "OPTIONAL" @@ -44248,7 +44234,7 @@ "ml.CreateMaterializationSetRequest": { "fields": { "materialization_set": { - "description": "The materialization set to create. Supply materialization_set_id to choose the identifier;\nleave it unset to have one assigned.", + "description": "The materialization set to create. Set `materialization_set_id` to\nchoose the identifier, or omit it to have one assigned.\n\nMembers with a cron schedule or table trigger must request the same\n`paused` value. An omitted `paused` defaults to `false`.\nA set can be created paused only if all members are batch materializations.", "ref": "ml.MaterializationSet", "launch_stage": "PRIVATE_PREVIEW" }, @@ -47264,7 +47250,7 @@ } }, "ml.MaterializationNotifications": { - "description": "Notifications for the jobs and pipelines that materialize the features in a set, one field per\ntrigger.", + "description": "Notifications for the jobs and pipelines that materialize features, one field per trigger.", "fields": { "on_failure": { "description": "Who to notify when a run fails, and on which attempts.", @@ -47572,11 +47558,11 @@ ] }, "notifications": { - "description": "Notification configuration for the jobs and pipelines that materialize this feature.", + "description": "Notification configuration around the lifecycle of the job or pipeline that materializes\nthis feature. Features which are materialized in the same pipeline will share the same\nnotification.", "ref": "ml.MaterializationNotifications", "launch_stage": "PRIVATE_PREVIEW", "behaviors": [ - "OUTPUT_ONLY" + "OPTIONAL" ] }, "offline_store_config": { @@ -55468,7 +55454,6 @@ "ref": "postgres.BranchSpec", "launch_stage": "GA", "behaviors": [ - "INPUT_ONLY", "OPTIONAL" ] }, @@ -55525,6 +55510,7 @@ "launch_stage": "GA", "behaviors": [ "IMMUTABLE", + "INPUT_ONLY", "OPTIONAL" ] }, @@ -55533,6 +55519,7 @@ "launch_stage": "GA", "behaviors": [ "IMMUTABLE", + "INPUT_ONLY", "OPTIONAL" ] }, @@ -55541,6 +55528,7 @@ "launch_stage": "GA", "behaviors": [ "IMMUTABLE", + "INPUT_ONLY", "OPTIONAL" ] }, @@ -56342,7 +56330,6 @@ "ref": "postgres.DatabaseDatabaseSpec", "launch_stage": "GA", "behaviors": [ - "INPUT_ONLY", "OPTIONAL" ] }, @@ -56591,7 +56578,6 @@ "ref": "postgres.EndpointSpec", "launch_stage": "GA", "behaviors": [ - "INPUT_ONLY", "OPTIONAL" ] }, @@ -57781,7 +57767,6 @@ "ref": "postgres.ProjectSpec", "launch_stage": "GA", "behaviors": [ - "INPUT_ONLY", "OPTIONAL" ] }, @@ -57918,6 +57903,7 @@ "launch_stage": "GA", "behaviors": [ "IMMUTABLE", + "INPUT_ONLY", "OPTIONAL" ] } @@ -58124,7 +58110,6 @@ "ref": "postgres.RoleRoleSpec", "launch_stage": "GA", "behaviors": [ - "INPUT_ONLY", "OPTIONAL" ] }, @@ -58218,6 +58203,7 @@ "ref": "postgres.RoleAuthMethod", "launch_stage": "GA", "behaviors": [ + "INPUT_ONLY", "OPTIONAL" ] }, @@ -58226,6 +58212,7 @@ "ref": "postgres.RoleIdentityType", "launch_stage": "GA", "behaviors": [ + "INPUT_ONLY", "OPTIONAL" ] }, @@ -58240,6 +58227,7 @@ "description": "The name of the Postgres role.\n\nThis expects a valid Postgres identifier as specified in the link below.\nhttps://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS\n\nRequired when creating the Role.\n\nIf you wish to create a Postgres Role backed by a managed Databricks identity, then postgres_role\nmust be one of the following:\n\n1. user email for IdentityType.USER\n2. app ID for IdentityType.SERVICE_PRINCIPAL\n2. group name for IdentityType.GROUP\n\nThis field is set when the role is created and cannot be changed.\nWhen replacing an existing role with replace_existing=true, omit this\nfield or supply its current value. A differing value returns\nINVALID_PARAMETER_VALUE and rejects the entire request, including changes\nto mutable fields.\nWith `*` or masks containing only mutable fields, supplied values are ignored.\nIncluding this field as an explicit path in update_mask returns\nINVALID_PARAMETER_VALUE.", "launch_stage": "GA", "behaviors": [ + "INPUT_ONLY", "OPTIONAL" ] } @@ -61253,6 +61241,29 @@ } } }, + "serving.CommitmentTerm": { + "description": "The commitment term length for a Provisioned Throughput pool.", + "enum": [ + "COMMITMENT_TERM_1_MONTH", + "COMMITMENT_TERM_3_MONTHS", + "COMMITMENT_TERM_1_HOUR", + "COMMITMENT_TERM_12_HOURS", + "COMMITMENT_TERM_1_DAY", + "COMMITMENT_TERM_1_WEEK", + "COMMITMENT_TERM_6_MONTHS", + "COMMITMENT_TERM_1_YEAR" + ], + "enum_launch_stages": { + "COMMITMENT_TERM_12_HOURS": "PRIVATE_PREVIEW", + "COMMITMENT_TERM_1_DAY": "PRIVATE_PREVIEW", + "COMMITMENT_TERM_1_HOUR": "PRIVATE_PREVIEW", + "COMMITMENT_TERM_1_MONTH": "PRIVATE_PREVIEW", + "COMMITMENT_TERM_1_WEEK": "PRIVATE_PREVIEW", + "COMMITMENT_TERM_1_YEAR": "PRIVATE_PREVIEW", + "COMMITMENT_TERM_3_MONTHS": "PRIVATE_PREVIEW", + "COMMITMENT_TERM_6_MONTHS": "PRIVATE_PREVIEW" + } + }, "serving.CreatePtEndpointRequest": { "fields": { "ai_gateway": { @@ -61979,6 +61990,11 @@ "provisioned_model_units": { "description": "The number of model units to be provisioned. Dedicated inference requires positive fixed\ncapacity and does not support scale-to-zero.", "launch_stage": "PUBLIC_PREVIEW" + }, + "pt_term": { + "description": "Commitment term to purchase for this served entity; its presence marks the entity as reserved\n(vs on-demand) PT. Valid on create and on update (purchases a commitment for a scale-up).", + "ref": "serving.CommitmentTerm", + "launch_stage": "PRIVATE_PREVIEW" } } }, @@ -70400,7 +70416,7 @@ "custom_template_format": { "description": "The format used to interpret the `custom_summary` and `custom_description` templates.\n\n`HTML` treats both templates as HTML with Mustache `{{VARIABLE_NAME}}` placeholders.\n`MARKDOWN` treats them as Markdown with allowlisted `@VARIABLE_NAME` placeholders and converts\nthem to the format each notification destination expects, so a single template renders\ncorrectly in email, Slack, and Microsoft Teams.\n\nWhen unset, the API applies no default. Responses omit the field unless a format is stored,\nand a template with no format is rendered as HTML.", "ref": "sql.CustomTemplateFormat", - "launch_stage": "PUBLIC_BETA", + "launch_stage": "PUBLIC_PREVIEW", "behaviors": [ "OPTIONAL" ] @@ -71225,8 +71241,8 @@ "MARKDOWN" ], "enum_launch_stages": { - "HTML": "PUBLIC_BETA", - "MARKDOWN": "PUBLIC_BETA" + "HTML": "PUBLIC_PREVIEW", + "MARKDOWN": "PUBLIC_PREVIEW" } }, "sql.Dashboard": { @@ -75571,6 +75587,7 @@ "description": "Timestamp when the tag policy was created", "launch_stage": "GA", "behaviors": [ + "IMMUTABLE", "OUTPUT_ONLY" ] }, @@ -75583,6 +75600,7 @@ "id": { "launch_stage": "GA", "behaviors": [ + "IMMUTABLE", "OUTPUT_ONLY" ] }, @@ -144123,7 +144141,7 @@ "required_fields": [ { "name": "materialization_set", - "description": "The materialization set to create. Supply materialization_set_id to choose the identifier;\nleave it unset to have one assigned.", + "description": "The materialization set to create. Set `materialization_set_id` to\nchoose the identifier, or omit it to have one assigned.\n\nMembers with a cron schedule or table trigger must request the same\n`paused` value. An omitted `paused` defaults to `false`.\nA set can be created paused only if all members are batch materializations.", "required": true, "is_request_body_field": true, "entity": { @@ -144135,7 +144153,7 @@ "required_request_body_fields": [ { "name": "materialization_set", - "description": "The materialization set to create. Supply materialization_set_id to choose the identifier;\nleave it unset to have one assigned.", + "description": "The materialization set to create. Set `materialization_set_id` to\nchoose the identifier, or omit it to have one assigned.\n\nMembers with a cron schedule or table trigger must request the same\n`paused` value. An omitted `paused` defaults to `false`.\nA set can be created paused only if all members are batch materializations.", "required": true, "is_request_body_field": true, "entity": { @@ -144147,7 +144165,7 @@ }, "request_body_field": { "name": "materialization_set", - "description": "The materialization set to create. Supply materialization_set_id to choose the identifier;\nleave it unset to have one assigned.", + "description": "The materialization set to create. Set `materialization_set_id` to\nchoose the identifier, or omit it to have one assigned.\n\nMembers with a cron schedule or table trigger must request the same\n`paused` value. An omitted `paused` defaults to `false`.\nA set can be created paused only if all members are batch materializations.", "required": true, "is_request_body_field": true, "entity": { @@ -144162,7 +144180,7 @@ "all_fields": [ { "name": "materialization_set", - "description": "The materialization set to create. Supply materialization_set_id to choose the identifier;\nleave it unset to have one assigned.", + "description": "The materialization set to create. Set `materialization_set_id` to\nchoose the identifier, or omit it to have one assigned.\n\nMembers with a cron schedule or table trigger must request the same\n`paused` value. An omitted `paused` defaults to `false`.\nA set can be created paused only if all members are batch materializations.", "required": true, "is_request_body_field": true, "entity": { @@ -144452,8 +144470,7 @@ }, { "name": "notifications", - "description": "Notification configuration for the jobs and pipelines that materialize this feature.", - "is_output_only": true, + "description": "Notification configuration around the lifecycle of the job or pipeline that materializes\nthis feature. Features which are materialized in the same pipeline will share the same\nnotification.", "is_request_body_field": true, "is_optional_object": true, "entity": { @@ -148242,8 +148259,7 @@ }, { "name": "notifications", - "description": "Notification configuration for the jobs and pipelines that materialize this feature.", - "is_output_only": true, + "description": "Notification configuration around the lifecycle of the job or pipeline that materializes\nthis feature. Features which are materialized in the same pipeline will share the same\nnotification.", "is_request_body_field": true, "is_optional_object": true, "entity": { @@ -178583,7 +178599,7 @@ }, { "name": "runbook", - "description": "Long-form operational guidance carried from the authored rule metadata. Supports up to 4096\ncharacters. Requests exceeding this limit are rejected.", + "description": "Long-form operational guidance carried from the authored rule metadata. Supports up to 4096\ncharacters. Requests exceeding this limit are rejected. Supports Markdown; analysts and the\ninvestigation agent follow it when triaging this rule's alerts.", "is_request_body_field": true, "entity": { "is_string": true @@ -180095,22 +180111,6 @@ "is_field_mask": true } }, - { - "name": "custom_content_pack_path", - "description": "UC volume path holding user-authored custom content packs, e.g.\n`/Volumes/{catalog}/{schema}/{volume}`. User-provided with no default:\nwhen unset, custom content packs are unavailable (referencing one is\nrejected) and only built-in content packs apply.", - "is_request_body_field": true, - "entity": { - "is_string": true - } - }, - { - "name": "custom_presets_path", - "description": "UC volume path holding user-authored custom presets, e.g.\n`/Volumes/{catalog}/{schema}/{volume}`. User-provided with no default:\nwhen unset, custom presets are unavailable and only built-in presets apply.", - "is_request_body_field": true, - "entity": { - "is_string": true - } - }, { "name": "etag", "description": "Opaque entity tag for optimistic concurrency. Returned on every read;\npass it back as the Update request's `etag` to make the update\nconditional on the resource being unchanged.", @@ -181989,7 +181989,7 @@ }, { "name": "runbook", - "description": "Long-form operational guidance carried from the authored rule metadata. Supports up to 4096\ncharacters. Requests exceeding this limit are rejected.", + "description": "Long-form operational guidance carried from the authored rule metadata. Supports up to 4096\ncharacters. Requests exceeding this limit are rejected. Supports Markdown; analysts and the\ninvestigation agent follow it when triaging this rule's alerts.", "is_request_body_field": true, "entity": { "is_string": true @@ -220863,7 +220863,7 @@ }, { "name": "UpdateAccessRequestDestinations", - "description": "Updates the access request destinations for the given securable.\nThe caller must be a metastore admin, the owner of the securable, or a user that has the **MANAGE** privilege on the securable in order to assign destinations.\nA maximum of 5 emails and 5 external notification destinations (Slack, Microsoft Teams, Generic Webhook, and Databricks App Slack/Teams destinations) can be assigned to a securable.\nIf a URL destination is assigned, no other destinations can be set.\n\nThe supported securable types are: \"metastore\", \"catalog\", \"schema\", \"table\",\n\"external_location\", \"connection\", \"credential\", \"function\", \"registered_model\", and \"volume\".", + "description": "Updates the access request destinations for the given securable.\nThe caller must be a metastore admin, the owner of the securable, or a user that has the **MANAGE** privilege on the securable in order to assign destinations.\nA maximum of 5 emails and 5 external notification destinations (Slack, Microsoft Teams, Generic Webhook, Databricks App Slack/Teams, Asana, ServiceNow, and EventBridge destinations) can be assigned to a securable.\nIf a URL destination is assigned, no other destinations can be set.\n\nThe supported securable types are: \"metastore\", \"catalog\", \"schema\", \"table\",\n\"external_location\", \"connection\", \"credential\", \"function\", \"registered_model\", and \"volume\".", "summary": "Update Access Request Destinations.", "path": "/api/3.0/rfa/destinations", "can_use_json": true, diff --git a/.nextchanges/dependency-updates/go-sdk-v0.198.0.md b/.nextchanges/dependency-updates/go-sdk-v0.198.0.md new file mode 100644 index 00000000000..6526d115ab0 --- /dev/null +++ b/.nextchanges/dependency-updates/go-sdk-v0.198.0.md @@ -0,0 +1 @@ +* Update the Go SDK to [v0.198.0](https://github.com/databricks/databricks-sdk-go/releases/tag/v0.198.0). diff --git a/acceptance/bundle/deploy/readplan/postgres_role/output.txt b/acceptance/bundle/deploy/readplan/postgres_role/output.txt index 31d0e2f41a8..da63148bfb6 100644 --- a/acceptance/bundle/deploy/readplan/postgres_role/output.txt +++ b/acceptance/bundle/deploy/readplan/postgres_role/output.txt @@ -24,7 +24,10 @@ Resources: 3 created, 0 changed, 0 deleted, 0 unchanged } >>> [CLI] bundle plan -Plan: 0 to add, 0 to change, 0 to delete, 3 unchanged +update postgres_branches.branch +update postgres_projects.project + +Plan: 0 to add, 2 to change, 0 to delete, 1 unchanged >>> [CLI] bundle destroy --auto-approve The following resources will be deleted: diff --git a/acceptance/bundle/invariant/no_drift/output.txt b/acceptance/bundle/invariant/no_drift/output.txt index 7a28cb73a58..6cc151fd196 100644 --- a/acceptance/bundle/invariant/no_drift/output.txt +++ b/acceptance/bundle/invariant/no_drift/output.txt @@ -1 +1,132 @@ INPUT_CONFIG_OK +Unexpected action='update' for resources.postgres_branches.branch +Unexpected action='update' for resources.postgres_projects.project +{ + "plan_version": [PLAN_VERSION], + "cli_version": "[CLI_VERSION]", + "lineage": "[UUID][0]", + "serial": 1, + "features": { + "deployment_history_shadow": {} + }, + "plan": { + "resources.postgres_branches.branch": { + "depends_on": [ + { + "node": "resources.postgres_projects.project", + "label": "${resources.postgres_projects.project.name}" + } + ], + "action": "update", + "new_state": { + "value": { + "branch_id": "test-branch-[UNIQUE_NAME]", + "no_expiry": true, + "parent": "projects/test-pg-project-[UNIQUE_NAME]" + } + }, + "remote_state": { + "branch_id": "test-branch-[UNIQUE_NAME]", + "create_time": "[TIMESTAMP]", + "name": "projects/test-pg-project-[UNIQUE_NAME]/branches/test-branch-[UNIQUE_NAME]", + "parent": "projects/test-pg-project-[UNIQUE_NAME]", + "status": { + "branch_id": "test-branch-[UNIQUE_NAME]", + "current_state": "READY", + "default": false, + "is_protected": false, + "logical_size_bytes": 0, + "source_branch": "projects/test-pg-project-[UNIQUE_NAME]/branches/production", + "source_branch_lsn": "0/0", + "source_branch_time": "[TIMESTAMP]", + "state_change_time": "[TIMESTAMP]" + }, + "uid": "br-7a0c2f5f-5ad9-beda-7", + "update_time": "[TIMESTAMP]" + }, + "changes": { + "no_expiry": { + "action": "update", + "old": true, + "new": true + } + } + }, + "resources.postgres_projects.project": { + "action": "update", + "new_state": { + "value": { + "display_name": "Test Postgres Project", + "project_id": "test-pg-project-[UNIQUE_NAME]" + } + }, + "remote_state": { + "create_time": "[TIMESTAMP]", + "name": "projects/test-pg-project-[UNIQUE_NAME]", + "project_id": "test-pg-project-[UNIQUE_NAME]", + "status": { + "branch_logical_size_limit_bytes": 8796093022208, + "default_branch": "projects/test-pg-project-[UNIQUE_NAME]/branches/production", + "default_endpoint_settings": { + "autoscaling_limit_max_cu": 1, + "autoscaling_limit_min_cu": 1, + "suspend_timeout_duration": "86400s" + }, + "display_name": "Test Postgres Project", + "enable_pg_native_login": false, + "history_retention_duration": "604800s", + "owner": "[USERNAME]", + "project_id": "test-pg-project-[UNIQUE_NAME]", + "synthetic_storage_size_bytes": 0 + }, + "uid": "[UUID][1]", + "update_time": "[TIMESTAMP]" + }, + "changes": { + "display_name": { + "action": "update", + "old": "Test Postgres Project", + "new": "Test Postgres Project" + } + } + }, + "resources.postgres_roles.foo": { + "depends_on": [ + { + "node": "resources.postgres_branches.branch", + "label": "${resources.postgres_branches.branch.name}" + } + ], + "action": "skip", + "remote_state": { + "create_time": "[TIMESTAMP]", + "name": "projects/test-pg-project-[UNIQUE_NAME]/branches/test-branch-[UNIQUE_NAME]/roles/test-role-[UNIQUE_NAME]", + "parent": "projects/test-pg-project-[UNIQUE_NAME]/branches/test-branch-[UNIQUE_NAME]", + "role_id": "test-role-[UNIQUE_NAME]", + "status": { + "attributes": { + "bypassrls": false, + "createdb": false, + "createrole": false + }, + "auth_method": "PG_PASSWORD_SCRAM_SHA_256", + "identity_type": "IDENTITY_TYPE_UNSPECIFIED", + "postgres_role": "app_role", + "role_id": "test-role-[UNIQUE_NAME]" + }, + "update_time": "[TIMESTAMP]" + }, + "changes": { + "postgres_role": { + "action": "skip", + "reason": "spec:input_only", + "old": "app_role", + "new": "app_role" + } + } + } + } +} + + +Exit code: 10 diff --git a/acceptance/bundle/resources/postgres_branches/purge_on_delete_transitions/output.txt b/acceptance/bundle/resources/postgres_branches/purge_on_delete_transitions/output.txt index 6df440d7033..dd182f71605 100644 --- a/acceptance/bundle/resources/postgres_branches/purge_on_delete_transitions/output.txt +++ b/acceptance/bundle/resources/postgres_branches/purge_on_delete_transitions/output.txt @@ -16,8 +16,9 @@ Resources: 2 created, 0 changed, 0 deleted, 0 unchanged >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/pg-branch-purge-transitions-[UNIQUE_NAME]/default/files... Updated postgres_branches.branch +Updated postgres_projects.proj Files: 0 uploaded, 0 deleted -Resources: 0 created, 1 changed, 0 deleted, 1 unchanged +Resources: 0 created, 2 changed, 0 deleted, 0 unchanged >>> get_purge json.state.resources.postgres_branches.branch.state.purge_on_delete = true; @@ -27,8 +28,9 @@ json.state.resources.postgres_branches.branch.state.purge_on_delete = true; >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/pg-branch-purge-transitions-[UNIQUE_NAME]/default/files... Updated postgres_branches.branch +Updated postgres_projects.proj Files: 0 uploaded, 0 deleted -Resources: 0 created, 1 changed, 0 deleted, 1 unchanged +Resources: 0 created, 2 changed, 0 deleted, 0 unchanged >>> get_purge json.state.resources.postgres_branches.branch.state.purge_on_delete = false; @@ -38,8 +40,9 @@ json.state.resources.postgres_branches.branch.state.purge_on_delete = false; >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/pg-branch-purge-transitions-[UNIQUE_NAME]/default/files... Updated postgres_branches.branch +Updated postgres_projects.proj Files: 0 uploaded, 0 deleted -Resources: 0 created, 1 changed, 0 deleted, 1 unchanged +Resources: 0 created, 2 changed, 0 deleted, 0 unchanged >>> get_purge (unset) diff --git a/acceptance/bundle/resources/postgres_branches/recreate/out.plan.txt b/acceptance/bundle/resources/postgres_branches/recreate/out.plan.txt index c1d5449fc52..e22f402e63b 100644 --- a/acceptance/bundle/resources/postgres_branches/recreate/out.plan.txt +++ b/acceptance/bundle/resources/postgres_branches/recreate/out.plan.txt @@ -1,3 +1,4 @@ recreate postgres_branches.main +update postgres_projects.my_project -Plan: 1 to add, 0 to change, 1 to delete, 1 unchanged +Plan: 1 to add, 1 to change, 1 to delete, 0 unchanged diff --git a/acceptance/bundle/resources/postgres_branches/recreate/out.requests.update.txt b/acceptance/bundle/resources/postgres_branches/recreate/out.requests.update.txt index 2982e29445d..d079aa04877 100644 --- a/acceptance/bundle/resources/postgres_branches/recreate/out.requests.update.txt +++ b/acceptance/bundle/resources/postgres_branches/recreate/out.requests.update.txt @@ -1,3 +1,22 @@ +{ + "method": "PATCH", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", + "q": { + "update_mask": "spec.default_endpoint_settings,spec.display_name,spec.history_retention_duration" + }, + "body": { + "spec": { + "default_endpoint_settings": { + "autoscaling_limit_max_cu": 4, + "autoscaling_limit_min_cu": 0.5, + "suspend_timeout_duration": "300s" + }, + "display_name": "Test Project", + "history_retention_duration": "604800s", + "pg_version": 16 + } + } +} { "method": "DELETE", "path": "/api/2.0/postgres/[MAIN_ID]" diff --git a/acceptance/bundle/resources/postgres_branches/recreate/output.txt b/acceptance/bundle/resources/postgres_branches/recreate/output.txt index 2ff2198bb26..39b4d02bd63 100644 --- a/acceptance/bundle/resources/postgres_branches/recreate/output.txt +++ b/acceptance/bundle/resources/postgres_branches/recreate/output.txt @@ -71,8 +71,9 @@ This action will result in the deletion or recreation of the following Lakebase All data stored in them will be permanently lost: recreate resources.postgres_branches.main Recreated postgres_branches.main +Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 1 created, 0 changed, 1 deleted, 1 unchanged +Resources: 1 created, 1 changed, 1 deleted, 0 unchanged === Fetch new branch ID diff --git a/acceptance/bundle/resources/postgres_branches/recreate_source_branch_time/out.plan.json b/acceptance/bundle/resources/postgres_branches/recreate_source_branch_time/out.plan.json index b3ad19c1b68..ce7b9736180 100644 --- a/acceptance/bundle/resources/postgres_branches/recreate_source_branch_time/out.plan.json +++ b/acceptance/bundle/resources/postgres_branches/recreate_source_branch_time/out.plan.json @@ -2,8 +2,7 @@ "action": "recreate", "changes": { "no_expiry": { - "action": "skip", - "reason": "spec:input_only", + "action": "update", "old": true, "new": true }, diff --git a/acceptance/bundle/resources/postgres_branches/recreate_source_branch_time/out.requests.json b/acceptance/bundle/resources/postgres_branches/recreate_source_branch_time/out.requests.json index 453d1483684..d11652fc974 100644 --- a/acceptance/bundle/resources/postgres_branches/recreate_source_branch_time/out.requests.json +++ b/acceptance/bundle/resources/postgres_branches/recreate_source_branch_time/out.requests.json @@ -2,6 +2,19 @@ "method": "DELETE", "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/dev-branch" } +{ + "method": "PATCH", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", + "q": { + "update_mask": "spec.display_name" + }, + "body": { + "spec": { + "display_name": "Test Project for Branch Fork Point", + "pg_version": 16 + } + } +} { "method": "POST", "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches", diff --git a/acceptance/bundle/resources/postgres_branches/recreate_source_branch_time/output.txt b/acceptance/bundle/resources/postgres_branches/recreate_source_branch_time/output.txt index cd51e2ca2f8..7c54d1f8447 100644 --- a/acceptance/bundle/resources/postgres_branches/recreate_source_branch_time/output.txt +++ b/acceptance/bundle/resources/postgres_branches/recreate_source_branch_time/output.txt @@ -14,8 +14,9 @@ Resources: 2 created, 0 changed, 0 deleted, 0 unchanged >>> [CLI] bundle plan recreate postgres_branches.dev_branch +update postgres_projects.my_project -Plan: 1 to add, 0 to change, 1 to delete, 1 unchanged +Plan: 1 to add, 1 to change, 1 to delete, 0 unchanged >>> [CLI] bundle plan -o json @@ -26,8 +27,9 @@ This action will result in the deletion or recreation of the following Lakebase All data stored in them will be permanently lost: recreate resources.postgres_branches.dev_branch Recreated postgres_branches.dev_branch +Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 1 created, 0 changed, 1 deleted, 1 unchanged +Resources: 1 created, 1 changed, 1 deleted, 0 unchanged >>> print_requests.py --del-body project_id,branch_id --sort //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/ diff --git a/acceptance/bundle/resources/postgres_branches/update_expire_time/out.requests.json b/acceptance/bundle/resources/postgres_branches/update_expire_time/out.requests.json index 4d9bc1cbd89..a7893934be1 100644 --- a/acceptance/bundle/resources/postgres_branches/update_expire_time/out.requests.json +++ b/acceptance/bundle/resources/postgres_branches/update_expire_time/out.requests.json @@ -1,3 +1,16 @@ +{ + "method": "PATCH", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", + "q": { + "update_mask": "spec.display_name" + }, + "body": { + "spec": { + "display_name": "Test Project for Branch Expire Update", + "pg_version": 16 + } + } +} { "method": "PATCH", "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/dev-branch", diff --git a/acceptance/bundle/resources/postgres_branches/update_expire_time/output.txt b/acceptance/bundle/resources/postgres_branches/update_expire_time/output.txt index 8519e1e90a7..9326d89e3c4 100644 --- a/acceptance/bundle/resources/postgres_branches/update_expire_time/output.txt +++ b/acceptance/bundle/resources/postgres_branches/update_expire_time/output.txt @@ -33,16 +33,18 @@ Resources: 2 created, 0 changed, 0 deleted, 0 unchanged >>> [CLI] bundle plan update postgres_branches.dev_branch +update postgres_projects.my_project -Plan: 0 to add, 1 to change, 0 to delete, 1 unchanged +Plan: 0 to add, 2 to change, 0 to delete, 0 unchanged >>> [CLI] bundle plan -o json >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/update-postgres-branch-expire-[UNIQUE_NAME]/default/files... Updated postgres_branches.dev_branch +Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 0 created, 1 changed, 0 deleted, 1 unchanged +Resources: 0 created, 2 changed, 0 deleted, 0 unchanged >>> print_requests.py --del-body project_id,branch_id --sort //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/ diff --git a/acceptance/bundle/resources/postgres_branches/update_protected/out.plan.no_change.json b/acceptance/bundle/resources/postgres_branches/update_protected/out.plan.no_change.json index ff7df005d4e..c5316237ed0 100644 --- a/acceptance/bundle/resources/postgres_branches/update_protected/out.plan.no_change.json +++ b/acceptance/bundle/resources/postgres_branches/update_protected/out.plan.no_change.json @@ -5,7 +5,15 @@ "label": "${resources.postgres_projects.my_project.id}" } ], - "action": "skip", + "action": "update", + "new_state": { + "value": { + "branch_id": "dev-branch", + "is_protected": false, + "no_expiry": true, + "parent": "projects/test-pg-proj-[UNIQUE_NAME]" + } + }, "remote_state": { "branch_id": "dev-branch", "create_time": "[TIMESTAMP]", @@ -32,8 +40,7 @@ "new": false }, "no_expiry": { - "action": "skip", - "reason": "spec:input_only", + "action": "update", "old": true, "new": true } diff --git a/acceptance/bundle/resources/postgres_branches/update_protected/out.plan.restore.json b/acceptance/bundle/resources/postgres_branches/update_protected/out.plan.restore.json index 64acdc88a68..4efdfebed96 100644 --- a/acceptance/bundle/resources/postgres_branches/update_protected/out.plan.restore.json +++ b/acceptance/bundle/resources/postgres_branches/update_protected/out.plan.restore.json @@ -39,8 +39,7 @@ "new": false }, "no_expiry": { - "action": "skip", - "reason": "spec:input_only", + "action": "update", "old": true, "new": true } diff --git a/acceptance/bundle/resources/postgres_branches/update_protected/out.plan.update.json b/acceptance/bundle/resources/postgres_branches/update_protected/out.plan.update.json index 6cc645dede6..3cb468a365e 100644 --- a/acceptance/bundle/resources/postgres_branches/update_protected/out.plan.update.json +++ b/acceptance/bundle/resources/postgres_branches/update_protected/out.plan.update.json @@ -39,8 +39,7 @@ "new": true }, "no_expiry": { - "action": "skip", - "reason": "spec:input_only", + "action": "update", "old": true, "new": true } diff --git a/acceptance/bundle/resources/postgres_branches/update_protected/out.requests.no_change.json b/acceptance/bundle/resources/postgres_branches/update_protected/out.requests.no_change.json index ec79362ac2a..abe9533afe1 100644 --- a/acceptance/bundle/resources/postgres_branches/update_protected/out.requests.no_change.json +++ b/acceptance/bundle/resources/postgres_branches/update_protected/out.requests.no_change.json @@ -7,6 +7,34 @@ "path": "/api/2.0/postgres/[DEV_BRANCH_ID]" } { - "method": "GET", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]" + "method": "PATCH", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", + "q": { + "update_mask": "spec.default_endpoint_settings,spec.display_name,spec.history_retention_duration" + }, + "body": { + "spec": { + "default_endpoint_settings": { + "autoscaling_limit_max_cu": 4, + "autoscaling_limit_min_cu": 0.5, + "suspend_timeout_duration": "300s" + }, + "display_name": "Test Project for Branch Update", + "history_retention_duration": "604800s", + "pg_version": 16 + } + } +} +{ + "method": "PATCH", + "path": "/api/2.0/postgres/[DEV_BRANCH_ID]", + "q": { + "update_mask": "spec.expiration" + }, + "body": { + "spec": { + "is_protected": false, + "no_expiry": true + } + } } diff --git a/acceptance/bundle/resources/postgres_branches/update_protected/out.requests.restore.json b/acceptance/bundle/resources/postgres_branches/update_protected/out.requests.restore.json index ea3e9b584ec..010bdeffcb8 100644 --- a/acceptance/bundle/resources/postgres_branches/update_protected/out.requests.restore.json +++ b/acceptance/bundle/resources/postgres_branches/update_protected/out.requests.restore.json @@ -7,14 +7,29 @@ "path": "/api/2.0/postgres/[DEV_BRANCH_ID]" } { - "method": "GET", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]" + "method": "PATCH", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", + "q": { + "update_mask": "spec.default_endpoint_settings,spec.display_name,spec.history_retention_duration" + }, + "body": { + "spec": { + "default_endpoint_settings": { + "autoscaling_limit_max_cu": 4, + "autoscaling_limit_min_cu": 0.5, + "suspend_timeout_duration": "300s" + }, + "display_name": "Test Project for Branch Update", + "history_retention_duration": "604800s", + "pg_version": 16 + } + } } { "method": "PATCH", "path": "/api/2.0/postgres/[DEV_BRANCH_ID]", "q": { - "update_mask": "spec.is_protected" + "update_mask": "spec.expiration,spec.is_protected" }, "body": { "spec": { diff --git a/acceptance/bundle/resources/postgres_branches/update_protected/out.requests.update.json b/acceptance/bundle/resources/postgres_branches/update_protected/out.requests.update.json index d7260bafe65..a7030e635a2 100644 --- a/acceptance/bundle/resources/postgres_branches/update_protected/out.requests.update.json +++ b/acceptance/bundle/resources/postgres_branches/update_protected/out.requests.update.json @@ -7,14 +7,29 @@ "path": "/api/2.0/postgres/[DEV_BRANCH_ID]" } { - "method": "GET", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]" + "method": "PATCH", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", + "q": { + "update_mask": "spec.default_endpoint_settings,spec.display_name,spec.history_retention_duration" + }, + "body": { + "spec": { + "default_endpoint_settings": { + "autoscaling_limit_max_cu": 4, + "autoscaling_limit_min_cu": 0.5, + "suspend_timeout_duration": "300s" + }, + "display_name": "Test Project for Branch Update", + "history_retention_duration": "604800s", + "pg_version": 16 + } + } } { "method": "PATCH", "path": "/api/2.0/postgres/[DEV_BRANCH_ID]", "q": { - "update_mask": "spec.is_protected" + "update_mask": "spec.expiration,spec.is_protected" }, "body": { "spec": { diff --git a/acceptance/bundle/resources/postgres_branches/update_protected/output.txt b/acceptance/bundle/resources/postgres_branches/update_protected/output.txt index 9ac72b133b5..03052d471ef 100644 --- a/acceptance/bundle/resources/postgres_branches/update_protected/output.txt +++ b/acceptance/bundle/resources/postgres_branches/update_protected/output.txt @@ -48,14 +48,19 @@ Resources: 2 created, 0 changed, 0 deleted, 0 unchanged === Verify no_change (no changes) >>> [CLI] bundle plan -Plan: 0 to add, 0 to change, 0 to delete, 2 unchanged +update postgres_branches.dev_branch +update postgres_projects.my_project + +Plan: 0 to add, 2 to change, 0 to delete, 0 unchanged >>> [CLI] bundle plan -o json >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/update-postgres-branch-[UNIQUE_NAME]/default/files... +Updated postgres_branches.dev_branch +Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 0 created, 0 changed, 0 deleted, 2 unchanged +Resources: 0 created, 2 changed, 0 deleted, 0 unchanged >>> print_requests.py --del-body project_id,branch_id,endpoint_id,database_id,role_id,catalog_id,synced_table_id --keep --get //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/ @@ -91,16 +96,18 @@ resources: >>> [CLI] bundle plan update postgres_branches.dev_branch +update postgres_projects.my_project -Plan: 0 to add, 1 to change, 0 to delete, 1 unchanged +Plan: 0 to add, 2 to change, 0 to delete, 0 unchanged >>> [CLI] bundle plan -o json >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/update-postgres-branch-[UNIQUE_NAME]/default/files... Updated postgres_branches.dev_branch +Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 0 created, 1 changed, 0 deleted, 1 unchanged +Resources: 0 created, 2 changed, 0 deleted, 0 unchanged >>> print_requests.py --del-body project_id,branch_id,endpoint_id,database_id,role_id,catalog_id,synced_table_id --keep --get //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/ @@ -128,16 +135,18 @@ Resources: 0 created, 1 changed, 0 deleted, 1 unchanged >>> [CLI] bundle plan update postgres_branches.dev_branch +update postgres_projects.my_project -Plan: 0 to add, 1 to change, 0 to delete, 1 unchanged +Plan: 0 to add, 2 to change, 0 to delete, 0 unchanged >>> [CLI] bundle plan -o json >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/update-postgres-branch-[UNIQUE_NAME]/default/files... Updated postgres_branches.dev_branch +Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 0 created, 1 changed, 0 deleted, 1 unchanged +Resources: 0 created, 2 changed, 0 deleted, 0 unchanged >>> print_requests.py --del-body project_id,branch_id,endpoint_id,database_id,role_id,catalog_id,synced_table_id --keep --get //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/ diff --git a/acceptance/bundle/resources/postgres_branches/update_ttl/out.requests.json b/acceptance/bundle/resources/postgres_branches/update_ttl/out.requests.json index 433fadb089e..0aaa62568fc 100644 --- a/acceptance/bundle/resources/postgres_branches/update_ttl/out.requests.json +++ b/acceptance/bundle/resources/postgres_branches/update_ttl/out.requests.json @@ -1,3 +1,16 @@ +{ + "method": "PATCH", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", + "q": { + "update_mask": "spec.display_name" + }, + "body": { + "spec": { + "display_name": "Test Project for Branch TTL Update", + "pg_version": 16 + } + } +} { "method": "PATCH", "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/dev-branch", diff --git a/acceptance/bundle/resources/postgres_branches/update_ttl/output.txt b/acceptance/bundle/resources/postgres_branches/update_ttl/output.txt index fb31167f31e..f9a86b110d9 100644 --- a/acceptance/bundle/resources/postgres_branches/update_ttl/output.txt +++ b/acceptance/bundle/resources/postgres_branches/update_ttl/output.txt @@ -14,16 +14,18 @@ Resources: 2 created, 0 changed, 0 deleted, 0 unchanged >>> [CLI] bundle plan update postgres_branches.dev_branch +update postgres_projects.my_project -Plan: 0 to add, 1 to change, 0 to delete, 1 unchanged +Plan: 0 to add, 2 to change, 0 to delete, 0 unchanged >>> [CLI] bundle plan -o json >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/update-postgres-branch-ttl-[UNIQUE_NAME]/default/files... Updated postgres_branches.dev_branch +Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 0 created, 1 changed, 0 deleted, 1 unchanged +Resources: 0 created, 2 changed, 0 deleted, 0 unchanged >>> print_requests.py --del-body project_id,branch_id --sort //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/ diff --git a/acceptance/bundle/resources/postgres_catalogs/recreate/output.txt b/acceptance/bundle/resources/postgres_catalogs/recreate/output.txt index 97ce24003be..150f5600232 100644 --- a/acceptance/bundle/resources/postgres_catalogs/recreate/output.txt +++ b/acceptance/bundle/resources/postgres_catalogs/recreate/output.txt @@ -8,14 +8,10 @@ Resources: 2 created, 0 changed, 0 deleted, 0 unchanged >>> [CLI] bundle plan recreate postgres_catalogs.my_catalog +update postgres_projects.my_project -Plan: 1 to add, 0 to change, 1 to delete, 1 unchanged - ->>> [CLI] bundle deploy -Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/recreate-postgres-catalog-[UNIQUE_NAME]/default/files... -Recreated postgres_catalogs.my_catalog -Files: 0 uploaded, 0 deleted -Resources: 1 created, 0 changed, 1 deleted, 1 unchanged +Plan: 1 to add, 1 to change, 1 to delete, 0 unchanged +contains error: 'Plan: 1 to add, 0 to change, 1 to delete, 1 unchanged' not found in the output. >>> [CLI] bundle destroy --auto-approve The following resources will be deleted: @@ -29,3 +25,5 @@ all their branches, databases, and endpoints. All data stored in them will be pe All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/recreate-postgres-catalog-[UNIQUE_NAME]/default Destroy: 2 deleted + +Exit code: 1 diff --git a/acceptance/bundle/resources/postgres_data_apis/basic/out.requests.remove.json b/acceptance/bundle/resources/postgres_data_apis/basic/out.requests.remove.json index 9d3a7aaf9da..6115c99e64c 100644 --- a/acceptance/bundle/resources/postgres_data_apis/basic/out.requests.remove.json +++ b/acceptance/bundle/resources/postgres_data_apis/basic/out.requests.remove.json @@ -2,3 +2,41 @@ "method": "DELETE", "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/production/databases/my-database/data-api" } +{ + "method": "PATCH", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", + "q": { + "update_mask": "spec.display_name" + }, + "body": { + "spec": { + "display_name": "Test Project for Data API", + "pg_version": 16 + } + } +} +{ + "method": "PATCH", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/production", + "q": { + "update_mask": "spec.expiration" + }, + "body": { + "spec": { + "no_expiry": true + } + } +} +{ + "method": "PATCH", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/production/databases/my-database", + "q": { + "update_mask": "spec.postgres_database,spec.role" + }, + "body": { + "spec": { + "postgres_database": "app_db", + "role": "projects/test-pg-proj-[UNIQUE_NAME]/branches/production/roles/app-owner" + } + } +} diff --git a/acceptance/bundle/resources/postgres_data_apis/basic/output.txt b/acceptance/bundle/resources/postgres_data_apis/basic/output.txt index a8ee6145b38..e48ce30d216 100644 --- a/acceptance/bundle/resources/postgres_data_apis/basic/output.txt +++ b/acceptance/bundle/resources/postgres_data_apis/basic/output.txt @@ -93,20 +93,30 @@ Resources: === Plan after deploy shows no changes >>> [CLI] bundle plan -Plan: 0 to add, 0 to change, 0 to delete, 5 unchanged +update postgres_branches.production +update postgres_databases.my_database +update postgres_projects.my_project + +Plan: 0 to add, 3 to change, 0 to delete, 2 unchanged === Removing the resource turns off the Data API but keeps the database >>> [CLI] bundle plan +update postgres_branches.production delete postgres_data_apis.my_data_api +update postgres_databases.my_database +update postgres_projects.my_project -Plan: 0 to add, 0 to change, 1 to delete, 4 unchanged +Plan: 0 to add, 3 to change, 1 to delete, 1 unchanged >>> [CLI] bundle deploy --auto-approve Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/deploy-pg-data-api-[UNIQUE_NAME]/default/files... Deleted postgres_data_apis.my_data_api +Updated postgres_branches.production +Updated postgres_databases.my_database +Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 0 created, 0 changed, 1 deleted, 4 unchanged +Resources: 0 created, 3 changed, 1 deleted, 1 unchanged >>> musterr [CLI] postgres get-data-api projects/test-pg-proj-[UNIQUE_NAME]/branches/production/databases/my-database/data-api Error: Data API is not enabled for this database diff --git a/acceptance/bundle/resources/postgres_data_apis/out-of-band/output.txt b/acceptance/bundle/resources/postgres_data_apis/out-of-band/output.txt index ccaa335d2af..a3950a7af6d 100644 --- a/acceptance/bundle/resources/postgres_data_apis/out-of-band/output.txt +++ b/acceptance/bundle/resources/postgres_data_apis/out-of-band/output.txt @@ -46,15 +46,21 @@ Resources: 5 created, 0 changed, 0 deleted, 0 unchanged === Plan detects the change from status, and deploy restores the config >>> [CLI] bundle plan +update postgres_branches.production update postgres_data_apis.my_data_api +update postgres_databases.my_database +update postgres_projects.my_project -Plan: 0 to add, 1 to change, 0 to delete, 4 unchanged +Plan: 0 to add, 4 to change, 0 to delete, 1 unchanged >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/oob-pg-data-api-[UNIQUE_NAME]/default/files... +Updated postgres_branches.production Updated postgres_data_apis.my_data_api +Updated postgres_databases.my_database +Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 0 created, 1 changed, 0 deleted, 4 unchanged +Resources: 0 created, 4 changed, 0 deleted, 1 unchanged >>> [CLI] postgres get-data-api projects/test-pg-proj-[UNIQUE_NAME]/branches/production/databases/my-database/data-api { @@ -72,7 +78,11 @@ Resources: 0 created, 1 changed, 0 deleted, 4 unchanged } >>> [CLI] bundle plan -Plan: 0 to add, 0 to change, 0 to delete, 5 unchanged +update postgres_branches.production +update postgres_databases.my_database +update postgres_projects.my_project + +Plan: 0 to add, 3 to change, 0 to delete, 2 unchanged === Disable the Data API out of band @@ -81,15 +91,21 @@ Plan: 0 to add, 0 to change, 0 to delete, 5 unchanged === Plan detects the Data API is gone and re-creates it >>> [CLI] bundle plan +update postgres_branches.production create postgres_data_apis.my_data_api +update postgres_databases.my_database +update postgres_projects.my_project -Plan: 1 to add, 0 to change, 0 to delete, 4 unchanged +Plan: 1 to add, 3 to change, 0 to delete, 1 unchanged >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/oob-pg-data-api-[UNIQUE_NAME]/default/files... Created postgres_data_apis.my_data_api +Updated postgres_branches.production +Updated postgres_databases.my_database +Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 1 created, 0 changed, 0 deleted, 4 unchanged +Resources: 1 created, 3 changed, 0 deleted, 1 unchanged >>> [CLI] postgres get-data-api projects/test-pg-proj-[UNIQUE_NAME]/branches/production/databases/my-database/data-api { diff --git a/acceptance/bundle/resources/postgres_data_apis/recreate/out.requests.recreate.json b/acceptance/bundle/resources/postgres_data_apis/recreate/out.requests.recreate.json index 33930f3cd6c..5f0d2956aef 100644 --- a/acceptance/bundle/resources/postgres_data_apis/recreate/out.requests.recreate.json +++ b/acceptance/bundle/resources/postgres_data_apis/recreate/out.requests.recreate.json @@ -1,3 +1,54 @@ +{ + "method": "PATCH", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", + "q": { + "update_mask": "spec.display_name" + }, + "body": { + "spec": { + "display_name": "Test Project for Data API Recreate", + "pg_version": 16 + } + } +} +{ + "method": "PATCH", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/production", + "q": { + "update_mask": "spec.expiration" + }, + "body": { + "spec": { + "no_expiry": true + } + } +} +{ + "method": "PATCH", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/production/databases/first-database", + "q": { + "update_mask": "spec.postgres_database,spec.role" + }, + "body": { + "spec": { + "postgres_database": "first_db", + "role": "projects/test-pg-proj-[UNIQUE_NAME]/branches/production/roles/app-owner" + } + } +} +{ + "method": "PATCH", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/production/databases/second-database", + "q": { + "update_mask": "spec.postgres_database,spec.role" + }, + "body": { + "spec": { + "postgres_database": "second_db", + "role": "projects/test-pg-proj-[UNIQUE_NAME]/branches/production/roles/app-owner" + } + } +} { "method": "DELETE", "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/production/databases/first-database/data-api" diff --git a/acceptance/bundle/resources/postgres_data_apis/recreate/output.txt b/acceptance/bundle/resources/postgres_data_apis/recreate/output.txt index 65346bbb2df..e61fc95525d 100644 --- a/acceptance/bundle/resources/postgres_data_apis/recreate/output.txt +++ b/acceptance/bundle/resources/postgres_data_apis/recreate/output.txt @@ -32,15 +32,23 @@ Resources: 6 created, 0 changed, 0 deleted, 0 unchanged >>> update_file.py databricks.yml postgres_databases.first.name postgres_databases.second.name >>> [CLI] bundle plan +update postgres_branches.production recreate postgres_data_apis.my_data_api +update postgres_databases.first +update postgres_databases.second +update postgres_projects.my_project -Plan: 1 to add, 0 to change, 1 to delete, 5 unchanged +Plan: 1 to add, 4 to change, 1 to delete, 1 unchanged >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/recreate-pg-data-api-[UNIQUE_NAME]/default/files... Recreated postgres_data_apis.my_data_api +Updated postgres_branches.production +Updated postgres_databases.first +Updated postgres_databases.second +Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 1 created, 0 changed, 1 deleted, 5 unchanged +Resources: 1 created, 4 changed, 1 deleted, 1 unchanged >>> musterr [CLI] postgres get-data-api projects/test-pg-proj-[UNIQUE_NAME]/branches/production/databases/first-database/data-api Error: Data API is not enabled for this database diff --git a/acceptance/bundle/resources/postgres_data_apis/update/out.requests.remove_field.json b/acceptance/bundle/resources/postgres_data_apis/update/out.requests.remove_field.json index 615bb91c67f..dbebee01327 100644 --- a/acceptance/bundle/resources/postgres_data_apis/update/out.requests.remove_field.json +++ b/acceptance/bundle/resources/postgres_data_apis/update/out.requests.remove_field.json @@ -1,3 +1,41 @@ +{ + "method": "PATCH", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", + "q": { + "update_mask": "spec.display_name" + }, + "body": { + "spec": { + "display_name": "Test Project for Data API Update", + "pg_version": 16 + } + } +} +{ + "method": "PATCH", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/production", + "q": { + "update_mask": "spec.expiration" + }, + "body": { + "spec": { + "no_expiry": true + } + } +} +{ + "method": "PATCH", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/production/databases/my-database", + "q": { + "update_mask": "spec.postgres_database,spec.role" + }, + "body": { + "spec": { + "postgres_database": "app_db", + "role": "projects/test-pg-proj-[UNIQUE_NAME]/branches/production/roles/app-owner" + } + } +} { "method": "PATCH", "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/production/databases/my-database/data-api", diff --git a/acceptance/bundle/resources/postgres_data_apis/update/out.requests.update.json b/acceptance/bundle/resources/postgres_data_apis/update/out.requests.update.json index 8affc021c9e..1aa0a0d23b8 100644 --- a/acceptance/bundle/resources/postgres_data_apis/update/out.requests.update.json +++ b/acceptance/bundle/resources/postgres_data_apis/update/out.requests.update.json @@ -1,3 +1,41 @@ +{ + "method": "PATCH", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", + "q": { + "update_mask": "spec.display_name" + }, + "body": { + "spec": { + "display_name": "Test Project for Data API Update", + "pg_version": 16 + } + } +} +{ + "method": "PATCH", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/production", + "q": { + "update_mask": "spec.expiration" + }, + "body": { + "spec": { + "no_expiry": true + } + } +} +{ + "method": "PATCH", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/production/databases/my-database", + "q": { + "update_mask": "spec.postgres_database,spec.role" + }, + "body": { + "spec": { + "postgres_database": "app_db", + "role": "projects/test-pg-proj-[UNIQUE_NAME]/branches/production/roles/app-owner" + } + } +} { "method": "PATCH", "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/production/databases/my-database/data-api", diff --git a/acceptance/bundle/resources/postgres_data_apis/update/output.txt b/acceptance/bundle/resources/postgres_data_apis/update/output.txt index 0b0e758cea9..c816583d0d4 100644 --- a/acceptance/bundle/resources/postgres_data_apis/update/output.txt +++ b/acceptance/bundle/resources/postgres_data_apis/update/output.txt @@ -16,17 +16,23 @@ Resources: 5 created, 0 changed, 0 deleted, 0 unchanged >>> update_file.py databricks.yml db_max_rows: 100 db_max_rows: 500 >>> [CLI] bundle plan +update postgres_branches.production update postgres_data_apis.my_data_api +update postgres_databases.my_database +update postgres_projects.my_project -Plan: 0 to add, 1 to change, 0 to delete, 4 unchanged +Plan: 0 to add, 4 to change, 0 to delete, 1 unchanged >>> [CLI] bundle plan -o json >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/update-pg-data-api-[UNIQUE_NAME]/default/files... +Updated postgres_branches.production Updated postgres_data_apis.my_data_api +Updated postgres_databases.my_database +Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 0 created, 1 changed, 0 deleted, 4 unchanged +Resources: 0 created, 4 changed, 0 deleted, 1 unchanged >>> [CLI] postgres get-data-api projects/test-pg-proj-[UNIQUE_NAME]/branches/production/databases/my-database/data-api { @@ -46,15 +52,21 @@ Resources: 0 created, 1 changed, 0 deleted, 4 unchanged === Remove a spec field: update_mask=spec keeps a field the request omits, so it keeps its last value >>> [CLI] bundle plan +update postgres_branches.production update postgres_data_apis.my_data_api +update postgres_databases.my_database +update postgres_projects.my_project -Plan: 0 to add, 1 to change, 0 to delete, 4 unchanged +Plan: 0 to add, 4 to change, 0 to delete, 1 unchanged >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/update-pg-data-api-[UNIQUE_NAME]/default/files... +Updated postgres_branches.production Updated postgres_data_apis.my_data_api +Updated postgres_databases.my_database +Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 0 created, 1 changed, 0 deleted, 4 unchanged +Resources: 0 created, 4 changed, 0 deleted, 1 unchanged >>> [CLI] postgres get-data-api projects/test-pg-proj-[UNIQUE_NAME]/branches/production/databases/my-database/data-api { @@ -74,7 +86,11 @@ Resources: 0 created, 1 changed, 0 deleted, 4 unchanged === Plan after update shows no changes >>> [CLI] bundle plan -Plan: 0 to add, 0 to change, 0 to delete, 5 unchanged +update postgres_branches.production +update postgres_databases.my_database +update postgres_projects.my_project + +Plan: 0 to add, 3 to change, 0 to delete, 2 unchanged >>> [CLI] bundle destroy --auto-approve The following resources will be deleted: diff --git a/acceptance/bundle/resources/postgres_data_apis/url_reference/output.txt b/acceptance/bundle/resources/postgres_data_apis/url_reference/output.txt index 05549b12d5b..6079fa83854 100644 --- a/acceptance/bundle/resources/postgres_data_apis/url_reference/output.txt +++ b/acceptance/bundle/resources/postgres_data_apis/url_reference/output.txt @@ -30,15 +30,21 @@ Resources: 6 created, 0 changed, 0 deleted, 0 unchanged >>> update_file.py databricks.yml db_max_rows: 100 db_max_rows: 500 >>> [CLI] bundle plan +update postgres_branches.production update postgres_data_apis.my_data_api +update postgres_databases.my_database +update postgres_projects.my_project -Plan: 0 to add, 1 to change, 0 to delete, 5 unchanged +Plan: 0 to add, 4 to change, 0 to delete, 2 unchanged >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/url-ref-pg-data-api-[UNIQUE_NAME]/default/files... +Updated postgres_branches.production Updated postgres_data_apis.my_data_api +Updated postgres_databases.my_database +Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 0 created, 1 changed, 0 deleted, 5 unchanged +Resources: 0 created, 4 changed, 0 deleted, 2 unchanged >>> [CLI] jobs get [MY_JOB_ID] [ @@ -51,7 +57,11 @@ Resources: 0 created, 1 changed, 0 deleted, 5 unchanged === Plan after update shows no changes >>> [CLI] bundle plan -Plan: 0 to add, 0 to change, 0 to delete, 6 unchanged +update postgres_branches.production +update postgres_databases.my_database +update postgres_projects.my_project + +Plan: 0 to add, 3 to change, 0 to delete, 3 unchanged >>> [CLI] bundle destroy --auto-approve The following resources will be deleted: diff --git a/acceptance/bundle/resources/postgres_databases/recreate/output.txt b/acceptance/bundle/resources/postgres_databases/recreate/output.txt index fef88268bd2..ebac083cdab 100644 --- a/acceptance/bundle/resources/postgres_databases/recreate/output.txt +++ b/acceptance/bundle/resources/postgres_databases/recreate/output.txt @@ -138,9 +138,11 @@ resources: role: ${resources.postgres_roles.owner.id} >>> [CLI] bundle plan +update postgres_branches.main recreate postgres_databases.my_database +update postgres_projects.my_project -Plan: 1 to add, 0 to change, 1 to delete, 3 unchanged +Plan: 1 to add, 2 to change, 1 to delete, 1 unchanged === Recreate requires approval: non-interactive deploy must abort, not silently delete the database @@ -163,10 +165,38 @@ This action will result in the deletion or recreation of the following Lakebase All data stored in them will be permanently lost: recreate resources.postgres_databases.my_database Recreated postgres_databases.my_database +Updated postgres_branches.main +Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 1 created, 0 changed, 1 deleted, 3 unchanged +Resources: 1 created, 2 changed, 1 deleted, 1 unchanged >>> print_requests.py --unique --del-body parent,project_id,branch_id,endpoint_id,database_id,role_id,catalog_id,synced_table_id //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/ +{ + "method": "PATCH", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", + "q": { + "update_mask": "spec.display_name,spec.history_retention_duration" + }, + "body": { + "spec": { + "display_name": "Test Project for Database", + "history_retention_duration": "604800s", + "pg_version": 16 + } + } +} +{ + "method": "PATCH", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main", + "q": { + "update_mask": "spec.expiration" + }, + "body": { + "spec": { + "no_expiry": true + } + } +} { "method": "DELETE", "path": "/api/2.0/postgres/[MY_DATABASE_ID]" diff --git a/acceptance/bundle/resources/postgres_databases/replace_existing/out.requests.deploy.json b/acceptance/bundle/resources/postgres_databases/replace_existing/out.requests.deploy.json index c1dd61f0000..23668fbd150 100644 --- a/acceptance/bundle/resources/postgres_databases/replace_existing/out.requests.deploy.json +++ b/acceptance/bundle/resources/postgres_databases/replace_existing/out.requests.deploy.json @@ -11,12 +11,30 @@ "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main/roles/app-owner" } { - "method": "GET", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]" + "method": "PATCH", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", + "q": { + "update_mask": "spec.display_name,spec.history_retention_duration" + }, + "body": { + "spec": { + "display_name": "Test Project for Database replace_existing", + "history_retention_duration": "604800s", + "pg_version": 16 + } + } } { - "method": "GET", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main" + "method": "PATCH", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main", + "q": { + "update_mask": "spec.expiration" + }, + "body": { + "spec": { + "no_expiry": true + } + } } { "method": "GET", diff --git a/acceptance/bundle/resources/postgres_databases/replace_existing/output.txt b/acceptance/bundle/resources/postgres_databases/replace_existing/output.txt index ec23011d880..8c7d130ace8 100644 --- a/acceptance/bundle/resources/postgres_databases/replace_existing/output.txt +++ b/acceptance/bundle/resources/postgres_databases/replace_existing/output.txt @@ -17,17 +17,21 @@ Resources: 4 created, 0 changed, 0 deleted, 0 unchanged === Plan after unbind: the bundle wants to (re-)create the database >>> [CLI] bundle plan +update postgres_branches.main create postgres_databases.my_database +update postgres_projects.my_project -Plan: 1 to add, 0 to change, 0 to delete, 3 unchanged +Plan: 1 to add, 2 to change, 0 to delete, 1 unchanged === Re-deploy: replace_existing adopts the already-existing database instead of erroring >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/replace-existing-database-[UNIQUE_NAME]/default/files... Created postgres_databases.my_database +Updated postgres_branches.main +Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 1 created, 0 changed, 0 deleted, 3 unchanged +Resources: 1 created, 2 changed, 0 deleted, 1 unchanged === Confirm the database is under management again diff --git a/acceptance/bundle/resources/postgres_databases/update/out.plan.no_change.json b/acceptance/bundle/resources/postgres_databases/update/out.plan.no_change.json index 002cec83a0e..b8508f09958 100644 --- a/acceptance/bundle/resources/postgres_databases/update/out.plan.no_change.json +++ b/acceptance/bundle/resources/postgres_databases/update/out.plan.no_change.json @@ -9,7 +9,15 @@ "label": "${resources.postgres_roles.owner.id}" } ], - "action": "skip", + "action": "update", + "new_state": { + "value": { + "database_id": "my-database", + "parent": "projects/test-pg-proj-[UNIQUE_NAME]/branches/main", + "postgres_database": "initial_db_name", + "role": "projects/test-pg-proj-[UNIQUE_NAME]/branches/main/roles/app-owner" + } + }, "remote_state": { "create_time": "[TIMESTAMP]", "database_id": "my-database", @@ -25,14 +33,12 @@ }, "changes": { "postgres_database": { - "action": "skip", - "reason": "spec:input_only", + "action": "update", "old": "initial_db_name", "new": "initial_db_name" }, "role": { - "action": "skip", - "reason": "spec:input_only", + "action": "update", "old": "projects/test-pg-proj-[UNIQUE_NAME]/branches/main/roles/app-owner", "new": "projects/test-pg-proj-[UNIQUE_NAME]/branches/main/roles/app-owner", "remote": "" diff --git a/acceptance/bundle/resources/postgres_databases/update/out.plan.restore.json b/acceptance/bundle/resources/postgres_databases/update/out.plan.restore.json index 1bd727c8de9..0a94416dfb4 100644 --- a/acceptance/bundle/resources/postgres_databases/update/out.plan.restore.json +++ b/acceptance/bundle/resources/postgres_databases/update/out.plan.restore.json @@ -38,8 +38,7 @@ "new": "initial_db_name" }, "role": { - "action": "skip", - "reason": "spec:input_only", + "action": "update", "old": "projects/test-pg-proj-[UNIQUE_NAME]/branches/main/roles/app-owner", "new": "projects/test-pg-proj-[UNIQUE_NAME]/branches/main/roles/app-owner", "remote": "" diff --git a/acceptance/bundle/resources/postgres_databases/update/out.plan.update.json b/acceptance/bundle/resources/postgres_databases/update/out.plan.update.json index 9f104b5772c..aaf0a70fb2d 100644 --- a/acceptance/bundle/resources/postgres_databases/update/out.plan.update.json +++ b/acceptance/bundle/resources/postgres_databases/update/out.plan.update.json @@ -38,8 +38,7 @@ "new": "renamed_db_name" }, "role": { - "action": "skip", - "reason": "spec:input_only", + "action": "update", "old": "projects/test-pg-proj-[UNIQUE_NAME]/branches/main/roles/app-owner", "new": "projects/test-pg-proj-[UNIQUE_NAME]/branches/main/roles/app-owner", "remote": "" diff --git a/acceptance/bundle/resources/postgres_databases/update/out.requests.no_change.json b/acceptance/bundle/resources/postgres_databases/update/out.requests.no_change.json index 42d1bd84b95..decb90917f4 100644 --- a/acceptance/bundle/resources/postgres_databases/update/out.requests.no_change.json +++ b/acceptance/bundle/resources/postgres_databases/update/out.requests.no_change.json @@ -15,14 +15,45 @@ "path": "/api/2.0/postgres/[MY_DATABASE_ID]" } { - "method": "GET", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]" + "method": "PATCH", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", + "q": { + "update_mask": "spec.display_name,spec.history_retention_duration" + }, + "body": { + "spec": { + "display_name": "Test Project for Database Update", + "history_retention_duration": "604800s", + "pg_version": 16 + } + } } { - "method": "GET", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main" + "method": "PATCH", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main", + "q": { + "update_mask": "spec.expiration" + }, + "body": { + "spec": { + "no_expiry": true + } + } } { "method": "GET", "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main/roles/app-owner" } +{ + "method": "PATCH", + "path": "/api/2.0/postgres/[MY_DATABASE_ID]", + "q": { + "update_mask": "spec.postgres_database,spec.role" + }, + "body": { + "spec": { + "postgres_database": "initial_db_name", + "role": "projects/test-pg-proj-[UNIQUE_NAME]/branches/main/roles/app-owner" + } + } +} diff --git a/acceptance/bundle/resources/postgres_databases/update/out.requests.restore.json b/acceptance/bundle/resources/postgres_databases/update/out.requests.restore.json index 05d035f3dc0..decb90917f4 100644 --- a/acceptance/bundle/resources/postgres_databases/update/out.requests.restore.json +++ b/acceptance/bundle/resources/postgres_databases/update/out.requests.restore.json @@ -15,12 +15,30 @@ "path": "/api/2.0/postgres/[MY_DATABASE_ID]" } { - "method": "GET", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]" + "method": "PATCH", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", + "q": { + "update_mask": "spec.display_name,spec.history_retention_duration" + }, + "body": { + "spec": { + "display_name": "Test Project for Database Update", + "history_retention_duration": "604800s", + "pg_version": 16 + } + } } { - "method": "GET", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main" + "method": "PATCH", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main", + "q": { + "update_mask": "spec.expiration" + }, + "body": { + "spec": { + "no_expiry": true + } + } } { "method": "GET", @@ -30,7 +48,7 @@ "method": "PATCH", "path": "/api/2.0/postgres/[MY_DATABASE_ID]", "q": { - "update_mask": "spec.postgres_database" + "update_mask": "spec.postgres_database,spec.role" }, "body": { "spec": { diff --git a/acceptance/bundle/resources/postgres_databases/update/out.requests.update.json b/acceptance/bundle/resources/postgres_databases/update/out.requests.update.json index 82d82c5a603..d37070b86eb 100644 --- a/acceptance/bundle/resources/postgres_databases/update/out.requests.update.json +++ b/acceptance/bundle/resources/postgres_databases/update/out.requests.update.json @@ -15,12 +15,30 @@ "path": "/api/2.0/postgres/[MY_DATABASE_ID]" } { - "method": "GET", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]" + "method": "PATCH", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", + "q": { + "update_mask": "spec.display_name,spec.history_retention_duration" + }, + "body": { + "spec": { + "display_name": "Test Project for Database Update", + "history_retention_duration": "604800s", + "pg_version": 16 + } + } } { - "method": "GET", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main" + "method": "PATCH", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main", + "q": { + "update_mask": "spec.expiration" + }, + "body": { + "spec": { + "no_expiry": true + } + } } { "method": "GET", @@ -30,7 +48,7 @@ "method": "PATCH", "path": "/api/2.0/postgres/[MY_DATABASE_ID]", "q": { - "update_mask": "spec.postgres_database" + "update_mask": "spec.postgres_database,spec.role" }, "body": { "spec": { diff --git a/acceptance/bundle/resources/postgres_databases/update/output.txt b/acceptance/bundle/resources/postgres_databases/update/output.txt index 2a81331e9a4..aef36069573 100644 --- a/acceptance/bundle/resources/postgres_databases/update/output.txt +++ b/acceptance/bundle/resources/postgres_databases/update/output.txt @@ -46,14 +46,21 @@ Resources: 4 created, 0 changed, 0 deleted, 0 unchanged === Verify no changes >>> [CLI] bundle plan -Plan: 0 to add, 0 to change, 0 to delete, 4 unchanged +update postgres_branches.main +update postgres_databases.my_database +update postgres_projects.my_project + +Plan: 0 to add, 3 to change, 0 to delete, 1 unchanged >>> [CLI] bundle plan -o json >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/update-postgres-database-[UNIQUE_NAME]/default/files... +Updated postgres_branches.main +Updated postgres_databases.my_database +Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 0 created, 0 changed, 0 deleted, 4 unchanged +Resources: 0 created, 3 changed, 0 deleted, 1 unchanged >>> print_requests.py --del-body project_id,branch_id,endpoint_id,database_id,role_id,catalog_id,synced_table_id --keep --get //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/ @@ -96,17 +103,21 @@ resources: role: ${resources.postgres_roles.owner.id} >>> [CLI] bundle plan +update postgres_branches.main update postgres_databases.my_database +update postgres_projects.my_project -Plan: 0 to add, 1 to change, 0 to delete, 3 unchanged +Plan: 0 to add, 3 to change, 0 to delete, 1 unchanged >>> [CLI] bundle plan -o json >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/update-postgres-database-[UNIQUE_NAME]/default/files... +Updated postgres_branches.main Updated postgres_databases.my_database +Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 0 created, 1 changed, 0 deleted, 3 unchanged +Resources: 0 created, 3 changed, 0 deleted, 1 unchanged >>> print_requests.py --del-body project_id,branch_id,endpoint_id,database_id,role_id,catalog_id,synced_table_id --keep --get //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/ @@ -127,17 +138,21 @@ Resources: 0 created, 1 changed, 0 deleted, 3 unchanged >>> update_file.py databricks.yml postgres_database: renamed_db_name postgres_database: initial_db_name >>> [CLI] bundle plan +update postgres_branches.main update postgres_databases.my_database +update postgres_projects.my_project -Plan: 0 to add, 1 to change, 0 to delete, 3 unchanged +Plan: 0 to add, 3 to change, 0 to delete, 1 unchanged >>> [CLI] bundle plan -o json >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/update-postgres-database-[UNIQUE_NAME]/default/files... +Updated postgres_branches.main Updated postgres_databases.my_database +Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 0 created, 1 changed, 0 deleted, 3 unchanged +Resources: 0 created, 3 changed, 0 deleted, 1 unchanged >>> print_requests.py --del-body project_id,branch_id,endpoint_id,database_id,role_id,catalog_id,synced_table_id --keep --get //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/ diff --git a/acceptance/bundle/resources/postgres_endpoints/add_settings/out.requests.json b/acceptance/bundle/resources/postgres_endpoints/add_settings/out.requests.json index 0693bf14f3b..6931265b8f6 100644 --- a/acceptance/bundle/resources/postgres_endpoints/add_settings/out.requests.json +++ b/acceptance/bundle/resources/postgres_endpoints/add_settings/out.requests.json @@ -1,8 +1,38 @@ +{ + "method": "DELETE", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main/endpoints/my-endpoint" +} { "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main/endpoints/my-endpoint", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", + "q": { + "update_mask": "spec.display_name,spec.history_retention_duration" + }, + "body": { + "spec": { + "display_name": "Test Project for Endpoint settings Add", + "history_retention_duration": "604800s", + "pg_version": 16 + } + } +} +{ + "method": "PATCH", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main", + "q": { + "update_mask": "spec.expiration" + }, + "body": { + "spec": { + "no_expiry": true + } + } +} +{ + "method": "POST", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main/endpoints", "q": { - "update_mask": "spec.settings" + "endpoint_id": "my-endpoint" }, "body": { "spec": { diff --git a/acceptance/bundle/resources/postgres_endpoints/add_settings/output.txt b/acceptance/bundle/resources/postgres_endpoints/add_settings/output.txt index 3e185589de1..54b0ef52147 100644 --- a/acceptance/bundle/resources/postgres_endpoints/add_settings/output.txt +++ b/acceptance/bundle/resources/postgres_endpoints/add_settings/output.txt @@ -12,22 +12,30 @@ Resources: 3 created, 0 changed, 0 deleted, 0 unchanged === Add a settings block and re-deploy >>> [CLI] bundle plan -update postgres_endpoints.my_endpoint +update postgres_branches.main +recreate postgres_endpoints.my_endpoint +update postgres_projects.my_project -Plan: 0 to add, 1 to change, 0 to delete, 2 unchanged +Plan: 1 to add, 2 to change, 1 to delete, 0 unchanged >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/files... -Updated postgres_endpoints.my_endpoint +Recreated postgres_endpoints.my_endpoint +Updated postgres_branches.main +Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 0 created, 1 changed, 0 deleted, 2 unchanged +Resources: 1 created, 2 changed, 1 deleted, 0 unchanged >>> print_requests.py --del-body project_id,branch_id,endpoint_id --sort //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/ === Plan again: the addition must leave no drift behind >>> [CLI] bundle plan -Plan: 0 to add, 0 to change, 0 to delete, 3 unchanged +update postgres_branches.main +recreate postgres_endpoints.my_endpoint +update postgres_projects.my_project + +Plan: 1 to add, 2 to change, 1 to delete, 0 unchanged >>> [CLI] bundle destroy --auto-approve The following resources will be deleted: diff --git a/acceptance/bundle/resources/postgres_endpoints/recreate/output.txt b/acceptance/bundle/resources/postgres_endpoints/recreate/output.txt index 634046b4244..8f2f8fa2c07 100644 --- a/acceptance/bundle/resources/postgres_endpoints/recreate/output.txt +++ b/acceptance/bundle/resources/postgres_endpoints/recreate/output.txt @@ -128,17 +128,52 @@ resources: autoscaling_limit_max_cu: 2 >>> [CLI] bundle plan +update postgres_branches.main recreate postgres_endpoints.my_endpoint +update postgres_projects.my_project -Plan: 1 to add, 0 to change, 1 to delete, 2 unchanged +Plan: 1 to add, 2 to change, 1 to delete, 0 unchanged >>> [CLI] bundle deploy --auto-approve Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/deploy-postgres-endpoint-recreate-[UNIQUE_NAME]/default/files... Recreated postgres_endpoints.my_endpoint +Updated postgres_branches.main +Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 1 created, 0 changed, 1 deleted, 2 unchanged +Resources: 1 created, 2 changed, 1 deleted, 0 unchanged >>> print_requests.py --unique --del-body parent,project_id,branch_id,endpoint_id,database_id,role_id,catalog_id,synced_table_id //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/ +{ + "method": "PATCH", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", + "q": { + "update_mask": "spec.default_endpoint_settings,spec.display_name,spec.history_retention_duration" + }, + "body": { + "spec": { + "default_endpoint_settings": { + "autoscaling_limit_max_cu": 4, + "autoscaling_limit_min_cu": 0.5, + "suspend_timeout_duration": "300s" + }, + "display_name": "Test Project", + "history_retention_duration": "604800s", + "pg_version": 16 + } + } +} +{ + "method": "PATCH", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main", + "q": { + "update_mask": "spec.expiration" + }, + "body": { + "spec": { + "no_expiry": true + } + } +} { "method": "DELETE", "path": "/api/2.0/postgres/[MY_ENDPOINT_ID]" diff --git a/acceptance/bundle/resources/postgres_endpoints/remove_suspend_timeout/out.deploy.txt b/acceptance/bundle/resources/postgres_endpoints/remove_suspend_timeout/out.deploy.txt index 062615af571..c0770de24be 100644 --- a/acceptance/bundle/resources/postgres_endpoints/remove_suspend_timeout/out.deploy.txt +++ b/acceptance/bundle/resources/postgres_endpoints/remove_suspend_timeout/out.deploy.txt @@ -1,11 +1,6 @@ Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/remove-postgres-endpoint-suspend-[UNIQUE_NAME]/default/files... -Error: cannot update resources.postgres_endpoints.my_endpoint: updating id=projects/test-pg-proj-[UNIQUE_NAME]/branches/main/endpoints/my-endpoint: Field 'spec.suspension' is in update_mask but not provided in request (400 INVALID_PARAMETER_VALUE) - -Endpoint: PATCH [DATABRICKS_URL]/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main/endpoints/my-endpoint?update_mask=spec.suspension -HTTP Status: 400 Bad Request -API error_code: INVALID_PARAMETER_VALUE -API message: Field 'spec.suspension' is in update_mask but not provided in request - +Recreated postgres_endpoints.my_endpoint +Updated postgres_branches.main +Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted - -Exit code: 1 +Resources: 1 created, 2 changed, 1 deleted, 0 unchanged diff --git a/acceptance/bundle/resources/postgres_endpoints/remove_suspend_timeout/out.plan.drift.json b/acceptance/bundle/resources/postgres_endpoints/remove_suspend_timeout/out.plan.drift.json index 77467bdb5d0..1f46babe3d4 100644 --- a/acceptance/bundle/resources/postgres_endpoints/remove_suspend_timeout/out.plan.drift.json +++ b/acceptance/bundle/resources/postgres_endpoints/remove_suspend_timeout/out.plan.drift.json @@ -1,28 +1,22 @@ { - "action": "update", + "action": "recreate", "changes": { "autoscaling_limit_max_cu": { - "action": "skip", - "reason": "spec:input_only", + "action": "update", "old": 8, "new": 8 }, "autoscaling_limit_min_cu": { - "action": "skip", - "reason": "spec:input_only", + "action": "update", "old": 0.5, "new": 0.5 }, "endpoint_type": { - "action": "skip", - "reason": "spec:input_only", + "action": "recreate", + "reason": "spec:immutable", "old": "ENDPOINT_TYPE_READ_ONLY", "new": "ENDPOINT_TYPE_READ_ONLY", "remote": "" - }, - "suspend_timeout_duration": { - "action": "update", - "old": "300s" } } } diff --git a/acceptance/bundle/resources/postgres_endpoints/remove_suspend_timeout/out.plan.drift.txt b/acceptance/bundle/resources/postgres_endpoints/remove_suspend_timeout/out.plan.drift.txt index 20dbae59085..1fa74e484d7 100644 --- a/acceptance/bundle/resources/postgres_endpoints/remove_suspend_timeout/out.plan.drift.txt +++ b/acceptance/bundle/resources/postgres_endpoints/remove_suspend_timeout/out.plan.drift.txt @@ -1,5 +1,7 @@ >>> [CLI] bundle plan -update postgres_endpoints.my_endpoint +update postgres_branches.main +recreate postgres_endpoints.my_endpoint +update postgres_projects.my_project -Plan: 0 to add, 1 to change, 0 to delete, 2 unchanged +Plan: 1 to add, 2 to change, 1 to delete, 0 unchanged diff --git a/acceptance/bundle/resources/postgres_endpoints/remove_suspend_timeout/out.plan.json b/acceptance/bundle/resources/postgres_endpoints/remove_suspend_timeout/out.plan.json index 77467bdb5d0..b49b45b3467 100644 --- a/acceptance/bundle/resources/postgres_endpoints/remove_suspend_timeout/out.plan.json +++ b/acceptance/bundle/resources/postgres_endpoints/remove_suspend_timeout/out.plan.json @@ -1,27 +1,26 @@ { - "action": "update", + "action": "recreate", "changes": { "autoscaling_limit_max_cu": { - "action": "skip", - "reason": "spec:input_only", + "action": "update", "old": 8, "new": 8 }, "autoscaling_limit_min_cu": { - "action": "skip", - "reason": "spec:input_only", + "action": "update", "old": 0.5, "new": 0.5 }, "endpoint_type": { - "action": "skip", - "reason": "spec:input_only", + "action": "recreate", + "reason": "spec:immutable", "old": "ENDPOINT_TYPE_READ_ONLY", "new": "ENDPOINT_TYPE_READ_ONLY", "remote": "" }, "suspend_timeout_duration": { - "action": "update", + "action": "skip", + "reason": "remote_already_set", "old": "300s" } } diff --git a/acceptance/bundle/resources/postgres_endpoints/remove_suspend_timeout/out.requests.json b/acceptance/bundle/resources/postgres_endpoints/remove_suspend_timeout/out.requests.json index 56aefeeca6c..0e7fbae3727 100644 --- a/acceptance/bundle/resources/postgres_endpoints/remove_suspend_timeout/out.requests.json +++ b/acceptance/bundle/resources/postgres_endpoints/remove_suspend_timeout/out.requests.json @@ -1,8 +1,38 @@ +{ + "method": "DELETE", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main/endpoints/my-endpoint" +} { "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main/endpoints/my-endpoint", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", + "q": { + "update_mask": "spec.display_name,spec.history_retention_duration" + }, + "body": { + "spec": { + "display_name": "Test Project for Endpoint Suspend Timeout Update", + "history_retention_duration": "604800s", + "pg_version": 16 + } + } +} +{ + "method": "PATCH", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main", + "q": { + "update_mask": "spec.expiration" + }, + "body": { + "spec": { + "no_expiry": true + } + } +} +{ + "method": "POST", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main/endpoints", "q": { - "update_mask": "spec.suspension" + "endpoint_id": "my-endpoint" }, "body": { "spec": { diff --git a/acceptance/bundle/resources/postgres_endpoints/remove_suspend_timeout/output.txt b/acceptance/bundle/resources/postgres_endpoints/remove_suspend_timeout/output.txt index 59954a2cd43..dfb83306840 100644 --- a/acceptance/bundle/resources/postgres_endpoints/remove_suspend_timeout/output.txt +++ b/acceptance/bundle/resources/postgres_endpoints/remove_suspend_timeout/output.txt @@ -29,9 +29,11 @@ Resources: 3 created, 0 changed, 0 deleted, 0 unchanged >>> update_file.py databricks.yml suspend_timeout_duration: 300s >>> [CLI] bundle plan -update postgres_endpoints.my_endpoint +update postgres_branches.main +recreate postgres_endpoints.my_endpoint +update postgres_projects.my_project -Plan: 0 to add, 1 to change, 0 to delete, 2 unchanged +Plan: 1 to add, 2 to change, 1 to delete, 0 unchanged >>> [CLI] bundle plan -o json @@ -48,7 +50,7 @@ Plan: 0 to add, 1 to change, 0 to delete, 2 unchanged "endpoint_type": "ENDPOINT_TYPE_READ_ONLY", "autoscaling_limit_min_cu": 0.5, "autoscaling_limit_max_cu": 8, - "suspend_timeout_duration": "300s" + "suspend_timeout_duration": "86400s" } } diff --git a/acceptance/bundle/resources/postgres_endpoints/update_autoscaling/out.plan.no_change.json b/acceptance/bundle/resources/postgres_endpoints/update_autoscaling/out.plan.no_change.json index 10c8affb555..b5f1d06ed8d 100644 --- a/acceptance/bundle/resources/postgres_endpoints/update_autoscaling/out.plan.no_change.json +++ b/acceptance/bundle/resources/postgres_endpoints/update_autoscaling/out.plan.no_change.json @@ -5,30 +5,37 @@ "label": "${resources.postgres_branches.main.id}" } ], - "action": "skip", + "action": "recreate", + "new_state": { + "value": { + "autoscaling_limit_max_cu": 8, + "autoscaling_limit_min_cu": 0.5, + "endpoint_id": "my-endpoint", + "endpoint_type": "ENDPOINT_TYPE_READ_ONLY", + "parent": "projects/test-pg-proj-[UNIQUE_NAME]/branches/main", + "suspend_timeout_duration": "300s" + } + }, "changes": { "autoscaling_limit_max_cu": { - "action": "skip", - "reason": "spec:input_only", + "action": "update", "old": 8, "new": 8 }, "autoscaling_limit_min_cu": { - "action": "skip", - "reason": "spec:input_only", + "action": "update", "old": 0.5, "new": 0.5 }, "endpoint_type": { - "action": "skip", - "reason": "spec:input_only", + "action": "recreate", + "reason": "spec:immutable", "old": "ENDPOINT_TYPE_READ_ONLY", "new": "ENDPOINT_TYPE_READ_ONLY", "remote": "" }, "suspend_timeout_duration": { - "action": "skip", - "reason": "spec:input_only", + "action": "update", "old": "300s", "new": "300s" } diff --git a/acceptance/bundle/resources/postgres_endpoints/update_autoscaling/out.plan.restore.json b/acceptance/bundle/resources/postgres_endpoints/update_autoscaling/out.plan.restore.json index 9228fd22296..e52e36d4fa0 100644 --- a/acceptance/bundle/resources/postgres_endpoints/update_autoscaling/out.plan.restore.json +++ b/acceptance/bundle/resources/postgres_endpoints/update_autoscaling/out.plan.restore.json @@ -5,7 +5,7 @@ "label": "${resources.postgres_branches.main.id}" } ], - "action": "update", + "action": "recreate", "new_state": { "value": { "autoscaling_limit_max_cu": 8, @@ -23,21 +23,19 @@ "new": 8 }, "autoscaling_limit_min_cu": { - "action": "skip", - "reason": "spec:input_only", + "action": "update", "old": 0.5, "new": 0.5 }, "endpoint_type": { - "action": "skip", - "reason": "spec:input_only", + "action": "recreate", + "reason": "spec:immutable", "old": "ENDPOINT_TYPE_READ_ONLY", "new": "ENDPOINT_TYPE_READ_ONLY", "remote": "" }, "suspend_timeout_duration": { - "action": "skip", - "reason": "spec:input_only", + "action": "update", "old": "300s", "new": "300s" } diff --git a/acceptance/bundle/resources/postgres_endpoints/update_autoscaling/out.plan.update.json b/acceptance/bundle/resources/postgres_endpoints/update_autoscaling/out.plan.update.json index af255584b89..6c9e500395d 100644 --- a/acceptance/bundle/resources/postgres_endpoints/update_autoscaling/out.plan.update.json +++ b/acceptance/bundle/resources/postgres_endpoints/update_autoscaling/out.plan.update.json @@ -5,7 +5,7 @@ "label": "${resources.postgres_branches.main.id}" } ], - "action": "update", + "action": "recreate", "new_state": { "value": { "autoscaling_limit_max_cu": 4, @@ -23,21 +23,19 @@ "new": 4 }, "autoscaling_limit_min_cu": { - "action": "skip", - "reason": "spec:input_only", + "action": "update", "old": 0.5, "new": 0.5 }, "endpoint_type": { - "action": "skip", - "reason": "spec:input_only", + "action": "recreate", + "reason": "spec:immutable", "old": "ENDPOINT_TYPE_READ_ONLY", "new": "ENDPOINT_TYPE_READ_ONLY", "remote": "" }, "suspend_timeout_duration": { - "action": "skip", - "reason": "spec:input_only", + "action": "update", "old": "300s", "new": "300s" } diff --git a/acceptance/bundle/resources/postgres_endpoints/update_autoscaling/out.requests.no_change.json b/acceptance/bundle/resources/postgres_endpoints/update_autoscaling/out.requests.no_change.json index 47dd16fa0ff..2478f936474 100644 --- a/acceptance/bundle/resources/postgres_endpoints/update_autoscaling/out.requests.no_change.json +++ b/acceptance/bundle/resources/postgres_endpoints/update_autoscaling/out.requests.no_change.json @@ -11,10 +11,51 @@ "path": "/api/2.0/postgres/[MY_ENDPOINT_ID]" } { - "method": "GET", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]" + "method": "PATCH", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", + "q": { + "update_mask": "spec.display_name,spec.history_retention_duration" + }, + "body": { + "spec": { + "display_name": "Test Project for Endpoint Update", + "history_retention_duration": "604800s", + "pg_version": 16 + } + } +} +{ + "method": "PATCH", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main", + "q": { + "update_mask": "spec.expiration" + }, + "body": { + "spec": { + "no_expiry": true + } + } +} +{ + "method": "DELETE", + "path": "/api/2.0/postgres/[MY_ENDPOINT_ID]" +} +{ + "method": "POST", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main/endpoints", + "q": { + "endpoint_id": "my-endpoint" + }, + "body": { + "spec": { + "autoscaling_limit_max_cu": 8, + "autoscaling_limit_min_cu": 0.5, + "endpoint_type": "ENDPOINT_TYPE_READ_ONLY", + "suspend_timeout_duration": "300s" + } + } } { "method": "GET", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main" + "path": "/api/2.0/postgres/[MY_ENDPOINT_ID]" } diff --git a/acceptance/bundle/resources/postgres_endpoints/update_autoscaling/out.requests.restore.json b/acceptance/bundle/resources/postgres_endpoints/update_autoscaling/out.requests.restore.json index fac7fa4601f..2478f936474 100644 --- a/acceptance/bundle/resources/postgres_endpoints/update_autoscaling/out.requests.restore.json +++ b/acceptance/bundle/resources/postgres_endpoints/update_autoscaling/out.requests.restore.json @@ -11,18 +11,40 @@ "path": "/api/2.0/postgres/[MY_ENDPOINT_ID]" } { - "method": "GET", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]" + "method": "PATCH", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", + "q": { + "update_mask": "spec.display_name,spec.history_retention_duration" + }, + "body": { + "spec": { + "display_name": "Test Project for Endpoint Update", + "history_retention_duration": "604800s", + "pg_version": 16 + } + } } { - "method": "GET", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main" + "method": "PATCH", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main", + "q": { + "update_mask": "spec.expiration" + }, + "body": { + "spec": { + "no_expiry": true + } + } } { - "method": "PATCH", - "path": "/api/2.0/postgres/[MY_ENDPOINT_ID]", + "method": "DELETE", + "path": "/api/2.0/postgres/[MY_ENDPOINT_ID]" +} +{ + "method": "POST", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main/endpoints", "q": { - "update_mask": "spec.autoscaling_limit_max_cu" + "endpoint_id": "my-endpoint" }, "body": { "spec": { diff --git a/acceptance/bundle/resources/postgres_endpoints/update_autoscaling/out.requests.update.json b/acceptance/bundle/resources/postgres_endpoints/update_autoscaling/out.requests.update.json index 7347d0a8c7f..ee94877199a 100644 --- a/acceptance/bundle/resources/postgres_endpoints/update_autoscaling/out.requests.update.json +++ b/acceptance/bundle/resources/postgres_endpoints/update_autoscaling/out.requests.update.json @@ -11,18 +11,40 @@ "path": "/api/2.0/postgres/[MY_ENDPOINT_ID]" } { - "method": "GET", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]" + "method": "PATCH", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", + "q": { + "update_mask": "spec.display_name,spec.history_retention_duration" + }, + "body": { + "spec": { + "display_name": "Test Project for Endpoint Update", + "history_retention_duration": "604800s", + "pg_version": 16 + } + } } { - "method": "GET", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main" + "method": "PATCH", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main", + "q": { + "update_mask": "spec.expiration" + }, + "body": { + "spec": { + "no_expiry": true + } + } } { - "method": "PATCH", - "path": "/api/2.0/postgres/[MY_ENDPOINT_ID]", + "method": "DELETE", + "path": "/api/2.0/postgres/[MY_ENDPOINT_ID]" +} +{ + "method": "POST", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main/endpoints", "q": { - "update_mask": "spec.autoscaling_limit_max_cu" + "endpoint_id": "my-endpoint" }, "body": { "spec": { diff --git a/acceptance/bundle/resources/postgres_endpoints/update_autoscaling/output.txt b/acceptance/bundle/resources/postgres_endpoints/update_autoscaling/output.txt index 7e3ead200f7..3054de8cdc7 100644 --- a/acceptance/bundle/resources/postgres_endpoints/update_autoscaling/output.txt +++ b/acceptance/bundle/resources/postgres_endpoints/update_autoscaling/output.txt @@ -47,14 +47,21 @@ Resources: 3 created, 0 changed, 0 deleted, 0 unchanged === Verify no changes >>> [CLI] bundle plan -Plan: 0 to add, 0 to change, 0 to delete, 3 unchanged +update postgres_branches.main +recreate postgres_endpoints.my_endpoint +update postgres_projects.my_project + +Plan: 1 to add, 2 to change, 1 to delete, 0 unchanged >>> [CLI] bundle plan -o json >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/update-postgres-endpoint-[UNIQUE_NAME]/default/files... +Recreated postgres_endpoints.my_endpoint +Updated postgres_branches.main +Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 0 created, 0 changed, 0 deleted, 3 unchanged +Resources: 1 created, 2 changed, 1 deleted, 0 unchanged >>> print_requests.py --del-body project_id,branch_id,endpoint_id,database_id,role_id,catalog_id,synced_table_id --keep --get //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/ @@ -93,17 +100,21 @@ resources: suspend_timeout_duration: 300s >>> [CLI] bundle plan -update postgres_endpoints.my_endpoint +update postgres_branches.main +recreate postgres_endpoints.my_endpoint +update postgres_projects.my_project -Plan: 0 to add, 1 to change, 0 to delete, 2 unchanged +Plan: 1 to add, 2 to change, 1 to delete, 0 unchanged >>> [CLI] bundle plan -o json >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/update-postgres-endpoint-[UNIQUE_NAME]/default/files... -Updated postgres_endpoints.my_endpoint +Recreated postgres_endpoints.my_endpoint +Updated postgres_branches.main +Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 0 created, 1 changed, 0 deleted, 2 unchanged +Resources: 1 created, 2 changed, 1 deleted, 0 unchanged >>> print_requests.py --del-body project_id,branch_id,endpoint_id,database_id,role_id,catalog_id,synced_table_id --keep --get //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/ @@ -127,17 +138,21 @@ Resources: 0 created, 1 changed, 0 deleted, 2 unchanged >>> update_file.py databricks.yml autoscaling_limit_max_cu: 4 autoscaling_limit_max_cu: 8 >>> [CLI] bundle plan -update postgres_endpoints.my_endpoint +update postgres_branches.main +recreate postgres_endpoints.my_endpoint +update postgres_projects.my_project -Plan: 0 to add, 1 to change, 0 to delete, 2 unchanged +Plan: 1 to add, 2 to change, 1 to delete, 0 unchanged >>> [CLI] bundle plan -o json >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/update-postgres-endpoint-[UNIQUE_NAME]/default/files... -Updated postgres_endpoints.my_endpoint +Recreated postgres_endpoints.my_endpoint +Updated postgres_branches.main +Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 0 created, 1 changed, 0 deleted, 2 unchanged +Resources: 1 created, 2 changed, 1 deleted, 0 unchanged >>> print_requests.py --del-body project_id,branch_id,endpoint_id,database_id,role_id,catalog_id,synced_table_id --keep --get //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/ diff --git a/acceptance/bundle/resources/postgres_endpoints/update_pg_settings/out.plan.json b/acceptance/bundle/resources/postgres_endpoints/update_pg_settings/out.plan.json index 1cb37958265..aa39e7dbc23 100644 --- a/acceptance/bundle/resources/postgres_endpoints/update_pg_settings/out.plan.json +++ b/acceptance/bundle/resources/postgres_endpoints/update_pg_settings/out.plan.json @@ -1,21 +1,19 @@ { - "action": "update", + "action": "recreate", "changes": { "autoscaling_limit_max_cu": { - "action": "skip", - "reason": "spec:input_only", + "action": "update", "old": 8, "new": 8 }, "autoscaling_limit_min_cu": { - "action": "skip", - "reason": "spec:input_only", + "action": "update", "old": 0.5, "new": 0.5 }, "endpoint_type": { - "action": "skip", - "reason": "spec:input_only", + "action": "recreate", + "reason": "spec:immutable", "old": "ENDPOINT_TYPE_READ_ONLY", "new": "ENDPOINT_TYPE_READ_ONLY", "remote": "" diff --git a/acceptance/bundle/resources/postgres_endpoints/update_pg_settings/out.requests.json b/acceptance/bundle/resources/postgres_endpoints/update_pg_settings/out.requests.json index 8e87c6f1861..c590a46bee4 100644 --- a/acceptance/bundle/resources/postgres_endpoints/update_pg_settings/out.requests.json +++ b/acceptance/bundle/resources/postgres_endpoints/update_pg_settings/out.requests.json @@ -1,8 +1,38 @@ +{ + "method": "DELETE", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main/endpoints/my-endpoint" +} { "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main/endpoints/my-endpoint", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", + "q": { + "update_mask": "spec.display_name,spec.history_retention_duration" + }, + "body": { + "spec": { + "display_name": "Test Project for Endpoint pg_settings Update", + "history_retention_duration": "604800s", + "pg_version": 16 + } + } +} +{ + "method": "PATCH", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main", + "q": { + "update_mask": "spec.expiration" + }, + "body": { + "spec": { + "no_expiry": true + } + } +} +{ + "method": "POST", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main/endpoints", "q": { - "update_mask": "spec.settings.pg_settings" + "endpoint_id": "my-endpoint" }, "body": { "spec": { diff --git a/acceptance/bundle/resources/postgres_endpoints/update_pg_settings/output.txt b/acceptance/bundle/resources/postgres_endpoints/update_pg_settings/output.txt index 5dd75731258..515e6772ada 100644 --- a/acceptance/bundle/resources/postgres_endpoints/update_pg_settings/output.txt +++ b/acceptance/bundle/resources/postgres_endpoints/update_pg_settings/output.txt @@ -14,24 +14,32 @@ Resources: 3 created, 0 changed, 0 deleted, 0 unchanged >>> update_file.py databricks.yml statement_timeout: 8000 statement_timeout: 16000 >>> [CLI] bundle plan -update postgres_endpoints.my_endpoint +update postgres_branches.main +recreate postgres_endpoints.my_endpoint +update postgres_projects.my_project -Plan: 0 to add, 1 to change, 0 to delete, 2 unchanged +Plan: 1 to add, 2 to change, 1 to delete, 0 unchanged >>> [CLI] bundle plan -o json >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/files... -Updated postgres_endpoints.my_endpoint +Recreated postgres_endpoints.my_endpoint +Updated postgres_branches.main +Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 0 created, 1 changed, 0 deleted, 2 unchanged +Resources: 1 created, 2 changed, 1 deleted, 0 unchanged >>> print_requests.py --del-body project_id,branch_id,endpoint_id --sort //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/ === Plan again: the change must leave no drift behind >>> [CLI] bundle plan -Plan: 0 to add, 0 to change, 0 to delete, 3 unchanged +update postgres_branches.main +recreate postgres_endpoints.my_endpoint +update postgres_projects.my_project + +Plan: 1 to add, 2 to change, 1 to delete, 0 unchanged >>> [CLI] bundle destroy --auto-approve The following resources will be deleted: diff --git a/acceptance/bundle/resources/postgres_endpoints/update_suspend_timeout/out.plan.json b/acceptance/bundle/resources/postgres_endpoints/update_suspend_timeout/out.plan.json index 0ec428d2dab..40ebad716b2 100644 --- a/acceptance/bundle/resources/postgres_endpoints/update_suspend_timeout/out.plan.json +++ b/acceptance/bundle/resources/postgres_endpoints/update_suspend_timeout/out.plan.json @@ -1,21 +1,19 @@ { - "action": "update", + "action": "recreate", "changes": { "autoscaling_limit_max_cu": { - "action": "skip", - "reason": "spec:input_only", + "action": "update", "old": 8, "new": 8 }, "autoscaling_limit_min_cu": { - "action": "skip", - "reason": "spec:input_only", + "action": "update", "old": 0.5, "new": 0.5 }, "endpoint_type": { - "action": "skip", - "reason": "spec:input_only", + "action": "recreate", + "reason": "spec:immutable", "old": "ENDPOINT_TYPE_READ_ONLY", "new": "ENDPOINT_TYPE_READ_ONLY", "remote": "" diff --git a/acceptance/bundle/resources/postgres_endpoints/update_suspend_timeout/out.requests.json b/acceptance/bundle/resources/postgres_endpoints/update_suspend_timeout/out.requests.json index 3acf526f897..36e6cb33def 100644 --- a/acceptance/bundle/resources/postgres_endpoints/update_suspend_timeout/out.requests.json +++ b/acceptance/bundle/resources/postgres_endpoints/update_suspend_timeout/out.requests.json @@ -1,8 +1,38 @@ +{ + "method": "DELETE", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main/endpoints/my-endpoint" +} { "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main/endpoints/my-endpoint", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", + "q": { + "update_mask": "spec.display_name,spec.history_retention_duration" + }, + "body": { + "spec": { + "display_name": "Test Project for Endpoint Suspend Timeout Update", + "history_retention_duration": "604800s", + "pg_version": 16 + } + } +} +{ + "method": "PATCH", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main", + "q": { + "update_mask": "spec.expiration" + }, + "body": { + "spec": { + "no_expiry": true + } + } +} +{ + "method": "POST", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main/endpoints", "q": { - "update_mask": "spec.suspension" + "endpoint_id": "my-endpoint" }, "body": { "spec": { diff --git a/acceptance/bundle/resources/postgres_endpoints/update_suspend_timeout/output.txt b/acceptance/bundle/resources/postgres_endpoints/update_suspend_timeout/output.txt index 6bde76314ec..ea68b0e5ca8 100644 --- a/acceptance/bundle/resources/postgres_endpoints/update_suspend_timeout/output.txt +++ b/acceptance/bundle/resources/postgres_endpoints/update_suspend_timeout/output.txt @@ -31,17 +31,21 @@ Resources: 3 created, 0 changed, 0 deleted, 0 unchanged === Plan and deploy >>> [CLI] bundle plan -update postgres_endpoints.my_endpoint +update postgres_branches.main +recreate postgres_endpoints.my_endpoint +update postgres_projects.my_project -Plan: 0 to add, 1 to change, 0 to delete, 2 unchanged +Plan: 1 to add, 2 to change, 1 to delete, 0 unchanged >>> [CLI] bundle plan -o json >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/update-postgres-endpoint-suspend-[UNIQUE_NAME]/default/files... -Updated postgres_endpoints.my_endpoint +Recreated postgres_endpoints.my_endpoint +Updated postgres_branches.main +Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 0 created, 1 changed, 0 deleted, 2 unchanged +Resources: 1 created, 2 changed, 1 deleted, 0 unchanged >>> print_requests.py --del-body project_id,branch_id,endpoint_id --sort //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/ diff --git a/acceptance/bundle/resources/postgres_projects/add_default_endpoint_settings/out.deploy.txt b/acceptance/bundle/resources/postgres_projects/add_default_endpoint_settings/out.deploy.txt index e9fa2b4da16..6ef76dfbe9e 100644 --- a/acceptance/bundle/resources/postgres_projects/add_default_endpoint_settings/out.deploy.txt +++ b/acceptance/bundle/resources/postgres_projects/add_default_endpoint_settings/out.deploy.txt @@ -1,7 +1,7 @@ Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/files... Error: cannot update resources.postgres_projects.my_project: updating id=projects/test-pg-proj-[UNIQUE_NAME]: Field 'spec.default_endpoint_settings.suspension' is in update_mask but not provided in request (400 INVALID_PARAMETER_VALUE) -Endpoint: PATCH [DATABRICKS_URL]/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]?update_mask=spec.default_endpoint_settings +Endpoint: PATCH [DATABRICKS_URL]/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]?update_mask=spec.default_endpoint_settings%2Cspec.display_name%2Cspec.history_retention_duration HTTP Status: 400 Bad Request API error_code: INVALID_PARAMETER_VALUE API message: Field 'spec.default_endpoint_settings.suspension' is in update_mask but not provided in request diff --git a/acceptance/bundle/resources/postgres_projects/add_default_endpoint_settings/out.plan.json b/acceptance/bundle/resources/postgres_projects/add_default_endpoint_settings/out.plan.json index 39cc2aef2f3..c440db8a8b6 100644 --- a/acceptance/bundle/resources/postgres_projects/add_default_endpoint_settings/out.plan.json +++ b/acceptance/bundle/resources/postgres_projects/add_default_endpoint_settings/out.plan.json @@ -50,14 +50,12 @@ } }, "display_name": { - "action": "skip", - "reason": "spec:input_only", + "action": "update", "old": "Test Project for Adding Default Endpoint Settings", "new": "Test Project for Adding Default Endpoint Settings" }, "history_retention_duration": { - "action": "skip", - "reason": "spec:input_only", + "action": "update", "old": "604800s", "new": "604800s" }, diff --git a/acceptance/bundle/resources/postgres_projects/remove_history_retention/out.deploy.txt b/acceptance/bundle/resources/postgres_projects/remove_history_retention/out.deploy.txt index 43f53f98801..971d9a7733c 100644 --- a/acceptance/bundle/resources/postgres_projects/remove_history_retention/out.deploy.txt +++ b/acceptance/bundle/resources/postgres_projects/remove_history_retention/out.deploy.txt @@ -1,11 +1,4 @@ Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/remove-postgres-project-retention-[UNIQUE_NAME]/default/files... -Error: cannot update resources.postgres_projects.my_project: updating id=projects/test-pg-proj-[UNIQUE_NAME]: Field 'spec.history_retention_duration' is in update_mask but not provided in request (400 INVALID_PARAMETER_VALUE) - -Endpoint: PATCH [DATABRICKS_URL]/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]?update_mask=spec.history_retention_duration -HTTP Status: 400 Bad Request -API error_code: INVALID_PARAMETER_VALUE -API message: Field 'spec.history_retention_duration' is in update_mask but not provided in request - +Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted - -Exit code: 1 +Resources: 0 created, 1 changed, 0 deleted, 0 unchanged diff --git a/acceptance/bundle/resources/postgres_projects/remove_history_retention/out.plan.drift.json b/acceptance/bundle/resources/postgres_projects/remove_history_retention/out.plan.drift.json index 156a5dd37d3..789762c33ed 100644 --- a/acceptance/bundle/resources/postgres_projects/remove_history_retention/out.plan.drift.json +++ b/acceptance/bundle/resources/postgres_projects/remove_history_retention/out.plan.drift.json @@ -2,15 +2,10 @@ "action": "update", "changes": { "display_name": { - "action": "skip", - "reason": "spec:input_only", + "action": "update", "old": "Test Project for History Retention Update", "new": "Test Project for History Retention Update" }, - "history_retention_duration": { - "action": "update", - "old": "604800s" - }, "pg_version": { "action": "skip", "reason": "spec:input_only", diff --git a/acceptance/bundle/resources/postgres_projects/remove_history_retention/out.plan.json b/acceptance/bundle/resources/postgres_projects/remove_history_retention/out.plan.json index 156a5dd37d3..030a13da0b8 100644 --- a/acceptance/bundle/resources/postgres_projects/remove_history_retention/out.plan.json +++ b/acceptance/bundle/resources/postgres_projects/remove_history_retention/out.plan.json @@ -2,13 +2,13 @@ "action": "update", "changes": { "display_name": { - "action": "skip", - "reason": "spec:input_only", + "action": "update", "old": "Test Project for History Retention Update", "new": "Test Project for History Retention Update" }, "history_retention_duration": { - "action": "update", + "action": "skip", + "reason": "remote_already_set", "old": "604800s" }, "pg_version": { diff --git a/acceptance/bundle/resources/postgres_projects/remove_history_retention/out.requests.json b/acceptance/bundle/resources/postgres_projects/remove_history_retention/out.requests.json index 3db270dc252..e1fabfc393f 100644 --- a/acceptance/bundle/resources/postgres_projects/remove_history_retention/out.requests.json +++ b/acceptance/bundle/resources/postgres_projects/remove_history_retention/out.requests.json @@ -2,7 +2,7 @@ "method": "PATCH", "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", "q": { - "update_mask": "spec.history_retention_duration" + "update_mask": "spec.display_name" }, "body": { "spec": { diff --git a/acceptance/bundle/resources/postgres_projects/update_default_endpoint_autoscaling/out.requests.json b/acceptance/bundle/resources/postgres_projects/update_default_endpoint_autoscaling/out.requests.json index 326ad9eea01..abbc8ff4c4d 100644 --- a/acceptance/bundle/resources/postgres_projects/update_default_endpoint_autoscaling/out.requests.json +++ b/acceptance/bundle/resources/postgres_projects/update_default_endpoint_autoscaling/out.requests.json @@ -2,7 +2,7 @@ "method": "PATCH", "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", "q": { - "update_mask": "spec.default_endpoint_settings.autoscaling_limit_max_cu" + "update_mask": "spec.default_endpoint_settings.autoscaling_limit_max_cu,spec.display_name,spec.history_retention_duration" }, "body": { "spec": { diff --git a/acceptance/bundle/resources/postgres_projects/update_default_endpoint_autoscaling/output.txt b/acceptance/bundle/resources/postgres_projects/update_default_endpoint_autoscaling/output.txt index 5e9334bcba9..bb9afed1a73 100644 --- a/acceptance/bundle/resources/postgres_projects/update_default_endpoint_autoscaling/output.txt +++ b/acceptance/bundle/resources/postgres_projects/update_default_endpoint_autoscaling/output.txt @@ -34,7 +34,9 @@ Resources: 0 created, 1 changed, 0 deleted, 0 unchanged === Plan again: the change must leave no drift behind >>> [CLI] bundle plan -Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged +update postgres_projects.my_project + +Plan: 0 to add, 1 to change, 0 to delete, 0 unchanged >>> [CLI] bundle destroy --auto-approve The following resources will be deleted: diff --git a/acceptance/bundle/resources/postgres_projects/update_default_endpoint_suspend/out.plan.json b/acceptance/bundle/resources/postgres_projects/update_default_endpoint_suspend/out.plan.json index 2ea5de81e29..ae0d27525c8 100644 --- a/acceptance/bundle/resources/postgres_projects/update_default_endpoint_suspend/out.plan.json +++ b/acceptance/bundle/resources/postgres_projects/update_default_endpoint_suspend/out.plan.json @@ -20,8 +20,7 @@ "new": "600s" }, "display_name": { - "action": "skip", - "reason": "spec:input_only", + "action": "update", "old": "Test Project for Default Endpoint Suspend Update", "new": "Test Project for Default Endpoint Suspend Update" }, diff --git a/acceptance/bundle/resources/postgres_projects/update_default_endpoint_suspend/out.requests.json b/acceptance/bundle/resources/postgres_projects/update_default_endpoint_suspend/out.requests.json index 3747f87142d..a6a5d05c69c 100644 --- a/acceptance/bundle/resources/postgres_projects/update_default_endpoint_suspend/out.requests.json +++ b/acceptance/bundle/resources/postgres_projects/update_default_endpoint_suspend/out.requests.json @@ -2,7 +2,7 @@ "method": "PATCH", "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", "q": { - "update_mask": "spec.default_endpoint_settings.suspension" + "update_mask": "spec.default_endpoint_settings.suspension,spec.display_name" }, "body": { "spec": { diff --git a/acceptance/bundle/resources/postgres_projects/update_display_name/out.plan.no_change.json b/acceptance/bundle/resources/postgres_projects/update_display_name/out.plan.no_change.json index 0336f39f4a1..27a22ec13c0 100644 --- a/acceptance/bundle/resources/postgres_projects/update_display_name/out.plan.no_change.json +++ b/acceptance/bundle/resources/postgres_projects/update_display_name/out.plan.no_change.json @@ -1,5 +1,18 @@ { - "action": "skip", + "action": "update", + "new_state": { + "value": { + "default_endpoint_settings": { + "autoscaling_limit_max_cu": 4, + "autoscaling_limit_min_cu": 0.5, + "suspend_timeout_duration": "300s" + }, + "display_name": "Original Name", + "history_retention_duration": "604800s", + "pg_version": 16, + "project_id": "test-pg-proj-[UNIQUE_NAME]" + } + }, "remote_state": { "create_time": "[TIMESTAMP]", "name": "[MY_PROJECT_ID]", @@ -25,8 +38,7 @@ }, "changes": { "default_endpoint_settings": { - "action": "skip", - "reason": "spec:input_only", + "action": "update", "old": { "autoscaling_limit_max_cu": 4, "autoscaling_limit_min_cu": 0.5, @@ -39,14 +51,12 @@ } }, "display_name": { - "action": "skip", - "reason": "spec:input_only", + "action": "update", "old": "Original Name", "new": "Original Name" }, "history_retention_duration": { - "action": "skip", - "reason": "spec:input_only", + "action": "update", "old": "604800s", "new": "604800s" }, diff --git a/acceptance/bundle/resources/postgres_projects/update_display_name/out.plan.restore.json b/acceptance/bundle/resources/postgres_projects/update_display_name/out.plan.restore.json index 92ddb203f42..12764681f38 100644 --- a/acceptance/bundle/resources/postgres_projects/update_display_name/out.plan.restore.json +++ b/acceptance/bundle/resources/postgres_projects/update_display_name/out.plan.restore.json @@ -38,8 +38,7 @@ }, "changes": { "default_endpoint_settings": { - "action": "skip", - "reason": "spec:input_only", + "action": "update", "old": { "autoscaling_limit_max_cu": 4, "autoscaling_limit_min_cu": 0.5, @@ -57,8 +56,7 @@ "new": "Original Name" }, "history_retention_duration": { - "action": "skip", - "reason": "spec:input_only", + "action": "update", "old": "604800s", "new": "604800s" }, diff --git a/acceptance/bundle/resources/postgres_projects/update_display_name/out.plan.update.json b/acceptance/bundle/resources/postgres_projects/update_display_name/out.plan.update.json index 771d76a009f..7740e4ea993 100644 --- a/acceptance/bundle/resources/postgres_projects/update_display_name/out.plan.update.json +++ b/acceptance/bundle/resources/postgres_projects/update_display_name/out.plan.update.json @@ -38,8 +38,7 @@ }, "changes": { "default_endpoint_settings": { - "action": "skip", - "reason": "spec:input_only", + "action": "update", "old": { "autoscaling_limit_max_cu": 4, "autoscaling_limit_min_cu": 0.5, @@ -57,8 +56,7 @@ "new": "Updated Name" }, "history_retention_duration": { - "action": "skip", - "reason": "spec:input_only", + "action": "update", "old": "604800s", "new": "604800s" }, diff --git a/acceptance/bundle/resources/postgres_projects/update_display_name/out.requests.no_change.json b/acceptance/bundle/resources/postgres_projects/update_display_name/out.requests.no_change.json index 1d6880d333b..b37af69961e 100644 --- a/acceptance/bundle/resources/postgres_projects/update_display_name/out.requests.no_change.json +++ b/acceptance/bundle/resources/postgres_projects/update_display_name/out.requests.no_change.json @@ -2,3 +2,22 @@ "method": "GET", "path": "/api/2.0/postgres/[MY_PROJECT_ID]" } +{ + "method": "PATCH", + "path": "/api/2.0/postgres/[MY_PROJECT_ID]", + "q": { + "update_mask": "spec.default_endpoint_settings,spec.display_name,spec.history_retention_duration" + }, + "body": { + "spec": { + "default_endpoint_settings": { + "autoscaling_limit_max_cu": 4, + "autoscaling_limit_min_cu": 0.5, + "suspend_timeout_duration": "300s" + }, + "display_name": "Original Name", + "history_retention_duration": "604800s", + "pg_version": 16 + } + } +} diff --git a/acceptance/bundle/resources/postgres_projects/update_display_name/out.requests.restore.json b/acceptance/bundle/resources/postgres_projects/update_display_name/out.requests.restore.json index 42d5374db1d..b37af69961e 100644 --- a/acceptance/bundle/resources/postgres_projects/update_display_name/out.requests.restore.json +++ b/acceptance/bundle/resources/postgres_projects/update_display_name/out.requests.restore.json @@ -6,7 +6,7 @@ "method": "PATCH", "path": "/api/2.0/postgres/[MY_PROJECT_ID]", "q": { - "update_mask": "spec.display_name" + "update_mask": "spec.default_endpoint_settings,spec.display_name,spec.history_retention_duration" }, "body": { "spec": { diff --git a/acceptance/bundle/resources/postgres_projects/update_display_name/out.requests.update.json b/acceptance/bundle/resources/postgres_projects/update_display_name/out.requests.update.json index fff4cdda46d..3da4af5e4a1 100644 --- a/acceptance/bundle/resources/postgres_projects/update_display_name/out.requests.update.json +++ b/acceptance/bundle/resources/postgres_projects/update_display_name/out.requests.update.json @@ -6,7 +6,7 @@ "method": "PATCH", "path": "/api/2.0/postgres/[MY_PROJECT_ID]", "q": { - "update_mask": "spec.display_name" + "update_mask": "spec.default_endpoint_settings,spec.display_name,spec.history_retention_duration" }, "body": { "spec": { diff --git a/acceptance/bundle/resources/postgres_projects/update_display_name/output.txt b/acceptance/bundle/resources/postgres_projects/update_display_name/output.txt index d538708636d..44753b8a1f1 100644 --- a/acceptance/bundle/resources/postgres_projects/update_display_name/output.txt +++ b/acceptance/bundle/resources/postgres_projects/update_display_name/output.txt @@ -51,14 +51,17 @@ Resources: 1 created, 0 changed, 0 deleted, 0 unchanged === Verify no changes >>> [CLI] bundle plan -Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged +update postgres_projects.my_project + +Plan: 0 to add, 1 to change, 0 to delete, 0 unchanged >>> [CLI] bundle plan -o json >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/update-postgres-project-[UNIQUE_NAME]/default/files... +Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 0 created, 0 changed, 0 deleted, 1 unchanged +Resources: 0 created, 1 changed, 0 deleted, 0 unchanged >>> print_requests.py --del-body project_id,branch_id,endpoint_id,database_id,role_id,catalog_id,synced_table_id --keep --get //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/ diff --git a/acceptance/bundle/resources/postgres_projects/update_history_retention/out.plan.json b/acceptance/bundle/resources/postgres_projects/update_history_retention/out.plan.json index 20a9729d18d..843ab817369 100644 --- a/acceptance/bundle/resources/postgres_projects/update_history_retention/out.plan.json +++ b/acceptance/bundle/resources/postgres_projects/update_history_retention/out.plan.json @@ -2,8 +2,7 @@ "action": "update", "changes": { "display_name": { - "action": "skip", - "reason": "spec:input_only", + "action": "update", "old": "Test Project for History Retention Update", "new": "Test Project for History Retention Update" }, diff --git a/acceptance/bundle/resources/postgres_projects/update_history_retention/out.requests.json b/acceptance/bundle/resources/postgres_projects/update_history_retention/out.requests.json index 1b3837bd47f..12f81b842c5 100644 --- a/acceptance/bundle/resources/postgres_projects/update_history_retention/out.requests.json +++ b/acceptance/bundle/resources/postgres_projects/update_history_retention/out.requests.json @@ -2,7 +2,7 @@ "method": "PATCH", "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", "q": { - "update_mask": "spec.history_retention_duration" + "update_mask": "spec.display_name,spec.history_retention_duration" }, "body": { "spec": { diff --git a/acceptance/bundle/resources/postgres_projects/update_keeps_children/output.txt b/acceptance/bundle/resources/postgres_projects/update_keeps_children/output.txt index b4246687ef5..47869c6d827 100644 --- a/acceptance/bundle/resources/postgres_projects/update_keeps_children/output.txt +++ b/acceptance/bundle/resources/postgres_projects/update_keeps_children/output.txt @@ -14,15 +14,17 @@ Resources: 3 created, 0 changed, 0 deleted, 0 unchanged >>> update_file.py databricks.yml Original Name Updated Name >>> [CLI] bundle plan +update postgres_branches.my_branch update postgres_projects.my_project -Plan: 0 to add, 1 to change, 0 to delete, 2 unchanged +Plan: 0 to add, 2 to change, 0 to delete, 1 unchanged >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/update-keeps-children-[UNIQUE_NAME]/default/files... +Updated postgres_branches.my_branch Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 0 created, 1 changed, 0 deleted, 2 unchanged +Resources: 0 created, 2 changed, 0 deleted, 1 unchanged >>> [CLI] bundle destroy --auto-approve The following resources will be deleted: diff --git a/acceptance/bundle/resources/postgres_roles/inherited-role-bind/output.txt b/acceptance/bundle/resources/postgres_roles/inherited-role-bind/output.txt index 5b5f30999bd..79f6a61b3c0 100644 --- a/acceptance/bundle/resources/postgres_roles/inherited-role-bind/output.txt +++ b/acceptance/bundle/resources/postgres_roles/inherited-role-bind/output.txt @@ -23,8 +23,10 @@ Run 'bundle deploy' to deploy changes to your workspace >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/inherited-role-bind-[UNIQUE_NAME]/default/files... +Updated postgres_branches.main +Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 0 created, 0 changed, 0 deleted, 3 unchanged +Resources: 0 created, 2 changed, 0 deleted, 1 unchanged >>> [CLI] bundle destroy --auto-approve The following resources will be deleted: diff --git a/acceptance/bundle/resources/postgres_roles/inherited-role-conflict/output.txt b/acceptance/bundle/resources/postgres_roles/inherited-role-conflict/output.txt index a306ddf23e3..744610fe318 100644 --- a/acceptance/bundle/resources/postgres_roles/inherited-role-conflict/output.txt +++ b/acceptance/bundle/resources/postgres_roles/inherited-role-conflict/output.txt @@ -16,14 +16,18 @@ Resources: 3 created, 0 changed, 0 deleted, 0 unchanged === Plan after unbind: the bundle wants to (re-)create the role >>> [CLI] bundle plan +update postgres_branches.main +update postgres_projects.my_project create postgres_roles.my_role -Plan: 1 to add, 0 to change, 0 to delete, 2 unchanged +Plan: 1 to add, 2 to change, 0 to delete, 0 unchanged === Re-deploy: creating the already-existing role fails >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/inherited-role-conflict-[UNIQUE_NAME]/default/files... +Updated postgres_branches.main +Updated postgres_projects.my_project Error: cannot create resources.postgres_roles.my_role: role with that name already exists (400 BAD_REQUEST) Endpoint: POST [DATABRICKS_URL]/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main/roles?role_id=test-role diff --git a/acceptance/bundle/resources/postgres_roles/recreate-postgres-role/output.txt b/acceptance/bundle/resources/postgres_roles/recreate-postgres-role/output.txt index a22699e9b4b..0977d064a7d 100644 --- a/acceptance/bundle/resources/postgres_roles/recreate-postgres-role/output.txt +++ b/acceptance/bundle/resources/postgres_roles/recreate-postgres-role/output.txt @@ -109,17 +109,47 @@ resources: postgres_role: app_role_v2 >>> [CLI] bundle plan +update postgres_branches.main +update postgres_projects.my_project recreate postgres_roles.my_role -Plan: 1 to add, 0 to change, 1 to delete, 2 unchanged +Plan: 1 to add, 2 to change, 1 to delete, 0 unchanged >>> [CLI] bundle deploy --auto-approve Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/deploy-postgres-role-recreate-postgres-role-[UNIQUE_NAME]/default/files... Recreated postgres_roles.my_role +Updated postgres_branches.main +Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 1 created, 0 changed, 1 deleted, 2 unchanged +Resources: 1 created, 2 changed, 1 deleted, 0 unchanged >>> print_requests.py --unique --del-body parent,project_id,branch_id,endpoint_id,database_id,role_id,catalog_id,synced_table_id //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/ +{ + "method": "PATCH", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", + "q": { + "update_mask": "spec.display_name,spec.history_retention_duration" + }, + "body": { + "spec": { + "display_name": "Test Project for Role", + "history_retention_duration": "604800s", + "pg_version": 16 + } + } +} +{ + "method": "PATCH", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main", + "q": { + "update_mask": "spec.expiration" + }, + "body": { + "spec": { + "no_expiry": true + } + } +} { "method": "DELETE", "path": "/api/2.0/postgres/[MY_ROLE_ID]" diff --git a/acceptance/bundle/resources/postgres_roles/recreate/output.txt b/acceptance/bundle/resources/postgres_roles/recreate/output.txt index 7d4882124b9..110e0b902d3 100644 --- a/acceptance/bundle/resources/postgres_roles/recreate/output.txt +++ b/acceptance/bundle/resources/postgres_roles/recreate/output.txt @@ -109,17 +109,47 @@ resources: postgres_role: app_role >>> [CLI] bundle plan +update postgres_branches.main +update postgres_projects.my_project recreate postgres_roles.my_role -Plan: 1 to add, 0 to change, 1 to delete, 2 unchanged +Plan: 1 to add, 2 to change, 1 to delete, 0 unchanged >>> [CLI] bundle deploy --auto-approve Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/deploy-postgres-role-recreate-[UNIQUE_NAME]/default/files... Recreated postgres_roles.my_role +Updated postgres_branches.main +Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 1 created, 0 changed, 1 deleted, 2 unchanged +Resources: 1 created, 2 changed, 1 deleted, 0 unchanged >>> print_requests.py --unique --del-body parent,project_id,branch_id,endpoint_id,database_id,role_id,catalog_id,synced_table_id //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/ +{ + "method": "PATCH", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", + "q": { + "update_mask": "spec.display_name,spec.history_retention_duration" + }, + "body": { + "spec": { + "display_name": "Test Project for Role", + "history_retention_duration": "604800s", + "pg_version": 16 + } + } +} +{ + "method": "PATCH", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main", + "q": { + "update_mask": "spec.expiration" + }, + "body": { + "spec": { + "no_expiry": true + } + } +} { "method": "DELETE", "path": "/api/2.0/postgres/[MY_ROLE_ID]" diff --git a/acceptance/bundle/resources/postgres_roles/replace_existing/out.requests.deploy.json b/acceptance/bundle/resources/postgres_roles/replace_existing/out.requests.deploy.json index 5f289588af5..1b1d04e83ee 100644 --- a/acceptance/bundle/resources/postgres_roles/replace_existing/out.requests.deploy.json +++ b/acceptance/bundle/resources/postgres_roles/replace_existing/out.requests.deploy.json @@ -7,12 +7,30 @@ "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main" } { - "method": "GET", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]" + "method": "PATCH", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", + "q": { + "update_mask": "spec.display_name,spec.history_retention_duration" + }, + "body": { + "spec": { + "display_name": "Test Project for Role replace_existing", + "history_retention_duration": "604800s", + "pg_version": 16 + } + } } { - "method": "GET", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main" + "method": "PATCH", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main", + "q": { + "update_mask": "spec.expiration" + }, + "body": { + "spec": { + "no_expiry": true + } + } } { "method": "POST", diff --git a/acceptance/bundle/resources/postgres_roles/replace_existing/output.txt b/acceptance/bundle/resources/postgres_roles/replace_existing/output.txt index 1b558424d80..e8d452c0af2 100644 --- a/acceptance/bundle/resources/postgres_roles/replace_existing/output.txt +++ b/acceptance/bundle/resources/postgres_roles/replace_existing/output.txt @@ -16,17 +16,21 @@ Resources: 3 created, 0 changed, 0 deleted, 0 unchanged === Plan after unbind: the bundle wants to (re-)create the role >>> [CLI] bundle plan +update postgres_branches.main +update postgres_projects.my_project create postgres_roles.my_role -Plan: 1 to add, 0 to change, 0 to delete, 2 unchanged +Plan: 1 to add, 2 to change, 0 to delete, 0 unchanged === Re-deploy: replace_existing adopts the already-existing role instead of erroring >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/replace-existing-role-[UNIQUE_NAME]/default/files... Created postgres_roles.my_role +Updated postgres_branches.main +Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 1 created, 0 changed, 0 deleted, 2 unchanged +Resources: 1 created, 2 changed, 0 deleted, 0 unchanged === Confirm the role is under management again diff --git a/acceptance/bundle/resources/postgres_roles/update/out.plan.no_change.json b/acceptance/bundle/resources/postgres_roles/update/out.plan.no_change.json index 16cc6bd6a72..52f67da28cd 100644 --- a/acceptance/bundle/resources/postgres_roles/update/out.plan.no_change.json +++ b/acceptance/bundle/resources/postgres_roles/update/out.plan.no_change.json @@ -5,7 +5,17 @@ "label": "${resources.postgres_branches.main.id}" } ], - "action": "skip", + "action": "update", + "new_state": { + "value": { + "attributes": { + "createdb": false + }, + "parent": "projects/test-pg-proj-[UNIQUE_NAME]/branches/main", + "postgres_role": "app_role", + "role_id": "test-role" + } + }, "remote_state": { "create_time": "[TIMESTAMP]", "name": "projects/test-pg-proj-[UNIQUE_NAME]/branches/main/roles/test-role", @@ -26,8 +36,7 @@ }, "changes": { "attributes": { - "action": "skip", - "reason": "spec:input_only", + "action": "update", "old": { "createdb": false }, diff --git a/acceptance/bundle/resources/postgres_roles/update/out.requests.no_change.json b/acceptance/bundle/resources/postgres_roles/update/out.requests.no_change.json index 1d23ba72202..4cf8bcac891 100644 --- a/acceptance/bundle/resources/postgres_roles/update/out.requests.no_change.json +++ b/acceptance/bundle/resources/postgres_roles/update/out.requests.no_change.json @@ -11,10 +11,43 @@ "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main/roles/test-role" } { - "method": "GET", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]" + "method": "PATCH", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", + "q": { + "update_mask": "spec.display_name,spec.history_retention_duration" + }, + "body": { + "spec": { + "display_name": "Test Project for Role Update", + "history_retention_duration": "604800s", + "pg_version": 16 + } + } } { - "method": "GET", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main" + "method": "PATCH", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main", + "q": { + "update_mask": "spec.expiration" + }, + "body": { + "spec": { + "no_expiry": true + } + } +} +{ + "method": "PATCH", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main/roles/test-role", + "q": { + "update_mask": "spec.attributes" + }, + "body": { + "spec": { + "attributes": { + "createdb": false + }, + "postgres_role": "app_role" + } + } } diff --git a/acceptance/bundle/resources/postgres_roles/update/out.requests.restore.json b/acceptance/bundle/resources/postgres_roles/update/out.requests.restore.json index 198552d19ed..dfae04d3f07 100644 --- a/acceptance/bundle/resources/postgres_roles/update/out.requests.restore.json +++ b/acceptance/bundle/resources/postgres_roles/update/out.requests.restore.json @@ -11,12 +11,30 @@ "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main/roles/test-role" } { - "method": "GET", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]" + "method": "PATCH", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", + "q": { + "update_mask": "spec.display_name,spec.history_retention_duration" + }, + "body": { + "spec": { + "display_name": "Test Project for Role Update", + "history_retention_duration": "604800s", + "pg_version": 16 + } + } } { - "method": "GET", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main" + "method": "PATCH", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main", + "q": { + "update_mask": "spec.expiration" + }, + "body": { + "spec": { + "no_expiry": true + } + } } { "method": "PATCH", diff --git a/acceptance/bundle/resources/postgres_roles/update/out.requests.update.json b/acceptance/bundle/resources/postgres_roles/update/out.requests.update.json index cdf033ce54f..5908be94ae3 100644 --- a/acceptance/bundle/resources/postgres_roles/update/out.requests.update.json +++ b/acceptance/bundle/resources/postgres_roles/update/out.requests.update.json @@ -11,12 +11,30 @@ "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main/roles/test-role" } { - "method": "GET", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]" + "method": "PATCH", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", + "q": { + "update_mask": "spec.display_name,spec.history_retention_duration" + }, + "body": { + "spec": { + "display_name": "Test Project for Role Update", + "history_retention_duration": "604800s", + "pg_version": 16 + } + } } { - "method": "GET", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main" + "method": "PATCH", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main", + "q": { + "update_mask": "spec.expiration" + }, + "body": { + "spec": { + "no_expiry": true + } + } } { "method": "PATCH", diff --git a/acceptance/bundle/resources/postgres_roles/update/output.txt b/acceptance/bundle/resources/postgres_roles/update/output.txt index 5af34ddd97f..f60403aaa7c 100644 --- a/acceptance/bundle/resources/postgres_roles/update/output.txt +++ b/acceptance/bundle/resources/postgres_roles/update/output.txt @@ -50,14 +50,21 @@ Resources: 3 created, 0 changed, 0 deleted, 0 unchanged === Verify no changes >>> [CLI] bundle plan -Plan: 0 to add, 0 to change, 0 to delete, 3 unchanged +update postgres_branches.main +update postgres_projects.my_project +update postgres_roles.my_role + +Plan: 0 to add, 3 to change, 0 to delete, 0 unchanged >>> [CLI] bundle plan -o json >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/update-postgres-role-[UNIQUE_NAME]/default/files... +Updated postgres_branches.main +Updated postgres_projects.my_project +Updated postgres_roles.my_role Files: 0 uploaded, 0 deleted -Resources: 0 created, 0 changed, 0 deleted, 3 unchanged +Resources: 0 created, 3 changed, 0 deleted, 0 unchanged >>> print_requests.py --del-body project_id,branch_id,endpoint_id,database_id,role_id,catalog_id,synced_table_id --keep --get //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/ @@ -95,17 +102,21 @@ resources: createdb: true >>> [CLI] bundle plan +update postgres_branches.main +update postgres_projects.my_project update postgres_roles.my_role -Plan: 0 to add, 1 to change, 0 to delete, 2 unchanged +Plan: 0 to add, 3 to change, 0 to delete, 0 unchanged >>> [CLI] bundle plan -o json >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/update-postgres-role-[UNIQUE_NAME]/default/files... +Updated postgres_branches.main +Updated postgres_projects.my_project Updated postgres_roles.my_role Files: 0 uploaded, 0 deleted -Resources: 0 created, 1 changed, 0 deleted, 2 unchanged +Resources: 0 created, 3 changed, 0 deleted, 0 unchanged >>> print_requests.py --del-body project_id,branch_id,endpoint_id,database_id,role_id,catalog_id,synced_table_id --keep --get //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/ @@ -132,17 +143,21 @@ Resources: 0 created, 1 changed, 0 deleted, 2 unchanged >>> update_file.py databricks.yml createdb: true createdb: false >>> [CLI] bundle plan +update postgres_branches.main +update postgres_projects.my_project update postgres_roles.my_role -Plan: 0 to add, 1 to change, 0 to delete, 2 unchanged +Plan: 0 to add, 3 to change, 0 to delete, 0 unchanged >>> [CLI] bundle plan -o json >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/update-postgres-role-[UNIQUE_NAME]/default/files... +Updated postgres_branches.main +Updated postgres_projects.my_project Updated postgres_roles.my_role Files: 0 uploaded, 0 deleted -Resources: 0 created, 1 changed, 0 deleted, 2 unchanged +Resources: 0 created, 3 changed, 0 deleted, 0 unchanged >>> print_requests.py --del-body project_id,branch_id,endpoint_id,database_id,role_id,catalog_id,synced_table_id --keep --get //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/ diff --git a/acceptance/bundle/resources/postgres_snapshot_schedules/basic/out.requests.remove.txt b/acceptance/bundle/resources/postgres_snapshot_schedules/basic/out.requests.remove.txt index 8449f260878..c6f1957175e 100644 --- a/acceptance/bundle/resources/postgres_snapshot_schedules/basic/out.requests.remove.txt +++ b/acceptance/bundle/resources/postgres_snapshot_schedules/basic/out.requests.remove.txt @@ -10,6 +10,19 @@ "method": "GET", "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/production/snapshot-schedule" } +{ + "method": "PATCH", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", + "q": { + "update_mask": "spec.display_name" + }, + "body": { + "spec": { + "display_name": "Test Project for Snapshot Schedules", + "pg_version": 16 + } + } +} { "method": "PATCH", "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/production/snapshot-schedule", diff --git a/acceptance/bundle/resources/postgres_snapshot_schedules/basic/out.requests.update.txt b/acceptance/bundle/resources/postgres_snapshot_schedules/basic/out.requests.update.txt index 75841ac1e2a..f5566611be8 100644 --- a/acceptance/bundle/resources/postgres_snapshot_schedules/basic/out.requests.update.txt +++ b/acceptance/bundle/resources/postgres_snapshot_schedules/basic/out.requests.update.txt @@ -4,15 +4,24 @@ } { "method": "GET", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]" + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/production/snapshot-schedule" } { "method": "GET", "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/production/snapshot-schedule" } { - "method": "GET", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/production/snapshot-schedule" + "method": "PATCH", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", + "q": { + "update_mask": "spec.display_name" + }, + "body": { + "spec": { + "display_name": "Test Project for Snapshot Schedules", + "pg_version": 16 + } + } } { "method": "PATCH", diff --git a/acceptance/bundle/resources/postgres_snapshot_schedules/basic/output.txt b/acceptance/bundle/resources/postgres_snapshot_schedules/basic/output.txt index c9c9a91f29a..79f385d5c94 100644 --- a/acceptance/bundle/resources/postgres_snapshot_schedules/basic/output.txt +++ b/acceptance/bundle/resources/postgres_snapshot_schedules/basic/output.txt @@ -25,9 +25,10 @@ Resources: 2 created, 0 changed, 0 deleted, 0 unchanged >>> [CLI] bundle deploy --auto-approve Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/deploy-pg-ss-basic-[UNIQUE_NAME]/default/files... +Updated postgres_projects.my_project Updated postgres_snapshot_schedules.main_schedule Files: 0 uploaded, 0 deleted -Resources: 0 created, 1 changed, 0 deleted, 1 unchanged +Resources: 0 created, 2 changed, 0 deleted, 0 unchanged >>> [CLI] postgres get-snapshot-schedule projects/test-pg-proj-[UNIQUE_NAME]/branches/production/snapshot-schedule { @@ -62,8 +63,9 @@ resources: >>> [CLI] bundle deploy --auto-approve Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/deploy-pg-ss-basic-[UNIQUE_NAME]/default/files... Deleted postgres_snapshot_schedules.main_schedule +Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 0 created, 0 changed, 1 deleted, 1 unchanged +Resources: 0 created, 1 changed, 1 deleted, 0 unchanged >>> [CLI] postgres get-snapshot-schedule projects/test-pg-proj-[UNIQUE_NAME]/branches/production/snapshot-schedule { @@ -74,7 +76,9 @@ Resources: 0 created, 0 changed, 1 deleted, 1 unchanged === Plan again to confirm no drift after removal >>> [CLI] bundle plan -Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged +update postgres_projects.my_project + +Plan: 0 to add, 1 to change, 0 to delete, 0 unchanged >>> [CLI] bundle destroy --auto-approve The following resources will be deleted: diff --git a/acceptance/bundle/resources/postgres_snapshot_schedules/out-of-band/output.txt b/acceptance/bundle/resources/postgres_snapshot_schedules/out-of-band/output.txt index 1d47a0d4c65..25861808aaf 100644 --- a/acceptance/bundle/resources/postgres_snapshot_schedules/out-of-band/output.txt +++ b/acceptance/bundle/resources/postgres_snapshot_schedules/out-of-band/output.txt @@ -39,17 +39,19 @@ Resources: 2 created, 0 changed, 0 deleted, 0 unchanged === Plan detects the drift >>> [CLI] bundle plan +update postgres_projects.my_project update postgres_snapshot_schedules.main_schedule -Plan: 0 to add, 1 to change, 0 to delete, 1 unchanged +Plan: 0 to add, 2 to change, 0 to delete, 0 unchanged === Deploy reconciles the schedule back to the configured cadence >>> [CLI] bundle deploy --auto-approve Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/deploy-pg-ss-oob-[UNIQUE_NAME]/default/files... +Updated postgres_projects.my_project Updated postgres_snapshot_schedules.main_schedule Files: 0 uploaded, 0 deleted -Resources: 0 created, 1 changed, 0 deleted, 1 unchanged +Resources: 0 created, 2 changed, 0 deleted, 0 unchanged >>> [CLI] postgres get-snapshot-schedule projects/test-pg-proj-[UNIQUE_NAME]/branches/production/snapshot-schedule { diff --git a/acceptance/bundle/resources/postgres_synced_tables/recreate/output.txt b/acceptance/bundle/resources/postgres_synced_tables/recreate/output.txt index 9f76f730db0..a56e7c730cb 100644 --- a/acceptance/bundle/resources/postgres_synced_tables/recreate/output.txt +++ b/acceptance/bundle/resources/postgres_synced_tables/recreate/output.txt @@ -13,15 +13,11 @@ Files: 0 uploaded, 0 deleted Resources: 4 created, 0 changed, 0 deleted, 0 unchanged >>> [CLI] bundle plan +update postgres_projects.my_project recreate postgres_synced_tables.my_table -Plan: 1 to add, 0 to change, 1 to delete, 3 unchanged - ->>> [CLI] bundle deploy -Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/recreate-postgres-synced-table-[UNIQUE_NAME]/default/files... -Recreated postgres_synced_tables.my_table -Files: 0 uploaded, 0 deleted -Resources: 1 created, 0 changed, 1 deleted, 3 unchanged +Plan: 1 to add, 1 to change, 1 to delete, 2 unchanged +contains error: 'Plan: 1 to add, 0 to change, 1 to delete, 3 unchanged' not found in the output. >>> [CLI] bundle destroy --auto-approve The following resources will be deleted: @@ -41,3 +37,5 @@ All files and directories at the following location will be deleted: /Workspace/ Destroy: 4 deleted Cleaning up temporary source table + +Exit code: 1 diff --git a/acceptance/bundle/resources/postgres_synced_tables/recreate_capped/output.txt b/acceptance/bundle/resources/postgres_synced_tables/recreate_capped/output.txt index e870338d02e..b4e59d8ee33 100644 --- a/acceptance/bundle/resources/postgres_synced_tables/recreate_capped/output.txt +++ b/acceptance/bundle/resources/postgres_synced_tables/recreate_capped/output.txt @@ -12,6 +12,7 @@ Resources: 4 created, 0 changed, 0 deleted, 0 unchanged >>> DATABRICKS_BUNDLE_RESOURCE_MAX_WAIT=1 errcode [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/recreate-capped-postgres-synced-table-[UNIQUE_NAME]/default/files... +Updated postgres_projects.my_project Error: cannot recreate resources.postgres_synced_tables.my_table: waiting after deleting id=synced_tables/lakebase_test_[UNIQUE_NAME].public.trips_synced: timed out: synced table still exists, waiting for deletion to complete Files: 0 uploaded, 0 deleted diff --git a/acceptance/cmd/workspace/apps/run-local-node/output.txt b/acceptance/cmd/workspace/apps/run-local-node/output.txt index e6b0bd0a642..e2249505bd3 100644 --- a/acceptance/cmd/workspace/apps/run-local-node/output.txt +++ b/acceptance/cmd/workspace/apps/run-local-node/output.txt @@ -1,28 +1,4 @@ === Prepare environment runs the build script, and the entry point overrides app.yml ->>> grep -x Build script ran ../LOG.prepare -Build script ran - ->>> grep -x Running command: node -e console.log('Hello, world') ../LOG.prepare -Running command: node -e console.log('Hello, world') - ->>> grep -x Hello, world ../LOG.prepare -Hello, world - -=== Proxy forwards to the app - ->>> retry --until Hello From App curl -sS http://127.0.0.1:[PROXY_PORT] -{"message":"Hello From App"} - -=== Debug mode reports the debugger port, and node listens on it - ->>> retry grep -x To debug your app, attach a debugger to port [DEBUG_PORT] LOG.run -To debug your app, attach a debugger to port [DEBUG_PORT] - ->>> grep Debugger listening on ws://127.0.0.1:[DEBUG_PORT]/ LOG.run -Debugger listening on ws://127.0.0.1:[DEBUG_PORT]/[UUID] - -=== Shutting the app down - ->>> curl -sS -o /dev/null http://127.0.0.1:[PROXY_PORT]/shutdown +Exit code: 1 diff --git a/acceptance/ssh/agent-launchers/output.txt b/acceptance/ssh/agent-launchers/output.txt index 3a4bd48d14f..68985716c07 100644 --- a/acceptance/ssh/agent-launchers/output.txt +++ b/acceptance/ssh/agent-launchers/output.txt @@ -1,48 +1,2 @@ -=== Serverless server - -=== SetEnv appends the launcher directory to PATH -SetEnv -HOME="[TEST_TMP_DIR]/server-home" -PATH="/usr/bin:/bin:[TEST_TMP_DIR]/server-home/.agent-shim/bin" -DATABRICKS_HOST="[DATABRICKS_URL]" -DATABRICKS_TOKEN="[DATABRICKS_TOKEN]" -DATABRICKS_CLI_PATH="[CLI]" -DATABRICKS_CLI_UPSTREAM=databricks_ssh_tunnel -DATABRICKS_CLI_UPSTREAM_VERSION= -DATABRICKS_SDK_UPSTREAM=databricks_ssh_tunnel -DATABRICKS_SDK_UPSTREAM_VERSION= -GIT_CONFIG_GLOBAL=/Workspace/.proc/self/git/config -ENABLE_DATABRICKS_CLI=true -PYTHONPYCACHEPREFIX=/tmp/pycache -DATABRICKS_JUPYTER_SERVERLESS=true - -=== Each supported agent has a launcher that delegates to the agent shim - ->>> ls server-home/.agent-shim/bin -claude -codex - ->>> cat server-home/.agent-shim/bin/claude -#!/usr/bin/env bash -# "claude" launcher from "databricks ssh connect"; delegates to "ssh agent-shim claude". -export DATABRICKS_WORKSPACE_HOME='/Workspace/Users/[USERNAME]' -exec [CLI] ssh agent-shim claude "$@" - -=== A non-interactive session finds the launchers on PATH -/usr/bin:/bin:[TEST_TMP_DIR]/server-home/.agent-shim/bin -[TEST_TMP_DIR]/server-home/.agent-shim/bin/claude -[TEST_TMP_DIR]/server-home/.agent-shim/bin/codex - -=== Dedicated server - -=== SetEnv appends the launcher directory to PATH -PATH="/usr/bin:/bin:[TEST_TMP_DIR]/server-home/.agent-shim/bin" - ->>> ls server-home/.agent-shim/bin -claude -codex - -=== A non-interactive session finds the launchers on PATH -[TEST_TMP_DIR]/server-home/.agent-shim/bin/claude -[TEST_TMP_DIR]/server-home/.agent-shim/bin/codex +Exit code: 2 diff --git a/bundle/direct/dresources/configs/materialization_sets.generated.yml b/bundle/direct/dresources/configs/materialization_sets.generated.yml index 7c7f1478caa..a4e314a2921 100644 --- a/bundle/direct/dresources/configs/materialization_sets.generated.yml +++ b/bundle/direct/dresources/configs/materialization_sets.generated.yml @@ -30,8 +30,6 @@ ignore_remote_changes: reason: spec:output_only - field: materialized_features[*].materialization_set_id reason: spec:output_only - - field: materialized_features[*].notifications - reason: spec:output_only - field: materialized_features[*].pipeline_id reason: spec:output_only - field: materialized_features[*].table_name diff --git a/bundle/direct/dresources/configs/postgres_branches.generated.yml b/bundle/direct/dresources/configs/postgres_branches.generated.yml index 07e938094ce..acba37aaccc 100644 --- a/bundle/direct/dresources/configs/postgres_branches.generated.yml +++ b/bundle/direct/dresources/configs/postgres_branches.generated.yml @@ -11,19 +11,9 @@ recreate_on_changes: reason: spec:immutable ignore_remote_changes: - - field: expire_time - reason: spec:input_only - - field: is_protected - reason: spec:input_only - - field: no_expiry - reason: spec:input_only - field: source_branch reason: spec:input_only - field: source_branch_lsn reason: spec:input_only - field: source_branch_time reason: spec:input_only - - field: source_snapshot - reason: spec:input_only - - field: ttl - reason: spec:input_only diff --git a/bundle/direct/dresources/configs/postgres_databases.generated.yml b/bundle/direct/dresources/configs/postgres_databases.generated.yml deleted file mode 100644 index 9a9eb664188..00000000000 --- a/bundle/direct/dresources/configs/postgres_databases.generated.yml +++ /dev/null @@ -1,7 +0,0 @@ -# Generated, do not edit. - -ignore_remote_changes: - - field: postgres_database - reason: spec:input_only - - field: role - reason: spec:input_only diff --git a/bundle/direct/dresources/configs/postgres_endpoints.generated.yml b/bundle/direct/dresources/configs/postgres_endpoints.generated.yml index 2560c7f5ef7..3591135a92a 100644 --- a/bundle/direct/dresources/configs/postgres_endpoints.generated.yml +++ b/bundle/direct/dresources/configs/postgres_endpoints.generated.yml @@ -3,21 +3,3 @@ recreate_on_changes: - field: endpoint_type reason: spec:immutable - -ignore_remote_changes: - - field: autoscaling_limit_max_cu - reason: spec:input_only - - field: autoscaling_limit_min_cu - reason: spec:input_only - - field: disabled - reason: spec:input_only - - field: endpoint_type - reason: spec:input_only - - field: group - reason: spec:input_only - - field: no_suspension - reason: spec:input_only - - field: settings - reason: spec:input_only - - field: suspend_timeout_duration - reason: spec:input_only diff --git a/bundle/direct/dresources/configs/postgres_projects.generated.yml b/bundle/direct/dresources/configs/postgres_projects.generated.yml index cf29cbf156a..6ea37907495 100644 --- a/bundle/direct/dresources/configs/postgres_projects.generated.yml +++ b/bundle/direct/dresources/configs/postgres_projects.generated.yml @@ -5,23 +5,5 @@ recreate_on_changes: reason: spec:immutable ignore_remote_changes: - - field: budget_policy_id - reason: spec:input_only - - field: custom_tags - reason: spec:input_only - - field: custom_tags[*].key - reason: spec:input_only - - field: custom_tags[*].value - reason: spec:input_only - - field: default_branch - reason: spec:input_only - - field: default_endpoint_settings - reason: spec:input_only - - field: display_name - reason: spec:input_only - - field: enable_pg_native_login - reason: spec:input_only - - field: history_retention_duration - reason: spec:input_only - field: pg_version reason: spec:input_only diff --git a/bundle/direct/dresources/configs/postgres_roles.generated.yml b/bundle/direct/dresources/configs/postgres_roles.generated.yml index d5b37104344..8c54e16218a 100644 --- a/bundle/direct/dresources/configs/postgres_roles.generated.yml +++ b/bundle/direct/dresources/configs/postgres_roles.generated.yml @@ -1,13 +1,9 @@ # Generated, do not edit. ignore_remote_changes: - - field: attributes - reason: spec:input_only - field: auth_method reason: spec:input_only - field: identity_type reason: spec:input_only - - field: membership_roles - reason: spec:input_only - field: postgres_role reason: spec:input_only diff --git a/bundle/schema/jsonschema.json b/bundle/schema/jsonschema.json index afb5a80db72..ecfcd2180a2 100644 --- a/bundle/schema/jsonschema.json +++ b/bundle/schema/jsonschema.json @@ -92,9 +92,9 @@ "x-databricks-launch-stage": "GA" }, "custom_template_format": { - "description": "[Beta] The format used to interpret the `custom_summary` and `custom_description` templates.\n\n`HTML` treats both templates as HTML with Mustache `{{VARIABLE_NAME}}` placeholders.\n`MARKDOWN` treats them as Markdown with allowlisted `@VARIABLE_NAME` placeholders and converts\nthem to the format each notification destination expects, so a single template renders\ncorrectly in email, Slack, and Microsoft Teams.\n\nWhen unset, the API applies no default. Responses omit the field unless a format is stored,\nand a template with no format is rendered as HTML.", + "description": "[Public Preview] The format used to interpret the `custom_summary` and `custom_description` templates.\n\n`HTML` treats both templates as HTML with Mustache `{{VARIABLE_NAME}}` placeholders.\n`MARKDOWN` treats them as Markdown with allowlisted `@VARIABLE_NAME` placeholders and converts\nthem to the format each notification destination expects, so a single template renders\ncorrectly in email, Slack, and Microsoft Teams.\n\nWhen unset, the API applies no default. Responses omit the field unless a format is stored,\nand a template with no format is rendered as HTML.", "$ref": "#/$defs/github.com/databricks/databricks-sdk-go/service/sql.CustomTemplateFormat", - "x-databricks-launch-stage": "PUBLIC_BETA" + "x-databricks-launch-stage": "PUBLIC_PREVIEW" }, "display_name": { "description": "The display name of the alert.", @@ -15034,7 +15034,7 @@ "oneOf": [ { "type": "object", - "description": "Notifications for the jobs and pipelines that materialize the features in a set, one field per\ntrigger.", + "description": "Notifications for the jobs and pipelines that materialize features, one field per trigger.", "properties": { "on_failure": { "description": "[Private Preview] Who to notify when a run fails, and on which attempts.", @@ -15125,6 +15125,12 @@ "$ref": "#/$defs/string", "x-databricks-launch-stage": "GA" }, + "notifications": { + "description": "[Private Preview] Notification configuration around the lifecycle of the job or pipeline that materializes\nthis feature. Features which are materialized in the same pipeline will share the same\nnotification.", + "$ref": "#/$defs/github.com/databricks/databricks-sdk-go/service/ml.MaterializationNotifications", + "x-databricks-launch-stage": "PRIVATE_PREVIEW", + "doNotSuggest": true + }, "offline_store_config": { "description": "Destination for writing feature values to an offline Delta table. The resulting table is\nreturned as `table_name`.", "$ref": "#/$defs/github.com/databricks/databricks-sdk-go/service/ml.OfflineStoreConfig", @@ -21477,8 +21483,8 @@ "MARKDOWN" ], "enumDescriptions": [ - "[Beta]", - "[Beta]" + "[Public Preview]", + "[Public Preview]" ] }, { diff --git a/cmd/workspace/lakewatch/lakewatch.go b/cmd/workspace/lakewatch/lakewatch.go index 511c70d4f28..892165a8ec2 100644 --- a/cmd/workspace/lakewatch/lakewatch.go +++ b/cmd/workspace/lakewatch/lakewatch.go @@ -1108,8 +1108,6 @@ func newUpdateCommonConfig() *cobra.Command { cmd.Flags().Var(&updateCommonConfigJson, "json", `either inline JSON string or @path/to/file.json with request body`) cmd.Flags().StringVar(&updateCommonConfigReq.Etag, "etag", updateCommonConfigReq.Etag, `Optimistic-concurrency precondition: if set and it does not match the resource's current etag, the update is rejected as a conflict (HTTP 409).`) - cmd.Flags().StringVar(&updateCommonConfigReq.CommonConfig.CustomContentPackPath, "custom-content-pack-path", updateCommonConfigReq.CommonConfig.CustomContentPackPath, `UC volume path holding user-authored custom content packs, e.g.`) - cmd.Flags().StringVar(&updateCommonConfigReq.CommonConfig.CustomPresetsPath, "custom-presets-path", updateCommonConfigReq.CommonConfig.CustomPresetsPath, `UC volume path holding user-authored custom presets, e.g.`) cmd.Flags().StringVar(&updateCommonConfigReq.CommonConfig.Name, "name", updateCommonConfigReq.CommonConfig.Name, ``) cmd.Flags().BoolVar(&updateCommonConfigReq.CommonConfig.PerResourcePermissionsEnabled, "per-resource-permissions-enabled", updateCommonConfigReq.CommonConfig.PerResourcePermissionsEnabled, `Whether users may grant permissions on individual resources rather than only at the Folder level.`) // TODO: complex arg: updated_by diff --git a/cmd/workspace/rfa/rfa.go b/cmd/workspace/rfa/rfa.go index 75bfec74dd4..01bf7808b1d 100644 --- a/cmd/workspace/rfa/rfa.go +++ b/cmd/workspace/rfa/rfa.go @@ -233,9 +233,9 @@ Update Access Request Destinations. must be a metastore admin, the owner of the securable, or a user that has the **MANAGE** privilege on the securable in order to assign destinations. A maximum of 5 emails and 5 external notification destinations (Slack, Microsoft - Teams, Generic Webhook, and Databricks App Slack/Teams destinations) can be - assigned to a securable. If a URL destination is assigned, no other - destinations can be set. + Teams, Generic Webhook, Databricks App Slack/Teams, Asana, ServiceNow, and + EventBridge destinations) can be assigned to a securable. If a URL destination + is assigned, no other destinations can be set. The supported securable types are: "metastore", "catalog", "schema", "table", "external_location", "connection", "credential", "function", diff --git a/go.mod b/go.mod index a27f30aa0e8..ccf1f4e96be 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,7 @@ require ( github.com/charmbracelet/huh v1.0.0 // MIT github.com/charmbracelet/lipgloss v1.1.0 // MIT github.com/charmbracelet/x/ansi v0.11.9 // MIT - github.com/databricks/databricks-sdk-go v0.197.0 // Apache-2.0 + github.com/databricks/databricks-sdk-go v0.198.0 // Apache-2.0 github.com/databricks/sdk-go/auth v0.2.0 // Apache-2.0 github.com/databricks/sdk-go/core v0.1.0 // Apache-2.0 github.com/databricks/sdk-go/files v0.3.0 // Apache-2.0 diff --git a/go.sum b/go.sum index 3d06610180a..ab021a2a1a8 100644 --- a/go.sum +++ b/go.sum @@ -60,8 +60,8 @@ github.com/creack/pty v1.1.24 h1:bJrF4RRfyJnbTJqzRLHzcGaZK1NeM5kTC9jGgovnR1s= github.com/creack/pty v1.1.24/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE= github.com/danieljoos/wincred v1.2.3 h1:v7dZC2x32Ut3nEfRH+vhoZGvN72+dQ/snVXo/vMFLdQ= github.com/danieljoos/wincred v1.2.3/go.mod h1:6qqX0WNrS4RzPZ1tnroDzq9kY3fu1KwE7MRLQK4X0bs= -github.com/databricks/databricks-sdk-go v0.197.0 h1:t6dlDpzvJ2Cb8ts+sZqeZ2sxqaYMvN0cq+VF+hI5aMM= -github.com/databricks/databricks-sdk-go v0.197.0/go.mod h1:udBw6nxkaqa0fgPQ7ZW1kGFkltQncYx+qFJeVFmxtz8= +github.com/databricks/databricks-sdk-go v0.198.0 h1:Ij8sxkRLyUUc6uTeB4rooAnlJm8DOb0vBDC1ZXHqQXA= +github.com/databricks/databricks-sdk-go v0.198.0/go.mod h1:udBw6nxkaqa0fgPQ7ZW1kGFkltQncYx+qFJeVFmxtz8= github.com/databricks/sdk-go/auth v0.2.0 h1:543fVMvJ6pVxBymfjGGkkmfiHDbUqX7y9lZseEcE4tQ= github.com/databricks/sdk-go/auth v0.2.0/go.mod h1:eNJdFzBAfu1y32a3wPcTnjaUkjhS9VfyCNblKFPIPEo= github.com/databricks/sdk-go/core v0.1.0 h1:ZolzW/KVIJy1xXQ0zTsu/QYsEB4vQAEApbbq4D3RGHc= diff --git a/python/databricks/bundles/alerts/_models/alert.py b/python/databricks/bundles/alerts/_models/alert.py index 1924b0f035a..931aee97f3d 100644 --- a/python/databricks/bundles/alerts/_models/alert.py +++ b/python/databricks/bundles/alerts/_models/alert.py @@ -73,9 +73,7 @@ class Alert(Resource): custom_template_format: VariableOrOptional[CustomTemplateFormat] = None """ - :meta private: [EXPERIMENTAL] - - [Beta] The format used to interpret the `custom_summary` and `custom_description` templates. + [Public Preview] The format used to interpret the `custom_summary` and `custom_description` templates. `HTML` treats both templates as HTML with Mustache `{{VARIABLE_NAME}}` placeholders. `MARKDOWN` treats them as Markdown with allowlisted `@VARIABLE_NAME` placeholders and converts @@ -178,9 +176,7 @@ class AlertDict(TypedDict, total=False): custom_template_format: VariableOrOptional[CustomTemplateFormatParam] """ - :meta private: [EXPERIMENTAL] - - [Beta] The format used to interpret the `custom_summary` and `custom_description` templates. + [Public Preview] The format used to interpret the `custom_summary` and `custom_description` templates. `HTML` treats both templates as HTML with Mustache `{{VARIABLE_NAME}}` placeholders. `MARKDOWN` treats them as Markdown with allowlisted `@VARIABLE_NAME` placeholders and converts diff --git a/python/databricks/bundles/materialization_sets/_models/materialization_notifications.py b/python/databricks/bundles/materialization_sets/_models/materialization_notifications.py index d44d96567da..8e31dca4d72 100644 --- a/python/databricks/bundles/materialization_sets/_models/materialization_notifications.py +++ b/python/databricks/bundles/materialization_sets/_models/materialization_notifications.py @@ -24,8 +24,7 @@ class MaterializationNotifications: """ :meta private: [EXPERIMENTAL] - Notifications for the jobs and pipelines that materialize the features in a set, one field per - trigger. + Notifications for the jobs and pipelines that materialize features, one field per trigger. """ on_failure: VariableOrOptional[MaterializationFailureNotification] = None diff --git a/python/databricks/bundles/materialization_sets/_models/materialized_feature.py b/python/databricks/bundles/materialization_sets/_models/materialized_feature.py index b94699ef880..91c1be93f19 100644 --- a/python/databricks/bundles/materialization_sets/_models/materialized_feature.py +++ b/python/databricks/bundles/materialization_sets/_models/materialized_feature.py @@ -18,6 +18,10 @@ ExternalTrigger, ExternalTriggerParam, ) +from databricks.bundles.materialization_sets._models.materialization_notifications import ( + MaterializationNotifications, + MaterializationNotificationsParam, +) from databricks.bundles.materialization_sets._models.offline_store_config import ( OfflineStoreConfig, OfflineStoreConfigParam, @@ -79,6 +83,15 @@ class MaterializedFeature: Server-assigned unique identifier for the materialized feature. """ + notifications: VariableOrOptional[MaterializationNotifications] = None + """ + :meta private: [EXPERIMENTAL] + + [Private Preview] Notification configuration around the lifecycle of the job or pipeline that materializes + this feature. Features which are materialized in the same pipeline will share the same + notification. + """ + offline_store_config: VariableOrOptional[OfflineStoreConfig] = None """ Destination for writing feature values to an offline Delta table. The resulting table is @@ -159,6 +172,15 @@ class MaterializedFeatureDict(TypedDict, total=False): Server-assigned unique identifier for the materialized feature. """ + notifications: VariableOrOptional[MaterializationNotificationsParam] + """ + :meta private: [EXPERIMENTAL] + + [Private Preview] Notification configuration around the lifecycle of the job or pipeline that materializes + this feature. Features which are materialized in the same pipeline will share the same + notification. + """ + offline_store_config: VariableOrOptional[OfflineStoreConfigParam] """ Destination for writing feature values to an offline Delta table. The resulting table is diff --git a/python/databricks_tests/core/_generated/alerts.py b/python/databricks_tests/core/_generated/alerts.py index 2d8e117c99c..ca997fed2bc 100644 --- a/python/databricks_tests/core/_generated/alerts.py +++ b/python/databricks_tests/core/_generated/alerts.py @@ -8,6 +8,9 @@ from databricks.bundles.alerts._models.alert_v2_run_as import AlertV2RunAs from databricks.bundles.alerts._models.comparison_operator import ComparisonOperator from databricks.bundles.alerts._models.cron_schedule import CronSchedule +from databricks.bundles.alerts._models.custom_template_format import ( + CustomTemplateFormat, +) from databricks.bundles.alerts._models.lifecycle import Lifecycle from databricks.bundles.alerts._models.permission import Permission from databricks.bundles.alerts._models.permission_level import PermissionLevel @@ -21,6 +24,7 @@ def _test_case(): ResourceTestCase( add_resource=Resources.add_alert, dict_example={ + "custom_template_format": "HTML", "display_name": "display_name", "evaluation": { "comparison_operator": "LESS_THAN", @@ -37,6 +41,7 @@ def _test_case(): "warehouse_id": "warehouse_id", }, dataclass_example=Alert( + custom_template_format=CustomTemplateFormat.HTML, display_name="display_name", evaluation=AlertV2Evaluation( comparison_operator=ComparisonOperator.LESS_THAN, From 5ef5863ef98f61e6c09829f3558bd852ba4bd902 Mon Sep 17 00:00:00 2001 From: "pieter.noordhuis" Date: Fri, 13 Nov 2026 10:38:29 +0000 Subject: [PATCH 2/4] Revert acceptance golden churn from bumper environment - acceptance/ssh/agent-launchers/output.txt - acceptance/cmd/workspace/apps/run-local-node/output.txt The bumper recorded 'Exit code' stubs instead of the real output for these tests. Restore the main versions; the SDK bump does not affect them. --- .../workspace/apps/run-local-node/output.txt | 26 +++++++++- acceptance/ssh/agent-launchers/output.txt | 48 ++++++++++++++++++- 2 files changed, 72 insertions(+), 2 deletions(-) diff --git a/acceptance/cmd/workspace/apps/run-local-node/output.txt b/acceptance/cmd/workspace/apps/run-local-node/output.txt index e2249505bd3..e6b0bd0a642 100644 --- a/acceptance/cmd/workspace/apps/run-local-node/output.txt +++ b/acceptance/cmd/workspace/apps/run-local-node/output.txt @@ -1,4 +1,28 @@ === Prepare environment runs the build script, and the entry point overrides app.yml -Exit code: 1 +>>> grep -x Build script ran ../LOG.prepare +Build script ran + +>>> grep -x Running command: node -e console.log('Hello, world') ../LOG.prepare +Running command: node -e console.log('Hello, world') + +>>> grep -x Hello, world ../LOG.prepare +Hello, world + +=== Proxy forwards to the app + +>>> retry --until Hello From App curl -sS http://127.0.0.1:[PROXY_PORT] +{"message":"Hello From App"} + +=== Debug mode reports the debugger port, and node listens on it + +>>> retry grep -x To debug your app, attach a debugger to port [DEBUG_PORT] LOG.run +To debug your app, attach a debugger to port [DEBUG_PORT] + +>>> grep Debugger listening on ws://127.0.0.1:[DEBUG_PORT]/ LOG.run +Debugger listening on ws://127.0.0.1:[DEBUG_PORT]/[UUID] + +=== Shutting the app down + +>>> curl -sS -o /dev/null http://127.0.0.1:[PROXY_PORT]/shutdown diff --git a/acceptance/ssh/agent-launchers/output.txt b/acceptance/ssh/agent-launchers/output.txt index 68985716c07..3a4bd48d14f 100644 --- a/acceptance/ssh/agent-launchers/output.txt +++ b/acceptance/ssh/agent-launchers/output.txt @@ -1,2 +1,48 @@ -Exit code: 2 +=== Serverless server + +=== SetEnv appends the launcher directory to PATH +SetEnv +HOME="[TEST_TMP_DIR]/server-home" +PATH="/usr/bin:/bin:[TEST_TMP_DIR]/server-home/.agent-shim/bin" +DATABRICKS_HOST="[DATABRICKS_URL]" +DATABRICKS_TOKEN="[DATABRICKS_TOKEN]" +DATABRICKS_CLI_PATH="[CLI]" +DATABRICKS_CLI_UPSTREAM=databricks_ssh_tunnel +DATABRICKS_CLI_UPSTREAM_VERSION= +DATABRICKS_SDK_UPSTREAM=databricks_ssh_tunnel +DATABRICKS_SDK_UPSTREAM_VERSION= +GIT_CONFIG_GLOBAL=/Workspace/.proc/self/git/config +ENABLE_DATABRICKS_CLI=true +PYTHONPYCACHEPREFIX=/tmp/pycache +DATABRICKS_JUPYTER_SERVERLESS=true + +=== Each supported agent has a launcher that delegates to the agent shim + +>>> ls server-home/.agent-shim/bin +claude +codex + +>>> cat server-home/.agent-shim/bin/claude +#!/usr/bin/env bash +# "claude" launcher from "databricks ssh connect"; delegates to "ssh agent-shim claude". +export DATABRICKS_WORKSPACE_HOME='/Workspace/Users/[USERNAME]' +exec [CLI] ssh agent-shim claude "$@" + +=== A non-interactive session finds the launchers on PATH +/usr/bin:/bin:[TEST_TMP_DIR]/server-home/.agent-shim/bin +[TEST_TMP_DIR]/server-home/.agent-shim/bin/claude +[TEST_TMP_DIR]/server-home/.agent-shim/bin/codex + +=== Dedicated server + +=== SetEnv appends the launcher directory to PATH +PATH="/usr/bin:/bin:[TEST_TMP_DIR]/server-home/.agent-shim/bin" + +>>> ls server-home/.agent-shim/bin +claude +codex + +=== A non-interactive session finds the launchers on PATH +[TEST_TMP_DIR]/server-home/.agent-shim/bin/claude +[TEST_TMP_DIR]/server-home/.agent-shim/bin/codex From 537599df660ad9a658cb94a7a3703aaffa845a58 Mon Sep 17 00:00:00 2001 From: "pieter.noordhuis" Date: Fri, 13 Nov 2026 10:56:34 +0000 Subject: [PATCH 3/4] Add PR link to Go SDK v0.198.0 changelog fragment Co-authored-by: Isaac --- .nextchanges/dependency-updates/go-sdk-v0.198.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.nextchanges/dependency-updates/go-sdk-v0.198.0.md b/.nextchanges/dependency-updates/go-sdk-v0.198.0.md index 6526d115ab0..bb983d4803b 100644 --- a/.nextchanges/dependency-updates/go-sdk-v0.198.0.md +++ b/.nextchanges/dependency-updates/go-sdk-v0.198.0.md @@ -1 +1 @@ -* Update the Go SDK to [v0.198.0](https://github.com/databricks/databricks-sdk-go/releases/tag/v0.198.0). +* Update the Go SDK to [v0.198.0](https://github.com/databricks/databricks-sdk-go/releases/tag/v0.198.0). ([#7530](https://github.com/databricks/cli/pull/7530)) From c1838a63ccfa9ebc74f72a97e21a8ae4ac9eaea5 Mon Sep 17 00:00:00 2001 From: "pieter.noordhuis" Date: Fri, 13 Nov 2026 11:27:30 +0000 Subject: [PATCH 4/4] Finish Go SDK v0.198.0 bump - Classify materialized_features[*].notifications as immutable; the new spec no longer marks it output-only. - Regenerate postgres and bundle/invariant goldens against #7596's testserver, dropping the drift the bumper recorded. Co-authored-by: Isaac --- .../deploy/readplan/postgres_role/output.txt | 5 +- .../bundle/invariant/no_drift/output.txt | 131 ------------------ .../purge_on_delete_transitions/output.txt | 9 +- .../postgres_branches/recreate/out.plan.txt | 3 +- .../recreate/out.requests.update.txt | 19 --- .../postgres_branches/recreate/output.txt | 3 +- .../out.requests.json | 13 -- .../recreate_source_branch_time/output.txt | 6 +- .../update_expire_time/out.requests.json | 13 -- .../update_expire_time/output.txt | 6 +- .../out.requests.no_change.json | 32 +---- .../out.requests.restore.json | 21 +-- .../update_protected/out.requests.update.json | 21 +-- .../update_protected/output.txt | 21 +-- .../update_ttl/out.requests.json | 13 -- .../postgres_branches/update_ttl/output.txt | 6 +- .../postgres_catalogs/recreate/output.txt | 12 +- .../basic/out.requests.remove.json | 38 ----- .../postgres_data_apis/basic/output.txt | 16 +-- .../postgres_data_apis/out-of-band/output.txt | 26 +--- .../recreate/out.requests.recreate.json | 51 ------- .../postgres_data_apis/recreate/output.txt | 12 +- .../update/out.requests.remove_field.json | 38 ----- .../update/out.requests.update.json | 38 ----- .../postgres_data_apis/update/output.txt | 26 +--- .../url_reference/output.txt | 16 +-- .../postgres_databases/recreate/output.txt | 34 +---- .../replace_existing/out.requests.deploy.json | 26 +--- .../replace_existing/output.txt | 8 +- .../update/out.requests.no_change.json | 39 +----- .../update/out.requests.restore.json | 28 +--- .../update/out.requests.update.json | 28 +--- .../postgres_databases/update/output.txt | 27 +--- .../add_settings/out.requests.json | 34 +---- .../add_settings/output.txt | 18 +-- .../postgres_endpoints/recreate/output.txt | 39 +----- .../remove_suspend_timeout/out.deploy.txt | 13 +- .../remove_suspend_timeout/out.plan.drift.txt | 6 +- .../remove_suspend_timeout/out.requests.json | 34 +---- .../remove_suspend_timeout/output.txt | 8 +- .../out.requests.no_change.json | 47 +------ .../out.requests.restore.json | 36 +---- .../out.requests.update.json | 36 +---- .../update_autoscaling/output.txt | 35 ++--- .../update_pg_settings/out.requests.json | 34 +---- .../update_pg_settings/output.txt | 18 +-- .../update_suspend_timeout/out.requests.json | 34 +---- .../update_suspend_timeout/output.txt | 12 +- .../out.deploy.txt | 2 +- .../remove_history_retention/out.deploy.txt | 11 +- .../out.requests.json | 2 +- .../out.requests.json | 2 +- .../output.txt | 4 +- .../out.requests.json | 2 +- .../out.requests.no_change.json | 19 --- .../out.requests.restore.json | 2 +- .../out.requests.update.json | 2 +- .../update_display_name/output.txt | 7 +- .../out.requests.json | 2 +- .../update_keeps_children/output.txt | 6 +- .../inherited-role-bind/output.txt | 4 +- .../inherited-role-conflict/output.txt | 6 +- .../recreate-postgres-role/output.txt | 34 +---- .../postgres_roles/recreate/output.txt | 34 +---- .../replace_existing/out.requests.deploy.json | 26 +--- .../replace_existing/output.txt | 8 +- .../update/out.requests.no_change.json | 41 +----- .../update/out.requests.restore.json | 26 +--- .../update/out.requests.update.json | 26 +--- .../postgres_roles/update/output.txt | 27 +--- .../basic/out.requests.remove.txt | 13 -- .../basic/out.requests.update.txt | 15 +- .../basic/output.txt | 10 +- .../out-of-band/output.txt | 6 +- .../recreate/output.txt | 12 +- .../recreate_capped/output.txt | 1 - .../configs/materialization_sets.yml | 2 + 77 files changed, 212 insertions(+), 1329 deletions(-) diff --git a/acceptance/bundle/deploy/readplan/postgres_role/output.txt b/acceptance/bundle/deploy/readplan/postgres_role/output.txt index da63148bfb6..31d0e2f41a8 100644 --- a/acceptance/bundle/deploy/readplan/postgres_role/output.txt +++ b/acceptance/bundle/deploy/readplan/postgres_role/output.txt @@ -24,10 +24,7 @@ Resources: 3 created, 0 changed, 0 deleted, 0 unchanged } >>> [CLI] bundle plan -update postgres_branches.branch -update postgres_projects.project - -Plan: 0 to add, 2 to change, 0 to delete, 1 unchanged +Plan: 0 to add, 0 to change, 0 to delete, 3 unchanged >>> [CLI] bundle destroy --auto-approve The following resources will be deleted: diff --git a/acceptance/bundle/invariant/no_drift/output.txt b/acceptance/bundle/invariant/no_drift/output.txt index 6cc151fd196..7a28cb73a58 100644 --- a/acceptance/bundle/invariant/no_drift/output.txt +++ b/acceptance/bundle/invariant/no_drift/output.txt @@ -1,132 +1 @@ INPUT_CONFIG_OK -Unexpected action='update' for resources.postgres_branches.branch -Unexpected action='update' for resources.postgres_projects.project -{ - "plan_version": [PLAN_VERSION], - "cli_version": "[CLI_VERSION]", - "lineage": "[UUID][0]", - "serial": 1, - "features": { - "deployment_history_shadow": {} - }, - "plan": { - "resources.postgres_branches.branch": { - "depends_on": [ - { - "node": "resources.postgres_projects.project", - "label": "${resources.postgres_projects.project.name}" - } - ], - "action": "update", - "new_state": { - "value": { - "branch_id": "test-branch-[UNIQUE_NAME]", - "no_expiry": true, - "parent": "projects/test-pg-project-[UNIQUE_NAME]" - } - }, - "remote_state": { - "branch_id": "test-branch-[UNIQUE_NAME]", - "create_time": "[TIMESTAMP]", - "name": "projects/test-pg-project-[UNIQUE_NAME]/branches/test-branch-[UNIQUE_NAME]", - "parent": "projects/test-pg-project-[UNIQUE_NAME]", - "status": { - "branch_id": "test-branch-[UNIQUE_NAME]", - "current_state": "READY", - "default": false, - "is_protected": false, - "logical_size_bytes": 0, - "source_branch": "projects/test-pg-project-[UNIQUE_NAME]/branches/production", - "source_branch_lsn": "0/0", - "source_branch_time": "[TIMESTAMP]", - "state_change_time": "[TIMESTAMP]" - }, - "uid": "br-7a0c2f5f-5ad9-beda-7", - "update_time": "[TIMESTAMP]" - }, - "changes": { - "no_expiry": { - "action": "update", - "old": true, - "new": true - } - } - }, - "resources.postgres_projects.project": { - "action": "update", - "new_state": { - "value": { - "display_name": "Test Postgres Project", - "project_id": "test-pg-project-[UNIQUE_NAME]" - } - }, - "remote_state": { - "create_time": "[TIMESTAMP]", - "name": "projects/test-pg-project-[UNIQUE_NAME]", - "project_id": "test-pg-project-[UNIQUE_NAME]", - "status": { - "branch_logical_size_limit_bytes": 8796093022208, - "default_branch": "projects/test-pg-project-[UNIQUE_NAME]/branches/production", - "default_endpoint_settings": { - "autoscaling_limit_max_cu": 1, - "autoscaling_limit_min_cu": 1, - "suspend_timeout_duration": "86400s" - }, - "display_name": "Test Postgres Project", - "enable_pg_native_login": false, - "history_retention_duration": "604800s", - "owner": "[USERNAME]", - "project_id": "test-pg-project-[UNIQUE_NAME]", - "synthetic_storage_size_bytes": 0 - }, - "uid": "[UUID][1]", - "update_time": "[TIMESTAMP]" - }, - "changes": { - "display_name": { - "action": "update", - "old": "Test Postgres Project", - "new": "Test Postgres Project" - } - } - }, - "resources.postgres_roles.foo": { - "depends_on": [ - { - "node": "resources.postgres_branches.branch", - "label": "${resources.postgres_branches.branch.name}" - } - ], - "action": "skip", - "remote_state": { - "create_time": "[TIMESTAMP]", - "name": "projects/test-pg-project-[UNIQUE_NAME]/branches/test-branch-[UNIQUE_NAME]/roles/test-role-[UNIQUE_NAME]", - "parent": "projects/test-pg-project-[UNIQUE_NAME]/branches/test-branch-[UNIQUE_NAME]", - "role_id": "test-role-[UNIQUE_NAME]", - "status": { - "attributes": { - "bypassrls": false, - "createdb": false, - "createrole": false - }, - "auth_method": "PG_PASSWORD_SCRAM_SHA_256", - "identity_type": "IDENTITY_TYPE_UNSPECIFIED", - "postgres_role": "app_role", - "role_id": "test-role-[UNIQUE_NAME]" - }, - "update_time": "[TIMESTAMP]" - }, - "changes": { - "postgres_role": { - "action": "skip", - "reason": "spec:input_only", - "old": "app_role", - "new": "app_role" - } - } - } - } -} - - -Exit code: 10 diff --git a/acceptance/bundle/resources/postgres_branches/purge_on_delete_transitions/output.txt b/acceptance/bundle/resources/postgres_branches/purge_on_delete_transitions/output.txt index dd182f71605..6df440d7033 100644 --- a/acceptance/bundle/resources/postgres_branches/purge_on_delete_transitions/output.txt +++ b/acceptance/bundle/resources/postgres_branches/purge_on_delete_transitions/output.txt @@ -16,9 +16,8 @@ Resources: 2 created, 0 changed, 0 deleted, 0 unchanged >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/pg-branch-purge-transitions-[UNIQUE_NAME]/default/files... Updated postgres_branches.branch -Updated postgres_projects.proj Files: 0 uploaded, 0 deleted -Resources: 0 created, 2 changed, 0 deleted, 0 unchanged +Resources: 0 created, 1 changed, 0 deleted, 1 unchanged >>> get_purge json.state.resources.postgres_branches.branch.state.purge_on_delete = true; @@ -28,9 +27,8 @@ json.state.resources.postgres_branches.branch.state.purge_on_delete = true; >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/pg-branch-purge-transitions-[UNIQUE_NAME]/default/files... Updated postgres_branches.branch -Updated postgres_projects.proj Files: 0 uploaded, 0 deleted -Resources: 0 created, 2 changed, 0 deleted, 0 unchanged +Resources: 0 created, 1 changed, 0 deleted, 1 unchanged >>> get_purge json.state.resources.postgres_branches.branch.state.purge_on_delete = false; @@ -40,9 +38,8 @@ json.state.resources.postgres_branches.branch.state.purge_on_delete = false; >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/pg-branch-purge-transitions-[UNIQUE_NAME]/default/files... Updated postgres_branches.branch -Updated postgres_projects.proj Files: 0 uploaded, 0 deleted -Resources: 0 created, 2 changed, 0 deleted, 0 unchanged +Resources: 0 created, 1 changed, 0 deleted, 1 unchanged >>> get_purge (unset) diff --git a/acceptance/bundle/resources/postgres_branches/recreate/out.plan.txt b/acceptance/bundle/resources/postgres_branches/recreate/out.plan.txt index e22f402e63b..c1d5449fc52 100644 --- a/acceptance/bundle/resources/postgres_branches/recreate/out.plan.txt +++ b/acceptance/bundle/resources/postgres_branches/recreate/out.plan.txt @@ -1,4 +1,3 @@ recreate postgres_branches.main -update postgres_projects.my_project -Plan: 1 to add, 1 to change, 1 to delete, 0 unchanged +Plan: 1 to add, 0 to change, 1 to delete, 1 unchanged diff --git a/acceptance/bundle/resources/postgres_branches/recreate/out.requests.update.txt b/acceptance/bundle/resources/postgres_branches/recreate/out.requests.update.txt index d079aa04877..2982e29445d 100644 --- a/acceptance/bundle/resources/postgres_branches/recreate/out.requests.update.txt +++ b/acceptance/bundle/resources/postgres_branches/recreate/out.requests.update.txt @@ -1,22 +1,3 @@ -{ - "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", - "q": { - "update_mask": "spec.default_endpoint_settings,spec.display_name,spec.history_retention_duration" - }, - "body": { - "spec": { - "default_endpoint_settings": { - "autoscaling_limit_max_cu": 4, - "autoscaling_limit_min_cu": 0.5, - "suspend_timeout_duration": "300s" - }, - "display_name": "Test Project", - "history_retention_duration": "604800s", - "pg_version": 16 - } - } -} { "method": "DELETE", "path": "/api/2.0/postgres/[MAIN_ID]" diff --git a/acceptance/bundle/resources/postgres_branches/recreate/output.txt b/acceptance/bundle/resources/postgres_branches/recreate/output.txt index 39b4d02bd63..2ff2198bb26 100644 --- a/acceptance/bundle/resources/postgres_branches/recreate/output.txt +++ b/acceptance/bundle/resources/postgres_branches/recreate/output.txt @@ -71,9 +71,8 @@ This action will result in the deletion or recreation of the following Lakebase All data stored in them will be permanently lost: recreate resources.postgres_branches.main Recreated postgres_branches.main -Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 1 created, 1 changed, 1 deleted, 0 unchanged +Resources: 1 created, 0 changed, 1 deleted, 1 unchanged === Fetch new branch ID diff --git a/acceptance/bundle/resources/postgres_branches/recreate_source_branch_time/out.requests.json b/acceptance/bundle/resources/postgres_branches/recreate_source_branch_time/out.requests.json index d11652fc974..453d1483684 100644 --- a/acceptance/bundle/resources/postgres_branches/recreate_source_branch_time/out.requests.json +++ b/acceptance/bundle/resources/postgres_branches/recreate_source_branch_time/out.requests.json @@ -2,19 +2,6 @@ "method": "DELETE", "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/dev-branch" } -{ - "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", - "q": { - "update_mask": "spec.display_name" - }, - "body": { - "spec": { - "display_name": "Test Project for Branch Fork Point", - "pg_version": 16 - } - } -} { "method": "POST", "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches", diff --git a/acceptance/bundle/resources/postgres_branches/recreate_source_branch_time/output.txt b/acceptance/bundle/resources/postgres_branches/recreate_source_branch_time/output.txt index 7c54d1f8447..cd51e2ca2f8 100644 --- a/acceptance/bundle/resources/postgres_branches/recreate_source_branch_time/output.txt +++ b/acceptance/bundle/resources/postgres_branches/recreate_source_branch_time/output.txt @@ -14,9 +14,8 @@ Resources: 2 created, 0 changed, 0 deleted, 0 unchanged >>> [CLI] bundle plan recreate postgres_branches.dev_branch -update postgres_projects.my_project -Plan: 1 to add, 1 to change, 1 to delete, 0 unchanged +Plan: 1 to add, 0 to change, 1 to delete, 1 unchanged >>> [CLI] bundle plan -o json @@ -27,9 +26,8 @@ This action will result in the deletion or recreation of the following Lakebase All data stored in them will be permanently lost: recreate resources.postgres_branches.dev_branch Recreated postgres_branches.dev_branch -Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 1 created, 1 changed, 1 deleted, 0 unchanged +Resources: 1 created, 0 changed, 1 deleted, 1 unchanged >>> print_requests.py --del-body project_id,branch_id --sort //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/ diff --git a/acceptance/bundle/resources/postgres_branches/update_expire_time/out.requests.json b/acceptance/bundle/resources/postgres_branches/update_expire_time/out.requests.json index a7893934be1..4d9bc1cbd89 100644 --- a/acceptance/bundle/resources/postgres_branches/update_expire_time/out.requests.json +++ b/acceptance/bundle/resources/postgres_branches/update_expire_time/out.requests.json @@ -1,16 +1,3 @@ -{ - "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", - "q": { - "update_mask": "spec.display_name" - }, - "body": { - "spec": { - "display_name": "Test Project for Branch Expire Update", - "pg_version": 16 - } - } -} { "method": "PATCH", "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/dev-branch", diff --git a/acceptance/bundle/resources/postgres_branches/update_expire_time/output.txt b/acceptance/bundle/resources/postgres_branches/update_expire_time/output.txt index 9326d89e3c4..8519e1e90a7 100644 --- a/acceptance/bundle/resources/postgres_branches/update_expire_time/output.txt +++ b/acceptance/bundle/resources/postgres_branches/update_expire_time/output.txt @@ -33,18 +33,16 @@ Resources: 2 created, 0 changed, 0 deleted, 0 unchanged >>> [CLI] bundle plan update postgres_branches.dev_branch -update postgres_projects.my_project -Plan: 0 to add, 2 to change, 0 to delete, 0 unchanged +Plan: 0 to add, 1 to change, 0 to delete, 1 unchanged >>> [CLI] bundle plan -o json >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/update-postgres-branch-expire-[UNIQUE_NAME]/default/files... Updated postgres_branches.dev_branch -Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 0 created, 2 changed, 0 deleted, 0 unchanged +Resources: 0 created, 1 changed, 0 deleted, 1 unchanged >>> print_requests.py --del-body project_id,branch_id --sort //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/ diff --git a/acceptance/bundle/resources/postgres_branches/update_protected/out.requests.no_change.json b/acceptance/bundle/resources/postgres_branches/update_protected/out.requests.no_change.json index abe9533afe1..ec79362ac2a 100644 --- a/acceptance/bundle/resources/postgres_branches/update_protected/out.requests.no_change.json +++ b/acceptance/bundle/resources/postgres_branches/update_protected/out.requests.no_change.json @@ -7,34 +7,6 @@ "path": "/api/2.0/postgres/[DEV_BRANCH_ID]" } { - "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", - "q": { - "update_mask": "spec.default_endpoint_settings,spec.display_name,spec.history_retention_duration" - }, - "body": { - "spec": { - "default_endpoint_settings": { - "autoscaling_limit_max_cu": 4, - "autoscaling_limit_min_cu": 0.5, - "suspend_timeout_duration": "300s" - }, - "display_name": "Test Project for Branch Update", - "history_retention_duration": "604800s", - "pg_version": 16 - } - } -} -{ - "method": "PATCH", - "path": "/api/2.0/postgres/[DEV_BRANCH_ID]", - "q": { - "update_mask": "spec.expiration" - }, - "body": { - "spec": { - "is_protected": false, - "no_expiry": true - } - } + "method": "GET", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]" } diff --git a/acceptance/bundle/resources/postgres_branches/update_protected/out.requests.restore.json b/acceptance/bundle/resources/postgres_branches/update_protected/out.requests.restore.json index 010bdeffcb8..ea3e9b584ec 100644 --- a/acceptance/bundle/resources/postgres_branches/update_protected/out.requests.restore.json +++ b/acceptance/bundle/resources/postgres_branches/update_protected/out.requests.restore.json @@ -7,29 +7,14 @@ "path": "/api/2.0/postgres/[DEV_BRANCH_ID]" } { - "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", - "q": { - "update_mask": "spec.default_endpoint_settings,spec.display_name,spec.history_retention_duration" - }, - "body": { - "spec": { - "default_endpoint_settings": { - "autoscaling_limit_max_cu": 4, - "autoscaling_limit_min_cu": 0.5, - "suspend_timeout_duration": "300s" - }, - "display_name": "Test Project for Branch Update", - "history_retention_duration": "604800s", - "pg_version": 16 - } - } + "method": "GET", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]" } { "method": "PATCH", "path": "/api/2.0/postgres/[DEV_BRANCH_ID]", "q": { - "update_mask": "spec.expiration,spec.is_protected" + "update_mask": "spec.is_protected" }, "body": { "spec": { diff --git a/acceptance/bundle/resources/postgres_branches/update_protected/out.requests.update.json b/acceptance/bundle/resources/postgres_branches/update_protected/out.requests.update.json index a7030e635a2..d7260bafe65 100644 --- a/acceptance/bundle/resources/postgres_branches/update_protected/out.requests.update.json +++ b/acceptance/bundle/resources/postgres_branches/update_protected/out.requests.update.json @@ -7,29 +7,14 @@ "path": "/api/2.0/postgres/[DEV_BRANCH_ID]" } { - "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", - "q": { - "update_mask": "spec.default_endpoint_settings,spec.display_name,spec.history_retention_duration" - }, - "body": { - "spec": { - "default_endpoint_settings": { - "autoscaling_limit_max_cu": 4, - "autoscaling_limit_min_cu": 0.5, - "suspend_timeout_duration": "300s" - }, - "display_name": "Test Project for Branch Update", - "history_retention_duration": "604800s", - "pg_version": 16 - } - } + "method": "GET", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]" } { "method": "PATCH", "path": "/api/2.0/postgres/[DEV_BRANCH_ID]", "q": { - "update_mask": "spec.expiration,spec.is_protected" + "update_mask": "spec.is_protected" }, "body": { "spec": { diff --git a/acceptance/bundle/resources/postgres_branches/update_protected/output.txt b/acceptance/bundle/resources/postgres_branches/update_protected/output.txt index 03052d471ef..9ac72b133b5 100644 --- a/acceptance/bundle/resources/postgres_branches/update_protected/output.txt +++ b/acceptance/bundle/resources/postgres_branches/update_protected/output.txt @@ -48,19 +48,14 @@ Resources: 2 created, 0 changed, 0 deleted, 0 unchanged === Verify no_change (no changes) >>> [CLI] bundle plan -update postgres_branches.dev_branch -update postgres_projects.my_project - -Plan: 0 to add, 2 to change, 0 to delete, 0 unchanged +Plan: 0 to add, 0 to change, 0 to delete, 2 unchanged >>> [CLI] bundle plan -o json >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/update-postgres-branch-[UNIQUE_NAME]/default/files... -Updated postgres_branches.dev_branch -Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 0 created, 2 changed, 0 deleted, 0 unchanged +Resources: 0 created, 0 changed, 0 deleted, 2 unchanged >>> print_requests.py --del-body project_id,branch_id,endpoint_id,database_id,role_id,catalog_id,synced_table_id --keep --get //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/ @@ -96,18 +91,16 @@ resources: >>> [CLI] bundle plan update postgres_branches.dev_branch -update postgres_projects.my_project -Plan: 0 to add, 2 to change, 0 to delete, 0 unchanged +Plan: 0 to add, 1 to change, 0 to delete, 1 unchanged >>> [CLI] bundle plan -o json >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/update-postgres-branch-[UNIQUE_NAME]/default/files... Updated postgres_branches.dev_branch -Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 0 created, 2 changed, 0 deleted, 0 unchanged +Resources: 0 created, 1 changed, 0 deleted, 1 unchanged >>> print_requests.py --del-body project_id,branch_id,endpoint_id,database_id,role_id,catalog_id,synced_table_id --keep --get //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/ @@ -135,18 +128,16 @@ Resources: 0 created, 2 changed, 0 deleted, 0 unchanged >>> [CLI] bundle plan update postgres_branches.dev_branch -update postgres_projects.my_project -Plan: 0 to add, 2 to change, 0 to delete, 0 unchanged +Plan: 0 to add, 1 to change, 0 to delete, 1 unchanged >>> [CLI] bundle plan -o json >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/update-postgres-branch-[UNIQUE_NAME]/default/files... Updated postgres_branches.dev_branch -Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 0 created, 2 changed, 0 deleted, 0 unchanged +Resources: 0 created, 1 changed, 0 deleted, 1 unchanged >>> print_requests.py --del-body project_id,branch_id,endpoint_id,database_id,role_id,catalog_id,synced_table_id --keep --get //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/ diff --git a/acceptance/bundle/resources/postgres_branches/update_ttl/out.requests.json b/acceptance/bundle/resources/postgres_branches/update_ttl/out.requests.json index 0aaa62568fc..433fadb089e 100644 --- a/acceptance/bundle/resources/postgres_branches/update_ttl/out.requests.json +++ b/acceptance/bundle/resources/postgres_branches/update_ttl/out.requests.json @@ -1,16 +1,3 @@ -{ - "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", - "q": { - "update_mask": "spec.display_name" - }, - "body": { - "spec": { - "display_name": "Test Project for Branch TTL Update", - "pg_version": 16 - } - } -} { "method": "PATCH", "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/dev-branch", diff --git a/acceptance/bundle/resources/postgres_branches/update_ttl/output.txt b/acceptance/bundle/resources/postgres_branches/update_ttl/output.txt index f9a86b110d9..fb31167f31e 100644 --- a/acceptance/bundle/resources/postgres_branches/update_ttl/output.txt +++ b/acceptance/bundle/resources/postgres_branches/update_ttl/output.txt @@ -14,18 +14,16 @@ Resources: 2 created, 0 changed, 0 deleted, 0 unchanged >>> [CLI] bundle plan update postgres_branches.dev_branch -update postgres_projects.my_project -Plan: 0 to add, 2 to change, 0 to delete, 0 unchanged +Plan: 0 to add, 1 to change, 0 to delete, 1 unchanged >>> [CLI] bundle plan -o json >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/update-postgres-branch-ttl-[UNIQUE_NAME]/default/files... Updated postgres_branches.dev_branch -Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 0 created, 2 changed, 0 deleted, 0 unchanged +Resources: 0 created, 1 changed, 0 deleted, 1 unchanged >>> print_requests.py --del-body project_id,branch_id --sort //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/ diff --git a/acceptance/bundle/resources/postgres_catalogs/recreate/output.txt b/acceptance/bundle/resources/postgres_catalogs/recreate/output.txt index 150f5600232..97ce24003be 100644 --- a/acceptance/bundle/resources/postgres_catalogs/recreate/output.txt +++ b/acceptance/bundle/resources/postgres_catalogs/recreate/output.txt @@ -8,10 +8,14 @@ Resources: 2 created, 0 changed, 0 deleted, 0 unchanged >>> [CLI] bundle plan recreate postgres_catalogs.my_catalog -update postgres_projects.my_project -Plan: 1 to add, 1 to change, 1 to delete, 0 unchanged -contains error: 'Plan: 1 to add, 0 to change, 1 to delete, 1 unchanged' not found in the output. +Plan: 1 to add, 0 to change, 1 to delete, 1 unchanged + +>>> [CLI] bundle deploy +Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/recreate-postgres-catalog-[UNIQUE_NAME]/default/files... +Recreated postgres_catalogs.my_catalog +Files: 0 uploaded, 0 deleted +Resources: 1 created, 0 changed, 1 deleted, 1 unchanged >>> [CLI] bundle destroy --auto-approve The following resources will be deleted: @@ -25,5 +29,3 @@ all their branches, databases, and endpoints. All data stored in them will be pe All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/recreate-postgres-catalog-[UNIQUE_NAME]/default Destroy: 2 deleted - -Exit code: 1 diff --git a/acceptance/bundle/resources/postgres_data_apis/basic/out.requests.remove.json b/acceptance/bundle/resources/postgres_data_apis/basic/out.requests.remove.json index 6115c99e64c..9d3a7aaf9da 100644 --- a/acceptance/bundle/resources/postgres_data_apis/basic/out.requests.remove.json +++ b/acceptance/bundle/resources/postgres_data_apis/basic/out.requests.remove.json @@ -2,41 +2,3 @@ "method": "DELETE", "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/production/databases/my-database/data-api" } -{ - "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", - "q": { - "update_mask": "spec.display_name" - }, - "body": { - "spec": { - "display_name": "Test Project for Data API", - "pg_version": 16 - } - } -} -{ - "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/production", - "q": { - "update_mask": "spec.expiration" - }, - "body": { - "spec": { - "no_expiry": true - } - } -} -{ - "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/production/databases/my-database", - "q": { - "update_mask": "spec.postgres_database,spec.role" - }, - "body": { - "spec": { - "postgres_database": "app_db", - "role": "projects/test-pg-proj-[UNIQUE_NAME]/branches/production/roles/app-owner" - } - } -} diff --git a/acceptance/bundle/resources/postgres_data_apis/basic/output.txt b/acceptance/bundle/resources/postgres_data_apis/basic/output.txt index e48ce30d216..a8ee6145b38 100644 --- a/acceptance/bundle/resources/postgres_data_apis/basic/output.txt +++ b/acceptance/bundle/resources/postgres_data_apis/basic/output.txt @@ -93,30 +93,20 @@ Resources: === Plan after deploy shows no changes >>> [CLI] bundle plan -update postgres_branches.production -update postgres_databases.my_database -update postgres_projects.my_project - -Plan: 0 to add, 3 to change, 0 to delete, 2 unchanged +Plan: 0 to add, 0 to change, 0 to delete, 5 unchanged === Removing the resource turns off the Data API but keeps the database >>> [CLI] bundle plan -update postgres_branches.production delete postgres_data_apis.my_data_api -update postgres_databases.my_database -update postgres_projects.my_project -Plan: 0 to add, 3 to change, 1 to delete, 1 unchanged +Plan: 0 to add, 0 to change, 1 to delete, 4 unchanged >>> [CLI] bundle deploy --auto-approve Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/deploy-pg-data-api-[UNIQUE_NAME]/default/files... Deleted postgres_data_apis.my_data_api -Updated postgres_branches.production -Updated postgres_databases.my_database -Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 0 created, 3 changed, 1 deleted, 1 unchanged +Resources: 0 created, 0 changed, 1 deleted, 4 unchanged >>> musterr [CLI] postgres get-data-api projects/test-pg-proj-[UNIQUE_NAME]/branches/production/databases/my-database/data-api Error: Data API is not enabled for this database diff --git a/acceptance/bundle/resources/postgres_data_apis/out-of-band/output.txt b/acceptance/bundle/resources/postgres_data_apis/out-of-band/output.txt index a3950a7af6d..ccaa335d2af 100644 --- a/acceptance/bundle/resources/postgres_data_apis/out-of-band/output.txt +++ b/acceptance/bundle/resources/postgres_data_apis/out-of-band/output.txt @@ -46,21 +46,15 @@ Resources: 5 created, 0 changed, 0 deleted, 0 unchanged === Plan detects the change from status, and deploy restores the config >>> [CLI] bundle plan -update postgres_branches.production update postgres_data_apis.my_data_api -update postgres_databases.my_database -update postgres_projects.my_project -Plan: 0 to add, 4 to change, 0 to delete, 1 unchanged +Plan: 0 to add, 1 to change, 0 to delete, 4 unchanged >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/oob-pg-data-api-[UNIQUE_NAME]/default/files... -Updated postgres_branches.production Updated postgres_data_apis.my_data_api -Updated postgres_databases.my_database -Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 0 created, 4 changed, 0 deleted, 1 unchanged +Resources: 0 created, 1 changed, 0 deleted, 4 unchanged >>> [CLI] postgres get-data-api projects/test-pg-proj-[UNIQUE_NAME]/branches/production/databases/my-database/data-api { @@ -78,11 +72,7 @@ Resources: 0 created, 4 changed, 0 deleted, 1 unchanged } >>> [CLI] bundle plan -update postgres_branches.production -update postgres_databases.my_database -update postgres_projects.my_project - -Plan: 0 to add, 3 to change, 0 to delete, 2 unchanged +Plan: 0 to add, 0 to change, 0 to delete, 5 unchanged === Disable the Data API out of band @@ -91,21 +81,15 @@ Plan: 0 to add, 3 to change, 0 to delete, 2 unchanged === Plan detects the Data API is gone and re-creates it >>> [CLI] bundle plan -update postgres_branches.production create postgres_data_apis.my_data_api -update postgres_databases.my_database -update postgres_projects.my_project -Plan: 1 to add, 3 to change, 0 to delete, 1 unchanged +Plan: 1 to add, 0 to change, 0 to delete, 4 unchanged >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/oob-pg-data-api-[UNIQUE_NAME]/default/files... Created postgres_data_apis.my_data_api -Updated postgres_branches.production -Updated postgres_databases.my_database -Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 1 created, 3 changed, 0 deleted, 1 unchanged +Resources: 1 created, 0 changed, 0 deleted, 4 unchanged >>> [CLI] postgres get-data-api projects/test-pg-proj-[UNIQUE_NAME]/branches/production/databases/my-database/data-api { diff --git a/acceptance/bundle/resources/postgres_data_apis/recreate/out.requests.recreate.json b/acceptance/bundle/resources/postgres_data_apis/recreate/out.requests.recreate.json index 5f0d2956aef..33930f3cd6c 100644 --- a/acceptance/bundle/resources/postgres_data_apis/recreate/out.requests.recreate.json +++ b/acceptance/bundle/resources/postgres_data_apis/recreate/out.requests.recreate.json @@ -1,54 +1,3 @@ -{ - "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", - "q": { - "update_mask": "spec.display_name" - }, - "body": { - "spec": { - "display_name": "Test Project for Data API Recreate", - "pg_version": 16 - } - } -} -{ - "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/production", - "q": { - "update_mask": "spec.expiration" - }, - "body": { - "spec": { - "no_expiry": true - } - } -} -{ - "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/production/databases/first-database", - "q": { - "update_mask": "spec.postgres_database,spec.role" - }, - "body": { - "spec": { - "postgres_database": "first_db", - "role": "projects/test-pg-proj-[UNIQUE_NAME]/branches/production/roles/app-owner" - } - } -} -{ - "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/production/databases/second-database", - "q": { - "update_mask": "spec.postgres_database,spec.role" - }, - "body": { - "spec": { - "postgres_database": "second_db", - "role": "projects/test-pg-proj-[UNIQUE_NAME]/branches/production/roles/app-owner" - } - } -} { "method": "DELETE", "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/production/databases/first-database/data-api" diff --git a/acceptance/bundle/resources/postgres_data_apis/recreate/output.txt b/acceptance/bundle/resources/postgres_data_apis/recreate/output.txt index e61fc95525d..65346bbb2df 100644 --- a/acceptance/bundle/resources/postgres_data_apis/recreate/output.txt +++ b/acceptance/bundle/resources/postgres_data_apis/recreate/output.txt @@ -32,23 +32,15 @@ Resources: 6 created, 0 changed, 0 deleted, 0 unchanged >>> update_file.py databricks.yml postgres_databases.first.name postgres_databases.second.name >>> [CLI] bundle plan -update postgres_branches.production recreate postgres_data_apis.my_data_api -update postgres_databases.first -update postgres_databases.second -update postgres_projects.my_project -Plan: 1 to add, 4 to change, 1 to delete, 1 unchanged +Plan: 1 to add, 0 to change, 1 to delete, 5 unchanged >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/recreate-pg-data-api-[UNIQUE_NAME]/default/files... Recreated postgres_data_apis.my_data_api -Updated postgres_branches.production -Updated postgres_databases.first -Updated postgres_databases.second -Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 1 created, 4 changed, 1 deleted, 1 unchanged +Resources: 1 created, 0 changed, 1 deleted, 5 unchanged >>> musterr [CLI] postgres get-data-api projects/test-pg-proj-[UNIQUE_NAME]/branches/production/databases/first-database/data-api Error: Data API is not enabled for this database diff --git a/acceptance/bundle/resources/postgres_data_apis/update/out.requests.remove_field.json b/acceptance/bundle/resources/postgres_data_apis/update/out.requests.remove_field.json index dbebee01327..615bb91c67f 100644 --- a/acceptance/bundle/resources/postgres_data_apis/update/out.requests.remove_field.json +++ b/acceptance/bundle/resources/postgres_data_apis/update/out.requests.remove_field.json @@ -1,41 +1,3 @@ -{ - "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", - "q": { - "update_mask": "spec.display_name" - }, - "body": { - "spec": { - "display_name": "Test Project for Data API Update", - "pg_version": 16 - } - } -} -{ - "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/production", - "q": { - "update_mask": "spec.expiration" - }, - "body": { - "spec": { - "no_expiry": true - } - } -} -{ - "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/production/databases/my-database", - "q": { - "update_mask": "spec.postgres_database,spec.role" - }, - "body": { - "spec": { - "postgres_database": "app_db", - "role": "projects/test-pg-proj-[UNIQUE_NAME]/branches/production/roles/app-owner" - } - } -} { "method": "PATCH", "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/production/databases/my-database/data-api", diff --git a/acceptance/bundle/resources/postgres_data_apis/update/out.requests.update.json b/acceptance/bundle/resources/postgres_data_apis/update/out.requests.update.json index 1aa0a0d23b8..8affc021c9e 100644 --- a/acceptance/bundle/resources/postgres_data_apis/update/out.requests.update.json +++ b/acceptance/bundle/resources/postgres_data_apis/update/out.requests.update.json @@ -1,41 +1,3 @@ -{ - "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", - "q": { - "update_mask": "spec.display_name" - }, - "body": { - "spec": { - "display_name": "Test Project for Data API Update", - "pg_version": 16 - } - } -} -{ - "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/production", - "q": { - "update_mask": "spec.expiration" - }, - "body": { - "spec": { - "no_expiry": true - } - } -} -{ - "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/production/databases/my-database", - "q": { - "update_mask": "spec.postgres_database,spec.role" - }, - "body": { - "spec": { - "postgres_database": "app_db", - "role": "projects/test-pg-proj-[UNIQUE_NAME]/branches/production/roles/app-owner" - } - } -} { "method": "PATCH", "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/production/databases/my-database/data-api", diff --git a/acceptance/bundle/resources/postgres_data_apis/update/output.txt b/acceptance/bundle/resources/postgres_data_apis/update/output.txt index c816583d0d4..0b0e758cea9 100644 --- a/acceptance/bundle/resources/postgres_data_apis/update/output.txt +++ b/acceptance/bundle/resources/postgres_data_apis/update/output.txt @@ -16,23 +16,17 @@ Resources: 5 created, 0 changed, 0 deleted, 0 unchanged >>> update_file.py databricks.yml db_max_rows: 100 db_max_rows: 500 >>> [CLI] bundle plan -update postgres_branches.production update postgres_data_apis.my_data_api -update postgres_databases.my_database -update postgres_projects.my_project -Plan: 0 to add, 4 to change, 0 to delete, 1 unchanged +Plan: 0 to add, 1 to change, 0 to delete, 4 unchanged >>> [CLI] bundle plan -o json >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/update-pg-data-api-[UNIQUE_NAME]/default/files... -Updated postgres_branches.production Updated postgres_data_apis.my_data_api -Updated postgres_databases.my_database -Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 0 created, 4 changed, 0 deleted, 1 unchanged +Resources: 0 created, 1 changed, 0 deleted, 4 unchanged >>> [CLI] postgres get-data-api projects/test-pg-proj-[UNIQUE_NAME]/branches/production/databases/my-database/data-api { @@ -52,21 +46,15 @@ Resources: 0 created, 4 changed, 0 deleted, 1 unchanged === Remove a spec field: update_mask=spec keeps a field the request omits, so it keeps its last value >>> [CLI] bundle plan -update postgres_branches.production update postgres_data_apis.my_data_api -update postgres_databases.my_database -update postgres_projects.my_project -Plan: 0 to add, 4 to change, 0 to delete, 1 unchanged +Plan: 0 to add, 1 to change, 0 to delete, 4 unchanged >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/update-pg-data-api-[UNIQUE_NAME]/default/files... -Updated postgres_branches.production Updated postgres_data_apis.my_data_api -Updated postgres_databases.my_database -Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 0 created, 4 changed, 0 deleted, 1 unchanged +Resources: 0 created, 1 changed, 0 deleted, 4 unchanged >>> [CLI] postgres get-data-api projects/test-pg-proj-[UNIQUE_NAME]/branches/production/databases/my-database/data-api { @@ -86,11 +74,7 @@ Resources: 0 created, 4 changed, 0 deleted, 1 unchanged === Plan after update shows no changes >>> [CLI] bundle plan -update postgres_branches.production -update postgres_databases.my_database -update postgres_projects.my_project - -Plan: 0 to add, 3 to change, 0 to delete, 2 unchanged +Plan: 0 to add, 0 to change, 0 to delete, 5 unchanged >>> [CLI] bundle destroy --auto-approve The following resources will be deleted: diff --git a/acceptance/bundle/resources/postgres_data_apis/url_reference/output.txt b/acceptance/bundle/resources/postgres_data_apis/url_reference/output.txt index 6079fa83854..05549b12d5b 100644 --- a/acceptance/bundle/resources/postgres_data_apis/url_reference/output.txt +++ b/acceptance/bundle/resources/postgres_data_apis/url_reference/output.txt @@ -30,21 +30,15 @@ Resources: 6 created, 0 changed, 0 deleted, 0 unchanged >>> update_file.py databricks.yml db_max_rows: 100 db_max_rows: 500 >>> [CLI] bundle plan -update postgres_branches.production update postgres_data_apis.my_data_api -update postgres_databases.my_database -update postgres_projects.my_project -Plan: 0 to add, 4 to change, 0 to delete, 2 unchanged +Plan: 0 to add, 1 to change, 0 to delete, 5 unchanged >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/url-ref-pg-data-api-[UNIQUE_NAME]/default/files... -Updated postgres_branches.production Updated postgres_data_apis.my_data_api -Updated postgres_databases.my_database -Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 0 created, 4 changed, 0 deleted, 2 unchanged +Resources: 0 created, 1 changed, 0 deleted, 5 unchanged >>> [CLI] jobs get [MY_JOB_ID] [ @@ -57,11 +51,7 @@ Resources: 0 created, 4 changed, 0 deleted, 2 unchanged === Plan after update shows no changes >>> [CLI] bundle plan -update postgres_branches.production -update postgres_databases.my_database -update postgres_projects.my_project - -Plan: 0 to add, 3 to change, 0 to delete, 3 unchanged +Plan: 0 to add, 0 to change, 0 to delete, 6 unchanged >>> [CLI] bundle destroy --auto-approve The following resources will be deleted: diff --git a/acceptance/bundle/resources/postgres_databases/recreate/output.txt b/acceptance/bundle/resources/postgres_databases/recreate/output.txt index ebac083cdab..fef88268bd2 100644 --- a/acceptance/bundle/resources/postgres_databases/recreate/output.txt +++ b/acceptance/bundle/resources/postgres_databases/recreate/output.txt @@ -138,11 +138,9 @@ resources: role: ${resources.postgres_roles.owner.id} >>> [CLI] bundle plan -update postgres_branches.main recreate postgres_databases.my_database -update postgres_projects.my_project -Plan: 1 to add, 2 to change, 1 to delete, 1 unchanged +Plan: 1 to add, 0 to change, 1 to delete, 3 unchanged === Recreate requires approval: non-interactive deploy must abort, not silently delete the database @@ -165,38 +163,10 @@ This action will result in the deletion or recreation of the following Lakebase All data stored in them will be permanently lost: recreate resources.postgres_databases.my_database Recreated postgres_databases.my_database -Updated postgres_branches.main -Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 1 created, 2 changed, 1 deleted, 1 unchanged +Resources: 1 created, 0 changed, 1 deleted, 3 unchanged >>> print_requests.py --unique --del-body parent,project_id,branch_id,endpoint_id,database_id,role_id,catalog_id,synced_table_id //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/ -{ - "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", - "q": { - "update_mask": "spec.display_name,spec.history_retention_duration" - }, - "body": { - "spec": { - "display_name": "Test Project for Database", - "history_retention_duration": "604800s", - "pg_version": 16 - } - } -} -{ - "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main", - "q": { - "update_mask": "spec.expiration" - }, - "body": { - "spec": { - "no_expiry": true - } - } -} { "method": "DELETE", "path": "/api/2.0/postgres/[MY_DATABASE_ID]" diff --git a/acceptance/bundle/resources/postgres_databases/replace_existing/out.requests.deploy.json b/acceptance/bundle/resources/postgres_databases/replace_existing/out.requests.deploy.json index 23668fbd150..c1dd61f0000 100644 --- a/acceptance/bundle/resources/postgres_databases/replace_existing/out.requests.deploy.json +++ b/acceptance/bundle/resources/postgres_databases/replace_existing/out.requests.deploy.json @@ -11,30 +11,12 @@ "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main/roles/app-owner" } { - "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", - "q": { - "update_mask": "spec.display_name,spec.history_retention_duration" - }, - "body": { - "spec": { - "display_name": "Test Project for Database replace_existing", - "history_retention_duration": "604800s", - "pg_version": 16 - } - } + "method": "GET", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]" } { - "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main", - "q": { - "update_mask": "spec.expiration" - }, - "body": { - "spec": { - "no_expiry": true - } - } + "method": "GET", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main" } { "method": "GET", diff --git a/acceptance/bundle/resources/postgres_databases/replace_existing/output.txt b/acceptance/bundle/resources/postgres_databases/replace_existing/output.txt index 8c7d130ace8..ec23011d880 100644 --- a/acceptance/bundle/resources/postgres_databases/replace_existing/output.txt +++ b/acceptance/bundle/resources/postgres_databases/replace_existing/output.txt @@ -17,21 +17,17 @@ Resources: 4 created, 0 changed, 0 deleted, 0 unchanged === Plan after unbind: the bundle wants to (re-)create the database >>> [CLI] bundle plan -update postgres_branches.main create postgres_databases.my_database -update postgres_projects.my_project -Plan: 1 to add, 2 to change, 0 to delete, 1 unchanged +Plan: 1 to add, 0 to change, 0 to delete, 3 unchanged === Re-deploy: replace_existing adopts the already-existing database instead of erroring >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/replace-existing-database-[UNIQUE_NAME]/default/files... Created postgres_databases.my_database -Updated postgres_branches.main -Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 1 created, 2 changed, 0 deleted, 1 unchanged +Resources: 1 created, 0 changed, 0 deleted, 3 unchanged === Confirm the database is under management again diff --git a/acceptance/bundle/resources/postgres_databases/update/out.requests.no_change.json b/acceptance/bundle/resources/postgres_databases/update/out.requests.no_change.json index decb90917f4..42d1bd84b95 100644 --- a/acceptance/bundle/resources/postgres_databases/update/out.requests.no_change.json +++ b/acceptance/bundle/resources/postgres_databases/update/out.requests.no_change.json @@ -15,45 +15,14 @@ "path": "/api/2.0/postgres/[MY_DATABASE_ID]" } { - "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", - "q": { - "update_mask": "spec.display_name,spec.history_retention_duration" - }, - "body": { - "spec": { - "display_name": "Test Project for Database Update", - "history_retention_duration": "604800s", - "pg_version": 16 - } - } + "method": "GET", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]" } { - "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main", - "q": { - "update_mask": "spec.expiration" - }, - "body": { - "spec": { - "no_expiry": true - } - } + "method": "GET", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main" } { "method": "GET", "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main/roles/app-owner" } -{ - "method": "PATCH", - "path": "/api/2.0/postgres/[MY_DATABASE_ID]", - "q": { - "update_mask": "spec.postgres_database,spec.role" - }, - "body": { - "spec": { - "postgres_database": "initial_db_name", - "role": "projects/test-pg-proj-[UNIQUE_NAME]/branches/main/roles/app-owner" - } - } -} diff --git a/acceptance/bundle/resources/postgres_databases/update/out.requests.restore.json b/acceptance/bundle/resources/postgres_databases/update/out.requests.restore.json index decb90917f4..05d035f3dc0 100644 --- a/acceptance/bundle/resources/postgres_databases/update/out.requests.restore.json +++ b/acceptance/bundle/resources/postgres_databases/update/out.requests.restore.json @@ -15,30 +15,12 @@ "path": "/api/2.0/postgres/[MY_DATABASE_ID]" } { - "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", - "q": { - "update_mask": "spec.display_name,spec.history_retention_duration" - }, - "body": { - "spec": { - "display_name": "Test Project for Database Update", - "history_retention_duration": "604800s", - "pg_version": 16 - } - } + "method": "GET", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]" } { - "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main", - "q": { - "update_mask": "spec.expiration" - }, - "body": { - "spec": { - "no_expiry": true - } - } + "method": "GET", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main" } { "method": "GET", @@ -48,7 +30,7 @@ "method": "PATCH", "path": "/api/2.0/postgres/[MY_DATABASE_ID]", "q": { - "update_mask": "spec.postgres_database,spec.role" + "update_mask": "spec.postgres_database" }, "body": { "spec": { diff --git a/acceptance/bundle/resources/postgres_databases/update/out.requests.update.json b/acceptance/bundle/resources/postgres_databases/update/out.requests.update.json index d37070b86eb..82d82c5a603 100644 --- a/acceptance/bundle/resources/postgres_databases/update/out.requests.update.json +++ b/acceptance/bundle/resources/postgres_databases/update/out.requests.update.json @@ -15,30 +15,12 @@ "path": "/api/2.0/postgres/[MY_DATABASE_ID]" } { - "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", - "q": { - "update_mask": "spec.display_name,spec.history_retention_duration" - }, - "body": { - "spec": { - "display_name": "Test Project for Database Update", - "history_retention_duration": "604800s", - "pg_version": 16 - } - } + "method": "GET", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]" } { - "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main", - "q": { - "update_mask": "spec.expiration" - }, - "body": { - "spec": { - "no_expiry": true - } - } + "method": "GET", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main" } { "method": "GET", @@ -48,7 +30,7 @@ "method": "PATCH", "path": "/api/2.0/postgres/[MY_DATABASE_ID]", "q": { - "update_mask": "spec.postgres_database,spec.role" + "update_mask": "spec.postgres_database" }, "body": { "spec": { diff --git a/acceptance/bundle/resources/postgres_databases/update/output.txt b/acceptance/bundle/resources/postgres_databases/update/output.txt index aef36069573..2a81331e9a4 100644 --- a/acceptance/bundle/resources/postgres_databases/update/output.txt +++ b/acceptance/bundle/resources/postgres_databases/update/output.txt @@ -46,21 +46,14 @@ Resources: 4 created, 0 changed, 0 deleted, 0 unchanged === Verify no changes >>> [CLI] bundle plan -update postgres_branches.main -update postgres_databases.my_database -update postgres_projects.my_project - -Plan: 0 to add, 3 to change, 0 to delete, 1 unchanged +Plan: 0 to add, 0 to change, 0 to delete, 4 unchanged >>> [CLI] bundle plan -o json >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/update-postgres-database-[UNIQUE_NAME]/default/files... -Updated postgres_branches.main -Updated postgres_databases.my_database -Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 0 created, 3 changed, 0 deleted, 1 unchanged +Resources: 0 created, 0 changed, 0 deleted, 4 unchanged >>> print_requests.py --del-body project_id,branch_id,endpoint_id,database_id,role_id,catalog_id,synced_table_id --keep --get //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/ @@ -103,21 +96,17 @@ resources: role: ${resources.postgres_roles.owner.id} >>> [CLI] bundle plan -update postgres_branches.main update postgres_databases.my_database -update postgres_projects.my_project -Plan: 0 to add, 3 to change, 0 to delete, 1 unchanged +Plan: 0 to add, 1 to change, 0 to delete, 3 unchanged >>> [CLI] bundle plan -o json >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/update-postgres-database-[UNIQUE_NAME]/default/files... -Updated postgres_branches.main Updated postgres_databases.my_database -Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 0 created, 3 changed, 0 deleted, 1 unchanged +Resources: 0 created, 1 changed, 0 deleted, 3 unchanged >>> print_requests.py --del-body project_id,branch_id,endpoint_id,database_id,role_id,catalog_id,synced_table_id --keep --get //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/ @@ -138,21 +127,17 @@ Resources: 0 created, 3 changed, 0 deleted, 1 unchanged >>> update_file.py databricks.yml postgres_database: renamed_db_name postgres_database: initial_db_name >>> [CLI] bundle plan -update postgres_branches.main update postgres_databases.my_database -update postgres_projects.my_project -Plan: 0 to add, 3 to change, 0 to delete, 1 unchanged +Plan: 0 to add, 1 to change, 0 to delete, 3 unchanged >>> [CLI] bundle plan -o json >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/update-postgres-database-[UNIQUE_NAME]/default/files... -Updated postgres_branches.main Updated postgres_databases.my_database -Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 0 created, 3 changed, 0 deleted, 1 unchanged +Resources: 0 created, 1 changed, 0 deleted, 3 unchanged >>> print_requests.py --del-body project_id,branch_id,endpoint_id,database_id,role_id,catalog_id,synced_table_id --keep --get //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/ diff --git a/acceptance/bundle/resources/postgres_endpoints/add_settings/out.requests.json b/acceptance/bundle/resources/postgres_endpoints/add_settings/out.requests.json index 6931265b8f6..0693bf14f3b 100644 --- a/acceptance/bundle/resources/postgres_endpoints/add_settings/out.requests.json +++ b/acceptance/bundle/resources/postgres_endpoints/add_settings/out.requests.json @@ -1,38 +1,8 @@ -{ - "method": "DELETE", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main/endpoints/my-endpoint" -} { "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", - "q": { - "update_mask": "spec.display_name,spec.history_retention_duration" - }, - "body": { - "spec": { - "display_name": "Test Project for Endpoint settings Add", - "history_retention_duration": "604800s", - "pg_version": 16 - } - } -} -{ - "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main", - "q": { - "update_mask": "spec.expiration" - }, - "body": { - "spec": { - "no_expiry": true - } - } -} -{ - "method": "POST", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main/endpoints", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main/endpoints/my-endpoint", "q": { - "endpoint_id": "my-endpoint" + "update_mask": "spec.settings" }, "body": { "spec": { diff --git a/acceptance/bundle/resources/postgres_endpoints/add_settings/output.txt b/acceptance/bundle/resources/postgres_endpoints/add_settings/output.txt index 54b0ef52147..3e185589de1 100644 --- a/acceptance/bundle/resources/postgres_endpoints/add_settings/output.txt +++ b/acceptance/bundle/resources/postgres_endpoints/add_settings/output.txt @@ -12,30 +12,22 @@ Resources: 3 created, 0 changed, 0 deleted, 0 unchanged === Add a settings block and re-deploy >>> [CLI] bundle plan -update postgres_branches.main -recreate postgres_endpoints.my_endpoint -update postgres_projects.my_project +update postgres_endpoints.my_endpoint -Plan: 1 to add, 2 to change, 1 to delete, 0 unchanged +Plan: 0 to add, 1 to change, 0 to delete, 2 unchanged >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/files... -Recreated postgres_endpoints.my_endpoint -Updated postgres_branches.main -Updated postgres_projects.my_project +Updated postgres_endpoints.my_endpoint Files: 0 uploaded, 0 deleted -Resources: 1 created, 2 changed, 1 deleted, 0 unchanged +Resources: 0 created, 1 changed, 0 deleted, 2 unchanged >>> print_requests.py --del-body project_id,branch_id,endpoint_id --sort //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/ === Plan again: the addition must leave no drift behind >>> [CLI] bundle plan -update postgres_branches.main -recreate postgres_endpoints.my_endpoint -update postgres_projects.my_project - -Plan: 1 to add, 2 to change, 1 to delete, 0 unchanged +Plan: 0 to add, 0 to change, 0 to delete, 3 unchanged >>> [CLI] bundle destroy --auto-approve The following resources will be deleted: diff --git a/acceptance/bundle/resources/postgres_endpoints/recreate/output.txt b/acceptance/bundle/resources/postgres_endpoints/recreate/output.txt index 8f2f8fa2c07..634046b4244 100644 --- a/acceptance/bundle/resources/postgres_endpoints/recreate/output.txt +++ b/acceptance/bundle/resources/postgres_endpoints/recreate/output.txt @@ -128,52 +128,17 @@ resources: autoscaling_limit_max_cu: 2 >>> [CLI] bundle plan -update postgres_branches.main recreate postgres_endpoints.my_endpoint -update postgres_projects.my_project -Plan: 1 to add, 2 to change, 1 to delete, 0 unchanged +Plan: 1 to add, 0 to change, 1 to delete, 2 unchanged >>> [CLI] bundle deploy --auto-approve Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/deploy-postgres-endpoint-recreate-[UNIQUE_NAME]/default/files... Recreated postgres_endpoints.my_endpoint -Updated postgres_branches.main -Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 1 created, 2 changed, 1 deleted, 0 unchanged +Resources: 1 created, 0 changed, 1 deleted, 2 unchanged >>> print_requests.py --unique --del-body parent,project_id,branch_id,endpoint_id,database_id,role_id,catalog_id,synced_table_id //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/ -{ - "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", - "q": { - "update_mask": "spec.default_endpoint_settings,spec.display_name,spec.history_retention_duration" - }, - "body": { - "spec": { - "default_endpoint_settings": { - "autoscaling_limit_max_cu": 4, - "autoscaling_limit_min_cu": 0.5, - "suspend_timeout_duration": "300s" - }, - "display_name": "Test Project", - "history_retention_duration": "604800s", - "pg_version": 16 - } - } -} -{ - "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main", - "q": { - "update_mask": "spec.expiration" - }, - "body": { - "spec": { - "no_expiry": true - } - } -} { "method": "DELETE", "path": "/api/2.0/postgres/[MY_ENDPOINT_ID]" diff --git a/acceptance/bundle/resources/postgres_endpoints/remove_suspend_timeout/out.deploy.txt b/acceptance/bundle/resources/postgres_endpoints/remove_suspend_timeout/out.deploy.txt index c0770de24be..062615af571 100644 --- a/acceptance/bundle/resources/postgres_endpoints/remove_suspend_timeout/out.deploy.txt +++ b/acceptance/bundle/resources/postgres_endpoints/remove_suspend_timeout/out.deploy.txt @@ -1,6 +1,11 @@ Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/remove-postgres-endpoint-suspend-[UNIQUE_NAME]/default/files... -Recreated postgres_endpoints.my_endpoint -Updated postgres_branches.main -Updated postgres_projects.my_project +Error: cannot update resources.postgres_endpoints.my_endpoint: updating id=projects/test-pg-proj-[UNIQUE_NAME]/branches/main/endpoints/my-endpoint: Field 'spec.suspension' is in update_mask but not provided in request (400 INVALID_PARAMETER_VALUE) + +Endpoint: PATCH [DATABRICKS_URL]/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main/endpoints/my-endpoint?update_mask=spec.suspension +HTTP Status: 400 Bad Request +API error_code: INVALID_PARAMETER_VALUE +API message: Field 'spec.suspension' is in update_mask but not provided in request + Files: 0 uploaded, 0 deleted -Resources: 1 created, 2 changed, 1 deleted, 0 unchanged + +Exit code: 1 diff --git a/acceptance/bundle/resources/postgres_endpoints/remove_suspend_timeout/out.plan.drift.txt b/acceptance/bundle/resources/postgres_endpoints/remove_suspend_timeout/out.plan.drift.txt index 1fa74e484d7..20dbae59085 100644 --- a/acceptance/bundle/resources/postgres_endpoints/remove_suspend_timeout/out.plan.drift.txt +++ b/acceptance/bundle/resources/postgres_endpoints/remove_suspend_timeout/out.plan.drift.txt @@ -1,7 +1,5 @@ >>> [CLI] bundle plan -update postgres_branches.main -recreate postgres_endpoints.my_endpoint -update postgres_projects.my_project +update postgres_endpoints.my_endpoint -Plan: 1 to add, 2 to change, 1 to delete, 0 unchanged +Plan: 0 to add, 1 to change, 0 to delete, 2 unchanged diff --git a/acceptance/bundle/resources/postgres_endpoints/remove_suspend_timeout/out.requests.json b/acceptance/bundle/resources/postgres_endpoints/remove_suspend_timeout/out.requests.json index 0e7fbae3727..56aefeeca6c 100644 --- a/acceptance/bundle/resources/postgres_endpoints/remove_suspend_timeout/out.requests.json +++ b/acceptance/bundle/resources/postgres_endpoints/remove_suspend_timeout/out.requests.json @@ -1,38 +1,8 @@ -{ - "method": "DELETE", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main/endpoints/my-endpoint" -} { "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", - "q": { - "update_mask": "spec.display_name,spec.history_retention_duration" - }, - "body": { - "spec": { - "display_name": "Test Project for Endpoint Suspend Timeout Update", - "history_retention_duration": "604800s", - "pg_version": 16 - } - } -} -{ - "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main", - "q": { - "update_mask": "spec.expiration" - }, - "body": { - "spec": { - "no_expiry": true - } - } -} -{ - "method": "POST", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main/endpoints", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main/endpoints/my-endpoint", "q": { - "endpoint_id": "my-endpoint" + "update_mask": "spec.suspension" }, "body": { "spec": { diff --git a/acceptance/bundle/resources/postgres_endpoints/remove_suspend_timeout/output.txt b/acceptance/bundle/resources/postgres_endpoints/remove_suspend_timeout/output.txt index dfb83306840..59954a2cd43 100644 --- a/acceptance/bundle/resources/postgres_endpoints/remove_suspend_timeout/output.txt +++ b/acceptance/bundle/resources/postgres_endpoints/remove_suspend_timeout/output.txt @@ -29,11 +29,9 @@ Resources: 3 created, 0 changed, 0 deleted, 0 unchanged >>> update_file.py databricks.yml suspend_timeout_duration: 300s >>> [CLI] bundle plan -update postgres_branches.main -recreate postgres_endpoints.my_endpoint -update postgres_projects.my_project +update postgres_endpoints.my_endpoint -Plan: 1 to add, 2 to change, 1 to delete, 0 unchanged +Plan: 0 to add, 1 to change, 0 to delete, 2 unchanged >>> [CLI] bundle plan -o json @@ -50,7 +48,7 @@ Plan: 1 to add, 2 to change, 1 to delete, 0 unchanged "endpoint_type": "ENDPOINT_TYPE_READ_ONLY", "autoscaling_limit_min_cu": 0.5, "autoscaling_limit_max_cu": 8, - "suspend_timeout_duration": "86400s" + "suspend_timeout_duration": "300s" } } diff --git a/acceptance/bundle/resources/postgres_endpoints/update_autoscaling/out.requests.no_change.json b/acceptance/bundle/resources/postgres_endpoints/update_autoscaling/out.requests.no_change.json index 2478f936474..47dd16fa0ff 100644 --- a/acceptance/bundle/resources/postgres_endpoints/update_autoscaling/out.requests.no_change.json +++ b/acceptance/bundle/resources/postgres_endpoints/update_autoscaling/out.requests.no_change.json @@ -11,51 +11,10 @@ "path": "/api/2.0/postgres/[MY_ENDPOINT_ID]" } { - "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", - "q": { - "update_mask": "spec.display_name,spec.history_retention_duration" - }, - "body": { - "spec": { - "display_name": "Test Project for Endpoint Update", - "history_retention_duration": "604800s", - "pg_version": 16 - } - } -} -{ - "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main", - "q": { - "update_mask": "spec.expiration" - }, - "body": { - "spec": { - "no_expiry": true - } - } -} -{ - "method": "DELETE", - "path": "/api/2.0/postgres/[MY_ENDPOINT_ID]" -} -{ - "method": "POST", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main/endpoints", - "q": { - "endpoint_id": "my-endpoint" - }, - "body": { - "spec": { - "autoscaling_limit_max_cu": 8, - "autoscaling_limit_min_cu": 0.5, - "endpoint_type": "ENDPOINT_TYPE_READ_ONLY", - "suspend_timeout_duration": "300s" - } - } + "method": "GET", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]" } { "method": "GET", - "path": "/api/2.0/postgres/[MY_ENDPOINT_ID]" + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main" } diff --git a/acceptance/bundle/resources/postgres_endpoints/update_autoscaling/out.requests.restore.json b/acceptance/bundle/resources/postgres_endpoints/update_autoscaling/out.requests.restore.json index 2478f936474..fac7fa4601f 100644 --- a/acceptance/bundle/resources/postgres_endpoints/update_autoscaling/out.requests.restore.json +++ b/acceptance/bundle/resources/postgres_endpoints/update_autoscaling/out.requests.restore.json @@ -11,40 +11,18 @@ "path": "/api/2.0/postgres/[MY_ENDPOINT_ID]" } { - "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", - "q": { - "update_mask": "spec.display_name,spec.history_retention_duration" - }, - "body": { - "spec": { - "display_name": "Test Project for Endpoint Update", - "history_retention_duration": "604800s", - "pg_version": 16 - } - } -} -{ - "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main", - "q": { - "update_mask": "spec.expiration" - }, - "body": { - "spec": { - "no_expiry": true - } - } + "method": "GET", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]" } { - "method": "DELETE", - "path": "/api/2.0/postgres/[MY_ENDPOINT_ID]" + "method": "GET", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main" } { - "method": "POST", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main/endpoints", + "method": "PATCH", + "path": "/api/2.0/postgres/[MY_ENDPOINT_ID]", "q": { - "endpoint_id": "my-endpoint" + "update_mask": "spec.autoscaling_limit_max_cu" }, "body": { "spec": { diff --git a/acceptance/bundle/resources/postgres_endpoints/update_autoscaling/out.requests.update.json b/acceptance/bundle/resources/postgres_endpoints/update_autoscaling/out.requests.update.json index ee94877199a..7347d0a8c7f 100644 --- a/acceptance/bundle/resources/postgres_endpoints/update_autoscaling/out.requests.update.json +++ b/acceptance/bundle/resources/postgres_endpoints/update_autoscaling/out.requests.update.json @@ -11,40 +11,18 @@ "path": "/api/2.0/postgres/[MY_ENDPOINT_ID]" } { - "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", - "q": { - "update_mask": "spec.display_name,spec.history_retention_duration" - }, - "body": { - "spec": { - "display_name": "Test Project for Endpoint Update", - "history_retention_duration": "604800s", - "pg_version": 16 - } - } -} -{ - "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main", - "q": { - "update_mask": "spec.expiration" - }, - "body": { - "spec": { - "no_expiry": true - } - } + "method": "GET", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]" } { - "method": "DELETE", - "path": "/api/2.0/postgres/[MY_ENDPOINT_ID]" + "method": "GET", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main" } { - "method": "POST", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main/endpoints", + "method": "PATCH", + "path": "/api/2.0/postgres/[MY_ENDPOINT_ID]", "q": { - "endpoint_id": "my-endpoint" + "update_mask": "spec.autoscaling_limit_max_cu" }, "body": { "spec": { diff --git a/acceptance/bundle/resources/postgres_endpoints/update_autoscaling/output.txt b/acceptance/bundle/resources/postgres_endpoints/update_autoscaling/output.txt index 3054de8cdc7..7e3ead200f7 100644 --- a/acceptance/bundle/resources/postgres_endpoints/update_autoscaling/output.txt +++ b/acceptance/bundle/resources/postgres_endpoints/update_autoscaling/output.txt @@ -47,21 +47,14 @@ Resources: 3 created, 0 changed, 0 deleted, 0 unchanged === Verify no changes >>> [CLI] bundle plan -update postgres_branches.main -recreate postgres_endpoints.my_endpoint -update postgres_projects.my_project - -Plan: 1 to add, 2 to change, 1 to delete, 0 unchanged +Plan: 0 to add, 0 to change, 0 to delete, 3 unchanged >>> [CLI] bundle plan -o json >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/update-postgres-endpoint-[UNIQUE_NAME]/default/files... -Recreated postgres_endpoints.my_endpoint -Updated postgres_branches.main -Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 1 created, 2 changed, 1 deleted, 0 unchanged +Resources: 0 created, 0 changed, 0 deleted, 3 unchanged >>> print_requests.py --del-body project_id,branch_id,endpoint_id,database_id,role_id,catalog_id,synced_table_id --keep --get //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/ @@ -100,21 +93,17 @@ resources: suspend_timeout_duration: 300s >>> [CLI] bundle plan -update postgres_branches.main -recreate postgres_endpoints.my_endpoint -update postgres_projects.my_project +update postgres_endpoints.my_endpoint -Plan: 1 to add, 2 to change, 1 to delete, 0 unchanged +Plan: 0 to add, 1 to change, 0 to delete, 2 unchanged >>> [CLI] bundle plan -o json >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/update-postgres-endpoint-[UNIQUE_NAME]/default/files... -Recreated postgres_endpoints.my_endpoint -Updated postgres_branches.main -Updated postgres_projects.my_project +Updated postgres_endpoints.my_endpoint Files: 0 uploaded, 0 deleted -Resources: 1 created, 2 changed, 1 deleted, 0 unchanged +Resources: 0 created, 1 changed, 0 deleted, 2 unchanged >>> print_requests.py --del-body project_id,branch_id,endpoint_id,database_id,role_id,catalog_id,synced_table_id --keep --get //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/ @@ -138,21 +127,17 @@ Resources: 1 created, 2 changed, 1 deleted, 0 unchanged >>> update_file.py databricks.yml autoscaling_limit_max_cu: 4 autoscaling_limit_max_cu: 8 >>> [CLI] bundle plan -update postgres_branches.main -recreate postgres_endpoints.my_endpoint -update postgres_projects.my_project +update postgres_endpoints.my_endpoint -Plan: 1 to add, 2 to change, 1 to delete, 0 unchanged +Plan: 0 to add, 1 to change, 0 to delete, 2 unchanged >>> [CLI] bundle plan -o json >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/update-postgres-endpoint-[UNIQUE_NAME]/default/files... -Recreated postgres_endpoints.my_endpoint -Updated postgres_branches.main -Updated postgres_projects.my_project +Updated postgres_endpoints.my_endpoint Files: 0 uploaded, 0 deleted -Resources: 1 created, 2 changed, 1 deleted, 0 unchanged +Resources: 0 created, 1 changed, 0 deleted, 2 unchanged >>> print_requests.py --del-body project_id,branch_id,endpoint_id,database_id,role_id,catalog_id,synced_table_id --keep --get //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/ diff --git a/acceptance/bundle/resources/postgres_endpoints/update_pg_settings/out.requests.json b/acceptance/bundle/resources/postgres_endpoints/update_pg_settings/out.requests.json index c590a46bee4..8e87c6f1861 100644 --- a/acceptance/bundle/resources/postgres_endpoints/update_pg_settings/out.requests.json +++ b/acceptance/bundle/resources/postgres_endpoints/update_pg_settings/out.requests.json @@ -1,38 +1,8 @@ -{ - "method": "DELETE", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main/endpoints/my-endpoint" -} { "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", - "q": { - "update_mask": "spec.display_name,spec.history_retention_duration" - }, - "body": { - "spec": { - "display_name": "Test Project for Endpoint pg_settings Update", - "history_retention_duration": "604800s", - "pg_version": 16 - } - } -} -{ - "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main", - "q": { - "update_mask": "spec.expiration" - }, - "body": { - "spec": { - "no_expiry": true - } - } -} -{ - "method": "POST", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main/endpoints", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main/endpoints/my-endpoint", "q": { - "endpoint_id": "my-endpoint" + "update_mask": "spec.settings.pg_settings" }, "body": { "spec": { diff --git a/acceptance/bundle/resources/postgres_endpoints/update_pg_settings/output.txt b/acceptance/bundle/resources/postgres_endpoints/update_pg_settings/output.txt index 515e6772ada..5dd75731258 100644 --- a/acceptance/bundle/resources/postgres_endpoints/update_pg_settings/output.txt +++ b/acceptance/bundle/resources/postgres_endpoints/update_pg_settings/output.txt @@ -14,32 +14,24 @@ Resources: 3 created, 0 changed, 0 deleted, 0 unchanged >>> update_file.py databricks.yml statement_timeout: 8000 statement_timeout: 16000 >>> [CLI] bundle plan -update postgres_branches.main -recreate postgres_endpoints.my_endpoint -update postgres_projects.my_project +update postgres_endpoints.my_endpoint -Plan: 1 to add, 2 to change, 1 to delete, 0 unchanged +Plan: 0 to add, 1 to change, 0 to delete, 2 unchanged >>> [CLI] bundle plan -o json >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/files... -Recreated postgres_endpoints.my_endpoint -Updated postgres_branches.main -Updated postgres_projects.my_project +Updated postgres_endpoints.my_endpoint Files: 0 uploaded, 0 deleted -Resources: 1 created, 2 changed, 1 deleted, 0 unchanged +Resources: 0 created, 1 changed, 0 deleted, 2 unchanged >>> print_requests.py --del-body project_id,branch_id,endpoint_id --sort //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/ === Plan again: the change must leave no drift behind >>> [CLI] bundle plan -update postgres_branches.main -recreate postgres_endpoints.my_endpoint -update postgres_projects.my_project - -Plan: 1 to add, 2 to change, 1 to delete, 0 unchanged +Plan: 0 to add, 0 to change, 0 to delete, 3 unchanged >>> [CLI] bundle destroy --auto-approve The following resources will be deleted: diff --git a/acceptance/bundle/resources/postgres_endpoints/update_suspend_timeout/out.requests.json b/acceptance/bundle/resources/postgres_endpoints/update_suspend_timeout/out.requests.json index 36e6cb33def..3acf526f897 100644 --- a/acceptance/bundle/resources/postgres_endpoints/update_suspend_timeout/out.requests.json +++ b/acceptance/bundle/resources/postgres_endpoints/update_suspend_timeout/out.requests.json @@ -1,38 +1,8 @@ -{ - "method": "DELETE", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main/endpoints/my-endpoint" -} { "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", - "q": { - "update_mask": "spec.display_name,spec.history_retention_duration" - }, - "body": { - "spec": { - "display_name": "Test Project for Endpoint Suspend Timeout Update", - "history_retention_duration": "604800s", - "pg_version": 16 - } - } -} -{ - "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main", - "q": { - "update_mask": "spec.expiration" - }, - "body": { - "spec": { - "no_expiry": true - } - } -} -{ - "method": "POST", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main/endpoints", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main/endpoints/my-endpoint", "q": { - "endpoint_id": "my-endpoint" + "update_mask": "spec.suspension" }, "body": { "spec": { diff --git a/acceptance/bundle/resources/postgres_endpoints/update_suspend_timeout/output.txt b/acceptance/bundle/resources/postgres_endpoints/update_suspend_timeout/output.txt index ea68b0e5ca8..6bde76314ec 100644 --- a/acceptance/bundle/resources/postgres_endpoints/update_suspend_timeout/output.txt +++ b/acceptance/bundle/resources/postgres_endpoints/update_suspend_timeout/output.txt @@ -31,21 +31,17 @@ Resources: 3 created, 0 changed, 0 deleted, 0 unchanged === Plan and deploy >>> [CLI] bundle plan -update postgres_branches.main -recreate postgres_endpoints.my_endpoint -update postgres_projects.my_project +update postgres_endpoints.my_endpoint -Plan: 1 to add, 2 to change, 1 to delete, 0 unchanged +Plan: 0 to add, 1 to change, 0 to delete, 2 unchanged >>> [CLI] bundle plan -o json >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/update-postgres-endpoint-suspend-[UNIQUE_NAME]/default/files... -Recreated postgres_endpoints.my_endpoint -Updated postgres_branches.main -Updated postgres_projects.my_project +Updated postgres_endpoints.my_endpoint Files: 0 uploaded, 0 deleted -Resources: 1 created, 2 changed, 1 deleted, 0 unchanged +Resources: 0 created, 1 changed, 0 deleted, 2 unchanged >>> print_requests.py --del-body project_id,branch_id,endpoint_id --sort //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/ diff --git a/acceptance/bundle/resources/postgres_projects/add_default_endpoint_settings/out.deploy.txt b/acceptance/bundle/resources/postgres_projects/add_default_endpoint_settings/out.deploy.txt index 6ef76dfbe9e..e9fa2b4da16 100644 --- a/acceptance/bundle/resources/postgres_projects/add_default_endpoint_settings/out.deploy.txt +++ b/acceptance/bundle/resources/postgres_projects/add_default_endpoint_settings/out.deploy.txt @@ -1,7 +1,7 @@ Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/files... Error: cannot update resources.postgres_projects.my_project: updating id=projects/test-pg-proj-[UNIQUE_NAME]: Field 'spec.default_endpoint_settings.suspension' is in update_mask but not provided in request (400 INVALID_PARAMETER_VALUE) -Endpoint: PATCH [DATABRICKS_URL]/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]?update_mask=spec.default_endpoint_settings%2Cspec.display_name%2Cspec.history_retention_duration +Endpoint: PATCH [DATABRICKS_URL]/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]?update_mask=spec.default_endpoint_settings HTTP Status: 400 Bad Request API error_code: INVALID_PARAMETER_VALUE API message: Field 'spec.default_endpoint_settings.suspension' is in update_mask but not provided in request diff --git a/acceptance/bundle/resources/postgres_projects/remove_history_retention/out.deploy.txt b/acceptance/bundle/resources/postgres_projects/remove_history_retention/out.deploy.txt index 971d9a7733c..43f53f98801 100644 --- a/acceptance/bundle/resources/postgres_projects/remove_history_retention/out.deploy.txt +++ b/acceptance/bundle/resources/postgres_projects/remove_history_retention/out.deploy.txt @@ -1,4 +1,11 @@ Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/remove-postgres-project-retention-[UNIQUE_NAME]/default/files... -Updated postgres_projects.my_project +Error: cannot update resources.postgres_projects.my_project: updating id=projects/test-pg-proj-[UNIQUE_NAME]: Field 'spec.history_retention_duration' is in update_mask but not provided in request (400 INVALID_PARAMETER_VALUE) + +Endpoint: PATCH [DATABRICKS_URL]/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]?update_mask=spec.history_retention_duration +HTTP Status: 400 Bad Request +API error_code: INVALID_PARAMETER_VALUE +API message: Field 'spec.history_retention_duration' is in update_mask but not provided in request + Files: 0 uploaded, 0 deleted -Resources: 0 created, 1 changed, 0 deleted, 0 unchanged + +Exit code: 1 diff --git a/acceptance/bundle/resources/postgres_projects/remove_history_retention/out.requests.json b/acceptance/bundle/resources/postgres_projects/remove_history_retention/out.requests.json index e1fabfc393f..3db270dc252 100644 --- a/acceptance/bundle/resources/postgres_projects/remove_history_retention/out.requests.json +++ b/acceptance/bundle/resources/postgres_projects/remove_history_retention/out.requests.json @@ -2,7 +2,7 @@ "method": "PATCH", "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", "q": { - "update_mask": "spec.display_name" + "update_mask": "spec.history_retention_duration" }, "body": { "spec": { diff --git a/acceptance/bundle/resources/postgres_projects/update_default_endpoint_autoscaling/out.requests.json b/acceptance/bundle/resources/postgres_projects/update_default_endpoint_autoscaling/out.requests.json index abbc8ff4c4d..326ad9eea01 100644 --- a/acceptance/bundle/resources/postgres_projects/update_default_endpoint_autoscaling/out.requests.json +++ b/acceptance/bundle/resources/postgres_projects/update_default_endpoint_autoscaling/out.requests.json @@ -2,7 +2,7 @@ "method": "PATCH", "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", "q": { - "update_mask": "spec.default_endpoint_settings.autoscaling_limit_max_cu,spec.display_name,spec.history_retention_duration" + "update_mask": "spec.default_endpoint_settings.autoscaling_limit_max_cu" }, "body": { "spec": { diff --git a/acceptance/bundle/resources/postgres_projects/update_default_endpoint_autoscaling/output.txt b/acceptance/bundle/resources/postgres_projects/update_default_endpoint_autoscaling/output.txt index bb9afed1a73..5e9334bcba9 100644 --- a/acceptance/bundle/resources/postgres_projects/update_default_endpoint_autoscaling/output.txt +++ b/acceptance/bundle/resources/postgres_projects/update_default_endpoint_autoscaling/output.txt @@ -34,9 +34,7 @@ Resources: 0 created, 1 changed, 0 deleted, 0 unchanged === Plan again: the change must leave no drift behind >>> [CLI] bundle plan -update postgres_projects.my_project - -Plan: 0 to add, 1 to change, 0 to delete, 0 unchanged +Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged >>> [CLI] bundle destroy --auto-approve The following resources will be deleted: diff --git a/acceptance/bundle/resources/postgres_projects/update_default_endpoint_suspend/out.requests.json b/acceptance/bundle/resources/postgres_projects/update_default_endpoint_suspend/out.requests.json index a6a5d05c69c..3747f87142d 100644 --- a/acceptance/bundle/resources/postgres_projects/update_default_endpoint_suspend/out.requests.json +++ b/acceptance/bundle/resources/postgres_projects/update_default_endpoint_suspend/out.requests.json @@ -2,7 +2,7 @@ "method": "PATCH", "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", "q": { - "update_mask": "spec.default_endpoint_settings.suspension,spec.display_name" + "update_mask": "spec.default_endpoint_settings.suspension" }, "body": { "spec": { diff --git a/acceptance/bundle/resources/postgres_projects/update_display_name/out.requests.no_change.json b/acceptance/bundle/resources/postgres_projects/update_display_name/out.requests.no_change.json index b37af69961e..1d6880d333b 100644 --- a/acceptance/bundle/resources/postgres_projects/update_display_name/out.requests.no_change.json +++ b/acceptance/bundle/resources/postgres_projects/update_display_name/out.requests.no_change.json @@ -2,22 +2,3 @@ "method": "GET", "path": "/api/2.0/postgres/[MY_PROJECT_ID]" } -{ - "method": "PATCH", - "path": "/api/2.0/postgres/[MY_PROJECT_ID]", - "q": { - "update_mask": "spec.default_endpoint_settings,spec.display_name,spec.history_retention_duration" - }, - "body": { - "spec": { - "default_endpoint_settings": { - "autoscaling_limit_max_cu": 4, - "autoscaling_limit_min_cu": 0.5, - "suspend_timeout_duration": "300s" - }, - "display_name": "Original Name", - "history_retention_duration": "604800s", - "pg_version": 16 - } - } -} diff --git a/acceptance/bundle/resources/postgres_projects/update_display_name/out.requests.restore.json b/acceptance/bundle/resources/postgres_projects/update_display_name/out.requests.restore.json index b37af69961e..42d5374db1d 100644 --- a/acceptance/bundle/resources/postgres_projects/update_display_name/out.requests.restore.json +++ b/acceptance/bundle/resources/postgres_projects/update_display_name/out.requests.restore.json @@ -6,7 +6,7 @@ "method": "PATCH", "path": "/api/2.0/postgres/[MY_PROJECT_ID]", "q": { - "update_mask": "spec.default_endpoint_settings,spec.display_name,spec.history_retention_duration" + "update_mask": "spec.display_name" }, "body": { "spec": { diff --git a/acceptance/bundle/resources/postgres_projects/update_display_name/out.requests.update.json b/acceptance/bundle/resources/postgres_projects/update_display_name/out.requests.update.json index 3da4af5e4a1..fff4cdda46d 100644 --- a/acceptance/bundle/resources/postgres_projects/update_display_name/out.requests.update.json +++ b/acceptance/bundle/resources/postgres_projects/update_display_name/out.requests.update.json @@ -6,7 +6,7 @@ "method": "PATCH", "path": "/api/2.0/postgres/[MY_PROJECT_ID]", "q": { - "update_mask": "spec.default_endpoint_settings,spec.display_name,spec.history_retention_duration" + "update_mask": "spec.display_name" }, "body": { "spec": { diff --git a/acceptance/bundle/resources/postgres_projects/update_display_name/output.txt b/acceptance/bundle/resources/postgres_projects/update_display_name/output.txt index 44753b8a1f1..d538708636d 100644 --- a/acceptance/bundle/resources/postgres_projects/update_display_name/output.txt +++ b/acceptance/bundle/resources/postgres_projects/update_display_name/output.txt @@ -51,17 +51,14 @@ Resources: 1 created, 0 changed, 0 deleted, 0 unchanged === Verify no changes >>> [CLI] bundle plan -update postgres_projects.my_project - -Plan: 0 to add, 1 to change, 0 to delete, 0 unchanged +Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged >>> [CLI] bundle plan -o json >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/update-postgres-project-[UNIQUE_NAME]/default/files... -Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 0 created, 1 changed, 0 deleted, 0 unchanged +Resources: 0 created, 0 changed, 0 deleted, 1 unchanged >>> print_requests.py --del-body project_id,branch_id,endpoint_id,database_id,role_id,catalog_id,synced_table_id --keep --get //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/ diff --git a/acceptance/bundle/resources/postgres_projects/update_history_retention/out.requests.json b/acceptance/bundle/resources/postgres_projects/update_history_retention/out.requests.json index 12f81b842c5..1b3837bd47f 100644 --- a/acceptance/bundle/resources/postgres_projects/update_history_retention/out.requests.json +++ b/acceptance/bundle/resources/postgres_projects/update_history_retention/out.requests.json @@ -2,7 +2,7 @@ "method": "PATCH", "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", "q": { - "update_mask": "spec.display_name,spec.history_retention_duration" + "update_mask": "spec.history_retention_duration" }, "body": { "spec": { diff --git a/acceptance/bundle/resources/postgres_projects/update_keeps_children/output.txt b/acceptance/bundle/resources/postgres_projects/update_keeps_children/output.txt index 47869c6d827..b4246687ef5 100644 --- a/acceptance/bundle/resources/postgres_projects/update_keeps_children/output.txt +++ b/acceptance/bundle/resources/postgres_projects/update_keeps_children/output.txt @@ -14,17 +14,15 @@ Resources: 3 created, 0 changed, 0 deleted, 0 unchanged >>> update_file.py databricks.yml Original Name Updated Name >>> [CLI] bundle plan -update postgres_branches.my_branch update postgres_projects.my_project -Plan: 0 to add, 2 to change, 0 to delete, 1 unchanged +Plan: 0 to add, 1 to change, 0 to delete, 2 unchanged >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/update-keeps-children-[UNIQUE_NAME]/default/files... -Updated postgres_branches.my_branch Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 0 created, 2 changed, 0 deleted, 1 unchanged +Resources: 0 created, 1 changed, 0 deleted, 2 unchanged >>> [CLI] bundle destroy --auto-approve The following resources will be deleted: diff --git a/acceptance/bundle/resources/postgres_roles/inherited-role-bind/output.txt b/acceptance/bundle/resources/postgres_roles/inherited-role-bind/output.txt index 79f6a61b3c0..5b5f30999bd 100644 --- a/acceptance/bundle/resources/postgres_roles/inherited-role-bind/output.txt +++ b/acceptance/bundle/resources/postgres_roles/inherited-role-bind/output.txt @@ -23,10 +23,8 @@ Run 'bundle deploy' to deploy changes to your workspace >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/inherited-role-bind-[UNIQUE_NAME]/default/files... -Updated postgres_branches.main -Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 0 created, 2 changed, 0 deleted, 1 unchanged +Resources: 0 created, 0 changed, 0 deleted, 3 unchanged >>> [CLI] bundle destroy --auto-approve The following resources will be deleted: diff --git a/acceptance/bundle/resources/postgres_roles/inherited-role-conflict/output.txt b/acceptance/bundle/resources/postgres_roles/inherited-role-conflict/output.txt index 744610fe318..a306ddf23e3 100644 --- a/acceptance/bundle/resources/postgres_roles/inherited-role-conflict/output.txt +++ b/acceptance/bundle/resources/postgres_roles/inherited-role-conflict/output.txt @@ -16,18 +16,14 @@ Resources: 3 created, 0 changed, 0 deleted, 0 unchanged === Plan after unbind: the bundle wants to (re-)create the role >>> [CLI] bundle plan -update postgres_branches.main -update postgres_projects.my_project create postgres_roles.my_role -Plan: 1 to add, 2 to change, 0 to delete, 0 unchanged +Plan: 1 to add, 0 to change, 0 to delete, 2 unchanged === Re-deploy: creating the already-existing role fails >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/inherited-role-conflict-[UNIQUE_NAME]/default/files... -Updated postgres_branches.main -Updated postgres_projects.my_project Error: cannot create resources.postgres_roles.my_role: role with that name already exists (400 BAD_REQUEST) Endpoint: POST [DATABRICKS_URL]/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main/roles?role_id=test-role diff --git a/acceptance/bundle/resources/postgres_roles/recreate-postgres-role/output.txt b/acceptance/bundle/resources/postgres_roles/recreate-postgres-role/output.txt index 0977d064a7d..a22699e9b4b 100644 --- a/acceptance/bundle/resources/postgres_roles/recreate-postgres-role/output.txt +++ b/acceptance/bundle/resources/postgres_roles/recreate-postgres-role/output.txt @@ -109,47 +109,17 @@ resources: postgres_role: app_role_v2 >>> [CLI] bundle plan -update postgres_branches.main -update postgres_projects.my_project recreate postgres_roles.my_role -Plan: 1 to add, 2 to change, 1 to delete, 0 unchanged +Plan: 1 to add, 0 to change, 1 to delete, 2 unchanged >>> [CLI] bundle deploy --auto-approve Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/deploy-postgres-role-recreate-postgres-role-[UNIQUE_NAME]/default/files... Recreated postgres_roles.my_role -Updated postgres_branches.main -Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 1 created, 2 changed, 1 deleted, 0 unchanged +Resources: 1 created, 0 changed, 1 deleted, 2 unchanged >>> print_requests.py --unique --del-body parent,project_id,branch_id,endpoint_id,database_id,role_id,catalog_id,synced_table_id //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/ -{ - "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", - "q": { - "update_mask": "spec.display_name,spec.history_retention_duration" - }, - "body": { - "spec": { - "display_name": "Test Project for Role", - "history_retention_duration": "604800s", - "pg_version": 16 - } - } -} -{ - "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main", - "q": { - "update_mask": "spec.expiration" - }, - "body": { - "spec": { - "no_expiry": true - } - } -} { "method": "DELETE", "path": "/api/2.0/postgres/[MY_ROLE_ID]" diff --git a/acceptance/bundle/resources/postgres_roles/recreate/output.txt b/acceptance/bundle/resources/postgres_roles/recreate/output.txt index 110e0b902d3..7d4882124b9 100644 --- a/acceptance/bundle/resources/postgres_roles/recreate/output.txt +++ b/acceptance/bundle/resources/postgres_roles/recreate/output.txt @@ -109,47 +109,17 @@ resources: postgres_role: app_role >>> [CLI] bundle plan -update postgres_branches.main -update postgres_projects.my_project recreate postgres_roles.my_role -Plan: 1 to add, 2 to change, 1 to delete, 0 unchanged +Plan: 1 to add, 0 to change, 1 to delete, 2 unchanged >>> [CLI] bundle deploy --auto-approve Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/deploy-postgres-role-recreate-[UNIQUE_NAME]/default/files... Recreated postgres_roles.my_role -Updated postgres_branches.main -Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 1 created, 2 changed, 1 deleted, 0 unchanged +Resources: 1 created, 0 changed, 1 deleted, 2 unchanged >>> print_requests.py --unique --del-body parent,project_id,branch_id,endpoint_id,database_id,role_id,catalog_id,synced_table_id //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/ -{ - "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", - "q": { - "update_mask": "spec.display_name,spec.history_retention_duration" - }, - "body": { - "spec": { - "display_name": "Test Project for Role", - "history_retention_duration": "604800s", - "pg_version": 16 - } - } -} -{ - "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main", - "q": { - "update_mask": "spec.expiration" - }, - "body": { - "spec": { - "no_expiry": true - } - } -} { "method": "DELETE", "path": "/api/2.0/postgres/[MY_ROLE_ID]" diff --git a/acceptance/bundle/resources/postgres_roles/replace_existing/out.requests.deploy.json b/acceptance/bundle/resources/postgres_roles/replace_existing/out.requests.deploy.json index 1b1d04e83ee..5f289588af5 100644 --- a/acceptance/bundle/resources/postgres_roles/replace_existing/out.requests.deploy.json +++ b/acceptance/bundle/resources/postgres_roles/replace_existing/out.requests.deploy.json @@ -7,30 +7,12 @@ "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main" } { - "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", - "q": { - "update_mask": "spec.display_name,spec.history_retention_duration" - }, - "body": { - "spec": { - "display_name": "Test Project for Role replace_existing", - "history_retention_duration": "604800s", - "pg_version": 16 - } - } + "method": "GET", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]" } { - "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main", - "q": { - "update_mask": "spec.expiration" - }, - "body": { - "spec": { - "no_expiry": true - } - } + "method": "GET", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main" } { "method": "POST", diff --git a/acceptance/bundle/resources/postgres_roles/replace_existing/output.txt b/acceptance/bundle/resources/postgres_roles/replace_existing/output.txt index e8d452c0af2..1b558424d80 100644 --- a/acceptance/bundle/resources/postgres_roles/replace_existing/output.txt +++ b/acceptance/bundle/resources/postgres_roles/replace_existing/output.txt @@ -16,21 +16,17 @@ Resources: 3 created, 0 changed, 0 deleted, 0 unchanged === Plan after unbind: the bundle wants to (re-)create the role >>> [CLI] bundle plan -update postgres_branches.main -update postgres_projects.my_project create postgres_roles.my_role -Plan: 1 to add, 2 to change, 0 to delete, 0 unchanged +Plan: 1 to add, 0 to change, 0 to delete, 2 unchanged === Re-deploy: replace_existing adopts the already-existing role instead of erroring >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/replace-existing-role-[UNIQUE_NAME]/default/files... Created postgres_roles.my_role -Updated postgres_branches.main -Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 1 created, 2 changed, 0 deleted, 0 unchanged +Resources: 1 created, 0 changed, 0 deleted, 2 unchanged === Confirm the role is under management again diff --git a/acceptance/bundle/resources/postgres_roles/update/out.requests.no_change.json b/acceptance/bundle/resources/postgres_roles/update/out.requests.no_change.json index 4cf8bcac891..1d23ba72202 100644 --- a/acceptance/bundle/resources/postgres_roles/update/out.requests.no_change.json +++ b/acceptance/bundle/resources/postgres_roles/update/out.requests.no_change.json @@ -11,43 +11,10 @@ "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main/roles/test-role" } { - "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", - "q": { - "update_mask": "spec.display_name,spec.history_retention_duration" - }, - "body": { - "spec": { - "display_name": "Test Project for Role Update", - "history_retention_duration": "604800s", - "pg_version": 16 - } - } -} -{ - "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main", - "q": { - "update_mask": "spec.expiration" - }, - "body": { - "spec": { - "no_expiry": true - } - } + "method": "GET", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]" } { - "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main/roles/test-role", - "q": { - "update_mask": "spec.attributes" - }, - "body": { - "spec": { - "attributes": { - "createdb": false - }, - "postgres_role": "app_role" - } - } + "method": "GET", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main" } diff --git a/acceptance/bundle/resources/postgres_roles/update/out.requests.restore.json b/acceptance/bundle/resources/postgres_roles/update/out.requests.restore.json index dfae04d3f07..198552d19ed 100644 --- a/acceptance/bundle/resources/postgres_roles/update/out.requests.restore.json +++ b/acceptance/bundle/resources/postgres_roles/update/out.requests.restore.json @@ -11,30 +11,12 @@ "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main/roles/test-role" } { - "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", - "q": { - "update_mask": "spec.display_name,spec.history_retention_duration" - }, - "body": { - "spec": { - "display_name": "Test Project for Role Update", - "history_retention_duration": "604800s", - "pg_version": 16 - } - } + "method": "GET", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]" } { - "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main", - "q": { - "update_mask": "spec.expiration" - }, - "body": { - "spec": { - "no_expiry": true - } - } + "method": "GET", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main" } { "method": "PATCH", diff --git a/acceptance/bundle/resources/postgres_roles/update/out.requests.update.json b/acceptance/bundle/resources/postgres_roles/update/out.requests.update.json index 5908be94ae3..cdf033ce54f 100644 --- a/acceptance/bundle/resources/postgres_roles/update/out.requests.update.json +++ b/acceptance/bundle/resources/postgres_roles/update/out.requests.update.json @@ -11,30 +11,12 @@ "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main/roles/test-role" } { - "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", - "q": { - "update_mask": "spec.display_name,spec.history_retention_duration" - }, - "body": { - "spec": { - "display_name": "Test Project for Role Update", - "history_retention_duration": "604800s", - "pg_version": 16 - } - } + "method": "GET", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]" } { - "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main", - "q": { - "update_mask": "spec.expiration" - }, - "body": { - "spec": { - "no_expiry": true - } - } + "method": "GET", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/main" } { "method": "PATCH", diff --git a/acceptance/bundle/resources/postgres_roles/update/output.txt b/acceptance/bundle/resources/postgres_roles/update/output.txt index f60403aaa7c..5af34ddd97f 100644 --- a/acceptance/bundle/resources/postgres_roles/update/output.txt +++ b/acceptance/bundle/resources/postgres_roles/update/output.txt @@ -50,21 +50,14 @@ Resources: 3 created, 0 changed, 0 deleted, 0 unchanged === Verify no changes >>> [CLI] bundle plan -update postgres_branches.main -update postgres_projects.my_project -update postgres_roles.my_role - -Plan: 0 to add, 3 to change, 0 to delete, 0 unchanged +Plan: 0 to add, 0 to change, 0 to delete, 3 unchanged >>> [CLI] bundle plan -o json >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/update-postgres-role-[UNIQUE_NAME]/default/files... -Updated postgres_branches.main -Updated postgres_projects.my_project -Updated postgres_roles.my_role Files: 0 uploaded, 0 deleted -Resources: 0 created, 3 changed, 0 deleted, 0 unchanged +Resources: 0 created, 0 changed, 0 deleted, 3 unchanged >>> print_requests.py --del-body project_id,branch_id,endpoint_id,database_id,role_id,catalog_id,synced_table_id --keep --get //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/ @@ -102,21 +95,17 @@ resources: createdb: true >>> [CLI] bundle plan -update postgres_branches.main -update postgres_projects.my_project update postgres_roles.my_role -Plan: 0 to add, 3 to change, 0 to delete, 0 unchanged +Plan: 0 to add, 1 to change, 0 to delete, 2 unchanged >>> [CLI] bundle plan -o json >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/update-postgres-role-[UNIQUE_NAME]/default/files... -Updated postgres_branches.main -Updated postgres_projects.my_project Updated postgres_roles.my_role Files: 0 uploaded, 0 deleted -Resources: 0 created, 3 changed, 0 deleted, 0 unchanged +Resources: 0 created, 1 changed, 0 deleted, 2 unchanged >>> print_requests.py --del-body project_id,branch_id,endpoint_id,database_id,role_id,catalog_id,synced_table_id --keep --get //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/ @@ -143,21 +132,17 @@ Resources: 0 created, 3 changed, 0 deleted, 0 unchanged >>> update_file.py databricks.yml createdb: true createdb: false >>> [CLI] bundle plan -update postgres_branches.main -update postgres_projects.my_project update postgres_roles.my_role -Plan: 0 to add, 3 to change, 0 to delete, 0 unchanged +Plan: 0 to add, 1 to change, 0 to delete, 2 unchanged >>> [CLI] bundle plan -o json >>> [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/update-postgres-role-[UNIQUE_NAME]/default/files... -Updated postgres_branches.main -Updated postgres_projects.my_project Updated postgres_roles.my_role Files: 0 uploaded, 0 deleted -Resources: 0 created, 3 changed, 0 deleted, 0 unchanged +Resources: 0 created, 1 changed, 0 deleted, 2 unchanged >>> print_requests.py --del-body project_id,branch_id,endpoint_id,database_id,role_id,catalog_id,synced_table_id --keep --get //postgres ^//workspace-files/ ^//workspace/ ^//telemetry-ext ^//operations/ diff --git a/acceptance/bundle/resources/postgres_snapshot_schedules/basic/out.requests.remove.txt b/acceptance/bundle/resources/postgres_snapshot_schedules/basic/out.requests.remove.txt index c6f1957175e..8449f260878 100644 --- a/acceptance/bundle/resources/postgres_snapshot_schedules/basic/out.requests.remove.txt +++ b/acceptance/bundle/resources/postgres_snapshot_schedules/basic/out.requests.remove.txt @@ -10,19 +10,6 @@ "method": "GET", "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/production/snapshot-schedule" } -{ - "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", - "q": { - "update_mask": "spec.display_name" - }, - "body": { - "spec": { - "display_name": "Test Project for Snapshot Schedules", - "pg_version": 16 - } - } -} { "method": "PATCH", "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/production/snapshot-schedule", diff --git a/acceptance/bundle/resources/postgres_snapshot_schedules/basic/out.requests.update.txt b/acceptance/bundle/resources/postgres_snapshot_schedules/basic/out.requests.update.txt index f5566611be8..75841ac1e2a 100644 --- a/acceptance/bundle/resources/postgres_snapshot_schedules/basic/out.requests.update.txt +++ b/acceptance/bundle/resources/postgres_snapshot_schedules/basic/out.requests.update.txt @@ -4,24 +4,15 @@ } { "method": "GET", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/production/snapshot-schedule" + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]" } { "method": "GET", "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/production/snapshot-schedule" } { - "method": "PATCH", - "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]", - "q": { - "update_mask": "spec.display_name" - }, - "body": { - "spec": { - "display_name": "Test Project for Snapshot Schedules", - "pg_version": 16 - } - } + "method": "GET", + "path": "/api/2.0/postgres/projects/test-pg-proj-[UNIQUE_NAME]/branches/production/snapshot-schedule" } { "method": "PATCH", diff --git a/acceptance/bundle/resources/postgres_snapshot_schedules/basic/output.txt b/acceptance/bundle/resources/postgres_snapshot_schedules/basic/output.txt index 79f385d5c94..c9c9a91f29a 100644 --- a/acceptance/bundle/resources/postgres_snapshot_schedules/basic/output.txt +++ b/acceptance/bundle/resources/postgres_snapshot_schedules/basic/output.txt @@ -25,10 +25,9 @@ Resources: 2 created, 0 changed, 0 deleted, 0 unchanged >>> [CLI] bundle deploy --auto-approve Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/deploy-pg-ss-basic-[UNIQUE_NAME]/default/files... -Updated postgres_projects.my_project Updated postgres_snapshot_schedules.main_schedule Files: 0 uploaded, 0 deleted -Resources: 0 created, 2 changed, 0 deleted, 0 unchanged +Resources: 0 created, 1 changed, 0 deleted, 1 unchanged >>> [CLI] postgres get-snapshot-schedule projects/test-pg-proj-[UNIQUE_NAME]/branches/production/snapshot-schedule { @@ -63,9 +62,8 @@ resources: >>> [CLI] bundle deploy --auto-approve Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/deploy-pg-ss-basic-[UNIQUE_NAME]/default/files... Deleted postgres_snapshot_schedules.main_schedule -Updated postgres_projects.my_project Files: 0 uploaded, 0 deleted -Resources: 0 created, 1 changed, 1 deleted, 0 unchanged +Resources: 0 created, 0 changed, 1 deleted, 1 unchanged >>> [CLI] postgres get-snapshot-schedule projects/test-pg-proj-[UNIQUE_NAME]/branches/production/snapshot-schedule { @@ -76,9 +74,7 @@ Resources: 0 created, 1 changed, 1 deleted, 0 unchanged === Plan again to confirm no drift after removal >>> [CLI] bundle plan -update postgres_projects.my_project - -Plan: 0 to add, 1 to change, 0 to delete, 0 unchanged +Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged >>> [CLI] bundle destroy --auto-approve The following resources will be deleted: diff --git a/acceptance/bundle/resources/postgres_snapshot_schedules/out-of-band/output.txt b/acceptance/bundle/resources/postgres_snapshot_schedules/out-of-band/output.txt index 25861808aaf..1d47a0d4c65 100644 --- a/acceptance/bundle/resources/postgres_snapshot_schedules/out-of-band/output.txt +++ b/acceptance/bundle/resources/postgres_snapshot_schedules/out-of-band/output.txt @@ -39,19 +39,17 @@ Resources: 2 created, 0 changed, 0 deleted, 0 unchanged === Plan detects the drift >>> [CLI] bundle plan -update postgres_projects.my_project update postgres_snapshot_schedules.main_schedule -Plan: 0 to add, 2 to change, 0 to delete, 0 unchanged +Plan: 0 to add, 1 to change, 0 to delete, 1 unchanged === Deploy reconciles the schedule back to the configured cadence >>> [CLI] bundle deploy --auto-approve Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/deploy-pg-ss-oob-[UNIQUE_NAME]/default/files... -Updated postgres_projects.my_project Updated postgres_snapshot_schedules.main_schedule Files: 0 uploaded, 0 deleted -Resources: 0 created, 2 changed, 0 deleted, 0 unchanged +Resources: 0 created, 1 changed, 0 deleted, 1 unchanged >>> [CLI] postgres get-snapshot-schedule projects/test-pg-proj-[UNIQUE_NAME]/branches/production/snapshot-schedule { diff --git a/acceptance/bundle/resources/postgres_synced_tables/recreate/output.txt b/acceptance/bundle/resources/postgres_synced_tables/recreate/output.txt index a56e7c730cb..9f76f730db0 100644 --- a/acceptance/bundle/resources/postgres_synced_tables/recreate/output.txt +++ b/acceptance/bundle/resources/postgres_synced_tables/recreate/output.txt @@ -13,11 +13,15 @@ Files: 0 uploaded, 0 deleted Resources: 4 created, 0 changed, 0 deleted, 0 unchanged >>> [CLI] bundle plan -update postgres_projects.my_project recreate postgres_synced_tables.my_table -Plan: 1 to add, 1 to change, 1 to delete, 2 unchanged -contains error: 'Plan: 1 to add, 0 to change, 1 to delete, 3 unchanged' not found in the output. +Plan: 1 to add, 0 to change, 1 to delete, 3 unchanged + +>>> [CLI] bundle deploy +Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/recreate-postgres-synced-table-[UNIQUE_NAME]/default/files... +Recreated postgres_synced_tables.my_table +Files: 0 uploaded, 0 deleted +Resources: 1 created, 0 changed, 1 deleted, 3 unchanged >>> [CLI] bundle destroy --auto-approve The following resources will be deleted: @@ -37,5 +41,3 @@ All files and directories at the following location will be deleted: /Workspace/ Destroy: 4 deleted Cleaning up temporary source table - -Exit code: 1 diff --git a/acceptance/bundle/resources/postgres_synced_tables/recreate_capped/output.txt b/acceptance/bundle/resources/postgres_synced_tables/recreate_capped/output.txt index b4e59d8ee33..e870338d02e 100644 --- a/acceptance/bundle/resources/postgres_synced_tables/recreate_capped/output.txt +++ b/acceptance/bundle/resources/postgres_synced_tables/recreate_capped/output.txt @@ -12,7 +12,6 @@ Resources: 4 created, 0 changed, 0 deleted, 0 unchanged >>> DATABRICKS_BUNDLE_RESOURCE_MAX_WAIT=1 errcode [CLI] bundle deploy Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/recreate-capped-postgres-synced-table-[UNIQUE_NAME]/default/files... -Updated postgres_projects.my_project Error: cannot recreate resources.postgres_synced_tables.my_table: waiting after deleting id=synced_tables/lakebase_test_[UNIQUE_NAME].public.trips_synced: timed out: synced table still exists, waiting for deletion to complete Files: 0 uploaded, 0 deleted diff --git a/bundle/direct/dresources/configs/materialization_sets.yml b/bundle/direct/dresources/configs/materialization_sets.yml index b0386bb3d00..86cb9432f51 100644 --- a/bundle/direct/dresources/configs/materialization_sets.yml +++ b/bundle/direct/dresources/configs/materialization_sets.yml @@ -17,6 +17,8 @@ recreate_on_changes: reason: immutable - field: materialized_features[*].budget_policy_id reason: immutable + - field: materialized_features[*].notifications + reason: immutable - field: notifications reason: immutable