diff --git a/.codegen/_openapi_sha b/.codegen/_openapi_sha index 249e1b751..f6b747ebb 100755 --- a/.codegen/_openapi_sha +++ b/.codegen/_openapi_sha @@ -1 +1 @@ -d642e4dafd62d2c762246e1e79a2d9e9539720e3 \ No newline at end of file +0326a2fbef446c151698918eb71eacdbcee447af \ No newline at end of file diff --git a/.gitattributes b/.gitattributes index f97083c3c..aac5f5aaf 100755 --- a/.gitattributes +++ b/.gitattributes @@ -2344,6 +2344,7 @@ databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/UpdateInf databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/UpdateInfoState.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/UpdateStateInfo.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/UpdateStateInfoState.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/ZendeskSupportOptions.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/Branch.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/BranchOperationMetadata.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/BranchSpec.java linguist-generated=true @@ -2469,6 +2470,7 @@ databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/AzureK databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/AzureWorkspaceInfo.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/CloudResourceContainer.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/CreateAwsKeyInfo.java linguist-generated=true +databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/CreateAzureKeyInfo.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/CreateCredentialAwsCredentials.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/CreateCredentialRequest.java linguist-generated=true databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/CreateCredentialStsRole.java linguist-generated=true diff --git a/NEXT_CHANGELOG.md b/NEXT_CHANGELOG.md index 3e4035d1b..cb477ae67 100755 --- a/NEXT_CHANGELOG.md +++ b/NEXT_CHANGELOG.md @@ -27,3 +27,15 @@ * Change `description` field for `com.databricks.sdk.service.supervisoragents.Tool` to no longer be required. * [Breaking] Change `description` field for `com.databricks.sdk.service.supervisoragents.Tool` to no longer be required. * Add `ZENDESK` enum value for `com.databricks.sdk.service.catalog.ConnectionType`. +* Add `r2TempCredentials` field for `com.databricks.sdk.service.catalog.TemporaryCredentials`. +* Add `zendeskSupportOptions` field for `com.databricks.sdk.service.pipelines.ConnectorOptions`. +* Add `azureKeyInfo` field for `com.databricks.sdk.service.provisioning.CreateCustomerManagedKeyRequest`. +* Add `targetQps` field for `com.databricks.sdk.service.vectorsearch.CreateEndpoint`. +* Add `columnsToIndex` field for `com.databricks.sdk.service.vectorsearch.DeltaSyncVectorIndexSpecRequest`. +* Add `columnsToIndex` field for `com.databricks.sdk.service.vectorsearch.DeltaSyncVectorIndexSpecResponse`. +* Add `requestedTargetQps` field for `com.databricks.sdk.service.vectorsearch.EndpointScalingInfo`. +* Add `targetQps` field for `com.databricks.sdk.service.vectorsearch.PatchEndpointRequest`. +* Add `JIRA` and `ZENDESK` enum values for `com.databricks.sdk.service.pipelines.IngestionSourceType`. +* [Breaking] Remove `minQps` field for `com.databricks.sdk.service.vectorsearch.CreateEndpoint`. +* [Breaking] Remove `requestedMinQps` field for `com.databricks.sdk.service.vectorsearch.EndpointScalingInfo`. +* [Breaking] Remove `minQps` field for `com.databricks.sdk.service.vectorsearch.PatchEndpointRequest`. \ No newline at end of file diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/apps/DeleteSpaceOperation.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/apps/DeleteSpaceOperation.java index 7095036f3..0015ef8a3 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/apps/DeleteSpaceOperation.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/apps/DeleteSpaceOperation.java @@ -89,6 +89,7 @@ public void waitForCompletion(Optional options) throws TimeoutExcept try { JsonNode responseJson = objectMapper.valueToTree(operation.getResponse()); objectMapper.treeToValue(responseJson, Void.class); + return; } catch (JsonProcessingException e) { throw new DatabricksException("Failed to unmarshal response: " + e.getMessage(), e); } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SecurableKind.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SecurableKind.java index f45cd51d6..2c88ccba4 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SecurableKind.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/SecurableKind.java @@ -4,7 +4,7 @@ import com.databricks.sdk.support.Generated; -/** Latest kind: CONNECTION_RABBITMQ = 326; Next id: 327 */ +/** Latest kind: MODEL_SERVICE_STANDARD = 327; Next id: 328 */ @Generated public enum SecurableKind { TABLE_DB_STORAGE, diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TemporaryCredentials.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TemporaryCredentials.java index a27bbd94c..7d2e8803a 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TemporaryCredentials.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/catalog/TemporaryCredentials.java @@ -28,6 +28,10 @@ public class TemporaryCredentials { @JsonProperty("gcp_oauth_token") private GcpOauthToken gcpOauthToken; + /** */ + @JsonProperty("r2_temp_credentials") + private R2Credentials r2TempCredentials; + public TemporaryCredentials setAwsTempCredentials(AwsCredentials awsTempCredentials) { this.awsTempCredentials = awsTempCredentials; return this; @@ -64,6 +68,15 @@ public GcpOauthToken getGcpOauthToken() { return gcpOauthToken; } + public TemporaryCredentials setR2TempCredentials(R2Credentials r2TempCredentials) { + this.r2TempCredentials = r2TempCredentials; + return this; + } + + public R2Credentials getR2TempCredentials() { + return r2TempCredentials; + } + @Override public boolean equals(Object o) { if (this == o) return true; @@ -72,12 +85,14 @@ public boolean equals(Object o) { return Objects.equals(awsTempCredentials, that.awsTempCredentials) && Objects.equals(azureAad, that.azureAad) && Objects.equals(expirationTime, that.expirationTime) - && Objects.equals(gcpOauthToken, that.gcpOauthToken); + && Objects.equals(gcpOauthToken, that.gcpOauthToken) + && Objects.equals(r2TempCredentials, that.r2TempCredentials); } @Override public int hashCode() { - return Objects.hash(awsTempCredentials, azureAad, expirationTime, gcpOauthToken); + return Objects.hash( + awsTempCredentials, azureAad, expirationTime, gcpOauthToken, r2TempCredentials); } @Override @@ -87,6 +102,7 @@ public String toString() { .add("azureAad", azureAad) .add("expirationTime", expirationTime) .add("gcpOauthToken", gcpOauthToken) + .add("r2TempCredentials", r2TempCredentials) .toString(); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/ConnectorOptions.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/ConnectorOptions.java index e2d777fc7..37b0e3145 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/ConnectorOptions.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/ConnectorOptions.java @@ -46,6 +46,10 @@ public class ConnectorOptions { @JsonProperty("tiktok_ads_options") private TikTokAdsOptions tiktokAdsOptions; + /** */ + @JsonProperty("zendesk_support_options") + private ZendeskSupportOptions zendeskSupportOptions; + public ConnectorOptions setConfluenceOptions(ConfluenceConnectorOptions confluenceOptions) { this.confluenceOptions = confluenceOptions; return this; @@ -127,6 +131,15 @@ public TikTokAdsOptions getTiktokAdsOptions() { return tiktokAdsOptions; } + public ConnectorOptions setZendeskSupportOptions(ZendeskSupportOptions zendeskSupportOptions) { + this.zendeskSupportOptions = zendeskSupportOptions; + return this; + } + + public ZendeskSupportOptions getZendeskSupportOptions() { + return zendeskSupportOptions; + } + @Override public boolean equals(Object o) { if (this == o) return true; @@ -140,7 +153,8 @@ public boolean equals(Object o) { && Objects.equals(outlookOptions, that.outlookOptions) && Objects.equals(sharepointOptions, that.sharepointOptions) && Objects.equals(smartsheetOptions, that.smartsheetOptions) - && Objects.equals(tiktokAdsOptions, that.tiktokAdsOptions); + && Objects.equals(tiktokAdsOptions, that.tiktokAdsOptions) + && Objects.equals(zendeskSupportOptions, that.zendeskSupportOptions); } @Override @@ -154,7 +168,8 @@ public int hashCode() { outlookOptions, sharepointOptions, smartsheetOptions, - tiktokAdsOptions); + tiktokAdsOptions, + zendeskSupportOptions); } @Override @@ -169,6 +184,7 @@ public String toString() { .add("sharepointOptions", sharepointOptions) .add("smartsheetOptions", smartsheetOptions) .add("tiktokAdsOptions", tiktokAdsOptions) + .add("zendeskSupportOptions", zendeskSupportOptions) .toString(); } } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/IngestionSourceType.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/IngestionSourceType.java index 7ece8556f..5e0b47625 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/IngestionSourceType.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/IngestionSourceType.java @@ -12,6 +12,7 @@ public enum IngestionSourceType { FOREIGN_CATALOG, GA4_RAW_DATA, GOOGLE_DRIVE, + JIRA, MANAGED_POSTGRESQL, META_MARKETING, MYSQL, @@ -24,4 +25,5 @@ public enum IngestionSourceType { SQLSERVER, TERADATA, WORKDAY_RAAS, + ZENDESK, } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/ZendeskSupportOptions.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/ZendeskSupportOptions.java new file mode 100755 index 000000000..6b44068c6 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/pipelines/ZendeskSupportOptions.java @@ -0,0 +1,46 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.pipelines; + +import com.databricks.sdk.support.Generated; +import com.databricks.sdk.support.ToStringer; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Objects; + +/** Zendesk Support specific options for ingestion */ +@Generated +public class ZendeskSupportOptions { + /** + * (Optional) Start date in YYYY-MM-DD format for the initial sync. This determines the earliest + * date from which to sync historical data. + */ + @JsonProperty("start_date") + private String startDate; + + public ZendeskSupportOptions setStartDate(String startDate) { + this.startDate = startDate; + return this; + } + + public String getStartDate() { + return startDate; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ZendeskSupportOptions that = (ZendeskSupportOptions) o; + return Objects.equals(startDate, that.startDate); + } + + @Override + public int hashCode() { + return Objects.hash(startDate); + } + + @Override + public String toString() { + return new ToStringer(ZendeskSupportOptions.class).add("startDate", startDate).toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DeleteBranchOperation.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DeleteBranchOperation.java index 9f6dd967c..f32d8f798 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DeleteBranchOperation.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DeleteBranchOperation.java @@ -89,6 +89,7 @@ public void waitForCompletion(Optional options) throws TimeoutExcept try { JsonNode responseJson = objectMapper.valueToTree(operation.getResponse()); objectMapper.treeToValue(responseJson, Void.class); + return; } catch (JsonProcessingException e) { throw new DatabricksException("Failed to unmarshal response: " + e.getMessage(), e); } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DeleteCatalogOperation.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DeleteCatalogOperation.java index 78a5e07ed..d16b102d3 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DeleteCatalogOperation.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DeleteCatalogOperation.java @@ -89,6 +89,7 @@ public void waitForCompletion(Optional options) throws TimeoutExcept try { JsonNode responseJson = objectMapper.valueToTree(operation.getResponse()); objectMapper.treeToValue(responseJson, Void.class); + return; } catch (JsonProcessingException e) { throw new DatabricksException("Failed to unmarshal response: " + e.getMessage(), e); } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DeleteDatabaseOperation.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DeleteDatabaseOperation.java index 3ce4faa85..1d4bf7cd5 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DeleteDatabaseOperation.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DeleteDatabaseOperation.java @@ -89,6 +89,7 @@ public void waitForCompletion(Optional options) throws TimeoutExcept try { JsonNode responseJson = objectMapper.valueToTree(operation.getResponse()); objectMapper.treeToValue(responseJson, Void.class); + return; } catch (JsonProcessingException e) { throw new DatabricksException("Failed to unmarshal response: " + e.getMessage(), e); } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DeleteEndpointOperation.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DeleteEndpointOperation.java index 66c5aeb57..2c525d1a0 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DeleteEndpointOperation.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DeleteEndpointOperation.java @@ -89,6 +89,7 @@ public void waitForCompletion(Optional options) throws TimeoutExcept try { JsonNode responseJson = objectMapper.valueToTree(operation.getResponse()); objectMapper.treeToValue(responseJson, Void.class); + return; } catch (JsonProcessingException e) { throw new DatabricksException("Failed to unmarshal response: " + e.getMessage(), e); } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DeleteProjectOperation.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DeleteProjectOperation.java index 85a5bae25..5a9244797 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DeleteProjectOperation.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DeleteProjectOperation.java @@ -89,6 +89,7 @@ public void waitForCompletion(Optional options) throws TimeoutExcept try { JsonNode responseJson = objectMapper.valueToTree(operation.getResponse()); objectMapper.treeToValue(responseJson, Void.class); + return; } catch (JsonProcessingException e) { throw new DatabricksException("Failed to unmarshal response: " + e.getMessage(), e); } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DeleteRoleOperation.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DeleteRoleOperation.java index 0da203990..9e6a30f4a 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DeleteRoleOperation.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DeleteRoleOperation.java @@ -89,6 +89,7 @@ public void waitForCompletion(Optional options) throws TimeoutExcept try { JsonNode responseJson = objectMapper.valueToTree(operation.getResponse()); objectMapper.treeToValue(responseJson, Void.class); + return; } catch (JsonProcessingException e) { throw new DatabricksException("Failed to unmarshal response: " + e.getMessage(), e); } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DeleteSyncedTableOperation.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DeleteSyncedTableOperation.java index f078311d2..b9462b7b1 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DeleteSyncedTableOperation.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/DeleteSyncedTableOperation.java @@ -89,6 +89,7 @@ public void waitForCompletion(Optional options) throws TimeoutExcept try { JsonNode responseJson = objectMapper.valueToTree(operation.getResponse()); objectMapper.treeToValue(responseJson, Void.class); + return; } catch (JsonProcessingException e) { throw new DatabricksException("Failed to unmarshal response: " + e.getMessage(), e); } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/UndeleteProjectOperation.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/UndeleteProjectOperation.java index c3f24cfae..e1f7c828c 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/UndeleteProjectOperation.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/postgres/UndeleteProjectOperation.java @@ -89,6 +89,7 @@ public void waitForCompletion(Optional options) throws TimeoutExcept try { JsonNode responseJson = objectMapper.valueToTree(operation.getResponse()); objectMapper.treeToValue(responseJson, Void.class); + return; } catch (JsonProcessingException e) { throw new DatabricksException("Failed to unmarshal response: " + e.getMessage(), e); } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/CreateAzureKeyInfo.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/CreateAzureKeyInfo.java new file mode 100755 index 000000000..1121f2004 --- /dev/null +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/CreateAzureKeyInfo.java @@ -0,0 +1,127 @@ +// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT. + +package com.databricks.sdk.service.provisioning; + +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 CreateAzureKeyInfo { + /** + * The Disk Encryption Set id that is used to represent the key info used for Managed Disk BYOK + * use case + */ + @JsonProperty("disk_encryption_set_id") + private String diskEncryptionSetId; + + /** + * The structure to store key access credential This is set if the Managed Identity is being used + * to access the Azure Key Vault key. + */ + @JsonProperty("key_access_configuration") + private KeyAccessConfiguration keyAccessConfiguration; + + /** The name of the key in KeyVault. */ + @JsonProperty("key_name") + private String keyName; + + /** The base URI of the KeyVault. */ + @JsonProperty("key_vault_uri") + private String keyVaultUri; + + /** The tenant id where the KeyVault lives. */ + @JsonProperty("tenant_id") + private String tenantId; + + /** The current key version. */ + @JsonProperty("version") + private String version; + + public CreateAzureKeyInfo setDiskEncryptionSetId(String diskEncryptionSetId) { + this.diskEncryptionSetId = diskEncryptionSetId; + return this; + } + + public String getDiskEncryptionSetId() { + return diskEncryptionSetId; + } + + public CreateAzureKeyInfo setKeyAccessConfiguration( + KeyAccessConfiguration keyAccessConfiguration) { + this.keyAccessConfiguration = keyAccessConfiguration; + return this; + } + + public KeyAccessConfiguration getKeyAccessConfiguration() { + return keyAccessConfiguration; + } + + public CreateAzureKeyInfo setKeyName(String keyName) { + this.keyName = keyName; + return this; + } + + public String getKeyName() { + return keyName; + } + + public CreateAzureKeyInfo setKeyVaultUri(String keyVaultUri) { + this.keyVaultUri = keyVaultUri; + return this; + } + + public String getKeyVaultUri() { + return keyVaultUri; + } + + public CreateAzureKeyInfo setTenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } + + public String getTenantId() { + return tenantId; + } + + public CreateAzureKeyInfo setVersion(String version) { + this.version = version; + return this; + } + + public String getVersion() { + return version; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + CreateAzureKeyInfo that = (CreateAzureKeyInfo) o; + return Objects.equals(diskEncryptionSetId, that.diskEncryptionSetId) + && Objects.equals(keyAccessConfiguration, that.keyAccessConfiguration) + && Objects.equals(keyName, that.keyName) + && Objects.equals(keyVaultUri, that.keyVaultUri) + && Objects.equals(tenantId, that.tenantId) + && Objects.equals(version, that.version); + } + + @Override + public int hashCode() { + return Objects.hash( + diskEncryptionSetId, keyAccessConfiguration, keyName, keyVaultUri, tenantId, version); + } + + @Override + public String toString() { + return new ToStringer(CreateAzureKeyInfo.class) + .add("diskEncryptionSetId", diskEncryptionSetId) + .add("keyAccessConfiguration", keyAccessConfiguration) + .add("keyName", keyName) + .add("keyVaultUri", keyVaultUri) + .add("tenantId", tenantId) + .add("version", version) + .toString(); + } +} diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/CreateCustomerManagedKeyRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/CreateCustomerManagedKeyRequest.java index 5ee64fc70..e04534038 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/CreateCustomerManagedKeyRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/provisioning/CreateCustomerManagedKeyRequest.java @@ -14,6 +14,10 @@ public class CreateCustomerManagedKeyRequest { @JsonProperty("aws_key_info") private CreateAwsKeyInfo awsKeyInfo; + /** */ + @JsonProperty("azure_key_info") + private CreateAzureKeyInfo azureKeyInfo; + /** */ @JsonProperty("gcp_key_info") private CreateGcpKeyInfo gcpKeyInfo; @@ -31,6 +35,15 @@ public CreateAwsKeyInfo getAwsKeyInfo() { return awsKeyInfo; } + public CreateCustomerManagedKeyRequest setAzureKeyInfo(CreateAzureKeyInfo azureKeyInfo) { + this.azureKeyInfo = azureKeyInfo; + return this; + } + + public CreateAzureKeyInfo getAzureKeyInfo() { + return azureKeyInfo; + } + public CreateCustomerManagedKeyRequest setGcpKeyInfo(CreateGcpKeyInfo gcpKeyInfo) { this.gcpKeyInfo = gcpKeyInfo; return this; @@ -55,19 +68,21 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) return false; CreateCustomerManagedKeyRequest that = (CreateCustomerManagedKeyRequest) o; return Objects.equals(awsKeyInfo, that.awsKeyInfo) + && Objects.equals(azureKeyInfo, that.azureKeyInfo) && Objects.equals(gcpKeyInfo, that.gcpKeyInfo) && Objects.equals(useCases, that.useCases); } @Override public int hashCode() { - return Objects.hash(awsKeyInfo, gcpKeyInfo, useCases); + return Objects.hash(awsKeyInfo, azureKeyInfo, gcpKeyInfo, useCases); } @Override public String toString() { return new ToStringer(CreateCustomerManagedKeyRequest.class) .add("awsKeyInfo", awsKeyInfo) + .add("azureKeyInfo", azureKeyInfo) .add("gcpKeyInfo", gcpKeyInfo) .add("useCases", useCases) .toString(); diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/NccPrivateEndpointRule.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/NccPrivateEndpointRule.java index 6547dfbe4..eafd0abab 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/NccPrivateEndpointRule.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/NccPrivateEndpointRule.java @@ -56,10 +56,9 @@ public class NccPrivateEndpointRule { private Collection domainNames; /** - * Only used by private endpoints towards an AWS S3 service. - * - *

Update this field to activate/deactivate this private endpoint to allow egress access from - * serverless compute resources. + * Update this field to activate/deactivate this private endpoint to allow egress access from + * serverless compute resources. Only honored for first-party services on each cloud (e.g. AWS + * S3). */ @JsonProperty("enabled") private Boolean enabled; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/UpdatePrivateEndpointRule.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/UpdatePrivateEndpointRule.java index bd10332c1..a933db720 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/UpdatePrivateEndpointRule.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/settings/UpdatePrivateEndpointRule.java @@ -24,10 +24,9 @@ public class UpdatePrivateEndpointRule { private Collection domainNames; /** - * Only used by private endpoints towards an AWS S3 service. - * - *

Update this field to activate/deactivate this private endpoint to allow egress access from - * serverless compute resources. + * Update this field to activate/deactivate this private endpoint to allow egress access from + * serverless compute resources. Only honored for first-party services on each cloud (e.g. AWS + * S3). */ @JsonProperty("enabled") private Boolean enabled; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/vectorsearch/CreateEndpoint.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/vectorsearch/CreateEndpoint.java index d5ebbaf18..c10342095 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/vectorsearch/CreateEndpoint.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/vectorsearch/CreateEndpoint.java @@ -17,18 +17,18 @@ public class CreateEndpoint { @JsonProperty("endpoint_type") private EndpointType endpointType; - /** - * Deprecated: use target_qps. Min QPS for the endpoint. Mutually exclusive with num_replicas. - * Kept at PUBLIC_BETA with deprecated = true so generated SDK surfaces keep the field with a - * deprecation marker; hiding completely is a follow-up PR. - */ - @JsonProperty("min_qps") - private Long minQps; - /** Name of the vector search endpoint */ @JsonProperty("name") private String name; + /** + * Target QPS for the endpoint. Mutually exclusive with num_replicas. The actual replica count is + * calculated at index creation/sync time based on this value. Best-effort target; the system does + * not guarantee this QPS will be achieved. + */ + @JsonProperty("target_qps") + private Long targetQps; + /** The usage policy id to be applied once we've migrated to usage policies */ @JsonProperty("usage_policy_id") private String usagePolicyId; @@ -51,22 +51,22 @@ public EndpointType getEndpointType() { return endpointType; } - public CreateEndpoint setMinQps(Long minQps) { - this.minQps = minQps; + public CreateEndpoint setName(String name) { + this.name = name; return this; } - public Long getMinQps() { - return minQps; + public String getName() { + return name; } - public CreateEndpoint setName(String name) { - this.name = name; + public CreateEndpoint setTargetQps(Long targetQps) { + this.targetQps = targetQps; return this; } - public String getName() { - return name; + public Long getTargetQps() { + return targetQps; } public CreateEndpoint setUsagePolicyId(String usagePolicyId) { @@ -85,14 +85,14 @@ public boolean equals(Object o) { CreateEndpoint that = (CreateEndpoint) o; return Objects.equals(budgetPolicyId, that.budgetPolicyId) && Objects.equals(endpointType, that.endpointType) - && Objects.equals(minQps, that.minQps) && Objects.equals(name, that.name) + && Objects.equals(targetQps, that.targetQps) && Objects.equals(usagePolicyId, that.usagePolicyId); } @Override public int hashCode() { - return Objects.hash(budgetPolicyId, endpointType, minQps, name, usagePolicyId); + return Objects.hash(budgetPolicyId, endpointType, name, targetQps, usagePolicyId); } @Override @@ -100,8 +100,8 @@ public String toString() { return new ToStringer(CreateEndpoint.class) .add("budgetPolicyId", budgetPolicyId) .add("endpointType", endpointType) - .add("minQps", minQps) .add("name", name) + .add("targetQps", targetQps) .add("usagePolicyId", usagePolicyId) .toString(); } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/vectorsearch/DeltaSyncVectorIndexSpecRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/vectorsearch/DeltaSyncVectorIndexSpecRequest.java index e893e2b55..3f14a73b1 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/vectorsearch/DeltaSyncVectorIndexSpecRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/vectorsearch/DeltaSyncVectorIndexSpecRequest.java @@ -10,6 +10,15 @@ @Generated public class DeltaSyncVectorIndexSpecRequest { + /** + * [Optional] Alias for columns_to_sync. Select the columns to include in the vector index. If you + * leave this field blank, all columns from the source table are included. The primary key column + * and embedding source column or embedding vector column are always included. Only one of + * columns_to_sync or columns_to_index may be specified. + */ + @JsonProperty("columns_to_index") + private Collection columnsToIndex; + /** * [Optional] Select the columns to sync with the vector index. If you leave this field blank, all * columns from the source table are synced with the index. The primary key column and embedding @@ -47,6 +56,15 @@ public class DeltaSyncVectorIndexSpecRequest { @JsonProperty("source_table") private String sourceTable; + public DeltaSyncVectorIndexSpecRequest setColumnsToIndex(Collection columnsToIndex) { + this.columnsToIndex = columnsToIndex; + return this; + } + + public Collection getColumnsToIndex() { + return columnsToIndex; + } + public DeltaSyncVectorIndexSpecRequest setColumnsToSync(Collection columnsToSync) { this.columnsToSync = columnsToSync; return this; @@ -109,7 +127,8 @@ public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; DeltaSyncVectorIndexSpecRequest that = (DeltaSyncVectorIndexSpecRequest) o; - return Objects.equals(columnsToSync, that.columnsToSync) + return Objects.equals(columnsToIndex, that.columnsToIndex) + && Objects.equals(columnsToSync, that.columnsToSync) && Objects.equals(embeddingSourceColumns, that.embeddingSourceColumns) && Objects.equals(embeddingVectorColumns, that.embeddingVectorColumns) && Objects.equals(embeddingWritebackTable, that.embeddingWritebackTable) @@ -120,6 +139,7 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( + columnsToIndex, columnsToSync, embeddingSourceColumns, embeddingVectorColumns, @@ -131,6 +151,7 @@ public int hashCode() { @Override public String toString() { return new ToStringer(DeltaSyncVectorIndexSpecRequest.class) + .add("columnsToIndex", columnsToIndex) .add("columnsToSync", columnsToSync) .add("embeddingSourceColumns", embeddingSourceColumns) .add("embeddingVectorColumns", embeddingVectorColumns) diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/vectorsearch/DeltaSyncVectorIndexSpecResponse.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/vectorsearch/DeltaSyncVectorIndexSpecResponse.java index d8cbaf63a..8cbf33178 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/vectorsearch/DeltaSyncVectorIndexSpecResponse.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/vectorsearch/DeltaSyncVectorIndexSpecResponse.java @@ -10,6 +10,15 @@ @Generated public class DeltaSyncVectorIndexSpecResponse { + /** + * [Optional] Alias for columns_to_sync. Select the columns to include in the vector index. If you + * leave this field blank, all columns from the source table are included. The primary key column + * and embedding source column or embedding vector column are always included. Only one of + * columns_to_sync or columns_to_index may be specified. + */ + @JsonProperty("columns_to_index") + private Collection columnsToIndex; + /** * [Optional] Select the columns to sync with the vector index. If you leave this field blank, all * columns from the source table are synced with the index. The primary key column and embedding @@ -51,6 +60,15 @@ public class DeltaSyncVectorIndexSpecResponse { @JsonProperty("source_table") private String sourceTable; + public DeltaSyncVectorIndexSpecResponse setColumnsToIndex(Collection columnsToIndex) { + this.columnsToIndex = columnsToIndex; + return this; + } + + public Collection getColumnsToIndex() { + return columnsToIndex; + } + public DeltaSyncVectorIndexSpecResponse setColumnsToSync(Collection columnsToSync) { this.columnsToSync = columnsToSync; return this; @@ -122,7 +140,8 @@ public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; DeltaSyncVectorIndexSpecResponse that = (DeltaSyncVectorIndexSpecResponse) o; - return Objects.equals(columnsToSync, that.columnsToSync) + return Objects.equals(columnsToIndex, that.columnsToIndex) + && Objects.equals(columnsToSync, that.columnsToSync) && Objects.equals(embeddingSourceColumns, that.embeddingSourceColumns) && Objects.equals(embeddingVectorColumns, that.embeddingVectorColumns) && Objects.equals(embeddingWritebackTable, that.embeddingWritebackTable) @@ -134,6 +153,7 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( + columnsToIndex, columnsToSync, embeddingSourceColumns, embeddingVectorColumns, @@ -146,6 +166,7 @@ public int hashCode() { @Override public String toString() { return new ToStringer(DeltaSyncVectorIndexSpecResponse.class) + .add("columnsToIndex", columnsToIndex) .add("columnsToSync", columnsToSync) .add("embeddingSourceColumns", embeddingSourceColumns) .add("embeddingVectorColumns", embeddingVectorColumns) diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/vectorsearch/EndpointInfo.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/vectorsearch/EndpointInfo.java index 55fe83b3a..0234517c3 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/vectorsearch/EndpointInfo.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/vectorsearch/EndpointInfo.java @@ -10,11 +10,7 @@ @Generated public class EndpointInfo { - /** - * Discussed here: https://databricks.atlassian.net/wiki/x/OQDlCQE Additional documentation: - * https://aip.dev.databricks.com/129 the user selected budget policy id for the endpoint - * (client-side) - */ + /** The user-selected budget policy id for the endpoint. */ @JsonProperty("budget_policy_id") private String budgetPolicyId; diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/vectorsearch/EndpointScalingInfo.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/vectorsearch/EndpointScalingInfo.java index 680d34582..605546be9 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/vectorsearch/EndpointScalingInfo.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/vectorsearch/EndpointScalingInfo.java @@ -10,25 +10,23 @@ @Generated public class EndpointScalingInfo { /** - * Deprecated: use requested_target_qps. Kept at PUBLIC_BETA with deprecated = true so generated - * SDK surfaces (Go, Java, TypeScript, Terraform) keep exposing the field with a deprecation - * marker rather than losing it on next regeneration. Hiding completely (visibility = - * PUBLIC_UNDOCUMENTED) is a follow-up PR once downstream consumers have migrated. + * The requested QPS target for the endpoint. Best-effort; the system does not guarantee this QPS + * will be achieved. */ - @JsonProperty("requested_min_qps") - private Long requestedMinQps; + @JsonProperty("requested_target_qps") + private Long requestedTargetQps; /** The current state of the scaling change request. */ @JsonProperty("state") private ScalingChangeState state; - public EndpointScalingInfo setRequestedMinQps(Long requestedMinQps) { - this.requestedMinQps = requestedMinQps; + public EndpointScalingInfo setRequestedTargetQps(Long requestedTargetQps) { + this.requestedTargetQps = requestedTargetQps; return this; } - public Long getRequestedMinQps() { - return requestedMinQps; + public Long getRequestedTargetQps() { + return requestedTargetQps; } public EndpointScalingInfo setState(ScalingChangeState state) { @@ -45,19 +43,19 @@ public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; EndpointScalingInfo that = (EndpointScalingInfo) o; - return Objects.equals(requestedMinQps, that.requestedMinQps) + return Objects.equals(requestedTargetQps, that.requestedTargetQps) && Objects.equals(state, that.state); } @Override public int hashCode() { - return Objects.hash(requestedMinQps, state); + return Objects.hash(requestedTargetQps, state); } @Override public String toString() { return new ToStringer(EndpointScalingInfo.class) - .add("requestedMinQps", requestedMinQps) + .add("requestedTargetQps", requestedTargetQps) .add("state", state) .toString(); } diff --git a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/vectorsearch/PatchEndpointRequest.java b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/vectorsearch/PatchEndpointRequest.java index 5dad905f0..53105578d 100755 --- a/databricks-sdk-java/src/main/java/com/databricks/sdk/service/vectorsearch/PatchEndpointRequest.java +++ b/databricks-sdk-java/src/main/java/com/databricks/sdk/service/vectorsearch/PatchEndpointRequest.java @@ -14,12 +14,11 @@ public class PatchEndpointRequest { @JsonIgnore private String endpointName; /** - * Deprecated: use target_qps. Min QPS for the endpoint. Positive integer sets QPS target; -1 - * resets to default scaling behavior. Kept at PUBLIC_BETA with deprecated = true so generated SDK - * surfaces keep the field with a deprecation marker; hiding completely is a follow-up PR. + * Target QPS for the endpoint. Best-effort; the system does not guarantee this QPS will be + * achieved. */ - @JsonProperty("min_qps") - private Long minQps; + @JsonProperty("target_qps") + private Long targetQps; public PatchEndpointRequest setEndpointName(String endpointName) { this.endpointName = endpointName; @@ -30,13 +29,13 @@ public String getEndpointName() { return endpointName; } - public PatchEndpointRequest setMinQps(Long minQps) { - this.minQps = minQps; + public PatchEndpointRequest setTargetQps(Long targetQps) { + this.targetQps = targetQps; return this; } - public Long getMinQps() { - return minQps; + public Long getTargetQps() { + return targetQps; } @Override @@ -44,19 +43,20 @@ public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; PatchEndpointRequest that = (PatchEndpointRequest) o; - return Objects.equals(endpointName, that.endpointName) && Objects.equals(minQps, that.minQps); + return Objects.equals(endpointName, that.endpointName) + && Objects.equals(targetQps, that.targetQps); } @Override public int hashCode() { - return Objects.hash(endpointName, minQps); + return Objects.hash(endpointName, targetQps); } @Override public String toString() { return new ToStringer(PatchEndpointRequest.class) .add("endpointName", endpointName) - .add("minQps", minQps) + .add("targetQps", targetQps) .toString(); } } diff --git a/databricks-sdk-java/src/test/java/com/databricks/sdk/service/lrotesting/DeleteTestResourceOperation.java b/databricks-sdk-java/src/test/java/com/databricks/sdk/service/lrotesting/DeleteTestResourceOperation.java index 7cf4d4fb7..3ad987854 100755 --- a/databricks-sdk-java/src/test/java/com/databricks/sdk/service/lrotesting/DeleteTestResourceOperation.java +++ b/databricks-sdk-java/src/test/java/com/databricks/sdk/service/lrotesting/DeleteTestResourceOperation.java @@ -89,6 +89,7 @@ public void waitForCompletion(Optional options) throws TimeoutExcept try { JsonNode responseJson = objectMapper.valueToTree(operation.getResponse()); objectMapper.treeToValue(responseJson, Void.class); + return; } catch (JsonProcessingException e) { throw new DatabricksException("Failed to unmarshal response: " + e.getMessage(), e); } diff --git a/tagging.py b/tagging.py index a48039a54..2621a1269 100755 --- a/tagging.py +++ b/tagging.py @@ -525,6 +525,131 @@ def is_tag_applied(tag: TagInfo) -> bool: raise Exception(f"Git command failed: {e.stderr.strip() or e}") from e +def find_last_release_tag(package: Package) -> Optional[str]: + """ + Returns the most recent ``/v*`` tag in the repository, or + ``None`` if no such tag exists. Tags are sorted by semver ordering + (``--sort=-v:refname``) so pre-releases sort below their stable + counterparts. + + :raises Exception: If the git command fails. + """ + pattern = f"{package.name}/v*" if package.name else "v*" + try: + output = subprocess.check_output( + ["git", "tag", "--list", pattern, "--sort=-v:refname"], + stderr=subprocess.PIPE, + text=True, + ).strip() + except subprocess.CalledProcessError as e: + raise Exception(f"Git command failed: {e.stderr.strip() or e}") from e + if not output: + return None + return output.split("\n")[0].strip() + + +def has_commits_since_tag(tag: str, path: str) -> bool: + """ + Returns True iff at least one commit reachable from HEAD but not from + ``tag`` touches ``path``. Used to detect that a sibling dependency has + unreleased changes that would ship stale if we tagged a dependent + without re-tagging the dependency. + + :raises Exception: If the git command fails. + """ + args = ["git", "log", "--oneline", f"{tag}..HEAD", "--", path or "."] + try: + output = subprocess.check_output(args, stderr=subprocess.PIPE, text=True).strip() + except subprocess.CalledProcessError as e: + raise Exception(f"Git command failed: {e.stderr.strip() or e}") from e + return bool(output) + + +def check_dependency_freshness(tag_infos: List[TagInfo], all_packages: List[Package]) -> None: + """ + Hard-fails when a package being released depends on a sibling package + that has unreleased commits since its last tag. + + Why: dependency rewrites (``stage_version_updates``) only fire for + siblings that are *also* being released. Without this check, releasing + package_a alone — when package_b has commits since its last tag — + publishes ``package_a@new`` pinning the *old* package_b artifact, which + won't have the changes package_a's source depends on. The check is + commit-based (not changelog-based) so a missing ``NEXT_CHANGELOG.md`` + entry on package_b is still caught. + + No-op when ``.codegen.json`` declares no dependency pattern (legacy + SDKs without per-package wiring). + """ + if not tag_infos: + return + + package_file_path = os.path.join(os.getcwd(), CODEGEN_FILE_NAME) + with open(package_file_path, "r") as file: + codegen = json.load(file) + + name_template = codegen.get("dependency_name_template", "") + dep_patterns = codegen.get("dependency_pattern", {}) + if not name_template or not dep_patterns: + return + + releasing_paths = {info.package.path for info in tag_infos} + by_dep_name: Dict[str, Package] = {} + for pkg in all_packages: + if not pkg.name: + continue + by_dep_name[name_template.replace("$PACKAGE", pkg.name)] = pkg + + issues: List[str] = [] + for info in tag_infos: + for filename, pattern in dep_patterns.items(): + loc = os.path.join(os.getcwd(), info.package.path, filename) + if not os.path.exists(loc): + continue + with open(loc, "r") as f: + content = f.read() + + for dep_name, dep_pkg in by_dep_name.items(): + if dep_pkg.path == info.package.path: + continue + if dep_pkg.path in releasing_paths: + continue + + # Same regex construction used by ``rewrite_dependencies``, + # so "is this dep referenced?" matches "would the rewrite + # touch it?". Keeps the two in lockstep. + regex = ( + re.escape(pattern) + .replace(re.escape("$DEPENDENCY"), re.escape(dep_name)) + .replace(re.escape("$VERSION"), Version.PATTERN) + ) + if not re.search(regex, content): + continue + + last_tag = find_last_release_tag(dep_pkg) + if last_tag is None: + # No prior tag means the dep was never released; we + # can't reason about staleness. Surface it anyway so + # the human resolves it explicitly. + issues.append( + f"{info.package.name} depends on {dep_pkg.name}, " + f"which has never been released. Release " + f"{dep_pkg.name} first or include it in this run." + ) + continue + if has_commits_since_tag(last_tag, dep_pkg.path): + issues.append( + f"{info.package.name} depends on {dep_pkg.name}, " + f"which has commits since {last_tag} but is not " + f"being released. Either release {dep_pkg.name} " + f"as well, or hold this release until its changes " + f"are reverted." + ) + + if issues: + raise Exception("Dependency freshness check failed:\n - " + "\n - ".join(issues)) + + def find_last_tags() -> List[TagInfo]: """ Finds the last tags for each package. @@ -628,18 +753,40 @@ def retry_function( raise e # Re-raise the exception after max retries -def update_changelogs(packages: List[Package]) -> List[TagInfo]: +def update_changelogs(selected_packages: List[Package], all_packages: List[Package]) -> List[TagInfo]: """ Updates changelogs and pushes the commits. + + ``selected_packages`` are the packages whose ``NEXT_CHANGELOG.md`` is + consulted to decide what gets released this run. ``all_packages`` is + the full repo inventory used for cross-package dep rewrites. + + The freshness check is deliberately *not* called here. ``process`` + runs it before entering the retry loop so a freshness violation + fails fast — the check is deterministic against the same git state, + so wrapping it in retry would just delay the same failure five + times. """ - tag_infos = [info for info in (process_package(package) for package in packages) if info is not None] + tag_infos = [info for info in (process_package(package) for package in selected_packages) if info is not None] # If any package was changed, stage version updates and push. if tag_infos: - stage_version_updates(tag_infos, packages) + stage_version_updates(tag_infos, all_packages) push_changes(tag_infos) return tag_infos +def preview_tag_infos(packages: List[Package]) -> List[TagInfo]: + """ + Read-only sibling of ``process_package``: returns the TagInfos that + would be released for ``packages`` without writing any changelog + edits. ``process`` calls this before the retry loop so the freshness + check has a snapshot to validate against. ``process_package`` will + re-derive the same TagInfos when ``update_changelogs`` runs; the + duplication is just a couple of NEXT_CHANGELOG.md reads. + """ + return [info for info in (get_next_tag_info(package) for package in packages) if info is not None] + + def push_tags(tag_infos: List[TagInfo]) -> None: """ Creates and pushes tags to the repository. @@ -755,12 +902,24 @@ def process(): push_tags(pending_tags) return - packages = find_packages() - # If packages are specified as an argument, only process those packages. + all_packages = find_packages() + # If packages are specified as an argument, only release those — but + # dep rewrites and the freshness check still operate over the full + # set. + selected_packages = all_packages if package_names: - packages = [package for package in packages if package.name in package_names] + selected_packages = [package for package in all_packages if package.name in package_names] + + # Run the freshness check against a read-only preview before the + # retry loop, since the check is deterministic. A freshness + # violation fails the run immediately, with no commits, no tags, no + # retry storm. + check_dependency_freshness(preview_tag_infos(selected_packages), all_packages) - pending_tags = retry_function(func=lambda: update_changelogs(packages), cleanup=reset_repository) + pending_tags = retry_function( + func=lambda: update_changelogs(selected_packages, all_packages), + cleanup=reset_repository, + ) push_tags(pending_tags)