From 4b687ec826153416f4cfa266514a3ce4a6dfa9b6 Mon Sep 17 00:00:00 2001 From: "databricks-ci-ghec-2[bot]" <184307802+databricks-ci-ghec-2[bot]@users.noreply.github.com> Date: Fri, 13 Nov 2026 04:48:57 +0000 Subject: [PATCH 1/5] Update Go SDK to v0.199.0 --- .codegen/_openapi_sha | 2 +- .codegen/cli.json | 1056 +++++++++++++---- .gitattributes | 1 + .../dependency-updates/go-sdk-v0.199.0.md | 1 + .../deploy/readplan/postgres_role/output.txt | 5 +- .../bundle/invariant/no_drift/output.txt | 131 ++ acceptance/bundle/refschema/output/apps.txt | 40 + .../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 +- .../dresources/configs/apps.generated.yml | 26 + .../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/internal/schema/annotations.yml | 166 +-- .../validation/generated/enum_fields.go | 49 +- .../validation/generated/required_fields.go | 9 + bundle/schema/jsonschema.json | 58 +- cmd/workspace/ai-functions/ai-functions.go | 87 +- cmd/workspace/alerts-v2/alerts-v2.go | 63 +- cmd/workspace/apps/apps.go | 2 + cmd/workspace/assume-group/assume-group.go | 321 +++++ cmd/workspace/cmd.go | 2 + cmd/workspace/lakewatch/lakewatch.go | 2 - cmd/workspace/postgres/postgres.go | 10 +- cmd/workspace/rfa/rfa.go | 6 +- .../serving-endpoints/serving-endpoints.go | 7 +- go.mod | 2 +- go.sum | 4 +- .../bundles/alerts/_models/alert.py | 43 +- .../alerts/_models/alert_v2_evaluation.py | 12 +- .../alerts/_models/alert_v2_notification.py | 6 + .../alerts/_models/alert_v2_operand.py | 12 + .../alerts/_models/alert_v2_operand_column.py | 18 +- .../alerts/_models/alert_v2_operand_value.py | 18 + .../alerts/_models/alert_v2_subscription.py | 12 + .../bundles/alerts/_models/cron_schedule.py | 8 +- .../features/_models/delta_table_source.py | 10 +- .../_models/materialization_notifications.py | 3 +- .../_models/materialized_feature.py | 22 + .../_models/model_serving_endpoint.py | 6 + .../model_serving_endpoints/_models/route.py | 6 + .../_models/served_entity_input.py | 6 + .../_models/served_model_input.py | 12 + .../core/_generated/alerts.py | 5 + 144 files changed, 3059 insertions(+), 950 deletions(-) create mode 100644 .nextchanges/dependency-updates/go-sdk-v0.199.0.md delete mode 100644 bundle/direct/dresources/configs/postgres_databases.generated.yml create mode 100644 cmd/workspace/assume-group/assume-group.go diff --git a/.codegen/_openapi_sha b/.codegen/_openapi_sha index e66f5e65372..d5de729c9af 100644 --- a/.codegen/_openapi_sha +++ b/.codegen/_openapi_sha @@ -1 +1 @@ -6fdee6b2790c8a487592a5371b478d55b4c9f185 \ No newline at end of file +e13a7b6206adbdb6c4008e2a58b7cc785e32cb1c \ No newline at end of file diff --git a/.codegen/cli.json b/.codegen/cli.json index daad408e81f..7a6d7486e24 100644 --- a/.codegen/cli.json +++ b/.codegen/cli.json @@ -1693,60 +1693,60 @@ } }, "aifunctions.Batch": { - "description": "An asynchronous run of one AI function over a file of requests.", + "description": "The AI Functions Asynchronous API lets you process large volumes of requests as a batch in a single call.", "fields": { "create_time": { - "description": "Output only. Time the batch was created.", - "launch_stage": "PRIVATE_PREVIEW", + "description": "Output only. The time when the batch was created.", + "launch_stage": "PUBLIC_BETA", "behaviors": [ "OUTPUT_ONLY" ] }, "endpoint": { - "description": "The AI function to run for every request, for example `ai_extract`.", - "launch_stage": "PRIVATE_PREVIEW" + "description": "The AI function, for example `ai_parse_document`.", + "launch_stage": "PUBLIC_BETA" }, "input_ref": { - "description": "Path of the JSONL input file on a Unity Catalog volume. Each line is one request.", - "launch_stage": "PRIVATE_PREVIEW" + "description": "Unity Catalog volume path of the JSONL input file. Each line is one request, in the form `{\"custom_id\": ..., \"body\": ...}`. The file can hold up to 50,000 requests and be up to 200 MiB.", + "launch_stage": "PUBLIC_BETA" }, "name": { - "description": "ID of the batch, in the form `batch_\u003cid\u003e`. The service assigns it.", - "launch_stage": "PRIVATE_PREVIEW" - }, - "output_ref": { - "description": "Path on a Unity Catalog volume to write the JSONL output to. When it is omitted, the output\nstays on Databricks-managed storage and a finished batch returns a short-lived download URL\nin this field instead.", - "launch_stage": "PRIVATE_PREVIEW", + "description": "Output only. Identifier. Resource name of the batch, returned by create. Format: `batch_\u003cid\u003e`.", + "launch_stage": "PUBLIC_BETA", "behaviors": [ - "OPTIONAL" + "OUTPUT_ONLY" ] }, + "output_ref": { + "description": "Unity Catalog volume path to write the JSONL output file to. If the path is a directory, the file is `\u003cpath\u003e/\u003cname\u003e_output.jsonl`.", + "launch_stage": "PUBLIC_BETA" + }, "params": { - "description": "Function options applied to every request in the batch, for example the extraction schema.", - "launch_stage": "PRIVATE_PREVIEW", + "description": "Parameters of the function other than its input, applied to every request in the batch, for example\n`schema` for `ai_extract`. Put function options, such as `version`, in a nested `options` object. For\nthe parameters of each function, see [AI Functions](/large-language-models/ai-functions).", + "launch_stage": "PUBLIC_BETA", "behaviors": [ "OPTIONAL" ] }, "percent_complete": { - "description": "Output only. Percentage of the requests that finished, from 0 to 100. Returned when one batch\nis read, not when batches are listed.", - "launch_stage": "PRIVATE_PREVIEW", + "description": "Output only. The percentage of requests that are processed, from 0 to 100. Returned when you get a batch, not when you\nlist batches.", + "launch_stage": "PUBLIC_BETA", "behaviors": [ "OUTPUT_ONLY" ] }, "request_counts": { - "description": "Output only. Request counts. Returned when one batch is read, not when batches are listed.", + "description": "Output only. The number of requests in the batch, by result. Returned when you get a batch, not when you list\nbatches.", "ref": "aifunctions.BatchRequestCounts", - "launch_stage": "PRIVATE_PREVIEW", + "launch_stage": "PUBLIC_BETA", "behaviors": [ "OUTPUT_ONLY" ] }, "status": { - "description": "Output only. Status of the batch.", + "description": "Output only. The status of the batch.", "ref": "aifunctions.BatchStatus", - "launch_stage": "PRIVATE_PREVIEW", + "launch_stage": "PUBLIC_BETA", "behaviors": [ "OUTPUT_ONLY" ] @@ -1757,22 +1757,22 @@ "description": "Counts of the requests in a batch.", "fields": { "failed": { - "description": "Output only. Number of requests that failed and will not be retried.", - "launch_stage": "PRIVATE_PREVIEW", + "description": "Output only. The number of requests that failed. The service does not retry them.", + "launch_stage": "PUBLIC_BETA", "behaviors": [ "OUTPUT_ONLY" ] }, "succeeded": { - "description": "Output only. Number of requests that finished successfully.", - "launch_stage": "PRIVATE_PREVIEW", + "description": "Output only. The number of requests that were processed successfully.", + "launch_stage": "PUBLIC_BETA", "behaviors": [ "OUTPUT_ONLY" ] }, "total": { - "description": "Output only. Number of requests in the input file.", - "launch_stage": "PRIVATE_PREVIEW", + "description": "Output only. The number of requests in the batch.", + "launch_stage": "PUBLIC_BETA", "behaviors": [ "OUTPUT_ONLY" ] @@ -1786,20 +1786,18 @@ "IN_PROGRESS", "FINALIZING", "COMPLETED", - "EXPIRED", "CANCELLING", "CANCELLED", "FAILED" ], "enum_launch_stages": { - "CANCELLED": "PRIVATE_PREVIEW", - "CANCELLING": "PRIVATE_PREVIEW", - "COMPLETED": "PRIVATE_PREVIEW", - "EXPIRED": "PRIVATE_PREVIEW", - "FAILED": "PRIVATE_PREVIEW", - "FINALIZING": "PRIVATE_PREVIEW", - "IN_PROGRESS": "PRIVATE_PREVIEW", - "PENDING": "PRIVATE_PREVIEW" + "CANCELLED": "PUBLIC_BETA", + "CANCELLING": "PUBLIC_BETA", + "COMPLETED": "PUBLIC_BETA", + "FAILED": "PUBLIC_BETA", + "FINALIZING": "PUBLIC_BETA", + "IN_PROGRESS": "PUBLIC_BETA", + "PENDING": "PUBLIC_BETA" } }, "aifunctions.CancelBatchRequest": {}, @@ -1809,7 +1807,7 @@ "batch": { "description": "The batch to create.", "ref": "aifunctions.Batch", - "launch_stage": "PRIVATE_PREVIEW" + "launch_stage": "PUBLIC_BETA" } } }, @@ -1818,14 +1816,14 @@ "fields": { "page_size": { "description": "Maximum number of batches to return in one page.", - "launch_stage": "PRIVATE_PREVIEW", + "launch_stage": "PUBLIC_BETA", "behaviors": [ "OPTIONAL" ] }, "page_token": { - "description": "Page token from an earlier response. Omit it to read the first page.", - "launch_stage": "PRIVATE_PREVIEW", + "description": "A page token from a previous call to list batches. Omit it to get the first page.", + "launch_stage": "PUBLIC_BETA", "behaviors": [ "OPTIONAL" ] @@ -1836,11 +1834,11 @@ "fields": { "batches": { "description": "The batches in this page.", - "launch_stage": "PRIVATE_PREVIEW" + "launch_stage": "PUBLIC_BETA" }, "next_page_token": { - "description": "Token that reads the next page. It is empty on the last page.", - "launch_stage": "PRIVATE_PREVIEW" + "description": "A token to get the next page. It is empty on the last page.", + "launch_stage": "PUBLIC_BETA" } } }, @@ -3081,6 +3079,13 @@ "OUTPUT_ONLY" ] }, + "effective_resources": { + "description": "Resources added to the app, plus the resources it inherits from its space.\nEmpty for apps that are not in a space.", + "launch_stage": "PRIVATE_PREVIEW", + "behaviors": [ + "OUTPUT_ONLY" + ] + }, "effective_usage_policy_id": { "launch_stage": "PUBLIC_PREVIEW", "behaviors": [ @@ -30109,6 +30114,19 @@ } } }, + "iam.CreateRestrictedSharingGroupRequest": { + "fields": { + "restricted_sharing_group": { + "description": "The restricted sharing group to create. It has no client-set fields; the\ngroup is identified by restricted_sharing_group_id.", + "ref": "iam.RestrictedSharingGroup", + "launch_stage": "PRIVATE_PREVIEW" + }, + "restricted_sharing_group_id": { + "description": "The id of the workspace group to restrict: the numeric id of an existing and\nnon-system workspace group.", + "launch_stage": "PRIVATE_PREVIEW" + } + } + }, "iam.CreateServicePrincipalRequest": { "fields": { "active": { @@ -30198,6 +30216,7 @@ "iam.DeleteAccountServicePrincipalRequest": {}, "iam.DeleteAccountUserRequest": {}, "iam.DeleteGroupRequest": {}, + "iam.DeleteRestrictedSharingGroupRequest": {}, "iam.DeleteServicePrincipalRequest": {}, "iam.DeleteUserRequest": {}, "iam.DeleteWorkspaceAssignmentRequest": {}, @@ -30273,6 +30292,7 @@ } }, "iam.GetPermissionRequest": {}, + "iam.GetRestrictedSharingGroupRequest": {}, "iam.GetRuleSetRequest": { "fields": { "etag": { @@ -30613,6 +30633,37 @@ "urn:ietf:params:scim:api:messages:2.0:ListResponse": "PUBLIC_PREVIEW" } }, + "iam.ListRestrictedSharingGroupsRequest": { + "fields": { + "page_size": { + "description": "The maximum number of groups to return. The service may return fewer.\nIf unspecified or 0, at most 100 groups are returned. Values above 100 are\ncoerced to 100. Negative values are rejected.", + "launch_stage": "PRIVATE_PREVIEW", + "behaviors": [ + "OPTIONAL" + ] + }, + "page_token": { + "description": "A page token from a previous ListRestrictedSharingGroups call. Provide\nthis to retrieve the subsequent page.", + "launch_stage": "PRIVATE_PREVIEW", + "behaviors": [ + "OPTIONAL" + ] + } + } + }, + "iam.ListRestrictedSharingGroupsResponse": { + "description": "A page of restricted sharing groups in the caller's workspace.", + "fields": { + "next_page_token": { + "description": "A token that can be sent as page_token to retrieve the next page. If this\nfield is omitted, there are no subsequent pages.", + "launch_stage": "PRIVATE_PREVIEW" + }, + "restricted_sharing_groups": { + "description": "The restricted sharing groups in the workspace.", + "launch_stage": "PRIVATE_PREVIEW" + } + } + }, "iam.ListServicePrincipalResponse": { "fields": { "Resources": { @@ -31185,6 +31236,29 @@ } } }, + "iam.RestrictedSharingGroup": { + "description": "A RestrictedSharingGroup is a workspace group whose members cannot grant or\nrevoke permissions on workspace assets while they have assumed the group or\none of its child groups. Users acting as themselves are not affected.", + "fields": { + "group_display_name": { + "description": "The display name of the restricted workspace group.", + "launch_stage": "PRIVATE_PREVIEW", + "behaviors": [ + "OUTPUT_ONLY" + ] + }, + "name": { + "description": "The resource name of the restricted sharing group.\nFormat: `restricted-sharing-groups/{restricted_sharing_group_id}`\nExample: `restricted-sharing-groups/123`", + "launch_stage": "PRIVATE_PREVIEW" + }, + "restricted_sharing_group_id": { + "description": "The id of the restricted workspace group: the numeric id of an existing and\nnon-system workspace group.", + "launch_stage": "PRIVATE_PREVIEW", + "behaviors": [ + "OUTPUT_ONLY" + ] + } + } + }, "iam.Role": { "fields": { "name": { @@ -40125,20 +40199,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", @@ -40968,7 +41028,7 @@ ] }, "batch": { - "description": "Batch SQL rule input.", + "description": "Scheduled detection (also known as batch detection) input.", "ref": "lakewatch.RuleInputBatch", "launch_stage": "PUBLIC_BETA", "behaviors": [ @@ -40990,7 +41050,7 @@ ] }, "compute_workspace_id": { - "description": "ID of the workspace whose compute runs this rule's jobs and owns its\nassociated resources, such as the SQL warehouse a scheduled rule runs on.\nServer-assigned; a rule's warehouse can only be changed from this workspace.", + "description": "ID of the workspace whose compute runs this rule's jobs and owns its\nassociated resources, such as the SQL warehouse a scheduled detection runs on.\nServer-assigned; a rule's warehouse can only be changed from this workspace.", "launch_stage": "PUBLIC_BETA", "behaviors": [ "OUTPUT_ONLY" @@ -41146,7 +41206,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" @@ -41184,7 +41244,7 @@ ] }, "timerange": { - "description": "Time-range configuration for batch rules. If unset, the execution time range is extended by\na fixed `15m` lookback.", + "description": "Time-range configuration for scheduled detections. If unset, the execution time range is\nextended by a fixed `15m` lookback.", "ref": "lakewatch.RuleTimeRange", "launch_stage": "PUBLIC_BETA", "behaviors": [ @@ -41322,7 +41382,7 @@ } }, "lakewatch.RuleInputBatch": { - "description": "Batch input for a detection rule.", + "description": "Input for a scheduled detection (also known as batch detection).", "fields": { "custom": { "description": "Custom-notebook user function. The output is used as input data for the\nrule.", @@ -41341,7 +41401,7 @@ ] }, "warehouse_id": { - "description": "SQL warehouse used to run this batch rule.", + "description": "SQL warehouse that runs this scheduled detection.", "launch_stage": "PUBLIC_BETA", "behaviors": [ "OPTIONAL" @@ -41350,7 +41410,7 @@ } }, "lakewatch.RuleInputBatchSql": { - "description": "Batch SQL input for a detection rule.", + "description": "SQL query input for a scheduled detection.", "fields": { "default_catalog_name": { "description": "Default catalog used to resolve unqualified identifiers in `query`. If\nunset, the rule's `catalog_name` is used.", @@ -41373,7 +41433,7 @@ } }, "lakewatch.RuleInputCustomNotebook": { - "description": "Reference to a custom-user-function notebook for stream or batch input.", + "description": "Reference to a custom-user-function notebook for scheduled detection input.", "fields": { "notebook": { "description": "Fully-qualified notebook path, or a path relative to the configured base\nnotebook directory.", @@ -41451,7 +41511,7 @@ } }, "lakewatch.RuleSchedule": { - "description": "Defines when a detection rule executes.\n\nA batch rule sets exactly one of `at_least_every` or `cron_expression`. A streaming rule runs\ncontinuously and sets no timing; it accepts only `enabled`, and an omitted schedule means\nenabled. The server rejects any other combination. `enabled` is orthogonal to the timing.", + "description": "Defines when a detection rule executes.\n\nA scheduled detection sets exactly one of `at_least_every` or `cron_expression`. A streaming\nrule runs continuously and sets no timing; it accepts only `enabled`, and an omitted schedule\nmeans enabled. The server rejects any other combination. `enabled` is orthogonal to the timing.", "fields": { "at_least_every": { "description": "Defines the minimum cadence as a duration string. It may contain components\nfor days, hours, minutes, and seconds (e.g. `5d`, `5d3h`, `3d2h5m12s`,\n`12m16s`).", @@ -41460,13 +41520,6 @@ "OPTIONAL" ] }, - "continuous": { - "description": "Runs the rule continuously. Detection rules do not accept it: batch rules reject it, and\nstreaming rules run continuously without it.", - "launch_stage": "PUBLIC_BETA", - "behaviors": [ - "OPTIONAL" - ] - }, "cron_expression": { "description": "Defines the schedule using a Quartz cron expression.", "launch_stage": "PUBLIC_BETA", @@ -41484,10 +41537,10 @@ } }, "lakewatch.RuleTimeRange": { - "description": "Time-range configuration for a batch detection rule.", + "description": "Time-range configuration for a scheduled detection.", "fields": { "extend_lookback": { - "description": "Extends the start of the execution time range by a compact duration with integer\ndays, hours, minutes, and seconds in that order, such as `1h30m` or `15m`.\nZero duration disables extension. Unset or empty uses a fixed `15m` at execution\ntime. Only the start moves; the end is unchanged. Has no effect on batch SQL\nthat does not use `IN_TIMERANGE`. Values must fit signed 64-bit microseconds.", + "description": "Extends the start of the execution time range by a compact duration with integer\ndays, hours, minutes, and seconds in that order, such as `1h30m` or `15m`.\nZero duration disables extension. Unset or empty uses a fixed `15m` at execution\ntime. Only the start moves; the end is unchanged. Has no effect on a detection\nquery that does not use `IN_TIMERANGE`. Values must fit signed 64-bit microseconds.", "launch_stage": "PUBLIC_BETA", "behaviors": [ "OPTIONAL" @@ -44248,7 +44301,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" }, @@ -44866,7 +44919,7 @@ ] }, "filter_condition": { - "description": "Single WHERE clause to filter delta table before applying transformations. Will be row-wise evaluated, so should only include conditionals and projections.", + "description": "A single WHERE clause to filter the Delta table before applying transformations.\nThe predicate is evaluated for each row.", "launch_stage": "GA", "behaviors": [ "OPTIONAL" @@ -44884,7 +44937,7 @@ ] }, "transformation_sql": { - "description": "A single SQL SELECT expression applied after filter_condition.\nShould contains all the columns needed (eg. \"SELECT *, col_a + col_b AS col_c FROM x.y.z WHERE col_a \u003e 0\" would have `transformation_sql` \"*, col_a + col_b AS col_c\")\nIf transformation_sql is not provided, all columns of the delta table are present in the DataSource dataframe.", + "description": "A single SQL SELECT expression applied after filter_condition.\nThe expression must contain all required columns (e.g., \"*, col_a + col_b AS col_c\").\nIf transformation_sql is not provided, all columns of the delta table are present in the DataSource dataframe.", "launch_stage": "GA", "behaviors": [ "OPTIONAL" @@ -47264,7 +47317,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 +47625,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 +55521,6 @@ "ref": "postgres.BranchSpec", "launch_stage": "GA", "behaviors": [ - "INPUT_ONLY", "OPTIONAL" ] }, @@ -55525,6 +55577,7 @@ "launch_stage": "GA", "behaviors": [ "IMMUTABLE", + "INPUT_ONLY", "OPTIONAL" ] }, @@ -55533,6 +55586,7 @@ "launch_stage": "GA", "behaviors": [ "IMMUTABLE", + "INPUT_ONLY", "OPTIONAL" ] }, @@ -55541,6 +55595,7 @@ "launch_stage": "GA", "behaviors": [ "IMMUTABLE", + "INPUT_ONLY", "OPTIONAL" ] }, @@ -55985,7 +56040,7 @@ "launch_stage": "GA" }, "database_id": { - "description": "The ID to use for the Database, which will become the final component of\nthe database's resource name.\nThis ID becomes the database name in postgres.\n\nThis value should be 4-63 characters, and only use characters available in DNS names,\nas defined by RFC-1123\n\nIf database_id is not specified in the request, it is generated automatically.", + "description": "The ID used to identify and manage the Database resource through the API.\nThe Postgres database name is specified in `spec.postgres_database`.\n\nThis value should be 4-63 characters, and only use characters available in DNS names,\nas defined by RFC-1123\n\nIf database_id is not specified in the request, it is generated automatically.", "launch_stage": "GA", "behaviors": [ "OPTIONAL" @@ -56064,7 +56119,7 @@ "launch_stage": "GA" }, "role_id": { - "description": "The ID to use for the Role, which will become the final component of\nthe role's resource name.\nThis ID becomes the role in Postgres.\n\nThis value should be 4-63 characters, and valid characters\nare lowercase letters, numbers, and hyphens, as defined by RFC 1123.\n\nIf role_id is not specified in the request, it is generated automatically.", + "description": "The ID used to identify and manage the Role resource through the API.\nThe Postgres role name is specified in `spec.postgres_role`.\n\nThis value should be 4-63 characters, and valid characters\nare lowercase letters, numbers, and hyphens, as defined by RFC 1123.\n\nIf role_id is not specified in the request, it is generated automatically.", "launch_stage": "GA", "behaviors": [ "OPTIONAL" @@ -56342,7 +56397,6 @@ "ref": "postgres.DatabaseDatabaseSpec", "launch_stage": "GA", "behaviors": [ - "INPUT_ONLY", "OPTIONAL" ] }, @@ -56385,7 +56439,7 @@ ] }, "role": { - "description": "The name of the role that owns the database.\nFormat: projects/{project_id}/branches/{branch_id}/roles/{role_id}\n\nTo change the owner, pass valid existing Role name when updating the Database\n\nA database always has an owner.", + "description": "The name of the role that owns the database.\nFormat: projects/{project_id}/branches/{branch_id}/roles/{role_id}\n\nTo change the owner, pass valid existing Role name when updating the Database\n\nRequired when creating the Database.", "launch_stage": "GA" } } @@ -56591,7 +56645,6 @@ "ref": "postgres.EndpointSpec", "launch_stage": "GA", "behaviors": [ - "INPUT_ONLY", "OPTIONAL" ] }, @@ -57781,7 +57834,6 @@ "ref": "postgres.ProjectSpec", "launch_stage": "GA", "behaviors": [ - "INPUT_ONLY", "OPTIONAL" ] }, @@ -57918,6 +57970,7 @@ "launch_stage": "GA", "behaviors": [ "IMMUTABLE", + "INPUT_ONLY", "OPTIONAL" ] } @@ -58124,7 +58177,6 @@ "ref": "postgres.RoleRoleSpec", "launch_stage": "GA", "behaviors": [ - "INPUT_ONLY", "OPTIONAL" ] }, @@ -58214,32 +58266,35 @@ ] }, "auth_method": { - "description": "Controls how the Postgres role authenticates when a client opens a database\nconnection. Supported values:\n\n* LAKEBASE_OAUTH_V1: the role authenticates by presenting a Databricks\nOAuth access token derived from the backing managed identity (the\nDatabricks user, service principal, or group named by the role's\n`postgres_role`). No static password exists for roles using this method.\n* PG_PASSWORD_SCRAM_SHA_256: the role authenticates with a Postgres\npassword verified server-side using the SCRAM-SHA-256 mechanism.\nLakebase generates a password for the role.\n* NO_LOGIN: the role cannot open a Postgres session at all. Useful for\nroles that exist only to own objects or to aggregate privileges that\nare then granted to other, loginable roles.\n\nIf auth_method is left unspecified, a meaningful authentication method is derived from the identity_type:\n* For the managed identities, OAUTH is used.\n* For the regular postgres roles, authentication based on postgres passwords is used.\n\nNOTE: for the Databricks identity type GROUP, LAKEBASE_OAUTH_V1\nis the default auth method (group can login as well).\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.", + "description": "Controls how the Postgres role authenticates when a client opens a database\nconnection. Supported values:\n\n* LAKEBASE_OAUTH_V1: the role authenticates by presenting a Databricks\nOAuth access token derived from the backing managed identity (the\nDatabricks user, service principal, or group named by the role's\n`postgres_role`). No static password exists for roles using this method.\n* PG_PASSWORD_SCRAM_SHA_256: the role authenticates with a Postgres\npassword verified server-side using the SCRAM-SHA-256 mechanism.\nLakebase generates a password for the role.\n\nNO_LOGIN is not currently supported for Role creation.\n\nIf auth_method is left unspecified, a meaningful authentication method is derived from the identity_type:\n* For the managed identities, OAUTH is used.\n* For the regular postgres roles, authentication based on postgres passwords is used.\n\nNOTE: for the Databricks identity type GROUP, LAKEBASE_OAUTH_V1\nis the default auth method (group can login as well).\n\nThis value cannot be changed after creation.", "ref": "postgres.RoleAuthMethod", "launch_stage": "GA", "behaviors": [ + "INPUT_ONLY", "OPTIONAL" ] }, "identity_type": { - "description": "The type of role.\nWhen specifying a managed-identity, the chosen role_id must be a valid:\n\n* application ID for SERVICE_PRINCIPAL\n* user email for USER\n* group name for 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.", + "description": "The type of role.\nWhen specifying a managed-identity, the chosen postgres_role must be a valid:\n\n* application ID for SERVICE_PRINCIPAL\n* user email for USER\n* group name for GROUP\n\nThis value cannot be changed after creation.", "ref": "postgres.RoleIdentityType", "launch_stage": "GA", "behaviors": [ + "INPUT_ONLY", "OPTIONAL" ] }, "membership_roles": { - "description": "An enum value for a standard role that this role is a member of.", + "description": "An enum value for a standard role that this role is a member of.\nWhen selected in update_mask, this field replaces all existing memberships.\nAn empty or omitted list clears all memberships, including DATABRICKS_SUPERUSER.", "launch_stage": "GA", "behaviors": [ "OPTIONAL" ] }, "postgres_role": { - "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.", + "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 value cannot be changed after creation.", "launch_stage": "GA", "behaviors": [ + "INPUT_ONLY", "OPTIONAL" ] } @@ -61167,6 +61222,7 @@ "launch_stage": "GA" }, "state": { + "description": "The state of the inference table.", "ref": "serving.AutoCaptureState", "launch_stage": "GA" }, @@ -61179,6 +61235,7 @@ "serving.AutoCaptureState": { "fields": { "payload_table": { + "description": "The payload table that stores the logged requests and responses.", "ref": "serving.PayloadTable", "launch_stage": "GA" } @@ -61253,6 +61310,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": { @@ -61301,6 +61381,7 @@ "launch_stage": "GA" }, "description": { + "description": "The description of the serving endpoint.", "launch_stage": "GA" }, "email_notifications": { @@ -61521,7 +61602,7 @@ "launch_stage": "GA" }, "start_time": { - "description": "The timestamp when the update to the pending config started.", + "description": "The timestamp when the update to the pending config started, in milliseconds since the Unix epoch.", "launch_stage": "GA" }, "traffic_config": { @@ -61584,6 +61665,7 @@ "serving.EndpointTags": { "fields": { "tags": { + "description": "The tags attached to the serving endpoint after the update.", "launch_stage": "GA" } } @@ -61760,15 +61842,19 @@ "description": "All fields are not sensitive as they are hard-coded in the system and made available to customers.", "fields": { "description": { + "description": "A description of the foundation model.", "launch_stage": "PUBLIC_PREVIEW" }, "display_name": { + "description": "The human-readable display name of the foundation model.", "launch_stage": "PUBLIC_PREVIEW" }, "docs": { + "description": "The URL of the Databricks documentation page for the foundation model.", "launch_stage": "PUBLIC_PREVIEW" }, "name": { + "description": "The name of the foundation model.", "launch_stage": "PUBLIC_PREVIEW" } } @@ -61937,12 +62023,15 @@ "serving.PayloadTable": { "fields": { "name": { + "description": "The name of the payload table within the configured catalog and schema.", "launch_stage": "GA" }, "status": { + "description": "The status of the payload table. One of PENDING, READY, FAILED or DISABLED.", "launch_stage": "GA" }, "status_message": { + "description": "More information about the status of the payload table, if available.", "launch_stage": "GA" } } @@ -61954,6 +62043,7 @@ "launch_stage": "PUBLIC_PREVIEW" }, "traffic_config": { + "description": "The traffic configuration associated with the serving endpoint config.", "ref": "serving.TrafficConfig", "launch_stage": "PUBLIC_PREVIEW" } @@ -61970,6 +62060,7 @@ "launch_stage": "PUBLIC_PREVIEW" }, "entity_version": { + "description": "The version of the model in Unity Catalog to be served.", "launch_stage": "PUBLIC_PREVIEW" }, "name": { @@ -61979,6 +62070,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" } } }, @@ -62213,6 +62309,7 @@ "serving.Route": { "fields": { "served_entity_name": { + "description": "The name of the served entity this route configures traffic for.", "launch_stage": "GA" }, "served_model_name": { @@ -62239,6 +62336,7 @@ "launch_stage": "GA" }, "entity_version": { + "description": "The version of the model in Databricks Model Registry or Unity Catalog to be served, or empty if the entity is a FEATURE_SPEC function.", "launch_stage": "GA" }, "environment_vars": { @@ -62303,9 +62401,11 @@ ] }, "creation_timestamp": { + "description": "The timestamp when the served entity was created, in milliseconds since the Unix epoch.", "launch_stage": "GA" }, "creator": { + "description": "The email of the user who created the served entity.", "launch_stage": "GA" }, "entity_name": { @@ -62313,6 +62413,7 @@ "launch_stage": "GA" }, "entity_version": { + "description": "The version of the model in Databricks Model Registry or Unity Catalog to be served, or empty if the entity is a FEATURE_SPEC function.", "launch_stage": "GA" }, "environment_vars": { @@ -62325,6 +62426,7 @@ "launch_stage": "GA" }, "foundation_model": { + "description": "The foundation model that is served. Present for served entities that serve a Databricks-hosted foundation model.", "ref": "serving.FoundationModel", "launch_stage": "PUBLIC_PREVIEW" }, @@ -62361,6 +62463,7 @@ "launch_stage": "GA" }, "state": { + "description": "Information corresponding to the state of the served entity.", "ref": "serving.ServedModelState", "launch_stage": "GA" }, @@ -62378,20 +62481,25 @@ "serving.ServedEntitySpec": { "fields": { "entity_name": { + "description": "The name of the entity to be served. The entity may be a model in the Databricks Model Registry, a model in the Unity Catalog (UC), or a function of type FEATURE_SPEC in the UC. If it is a UC object, the full name of the object is given in the form of **catalog_name.schema_name.model_name**.", "launch_stage": "GA" }, "entity_version": { + "description": "The version of the model in Databricks Model Registry or Unity Catalog to be served, or empty if the entity is a FEATURE_SPEC function.", "launch_stage": "GA" }, "external_model": { + "description": "The external model that is served. NOTE: Only one of external_model, foundation_model, and (entity_name, entity_version) is returned based on the endpoint type.", "ref": "serving.ExternalModel", "launch_stage": "GA" }, "foundation_model": { + "description": "The foundation model that is served. NOTE: Only one of foundation_model, external_model, and (entity_name, entity_version) is returned based on the endpoint type.", "ref": "serving.FoundationModel", "launch_stage": "PUBLIC_PREVIEW" }, "name": { + "description": "The name of the served entity.", "launch_stage": "GA" } } @@ -62430,9 +62538,11 @@ "launch_stage": "GA" }, "model_name": { + "description": "The name of the model in Databricks Model Registry to be served or, if the model resides in Unity Catalog, the full name of the model in the form of **catalog_name.schema_name.model_name**.", "launch_stage": "GA" }, "model_version": { + "description": "The version of the model in Databricks Model Registry or Unity Catalog to be served.", "launch_stage": "GA" }, "name": { @@ -62493,9 +62603,11 @@ ] }, "creation_timestamp": { + "description": "The timestamp when the served entity was created, in milliseconds since the Unix epoch.", "launch_stage": "GA" }, "creator": { + "description": "The email of the user who created the served entity.", "launch_stage": "GA" }, "environment_vars": { @@ -62515,9 +62627,11 @@ "launch_stage": "GA" }, "model_name": { + "description": "The name of the model in Databricks Model Registry to be served or, if the model resides in Unity Catalog, the full name of the model in the form of **catalog_name.schema_name.model_name**.", "launch_stage": "GA" }, "model_version": { + "description": "The version of the model in Databricks Model Registry or Unity Catalog to be served.", "launch_stage": "GA" }, "name": { @@ -62533,6 +62647,7 @@ "launch_stage": "GA" }, "state": { + "description": "Information corresponding to the state of the served entity.", "ref": "serving.ServedModelState", "launch_stage": "GA" }, @@ -62550,14 +62665,15 @@ "serving.ServedModelSpec": { "fields": { "model_name": { - "description": "Only one of model_name and entity_name should be populated", + "description": "The name of the model in Databricks Model Registry to be served or, if the model resides in Unity Catalog, the full name of the model in the form of **catalog_name.schema_name.model_name**.", "launch_stage": "GA" }, "model_version": { - "description": "Only one of model_version and entity_version should be populated", + "description": "The version of the model in Databricks Model Registry or Unity Catalog to be served.", "launch_stage": "GA" }, "name": { + "description": "The name of the served entity.", "launch_stage": "GA" } } @@ -62565,10 +62681,12 @@ "serving.ServedModelState": { "fields": { "deployment": { + "description": "The state of the deployment of the served entity. DEPLOYMENT_CREATING indicates that the served entity is not ready yet because the deployment is still being created (for example, the container image is building or the model server is starting for the first time). DEPLOYMENT_RECOVERING indicates that the served entity was previously ready but no longer is and is attempting to recover. DEPLOYMENT_READY indicates that the served entity is ready to receive traffic. DEPLOYMENT_FAILED indicates that there was an error bringing up the served entity (for example, the container image build failed or the model server failed to start due to a model loading error). DEPLOYMENT_ABORTED indicates that the deployment was terminated, likely due to a failure in bringing up another served entity under the same endpoint and config version.", "ref": "serving.ServedModelStateDeployment", "launch_stage": "GA" }, "deployment_state_message": { + "description": "More information about the state of the served entity, if available.", "launch_stage": "GA" } } @@ -62614,7 +62732,7 @@ "launch_stage": "GA" }, "creation_timestamp": { - "description": "The timestamp when the endpoint was created in Unix time.", + "description": "The timestamp when the endpoint was created, in milliseconds since the Unix epoch.", "launch_stage": "GA" }, "creator": { @@ -62630,7 +62748,7 @@ "launch_stage": "GA" }, "last_updated_timestamp": { - "description": "The timestamp when the endpoint was last updated by a user in Unix time.", + "description": "The timestamp when the endpoint was last updated by a user, in milliseconds since the Unix epoch.", "launch_stage": "GA" }, "name": { @@ -62722,7 +62840,7 @@ "launch_stage": "GA" }, "creation_timestamp": { - "description": "The timestamp when the endpoint was created in Unix time.", + "description": "The timestamp when the endpoint was created, in milliseconds since the Unix epoch.", "launch_stage": "GA" }, "creator": { @@ -62735,7 +62853,7 @@ "launch_stage": "GA" }, "description": { - "description": "Description of the serving model", + "description": "Description of the serving endpoint.", "launch_stage": "GA" }, "email_notifications": { @@ -62752,7 +62870,7 @@ "launch_stage": "GA" }, "last_updated_timestamp": { - "description": "The timestamp when the endpoint was last updated by a user in Unix time.", + "description": "The timestamp when the endpoint was last updated by a user, in milliseconds since the Unix epoch.", "launch_stage": "GA" }, "name": { @@ -62976,10 +63094,12 @@ "serving.UpdateInferenceEndpointNotificationsResponse": { "fields": { "email_notifications": { + "description": "The email notification settings now in effect for the serving endpoint.", "ref": "serving.EmailNotifications", "launch_stage": "GA" }, "name": { + "description": "The name of the serving endpoint whose notification settings were updated.", "launch_stage": "GA" } } @@ -62987,6 +63107,7 @@ "serving.UpdateProvisionedThroughputEndpointConfigRequest": { "fields": { "config": { + "description": "The core config of the serving endpoint.", "ref": "serving.PtEndpointCoreConfig", "launch_stage": "PUBLIC_PREVIEW" } @@ -70375,6 +70496,7 @@ } }, "sql.AlertV2": { + "description": "A SQL alert. An alert runs a query on a schedule, evaluates the result against a condition,\nand notifies users or notification destinations when the condition is met.", "fields": { "create_time": { "description": "The timestamp indicating when the alert was created.", @@ -70384,14 +70506,14 @@ ] }, "custom_description": { - "description": "Custom description for the alert. Interpreted according to `custom_template_format`.", + "description": "Custom description for the alert, used as the notification body. Interpreted according to `custom_template_format`.\nThe available template variables are listed at https://docs.databricks.com/aws/en/sql/user/alerts/create#notification-templates.", "launch_stage": "GA", "behaviors": [ "OPTIONAL" ] }, "custom_summary": { - "description": "Custom summary for the alert. Interpreted according to `custom_template_format`.", + "description": "Custom summary for the alert, used as the notification subject. Interpreted according to `custom_template_format`.", "launch_stage": "GA", "behaviors": [ "OPTIONAL" @@ -70400,7 +70522,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" ] @@ -70418,6 +70540,7 @@ ] }, "evaluation": { + "description": "Condition evaluated against the query result, and who is notified when it is met.", "ref": "sql.AlertV2Evaluation", "launch_stage": "GA" }, @@ -70429,7 +70552,7 @@ ] }, "lifecycle_state": { - "description": "Indicates whether the query is trashed.", + "description": "Indicates whether the alert is active (`ACTIVE`) or has been moved to the trash (`DELETED`).", "ref": "sql.AlertLifecycleState", "launch_stage": "GA", "behaviors": [ @@ -70471,7 +70594,7 @@ ] }, "run_as_user_name": { - "description": "The run as username or application ID of service principal.\nOn Create and Update, this field can be set to application ID of an active service principal. Setting this field requires the servicePrincipal/user role.\nDeprecated: Use `run_as` field instead. This field will be removed in a future release.", + "description": "Deprecated: Use `run_as` field instead. This field will be removed in a future release.\nThe run as username or application ID of service principal.\nOn Create and Update, this field can be set to application ID of an active service principal. Setting this field requires the servicePrincipal/user role.", "deprecated": true, "launch_stage": "GA", "behaviors": [ @@ -70479,6 +70602,7 @@ ] }, "schedule": { + "description": "Schedule on which the alert runs its query and evaluates the condition.", "ref": "sql.CronSchedule", "launch_stage": "GA" }, @@ -70498,12 +70622,12 @@ "sql.AlertV2Evaluation": { "fields": { "comparison_operator": { - "description": "Operator used for comparison in alert evaluation.", + "description": "Operator used for comparison in alert evaluation. The alert is triggered when the comparison of the source value with the threshold is true. `IS_NULL` and `IS_NOT_NULL` take no threshold.", "ref": "sql.ComparisonOperator", "launch_stage": "GA" }, "empty_result_state": { - "description": "Alert state if result is empty. Please avoid setting this field to be `UNKNOWN` because `UNKNOWN` state is planned to be deprecated.", + "description": "Alert state if result is empty. If not set, an empty result sets the state to `ERROR`. Please avoid setting this field to be `UNKNOWN` because `UNKNOWN` state is planned to be deprecated.", "ref": "sql.AlertEvaluationState", "launch_stage": "GA", "behaviors": [ @@ -70531,7 +70655,7 @@ "launch_stage": "GA" }, "state": { - "description": "Latest state of alert evaluation.", + "description": "Latest state of alert evaluation: `TRIGGERED` when the condition was met, `OK` when it was not, and `ERROR` when the evaluation failed.", "ref": "sql.AlertEvaluationState", "launch_stage": "GA", "behaviors": [ @@ -70539,7 +70663,7 @@ ] }, "threshold": { - "description": "Threshold to user for alert evaluation, can be a column or a value.", + "description": "Threshold to compare the source column against, either another column or a fixed value. Not needed when `comparison_operator` is `IS_NULL` or `IS_NOT_NULL`.", "ref": "sql.AlertV2Operand", "launch_stage": "GA", "behaviors": [ @@ -70565,6 +70689,7 @@ ] }, "subscriptions": { + "description": "Users and notification destinations that receive notifications.", "launch_stage": "GA", "behaviors": [ "OPTIONAL", @@ -70576,6 +70701,7 @@ "sql.AlertV2Operand": { "fields": { "column": { + "description": "Compare the source against another column of the query result.", "ref": "sql.AlertV2OperandColumn", "launch_stage": "GA", "behaviors": [ @@ -70583,6 +70709,7 @@ ] }, "value": { + "description": "Compare the source against a fixed value.", "ref": "sql.AlertV2OperandValue", "launch_stage": "GA", "behaviors": [ @@ -70594,7 +70721,7 @@ "sql.AlertV2OperandColumn": { "fields": { "aggregation": { - "description": "If not set, the behavior is equivalent to using `First row` in the UI.", + "description": "Aggregation applied to the column across all rows of the query result: `SUM`, `COUNT`, `COUNT_DISTINCT`, `AVG`, `MEDIAN`, `MIN`, `MAX` or `STDDEV`.\nIf not set, the value in the first row is used, which is equivalent to using `First row` in the UI.", "ref": "sql.Aggregation", "launch_stage": "GA", "behaviors": [ @@ -70602,12 +70729,14 @@ ] }, "display": { + "description": "Label for the column in notifications. Defaults to `name`.", "launch_stage": "GA", "behaviors": [ "OPTIONAL" ] }, "name": { + "description": "Name of the column in the query result.", "launch_stage": "GA" } } @@ -70615,18 +70744,21 @@ "sql.AlertV2OperandValue": { "fields": { "bool_value": { + "description": "Boolean threshold, for boolean columns.", "launch_stage": "GA", "behaviors": [ "OPTIONAL" ] }, "double_value": { + "description": "Numeric threshold, for numeric columns.", "launch_stage": "GA", "behaviors": [ "OPTIONAL" ] }, "string_value": { + "description": "String threshold, for string or timestamp columns.", "launch_stage": "GA", "behaviors": [ "OPTIONAL" @@ -70655,9 +70787,11 @@ "sql.AlertV2Subscription": { "fields": { "destination_id": { + "description": "ID of the notification destination to notify, as returned by the Notification Destinations API.", "launch_stage": "GA" }, "user_email": { + "description": "Email address of the workspace user to notify.", "launch_stage": "GA" } } @@ -71201,7 +71335,7 @@ "sql.CronSchedule": { "fields": { "pause_status": { - "description": "Indicate whether this schedule is paused or not.", + "description": "Indicates whether this schedule is paused. While paused, the alert is not evaluated.", "ref": "sql.SchedulePauseStatus", "launch_stage": "GA", "behaviors": [ @@ -71209,7 +71343,7 @@ ] }, "quartz_cron_schedule": { - "description": "A cron expression using quartz syntax that specifies the schedule for this pipeline.\nShould use the quartz format described here: http://www.quartz-scheduler.org/documentation/quartz-2.1.7/tutorials/tutorial-lesson-06.html", + "description": "A cron expression using quartz syntax that specifies the schedule for this alert.\nShould use the quartz format described here: http://www.quartz-scheduler.org/documentation/quartz-2.1.7/tutorials/tutorial-lesson-06.html", "launch_stage": "GA" }, "timezone_id": { @@ -71225,8 +71359,8 @@ "MARKDOWN" ], "enum_launch_stages": { - "HTML": "PUBLIC_BETA", - "MARKDOWN": "PUBLIC_BETA" + "HTML": "PUBLIC_PREVIEW", + "MARKDOWN": "PUBLIC_PREVIEW" } }, "sql.Dashboard": { @@ -72559,12 +72693,14 @@ "sql.ListAlertsV2Request": { "fields": { "page_size": { + "description": "Maximum number of alerts to return per page. Values above 100 are coerced to 100.", "launch_stage": "GA", "behaviors": [ "OPTIONAL" ] }, "page_token": { + "description": "Page token returned as `next_page_token` by a previous call. Omit it to retrieve the first page.", "launch_stage": "GA", "behaviors": [ "OPTIONAL" @@ -74565,7 +74701,7 @@ "launch_stage": "GA" }, "update_mask": { - "description": "The field mask must be a single string, with multiple fields separated by commas (no spaces). The field path is relative to the resource object, using a dot (`.`) to navigate sub-fields (e.g., `author.given_name`). Specification of elements in sequence or map fields is not allowed, as only the entire collection field can be specified. Field names must exactly match the resource field names.\n\nA field mask of `*` indicates full replacement. It’s recommended to always explicitly list the fields being updated and avoid using `*` wildcards, as it can lead to unintended results if the API changes in the future.", + "description": "Comma-separated list of the alert fields to update, for example `display_name,query_text` or `schedule.pause_status`.\nOnly the listed fields are changed; all other fields keep their current values. `parent_path` cannot be updated.", "launch_stage": "GA" } } @@ -75571,6 +75707,7 @@ "description": "Timestamp when the tag policy was created", "launch_stage": "GA", "behaviors": [ + "IMMUTABLE", "OUTPUT_ONLY" ] }, @@ -75583,6 +75720,7 @@ "id": { "launch_stage": "GA", "behaviors": [ + "IMMUTABLE", "OUTPUT_ONLY" ] }, @@ -84521,20 +84659,21 @@ }, { "name": "CancelBatch", - "description": "Cancel a batch. Cancellation is asynchronous: requests in flight drain first, so read the batch to observe the `CANCELLING` and `CANCELLED` statuses.", + "description": "Starts the asynchronous cancellation of a batch. Requests in progress are drained first. Cancellation is best effort, so the batch can still complete.", "summary": "Cancel a batch.", "path": "/api/2.0/ai-functions/batches/{name}/cancel", - "is_hidden_cli": true, "has_required_positional_arguments": true, - "launch_stage": "PRIVATE_PREVIEW", - "cli_launch_stage_display": "Private Preview", + "launch_stage": "PUBLIC_BETA", + "cli_launch_stage_label": "*Beta*", + "cli_launch_stage_banner": "This command is in Beta and may change without notice.", + "cli_launch_stage_display": "Beta", "request": { "pascal_name": "CancelBatchRequest", "is_object": true, "required_fields": [ { "name": "name", - "description": "ID of the batch, in the form `batch_\u003cid\u003e`.", + "description": "Resource name of the batch. Format: `batch_\u003cid\u003e`.", "required": true, "is_path": true, "entity": { @@ -84545,7 +84684,7 @@ "required_in_url_fields": [ { "name": "name", - "description": "ID of the batch, in the form `batch_\u003cid\u003e`.", + "description": "Resource name of the batch. Format: `batch_\u003cid\u003e`.", "required": true, "is_path": true, "entity": { @@ -84561,7 +84700,7 @@ "all_fields": [ { "name": "name", - "description": "ID of the batch, in the form `batch_\u003cid\u003e`.", + "description": "Resource name of the batch. Format: `batch_\u003cid\u003e`.", "required": true, "is_path": true, "entity": { @@ -84572,7 +84711,7 @@ "required_positional_arguments": [ { "name": "name", - "description": "ID of the batch, in the form `batch_\u003cid\u003e`.", + "description": "Resource name of the batch. Format: `batch_\u003cid\u003e`.", "required": true, "is_path": true, "entity": { @@ -84583,15 +84722,16 @@ }, { "name": "CreateBatch", - "description": "Run an AI function over every request in a file on a Unity Catalog volume. The batch runs asynchronously; read it to follow its progress.", + "description": "Creates a batch that runs an AI function on every request in a JSONL file on a Unity Catalog volume. The batch runs asynchronously. To follow its progress, get the batch.", "summary": "Create a batch.", "path": "/api/2.0/ai-functions/batches", "can_use_json": true, "is_crud_create": true, - "is_hidden_cli": true, "has_required_positional_arguments": true, - "launch_stage": "PRIVATE_PREVIEW", - "cli_launch_stage_display": "Private Preview", + "launch_stage": "PUBLIC_BETA", + "cli_launch_stage_label": "*Beta*", + "cli_launch_stage_banner": "This command is in Beta and may change without notice.", + "cli_launch_stage_display": "Beta", "request": { "pascal_name": "CreateBatchRequest", "is_object": true, @@ -84633,7 +84773,7 @@ "required_fields": [ { "name": "endpoint", - "description": "The AI function to run for every request, for example `ai_extract`.", + "description": "The AI function, for example `ai_parse_document`.", "required": true, "is_request_body_field": true, "entity": { @@ -84642,7 +84782,16 @@ }, { "name": "input_ref", - "description": "Path of the JSONL input file on a Unity Catalog volume. Each line is one request.", + "description": "Unity Catalog volume path of the JSONL input file. Each line is one request, in the form `{\"custom_id\": ..., \"body\": ...}`. The file can hold up to 50,000 requests and be up to 200 MiB.", + "required": true, + "is_request_body_field": true, + "entity": { + "is_string": true + } + }, + { + "name": "output_ref", + "description": "Unity Catalog volume path to write the JSONL output file to. If the path is a directory, the file is `\u003cpath\u003e/\u003cname\u003e_output.jsonl`.", "required": true, "is_request_body_field": true, "entity": { @@ -84653,7 +84802,7 @@ "required_request_body_fields": [ { "name": "endpoint", - "description": "The AI function to run for every request, for example `ai_extract`.", + "description": "The AI function, for example `ai_parse_document`.", "required": true, "is_request_body_field": true, "entity": { @@ -84662,7 +84811,16 @@ }, { "name": "input_ref", - "description": "Path of the JSONL input file on a Unity Catalog volume. Each line is one request.", + "description": "Unity Catalog volume path of the JSONL input file. Each line is one request, in the form `{\"custom_id\": ..., \"body\": ...}`. The file can hold up to 50,000 requests and be up to 200 MiB.", + "required": true, + "is_request_body_field": true, + "entity": { + "is_string": true + } + }, + { + "name": "output_ref", + "description": "Unity Catalog volume path to write the JSONL output file to. If the path is a directory, the file is `\u003cpath\u003e/\u003cname\u003e_output.jsonl`.", "required": true, "is_request_body_field": true, "entity": { @@ -84679,7 +84837,7 @@ "required_fields": [ { "name": "endpoint", - "description": "The AI function to run for every request, for example `ai_extract`.", + "description": "The AI function, for example `ai_parse_document`.", "required": true, "is_request_body_field": true, "entity": { @@ -84688,7 +84846,16 @@ }, { "name": "input_ref", - "description": "Path of the JSONL input file on a Unity Catalog volume. Each line is one request.", + "description": "Unity Catalog volume path of the JSONL input file. Each line is one request, in the form `{\"custom_id\": ..., \"body\": ...}`. The file can hold up to 50,000 requests and be up to 200 MiB.", + "required": true, + "is_request_body_field": true, + "entity": { + "is_string": true + } + }, + { + "name": "output_ref", + "description": "Unity Catalog volume path to write the JSONL output file to. If the path is a directory, the file is `\u003cpath\u003e/\u003cname\u003e_output.jsonl`.", "required": true, "is_request_body_field": true, "entity": { @@ -84699,7 +84866,7 @@ "required_request_body_fields": [ { "name": "endpoint", - "description": "The AI function to run for every request, for example `ai_extract`.", + "description": "The AI function, for example `ai_parse_document`.", "required": true, "is_request_body_field": true, "entity": { @@ -84708,7 +84875,16 @@ }, { "name": "input_ref", - "description": "Path of the JSONL input file on a Unity Catalog volume. Each line is one request.", + "description": "Unity Catalog volume path of the JSONL input file. Each line is one request, in the form `{\"custom_id\": ..., \"body\": ...}`. The file can hold up to 50,000 requests and be up to 200 MiB.", + "required": true, + "is_request_body_field": true, + "entity": { + "is_string": true + } + }, + { + "name": "output_ref", + "description": "Unity Catalog volume path to write the JSONL output file to. If the path is a directory, the file is `\u003cpath\u003e/\u003cname\u003e_output.jsonl`.", "required": true, "is_request_body_field": true, "entity": { @@ -84730,7 +84906,7 @@ "required_fields": [ { "name": "endpoint", - "description": "The AI function to run for every request, for example `ai_extract`.", + "description": "The AI function, for example `ai_parse_document`.", "required": true, "is_request_body_field": true, "entity": { @@ -84739,7 +84915,16 @@ }, { "name": "input_ref", - "description": "Path of the JSONL input file on a Unity Catalog volume. Each line is one request.", + "description": "Unity Catalog volume path of the JSONL input file. Each line is one request, in the form `{\"custom_id\": ..., \"body\": ...}`. The file can hold up to 50,000 requests and be up to 200 MiB.", + "required": true, + "is_request_body_field": true, + "entity": { + "is_string": true + } + }, + { + "name": "output_ref", + "description": "Unity Catalog volume path to write the JSONL output file to. If the path is a directory, the file is `\u003cpath\u003e/\u003cname\u003e_output.jsonl`.", "required": true, "is_request_body_field": true, "entity": { @@ -84750,7 +84935,7 @@ "required_request_body_fields": [ { "name": "endpoint", - "description": "The AI function to run for every request, for example `ai_extract`.", + "description": "The AI function, for example `ai_parse_document`.", "required": true, "is_request_body_field": true, "entity": { @@ -84759,7 +84944,16 @@ }, { "name": "input_ref", - "description": "Path of the JSONL input file on a Unity Catalog volume. Each line is one request.", + "description": "Unity Catalog volume path of the JSONL input file. Each line is one request, in the form `{\"custom_id\": ..., \"body\": ...}`. The file can hold up to 50,000 requests and be up to 200 MiB.", + "required": true, + "is_request_body_field": true, + "entity": { + "is_string": true + } + }, + { + "name": "output_ref", + "description": "Unity Catalog volume path to write the JSONL output file to. If the path is a directory, the file is `\u003cpath\u003e/\u003cname\u003e_output.jsonl`.", "required": true, "is_request_body_field": true, "entity": { @@ -84771,7 +84965,7 @@ }, { "name": "create_time", - "description": "Output only. Time the batch was created.", + "description": "Output only. The time when the batch was created.", "is_output_only": true, "is_request_body_field": true, "is_optional_object": true, @@ -84781,7 +84975,7 @@ }, { "name": "endpoint", - "description": "The AI function to run for every request, for example `ai_extract`.", + "description": "The AI function, for example `ai_parse_document`.", "required": true, "is_request_body_field": true, "entity": { @@ -84790,7 +84984,7 @@ }, { "name": "input_ref", - "description": "Path of the JSONL input file on a Unity Catalog volume. Each line is one request.", + "description": "Unity Catalog volume path of the JSONL input file. Each line is one request, in the form `{\"custom_id\": ..., \"body\": ...}`. The file can hold up to 50,000 requests and be up to 200 MiB.", "required": true, "is_request_body_field": true, "entity": { @@ -84799,7 +84993,8 @@ }, { "name": "name", - "description": "ID of the batch, in the form `batch_\u003cid\u003e`. The service assigns it.", + "description": "Output only. Identifier. Resource name of the batch, returned by create. Format: `batch_\u003cid\u003e`.", + "is_output_only": true, "is_request_body_field": true, "entity": { "is_string": true @@ -84807,7 +85002,8 @@ }, { "name": "output_ref", - "description": "Path on a Unity Catalog volume to write the JSONL output to. When it is omitted, the output\nstays on Databricks-managed storage and a finished batch returns a short-lived download URL\nin this field instead.", + "description": "Unity Catalog volume path to write the JSONL output file to. If the path is a directory, the file is `\u003cpath\u003e/\u003cname\u003e_output.jsonl`.", + "required": true, "is_request_body_field": true, "entity": { "is_string": true @@ -84815,7 +85011,7 @@ }, { "name": "params", - "description": "Function options applied to every request in the batch, for example the extraction schema.", + "description": "Parameters of the function other than its input, applied to every request in the batch, for example\n`schema` for `ai_extract`. Put function options, such as `version`, in a nested `options` object. For\nthe parameters of each function, see [AI Functions](/large-language-models/ai-functions).", "is_request_body_field": true, "entity": { "map_value": {} @@ -84823,7 +85019,7 @@ }, { "name": "percent_complete", - "description": "Output only. Percentage of the requests that finished, from 0 to 100. Returned when one batch\nis read, not when batches are listed.", + "description": "Output only. The percentage of requests that are processed, from 0 to 100. Returned when you get a batch, not when you\nlist batches.", "is_output_only": true, "is_request_body_field": true, "entity": { @@ -84832,7 +85028,7 @@ }, { "name": "request_counts", - "description": "Output only. Request counts. Returned when one batch is read, not when batches are listed.", + "description": "Output only. The number of requests in the batch, by result. Returned when you get a batch, not when you list\nbatches.", "is_output_only": true, "is_request_body_field": true, "is_optional_object": true, @@ -84843,7 +85039,7 @@ }, { "name": "status", - "description": "Output only. Status of the batch.", + "description": "Output only. The status of the batch.", "is_output_only": true, "is_request_body_field": true, "entity": { @@ -84858,9 +85054,6 @@ { "content": "COMPLETED" }, - { - "content": "EXPIRED" - }, { "content": "FAILED" }, @@ -84880,7 +85073,7 @@ "required_positional_arguments": [ { "name": "endpoint", - "description": "The AI function to run for every request, for example `ai_extract`.", + "description": "The AI function, for example `ai_parse_document`.", "required": true, "is_request_body_field": true, "entity": { @@ -84889,7 +85082,16 @@ }, { "name": "input_ref", - "description": "Path of the JSONL input file on a Unity Catalog volume. Each line is one request.", + "description": "Unity Catalog volume path of the JSONL input file. Each line is one request, in the form `{\"custom_id\": ..., \"body\": ...}`. The file can hold up to 50,000 requests and be up to 200 MiB.", + "required": true, + "is_request_body_field": true, + "entity": { + "is_string": true + } + }, + { + "name": "output_ref", + "description": "Unity Catalog volume path to write the JSONL output file to. If the path is a directory, the file is `\u003cpath\u003e/\u003cname\u003e_output.jsonl`.", "required": true, "is_request_body_field": true, "entity": { @@ -84900,21 +85102,22 @@ }, { "name": "GetBatch", - "description": "Read one batch, with its status and progress.", + "description": "Gets the latest status and progress of a batch.", "summary": "Get a batch.", "path": "/api/2.0/ai-functions/batches/{name}", "is_crud_read": true, - "is_hidden_cli": true, "has_required_positional_arguments": true, - "launch_stage": "PRIVATE_PREVIEW", - "cli_launch_stage_display": "Private Preview", + "launch_stage": "PUBLIC_BETA", + "cli_launch_stage_label": "*Beta*", + "cli_launch_stage_banner": "This command is in Beta and may change without notice.", + "cli_launch_stage_display": "Beta", "request": { "pascal_name": "GetBatchRequest", "is_object": true, "required_fields": [ { "name": "name", - "description": "ID of the batch, in the form `batch_\u003cid\u003e`.", + "description": "Resource name of the batch. Format: `batch_\u003cid\u003e`.", "required": true, "is_path": true, "entity": { @@ -84925,7 +85128,7 @@ "required_in_url_fields": [ { "name": "name", - "description": "ID of the batch, in the form `batch_\u003cid\u003e`.", + "description": "Resource name of the batch. Format: `batch_\u003cid\u003e`.", "required": true, "is_path": true, "entity": { @@ -84941,7 +85144,7 @@ "required_fields": [ { "name": "endpoint", - "description": "The AI function to run for every request, for example `ai_extract`.", + "description": "The AI function, for example `ai_parse_document`.", "required": true, "is_request_body_field": true, "entity": { @@ -84950,7 +85153,16 @@ }, { "name": "input_ref", - "description": "Path of the JSONL input file on a Unity Catalog volume. Each line is one request.", + "description": "Unity Catalog volume path of the JSONL input file. Each line is one request, in the form `{\"custom_id\": ..., \"body\": ...}`. The file can hold up to 50,000 requests and be up to 200 MiB.", + "required": true, + "is_request_body_field": true, + "entity": { + "is_string": true + } + }, + { + "name": "output_ref", + "description": "Unity Catalog volume path to write the JSONL output file to. If the path is a directory, the file is `\u003cpath\u003e/\u003cname\u003e_output.jsonl`.", "required": true, "is_request_body_field": true, "entity": { @@ -84961,7 +85173,7 @@ "required_request_body_fields": [ { "name": "endpoint", - "description": "The AI function to run for every request, for example `ai_extract`.", + "description": "The AI function, for example `ai_parse_document`.", "required": true, "is_request_body_field": true, "entity": { @@ -84970,7 +85182,16 @@ }, { "name": "input_ref", - "description": "Path of the JSONL input file on a Unity Catalog volume. Each line is one request.", + "description": "Unity Catalog volume path of the JSONL input file. Each line is one request, in the form `{\"custom_id\": ..., \"body\": ...}`. The file can hold up to 50,000 requests and be up to 200 MiB.", + "required": true, + "is_request_body_field": true, + "entity": { + "is_string": true + } + }, + { + "name": "output_ref", + "description": "Unity Catalog volume path to write the JSONL output file to. If the path is a directory, the file is `\u003cpath\u003e/\u003cname\u003e_output.jsonl`.", "required": true, "is_request_body_field": true, "entity": { @@ -84982,7 +85203,7 @@ "all_fields": [ { "name": "name", - "description": "ID of the batch, in the form `batch_\u003cid\u003e`.", + "description": "Resource name of the batch. Format: `batch_\u003cid\u003e`.", "required": true, "is_path": true, "entity": { @@ -84993,7 +85214,7 @@ "required_positional_arguments": [ { "name": "name", - "description": "ID of the batch, in the form `batch_\u003cid\u003e`.", + "description": "Resource name of the batch. Format: `batch_\u003cid\u003e`.", "required": true, "is_path": true, "entity": { @@ -85004,13 +85225,14 @@ }, { "name": "ListBatches", - "description": "List the batches the caller created in this workspace.", + "description": "Lists the batches that the caller created in this workspace.", "summary": "List batches.", "path": "/api/2.0/ai-functions/batches", - "is_hidden_cli": true, "has_required_positional_arguments": true, - "launch_stage": "PRIVATE_PREVIEW", - "cli_launch_stage_display": "Private Preview", + "launch_stage": "PUBLIC_BETA", + "cli_launch_stage_label": "*Beta*", + "cli_launch_stage_banner": "This command is in Beta and may change without notice.", + "cli_launch_stage_display": "Beta", "request": { "pascal_name": "ListBatchesRequest", "is_object": true @@ -85030,7 +85252,7 @@ }, { "name": "page_token", - "description": "Page token from an earlier response. Omit it to read the first page.", + "description": "A page token from a previous call to list batches. Omit it to get the first page.", "is_query": true, "entity": { "is_string": true @@ -85041,7 +85263,7 @@ "token": { "poll_field": { "name": "page_token", - "description": "Page token from an earlier response. Omit it to read the first page.", + "description": "A page token from a previous call to list batches. Omit it to get the first page.", "is_query": true, "entity": { "is_string": true @@ -91848,7 +92070,7 @@ "methods": [ { "name": "CreateAlert", - "description": "Create Alert", + "description": "Creates an alert that runs `query_text` on the given schedule and evaluates the result against the configured condition.", "summary": "Create an alert.", "path": "/api/2.0/alerts", "can_use_json": true, @@ -91921,6 +92143,7 @@ }, { "name": "evaluation", + "description": "Condition evaluated against the query result, and who is notified when it is met.", "required": true, "is_request_body_field": true, "entity": { @@ -91930,6 +92153,7 @@ }, { "name": "schedule", + "description": "Schedule on which the alert runs its query and evaluates the condition.", "required": true, "is_request_body_field": true, "entity": { @@ -91968,6 +92192,7 @@ }, { "name": "evaluation", + "description": "Condition evaluated against the query result, and who is notified when it is met.", "required": true, "is_request_body_field": true, "entity": { @@ -91977,6 +92202,7 @@ }, { "name": "schedule", + "description": "Schedule on which the alert runs its query and evaluates the condition.", "required": true, "is_request_body_field": true, "entity": { @@ -92021,6 +92247,7 @@ }, { "name": "evaluation", + "description": "Condition evaluated against the query result, and who is notified when it is met.", "required": true, "is_request_body_field": true, "entity": { @@ -92030,6 +92257,7 @@ }, { "name": "schedule", + "description": "Schedule on which the alert runs its query and evaluates the condition.", "required": true, "is_request_body_field": true, "entity": { @@ -92068,6 +92296,7 @@ }, { "name": "evaluation", + "description": "Condition evaluated against the query result, and who is notified when it is met.", "required": true, "is_request_body_field": true, "entity": { @@ -92077,6 +92306,7 @@ }, { "name": "schedule", + "description": "Schedule on which the alert runs its query and evaluates the condition.", "required": true, "is_request_body_field": true, "entity": { @@ -92125,6 +92355,7 @@ }, { "name": "evaluation", + "description": "Condition evaluated against the query result, and who is notified when it is met.", "required": true, "is_request_body_field": true, "entity": { @@ -92134,6 +92365,7 @@ }, { "name": "schedule", + "description": "Schedule on which the alert runs its query and evaluates the condition.", "required": true, "is_request_body_field": true, "entity": { @@ -92172,6 +92404,7 @@ }, { "name": "evaluation", + "description": "Condition evaluated against the query result, and who is notified when it is met.", "required": true, "is_request_body_field": true, "entity": { @@ -92181,6 +92414,7 @@ }, { "name": "schedule", + "description": "Schedule on which the alert runs its query and evaluates the condition.", "required": true, "is_request_body_field": true, "entity": { @@ -92202,7 +92436,7 @@ }, { "name": "custom_description", - "description": "Custom description for the alert. Interpreted according to `custom_template_format`.", + "description": "Custom description for the alert, used as the notification body. Interpreted according to `custom_template_format`.\nThe available template variables are listed at https://docs.databricks.com/aws/en/sql/user/alerts/create#notification-templates.", "is_request_body_field": true, "entity": { "is_string": true @@ -92210,7 +92444,7 @@ }, { "name": "custom_summary", - "description": "Custom summary for the alert. Interpreted according to `custom_template_format`.", + "description": "Custom summary for the alert, used as the notification subject. Interpreted according to `custom_template_format`.", "is_request_body_field": true, "entity": { "is_string": true @@ -92254,6 +92488,7 @@ }, { "name": "evaluation", + "description": "Condition evaluated against the query result, and who is notified when it is met.", "required": true, "is_request_body_field": true, "entity": { @@ -92272,7 +92507,7 @@ }, { "name": "lifecycle_state", - "description": "Indicates whether the query is trashed.", + "description": "Indicates whether the alert is active (`ACTIVE`) or has been moved to the trash (`DELETED`).", "is_output_only": true, "is_request_body_field": true, "entity": { @@ -92337,7 +92572,7 @@ }, { "name": "run_as_user_name", - "description": "The run as username or application ID of service principal.\nOn Create and Update, this field can be set to application ID of an active service principal. Setting this field requires the servicePrincipal/user role.\nDeprecated: Use `run_as` field instead. This field will be removed in a future release.", + "description": "Deprecated: Use `run_as` field instead. This field will be removed in a future release.\nThe run as username or application ID of service principal.\nOn Create and Update, this field can be set to application ID of an active service principal. Setting this field requires the servicePrincipal/user role.", "is_request_body_field": true, "entity": { "is_string": true @@ -92345,6 +92580,7 @@ }, { "name": "schedule", + "description": "Schedule on which the alert runs its query and evaluates the condition.", "required": true, "is_request_body_field": true, "entity": { @@ -92401,6 +92637,7 @@ }, { "name": "evaluation", + "description": "Condition evaluated against the query result, and who is notified when it is met.", "required": true, "is_request_body_field": true, "entity": { @@ -92410,6 +92647,7 @@ }, { "name": "schedule", + "description": "Schedule on which the alert runs its query and evaluates the condition.", "required": true, "is_request_body_field": true, "entity": { @@ -92434,6 +92672,7 @@ "required_fields": [ { "name": "id", + "description": "ID of the alert to retrieve, as returned in the alert's `id` field.", "required": true, "is_path": true, "entity": { @@ -92444,6 +92683,7 @@ "required_in_url_fields": [ { "name": "id", + "description": "ID of the alert to retrieve, as returned in the alert's `id` field.", "required": true, "is_path": true, "entity": { @@ -92486,6 +92726,7 @@ }, { "name": "evaluation", + "description": "Condition evaluated against the query result, and who is notified when it is met.", "required": true, "is_request_body_field": true, "entity": { @@ -92495,6 +92736,7 @@ }, { "name": "schedule", + "description": "Schedule on which the alert runs its query and evaluates the condition.", "required": true, "is_request_body_field": true, "entity": { @@ -92533,6 +92775,7 @@ }, { "name": "evaluation", + "description": "Condition evaluated against the query result, and who is notified when it is met.", "required": true, "is_request_body_field": true, "entity": { @@ -92542,6 +92785,7 @@ }, { "name": "schedule", + "description": "Schedule on which the alert runs its query and evaluates the condition.", "required": true, "is_request_body_field": true, "entity": { @@ -92554,6 +92798,7 @@ "all_fields": [ { "name": "id", + "description": "ID of the alert to retrieve, as returned in the alert's `id` field.", "required": true, "is_path": true, "entity": { @@ -92564,6 +92809,7 @@ "required_positional_arguments": [ { "name": "id", + "description": "ID of the alert to retrieve, as returned in the alert's `id` field.", "required": true, "is_path": true, "entity": { @@ -92591,6 +92837,7 @@ "all_fields": [ { "name": "page_size", + "description": "Maximum number of alerts to return per page. Values above 100 are coerced to 100.", "is_query": true, "entity": { "is_int": true @@ -92598,6 +92845,7 @@ }, { "name": "page_token", + "description": "Page token returned as `next_page_token` by a previous call. Omit it to retrieve the first page.", "is_query": true, "entity": { "is_string": true @@ -92608,6 +92856,7 @@ "token": { "poll_field": { "name": "page_token", + "description": "Page token returned as `next_page_token` by a previous call. Omit it to retrieve the first page.", "is_query": true, "entity": { "is_string": true @@ -92630,6 +92879,7 @@ "required_fields": [ { "name": "id", + "description": "ID of the alert to move to the trash.", "required": true, "is_path": true, "entity": { @@ -92640,6 +92890,7 @@ "required_in_url_fields": [ { "name": "id", + "description": "ID of the alert to move to the trash.", "required": true, "is_path": true, "entity": { @@ -92656,6 +92907,7 @@ "all_fields": [ { "name": "id", + "description": "ID of the alert to move to the trash.", "required": true, "is_path": true, "entity": { @@ -92674,6 +92926,7 @@ "required_positional_arguments": [ { "name": "id", + "description": "ID of the alert to move to the trash.", "required": true, "is_path": true, "entity": { @@ -92684,7 +92937,7 @@ }, { "name": "UpdateAlert", - "description": "Update alert", + "description": "Updates an alert. Only the fields listed in `update_mask` are changed; all other fields keep their current values.", "summary": "Update an alert.", "path": "/api/2.0/alerts/{id}", "can_use_json": true, @@ -92717,7 +92970,7 @@ }, { "name": "update_mask", - "description": "The field mask must be a single string, with multiple fields separated by commas (no spaces). The field path is relative to the resource object, using a dot (`.`) to navigate sub-fields (e.g., `author.given_name`). Specification of elements in sequence or map fields is not allowed, as only the entire collection field can be specified. Field names must exactly match the resource field names.\n\nA field mask of `*` indicates full replacement. It’s recommended to always explicitly list the fields being updated and avoid using `*` wildcards, as it can lead to unintended results if the API changes in the future.", + "description": "Comma-separated list of the alert fields to update, for example `display_name,query_text` or `schedule.pause_status`.\nOnly the listed fields are changed; all other fields keep their current values. `parent_path` cannot be updated.", "required": true, "is_query": true, "entity": { @@ -92738,7 +92991,7 @@ }, { "name": "update_mask", - "description": "The field mask must be a single string, with multiple fields separated by commas (no spaces). The field path is relative to the resource object, using a dot (`.`) to navigate sub-fields (e.g., `author.given_name`). Specification of elements in sequence or map fields is not allowed, as only the entire collection field can be specified. Field names must exactly match the resource field names.\n\nA field mask of `*` indicates full replacement. It’s recommended to always explicitly list the fields being updated and avoid using `*` wildcards, as it can lead to unintended results if the API changes in the future.", + "description": "Comma-separated list of the alert fields to update, for example `display_name,query_text` or `schedule.pause_status`.\nOnly the listed fields are changed; all other fields keep their current values. `parent_path` cannot be updated.", "required": true, "is_query": true, "entity": { @@ -92796,6 +93049,7 @@ }, { "name": "evaluation", + "description": "Condition evaluated against the query result, and who is notified when it is met.", "required": true, "is_request_body_field": true, "entity": { @@ -92805,6 +93059,7 @@ }, { "name": "schedule", + "description": "Schedule on which the alert runs its query and evaluates the condition.", "required": true, "is_request_body_field": true, "entity": { @@ -92843,6 +93098,7 @@ }, { "name": "evaluation", + "description": "Condition evaluated against the query result, and who is notified when it is met.", "required": true, "is_request_body_field": true, "entity": { @@ -92852,6 +93108,7 @@ }, { "name": "schedule", + "description": "Schedule on which the alert runs its query and evaluates the condition.", "required": true, "is_request_body_field": true, "entity": { @@ -92896,6 +93153,7 @@ }, { "name": "evaluation", + "description": "Condition evaluated against the query result, and who is notified when it is met.", "required": true, "is_request_body_field": true, "entity": { @@ -92905,6 +93163,7 @@ }, { "name": "schedule", + "description": "Schedule on which the alert runs its query and evaluates the condition.", "required": true, "is_request_body_field": true, "entity": { @@ -92943,6 +93202,7 @@ }, { "name": "evaluation", + "description": "Condition evaluated against the query result, and who is notified when it is met.", "required": true, "is_request_body_field": true, "entity": { @@ -92952,6 +93212,7 @@ }, { "name": "schedule", + "description": "Schedule on which the alert runs its query and evaluates the condition.", "required": true, "is_request_body_field": true, "entity": { @@ -93000,6 +93261,7 @@ }, { "name": "evaluation", + "description": "Condition evaluated against the query result, and who is notified when it is met.", "required": true, "is_request_body_field": true, "entity": { @@ -93009,6 +93271,7 @@ }, { "name": "schedule", + "description": "Schedule on which the alert runs its query and evaluates the condition.", "required": true, "is_request_body_field": true, "entity": { @@ -93047,6 +93310,7 @@ }, { "name": "evaluation", + "description": "Condition evaluated against the query result, and who is notified when it is met.", "required": true, "is_request_body_field": true, "entity": { @@ -93056,6 +93320,7 @@ }, { "name": "schedule", + "description": "Schedule on which the alert runs its query and evaluates the condition.", "required": true, "is_request_body_field": true, "entity": { @@ -93078,7 +93343,7 @@ }, { "name": "update_mask", - "description": "The field mask must be a single string, with multiple fields separated by commas (no spaces). The field path is relative to the resource object, using a dot (`.`) to navigate sub-fields (e.g., `author.given_name`). Specification of elements in sequence or map fields is not allowed, as only the entire collection field can be specified. Field names must exactly match the resource field names.\n\nA field mask of `*` indicates full replacement. It’s recommended to always explicitly list the fields being updated and avoid using `*` wildcards, as it can lead to unintended results if the API changes in the future.", + "description": "Comma-separated list of the alert fields to update, for example `display_name,query_text` or `schedule.pause_status`.\nOnly the listed fields are changed; all other fields keep their current values. `parent_path` cannot be updated.", "required": true, "is_query": true, "entity": { @@ -93096,7 +93361,7 @@ }, { "name": "custom_description", - "description": "Custom description for the alert. Interpreted according to `custom_template_format`.", + "description": "Custom description for the alert, used as the notification body. Interpreted according to `custom_template_format`.\nThe available template variables are listed at https://docs.databricks.com/aws/en/sql/user/alerts/create#notification-templates.", "is_request_body_field": true, "entity": { "is_string": true @@ -93104,7 +93369,7 @@ }, { "name": "custom_summary", - "description": "Custom summary for the alert. Interpreted according to `custom_template_format`.", + "description": "Custom summary for the alert, used as the notification subject. Interpreted according to `custom_template_format`.", "is_request_body_field": true, "entity": { "is_string": true @@ -93148,6 +93413,7 @@ }, { "name": "evaluation", + "description": "Condition evaluated against the query result, and who is notified when it is met.", "required": true, "is_request_body_field": true, "entity": { @@ -93166,7 +93432,7 @@ }, { "name": "lifecycle_state", - "description": "Indicates whether the query is trashed.", + "description": "Indicates whether the alert is active (`ACTIVE`) or has been moved to the trash (`DELETED`).", "is_output_only": true, "is_request_body_field": true, "entity": { @@ -93231,7 +93497,7 @@ }, { "name": "run_as_user_name", - "description": "The run as username or application ID of service principal.\nOn Create and Update, this field can be set to application ID of an active service principal. Setting this field requires the servicePrincipal/user role.\nDeprecated: Use `run_as` field instead. This field will be removed in a future release.", + "description": "Deprecated: Use `run_as` field instead. This field will be removed in a future release.\nThe run as username or application ID of service principal.\nOn Create and Update, this field can be set to application ID of an active service principal. Setting this field requires the servicePrincipal/user role.", "is_request_body_field": true, "entity": { "is_string": true @@ -93239,6 +93505,7 @@ }, { "name": "schedule", + "description": "Schedule on which the alert runs its query and evaluates the condition.", "required": true, "is_request_body_field": true, "entity": { @@ -93278,7 +93545,7 @@ }, { "name": "update_mask", - "description": "The field mask must be a single string, with multiple fields separated by commas (no spaces). The field path is relative to the resource object, using a dot (`.`) to navigate sub-fields (e.g., `author.given_name`). Specification of elements in sequence or map fields is not allowed, as only the entire collection field can be specified. Field names must exactly match the resource field names.\n\nA field mask of `*` indicates full replacement. It’s recommended to always explicitly list the fields being updated and avoid using `*` wildcards, as it can lead to unintended results if the API changes in the future.", + "description": "Comma-separated list of the alert fields to update, for example `display_name,query_text` or `schedule.pause_status`.\nOnly the listed fields are changed; all other fields keep their current values. `parent_path` cannot be updated.", "required": true, "is_query": true, "entity": { @@ -93314,6 +93581,7 @@ }, { "name": "evaluation", + "description": "Condition evaluated against the query result, and who is notified when it is met.", "required": true, "is_request_body_field": true, "entity": { @@ -93323,6 +93591,7 @@ }, { "name": "schedule", + "description": "Schedule on which the alert runs its query and evaluates the condition.", "required": true, "is_request_body_field": true, "entity": { @@ -93619,6 +93888,20 @@ "is_string": true } }, + { + "name": "effective_resources", + "description": "Resources added to the app, plus the resources it inherits from its space.\nEmpty for apps that are not in a space.", + "is_computed": true, + "is_output_only": true, + "is_request_body_field": true, + "entity": { + "pascal_name": "AppResourceList", + "array_value": { + "pascal_name": "AppResource", + "is_object": true + } + } + }, { "name": "effective_usage_policy_id", "is_computed": true, @@ -96112,6 +96395,20 @@ "is_string": true } }, + { + "name": "effective_resources", + "description": "Resources added to the app, plus the resources it inherits from its space.\nEmpty for apps that are not in a space.", + "is_computed": true, + "is_output_only": true, + "is_request_body_field": true, + "entity": { + "pascal_name": "AppResourceList", + "array_value": { + "pascal_name": "AppResource", + "is_object": true + } + } + }, { "name": "effective_usage_policy_id", "is_computed": true, @@ -98490,6 +98787,323 @@ } ] }, + { + "id": "iam.AssumeGroup", + "name": "AssumeGroup", + "description": "Manage the workspace's restricted sharing groups.", + "package": { + "name": "iam" + }, + "is_hidden_cli": true, + "docs_group": "iam", + "launch_stage": "PRIVATE_PREVIEW", + "cli_launch_stage_display": "Private Preview", + "methods": [ + { + "name": "CreateRestrictedSharingGroup", + "description": "Adds a group to the workspace's restricted list. The workspace allows at\nmost 100 restricted sharing groups. Requires workspace admin.", + "summary": "Create a restricted sharing group.", + "path": "/api/2.0/access-control/restricted-sharing-groups", + "can_use_json": true, + "is_hidden_cli": true, + "has_required_positional_arguments": true, + "launch_stage": "PRIVATE_PREVIEW", + "cli_launch_stage_display": "Private Preview", + "request": { + "pascal_name": "CreateRestrictedSharingGroupRequest", + "is_object": true, + "has_required_request_body_fields": true, + "required_fields": [ + { + "name": "restricted_sharing_group", + "description": "The restricted sharing group to create. It has no client-set fields; the\ngroup is identified by restricted_sharing_group_id.", + "required": true, + "is_request_body_field": true, + "entity": { + "pascal_name": "RestrictedSharingGroup", + "is_object": true + } + }, + { + "name": "restricted_sharing_group_id", + "description": "The id of the workspace group to restrict: the numeric id of an existing and\nnon-system workspace group.", + "required": true, + "is_query": true, + "entity": { + "is_string": true + } + } + ], + "required_in_url_fields": [ + { + "name": "restricted_sharing_group_id", + "description": "The id of the workspace group to restrict: the numeric id of an existing and\nnon-system workspace group.", + "required": true, + "is_query": true, + "entity": { + "is_string": true + } + } + ], + "required_request_body_fields": [ + { + "name": "restricted_sharing_group", + "description": "The restricted sharing group to create. It has no client-set fields; the\ngroup is identified by restricted_sharing_group_id.", + "required": true, + "is_request_body_field": true, + "entity": { + "pascal_name": "RestrictedSharingGroup", + "is_object": true + } + } + ] + }, + "request_body_field": { + "name": "restricted_sharing_group", + "description": "The restricted sharing group to create. It has no client-set fields; the\ngroup is identified by restricted_sharing_group_id.", + "required": true, + "is_request_body_field": true, + "entity": { + "pascal_name": "RestrictedSharingGroup", + "is_object": true + } + }, + "response": { + "pascal_name": "RestrictedSharingGroup", + "is_object": true + }, + "all_fields": [ + { + "name": "restricted_sharing_group", + "description": "The restricted sharing group to create. It has no client-set fields; the\ngroup is identified by restricted_sharing_group_id.", + "required": true, + "is_request_body_field": true, + "entity": { + "pascal_name": "RestrictedSharingGroup", + "is_object": true + } + }, + { + "name": "restricted_sharing_group_id", + "description": "The id of the workspace group to restrict: the numeric id of an existing and\nnon-system workspace group.", + "required": true, + "is_query": true, + "entity": { + "is_string": true + } + }, + { + "name": "group_display_name", + "description": "The display name of the restricted workspace group.", + "is_output_only": true, + "is_request_body_field": true, + "entity": { + "is_string": true + } + }, + { + "name": "name", + "description": "The resource name of the restricted sharing group.\nFormat: `restricted-sharing-groups/{restricted_sharing_group_id}`\nExample: `restricted-sharing-groups/123`", + "is_request_body_field": true, + "entity": { + "is_string": true + } + }, + { + "name": "restricted_sharing_group_id", + "description": "The id of the restricted workspace group: the numeric id of an existing and\nnon-system workspace group.", + "is_output_only": true, + "is_request_body_field": true, + "entity": { + "is_string": true + } + } + ], + "required_positional_arguments": [ + { + "name": "restricted_sharing_group_id", + "description": "The id of the workspace group to restrict: the numeric id of an existing and\nnon-system workspace group.", + "required": true, + "is_query": true, + "entity": { + "is_string": true + } + } + ] + }, + { + "name": "DeleteRestrictedSharingGroup", + "description": "Removes a group from the workspace's restricted list. Requires workspace\nadmin.", + "summary": "Delete a restricted sharing group.", + "path": "/api/2.0/access-control/{name=restricted-sharing-groups/*}", + "is_hidden_cli": true, + "has_required_positional_arguments": true, + "launch_stage": "PRIVATE_PREVIEW", + "cli_launch_stage_display": "Private Preview", + "request": { + "pascal_name": "DeleteRestrictedSharingGroupRequest", + "is_object": true, + "required_fields": [ + { + "name": "name", + "description": "The name of the restricted sharing group to delete.\nFormat: `restricted-sharing-groups/{restricted_sharing_group_id}`", + "required": true, + "is_path": true, + "entity": { + "is_string": true + } + } + ], + "required_in_url_fields": [ + { + "name": "name", + "description": "The name of the restricted sharing group to delete.\nFormat: `restricted-sharing-groups/{restricted_sharing_group_id}`", + "required": true, + "is_path": true, + "entity": { + "is_string": true + } + } + ] + }, + "response": { + "is_empty_response": true + }, + "all_fields": [ + { + "name": "name", + "description": "The name of the restricted sharing group to delete.\nFormat: `restricted-sharing-groups/{restricted_sharing_group_id}`", + "required": true, + "is_path": true, + "entity": { + "is_string": true + } + } + ], + "required_positional_arguments": [ + { + "name": "name", + "description": "The name of the restricted sharing group to delete.\nFormat: `restricted-sharing-groups/{restricted_sharing_group_id}`", + "required": true, + "is_path": true, + "entity": { + "is_string": true + } + } + ] + }, + { + "name": "GetRestrictedSharingGroup", + "description": "Gets a restricted sharing group in the workspace. Use it to check whether\na group is on the workspace's restricted list. Requires workspace admin.", + "summary": "Get a restricted sharing group.", + "path": "/api/2.0/access-control/{name=restricted-sharing-groups/*}", + "is_hidden_cli": true, + "has_required_positional_arguments": true, + "launch_stage": "PRIVATE_PREVIEW", + "cli_launch_stage_display": "Private Preview", + "request": { + "pascal_name": "GetRestrictedSharingGroupRequest", + "is_object": true, + "required_fields": [ + { + "name": "name", + "description": "The name of the restricted sharing group to get.\nFormat: `restricted-sharing-groups/{restricted_sharing_group_id}`", + "required": true, + "is_path": true, + "entity": { + "is_string": true + } + } + ], + "required_in_url_fields": [ + { + "name": "name", + "description": "The name of the restricted sharing group to get.\nFormat: `restricted-sharing-groups/{restricted_sharing_group_id}`", + "required": true, + "is_path": true, + "entity": { + "is_string": true + } + } + ] + }, + "response": { + "pascal_name": "RestrictedSharingGroup", + "is_object": true + }, + "all_fields": [ + { + "name": "name", + "description": "The name of the restricted sharing group to get.\nFormat: `restricted-sharing-groups/{restricted_sharing_group_id}`", + "required": true, + "is_path": true, + "entity": { + "is_string": true + } + } + ], + "required_positional_arguments": [ + { + "name": "name", + "description": "The name of the restricted sharing group to get.\nFormat: `restricted-sharing-groups/{restricted_sharing_group_id}`", + "required": true, + "is_path": true, + "entity": { + "is_string": true + } + } + ] + }, + { + "name": "ListRestrictedSharingGroups", + "description": "Lists the restricted sharing groups in the workspace. Requires workspace\nadmin.", + "summary": "List restricted sharing groups.", + "path": "/api/2.0/access-control/restricted-sharing-groups", + "is_hidden_cli": true, + "has_required_positional_arguments": true, + "launch_stage": "PRIVATE_PREVIEW", + "cli_launch_stage_display": "Private Preview", + "request": { + "pascal_name": "ListRestrictedSharingGroupsRequest", + "is_object": true + }, + "response": { + "pascal_name": "ListRestrictedSharingGroupsResponse", + "is_object": true + }, + "all_fields": [ + { + "name": "page_size", + "description": "The maximum number of groups to return. The service may return fewer.\nIf unspecified or 0, at most 100 groups are returned. Values above 100 are\ncoerced to 100. Negative values are rejected.", + "is_query": true, + "entity": { + "is_int": true + } + }, + { + "name": "page_token", + "description": "A page token from a previous ListRestrictedSharingGroups call. Provide\nthis to retrieve the subsequent page.", + "is_query": true, + "entity": { + "is_string": true + } + } + ], + "pagination": { + "token": { + "poll_field": { + "name": "page_token", + "description": "A page token from a previous ListRestrictedSharingGroups call. Provide\nthis to retrieve the subsequent page.", + "is_query": true, + "entity": { + "is_string": true + } + } + } + } + } + ] + }, { "id": "settings.AutomaticClusterUpdate", "name": "AutomaticClusterUpdate", @@ -144123,7 +144737,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 +144749,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 +144761,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 +144776,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 +145066,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 +148855,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": { @@ -178318,7 +178930,7 @@ }, { "name": "batch", - "description": "Batch SQL rule input.", + "description": "Scheduled detection (also known as batch detection) input.", "is_request_body_field": true, "is_optional_object": true, "entity": { @@ -178345,7 +178957,7 @@ }, { "name": "compute_workspace_id", - "description": "ID of the workspace whose compute runs this rule's jobs and owns its\nassociated resources, such as the SQL warehouse a scheduled rule runs on.\nServer-assigned; a rule's warehouse can only be changed from this workspace.", + "description": "ID of the workspace whose compute runs this rule's jobs and owns its\nassociated resources, such as the SQL warehouse a scheduled detection runs on.\nServer-assigned; a rule's warehouse can only be changed from this workspace.", "is_output_only": true, "is_request_body_field": true, "entity": { @@ -178583,7 +179195,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 @@ -178639,7 +179251,7 @@ }, { "name": "timerange", - "description": "Time-range configuration for batch rules. If unset, the execution time range is extended by\na fixed `15m` lookback.", + "description": "Time-range configuration for scheduled detections. If unset, the execution time range is\nextended by a fixed `15m` lookback.", "is_request_body_field": true, "is_optional_object": true, "entity": { @@ -180095,22 +180707,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.", @@ -181724,7 +182320,7 @@ }, { "name": "batch", - "description": "Batch SQL rule input.", + "description": "Scheduled detection (also known as batch detection) input.", "is_request_body_field": true, "is_optional_object": true, "entity": { @@ -181751,7 +182347,7 @@ }, { "name": "compute_workspace_id", - "description": "ID of the workspace whose compute runs this rule's jobs and owns its\nassociated resources, such as the SQL warehouse a scheduled rule runs on.\nServer-assigned; a rule's warehouse can only be changed from this workspace.", + "description": "ID of the workspace whose compute runs this rule's jobs and owns its\nassociated resources, such as the SQL warehouse a scheduled detection runs on.\nServer-assigned; a rule's warehouse can only be changed from this workspace.", "is_output_only": true, "is_request_body_field": true, "entity": { @@ -181989,7 +182585,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 @@ -182045,7 +182641,7 @@ }, { "name": "timerange", - "description": "Time-range configuration for batch rules. If unset, the execution time range is extended by\na fixed `15m` lookback.", + "description": "Time-range configuration for scheduled detections. If unset, the execution time range is\nextended by a fixed `15m` lookback.", "is_request_body_field": true, "is_optional_object": true, "entity": { @@ -201559,7 +202155,7 @@ }, { "name": "database_id", - "description": "The ID to use for the Database, which will become the final component of\nthe database's resource name.\nThis ID becomes the database name in postgres.\n\nThis value should be 4-63 characters, and only use characters available in DNS names,\nas defined by RFC-1123\n\nIf database_id is not specified in the request, it is generated automatically.", + "description": "The ID used to identify and manage the Database resource through the API.\nThe Postgres database name is specified in `spec.postgres_database`.\n\nThis value should be 4-63 characters, and only use characters available in DNS names,\nas defined by RFC-1123\n\nIf database_id is not specified in the request, it is generated automatically.", "is_query": true, "entity": { "is_string": true @@ -202697,7 +203293,7 @@ }, { "name": "role_id", - "description": "The ID to use for the Role, which will become the final component of\nthe role's resource name.\nThis ID becomes the role in Postgres.\n\nThis value should be 4-63 characters, and valid characters\nare lowercase letters, numbers, and hyphens, as defined by RFC 1123.\n\nIf role_id is not specified in the request, it is generated automatically.", + "description": "The ID used to identify and manage the Role resource through the API.\nThe Postgres role name is specified in `spec.postgres_role`.\n\nThis value should be 4-63 characters, and valid characters\nare lowercase letters, numbers, and hyphens, as defined by RFC 1123.\n\nIf role_id is not specified in the request, it is generated automatically.", "is_query": true, "entity": { "is_string": true @@ -203566,7 +204162,7 @@ "required_fields": [ { "name": "name", - "description": "The full resource path of the endpoint to delete.\nFormat: projects/{project_id}/branches/{branch_id}/endpoints/{endpoint_id}", + "description": "The full resource path of the endpoint to delete.\nFormat: projects/{project_id}/branches/{branch_id}/endpoints/{endpoint_id}\n\nRead-write endpoints currently cannot be deleted directly. Their deletion is managed by the\nparent branch. To avoid compute costs, set `disabled` to `true` on the endpoint.", "required": true, "is_path": true, "entity": { @@ -203577,7 +204173,7 @@ "required_in_url_fields": [ { "name": "name", - "description": "The full resource path of the endpoint to delete.\nFormat: projects/{project_id}/branches/{branch_id}/endpoints/{endpoint_id}", + "description": "The full resource path of the endpoint to delete.\nFormat: projects/{project_id}/branches/{branch_id}/endpoints/{endpoint_id}\n\nRead-write endpoints currently cannot be deleted directly. Their deletion is managed by the\nparent branch. To avoid compute costs, set `disabled` to `true` on the endpoint.", "required": true, "is_path": true, "entity": { @@ -203593,7 +204189,7 @@ "all_fields": [ { "name": "name", - "description": "The full resource path of the endpoint to delete.\nFormat: projects/{project_id}/branches/{branch_id}/endpoints/{endpoint_id}", + "description": "The full resource path of the endpoint to delete.\nFormat: projects/{project_id}/branches/{branch_id}/endpoints/{endpoint_id}\n\nRead-write endpoints currently cannot be deleted directly. Their deletion is managed by the\nparent branch. To avoid compute costs, set `disabled` to `true` on the endpoint.", "required": true, "is_path": true, "entity": { @@ -203604,7 +204200,7 @@ "required_positional_arguments": [ { "name": "name", - "description": "The full resource path of the endpoint to delete.\nFormat: projects/{project_id}/branches/{branch_id}/endpoints/{endpoint_id}", + "description": "The full resource path of the endpoint to delete.\nFormat: projects/{project_id}/branches/{branch_id}/endpoints/{endpoint_id}\n\nRead-write endpoints currently cannot be deleted directly. Their deletion is managed by the\nparent branch. To avoid compute costs, set `disabled` to `true` on the endpoint.", "required": true, "is_path": true, "entity": { @@ -220863,7 +221459,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, @@ -228433,6 +229029,7 @@ }, { "name": "description", + "description": "The description of the serving endpoint.", "is_request_body_field": true, "entity": { "is_string": true @@ -228693,6 +229290,7 @@ "required_fields": [ { "name": "name", + "description": "The name of the serving endpoint to delete.", "required": true, "is_path": true, "entity": { @@ -228703,6 +229301,7 @@ "required_in_url_fields": [ { "name": "name", + "description": "The name of the serving endpoint to delete.", "required": true, "is_path": true, "entity": { @@ -228717,6 +229316,7 @@ "all_fields": [ { "name": "name", + "description": "The name of the serving endpoint to delete.", "required": true, "is_path": true, "entity": { @@ -228727,6 +229327,7 @@ "required_positional_arguments": [ { "name": "name", + "description": "The name of the serving endpoint to delete.", "required": true, "is_path": true, "entity": { @@ -230353,6 +230954,7 @@ }, { "name": "config", + "description": "The core config of the serving endpoint.", "required": true, "is_request_body_field": true, "entity": { @@ -230375,6 +230977,7 @@ "required_request_body_fields": [ { "name": "config", + "description": "The core config of the serving endpoint.", "required": true, "is_request_body_field": true, "entity": { @@ -230391,6 +230994,7 @@ "all_fields": [ { "name": "config", + "description": "The core config of the serving endpoint.", "required": true, "is_request_body_field": true, "entity": { diff --git a/.gitattributes b/.gitattributes index 0c7524ce9b5..ac5f2161603 100644 --- a/.gitattributes +++ b/.gitattributes @@ -58,6 +58,7 @@ cmd/workspace/alerts/alerts.go linguist-generated=true cmd/workspace/apps-settings/apps-settings.go linguist-generated=true cmd/workspace/apps/apps.go linguist-generated=true cmd/workspace/artifact-allowlists/artifact-allowlists.go linguist-generated=true +cmd/workspace/assume-group/assume-group.go linguist-generated=true cmd/workspace/automatic-cluster-update/automatic-cluster-update.go linguist-generated=true cmd/workspace/bundle-deployments/bundle-deployments.go linguist-generated=true cmd/workspace/catalogs/catalogs.go linguist-generated=true diff --git a/.nextchanges/dependency-updates/go-sdk-v0.199.0.md b/.nextchanges/dependency-updates/go-sdk-v0.199.0.md new file mode 100644 index 00000000000..48599f33a5e --- /dev/null +++ b/.nextchanges/dependency-updates/go-sdk-v0.199.0.md @@ -0,0 +1 @@ +* Update the Go SDK to [v0.199.0](https://github.com/databricks/databricks-sdk-go/releases/tag/v0.199.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..5e86372ab90 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-7a0c804e-cae7-733a-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/refschema/output/apps.txt b/acceptance/bundle/refschema/output/apps.txt index 3e1f91151f1..706f2231c3a 100644 --- a/acceptance/bundle/refschema/output/apps.txt +++ b/acceptance/bundle/refschema/output/apps.txt @@ -67,6 +67,46 @@ resources.apps.*.default_git_source.tag string ALL resources.apps.*.default_source_code_path string ALL resources.apps.*.description string ALL resources.apps.*.effective_budget_policy_id string ALL +resources.apps.*.effective_resources []apps.AppResource ALL +resources.apps.*.effective_resources[*] apps.AppResource ALL +resources.apps.*.effective_resources[*].app *apps.AppResourceApp ALL +resources.apps.*.effective_resources[*].app.name string ALL +resources.apps.*.effective_resources[*].app.permission apps.AppResourceAppAppPermission ALL +resources.apps.*.effective_resources[*].database *apps.AppResourceDatabase ALL +resources.apps.*.effective_resources[*].database.database_name string ALL +resources.apps.*.effective_resources[*].database.instance_name string ALL +resources.apps.*.effective_resources[*].database.permission apps.AppResourceDatabaseDatabasePermission ALL +resources.apps.*.effective_resources[*].description string ALL +resources.apps.*.effective_resources[*].experiment *apps.AppResourceExperiment ALL +resources.apps.*.effective_resources[*].experiment.experiment_id string ALL +resources.apps.*.effective_resources[*].experiment.permission apps.AppResourceExperimentExperimentPermission ALL +resources.apps.*.effective_resources[*].genie_space *apps.AppResourceGenieSpace ALL +resources.apps.*.effective_resources[*].genie_space.name string ALL +resources.apps.*.effective_resources[*].genie_space.permission apps.AppResourceGenieSpaceGenieSpacePermission ALL +resources.apps.*.effective_resources[*].genie_space.space_id string ALL +resources.apps.*.effective_resources[*].job *apps.AppResourceJob ALL +resources.apps.*.effective_resources[*].job.id string ALL +resources.apps.*.effective_resources[*].job.permission apps.AppResourceJobJobPermission ALL +resources.apps.*.effective_resources[*].name string ALL +resources.apps.*.effective_resources[*].postgres *apps.AppResourcePostgres ALL +resources.apps.*.effective_resources[*].postgres.branch string ALL +resources.apps.*.effective_resources[*].postgres.database string ALL +resources.apps.*.effective_resources[*].postgres.permission apps.AppResourcePostgresPostgresPermission ALL +resources.apps.*.effective_resources[*].secret *apps.AppResourceSecret ALL +resources.apps.*.effective_resources[*].secret.key string ALL +resources.apps.*.effective_resources[*].secret.permission apps.AppResourceSecretSecretPermission ALL +resources.apps.*.effective_resources[*].secret.scope string ALL +resources.apps.*.effective_resources[*].serving_endpoint *apps.AppResourceServingEndpoint ALL +resources.apps.*.effective_resources[*].serving_endpoint.name string ALL +resources.apps.*.effective_resources[*].serving_endpoint.permission apps.AppResourceServingEndpointServingEndpointPermission ALL +resources.apps.*.effective_resources[*].sql_warehouse *apps.AppResourceSqlWarehouse ALL +resources.apps.*.effective_resources[*].sql_warehouse.id string ALL +resources.apps.*.effective_resources[*].sql_warehouse.permission apps.AppResourceSqlWarehouseSqlWarehousePermission ALL +resources.apps.*.effective_resources[*].uc_securable *apps.AppResourceUcSecurable ALL +resources.apps.*.effective_resources[*].uc_securable.permission apps.AppResourceUcSecurableUcSecurablePermission ALL +resources.apps.*.effective_resources[*].uc_securable.securable_full_name string ALL +resources.apps.*.effective_resources[*].uc_securable.securable_kind string ALL +resources.apps.*.effective_resources[*].uc_securable.securable_type apps.AppResourceUcSecurableUcSecurableType ALL resources.apps.*.effective_usage_policy_id string ALL resources.apps.*.effective_user_api_scopes []string ALL resources.apps.*.effective_user_api_scopes[*] string ALL 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..b0edefae5f6 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 @@ -1,4 +1,42 @@ +{ + "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": "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]/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..15901d1c2df 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/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": "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": "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/apps.generated.yml b/bundle/direct/dresources/configs/apps.generated.yml index 5e204b2a15f..3564a41a1d1 100644 --- a/bundle/direct/dresources/configs/apps.generated.yml +++ b/bundle/direct/dresources/configs/apps.generated.yml @@ -24,6 +24,32 @@ ignore_remote_changes: reason: spec:output_only - field: effective_budget_policy_id reason: spec:output_only + - field: effective_resources + reason: spec:output_only + - field: effective_resources[*].app + reason: spec:output_only + - field: effective_resources[*].database + reason: spec:output_only + - field: effective_resources[*].description + reason: spec:output_only + - field: effective_resources[*].experiment + reason: spec:output_only + - field: effective_resources[*].genie_space + reason: spec:output_only + - field: effective_resources[*].job + reason: spec:output_only + - field: effective_resources[*].name + reason: spec:output_only + - field: effective_resources[*].postgres + reason: spec:output_only + - field: effective_resources[*].secret + reason: spec:output_only + - field: effective_resources[*].serving_endpoint + reason: spec:output_only + - field: effective_resources[*].sql_warehouse + reason: spec:output_only + - field: effective_resources[*].uc_securable + reason: spec:output_only - field: effective_usage_policy_id reason: spec:output_only - field: effective_user_api_scopes 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/internal/schema/annotations.yml b/bundle/internal/schema/annotations.yml index 230a7459dd7..db3cc5585e3 100644 --- a/bundle/internal/schema/annotations.yml +++ b/bundle/internal/schema/annotations.yml @@ -260,48 +260,6 @@ resources: "description": |- PLACEHOLDER "$fields": - "evaluation": - "description": |- - PLACEHOLDER - "$fields": - "notification": - "$fields": - "subscriptions": - "description": |- - PLACEHOLDER - "$fields": - "destination_id": - "description": |- - PLACEHOLDER - "user_email": - "description": |- - PLACEHOLDER - "source": - "$fields": - "display": - "description": |- - PLACEHOLDER - "name": - "description": |- - PLACEHOLDER - "threshold": - "$fields": - "column": - "description": |- - PLACEHOLDER - "value": - "description": |- - PLACEHOLDER - "$fields": - "bool_value": - "description": |- - PLACEHOLDER - "double_value": - "description": |- - PLACEHOLDER - "string_value": - "description": |- - PLACEHOLDER "file_path": "description": |- PLACEHOLDER @@ -325,9 +283,6 @@ resources: - level: CAN_RUN service_principal_name: 123456-abcdef ``` - "schedule": - "description": |- - PLACEHOLDER "apps": "description": |- The app resource defines a Databricks app. @@ -369,54 +324,7 @@ resources: "effective_budget_policy_id": "description": |- PLACEHOLDER - "effective_usage_policy_id": - "description": |- - PLACEHOLDER - "git_source": - "description": |- - Git source configuration for app deployments. Specifies which git reference (branch, tag, or commit) - to use when deploying the app. Used in conjunction with git_repository to deploy code directly from git. - The source_code_path within git_source specifies the relative path to the app code within the repository. - "lifecycle": - "description": |- - Settings that control the deployment lifecycle of the resource, such as preventing it from being destroyed. - "oauth2_app_client_id": - "description": |- - PLACEHOLDER - "oauth2_app_integration_id": - "description": |- - PLACEHOLDER - "permissions": - "description": |- - The permissions to apply to this resource. - "markdown_description": |- - A Sequence of permissions to apply to this resource, where each item grants a permission `level` to a single `user_name`, `group_name`, or `service_principal_name`. A principal cannot be set in both a resource's `permissions` and the top-level `permissions` mapping. - - See [\_](/dev-tools/bundles/settings.md#permissions) and [\_](/dev-tools/bundles/permissions.md). - "markdown_examples": |- - ```yaml - permissions: - - level: CAN_VIEW - group_name: test-group - - level: CAN_MANAGE - user_name: someone@example.com - - level: CAN_RUN - service_principal_name: 123456-abcdef - ``` - "$fields": - "group_name": - "description": |- - The name of the group granted the permission level. - "level": - "description": |- - The permission level to apply. The allowed levels depend on the resource type. - "service_principal_name": - "description": |- - The name of the service principal granted the permission level. - "user_name": - "description": |- - The name of the user granted the permission level. - "resources": + "effective_resources": "$fields": "app": "description": |- @@ -502,6 +410,53 @@ resources: "securable_type": "description": |- PLACEHOLDER + "effective_usage_policy_id": + "description": |- + PLACEHOLDER + "git_source": + "description": |- + Git source configuration for app deployments. Specifies which git reference (branch, tag, or commit) + to use when deploying the app. Used in conjunction with git_repository to deploy code directly from git. + The source_code_path within git_source specifies the relative path to the app code within the repository. + "lifecycle": + "description": |- + Settings that control the deployment lifecycle of the resource, such as preventing it from being destroyed. + "oauth2_app_client_id": + "description": |- + PLACEHOLDER + "oauth2_app_integration_id": + "description": |- + PLACEHOLDER + "permissions": + "description": |- + The permissions to apply to this resource. + "markdown_description": |- + A Sequence of permissions to apply to this resource, where each item grants a permission `level` to a single `user_name`, `group_name`, or `service_principal_name`. A principal cannot be set in both a resource's `permissions` and the top-level `permissions` mapping. + + See [\_](/dev-tools/bundles/settings.md#permissions) and [\_](/dev-tools/bundles/permissions.md). + "markdown_examples": |- + ```yaml + permissions: + - level: CAN_VIEW + group_name: test-group + - level: CAN_MANAGE + user_name: someone@example.com + - level: CAN_RUN + service_principal_name: 123456-abcdef + ``` + "$fields": + "group_name": + "description": |- + The name of the group granted the permission level. + "level": + "description": |- + The permission level to apply. The allowed levels depend on the resource type. + "service_principal_name": + "description": |- + The name of the service principal granted the permission level. + "user_name": + "description": |- + The name of the user granted the permission level. "service_principal_client_id": "description": |- PLACEHOLDER @@ -1435,31 +1390,6 @@ resources: value: "data science" ``` "$fields": - "config": - "$fields": - "served_entities": - "$fields": - "entity_version": - "description": |- - PLACEHOLDER - "served_models": - "$fields": - "model_name": - "description": |- - PLACEHOLDER - "model_version": - "description": |- - PLACEHOLDER - "traffic_config": - "$fields": - "routes": - "$fields": - "served_entity_name": - "description": |- - PLACEHOLDER - "description": - "description": |- - PLACEHOLDER "lifecycle": "description": |- Settings that control the deployment lifecycle of the resource, such as preventing it from being destroyed. diff --git a/bundle/internal/validation/generated/enum_fields.go b/bundle/internal/validation/generated/enum_fields.go index c2b7a092791..879c5f475d7 100644 --- a/bundle/internal/validation/generated/enum_fields.go +++ b/bundle/internal/validation/generated/enum_fields.go @@ -20,25 +20,36 @@ var EnumFields = map[string][]string{ "resources.alerts.*.permissions[*].level": {"CAN_ATTACH_TO", "CAN_BIND", "CAN_CREATE", "CAN_CREATE_APP", "CAN_EDIT", "CAN_EDIT_METADATA", "CAN_MANAGE", "CAN_MANAGE_PRODUCTION_VERSIONS", "CAN_MANAGE_RUN", "CAN_MANAGE_STAGING_VERSIONS", "CAN_MONITOR", "CAN_MONITOR_ONLY", "CAN_QUERY", "CAN_READ", "CAN_RESTART", "CAN_RUN", "CAN_USE", "CAN_VIEW", "CAN_VIEW_METADATA", "IS_OWNER"}, "resources.alerts.*.schedule.pause_status": {"PAUSED", "UNPAUSED"}, - "resources.apps.*.active_deployment.mode": {"AUTO_SYNC", "SNAPSHOT"}, - "resources.apps.*.active_deployment.status.state": {"CANCELLED", "FAILED", "IN_PROGRESS", "SUCCEEDED"}, - "resources.apps.*.app_status.state": {"CRASHED", "DEPLOYING", "RUNNING", "UNAVAILABLE"}, - "resources.apps.*.compute_size": {"LARGE", "MEDIUM", "XLARGE"}, - "resources.apps.*.compute_status.state": {"ACTIVE", "DELETING", "ERROR", "STARTING", "STOPPED", "STOPPING", "UPDATING"}, - "resources.apps.*.pending_deployment.mode": {"AUTO_SYNC", "SNAPSHOT"}, - "resources.apps.*.pending_deployment.status.state": {"CANCELLED", "FAILED", "IN_PROGRESS", "SUCCEEDED"}, - "resources.apps.*.permissions[*].level": {"CAN_MANAGE", "CAN_USE"}, - "resources.apps.*.resources[*].app.permission": {"CAN_USE"}, - "resources.apps.*.resources[*].database.permission": {"CAN_CONNECT_AND_CREATE"}, - "resources.apps.*.resources[*].experiment.permission": {"CAN_EDIT", "CAN_MANAGE", "CAN_READ"}, - "resources.apps.*.resources[*].genie_space.permission": {"CAN_EDIT", "CAN_MANAGE", "CAN_RUN", "CAN_VIEW"}, - "resources.apps.*.resources[*].job.permission": {"CAN_MANAGE", "CAN_MANAGE_RUN", "CAN_VIEW", "IS_OWNER"}, - "resources.apps.*.resources[*].postgres.permission": {"CAN_CONNECT_AND_CREATE"}, - "resources.apps.*.resources[*].secret.permission": {"MANAGE", "READ", "WRITE"}, - "resources.apps.*.resources[*].serving_endpoint.permission": {"CAN_MANAGE", "CAN_QUERY", "CAN_VIEW"}, - "resources.apps.*.resources[*].sql_warehouse.permission": {"CAN_MANAGE", "CAN_USE", "IS_OWNER"}, - "resources.apps.*.resources[*].uc_securable.permission": {"EXECUTE", "MODIFY", "READ_VOLUME", "SELECT", "USE_CONNECTION", "WRITE_VOLUME"}, - "resources.apps.*.resources[*].uc_securable.securable_type": {"CONNECTION", "FUNCTION", "MODEL_SERVICE", "TABLE", "VOLUME"}, + "resources.apps.*.active_deployment.mode": {"AUTO_SYNC", "SNAPSHOT"}, + "resources.apps.*.active_deployment.status.state": {"CANCELLED", "FAILED", "IN_PROGRESS", "SUCCEEDED"}, + "resources.apps.*.app_status.state": {"CRASHED", "DEPLOYING", "RUNNING", "UNAVAILABLE"}, + "resources.apps.*.compute_size": {"LARGE", "MEDIUM", "XLARGE"}, + "resources.apps.*.compute_status.state": {"ACTIVE", "DELETING", "ERROR", "STARTING", "STOPPED", "STOPPING", "UPDATING"}, + "resources.apps.*.effective_resources[*].app.permission": {"CAN_USE"}, + "resources.apps.*.effective_resources[*].database.permission": {"CAN_CONNECT_AND_CREATE"}, + "resources.apps.*.effective_resources[*].experiment.permission": {"CAN_EDIT", "CAN_MANAGE", "CAN_READ"}, + "resources.apps.*.effective_resources[*].genie_space.permission": {"CAN_EDIT", "CAN_MANAGE", "CAN_RUN", "CAN_VIEW"}, + "resources.apps.*.effective_resources[*].job.permission": {"CAN_MANAGE", "CAN_MANAGE_RUN", "CAN_VIEW", "IS_OWNER"}, + "resources.apps.*.effective_resources[*].postgres.permission": {"CAN_CONNECT_AND_CREATE"}, + "resources.apps.*.effective_resources[*].secret.permission": {"MANAGE", "READ", "WRITE"}, + "resources.apps.*.effective_resources[*].serving_endpoint.permission": {"CAN_MANAGE", "CAN_QUERY", "CAN_VIEW"}, + "resources.apps.*.effective_resources[*].sql_warehouse.permission": {"CAN_MANAGE", "CAN_USE", "IS_OWNER"}, + "resources.apps.*.effective_resources[*].uc_securable.permission": {"EXECUTE", "MODIFY", "READ_VOLUME", "SELECT", "USE_CONNECTION", "WRITE_VOLUME"}, + "resources.apps.*.effective_resources[*].uc_securable.securable_type": {"CONNECTION", "FUNCTION", "MODEL_SERVICE", "TABLE", "VOLUME"}, + "resources.apps.*.pending_deployment.mode": {"AUTO_SYNC", "SNAPSHOT"}, + "resources.apps.*.pending_deployment.status.state": {"CANCELLED", "FAILED", "IN_PROGRESS", "SUCCEEDED"}, + "resources.apps.*.permissions[*].level": {"CAN_MANAGE", "CAN_USE"}, + "resources.apps.*.resources[*].app.permission": {"CAN_USE"}, + "resources.apps.*.resources[*].database.permission": {"CAN_CONNECT_AND_CREATE"}, + "resources.apps.*.resources[*].experiment.permission": {"CAN_EDIT", "CAN_MANAGE", "CAN_READ"}, + "resources.apps.*.resources[*].genie_space.permission": {"CAN_EDIT", "CAN_MANAGE", "CAN_RUN", "CAN_VIEW"}, + "resources.apps.*.resources[*].job.permission": {"CAN_MANAGE", "CAN_MANAGE_RUN", "CAN_VIEW", "IS_OWNER"}, + "resources.apps.*.resources[*].postgres.permission": {"CAN_CONNECT_AND_CREATE"}, + "resources.apps.*.resources[*].secret.permission": {"MANAGE", "READ", "WRITE"}, + "resources.apps.*.resources[*].serving_endpoint.permission": {"CAN_MANAGE", "CAN_QUERY", "CAN_VIEW"}, + "resources.apps.*.resources[*].sql_warehouse.permission": {"CAN_MANAGE", "CAN_USE", "IS_OWNER"}, + "resources.apps.*.resources[*].uc_securable.permission": {"EXECUTE", "MODIFY", "READ_VOLUME", "SELECT", "USE_CONNECTION", "WRITE_VOLUME"}, + "resources.apps.*.resources[*].uc_securable.securable_type": {"CONNECTION", "FUNCTION", "MODEL_SERVICE", "TABLE", "VOLUME"}, "resources.catalogs.*.isolation_mode": {"ISOLATED", "OPEN"}, diff --git a/bundle/internal/validation/generated/required_fields.go b/bundle/internal/validation/generated/required_fields.go index 760d14d9178..78b761f02d7 100644 --- a/bundle/internal/validation/generated/required_fields.go +++ b/bundle/internal/validation/generated/required_fields.go @@ -24,6 +24,15 @@ var RequiredFields = map[string][]string{ "resources.apps.*.active_deployment.git_source.git_repository": {"provider", "url"}, "resources.apps.*.config.env[*]": {"name"}, "resources.apps.*.default_git_source.git_repository": {"provider", "url"}, + "resources.apps.*.effective_resources[*]": {"name"}, + "resources.apps.*.effective_resources[*].database": {"database_name", "instance_name", "permission"}, + "resources.apps.*.effective_resources[*].experiment": {"experiment_id", "permission"}, + "resources.apps.*.effective_resources[*].genie_space": {"name", "permission", "space_id"}, + "resources.apps.*.effective_resources[*].job": {"id", "permission"}, + "resources.apps.*.effective_resources[*].secret": {"key", "permission", "scope"}, + "resources.apps.*.effective_resources[*].serving_endpoint": {"name", "permission"}, + "resources.apps.*.effective_resources[*].sql_warehouse": {"id", "permission"}, + "resources.apps.*.effective_resources[*].uc_securable": {"permission", "securable_full_name", "securable_type"}, "resources.apps.*.git_repository": {"provider", "url"}, "resources.apps.*.git_source.git_repository": {"provider", "url"}, "resources.apps.*.lifecycle.depends_on[*]": {"resource"}, diff --git a/bundle/schema/jsonschema.json b/bundle/schema/jsonschema.json index afb5a80db72..14fcb5e83ad 100644 --- a/bundle/schema/jsonschema.json +++ b/bundle/schema/jsonschema.json @@ -80,21 +80,22 @@ "oneOf": [ { "type": "object", + "description": "A SQL alert. An alert runs a query on a schedule, evaluates the result against a condition,\nand notifies users or notification destinations when the condition is met.", "properties": { "custom_description": { - "description": "Custom description for the alert. Interpreted according to `custom_template_format`.", + "description": "Custom description for the alert, used as the notification body. Interpreted according to `custom_template_format`.\nThe available template variables are listed at https://docs.databricks.com/aws/en/sql/user/alerts/create#notification-templates.", "$ref": "#/$defs/string", "x-databricks-launch-stage": "GA" }, "custom_summary": { - "description": "Custom summary for the alert. Interpreted according to `custom_template_format`.", + "description": "Custom summary for the alert, used as the notification subject. Interpreted according to `custom_template_format`.", "$ref": "#/$defs/string", "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.", @@ -102,6 +103,7 @@ "x-databricks-launch-stage": "GA" }, "evaluation": { + "description": "Condition evaluated against the query result, and who is notified when it is met.", "$ref": "#/$defs/github.com/databricks/databricks-sdk-go/service/sql.AlertV2Evaluation", "x-databricks-launch-stage": "GA" }, @@ -138,13 +140,14 @@ "x-databricks-launch-stage": "GA" }, "run_as_user_name": { - "description": "The run as username or application ID of service principal.\nOn Create and Update, this field can be set to application ID of an active service principal. Setting this field requires the servicePrincipal/user role.\nDeprecated: Use `run_as` field instead. This field will be removed in a future release.", + "description": "Deprecated: Use `run_as` field instead. This field will be removed in a future release.\nThe run as username or application ID of service principal.\nOn Create and Update, this field can be set to application ID of an active service principal. Setting this field requires the servicePrincipal/user role.", "$ref": "#/$defs/string", "x-databricks-launch-stage": "GA", "deprecationMessage": "This field is deprecated", "deprecated": true }, "schedule": { + "description": "Schedule on which the alert runs its query and evaluates the condition.", "$ref": "#/$defs/github.com/databricks/databricks-sdk-go/service/sql.CronSchedule", "x-databricks-launch-stage": "GA" }, @@ -2143,6 +2146,7 @@ "x-databricks-launch-stage": "GA" }, "description": { + "description": "The description of the serving endpoint.", "$ref": "#/$defs/string", "x-databricks-launch-stage": "GA" }, @@ -2733,7 +2737,7 @@ "$ref": "#/$defs/bool" }, "role": { - "description": "[Beta] The name of the role that owns the database.\nFormat: projects/{project_id}/branches/{branch_id}/roles/{role_id}\n\nTo change the owner, pass valid existing Role name when updating the Database\n\nA database always has an owner.", + "description": "[Beta] The name of the role that owns the database.\nFormat: projects/{project_id}/branches/{branch_id}/roles/{role_id}\n\nTo change the owner, pass valid existing Role name when updating the Database\n\nRequired when creating the Database.", "$ref": "#/$defs/string", "x-databricks-launch-stage": "PUBLIC_BETA" } @@ -14191,7 +14195,7 @@ "deprecated": true }, "filter_condition": { - "description": "Single WHERE clause to filter delta table before applying transformations. Will be row-wise evaluated, so should only include conditionals and projections.", + "description": "A single WHERE clause to filter the Delta table before applying transformations.\nThe predicate is evaluated for each row.", "$ref": "#/$defs/string", "x-databricks-launch-stage": "GA" }, @@ -14209,7 +14213,7 @@ "deprecated": true }, "transformation_sql": { - "description": "A single SQL SELECT expression applied after filter_condition.\nShould contains all the columns needed (eg. \"SELECT *, col_a + col_b AS col_c FROM x.y.z WHERE col_a \u003e 0\" would have `transformation_sql` \"*, col_a + col_b AS col_c\")\nIf transformation_sql is not provided, all columns of the delta table are present in the DataSource dataframe.", + "description": "A single SQL SELECT expression applied after filter_condition.\nThe expression must contain all required columns (e.g., \"*, col_a + col_b AS col_c\").\nIf transformation_sql is not provided, all columns of the delta table are present in the DataSource dataframe.", "$ref": "#/$defs/string", "x-databricks-launch-stage": "GA" } @@ -15034,7 +15038,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 +15129,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", @@ -20652,6 +20662,7 @@ "type": "object", "properties": { "served_entity_name": { + "description": "The name of the served entity this route configures traffic for.", "$ref": "#/$defs/string", "x-databricks-launch-stage": "GA" }, @@ -20693,6 +20704,7 @@ "x-databricks-launch-stage": "GA" }, "entity_version": { + "description": "The version of the model in Databricks Model Registry or Unity Catalog to be served, or empty if the entity is a FEATURE_SPEC function.", "$ref": "#/$defs/string", "x-databricks-launch-stage": "GA" }, @@ -20806,10 +20818,12 @@ "x-databricks-launch-stage": "GA" }, "model_name": { + "description": "The name of the model in Databricks Model Registry to be served or, if the model resides in Unity Catalog, the full name of the model in the form of **catalog_name.schema_name.model_name**.", "$ref": "#/$defs/string", "x-databricks-launch-stage": "GA" }, "model_version": { + "description": "The version of the model in Databricks Model Registry or Unity Catalog to be served.", "$ref": "#/$defs/string", "x-databricks-launch-stage": "GA" }, @@ -21161,12 +21175,12 @@ "type": "object", "properties": { "comparison_operator": { - "description": "Operator used for comparison in alert evaluation.", + "description": "Operator used for comparison in alert evaluation. The alert is triggered when the comparison of the source value with the threshold is true. `IS_NULL` and `IS_NOT_NULL` take no threshold.", "$ref": "#/$defs/github.com/databricks/databricks-sdk-go/service/sql.ComparisonOperator", "x-databricks-launch-stage": "GA" }, "empty_result_state": { - "description": "Alert state if result is empty. Please avoid setting this field to be `UNKNOWN` because `UNKNOWN` state is planned to be deprecated.", + "description": "Alert state if result is empty. If not set, an empty result sets the state to `ERROR`. Please avoid setting this field to be `UNKNOWN` because `UNKNOWN` state is planned to be deprecated.", "$ref": "#/$defs/github.com/databricks/databricks-sdk-go/service/sql.AlertEvaluationState", "x-databricks-launch-stage": "GA" }, @@ -21181,7 +21195,7 @@ "x-databricks-launch-stage": "GA" }, "threshold": { - "description": "Threshold to user for alert evaluation, can be a column or a value.", + "description": "Threshold to compare the source column against, either another column or a fixed value. Not needed when `comparison_operator` is `IS_NULL` or `IS_NOT_NULL`.", "$ref": "#/$defs/github.com/databricks/databricks-sdk-go/service/sql.AlertV2Operand", "x-databricks-launch-stage": "GA" } @@ -21214,6 +21228,7 @@ "x-databricks-launch-stage": "GA" }, "subscriptions": { + "description": "Users and notification destinations that receive notifications.", "$ref": "#/$defs/slice/github.com/databricks/databricks-sdk-go/service/sql.AlertV2Subscription", "x-databricks-launch-stage": "GA" } @@ -21232,10 +21247,12 @@ "type": "object", "properties": { "column": { + "description": "Compare the source against another column of the query result.", "$ref": "#/$defs/github.com/databricks/databricks-sdk-go/service/sql.AlertV2OperandColumn", "x-databricks-launch-stage": "GA" }, "value": { + "description": "Compare the source against a fixed value.", "$ref": "#/$defs/github.com/databricks/databricks-sdk-go/service/sql.AlertV2OperandValue", "x-databricks-launch-stage": "GA" } @@ -21254,15 +21271,17 @@ "type": "object", "properties": { "aggregation": { - "description": "If not set, the behavior is equivalent to using `First row` in the UI.", + "description": "Aggregation applied to the column across all rows of the query result: `SUM`, `COUNT`, `COUNT_DISTINCT`, `AVG`, `MEDIAN`, `MIN`, `MAX` or `STDDEV`.\nIf not set, the value in the first row is used, which is equivalent to using `First row` in the UI.", "$ref": "#/$defs/github.com/databricks/databricks-sdk-go/service/sql.Aggregation", "x-databricks-launch-stage": "GA" }, "display": { + "description": "Label for the column in notifications. Defaults to `name`.", "$ref": "#/$defs/string", "x-databricks-launch-stage": "GA" }, "name": { + "description": "Name of the column in the query result.", "$ref": "#/$defs/string", "x-databricks-launch-stage": "GA" } @@ -21284,14 +21303,17 @@ "type": "object", "properties": { "bool_value": { + "description": "Boolean threshold, for boolean columns.", "$ref": "#/$defs/bool", "x-databricks-launch-stage": "GA" }, "double_value": { + "description": "Numeric threshold, for numeric columns.", "$ref": "#/$defs/float64", "x-databricks-launch-stage": "GA" }, "string_value": { + "description": "String threshold, for string or timestamp columns.", "$ref": "#/$defs/string", "x-databricks-launch-stage": "GA" } @@ -21334,10 +21356,12 @@ "type": "object", "properties": { "destination_id": { + "description": "ID of the notification destination to notify, as returned by the Notification Destinations API.", "$ref": "#/$defs/string", "x-databricks-launch-stage": "GA" }, "user_email": { + "description": "Email address of the workspace user to notify.", "$ref": "#/$defs/string", "x-databricks-launch-stage": "GA" } @@ -21440,12 +21464,12 @@ "type": "object", "properties": { "pause_status": { - "description": "Indicate whether this schedule is paused or not.", + "description": "Indicates whether this schedule is paused. While paused, the alert is not evaluated.", "$ref": "#/$defs/github.com/databricks/databricks-sdk-go/service/sql.SchedulePauseStatus", "x-databricks-launch-stage": "GA" }, "quartz_cron_schedule": { - "description": "A cron expression using quartz syntax that specifies the schedule for this pipeline.\nShould use the quartz format described here: http://www.quartz-scheduler.org/documentation/quartz-2.1.7/tutorials/tutorial-lesson-06.html", + "description": "A cron expression using quartz syntax that specifies the schedule for this alert.\nShould use the quartz format described here: http://www.quartz-scheduler.org/documentation/quartz-2.1.7/tutorials/tutorial-lesson-06.html", "$ref": "#/$defs/string", "x-databricks-launch-stage": "GA" }, @@ -21477,8 +21501,8 @@ "MARKDOWN" ], "enumDescriptions": [ - "[Beta]", - "[Beta]" + "[Public Preview]", + "[Public Preview]" ] }, { diff --git a/cmd/workspace/ai-functions/ai-functions.go b/cmd/workspace/ai-functions/ai-functions.go index 306dee5c4b1..ff3a45cdf20 100644 --- a/cmd/workspace/ai-functions/ai-functions.go +++ b/cmd/workspace/ai-functions/ai-functions.go @@ -370,21 +370,20 @@ func newCancelBatch() *cobra.Command { var cancelBatchReq aifunctions.CancelBatchRequest cmd.Use = "cancel-batch NAME" - cmd.Short = `Cancel a batch.` - cmd.Long = `Cancel a batch. + cmd.Short = `*Beta* Cancel a batch.` + cmd.Long = `This command is in Beta and may change without notice. - Cancel a batch. Cancellation is asynchronous: requests in flight drain first, - so read the batch to observe the CANCELLING and CANCELLED statuses. +Cancel a batch. - Arguments: - NAME: ID of the batch, in the form batch_.` + Starts the asynchronous cancellation of a batch. Requests in progress are + drained first. Cancellation is best effort, so the batch can still complete. - // This command is being previewed; hide from help output. - cmd.Hidden = true + Arguments: + NAME: Resource name of the batch. Format: batch_.` cmd.Annotations = make(map[string]string) - cmd.Annotations["launch_stage"] = "PRIVATE_PREVIEW" - cmd.Annotations["launch_stage_display"] = "Private Preview" + cmd.Annotations["launch_stage"] = "PUBLIC_BETA" + cmd.Annotations["launch_stage_display"] = "Beta" cmd.Args = func(cmd *cobra.Command, args []string) error { check := root.ExactArgs(1) @@ -436,39 +435,40 @@ func newCreateBatch() *cobra.Command { cmd.Flags().Var(&createBatchJson, "json", `either inline JSON string or @path/to/file.json with request body`) - cmd.Flags().StringVar(&createBatchReq.Batch.Name, "name", createBatchReq.Batch.Name, `ID of the batch, in the form batch_.`) - cmd.Flags().StringVar(&createBatchReq.Batch.OutputRef, "output-ref", createBatchReq.Batch.OutputRef, `Path on a Unity Catalog volume to write the JSONL output to.`) // TODO: map via StringToStringVar: params // TODO: complex arg: request_counts - cmd.Use = "create-batch ENDPOINT INPUT_REF" - cmd.Short = `Create a batch.` - cmd.Long = `Create a batch. + cmd.Use = "create-batch ENDPOINT INPUT_REF OUTPUT_REF" + cmd.Short = `*Beta* Create a batch.` + cmd.Long = `This command is in Beta and may change without notice. - Run an AI function over every request in a file on a Unity Catalog volume. The - batch runs asynchronously; read it to follow its progress. +Create a batch. - Arguments: - ENDPOINT: The AI function to run for every request, for example ai_extract. - INPUT_REF: Path of the JSONL input file on a Unity Catalog volume. Each line is one - request.` + Creates a batch that runs an AI function on every request in a JSONL file on a + Unity Catalog volume. The batch runs asynchronously. To follow its progress, + get the batch. - // This command is being previewed; hide from help output. - cmd.Hidden = true + Arguments: + ENDPOINT: The AI function, for example ai_parse_document. + INPUT_REF: Unity Catalog volume path of the JSONL input file. Each line is one + request, in the form {"custom_id": ..., "body": ...}. The file can hold + up to 50,000 requests and be up to 200 MiB. + OUTPUT_REF: Unity Catalog volume path to write the JSONL output file to. If the path + is a directory, the file is /_output.jsonl.` cmd.Annotations = make(map[string]string) - cmd.Annotations["launch_stage"] = "PRIVATE_PREVIEW" - cmd.Annotations["launch_stage_display"] = "Private Preview" + cmd.Annotations["launch_stage"] = "PUBLIC_BETA" + cmd.Annotations["launch_stage_display"] = "Beta" cmd.Args = func(cmd *cobra.Command, args []string) error { if cmd.Flags().Changed("json") { err := root.ExactArgs(0)(cmd, args) if err != nil { - return errors.New("when --json flag is specified, no positional arguments are allowed. Provide 'endpoint', 'input_ref' in your JSON input") + return errors.New("when --json flag is specified, no positional arguments are allowed. Provide 'endpoint', 'input_ref', 'output_ref' in your JSON input") } return nil } - check := root.ExactArgs(2) + check := root.ExactArgs(3) return check(cmd, args) } @@ -495,6 +495,9 @@ func newCreateBatch() *cobra.Command { if !cmd.Flags().Changed("json") { createBatchReq.Batch.InputRef = args[1] } + if !cmd.Flags().Changed("json") { + createBatchReq.Batch.OutputRef = args[2] + } response, err := w.AiFunctions.CreateBatch(ctx, createBatchReq) if err != nil { @@ -531,20 +534,19 @@ func newGetBatch() *cobra.Command { var getBatchReq aifunctions.GetBatchRequest cmd.Use = "get-batch NAME" - cmd.Short = `Get a batch.` - cmd.Long = `Get a batch. + cmd.Short = `*Beta* Get a batch.` + cmd.Long = `This command is in Beta and may change without notice. - Read one batch, with its status and progress. +Get a batch. - Arguments: - NAME: ID of the batch, in the form batch_.` + Gets the latest status and progress of a batch. - // This command is being previewed; hide from help output. - cmd.Hidden = true + Arguments: + NAME: Resource name of the batch. Format: batch_.` cmd.Annotations = make(map[string]string) - cmd.Annotations["launch_stage"] = "PRIVATE_PREVIEW" - cmd.Annotations["launch_stage_display"] = "Private Preview" + cmd.Annotations["launch_stage"] = "PUBLIC_BETA" + cmd.Annotations["launch_stage_display"] = "Beta" cmd.Args = func(cmd *cobra.Command, args []string) error { check := root.ExactArgs(1) @@ -606,17 +608,16 @@ func newListBatches() *cobra.Command { cmd.Flags().Lookup("page-token").Hidden = true cmd.Use = "list-batches" - cmd.Short = `List batches.` - cmd.Long = `List batches. + cmd.Short = `*Beta* List batches.` + cmd.Long = `This command is in Beta and may change without notice. - List the batches the caller created in this workspace.` +List batches. - // This command is being previewed; hide from help output. - cmd.Hidden = true + Lists the batches that the caller created in this workspace.` cmd.Annotations = make(map[string]string) - cmd.Annotations["launch_stage"] = "PRIVATE_PREVIEW" - cmd.Annotations["launch_stage_display"] = "Private Preview" + cmd.Annotations["launch_stage"] = "PUBLIC_BETA" + cmd.Annotations["launch_stage_display"] = "Beta" cmd.Args = func(cmd *cobra.Command, args []string) error { check := root.ExactArgs(0) diff --git a/cmd/workspace/alerts-v2/alerts-v2.go b/cmd/workspace/alerts-v2/alerts-v2.go index f7a31691341..ea3455beb40 100644 --- a/cmd/workspace/alerts-v2/alerts-v2.go +++ b/cmd/workspace/alerts-v2/alerts-v2.go @@ -64,27 +64,29 @@ func newCreateAlert() *cobra.Command { cmd.Flags().Var(&createAlertJson, "json", `either inline JSON string or @path/to/file.json with request body`) - cmd.Flags().StringVar(&createAlertReq.Alert.CustomDescription, "custom-description", createAlertReq.Alert.CustomDescription, `Custom description for the alert.`) - cmd.Flags().StringVar(&createAlertReq.Alert.CustomSummary, "custom-summary", createAlertReq.Alert.CustomSummary, `Custom summary for the alert.`) + cmd.Flags().StringVar(&createAlertReq.Alert.CustomDescription, "custom-description", createAlertReq.Alert.CustomDescription, `Custom description for the alert, used as the notification body.`) + cmd.Flags().StringVar(&createAlertReq.Alert.CustomSummary, "custom-summary", createAlertReq.Alert.CustomSummary, `Custom summary for the alert, used as the notification subject.`) cmd.Flags().Var(&createAlertReq.Alert.CustomTemplateFormat, "custom-template-format", `The format used to interpret the custom_summary and custom_description templates. Supported values: [HTML, MARKDOWN]`) // TODO: complex arg: effective_run_as // TODO: array: parameters cmd.Flags().StringVar(&createAlertReq.Alert.ParentPath, "parent-path", createAlertReq.Alert.ParentPath, `The workspace path of the folder containing the alert.`) // TODO: complex arg: run_as - cmd.Flags().StringVar(&createAlertReq.Alert.RunAsUserName, "run-as-user-name", createAlertReq.Alert.RunAsUserName, `The run as username or application ID of service principal.`) + cmd.Flags().StringVar(&createAlertReq.Alert.RunAsUserName, "run-as-user-name", createAlertReq.Alert.RunAsUserName, `Deprecated: Use run_as field instead.`) cmd.Use = "create-alert DISPLAY_NAME QUERY_TEXT WAREHOUSE_ID EVALUATION SCHEDULE" cmd.Short = `Create an alert.` cmd.Long = `Create an alert. - Create Alert + Creates an alert that runs query_text on the given schedule and evaluates + the result against the configured condition. Arguments: DISPLAY_NAME: The display name of the alert. QUERY_TEXT: Text of the query to be run. WAREHOUSE_ID: ID of the SQL warehouse attached to the alert. - EVALUATION: - SCHEDULE: ` + EVALUATION: Condition evaluated against the query result, and who is notified when it + is met. + SCHEDULE: Schedule on which the alert runs its query and evaluates the condition.` cmd.Annotations = make(map[string]string) cmd.Annotations["launch_stage"] = "GA" @@ -181,7 +183,10 @@ func newGetAlert() *cobra.Command { cmd.Short = `Get an alert.` cmd.Long = `Get an alert. - Gets an alert.` + Gets an alert. + + Arguments: + ID: ID of the alert to retrieve, as returned in the alert's id field.` cmd.Annotations = make(map[string]string) cmd.Annotations["launch_stage"] = "GA" @@ -200,14 +205,14 @@ func newGetAlert() *cobra.Command { if err != nil { return fmt.Errorf("failed to load names for Alerts V2 drop-down. Please manually specify required arguments. Original error: %w", err) } - id, err := cmdio.Select(ctx, names, "") + id, err := cmdio.Select(ctx, names, "ID of the alert to retrieve, as returned in the alert's `id` field") if err != nil { return err } args = append(args, id) } if len(args) != 1 { - return errors.New("expected to have ") + return errors.New("expected to have id of the alert to retrieve, as returned in the alert's `id` field") } getAlertReq.Id = args[0] @@ -249,7 +254,7 @@ func newListAlerts() *cobra.Command { // branches, so the method-call path is always reached. var listAlertsLimit int - cmd.Flags().IntVar(&listAlertsReq.PageSize, "page-size", listAlertsReq.PageSize, ``) + cmd.Flags().IntVar(&listAlertsReq.PageSize, "page-size", listAlertsReq.PageSize, `Maximum number of alerts to return per page.`) // Limit flag for total result capping. cmd.Flags().IntVar(&listAlertsLimit, "limit", 0, `Maximum number of results to return.`) @@ -323,7 +328,10 @@ func newTrashAlert() *cobra.Command { Moves an alert to the trash. Trashed alerts immediately disappear from list views, and can no longer trigger. You can restore a trashed alert through the - UI. A trashed alert is permanently deleted after 30 days.` + UI. A trashed alert is permanently deleted after 30 days. + + Arguments: + ID: ID of the alert to move to the trash.` cmd.Annotations = make(map[string]string) cmd.Annotations["launch_stage"] = "GA" @@ -342,14 +350,14 @@ func newTrashAlert() *cobra.Command { if err != nil { return fmt.Errorf("failed to load names for Alerts V2 drop-down. Please manually specify required arguments. Original error: %w", err) } - id, err := cmdio.Select(ctx, names, "") + id, err := cmdio.Select(ctx, names, "ID of the alert to move to the trash") if err != nil { return err } args = append(args, id) } if len(args) != 1 { - return errors.New("expected to have ") + return errors.New("expected to have id of the alert to move to the trash") } trashAlertReq.Id = args[0] @@ -390,39 +398,34 @@ func newUpdateAlert() *cobra.Command { cmd.Flags().Var(&updateAlertJson, "json", `either inline JSON string or @path/to/file.json with request body`) - cmd.Flags().StringVar(&updateAlertReq.Alert.CustomDescription, "custom-description", updateAlertReq.Alert.CustomDescription, `Custom description for the alert.`) - cmd.Flags().StringVar(&updateAlertReq.Alert.CustomSummary, "custom-summary", updateAlertReq.Alert.CustomSummary, `Custom summary for the alert.`) + cmd.Flags().StringVar(&updateAlertReq.Alert.CustomDescription, "custom-description", updateAlertReq.Alert.CustomDescription, `Custom description for the alert, used as the notification body.`) + cmd.Flags().StringVar(&updateAlertReq.Alert.CustomSummary, "custom-summary", updateAlertReq.Alert.CustomSummary, `Custom summary for the alert, used as the notification subject.`) cmd.Flags().Var(&updateAlertReq.Alert.CustomTemplateFormat, "custom-template-format", `The format used to interpret the custom_summary and custom_description templates. Supported values: [HTML, MARKDOWN]`) // TODO: complex arg: effective_run_as // TODO: array: parameters cmd.Flags().StringVar(&updateAlertReq.Alert.ParentPath, "parent-path", updateAlertReq.Alert.ParentPath, `The workspace path of the folder containing the alert.`) // TODO: complex arg: run_as - cmd.Flags().StringVar(&updateAlertReq.Alert.RunAsUserName, "run-as-user-name", updateAlertReq.Alert.RunAsUserName, `The run as username or application ID of service principal.`) + cmd.Flags().StringVar(&updateAlertReq.Alert.RunAsUserName, "run-as-user-name", updateAlertReq.Alert.RunAsUserName, `Deprecated: Use run_as field instead.`) cmd.Use = "update-alert ID UPDATE_MASK DISPLAY_NAME QUERY_TEXT WAREHOUSE_ID EVALUATION SCHEDULE" cmd.Short = `Update an alert.` cmd.Long = `Update an alert. - Update alert + Updates an alert. Only the fields listed in update_mask are changed; all + other fields keep their current values. Arguments: ID: The canonical identifier of the alert to retrieve information about. - UPDATE_MASK: The field mask must be a single string, with multiple fields separated by - commas (no spaces). The field path is relative to the resource object, - using a dot (.) to navigate sub-fields (e.g., author.given_name). - Specification of elements in sequence or map fields is not allowed, as - only the entire collection field can be specified. Field names must - exactly match the resource field names. - - A field mask of * indicates full replacement. It’s recommended to - always explicitly list the fields being updated and avoid using * - wildcards, as it can lead to unintended results if the API changes in the - future. + UPDATE_MASK: Comma-separated list of the alert fields to update, for example + display_name,query_text or schedule.pause_status. Only the listed + fields are changed; all other fields keep their current values. + parent_path cannot be updated. DISPLAY_NAME: The display name of the alert. QUERY_TEXT: Text of the query to be run. WAREHOUSE_ID: ID of the SQL warehouse attached to the alert. - EVALUATION: - SCHEDULE: ` + EVALUATION: Condition evaluated against the query result, and who is notified when it + is met. + SCHEDULE: Schedule on which the alert runs its query and evaluates the condition.` cmd.Annotations = make(map[string]string) cmd.Annotations["launch_stage"] = "GA" diff --git a/cmd/workspace/apps/apps.go b/cmd/workspace/apps/apps.go index 4b756f47d23..b9f7a6bf463 100644 --- a/cmd/workspace/apps/apps.go +++ b/cmd/workspace/apps/apps.go @@ -105,6 +105,7 @@ func newCreate() *cobra.Command { // TODO: complex arg: compute_status // TODO: complex arg: default_git_source cmd.Flags().StringVar(&createReq.App.Description, "description", createReq.App.Description, `The description of the app.`) + // TODO: array: effective_resources // TODO: array: effective_user_api_scopes cmd.Flags().BoolVar(&createReq.App.ForwardUserAccessToken, "forward-user-access-token", createReq.App.ForwardUserAccessToken, `Forward the user's access token to the app.`) // TODO: complex arg: git_repository @@ -1701,6 +1702,7 @@ func newUpdate() *cobra.Command { // TODO: complex arg: compute_status // TODO: complex arg: default_git_source cmd.Flags().StringVar(&updateReq.App.Description, "description", updateReq.App.Description, `The description of the app.`) + // TODO: array: effective_resources // TODO: array: effective_user_api_scopes cmd.Flags().BoolVar(&updateReq.App.ForwardUserAccessToken, "forward-user-access-token", updateReq.App.ForwardUserAccessToken, `Forward the user's access token to the app.`) // TODO: complex arg: git_repository diff --git a/cmd/workspace/assume-group/assume-group.go b/cmd/workspace/assume-group/assume-group.go new file mode 100644 index 00000000000..3f7337271a4 --- /dev/null +++ b/cmd/workspace/assume-group/assume-group.go @@ -0,0 +1,321 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package assume_group + +import ( + "fmt" + + "github.com/databricks/cli/cmd/root" + "github.com/databricks/cli/libs/cmdctx" + "github.com/databricks/cli/libs/cmdio" + "github.com/databricks/cli/libs/flags" + "github.com/databricks/databricks-sdk-go/service/iam" + "github.com/spf13/cobra" +) + +// Slice with functions to override default command behavior. +// Functions can be added from the `init()` function in manually curated files in this directory. +var cmdOverrides []func(*cobra.Command) + +func New() *cobra.Command { + cmd := &cobra.Command{ + Use: "assume-group", + Short: `Manage the workspace's restricted sharing groups.`, + Long: `Manage the workspace's restricted sharing groups.`, + GroupID: "iam", + + // This service is being previewed; hide from help output. + Hidden: true, + RunE: root.ReportUnknownSubcommand, + } + + cmd.Annotations = make(map[string]string) + cmd.Annotations["launch_stage"] = "PRIVATE_PREVIEW" + cmd.Annotations["launch_stage_display"] = "Private Preview" + + // Add methods + cmd.AddCommand(newCreateRestrictedSharingGroup()) + cmd.AddCommand(newDeleteRestrictedSharingGroup()) + cmd.AddCommand(newGetRestrictedSharingGroup()) + cmd.AddCommand(newListRestrictedSharingGroups()) + + // Apply optional overrides to this command. + for _, fn := range cmdOverrides { + fn(cmd) + } + + return cmd +} + +// start create-restricted-sharing-group command + +// Slice with functions to override default command behavior. +// Functions can be added from the `init()` function in manually curated files in this directory. +var createRestrictedSharingGroupOverrides []func( + *cobra.Command, + *iam.CreateRestrictedSharingGroupRequest, +) + +func newCreateRestrictedSharingGroup() *cobra.Command { + cmd := &cobra.Command{} + + var createRestrictedSharingGroupReq iam.CreateRestrictedSharingGroupRequest + createRestrictedSharingGroupReq.RestrictedSharingGroup = iam.RestrictedSharingGroup{} + var createRestrictedSharingGroupJson flags.JsonFlag + + cmd.Flags().Var(&createRestrictedSharingGroupJson, "json", `either inline JSON string or @path/to/file.json with request body`) + + cmd.Flags().StringVar(&createRestrictedSharingGroupReq.RestrictedSharingGroup.Name, "name", createRestrictedSharingGroupReq.RestrictedSharingGroup.Name, `The resource name of the restricted sharing group.`) + + cmd.Use = "create-restricted-sharing-group RESTRICTED_SHARING_GROUP_ID" + cmd.Short = `Create a restricted sharing group.` + cmd.Long = `Create a restricted sharing group. + + Adds a group to the workspace's restricted list. The workspace allows at most + 100 restricted sharing groups. Requires workspace admin. + + Arguments: + RESTRICTED_SHARING_GROUP_ID: The id of the workspace group to restrict: the numeric id of an existing + and non-system workspace group.` + + cmd.Annotations = make(map[string]string) + cmd.Annotations["launch_stage"] = "PRIVATE_PREVIEW" + cmd.Annotations["launch_stage_display"] = "Private Preview" + + cmd.Args = func(cmd *cobra.Command, args []string) error { + check := root.ExactArgs(1) + return check(cmd, args) + } + + cmd.PreRunE = root.MustWorkspaceClient + cmd.RunE = func(cmd *cobra.Command, args []string) (err error) { + ctx := cmd.Context() + w := cmdctx.WorkspaceClient(ctx) + + if cmd.Flags().Changed("json") { + diags := createRestrictedSharingGroupJson.Unmarshal(&createRestrictedSharingGroupReq.RestrictedSharingGroup) + if diags.HasError() { + return diags.Error() + } + if len(diags) > 0 { + err := cmdio.RenderDiagnostics(ctx, diags) + if err != nil { + return err + } + } + } + createRestrictedSharingGroupReq.RestrictedSharingGroupId = args[0] + + response, err := w.AssumeGroup.CreateRestrictedSharingGroup(ctx, createRestrictedSharingGroupReq) + if err != nil { + return err + } + + return cmdio.Render(ctx, response) + } + + // Disable completions since they are not applicable. + // Can be overridden by manual implementation in `override.go`. + cmd.ValidArgsFunction = cobra.NoFileCompletions + + // Apply optional overrides to this command. + for _, fn := range createRestrictedSharingGroupOverrides { + fn(cmd, &createRestrictedSharingGroupReq) + } + + return cmd +} + +// start delete-restricted-sharing-group command + +// Slice with functions to override default command behavior. +// Functions can be added from the `init()` function in manually curated files in this directory. +var deleteRestrictedSharingGroupOverrides []func( + *cobra.Command, + *iam.DeleteRestrictedSharingGroupRequest, +) + +func newDeleteRestrictedSharingGroup() *cobra.Command { + cmd := &cobra.Command{} + + var deleteRestrictedSharingGroupReq iam.DeleteRestrictedSharingGroupRequest + + cmd.Use = "delete-restricted-sharing-group NAME" + cmd.Short = `Delete a restricted sharing group.` + cmd.Long = `Delete a restricted sharing group. + + Removes a group from the workspace's restricted list. Requires workspace + admin. + + Arguments: + NAME: The name of the restricted sharing group to delete. Format: + restricted-sharing-groups/{restricted_sharing_group_id}` + + cmd.Annotations = make(map[string]string) + cmd.Annotations["launch_stage"] = "PRIVATE_PREVIEW" + cmd.Annotations["launch_stage_display"] = "Private Preview" + + cmd.Args = func(cmd *cobra.Command, args []string) error { + check := root.ExactArgs(1) + return check(cmd, args) + } + + cmd.PreRunE = root.MustWorkspaceClient + cmd.RunE = func(cmd *cobra.Command, args []string) (err error) { + ctx := cmd.Context() + w := cmdctx.WorkspaceClient(ctx) + + deleteRestrictedSharingGroupReq.Name = args[0] + + err = w.AssumeGroup.DeleteRestrictedSharingGroup(ctx, deleteRestrictedSharingGroupReq) + if err != nil { + return err + } + return nil + } + + // Disable completions since they are not applicable. + // Can be overridden by manual implementation in `override.go`. + cmd.ValidArgsFunction = cobra.NoFileCompletions + + // Apply optional overrides to this command. + for _, fn := range deleteRestrictedSharingGroupOverrides { + fn(cmd, &deleteRestrictedSharingGroupReq) + } + + return cmd +} + +// start get-restricted-sharing-group command + +// Slice with functions to override default command behavior. +// Functions can be added from the `init()` function in manually curated files in this directory. +var getRestrictedSharingGroupOverrides []func( + *cobra.Command, + *iam.GetRestrictedSharingGroupRequest, +) + +func newGetRestrictedSharingGroup() *cobra.Command { + cmd := &cobra.Command{} + + var getRestrictedSharingGroupReq iam.GetRestrictedSharingGroupRequest + + cmd.Use = "get-restricted-sharing-group NAME" + cmd.Short = `Get a restricted sharing group.` + cmd.Long = `Get a restricted sharing group. + + Gets a restricted sharing group in the workspace. Use it to check whether a + group is on the workspace's restricted list. Requires workspace admin. + + Arguments: + NAME: The name of the restricted sharing group to get. Format: + restricted-sharing-groups/{restricted_sharing_group_id}` + + cmd.Annotations = make(map[string]string) + cmd.Annotations["launch_stage"] = "PRIVATE_PREVIEW" + cmd.Annotations["launch_stage_display"] = "Private Preview" + + cmd.Args = func(cmd *cobra.Command, args []string) error { + check := root.ExactArgs(1) + return check(cmd, args) + } + + cmd.PreRunE = root.MustWorkspaceClient + cmd.RunE = func(cmd *cobra.Command, args []string) (err error) { + ctx := cmd.Context() + w := cmdctx.WorkspaceClient(ctx) + + getRestrictedSharingGroupReq.Name = args[0] + + response, err := w.AssumeGroup.GetRestrictedSharingGroup(ctx, getRestrictedSharingGroupReq) + if err != nil { + return err + } + + return cmdio.Render(ctx, response) + } + + // Disable completions since they are not applicable. + // Can be overridden by manual implementation in `override.go`. + cmd.ValidArgsFunction = cobra.NoFileCompletions + + // Apply optional overrides to this command. + for _, fn := range getRestrictedSharingGroupOverrides { + fn(cmd, &getRestrictedSharingGroupReq) + } + + return cmd +} + +// start list-restricted-sharing-groups command + +// Slice with functions to override default command behavior. +// Functions can be added from the `init()` function in manually curated files in this directory. +var listRestrictedSharingGroupsOverrides []func( + *cobra.Command, + *iam.ListRestrictedSharingGroupsRequest, +) + +func newListRestrictedSharingGroups() *cobra.Command { + cmd := &cobra.Command{} + + var listRestrictedSharingGroupsReq iam.ListRestrictedSharingGroupsRequest + // Registered for all paginated methods. Validated at call time in the + // method-call template. Paginated list methods never have Wait or LRO + // branches, so the method-call path is always reached. + var listRestrictedSharingGroupsLimit int + + cmd.Flags().IntVar(&listRestrictedSharingGroupsReq.PageSize, "page-size", listRestrictedSharingGroupsReq.PageSize, `The maximum number of groups to return.`) + + // Limit flag for total result capping. + cmd.Flags().IntVar(&listRestrictedSharingGroupsLimit, "limit", 0, `Maximum number of results to return.`) + + // Hidden pagination flags (internal API parameters). + cmd.Flags().StringVar(&listRestrictedSharingGroupsReq.PageToken, "page-token", listRestrictedSharingGroupsReq.PageToken, `Pagination token.`) + cmd.Flags().Lookup("page-token").Hidden = true + + cmd.Use = "list-restricted-sharing-groups" + cmd.Short = `List restricted sharing groups.` + cmd.Long = `List restricted sharing groups. + + Lists the restricted sharing groups in the workspace. Requires workspace + admin.` + + cmd.Annotations = make(map[string]string) + cmd.Annotations["launch_stage"] = "PRIVATE_PREVIEW" + cmd.Annotations["launch_stage_display"] = "Private Preview" + + cmd.Args = func(cmd *cobra.Command, args []string) error { + check := root.ExactArgs(0) + return check(cmd, args) + } + + cmd.PreRunE = root.MustWorkspaceClient + cmd.RunE = func(cmd *cobra.Command, args []string) (err error) { + ctx := cmd.Context() + w := cmdctx.WorkspaceClient(ctx) + + response := w.AssumeGroup.ListRestrictedSharingGroups(ctx, listRestrictedSharingGroupsReq) + if listRestrictedSharingGroupsLimit < 0 { + return fmt.Errorf("--limit must be a non-negative integer, got %d", listRestrictedSharingGroupsLimit) + } + if listRestrictedSharingGroupsLimit > 0 { + ctx = cmdio.WithLimit(ctx, listRestrictedSharingGroupsLimit) + } + + return cmdio.RenderIterator(ctx, response) + } + + // Disable completions since they are not applicable. + // Can be overridden by manual implementation in `override.go`. + cmd.ValidArgsFunction = cobra.NoFileCompletions + + // Apply optional overrides to this command. + for _, fn := range listRestrictedSharingGroupsOverrides { + fn(cmd, &listRestrictedSharingGroupsReq) + } + + return cmd +} + +// end service AssumeGroup diff --git a/cmd/workspace/cmd.go b/cmd/workspace/cmd.go index 58d58cafcef..8d0f653a4dc 100644 --- a/cmd/workspace/cmd.go +++ b/cmd/workspace/cmd.go @@ -15,6 +15,7 @@ import ( apps "github.com/databricks/cli/cmd/workspace/apps" apps_settings "github.com/databricks/cli/cmd/workspace/apps-settings" artifact_allowlists "github.com/databricks/cli/cmd/workspace/artifact-allowlists" + assume_group "github.com/databricks/cli/cmd/workspace/assume-group" bundle_deployments "github.com/databricks/cli/cmd/workspace/bundle-deployments" catalogs "github.com/databricks/cli/cmd/workspace/catalogs" clean_room_asset_revisions "github.com/databricks/cli/cmd/workspace/clean-room-asset-revisions" @@ -158,6 +159,7 @@ func All() []*cobra.Command { out = append(out, apps.New()) out = append(out, apps_settings.New()) out = append(out, artifact_allowlists.New()) + out = append(out, assume_group.New()) out = append(out, bundle_deployments.New()) out = append(out, catalogs.New()) out = append(out, clean_room_asset_revisions.New()) 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/postgres/postgres.go b/cmd/workspace/postgres/postgres.go index 3dc3bc39615..a3ddae108ff 100644 --- a/cmd/workspace/postgres/postgres.go +++ b/cmd/workspace/postgres/postgres.go @@ -874,7 +874,7 @@ func newCreateDatabase() *cobra.Command { cmd.Flags().Var(&createDatabaseJson, "json", `either inline JSON string or @path/to/file.json with request body`) - cmd.Flags().StringVar(&createDatabaseReq.DatabaseId, "database-id", createDatabaseReq.DatabaseId, `The ID to use for the Database, which will become the final component of the database's resource name.`) + cmd.Flags().StringVar(&createDatabaseReq.DatabaseId, "database-id", createDatabaseReq.DatabaseId, `The ID used to identify and manage the Database resource through the API.`) cmd.Flags().BoolVar(&createDatabaseReq.ReplaceExisting, "replace-existing", createDatabaseReq.ReplaceExisting, `If true, update the database if it already exists instead of returning an error.`) cmd.Flags().StringVar(&createDatabaseReq.Database.Name, "name", createDatabaseReq.Database.Name, `The resource name of the database.`) // TODO: complex arg: spec @@ -1412,7 +1412,7 @@ func newCreateRole() *cobra.Command { cmd.Flags().Var(&createRoleJson, "json", `either inline JSON string or @path/to/file.json with request body`) cmd.Flags().BoolVar(&createRoleReq.ReplaceExisting, "replace-existing", createRoleReq.ReplaceExisting, `If true, update the role if it already exists instead of returning an error.`) - cmd.Flags().StringVar(&createRoleReq.RoleId, "role-id", createRoleReq.RoleId, `The ID to use for the Role, which will become the final component of the role's resource name.`) + cmd.Flags().StringVar(&createRoleReq.RoleId, "role-id", createRoleReq.RoleId, `The ID used to identify and manage the Role resource through the API.`) cmd.Flags().StringVar(&createRoleReq.Role.Name, "name", createRoleReq.Role.Name, `Output only.`) // TODO: complex arg: spec // TODO: complex arg: status @@ -2314,7 +2314,11 @@ func newDeleteEndpoint() *cobra.Command { Arguments: NAME: The full resource path of the endpoint to delete. Format: - projects/{project_id}/branches/{branch_id}/endpoints/{endpoint_id}` + projects/{project_id}/branches/{branch_id}/endpoints/{endpoint_id} + + Read-write endpoints currently cannot be deleted directly. Their deletion + is managed by the parent branch. To avoid compute costs, set disabled to + true on the endpoint.` cmd.Annotations = make(map[string]string) cmd.Annotations["launch_stage"] = "GA" 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/cmd/workspace/serving-endpoints/serving-endpoints.go b/cmd/workspace/serving-endpoints/serving-endpoints.go index 7c837c5d2dd..26bc7833507 100644 --- a/cmd/workspace/serving-endpoints/serving-endpoints.go +++ b/cmd/workspace/serving-endpoints/serving-endpoints.go @@ -165,7 +165,7 @@ func newCreate() *cobra.Command { // TODO: complex arg: ai_gateway cmd.Flags().StringVar(&createReq.BudgetPolicyId, "budget-policy-id", createReq.BudgetPolicyId, `The budget policy to be applied to the serving endpoint.`) // TODO: complex arg: config - cmd.Flags().StringVar(&createReq.Description, "description", createReq.Description, ``) + cmd.Flags().StringVar(&createReq.Description, "description", createReq.Description, `The description of the serving endpoint.`) // TODO: complex arg: email_notifications // TODO: array: rate_limits cmd.Flags().BoolVar(&createReq.RouteOptimized, "route-optimized", createReq.RouteOptimized, `Enable route optimization for the serving endpoint.`) @@ -356,7 +356,10 @@ func newDelete() *cobra.Command { cmd.Use = "delete NAME" cmd.Short = `Delete a serving endpoint.` - cmd.Long = `Delete a serving endpoint.` + cmd.Long = `Delete a serving endpoint. + + Arguments: + NAME: The name of the serving endpoint to delete.` cmd.Annotations = make(map[string]string) cmd.Annotations["launch_stage"] = "GA" diff --git a/go.mod b/go.mod index a27f30aa0e8..db7b9e41457 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.199.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..15d7d260ca9 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.199.0 h1:fvcDGaNgUvptUl/wqPMTLoJSLsezStZSEvIZAO98wy4= +github.com/databricks/databricks-sdk-go v0.199.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..dd573b69982 100644 --- a/python/databricks/bundles/alerts/_models/alert.py +++ b/python/databricks/bundles/alerts/_models/alert.py @@ -40,7 +40,10 @@ @dataclass(kw_only=True) class Alert(Resource): - """""" + """ + A SQL alert. An alert runs a query on a schedule, evaluates the result against a condition, + and notifies users or notification destinations when the condition is met. + """ display_name: VariableOr[str] """ @@ -48,6 +51,9 @@ class Alert(Resource): """ evaluation: VariableOr[AlertV2Evaluation] + """ + Condition evaluated against the query result, and who is notified when it is met. + """ query_text: VariableOr[str] """ @@ -55,6 +61,9 @@ class Alert(Resource): """ schedule: VariableOr[CronSchedule] + """ + Schedule on which the alert runs its query and evaluates the condition. + """ warehouse_id: VariableOr[str] """ @@ -63,19 +72,18 @@ class Alert(Resource): custom_description: VariableOrOptional[str] = None """ - Custom description for the alert. Interpreted according to `custom_template_format`. + Custom description for the alert, used as the notification body. Interpreted according to `custom_template_format`. + The available template variables are listed at https://docs.databricks.com/aws/en/sql/user/alerts/create#notification-templates. """ custom_summary: VariableOrOptional[str] = None """ - Custom summary for the alert. Interpreted according to `custom_template_format`. + Custom summary for the alert, used as the notification subject. Interpreted according to `custom_template_format`. """ 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 @@ -131,9 +139,9 @@ class Alert(Resource): run_as_user_name: VariableOrOptional[str] = None """ - [DEPRECATED] The run as username or application ID of service principal. + [DEPRECATED] Deprecated: Use `run_as` field instead. This field will be removed in a future release. + The run as username or application ID of service principal. On Create and Update, this field can be set to application ID of an active service principal. Setting this field requires the servicePrincipal/user role. - Deprecated: Use `run_as` field instead. This field will be removed in a future release. """ @classmethod @@ -153,6 +161,9 @@ class AlertDict(TypedDict, total=False): """ evaluation: VariableOr[AlertV2EvaluationParam] + """ + Condition evaluated against the query result, and who is notified when it is met. + """ query_text: VariableOr[str] """ @@ -160,6 +171,9 @@ class AlertDict(TypedDict, total=False): """ schedule: VariableOr[CronScheduleParam] + """ + Schedule on which the alert runs its query and evaluates the condition. + """ warehouse_id: VariableOr[str] """ @@ -168,19 +182,18 @@ class AlertDict(TypedDict, total=False): custom_description: VariableOrOptional[str] """ - Custom description for the alert. Interpreted according to `custom_template_format`. + Custom description for the alert, used as the notification body. Interpreted according to `custom_template_format`. + The available template variables are listed at https://docs.databricks.com/aws/en/sql/user/alerts/create#notification-templates. """ custom_summary: VariableOrOptional[str] """ - Custom summary for the alert. Interpreted according to `custom_template_format`. + Custom summary for the alert, used as the notification subject. Interpreted according to `custom_template_format`. """ 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 @@ -236,9 +249,9 @@ class AlertDict(TypedDict, total=False): run_as_user_name: VariableOrOptional[str] """ - [DEPRECATED] The run as username or application ID of service principal. + [DEPRECATED] Deprecated: Use `run_as` field instead. This field will be removed in a future release. + The run as username or application ID of service principal. On Create and Update, this field can be set to application ID of an active service principal. Setting this field requires the servicePrincipal/user role. - Deprecated: Use `run_as` field instead. This field will be removed in a future release. """ diff --git a/python/databricks/bundles/alerts/_models/alert_v2_evaluation.py b/python/databricks/bundles/alerts/_models/alert_v2_evaluation.py index 4d599872ccb..fd3cb65740c 100644 --- a/python/databricks/bundles/alerts/_models/alert_v2_evaluation.py +++ b/python/databricks/bundles/alerts/_models/alert_v2_evaluation.py @@ -37,7 +37,7 @@ class AlertV2Evaluation: comparison_operator: VariableOr[ComparisonOperator] """ - Operator used for comparison in alert evaluation. + Operator used for comparison in alert evaluation. The alert is triggered when the comparison of the source value with the threshold is true. `IS_NULL` and `IS_NOT_NULL` take no threshold. """ source: VariableOr[AlertV2OperandColumn] @@ -47,7 +47,7 @@ class AlertV2Evaluation: empty_result_state: VariableOrOptional[AlertEvaluationState] = None """ - Alert state if result is empty. Please avoid setting this field to be `UNKNOWN` because `UNKNOWN` state is planned to be deprecated. + Alert state if result is empty. If not set, an empty result sets the state to `ERROR`. Please avoid setting this field to be `UNKNOWN` because `UNKNOWN` state is planned to be deprecated. """ notification: VariableOrOptional[AlertV2Notification] = None @@ -57,7 +57,7 @@ class AlertV2Evaluation: threshold: VariableOrOptional[AlertV2Operand] = None """ - Threshold to user for alert evaluation, can be a column or a value. + Threshold to compare the source column against, either another column or a fixed value. Not needed when `comparison_operator` is `IS_NULL` or `IS_NOT_NULL`. """ @classmethod @@ -73,7 +73,7 @@ class AlertV2EvaluationDict(TypedDict, total=False): comparison_operator: VariableOr[ComparisonOperatorParam] """ - Operator used for comparison in alert evaluation. + Operator used for comparison in alert evaluation. The alert is triggered when the comparison of the source value with the threshold is true. `IS_NULL` and `IS_NOT_NULL` take no threshold. """ source: VariableOr[AlertV2OperandColumnParam] @@ -83,7 +83,7 @@ class AlertV2EvaluationDict(TypedDict, total=False): empty_result_state: VariableOrOptional[AlertEvaluationStateParam] """ - Alert state if result is empty. Please avoid setting this field to be `UNKNOWN` because `UNKNOWN` state is planned to be deprecated. + Alert state if result is empty. If not set, an empty result sets the state to `ERROR`. Please avoid setting this field to be `UNKNOWN` because `UNKNOWN` state is planned to be deprecated. """ notification: VariableOrOptional[AlertV2NotificationParam] @@ -93,7 +93,7 @@ class AlertV2EvaluationDict(TypedDict, total=False): threshold: VariableOrOptional[AlertV2OperandParam] """ - Threshold to user for alert evaluation, can be a column or a value. + Threshold to compare the source column against, either another column or a fixed value. Not needed when `comparison_operator` is `IS_NULL` or `IS_NOT_NULL`. """ diff --git a/python/databricks/bundles/alerts/_models/alert_v2_notification.py b/python/databricks/bundles/alerts/_models/alert_v2_notification.py index 81c892f1d90..f57b19f21a7 100644 --- a/python/databricks/bundles/alerts/_models/alert_v2_notification.py +++ b/python/databricks/bundles/alerts/_models/alert_v2_notification.py @@ -32,6 +32,9 @@ class AlertV2Notification: """ subscriptions: VariableOrList[AlertV2Subscription] = field(default_factory=list) + """ + Users and notification destinations that receive notifications. + """ @classmethod def from_dict(cls, value: "AlertV2NotificationDict") -> "Self": @@ -57,6 +60,9 @@ class AlertV2NotificationDict(TypedDict, total=False): """ subscriptions: VariableOrList[AlertV2SubscriptionParam] + """ + Users and notification destinations that receive notifications. + """ AlertV2NotificationParam = AlertV2NotificationDict | AlertV2Notification diff --git a/python/databricks/bundles/alerts/_models/alert_v2_operand.py b/python/databricks/bundles/alerts/_models/alert_v2_operand.py index 5e39c938860..5909ec20245 100644 --- a/python/databricks/bundles/alerts/_models/alert_v2_operand.py +++ b/python/databricks/bundles/alerts/_models/alert_v2_operand.py @@ -24,8 +24,14 @@ class AlertV2Operand: """""" column: VariableOrOptional[AlertV2OperandColumn] = None + """ + Compare the source against another column of the query result. + """ value: VariableOrOptional[AlertV2OperandValue] = None + """ + Compare the source against a fixed value. + """ @classmethod def from_dict(cls, value: "AlertV2OperandDict") -> "Self": @@ -39,8 +45,14 @@ class AlertV2OperandDict(TypedDict, total=False): """""" column: VariableOrOptional[AlertV2OperandColumnParam] + """ + Compare the source against another column of the query result. + """ value: VariableOrOptional[AlertV2OperandValueParam] + """ + Compare the source against a fixed value. + """ AlertV2OperandParam = AlertV2OperandDict | AlertV2Operand diff --git a/python/databricks/bundles/alerts/_models/alert_v2_operand_column.py b/python/databricks/bundles/alerts/_models/alert_v2_operand_column.py index da2f90107e8..aecd00f529e 100644 --- a/python/databricks/bundles/alerts/_models/alert_v2_operand_column.py +++ b/python/databricks/bundles/alerts/_models/alert_v2_operand_column.py @@ -17,13 +17,20 @@ class AlertV2OperandColumn: """""" name: VariableOr[str] + """ + Name of the column in the query result. + """ aggregation: VariableOrOptional[Aggregation] = None """ - If not set, the behavior is equivalent to using `First row` in the UI. + Aggregation applied to the column across all rows of the query result: `SUM`, `COUNT`, `COUNT_DISTINCT`, `AVG`, `MEDIAN`, `MIN`, `MAX` or `STDDEV`. + If not set, the value in the first row is used, which is equivalent to using `First row` in the UI. """ display: VariableOrOptional[str] = None + """ + Label for the column in notifications. Defaults to `name`. + """ @classmethod def from_dict(cls, value: "AlertV2OperandColumnDict") -> "Self": @@ -37,13 +44,20 @@ class AlertV2OperandColumnDict(TypedDict, total=False): """""" name: VariableOr[str] + """ + Name of the column in the query result. + """ aggregation: VariableOrOptional[AggregationParam] """ - If not set, the behavior is equivalent to using `First row` in the UI. + Aggregation applied to the column across all rows of the query result: `SUM`, `COUNT`, `COUNT_DISTINCT`, `AVG`, `MEDIAN`, `MIN`, `MAX` or `STDDEV`. + If not set, the value in the first row is used, which is equivalent to using `First row` in the UI. """ display: VariableOrOptional[str] + """ + Label for the column in notifications. Defaults to `name`. + """ AlertV2OperandColumnParam = AlertV2OperandColumnDict | AlertV2OperandColumn diff --git a/python/databricks/bundles/alerts/_models/alert_v2_operand_value.py b/python/databricks/bundles/alerts/_models/alert_v2_operand_value.py index 5abc7f386ee..56e579824d7 100644 --- a/python/databricks/bundles/alerts/_models/alert_v2_operand_value.py +++ b/python/databricks/bundles/alerts/_models/alert_v2_operand_value.py @@ -16,10 +16,19 @@ class AlertV2OperandValue: """""" bool_value: VariableOrOptional[bool] = None + """ + Boolean threshold, for boolean columns. + """ double_value: VariableOrOptional[float] = None + """ + Numeric threshold, for numeric columns. + """ string_value: VariableOrOptional[str] = None + """ + String threshold, for string or timestamp columns. + """ @classmethod def from_dict(cls, value: "AlertV2OperandValueDict") -> "Self": @@ -33,10 +42,19 @@ class AlertV2OperandValueDict(TypedDict, total=False): """""" bool_value: VariableOrOptional[bool] + """ + Boolean threshold, for boolean columns. + """ double_value: VariableOrOptional[float] + """ + Numeric threshold, for numeric columns. + """ string_value: VariableOrOptional[str] + """ + String threshold, for string or timestamp columns. + """ AlertV2OperandValueParam = AlertV2OperandValueDict | AlertV2OperandValue diff --git a/python/databricks/bundles/alerts/_models/alert_v2_subscription.py b/python/databricks/bundles/alerts/_models/alert_v2_subscription.py index 8d379a1ced7..44b1807a50d 100644 --- a/python/databricks/bundles/alerts/_models/alert_v2_subscription.py +++ b/python/databricks/bundles/alerts/_models/alert_v2_subscription.py @@ -16,8 +16,14 @@ class AlertV2Subscription: """""" destination_id: VariableOrOptional[str] = None + """ + ID of the notification destination to notify, as returned by the Notification Destinations API. + """ user_email: VariableOrOptional[str] = None + """ + Email address of the workspace user to notify. + """ @classmethod def from_dict(cls, value: "AlertV2SubscriptionDict") -> "Self": @@ -31,8 +37,14 @@ class AlertV2SubscriptionDict(TypedDict, total=False): """""" destination_id: VariableOrOptional[str] + """ + ID of the notification destination to notify, as returned by the Notification Destinations API. + """ user_email: VariableOrOptional[str] + """ + Email address of the workspace user to notify. + """ AlertV2SubscriptionParam = AlertV2SubscriptionDict | AlertV2Subscription diff --git a/python/databricks/bundles/alerts/_models/cron_schedule.py b/python/databricks/bundles/alerts/_models/cron_schedule.py index 987a9a1056b..629cf00b4d7 100644 --- a/python/databricks/bundles/alerts/_models/cron_schedule.py +++ b/python/databricks/bundles/alerts/_models/cron_schedule.py @@ -21,7 +21,7 @@ class CronSchedule: quartz_cron_schedule: VariableOr[str] """ - A cron expression using quartz syntax that specifies the schedule for this pipeline. + A cron expression using quartz syntax that specifies the schedule for this alert. Should use the quartz format described here: http://www.quartz-scheduler.org/documentation/quartz-2.1.7/tutorials/tutorial-lesson-06.html """ @@ -34,7 +34,7 @@ class CronSchedule: pause_status: VariableOrOptional[SchedulePauseStatus] = None """ - Indicate whether this schedule is paused or not. + Indicates whether this schedule is paused. While paused, the alert is not evaluated. """ @classmethod @@ -50,7 +50,7 @@ class CronScheduleDict(TypedDict, total=False): quartz_cron_schedule: VariableOr[str] """ - A cron expression using quartz syntax that specifies the schedule for this pipeline. + A cron expression using quartz syntax that specifies the schedule for this alert. Should use the quartz format described here: http://www.quartz-scheduler.org/documentation/quartz-2.1.7/tutorials/tutorial-lesson-06.html """ @@ -63,7 +63,7 @@ class CronScheduleDict(TypedDict, total=False): pause_status: VariableOrOptional[SchedulePauseStatusParam] """ - Indicate whether this schedule is paused or not. + Indicates whether this schedule is paused. While paused, the alert is not evaluated. """ diff --git a/python/databricks/bundles/features/_models/delta_table_source.py b/python/databricks/bundles/features/_models/delta_table_source.py index 3caedb40fa6..1a959f3cb76 100644 --- a/python/databricks/bundles/features/_models/delta_table_source.py +++ b/python/databricks/bundles/features/_models/delta_table_source.py @@ -29,13 +29,14 @@ class DeltaTableSource: filter_condition: VariableOrOptional[str] = None """ - Single WHERE clause to filter delta table before applying transformations. Will be row-wise evaluated, so should only include conditionals and projections. + A single WHERE clause to filter the Delta table before applying transformations. + The predicate is evaluated for each row. """ transformation_sql: VariableOrOptional[str] = None """ A single SQL SELECT expression applied after filter_condition. - Should contains all the columns needed (eg. "SELECT *, col_a + col_b AS col_c FROM x.y.z WHERE col_a > 0" would have `transformation_sql` "*, col_a + col_b AS col_c") + The expression must contain all required columns (e.g., "*, col_a + col_b AS col_c"). If transformation_sql is not provided, all columns of the delta table are present in the DataSource dataframe. """ @@ -64,13 +65,14 @@ class DeltaTableSourceDict(TypedDict, total=False): filter_condition: VariableOrOptional[str] """ - Single WHERE clause to filter delta table before applying transformations. Will be row-wise evaluated, so should only include conditionals and projections. + A single WHERE clause to filter the Delta table before applying transformations. + The predicate is evaluated for each row. """ transformation_sql: VariableOrOptional[str] """ A single SQL SELECT expression applied after filter_condition. - Should contains all the columns needed (eg. "SELECT *, col_a + col_b AS col_c FROM x.y.z WHERE col_a > 0" would have `transformation_sql` "*, col_a + col_b AS col_c") + The expression must contain all required columns (e.g., "*, col_a + col_b AS col_c"). If transformation_sql is not provided, all columns of the delta table are present in the DataSource dataframe. """ 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/bundles/model_serving_endpoints/_models/model_serving_endpoint.py b/python/databricks/bundles/model_serving_endpoints/_models/model_serving_endpoint.py index 64ecfbd87d1..6e18317e1cd 100644 --- a/python/databricks/bundles/model_serving_endpoints/_models/model_serving_endpoint.py +++ b/python/databricks/bundles/model_serving_endpoints/_models/model_serving_endpoint.py @@ -74,6 +74,9 @@ class ModelServingEndpoint(Resource): """ description: VariableOrOptional[str] = None + """ + The description of the serving endpoint. + """ email_notifications: VariableOrOptional[EmailNotifications] = None """ @@ -145,6 +148,9 @@ class ModelServingEndpointDict(TypedDict, total=False): """ description: VariableOrOptional[str] + """ + The description of the serving endpoint. + """ email_notifications: VariableOrOptional[EmailNotificationsParam] """ diff --git a/python/databricks/bundles/model_serving_endpoints/_models/route.py b/python/databricks/bundles/model_serving_endpoints/_models/route.py index eba4336b0fc..e609aa81376 100644 --- a/python/databricks/bundles/model_serving_endpoints/_models/route.py +++ b/python/databricks/bundles/model_serving_endpoints/_models/route.py @@ -21,6 +21,9 @@ class Route: """ served_entity_name: VariableOrOptional[str] = None + """ + The name of the served entity this route configures traffic for. + """ served_model_name: VariableOrOptional[str] = None """ @@ -44,6 +47,9 @@ class RouteDict(TypedDict, total=False): """ served_entity_name: VariableOrOptional[str] + """ + The name of the served entity this route configures traffic for. + """ served_model_name: VariableOrOptional[str] """ diff --git a/python/databricks/bundles/model_serving_endpoints/_models/served_entity_input.py b/python/databricks/bundles/model_serving_endpoints/_models/served_entity_input.py index e40050ca3e6..f5d2e78c42a 100644 --- a/python/databricks/bundles/model_serving_endpoints/_models/served_entity_input.py +++ b/python/databricks/bundles/model_serving_endpoints/_models/served_entity_input.py @@ -36,6 +36,9 @@ class ServedEntityInput: """ entity_version: VariableOrOptional[str] = None + """ + The version of the model in Databricks Model Registry or Unity Catalog to be served, or empty if the entity is a FEATURE_SPEC function. + """ environment_vars: VariableOrDict[str] = field(default_factory=dict) """ @@ -121,6 +124,9 @@ class ServedEntityInputDict(TypedDict, total=False): """ entity_version: VariableOrOptional[str] + """ + The version of the model in Databricks Model Registry or Unity Catalog to be served, or empty if the entity is a FEATURE_SPEC function. + """ environment_vars: VariableOrDict[str] """ diff --git a/python/databricks/bundles/model_serving_endpoints/_models/served_model_input.py b/python/databricks/bundles/model_serving_endpoints/_models/served_model_input.py index 90c98757af5..3e1922f71dd 100644 --- a/python/databricks/bundles/model_serving_endpoints/_models/served_model_input.py +++ b/python/databricks/bundles/model_serving_endpoints/_models/served_model_input.py @@ -24,8 +24,14 @@ class ServedModelInput: """""" model_name: VariableOr[str] + """ + The name of the model in Databricks Model Registry to be served or, if the model resides in Unity Catalog, the full name of the model in the form of **catalog_name.schema_name.model_name**. + """ model_version: VariableOr[str] + """ + The version of the model in Databricks Model Registry or Unity Catalog to be served. + """ scale_to_zero_enabled: VariableOr[bool] """ @@ -101,8 +107,14 @@ class ServedModelInputDict(TypedDict, total=False): """""" model_name: VariableOr[str] + """ + The name of the model in Databricks Model Registry to be served or, if the model resides in Unity Catalog, the full name of the model in the form of **catalog_name.schema_name.model_name**. + """ model_version: VariableOr[str] + """ + The version of the model in Databricks Model Registry or Unity Catalog to be served. + """ scale_to_zero_enabled: VariableOr[bool] """ 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 3914be034ef9b9bc17b7d95ead97ca6a4d6aa62c Mon Sep 17 00:00:00 2001 From: "pieter.noordhuis" Date: Fri, 13 Nov 2026 12:39:28 +0000 Subject: [PATCH 2/5] Link the Go SDK v0.199.0 changelog fragment to the PR Co-authored-by: Isaac --- .nextchanges/dependency-updates/go-sdk-v0.199.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.nextchanges/dependency-updates/go-sdk-v0.199.0.md b/.nextchanges/dependency-updates/go-sdk-v0.199.0.md index 48599f33a5e..4c0eb3cf32b 100644 --- a/.nextchanges/dependency-updates/go-sdk-v0.199.0.md +++ b/.nextchanges/dependency-updates/go-sdk-v0.199.0.md @@ -1 +1 @@ -* Update the Go SDK to [v0.199.0](https://github.com/databricks/databricks-sdk-go/releases/tag/v0.199.0). +* Update the Go SDK to [v0.199.0](https://github.com/databricks/databricks-sdk-go/releases/tag/v0.199.0). ([#7584](https://github.com/databricks/cli/pull/7584)) From fb3bd275bd7fa6d86b1dab26ffd592fd1f7b6625 Mon Sep 17 00:00:00 2001 From: "pieter.noordhuis" Date: Fri, 13 Nov 2026 12:39:29 +0000 Subject: [PATCH 3/5] Suppress SA1019 on alert run_as_user_name The SDK deprecates AlertV2.RunAsUserName in favor of run_as, but alert files still accept run_as_user_name, so the field stays mapped. Co-authored-by: Isaac --- bundle/config/mutator/load_dbalert_files.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundle/config/mutator/load_dbalert_files.go b/bundle/config/mutator/load_dbalert_files.go index 437095aa218..2f2c42edffc 100644 --- a/bundle/config/mutator/load_dbalert_files.go +++ b/bundle/config/mutator/load_dbalert_files.go @@ -178,7 +178,7 @@ func (m *loadDBAlertFiles) Apply(ctx context.Context, b *bundle.Bundle) diag.Dia Evaluation: dbalertFromFile.Evaluation, EffectiveRunAs: dbalertFromFile.EffectiveRunAs, RunAs: dbalertFromFile.RunAs, - RunAsUserName: dbalertFromFile.RunAsUserName, + RunAsUserName: dbalertFromFile.RunAsUserName, //nolint:staticcheck // SA1019: run_as_user_name is still accepted in alert files; run_as is the replacement ParentPath: dbalertFromFile.ParentPath, Parameters: dbalertFromFile.Parameters, CustomTemplateFormat: dbalertFromFile.CustomTemplateFormat, From 117f32ede8b9d68a2370d28db8423c819d19c460 Mon Sep 17 00:00:00 2001 From: "pieter.noordhuis" Date: Fri, 13 Nov 2026 12:39:31 +0000 Subject: [PATCH 4/5] Drop the malformed DeltaTableSource.transformation_sql pydabs docstring Its example's leading '*' opens an unclosed RST emphasis span, which fails the pydabs docs build with a Sphinx warning. Co-authored-by: Isaac --- python/codegen/codegen/jsonschema_patch.py | 3 +++ .../bundles/features/_models/delta_table_source.py | 10 ---------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/python/codegen/codegen/jsonschema_patch.py b/python/codegen/codegen/jsonschema_patch.py index 052995c51b5..33764b5b273 100644 --- a/python/codegen/codegen/jsonschema_patch.py +++ b/python/codegen/codegen/jsonschema_patch.py @@ -32,6 +32,9 @@ DROP_FIELD_DESCRIPTIONS: dict[str, list[str]] = { "jobs.DeploymentSpec": ["command_path"], "compute.InstancePoolGcpAttributes": ["gcp_availability"], + # ml.DeltaTableSource.transformation_sql: the example's leading `*` opens an RST + # emphasis span that is never closed, which Sphinx reports as a docs warning. + "ml.DeltaTableSource": ["transformation_sql"], } diff --git a/python/databricks/bundles/features/_models/delta_table_source.py b/python/databricks/bundles/features/_models/delta_table_source.py index 1a959f3cb76..e02fcd22b88 100644 --- a/python/databricks/bundles/features/_models/delta_table_source.py +++ b/python/databricks/bundles/features/_models/delta_table_source.py @@ -34,11 +34,6 @@ class DeltaTableSource: """ transformation_sql: VariableOrOptional[str] = None - """ - A single SQL SELECT expression applied after filter_condition. - The expression must contain all required columns (e.g., "*, col_a + col_b AS col_c"). - If transformation_sql is not provided, all columns of the delta table are present in the DataSource dataframe. - """ @classmethod def from_dict(cls, value: "DeltaTableSourceDict") -> "Self": @@ -70,11 +65,6 @@ class DeltaTableSourceDict(TypedDict, total=False): """ transformation_sql: VariableOrOptional[str] - """ - A single SQL SELECT expression applied after filter_condition. - The expression must contain all required columns (e.g., "*, col_a + col_b AS col_c"). - If transformation_sql is not provided, all columns of the delta table are present in the DataSource dataframe. - """ DeltaTableSourceParam = DeltaTableSourceDict | DeltaTableSource From dc684e4d5f231ae56f5ce4f42c328c88e08fa037 Mon Sep 17 00:00:00 2001 From: "pieter.noordhuis" Date: Fri, 13 Nov 2026 12:39:32 +0000 Subject: [PATCH 5/5] Restore ssh and run-local-node goldens to main; regenerate postgres goldens The bumper recorded 'Exit code: N' for these two tests instead of their real output; main's goldens are the correct ones. Postgres goldens regenerated with -update for the spec echo fix from #7596. 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 - .../workspace/apps/run-local-node/output.txt | 26 +++- acceptance/ssh/agent-launchers/output.txt | 48 ++++++- 78 files changed, 282 insertions(+), 1331 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 5e86372ab90..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-7a0c804e-cae7-733a-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 b0edefae5f6..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 @@ -1,42 +1,4 @@ -{ - "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": "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]/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 15901d1c2df..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/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": "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": "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/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