diff --git a/.codegen/_openapi_sha b/.codegen/_openapi_sha index 5b1909bd6..a405652c5 100644 --- a/.codegen/_openapi_sha +++ b/.codegen/_openapi_sha @@ -1 +1 @@ -c235e54b9b6176af240981f9efb71bac931e3025 \ No newline at end of file +3fbcd04d4f00add0cfd101fa8d1a546aaea51d11 \ No newline at end of file diff --git a/.gitattributes b/.gitattributes index b50ee9949..f65901305 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2205,7 +2205,6 @@ databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/LoggedModelInfo. databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/LoggedModelParameter.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/LoggedModelStatus.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/LoggedModelTag.java linguist-generated=true -databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/LongRollingWindow.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/MaterializedFeature.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/MaterializedFeaturePipelineScheduleState.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/MaterializedFeaturesAPI.java linguist-generated=true @@ -2329,6 +2328,7 @@ databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/UpdateWebhookRes databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/VarPopFunction.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/VarSampFunction.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/ViewType.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/networking/AwsVpcEndpointInfo.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/networking/AzurePrivateEndpointInfo.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/networking/CreateEndpointRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/networking/DeleteEndpointRequest.java linguist-generated=true @@ -2338,6 +2338,7 @@ databricks-sdk-java/src/main/java/com/databricks/sdk/service/networking/Endpoint databricks-sdk-java/src/main/java/com/databricks/sdk/service/networking/EndpointsAPI.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/networking/EndpointsImpl.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/networking/EndpointsService.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/networking/GcpPscEndpointInfo.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/networking/GetEndpointRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/networking/ListEndpointsRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/networking/ListEndpointsResponse.java linguist-generated=true diff --git a/.github/workflows/tagging.yml b/.github/workflows/tagging.yml index d240f16ee..d30ee1665 100644 --- a/.github/workflows/tagging.yml +++ b/.github/workflows/tagging.yml @@ -35,6 +35,15 @@ jobs: github.repository == 'databricks/databricks-sdk-go' || github.repository == 'databricks/databricks-sdk-py' || github.repository == 'databricks/databricks-sdk-java' + env: + # Ref the release is cut from. Releasing from a branch is currently + # supported in the terraform repository only: for + # terraform-provider-databricks this follows the dispatched branch + # (``github.ref_name``), so a release can be cut from a branch other + # than main; every other synced repo (SDK go/py/java, …) stays pinned + # to main, preserving the pre-existing hardcoded-main behaviour and + # blocking branch releases even via a manual non-main dispatch. + RELEASE_REF: ${{ github.repository == 'databricks/terraform-provider-databricks' && github.ref_name || 'main' }} environment: "release-is" runs-on: group: databricks-protected-runner-group @@ -50,12 +59,19 @@ jobs: - name: Checkout repository uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: - # Force re-resolution of ``main`` at step time. Without - # ``ref:``, checkout pins to ``github.sha`` — the SHA frozen - # at workflow_dispatch time — which means re-running a stale - # dispatch checks out an older main even when newer commits - # exist. - ref: main + # Check out the release ref. ``RELEASE_REF`` is the dispatched + # branch for terraform-provider-databricks and ``main`` for every + # other repo (see the job-level ``env``). For scheduled runs and + # manual dispatches left at defaults this is the default branch + # (main); dispatching terraform with ``--ref `` cuts the + # release from that branch instead. + # + # Naming the ref explicitly (rather than omitting ``ref:``) + # forces re-resolution of the branch head at step time. Without + # it, checkout pins to ``github.sha`` — the SHA frozen at + # workflow_dispatch time — so re-running a stale dispatch would + # check out an older commit even when newer ones exist. + ref: ${{ env.RELEASE_REF }} fetch-depth: 0 token: ${{ steps.generate-token.outputs.token }} @@ -73,6 +89,12 @@ jobs: GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }} GITHUB_REPOSITORY: ${{ github.repository }} PACKAGES: ${{ inputs.packages }} + # Branch the release is cut from. tagging.py commits the + # changelog bump and creates the tag on this branch, and its + # concurrent-advance guard checks this branch. Matches the ref + # checked out above (``RELEASE_REF``): the dispatched branch for + # terraform, main everywhere else. + DECO_TAGGING_REF: ${{ env.RELEASE_REF }} run: | if [ -n "$PACKAGES" ]; then uv run --locked tagging.py --package "$PACKAGES" diff --git a/NEXT_CHANGELOG.md b/NEXT_CHANGELOG.md index 5a43f0bbc..e261b6227 100644 --- a/NEXT_CHANGELOG.md +++ b/NEXT_CHANGELOG.md @@ -16,4 +16,11 @@ ### API Changes * Add `dataframeSchema` and `transformationSql` fields for `com.databricks.sdk.service.ml.StreamSource`. -* Add `effectiveTablePrefix` field for `com.databricks.sdk.service.ml.UcTraceLocation`. \ No newline at end of file +* Add `effectiveTablePrefix` field for `com.databricks.sdk.service.ml.UcTraceLocation`. +* Add `performanceTarget` field for `com.databricks.sdk.service.jobs.SubmitRun`. +* Add `awsVpcEndpointInfo` and `gcpPscEndpointInfo` fields for `com.databricks.sdk.service.networking.Endpoint`. +* Add `gitCliEnabled` field for `com.databricks.sdk.service.workspace.GetRepoResponse`. +* Add `KSA_ECC_CCC_DCC` enum value for `com.databricks.sdk.service.settings.ComplianceStandard`. +* [Breaking] Change `createWorkspaceAssignmentDetail()`, `deleteWorkspaceAssignmentDetail()`, `getWorkspaceAccessDetail()`, `getWorkspaceAssignmentDetail()`, `listWorkspaceAssignmentDetails()`, `resolveGroup()`, `resolveServicePrincipal()`, `resolveUser()` and `updateWorkspaceAssignmentDetail()` methods for `accountClient.accountIamV2()` service. Method path has changed. +* [Breaking] Change `createWorkspaceAssignmentDetailProxy()`, `deleteWorkspaceAssignmentDetailProxy()`, `getWorkspaceAccessDetailLocal()`, `getWorkspaceAssignmentDetailProxy()`, `listWorkspaceAssignmentDetailsProxy()`, `resolveGroupProxy()`, `resolveServicePrincipalProxy()`, `resolveUserProxy()` and `updateWorkspaceAssignmentDetailProxy()` methods for `workspaceClient.workspaceIamV2()` service. Method path has changed. +* [Breaking] Remove `longRolling` field for `com.databricks.sdk.service.ml.TimeWindow`. \ No newline at end of file diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/WorkspaceClient.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/WorkspaceClient.java index 5d87fdd64..711a199fa 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/WorkspaceClient.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/WorkspaceClient.java @@ -1905,11 +1905,14 @@ public SharesAPI shares() { * might have already completed execution when the cancel request arrives. Polling for status * until a terminal state is reached is a reliable way to determine the final state. - Wait * timeouts are approximate, occur server-side, and cannot account for things such as caller - * delays and network latency from caller to service. - To guarantee that the statement is kept - * alive, you must poll at least once every 15 minutes. - The results are only available for one - * hour after success; polling does not extend this. - The SQL Execution API must be used for the - * entire lifecycle of the statement. For example, you cannot use the Jobs API to execute the - * command, and then the SQL Execution API to cancel it. + * delays and network latency from caller to service. - To keep a statement alive, poll for its + * status at least once every 15 minutes. Regular polling guarantees the statement stays alive. - + * To stop a statement you no longer need, cancel it explicitly with + * :method:statementexecution/cancelExecution. Stopping polling does not cancel a statement. + * Explicit cancellation is the only way to end statement execution on demand. - The results are + * only available for one hour after success; polling does not extend this. - The SQL Execution + * API must be used for the entire lifecycle of the statement. For example, you cannot use the + * Jobs API to execute the command, and then the SQL Execution API to cancel it. * *

