From 0abed7ac2c468fa932961d98e9cd8cedc5f333a2 Mon Sep 17 00:00:00 2001 From: "databricks-ci-ghec-2[bot]" <184307802+databricks-ci-ghec-2[bot]@users.noreply.github.com> Date: Sat, 20 Jun 2026 04:59:36 +0000 Subject: [PATCH] Update SDK to 951ffbf1551ea1d4347a91e1b3955298605c7526 --- .codegen/_openapi_sha | 2 +- NEXT_CHANGELOG.md | 2 +- service/bundledeployments/api.go | 15 +++++---- service/bundledeployments/impl.go | 8 ++--- service/bundledeployments/interface.go | 11 +++--- service/bundledeployments/model.go | 46 ++++++++++++++++++-------- 6 files changed, 54 insertions(+), 30 deletions(-) diff --git a/.codegen/_openapi_sha b/.codegen/_openapi_sha index 4da5ee019..e68a3ddf5 100755 --- a/.codegen/_openapi_sha +++ b/.codegen/_openapi_sha @@ -1 +1 @@ -666a25255b50c87fe6fb8a2e573c92c841b048fd \ No newline at end of file +951ffbf1551ea1d4347a91e1b3955298605c7526 \ No newline at end of file diff --git a/NEXT_CHANGELOG.md b/NEXT_CHANGELOG.md index aeb8506d8..31b430fdb 100755 --- a/NEXT_CHANGELOG.md +++ b/NEXT_CHANGELOG.md @@ -15,4 +15,4 @@ ### Internal Changes ### API Changes -* Add `Xlarge` enum value for [apps.ComputeSize](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/apps#ComputeSize). \ No newline at end of file +* Add `Xlarge` enum value for [apps.ComputeSize](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/apps#ComputeSize). diff --git a/service/bundledeployments/api.go b/service/bundledeployments/api.go index bcda60a42..8474b8f49 100755 --- a/service/bundledeployments/api.go +++ b/service/bundledeployments/api.go @@ -41,8 +41,11 @@ type BundleDeploymentsInterface interface { // Creates a new version under a deployment. // // Creating a version acquires an exclusive lock on the deployment, preventing - // concurrent deploys. The caller provides a `version_id` which the server - // validates equals `last_version_id + 1` on the deployment. + // concurrent deploys. The caller provides a `version_id`, a numeric string that + // must be numerically greater 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. CreateVersion(ctx context.Context, request CreateVersionRequest) (*Version, error) // Deletes a deployment. @@ -102,14 +105,14 @@ type BundleDeploymentsInterface interface { // This method is generated by Databricks SDK Code Generator. ListResourcesAll(ctx context.Context, request ListResourcesRequest) ([]Resource, error) - // Lists versions under a deployment, ordered by version_id descending (most - // recent first). + // Lists versions under a deployment, ordered numerically by version_id + // descending (most recent first). // // This method is generated by Databricks SDK Code Generator. ListVersions(ctx context.Context, request ListVersionsRequest) listing.Iterator[Version] - // Lists versions under a deployment, ordered by version_id descending (most - // recent first). + // Lists versions under a deployment, ordered numerically by version_id + // descending (most recent first). // // This method is generated by Databricks SDK Code Generator. ListVersionsAll(ctx context.Context, request ListVersionsRequest) ([]Version, error) diff --git a/service/bundledeployments/impl.go b/service/bundledeployments/impl.go index 0045b2126..c18aedd85 100755 --- a/service/bundledeployments/impl.go +++ b/service/bundledeployments/impl.go @@ -308,8 +308,8 @@ func (a *bundleDeploymentsImpl) internalListResources(ctx context.Context, reque return &listResourcesResponse, err } -// Lists versions under a deployment, ordered by version_id descending (most -// recent first). +// Lists versions under a deployment, ordered numerically by version_id +// descending (most recent first). func (a *bundleDeploymentsImpl) ListVersions(ctx context.Context, request ListVersionsRequest) listing.Iterator[Version] { getNextPage := func(ctx context.Context, req ListVersionsRequest) (*ListVersionsResponse, error) { @@ -334,8 +334,8 @@ func (a *bundleDeploymentsImpl) ListVersions(ctx context.Context, request ListVe return iterator } -// Lists versions under a deployment, ordered by version_id descending (most -// recent first). +// Lists versions under a deployment, ordered numerically by version_id +// descending (most recent first). func (a *bundleDeploymentsImpl) ListVersionsAll(ctx context.Context, request ListVersionsRequest) ([]Version, error) { iterator := a.ListVersions(ctx, request) return listing.ToSlice[Version](ctx, iterator) diff --git a/service/bundledeployments/interface.go b/service/bundledeployments/interface.go index da91663dd..d3cef5a1d 100755 --- a/service/bundledeployments/interface.go +++ b/service/bundledeployments/interface.go @@ -40,8 +40,11 @@ type BundleDeploymentsService interface { // Creates a new version under a deployment. // // Creating a version acquires an exclusive lock on the deployment, - // preventing concurrent deploys. The caller provides a `version_id` which - // the server validates equals `last_version_id + 1` on the deployment. + // preventing concurrent deploys. The caller provides a `version_id`, a + // numeric string that must be numerically greater 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. CreateVersion(ctx context.Context, request CreateVersionRequest) (*Version, error) // Deletes a deployment. @@ -81,7 +84,7 @@ type BundleDeploymentsService interface { // Lists resources under a deployment. ListResources(ctx context.Context, request ListResourcesRequest) (*ListResourcesResponse, error) - // Lists versions under a deployment, ordered by version_id descending (most - // recent first). + // Lists versions under a deployment, ordered numerically by version_id + // descending (most recent first). ListVersions(ctx context.Context, request ListVersionsRequest) (*ListVersionsResponse, error) } diff --git a/service/bundledeployments/model.go b/service/bundledeployments/model.go index b1e46fccf..f6b1ceccc 100755 --- a/service/bundledeployments/model.go +++ b/service/bundledeployments/model.go @@ -60,9 +60,13 @@ type CreateVersionRequest struct { Parent string `json:"-" url:"-"` // The version to create. Version Version `json:"version"` - // The version ID the caller expects to create. The server validates this - // equals `last_version_id + 1` on the deployment. If it doesn't match, the - // server returns `ABORTED`. + // The ID to use for the version, which becomes the final component of the + // version's resource name. A numeric string (base-10, fits in a signed + // 64-bit integer) chosen by the caller; must be greater than or equal to 1. + // Must be numerically greater than the deployment's most recent version + // (see `version.previous_version_id`); it does not need to start at 1 or + // increase by exactly 1. If the value is not numerically greater, the + // server returns `INVALID_PARAMETER_VALUE`. VersionId string `json:"-" url:"version_id"` } @@ -537,9 +541,11 @@ func (s ListVersionsResponse) MarshalJSON() ([]byte, error) { return marshal.Marshal(s) } -// An operation on a single resource performed during a version. Operations are -// append-only and record the result of applying a resource change to the -// workspace. +// 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. type Operation struct { // The type of operation performed on this resource. ActionType OperationActionType `json:"action_type"` @@ -547,15 +553,19 @@ type Operation struct { CreateTime *time.Time `json:"create_time,omitempty"` // Error message if the operation failed. Set when status is // OPERATION_STATUS_FAILED. Captures the error encountered while applying - // the resource to the workspace. + // the resource to the workspace. Mutable: may be updated after creation via + // UpdateOperation; setting it to an empty string clears it. After an update + // is applied, an operation whose status is OPERATION_STATUS_SUCCEEDED + // cannot carry an error_message. ErrorMessage string `json:"error_message,omitempty"` // Resource name of the operation. Format: // deployments/{deployment_id}/versions/{version_id}/operations/{resource_key} Name string `json:"name,omitempty"` // ID of the actual resource in the workspace (e.g. the job ID, pipeline - // ID). Required for every operation except CREATE and RECREATE, which - // produce a new resource whose ID is not yet known when the operation is - // recorded. + // ID). Optional at creation: CREATE and RECREATE operations produce a new + // resource whose ID is not yet known when the operation is recorded. + // Mutable: may be filled in (or corrected) later via UpdateOperation once + // the ID is known. ResourceId string `json:"resource_id,omitempty"` // Resource identifier within the bundle (e.g. "jobs.foo", "pipelines.bar", // "jobs.foo.permissions", "files."). Can be an arbitrary UTF-8 @@ -567,9 +577,14 @@ type Operation struct { // set this field. ResourceType DeploymentResourceType `json:"resource_type,omitempty"` // Serialized local config state after the operation. Should be unset for - // delete operations. + // delete operations. Mutable: may be updated after creation via + // UpdateOperation. When updating, the caller must echo the last-observed + // `sequence_id` as a concurrency precondition. State *json.RawMessage `json:"state,omitempty"` - // Whether the operation succeeded or failed. + // 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 OperationStatus `json:"status"` ForceSendFields []string `json:"-" url:"-"` @@ -743,8 +758,11 @@ type Version struct { Status VersionStatus `json:"status,omitempty"` // Target name of the deployment, captured at the time of this version. TargetName string `json:"target_name,omitempty"` - // Monotonically increasing version identifier within the parent deployment. - // Assigned by the client on creation. + // Version identifier within the parent deployment, assigned by the client + // on creation. A numeric string (base-10, fits in a signed 64-bit integer) + // that is greater than or equal to 1. Version IDs are strictly increasing + // within a deployment but are not required to start at 1 or to be + // contiguous. VersionId string `json:"version_id,omitempty"` // Type of version (deploy or destroy). VersionType VersionType `json:"version_type"`