From b84bdeceba54b3df19f5b71d72edea873d4fa986 Mon Sep 17 00:00:00 2001 From: "databricks-ci-ghec-2[bot]" <184307802+databricks-ci-ghec-2[bot]@users.noreply.github.com> Date: Mon, 17 Aug 2026 04:14:26 +0000 Subject: [PATCH] Update SDK to bfbf36f3d00ae4fc2ec5ad1a854ddac294d41733 --- .codegen/_openapi_sha | 2 +- .gitattributes | 1 - NEXT_CHANGELOG.md | 5 +- .../BundleDeploymentsAPI.java | 41 ++++------ .../BundleDeploymentsImpl.java | 18 ---- .../BundleDeploymentsService.java | 39 ++++----- .../CreateOperationRequest.java | 82 ------------------- .../service/bundledeployments/Operation.java | 44 ++++++---- .../UpdateOperationRequest.java | 4 +- 9 files changed, 67 insertions(+), 169 deletions(-) delete mode 100644 databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/CreateOperationRequest.java diff --git a/.codegen/_openapi_sha b/.codegen/_openapi_sha index eed3c8e0d..1f8d63cb3 100644 --- a/.codegen/_openapi_sha +++ b/.codegen/_openapi_sha @@ -1 +1 @@ -d82f531319f8217ca03dd34c2bc15f51ba6ada0c \ No newline at end of file +bfbf36f3d00ae4fc2ec5ad1a854ddac294d41733 \ No newline at end of file diff --git a/.gitattributes b/.gitattributes index eefcde7dc..185259c36 100644 --- a/.gitattributes +++ b/.gitattributes @@ -283,7 +283,6 @@ databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/B databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/BundleDeploymentsService.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/CompleteVersionRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/CreateDeploymentRequest.java linguist-generated=true -databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/CreateOperationRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/CreateVersionRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/DashboardMetadata.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/DeleteDeploymentRequest.java linguist-generated=true diff --git a/NEXT_CHANGELOG.md b/NEXT_CHANGELOG.md index 238c3b221..141d08e63 100644 --- a/NEXT_CHANGELOG.md +++ b/NEXT_CHANGELOG.md @@ -28,4 +28,7 @@ * Add `PG_SPECIFIC_TYPE_HALFVEC` and `PG_SPECIFIC_TYPE_VARCHAR` enum values for `com.databricks.sdk.service.postgres.SyncedTableSyncedTableSpecPgSpecificType`. * [Breaking] Add pagination for `accountClient.accountIamV2().listWorkspaceAssignments()` method. * [Breaking] Add pagination for `workspaceClient.workspaceIamV2().listWorkspaceAssignmentsProxy()` method. -* Add `linkedinAdsOptions` and `marketoOptions` fields for `com.databricks.sdk.service.pipelines.ConnectorOptions`. \ No newline at end of file +* Add `linkedinAdsOptions` and `marketoOptions` fields for `com.databricks.sdk.service.pipelines.ConnectorOptions`. +* [Breaking] Change `actionType` and `status` fields for `com.databricks.sdk.service.bundledeployments.Operation` to no longer be required. +* Change `actionType` and `status` fields for `com.databricks.sdk.service.bundledeployments.Operation` to no longer be required. +* [Breaking] Remove `createOperation()` method for `workspaceClient.bundleDeployments()` service. \ No newline at end of file diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/BundleDeploymentsAPI.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/BundleDeploymentsAPI.java index 6dd537345..243022ba3 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/BundleDeploymentsAPI.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/BundleDeploymentsAPI.java @@ -40,21 +40,6 @@ public Deployment createDeployment(CreateDeploymentRequest request) { return impl.createDeployment(request); } - /** - * Creates a resource operation under a version. - * - *

The caller must provide a `resource_key` which becomes the final component of the - * operation's name. If an operation with the same key already exists under the version, the - * server returns `ALREADY_EXISTS`. - * - *

On success the server also updates the corresponding deployment-level resource, creating it - * if this is the first operation for that resource_key and removing it if the operation records - * no `state` (see that field). - */ - public Operation createOperation(CreateOperationRequest request) { - return impl.createOperation(request); - } - /** * Creates a new version under a deployment. * @@ -63,6 +48,12 @@ public Operation createOperation(CreateOperationRequest request) { * than the deployment's most recent version, and sets the version's `previous_version_id` to the * deployment's most recent version (leaving it unset for the first version), which the server * validates to detect concurrent deploys. + * + *

The caller also provides the full set of `operations` planned for this version, each + * identified by a `resource_key` and an `action_type`. The server records one operation per + * resource in `OPERATION_STATUS_PENDING` in the same transaction as the version, so the plan is + * captured atomically. The outcome of each operation is recorded later via UpdateOperation as the + * resource is applied; the set of operations cannot be changed after the version is created. */ public Version createVersion(CreateVersionRequest request) { return impl.createVersion(request); @@ -202,16 +193,16 @@ public Iterable listVersions(ListVersionsRequest request) { /** * Updates a resource operation's mutable fields. * - *

`state`, `error_message`, `resource_id`, and `status` may be updated, independently; - * `update_mask` must contain only those paths. All other fields are immutable. The update is - * guarded by an optimistic-concurrency check: the caller sets `operation.sequence_id` to the - * value it last observed, and the server rejects the update with `ABORTED` if the operation has - * been modified since. On success the server increments `sequence_id`; updates to `state` and - * `resource_id` are mirrored onto the corresponding deployment-level resource. Listing `state` in - * `update_mask` with no value clears it, which removes the resource, so a delete that is retried - * until it succeeds must clear `state`. The parent version must be in progress, and after the - * update is applied a succeeded operation cannot carry an `error_message`. See the `state` and - * `resource_id` fields for the rest. + *

`state`, `error_message`, `resource_id`, `status`, and `dashboard_metadata` may be updated, + * independently; `update_mask` must contain only those paths. All other fields are immutable. The + * update is guarded by an optimistic-concurrency check: the caller sets `operation.sequence_id` + * to the value it last observed, and the server rejects the update with `ABORTED` if the + * operation has been modified since. On success the server increments `sequence_id`; updates to + * `state`, `resource_id`, and `dashboard_metadata` are mirrored onto the corresponding + * deployment-level resource. Listing `state` in `update_mask` with no value clears it, which + * removes the resource, so a delete that is retried until it succeeds must clear `state`. The + * parent version must be in progress, and after the update is applied a succeeded operation + * cannot carry an `error_message`. See the `state` and `resource_id` fields for the rest. */ public Operation updateOperation(UpdateOperationRequest request) { return impl.updateOperation(request); diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/BundleDeploymentsImpl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/BundleDeploymentsImpl.java index e7bb2c68d..b3531a66c 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/BundleDeploymentsImpl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/BundleDeploymentsImpl.java @@ -52,24 +52,6 @@ public Deployment createDeployment(CreateDeploymentRequest request) { } } - @Override - public Operation createOperation(CreateOperationRequest request) { - String path = String.format("/api/2.0/bundle/%s/operations", request.getParent()); - try { - Request req = new Request("POST", path, apiClient.serialize(request.getOperation())); - - ApiClient.setQuery(req, request); - req.withHeader("Accept", "application/json"); - req.withHeader("Content-Type", "application/json"); - if (apiClient.workspaceId() != null) { - req.withHeader("X-Databricks-Workspace-Id", apiClient.workspaceId()); - } - return apiClient.execute(req, Operation.class); - } catch (IOException e) { - throw new DatabricksException("IO error: " + e.getMessage(), e); - } - } - @Override public Version createVersion(CreateVersionRequest request) { String path = String.format("/api/2.0/bundle/%s/versions", request.getParent()); diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/BundleDeploymentsService.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/BundleDeploymentsService.java index 4d39a05fa..9daaf27a1 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/BundleDeploymentsService.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/BundleDeploymentsService.java @@ -24,19 +24,6 @@ public interface BundleDeploymentsService { /** Creates a new deployment in the workspace. */ Deployment createDeployment(CreateDeploymentRequest createDeploymentRequest); - /** - * Creates a resource operation under a version. - * - *

The caller must provide a `resource_key` which becomes the final component of the - * operation's name. If an operation with the same key already exists under the version, the - * server returns `ALREADY_EXISTS`. - * - *

On success the server also updates the corresponding deployment-level resource, creating it - * if this is the first operation for that resource_key and removing it if the operation records - * no `state` (see that field). - */ - Operation createOperation(CreateOperationRequest createOperationRequest); - /** * Creates a new version under a deployment. * @@ -45,6 +32,12 @@ public interface BundleDeploymentsService { * than the deployment's most recent version, and sets the version's `previous_version_id` to the * deployment's most recent version (leaving it unset for the first version), which the server * validates to detect concurrent deploys. + * + *

The caller also provides the full set of `operations` planned for this version, each + * identified by a `resource_key` and an `action_type`. The server records one operation per + * resource in `OPERATION_STATUS_PENDING` in the same transaction as the version, so the plan is + * captured atomically. The outcome of each operation is recorded later via UpdateOperation as the + * resource is applied; the set of operations cannot be changed after the version is created. */ Version createVersion(CreateVersionRequest createVersionRequest); @@ -90,16 +83,16 @@ public interface BundleDeploymentsService { /** * Updates a resource operation's mutable fields. * - *

`state`, `error_message`, `resource_id`, and `status` may be updated, independently; - * `update_mask` must contain only those paths. All other fields are immutable. The update is - * guarded by an optimistic-concurrency check: the caller sets `operation.sequence_id` to the - * value it last observed, and the server rejects the update with `ABORTED` if the operation has - * been modified since. On success the server increments `sequence_id`; updates to `state` and - * `resource_id` are mirrored onto the corresponding deployment-level resource. Listing `state` in - * `update_mask` with no value clears it, which removes the resource, so a delete that is retried - * until it succeeds must clear `state`. The parent version must be in progress, and after the - * update is applied a succeeded operation cannot carry an `error_message`. See the `state` and - * `resource_id` fields for the rest. + *

`state`, `error_message`, `resource_id`, `status`, and `dashboard_metadata` may be updated, + * independently; `update_mask` must contain only those paths. All other fields are immutable. The + * update is guarded by an optimistic-concurrency check: the caller sets `operation.sequence_id` + * to the value it last observed, and the server rejects the update with `ABORTED` if the + * operation has been modified since. On success the server increments `sequence_id`; updates to + * `state`, `resource_id`, and `dashboard_metadata` are mirrored onto the corresponding + * deployment-level resource. Listing `state` in `update_mask` with no value clears it, which + * removes the resource, so a delete that is retried until it succeeds must clear `state`. The + * parent version must be in progress, and after the update is applied a succeeded operation + * cannot carry an `error_message`. See the `state` and `resource_id` fields for the rest. */ Operation updateOperation(UpdateOperationRequest updateOperationRequest); } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/CreateOperationRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/CreateOperationRequest.java deleted file mode 100644 index cd68f6929..000000000 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/CreateOperationRequest.java +++ /dev/null @@ -1,82 +0,0 @@ -// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. - -package com.databricks.sdk.service.bundledeployments; - -import com.databricks.sdk.support.Generated; -import com.databricks.sdk.support.QueryParam; -import com.databricks.sdk.support.ToStringer; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Objects; - -@Generated -public class CreateOperationRequest { - /** The resource operation to create. */ - @JsonProperty("operation") - private Operation operation; - - /** - * The parent version where this operation will be recorded. Format: - * deployments/{deployment_id}/versions/{version_id} - */ - @JsonIgnore private String parent; - - /** - * The key identifying the resource this operation applies to. Becomes the final component of the - * operation's name. - */ - @JsonIgnore - @QueryParam("resource_key") - private String resourceKey; - - public CreateOperationRequest setOperation(Operation operation) { - this.operation = operation; - return this; - } - - public Operation getOperation() { - return operation; - } - - public CreateOperationRequest setParent(String parent) { - this.parent = parent; - return this; - } - - public String getParent() { - return parent; - } - - public CreateOperationRequest setResourceKey(String resourceKey) { - this.resourceKey = resourceKey; - return this; - } - - public String getResourceKey() { - return resourceKey; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - CreateOperationRequest that = (CreateOperationRequest) o; - return Objects.equals(operation, that.operation) - && Objects.equals(parent, that.parent) - && Objects.equals(resourceKey, that.resourceKey); - } - - @Override - public int hashCode() { - return Objects.hash(operation, parent, resourceKey); - } - - @Override - public String toString() { - return new ToStringer(CreateOperationRequest.class) - .add("operation", operation) - .add("parent", parent) - .add("resourceKey", resourceKey) - .toString(); - } -} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/Operation.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/Operation.java index 65cf413eb..a3a41101d 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/Operation.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/Operation.java @@ -9,14 +9,20 @@ import java.util.Objects; /** - * An operation on a single resource performed during a version. Operations record the result of - * applying a resource change to the workspace. Most fields are immutable once recorded; `state`, - * `error_message`, `resource_id`, and `status` may be updated afterwards (via UpdateOperation), - * guarded by `sequence_id` for optimistic concurrency control. + * An operation on a single resource performed during a version. The full set of operations for a + * version is recorded when the version is created: each carries its `resource_key` and + * `action_type` and starts in `OPERATION_STATUS_PENDING`. As each resource is applied, its + * operation is updated (via UpdateOperation) to record the result of applying the change to the + * workspace. `state`, `error_message`, `resource_id`, `status`, and `dashboard_metadata` may be + * updated afterwards, guarded by `sequence_id` for optimistic concurrency control; all other fields + * are immutable once recorded. */ @Generated public class Operation { - /** The type of operation performed on this resource. */ + /** + * The type of operation performed on this resource. Set when the version is created and immutable + * thereafter. + */ @JsonProperty("action_type") private OperationActionType actionType; @@ -24,7 +30,11 @@ public class Operation { @JsonProperty("create_time") private Timestamp createTime; - /** Dashboard-specific metadata; set only for dashboard resources. */ + /** + * Dashboard-specific metadata; set only for dashboard resources. Mutable: may be set or updated + * via UpdateOperation as the resource is applied, and is mirrored onto the corresponding + * deployment-level resource. + */ @JsonProperty("dashboard_metadata") private DashboardMetadata dashboardMetadata; @@ -56,7 +66,8 @@ public class Operation { /** * Resource identifier within the bundle (e.g. "jobs.foo", "pipelines.bar", * "jobs.foo.permissions", "files."). Can be an arbitrary UTF-8 encoded string key. This - * key links the operation to the corresponding deployment-level Resource. + * key links the operation to the corresponding deployment-level Resource. Set when the version is + * created and immutable thereafter. */ @JsonProperty("resource_key") private String resourceKey; @@ -71,12 +82,12 @@ public class Operation { /** * Monotonically increasing revision used for optimistic concurrency control (the AIP-154 * concurrency token for this resource, realized as a sequence number rather than an opaque etag). - * The server assigns 1 on creation and increments it on every successful UpdateOperation. It is - * OPTIONAL rather than OUTPUT_ONLY because it is dual-purpose: CreateOperation/GetOperation - * return the current value, and UpdateOperation reads the caller-supplied value as a - * precondition. The caller must echo the value it last observed; if it no longer matches the - * server's value, the update is rejected with ABORTED so the caller can re-read and retry. - * Ignored on CreateOperation. + * The server assigns 0 when the operation is created and increments it on every successful + * UpdateOperation, so a never-updated operation is at 0 and the first successful update makes it + * 1. It is OPTIONAL rather than OUTPUT_ONLY because it is dual-purpose: GetOperation returns the + * current value, and UpdateOperation reads the caller-supplied value as a precondition. The + * caller must echo the value it last observed; if it no longer matches the server's value, the + * update is rejected with ABORTED so the caller can re-read and retry. */ @JsonProperty("sequence_id") private Long sequenceId; @@ -106,9 +117,10 @@ public class Operation { private String state; /** - * Whether the operation succeeded or failed. Mutable: may be updated after creation via - * UpdateOperation, e.g. when an operation recorded as failed is retried and eventually succeeds. - * A succeeded operation cannot carry an `error_message`. + * Status of the operation. Starts as OPERATION_STATUS_PENDING when the version is created and + * moves to a terminal status once the resource is applied. Mutable: updated via UpdateOperation, + * e.g. when an operation recorded as failed is retried and eventually succeeds. A succeeded + * operation cannot carry an `error_message`. */ @JsonProperty("status") private OperationStatus status; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/UpdateOperationRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/UpdateOperationRequest.java index b4dc54595..f0b6e2509 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/UpdateOperationRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/bundledeployments/UpdateOperationRequest.java @@ -28,8 +28,8 @@ public class UpdateOperationRequest { /** * The set of fields to update. Required; supported paths are `state`, `error_message`, - * `resource_id`, and `status`. An empty mask or any other path is rejected with - * INVALID_PARAMETER_VALUE. + * `resource_id`, `status`, and `dashboard_metadata`. An empty mask or any other path is rejected + * with INVALID_PARAMETER_VALUE. */ @JsonIgnore @QueryParam("update_mask")