[Apache Arrow Columnar]: https://arrow.apache.org/overview/ [Databricks SQL Statement * Execution API tutorial]: https://docs.databricks.com/sql/api/sql-execution-tutorial.html diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/database/SyncedTableSpecTypeOverride.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/database/SyncedTableSpecTypeOverride.java index 76320da59..0e28eb426 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/database/SyncedTableSpecTypeOverride.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/database/SyncedTableSpecTypeOverride.java @@ -19,8 +19,8 @@ public class SyncedTableSpecTypeOverride { private SyncedTableSpecPgSpecificType pgType; /** - * Size parameter for the target type. Required when pg_type is PG_SPECIFIC_TYPE_VECTOR or - * PG_SPECIFIC_TYPE_HALFVEC (specifies the vector dimension, e.g., 1024). + * Size parameter for the target type, for types that take one (e.g. vector dimension, varchar + * length). Required when the chosen pg_type needs a size. */ @JsonProperty("size") private Long size; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/AccountIamV2Impl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/AccountIamV2Impl.java index 2e2a7b741..471b65aca 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/AccountIamV2Impl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/AccountIamV2Impl.java @@ -21,7 +21,7 @@ public WorkspaceAssignmentDetail createWorkspaceAssignmentDetail( CreateWorkspaceAssignmentDetailRequest request) { String path = String.format( - "/api/2.0/identity/accounts/%s/workspaces/%s/workspaceAssignmentDetails", + "/api/2.0/identity/accounts/%s/workspaces/%s/workspace-assignment-details", apiClient.configuredAccountID(), request.getWorkspaceId()); try { Request req = @@ -40,7 +40,7 @@ public WorkspaceAssignmentDetail createWorkspaceAssignmentDetail( public void deleteWorkspaceAssignmentDetail(DeleteWorkspaceAssignmentDetailRequest request) { String path = String.format( - "/api/2.0/identity/accounts/%s/workspaces/%s/workspaceAssignmentDetails/%s", + "/api/2.0/identity/accounts/%s/workspaces/%s/workspace-assignment-details/%s", apiClient.configuredAccountID(), request.getWorkspaceId(), request.getPrincipalId()); try { Request req = new Request("DELETE", path); @@ -57,7 +57,7 @@ public void deleteWorkspaceAssignmentDetail(DeleteWorkspaceAssignmentDetailReque public WorkspaceAccessDetail getWorkspaceAccessDetail(GetWorkspaceAccessDetailRequest request) { String path = String.format( - "/api/2.0/identity/accounts/%s/workspaces/%s/workspaceAccessDetails/%s", + "/api/2.0/identity/accounts/%s/workspaces/%s/workspace-access-details/%s", apiClient.configuredAccountID(), request.getWorkspaceId(), request.getPrincipalId()); try { Request req = new Request("GET", path); @@ -75,7 +75,7 @@ public WorkspaceAssignmentDetail getWorkspaceAssignmentDetail( GetWorkspaceAssignmentDetailRequest request) { String path = String.format( - "/api/2.0/identity/accounts/%s/workspaces/%s/workspaceAssignmentDetails/%s", + "/api/2.0/identity/accounts/%s/workspaces/%s/workspace-assignment-details/%s", apiClient.configuredAccountID(), request.getWorkspaceId(), request.getPrincipalId()); try { Request req = new Request("GET", path); @@ -93,7 +93,7 @@ public ListWorkspaceAssignmentDetailsResponse listWorkspaceAssignmentDetails( ListWorkspaceAssignmentDetailsRequest request) { String path = String.format( - "/api/2.0/identity/accounts/%s/workspaces/%s/workspaceAssignmentDetails", + "/api/2.0/identity/accounts/%s/workspaces/%s/workspace-assignment-details", apiClient.configuredAccountID(), request.getWorkspaceId()); try { Request req = new Request("GET", path); @@ -110,7 +110,7 @@ public ListWorkspaceAssignmentDetailsResponse listWorkspaceAssignmentDetails( public ResolveGroupResponse resolveGroup(ResolveGroupRequest request) { String path = String.format( - "/api/2.0/identity/accounts/%s/groups/resolveByExternalId", + "/api/2.0/identity/accounts/%s/groups/resolve-by-external-id", apiClient.configuredAccountID()); try { Request req = new Request("POST", path, apiClient.serialize(request)); @@ -129,7 +129,7 @@ public ResolveServicePrincipalResponse resolveServicePrincipal( ResolveServicePrincipalRequest request) { String path = String.format( - "/api/2.0/identity/accounts/%s/servicePrincipals/resolveByExternalId", + "/api/2.0/identity/accounts/%s/service-principals/resolve-by-external-id", apiClient.configuredAccountID()); try { Request req = new Request("POST", path, apiClient.serialize(request)); @@ -147,7 +147,7 @@ public ResolveServicePrincipalResponse resolveServicePrincipal( public ResolveUserResponse resolveUser(ResolveUserRequest request) { String path = String.format( - "/api/2.0/identity/accounts/%s/users/resolveByExternalId", + "/api/2.0/identity/accounts/%s/users/resolve-by-external-id", apiClient.configuredAccountID()); try { Request req = new Request("POST", path, apiClient.serialize(request)); @@ -166,7 +166,7 @@ public WorkspaceAssignmentDetail updateWorkspaceAssignmentDetail( UpdateWorkspaceAssignmentDetailRequest request) { String path = String.format( - "/api/2.0/identity/accounts/%s/workspaces/%s/workspaceAssignmentDetails/%s", + "/api/2.0/identity/accounts/%s/workspaces/%s/workspace-assignment-details/%s", apiClient.configuredAccountID(), request.getWorkspaceId(), request.getPrincipalId()); try { Request req = diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/WorkspaceIamV2Impl.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/WorkspaceIamV2Impl.java index 61151dcac..866bde97e 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/WorkspaceIamV2Impl.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/iamv2/WorkspaceIamV2Impl.java @@ -19,7 +19,7 @@ public WorkspaceIamV2Impl(ApiClient apiClient) { @Override public WorkspaceAssignmentDetail createWorkspaceAssignmentDetailProxy( CreateWorkspaceAssignmentDetailProxyRequest request) { - String path = "/api/2.0/identity/workspaceAssignmentDetails"; + String path = "/api/2.0/identity/workspace-assignment-details"; try { Request req = new Request("POST", path, apiClient.serialize(request.getWorkspaceAssignmentDetail())); @@ -40,7 +40,8 @@ public WorkspaceAssignmentDetail createWorkspaceAssignmentDetailProxy( public void deleteWorkspaceAssignmentDetailProxy( DeleteWorkspaceAssignmentDetailProxyRequest request) { String path = - String.format("/api/2.0/identity/workspaceAssignmentDetails/%s", request.getPrincipalId()); + String.format( + "/api/2.0/identity/workspace-assignment-details/%s", request.getPrincipalId()); try { Request req = new Request("DELETE", path); @@ -59,7 +60,7 @@ public void deleteWorkspaceAssignmentDetailProxy( public WorkspaceAccessDetail getWorkspaceAccessDetailLocal( GetWorkspaceAccessDetailLocalRequest request) { String path = - String.format("/api/2.0/identity/workspaceAccessDetails/%s", request.getPrincipalId()); + String.format("/api/2.0/identity/workspace-access-details/%s", request.getPrincipalId()); try { Request req = new Request("GET", path); @@ -78,7 +79,8 @@ public WorkspaceAccessDetail getWorkspaceAccessDetailLocal( public WorkspaceAssignmentDetail getWorkspaceAssignmentDetailProxy( GetWorkspaceAssignmentDetailProxyRequest request) { String path = - String.format("/api/2.0/identity/workspaceAssignmentDetails/%s", request.getPrincipalId()); + String.format( + "/api/2.0/identity/workspace-assignment-details/%s", request.getPrincipalId()); try { Request req = new Request("GET", path); @@ -96,7 +98,7 @@ public WorkspaceAssignmentDetail getWorkspaceAssignmentDetailProxy( @Override public ListWorkspaceAssignmentDetailsResponse listWorkspaceAssignmentDetailsProxy( ListWorkspaceAssignmentDetailsProxyRequest request) { - String path = "/api/2.0/identity/workspaceAssignmentDetails"; + String path = "/api/2.0/identity/workspace-assignment-details"; try { Request req = new Request("GET", path); @@ -113,7 +115,7 @@ public ListWorkspaceAssignmentDetailsResponse listWorkspaceAssignmentDetailsProx @Override public ResolveGroupResponse resolveGroupProxy(ResolveGroupProxyRequest request) { - String path = "/api/2.0/identity/groups/resolveByExternalId"; + String path = "/api/2.0/identity/groups/resolve-by-external-id"; try { Request req = new Request("POST", path, apiClient.serialize(request)); @@ -132,7 +134,7 @@ public ResolveGroupResponse resolveGroupProxy(ResolveGroupProxyRequest request) @Override public ResolveServicePrincipalResponse resolveServicePrincipalProxy( ResolveServicePrincipalProxyRequest request) { - String path = "/api/2.0/identity/servicePrincipals/resolveByExternalId"; + String path = "/api/2.0/identity/service-principals/resolve-by-external-id"; try { Request req = new Request("POST", path, apiClient.serialize(request)); @@ -150,7 +152,7 @@ public ResolveServicePrincipalResponse resolveServicePrincipalProxy( @Override public ResolveUserResponse resolveUserProxy(ResolveUserProxyRequest request) { - String path = "/api/2.0/identity/users/resolveByExternalId"; + String path = "/api/2.0/identity/users/resolve-by-external-id"; try { Request req = new Request("POST", path, apiClient.serialize(request)); @@ -170,7 +172,8 @@ public ResolveUserResponse resolveUserProxy(ResolveUserProxyRequest request) { public WorkspaceAssignmentDetail updateWorkspaceAssignmentDetailProxy( UpdateWorkspaceAssignmentDetailProxyRequest request) { String path = - String.format("/api/2.0/identity/workspaceAssignmentDetails/%s", request.getPrincipalId()); + String.format( + "/api/2.0/identity/workspace-assignment-details/%s", request.getPrincipalId()); try { Request req = new Request("PATCH", path, apiClient.serialize(request.getWorkspaceAssignmentDetail())); diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/ResolvedValuesAiRuntimeTaskResolvedValues.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/ResolvedValuesAiRuntimeTaskResolvedValues.java index d540dfcad..c3e64ec10 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/ResolvedValuesAiRuntimeTaskResolvedValues.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/ResolvedValuesAiRuntimeTaskResolvedValues.java @@ -7,9 +7,8 @@ import java.util.Objects; /** - * Resolved env_vars for an AiRuntimeTask after dynamic-value substitution. Mirrors the task's - * `resolved_parameters_field` (env_vars) so Jobs can expand `{{tasks..values.}}` - * references before submission. + * Resolved values for an AiRuntimeTask after dynamic-value substitution, so Jobs can expand + * `{{tasks..values.}}` references before submission. */ @Generated public class ResolvedValuesAiRuntimeTaskResolvedValues { diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/SubmitRun.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/SubmitRun.java index 6befcb9c4..bf8cec57b 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/SubmitRun.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/jobs/SubmitRun.java @@ -75,6 +75,18 @@ public class SubmitRun { @JsonProperty("notification_settings") private JobNotificationSettings notificationSettings; + /** + * The performance mode on a serverless one-time run. This field determines the level of compute + * performance or cost-efficiency for the run. The performance target does not apply to tasks that + * run on Serverless GPU compute. + * + *

* `STANDARD`: Enables cost-efficient execution of serverless workloads. * + * `PERFORMANCE_OPTIMIZED`: Prioritizes fast startup and execution times through rapid scaling and + * optimized cluster performance. + */ + @JsonProperty("performance_target") + private PerformanceTarget performanceTarget; + /** The queue settings of the one-time run. */ @JsonProperty("queue") private QueueSettings queue; @@ -181,6 +193,15 @@ public JobNotificationSettings getNotificationSettings() { return notificationSettings; } + public SubmitRun setPerformanceTarget(PerformanceTarget performanceTarget) { + this.performanceTarget = performanceTarget; + return this; + } + + public PerformanceTarget getPerformanceTarget() { + return performanceTarget; + } + public SubmitRun setQueue(QueueSettings queue) { this.queue = queue; return this; @@ -257,6 +278,7 @@ public boolean equals(Object o) { && Objects.equals(health, that.health) && Objects.equals(idempotencyToken, that.idempotencyToken) && Objects.equals(notificationSettings, that.notificationSettings) + && Objects.equals(performanceTarget, that.performanceTarget) && Objects.equals(queue, that.queue) && Objects.equals(runAs, that.runAs) && Objects.equals(runName, that.runName) @@ -277,6 +299,7 @@ public int hashCode() { health, idempotencyToken, notificationSettings, + performanceTarget, queue, runAs, runName, @@ -297,6 +320,7 @@ public String toString() { .add("health", health) .add("idempotencyToken", idempotencyToken) .add("notificationSettings", notificationSettings) + .add("performanceTarget", performanceTarget) .add("queue", queue) .add("runAs", runAs) .add("runName", runName) diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/LongRollingWindow.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/LongRollingWindow.java deleted file mode 100644 index 5f6a112ff..000000000 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/LongRollingWindow.java +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. - -package com.databricks.sdk.service.ml; - -import com.databricks.sdk.support.Generated; -import com.databricks.sdk.support.ToStringer; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.google.protobuf.Duration; -import java.util.Objects; - -/** - * A long (multi-day) rolling window served via the hybrid batch + streaming path. The batch - * pipeline maintains daily partial aggregates for the bulk of the window while the streaming - * pipeline maintains the most recent day(s), and serving merges them on read. Distinct from - * RollingWindow so the control plane can explicitly identify long rolling window features rather - * than inferring hybrid behavior from window_duration. - */ -@Generated -public class LongRollingWindow { - /** - * The delay applied to the end of the rolling window (must be non-negative). For example, - * delay=1d shifts the window end 1 day before the evaluation time. - */ - @JsonProperty("delay") - private Duration delay; - - /** - * The duration of the rolling window. Must be positive and span more than two days, so that both - * the batch (N-1 day) and stale-path (N-2 day) partial aggregates are well defined. The duration - * need not be a whole number of days (e.g. 3 days 15 minutes is allowed). - */ - @JsonProperty("window_duration") - private Duration windowDuration; - - public LongRollingWindow setDelay(Duration delay) { - this.delay = delay; - return this; - } - - public Duration getDelay() { - return delay; - } - - public LongRollingWindow setWindowDuration(Duration windowDuration) { - this.windowDuration = windowDuration; - return this; - } - - public Duration getWindowDuration() { - return windowDuration; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - LongRollingWindow that = (LongRollingWindow) o; - return Objects.equals(delay, that.delay) && Objects.equals(windowDuration, that.windowDuration); - } - - @Override - public int hashCode() { - return Objects.hash(delay, windowDuration); - } - - @Override - public String toString() { - return new ToStringer(LongRollingWindow.class) - .add("delay", delay) - .add("windowDuration", windowDuration) - .toString(); - } -} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/TimeWindow.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/TimeWindow.java index b1f24fc8b..3648f1da1 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/TimeWindow.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/ml/TimeWindow.java @@ -17,10 +17,6 @@ public class TimeWindow { @JsonProperty("lifetime") private LifetimeWindow lifetime; - /** A long (multi-day) rolling window served via the hybrid batch + streaming path. */ - @JsonProperty("long_rolling") - private LongRollingWindow longRolling; - /** */ @JsonProperty("rolling") private RollingWindow rolling; @@ -51,15 +47,6 @@ public LifetimeWindow getLifetime() { return lifetime; } - public TimeWindow setLongRolling(LongRollingWindow longRolling) { - this.longRolling = longRolling; - return this; - } - - public LongRollingWindow getLongRolling() { - return longRolling; - } - public TimeWindow setRolling(RollingWindow rolling) { this.rolling = rolling; return this; @@ -94,7 +81,6 @@ public boolean equals(Object o) { TimeWindow that = (TimeWindow) o; return Objects.equals(continuous, that.continuous) && Objects.equals(lifetime, that.lifetime) - && Objects.equals(longRolling, that.longRolling) && Objects.equals(rolling, that.rolling) && Objects.equals(sliding, that.sliding) && Objects.equals(tumbling, that.tumbling); @@ -102,7 +88,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(continuous, lifetime, longRolling, rolling, sliding, tumbling); + return Objects.hash(continuous, lifetime, rolling, sliding, tumbling); } @Override @@ -110,7 +96,6 @@ public String toString() { return new ToStringer(TimeWindow.class) .add("continuous", continuous) .add("lifetime", lifetime) - .add("longRolling", longRolling) .add("rolling", rolling) .add("sliding", sliding) .add("tumbling", tumbling) diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/networking/AwsVpcEndpointInfo.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/networking/AwsVpcEndpointInfo.java new file mode 100644 index 000000000..68fdfaec6 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/networking/AwsVpcEndpointInfo.java @@ -0,0 +1,77 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.networking; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +@Generated +public class AwsVpcEndpointInfo { + /** The AWS account ID in which this VPC endpoint lives. */ + @JsonProperty("aws_account_id") + private String awsAccountId; + + /** The ID of the Databricks VPC endpoint service that this endpoint connects to. */ + @JsonProperty("aws_endpoint_service_id") + private String awsEndpointServiceId; + + /** + * The ID of the underlying VPC endpoint in AWS. Provided by the customer when registering an + * existing AWS VPC endpoint. + */ + @JsonProperty("aws_vpc_endpoint_id") + private String awsVpcEndpointId; + + public AwsVpcEndpointInfo setAwsAccountId(String awsAccountId) { + this.awsAccountId = awsAccountId; + return this; + } + + public String getAwsAccountId() { + return awsAccountId; + } + + public AwsVpcEndpointInfo setAwsEndpointServiceId(String awsEndpointServiceId) { + this.awsEndpointServiceId = awsEndpointServiceId; + return this; + } + + public String getAwsEndpointServiceId() { + return awsEndpointServiceId; + } + + public AwsVpcEndpointInfo setAwsVpcEndpointId(String awsVpcEndpointId) { + this.awsVpcEndpointId = awsVpcEndpointId; + return this; + } + + public String getAwsVpcEndpointId() { + return awsVpcEndpointId; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + AwsVpcEndpointInfo that = (AwsVpcEndpointInfo) o; + return Objects.equals(awsAccountId, that.awsAccountId) + && Objects.equals(awsEndpointServiceId, that.awsEndpointServiceId) + && Objects.equals(awsVpcEndpointId, that.awsVpcEndpointId); + } + + @Override + public int hashCode() { + return Objects.hash(awsAccountId, awsEndpointServiceId, awsVpcEndpointId); + } + + @Override + public String toString() { + return new ToStringer(AwsVpcEndpointInfo.class) + .add("awsAccountId", awsAccountId) + .add("awsEndpointServiceId", awsEndpointServiceId) + .add("awsVpcEndpointId", awsVpcEndpointId) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/networking/Endpoint.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/networking/Endpoint.java index b8d575982..73bd89255 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/networking/Endpoint.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/networking/Endpoint.java @@ -18,6 +18,10 @@ public class Endpoint { @JsonProperty("account_id") private String accountId; + /** Info for an AWS VPC endpoint. */ + @JsonProperty("aws_vpc_endpoint_info") + private AwsVpcEndpointInfo awsVpcEndpointInfo; + /** Info for an Azure private endpoint. */ @JsonProperty("azure_private_endpoint_info") private AzurePrivateEndpointInfo azurePrivateEndpointInfo; @@ -44,6 +48,10 @@ public class Endpoint { @JsonProperty("endpoint_id") private String endpointId; + /** Info for a GCP Private Service Connect endpoint. */ + @JsonProperty("gcp_psc_endpoint_info") + private GcpPscEndpointInfo gcpPscEndpointInfo; + /** The resource name of the endpoint, which uniquely identifies the endpoint. */ @JsonProperty("name") private String name; @@ -73,6 +81,15 @@ public String getAccountId() { return accountId; } + public Endpoint setAwsVpcEndpointInfo(AwsVpcEndpointInfo awsVpcEndpointInfo) { + this.awsVpcEndpointInfo = awsVpcEndpointInfo; + return this; + } + + public AwsVpcEndpointInfo getAwsVpcEndpointInfo() { + return awsVpcEndpointInfo; + } + public Endpoint setAzurePrivateEndpointInfo(AzurePrivateEndpointInfo azurePrivateEndpointInfo) { this.azurePrivateEndpointInfo = azurePrivateEndpointInfo; return this; @@ -109,6 +126,15 @@ public String getEndpointId() { return endpointId; } + public Endpoint setGcpPscEndpointInfo(GcpPscEndpointInfo gcpPscEndpointInfo) { + this.gcpPscEndpointInfo = gcpPscEndpointInfo; + return this; + } + + public GcpPscEndpointInfo getGcpPscEndpointInfo() { + return gcpPscEndpointInfo; + } + public Endpoint setName(String name) { this.name = name; return this; @@ -151,10 +177,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) return false; Endpoint that = (Endpoint) o; return Objects.equals(accountId, that.accountId) + && Objects.equals(awsVpcEndpointInfo, that.awsVpcEndpointInfo) && Objects.equals(azurePrivateEndpointInfo, that.azurePrivateEndpointInfo) && Objects.equals(createTime, that.createTime) && Objects.equals(displayName, that.displayName) && Objects.equals(endpointId, that.endpointId) + && Objects.equals(gcpPscEndpointInfo, that.gcpPscEndpointInfo) && Objects.equals(name, that.name) && Objects.equals(region, that.region) && Objects.equals(state, that.state) @@ -165,10 +193,12 @@ public boolean equals(Object o) { public int hashCode() { return Objects.hash( accountId, + awsVpcEndpointInfo, azurePrivateEndpointInfo, createTime, displayName, endpointId, + gcpPscEndpointInfo, name, region, state, @@ -179,10 +209,12 @@ public int hashCode() { public String toString() { return new ToStringer(Endpoint.class) .add("accountId", accountId) + .add("awsVpcEndpointInfo", awsVpcEndpointInfo) .add("azurePrivateEndpointInfo", azurePrivateEndpointInfo) .add("createTime", createTime) .add("displayName", displayName) .add("endpointId", endpointId) + .add("gcpPscEndpointInfo", gcpPscEndpointInfo) .add("name", name) .add("region", region) .add("state", state) diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/networking/GcpPscEndpointInfo.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/networking/GcpPscEndpointInfo.java new file mode 100644 index 000000000..ad9c8d7fb --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/networking/GcpPscEndpointInfo.java @@ -0,0 +1,118 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.networking; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +@Generated +public class GcpPscEndpointInfo { + /** + * The GCP region of the PSC connection endpoint. Provided by the customer when registering an + * existing PSC endpoint. GCP supports only same-region PSC, so this must match the workspace + * region. + */ + @JsonProperty("endpoint_region") + private String endpointRegion; + + /** + * The GCP consumer project ID in which this PSC endpoint is created. Provided by the customer + * when registering an existing PSC endpoint. + */ + @JsonProperty("project_id") + private String projectId; + + /** + * The ID of the underlying Private Service Connect connection in the GCP consumer project, + * assigned by GCP when the PSC connection is created. + */ + @JsonProperty("psc_connection_id") + private String pscConnectionId; + + /** + * The name of this PSC connection in the GCP consumer project. Provided by the customer when + * registering an existing PSC endpoint. + */ + @JsonProperty("psc_endpoint") + private String pscEndpoint; + + /** The ID of the Databricks service attachment this PSC endpoint connects to. */ + @JsonProperty("service_attachment_id") + private String serviceAttachmentId; + + public GcpPscEndpointInfo setEndpointRegion(String endpointRegion) { + this.endpointRegion = endpointRegion; + return this; + } + + public String getEndpointRegion() { + return endpointRegion; + } + + public GcpPscEndpointInfo setProjectId(String projectId) { + this.projectId = projectId; + return this; + } + + public String getProjectId() { + return projectId; + } + + public GcpPscEndpointInfo setPscConnectionId(String pscConnectionId) { + this.pscConnectionId = pscConnectionId; + return this; + } + + public String getPscConnectionId() { + return pscConnectionId; + } + + public GcpPscEndpointInfo setPscEndpoint(String pscEndpoint) { + this.pscEndpoint = pscEndpoint; + return this; + } + + public String getPscEndpoint() { + return pscEndpoint; + } + + public GcpPscEndpointInfo setServiceAttachmentId(String serviceAttachmentId) { + this.serviceAttachmentId = serviceAttachmentId; + return this; + } + + public String getServiceAttachmentId() { + return serviceAttachmentId; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + GcpPscEndpointInfo that = (GcpPscEndpointInfo) o; + return Objects.equals(endpointRegion, that.endpointRegion) + && Objects.equals(projectId, that.projectId) + && Objects.equals(pscConnectionId, that.pscConnectionId) + && Objects.equals(pscEndpoint, that.pscEndpoint) + && Objects.equals(serviceAttachmentId, that.serviceAttachmentId); + } + + @Override + public int hashCode() { + return Objects.hash( + endpointRegion, projectId, pscConnectionId, pscEndpoint, serviceAttachmentId); + } + + @Override + public String toString() { + return new ToStringer(GcpPscEndpointInfo.class) + .add("endpointRegion", endpointRegion) + .add("projectId", projectId) + .add("pscConnectionId", pscConnectionId) + .add("pscEndpoint", pscEndpoint) + .add("serviceAttachmentId", serviceAttachmentId) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/SyncedTableSyncedTableSpecTypeOverride.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/SyncedTableSyncedTableSpecTypeOverride.java index 221012ad5..5b12b433a 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/SyncedTableSyncedTableSpecTypeOverride.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/SyncedTableSyncedTableSpecTypeOverride.java @@ -19,8 +19,8 @@ public class SyncedTableSyncedTableSpecTypeOverride { private SyncedTableSyncedTableSpecPgSpecificType pgType; /** - * Size parameter for the target type. Required when pg_type is PG_SPECIFIC_TYPE_VECTOR or - * PG_SPECIFIC_TYPE_HALFVEC (specifies the vector dimension, e.g., 1024). + * Size parameter for the target type, for types that take one (e.g. vector dimension, varchar + * length). Required when the chosen pg_type needs a size. */ @JsonProperty("size") private Long size; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/ComplianceStandard.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/ComplianceStandard.java index 05dddb99f..e430e414a 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/ComplianceStandard.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/ComplianceStandard.java @@ -22,6 +22,7 @@ public enum ComplianceStandard { IRAP_PROTECTED, ISMAP, ITAR_EAR, + KSA_ECC_CCC_DCC, K_FSI, NONE, PCI_DSS, diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/StatementExecutionAPI.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/StatementExecutionAPI.java index 64b6cc588..1f84dd01d 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/StatementExecutionAPI.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/StatementExecutionAPI.java @@ -88,11 +88,13 @@ * completed execution when the cancel request arrives. Polling for status until a terminal state is * reached is a reliable way to determine the final state. - Wait timeouts are approximate, occur * server-side, and cannot account for things such as caller delays and network latency from caller - * to service. - To guarantee that the statement is kept alive, you must poll at least once every 15 - * minutes. - The results are only available for one hour after success; polling does not extend - * this. - The SQL Execution API must be used for the entire lifecycle of the statement. For - * example, you cannot use the Jobs API to execute the command, and then the SQL Execution API to - * cancel it. + * to service. - To keep a statement alive, poll for its status at least once every 15 minutes. + * Regular polling guarantees the statement stays alive. - To stop a statement you no longer need, + * cancel it explicitly with :method:statementexecution/cancelExecution. Stopping polling does not + * cancel a statement. Explicit cancellation is the only way to end statement execution on demand. - + * The results are only available for one hour after success; polling does not extend this. - The + * SQL Execution API must be used for the entire lifecycle of the statement. For example, you cannot + * use the Jobs API to execute the command, and then the SQL Execution API to cancel it. * *

[Apache Arrow Columnar]: https://arrow.apache.org/overview/ [Databricks SQL Statement * Execution API tutorial]: https://docs.databricks.com/sql/api/sql-execution-tutorial.html diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/StatementExecutionService.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/StatementExecutionService.java index 951af8946..8cad20969 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/StatementExecutionService.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/sql/StatementExecutionService.java @@ -85,11 +85,13 @@ * completed execution when the cancel request arrives. Polling for status until a terminal state is * reached is a reliable way to determine the final state. - Wait timeouts are approximate, occur * server-side, and cannot account for things such as caller delays and network latency from caller - * to service. - To guarantee that the statement is kept alive, you must poll at least once every 15 - * minutes. - The results are only available for one hour after success; polling does not extend - * this. - The SQL Execution API must be used for the entire lifecycle of the statement. For - * example, you cannot use the Jobs API to execute the command, and then the SQL Execution API to - * cancel it. + * to service. - To keep a statement alive, poll for its status at least once every 15 minutes. + * Regular polling guarantees the statement stays alive. - To stop a statement you no longer need, + * cancel it explicitly with :method:statementexecution/cancelExecution. Stopping polling does not + * cancel a statement. Explicit cancellation is the only way to end statement execution on demand. - + * The results are only available for one hour after success; polling does not extend this. - The + * SQL Execution API must be used for the entire lifecycle of the statement. For example, you cannot + * use the Jobs API to execute the command, and then the SQL Execution API to cancel it. * *

[Apache Arrow Columnar]: https://arrow.apache.org/overview/ [Databricks SQL Statement * Execution API tutorial]: https://docs.databricks.com/sql/api/sql-execution-tutorial.html diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/workspace/GetRepoResponse.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/workspace/GetRepoResponse.java index 3879deccb..743d1ba0f 100644 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/workspace/GetRepoResponse.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/workspace/GetRepoResponse.java @@ -13,6 +13,13 @@ public class GetRepoResponse { @JsonProperty("branch") private String branch; + /** + * Whether the Git CLI is enabled for this Git folder (repo). When true, Git commands can be run + * directly against this Git folder using the Git CLI. + */ + @JsonProperty("git_cli_enabled") + private Boolean gitCliEnabled; + /** SHA-1 hash representing the commit ID of the current HEAD of the repo. */ @JsonProperty("head_commit_id") private String headCommitId; @@ -50,6 +57,15 @@ public String getBranch() { return branch; } + public GetRepoResponse setGitCliEnabled(Boolean gitCliEnabled) { + this.gitCliEnabled = gitCliEnabled; + return this; + } + + public Boolean getGitCliEnabled() { + return gitCliEnabled; + } + public GetRepoResponse setHeadCommitId(String headCommitId) { this.headCommitId = headCommitId; return this; @@ -110,6 +126,7 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) return false; GetRepoResponse that = (GetRepoResponse) o; return Objects.equals(branch, that.branch) + && Objects.equals(gitCliEnabled, that.gitCliEnabled) && Objects.equals(headCommitId, that.headCommitId) && Objects.equals(id, that.id) && Objects.equals(path, that.path) @@ -120,13 +137,15 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(branch, headCommitId, id, path, provider, sparseCheckout, url); + return Objects.hash( + branch, gitCliEnabled, headCommitId, id, path, provider, sparseCheckout, url); } @Override public String toString() { return new ToStringer(GetRepoResponse.class) .add("branch", branch) + .add("gitCliEnabled", gitCliEnabled) .add("headCommitId", headCommitId) .add("id", id) .add("path", path) diff --git a/tagging.py b/tagging.py index 1affb11f3..7c1ad5f45 100644 --- a/tagging.py +++ b/tagging.py @@ -135,12 +135,26 @@ def _read_local_head_sha() -> str: return subprocess.check_output(["git", "rev-parse", "HEAD"], text=True).strip() +def _release_branch() -> str: + """ + Returns the branch this release is being cut from. + + The tagging workflow sets ``DECO_TAGGING_REF`` to the branch it was + dispatched on (``github.ref_name``) so a release can be cut from a + branch other than main. It is unset for local runs and the historical + main-only release path, so we default to ``main`` and every existing + caller is unaffected. + """ + return os.environ.get("DECO_TAGGING_REF", "").strip() or "main" + + class MainAdvancedError(Exception): """ - Raised when ``origin/main`` has advanced since the workflow's - checkout — i.e., another commit landed during this run. The local - working tree is now stale, so any commit produced from it would - silently revert whatever the concurrent push added. + Raised when the release branch (``origin/main`` by default; see + ``_release_branch``) has advanced since the workflow's checkout — + i.e., another commit landed during this run. The local working tree + is now stale, so any commit produced from it would silently revert + whatever the concurrent push added. """ @@ -151,7 +165,10 @@ class GitHubRepo: def __init__(self, repo: Repository): self.repo = repo self.changed_files: list[InputGitTreeElement] = [] - self.ref = "heads/main" + # Branch the changelog-bump commit + tag land on. Defaults to + # ``heads/main``; ``DECO_TAGGING_REF`` overrides it for a branch + # release. See ``_release_branch``. + self.ref = f"heads/{_release_branch()}" # Anchor ``self.sha`` to the **local checkout** rather than a # live API call. ``actions/checkout`` populates the working tree # at this SHA, and every subsequent file read in this run is @@ -172,7 +189,7 @@ def commit_and_push(self, message: str): head_ref = self.repo.get_git_ref(self.ref) if head_ref.object.sha != self.sha: raise MainAdvancedError( - f"origin/main advanced from {self.sha} to {head_ref.object.sha} " + f"{self.ref} advanced from {self.sha} to {head_ref.object.sha} " f"during this run. Local working tree is stale; aborting before " f"the commit would silently revert the new content. Re-run the " f"workflow." @@ -754,8 +771,10 @@ def reset_repository(hash: Optional[str] = None) -> None: # Fetch the latest changes from the remote repository. subprocess.run(["git", "fetch"]) - # Determine the commit hash (default to origin/main if none is provided). - commit_hash = hash or "origin/main" + # Determine the commit hash (default to the release branch's remote + # head if none is provided). ``_release_branch`` is ``main`` unless + # ``DECO_TAGGING_REF`` selects a branch release. + commit_hash = hash or f"origin/{_release_branch()}" # ``git reset --hard`` must land before ``gh.reset(None)``, since # ``gh.reset(None)`` reads ``git rev-parse HEAD`` to anchor