Skip to content

Commit

Permalink
fix(deps): update dependency com.google.cloud:libraries-bom to v26.51…
Browse files Browse the repository at this point in the history
….0 (#3350)

* fix(deps): update dependency com.google.cloud:libraries-bom to v26.51.0

* add additional mock

* remove redundant null-checker (and avoid ImpossibleNullComparison)

* add additional mocks

* fix(deps): update dependency com.google.cloud:libraries-bom to v26.51.0

* chore: update starter modules in spring-cloud-previews

---------

Co-authored-by: Jin Seop Kim <[email protected]>
Co-authored-by: Cloud Java Bot <[email protected]>
  • Loading branch information
3 people authored Dec 6, 2024
1 parent 03b7416 commit a270a7d
Show file tree
Hide file tree
Showing 21 changed files with 1,883 additions and 111 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ void should_inject_child_context() {
assertThat(producerSpan.kind()).isEqualTo(PRODUCER);
assertChildOf(producerSpan, parent);
assertThat(instrumentedMessage.getAttributesMap())
.isNotNull()
.containsEntry("b3", producerSpan.traceId() + "-" + producerSpan.id() + "-1");
}

Expand Down
2 changes: 1 addition & 1 deletion spring-cloud-gcp-dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
</distributionManagement>

<properties>
<gcp-libraries-bom.version>26.49.0</gcp-libraries-bom.version>
<gcp-libraries-bom.version>26.51.0</gcp-libraries-bom.version>
<cloud-sql-socket-factory.version>1.21.0</cloud-sql-socket-factory.version>
<r2dbc-postgres-driver.version>1.0.7.RELEASE</r2dbc-postgres-driver.version>
<cloud-spanner-r2dbc.version>1.3.0</cloud-spanner-r2dbc.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyBoolean;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

Expand Down Expand Up @@ -46,6 +47,7 @@ public void setUp() throws IOException {
factory.setCredentialsProvider(NoCredentialsProvider.create());
TransportChannelProvider mockChannelProvider = mock(TransportChannelProvider.class);
TransportChannel mockTransportChannel = mock(TransportChannel.class);
when(mockChannelProvider.withUseS2A(anyBoolean())).thenReturn(mockChannelProvider);
when(mockChannelProvider.getTransportChannel()).thenReturn(mockTransportChannel);
ApiCallContext mockContext = mock(ApiCallContext.class);
when(mockTransportChannel.getEmptyCallContext()).thenReturn(mockContext);
Expand Down
218 changes: 109 additions & 109 deletions spring-cloud-previews/README.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,11 @@ public ArtifactRegistrySettings artifactRegistrySettings(
clientSettingsBuilder.getVersionSettings().getRetrySettings(), serviceRetry);
clientSettingsBuilder.getVersionSettings().setRetrySettings(getVersionRetrySettings);

RetrySettings updateVersionRetrySettings =
RetryUtil.updateRetrySettings(
clientSettingsBuilder.updateVersionSettings().getRetrySettings(), serviceRetry);
clientSettingsBuilder.updateVersionSettings().setRetrySettings(updateVersionRetrySettings);

RetrySettings listFilesRetrySettings =
RetryUtil.updateRetrySettings(
clientSettingsBuilder.listFilesSettings().getRetrySettings(), serviceRetry);
Expand All @@ -262,6 +267,11 @@ public ArtifactRegistrySettings artifactRegistrySettings(
clientSettingsBuilder.getFileSettings().getRetrySettings(), serviceRetry);
clientSettingsBuilder.getFileSettings().setRetrySettings(getFileRetrySettings);

RetrySettings updateFileRetrySettings =
RetryUtil.updateRetrySettings(
clientSettingsBuilder.updateFileSettings().getRetrySettings(), serviceRetry);
clientSettingsBuilder.updateFileSettings().setRetrySettings(updateFileRetrySettings);

RetrySettings listTagsRetrySettings =
RetryUtil.updateRetrySettings(
clientSettingsBuilder.listTagsSettings().getRetrySettings(), serviceRetry);
Expand All @@ -287,6 +297,31 @@ public ArtifactRegistrySettings artifactRegistrySettings(
clientSettingsBuilder.deleteTagSettings().getRetrySettings(), serviceRetry);
clientSettingsBuilder.deleteTagSettings().setRetrySettings(deleteTagRetrySettings);

RetrySettings createRuleRetrySettings =
RetryUtil.updateRetrySettings(
clientSettingsBuilder.createRuleSettings().getRetrySettings(), serviceRetry);
clientSettingsBuilder.createRuleSettings().setRetrySettings(createRuleRetrySettings);

RetrySettings listRulesRetrySettings =
RetryUtil.updateRetrySettings(
clientSettingsBuilder.listRulesSettings().getRetrySettings(), serviceRetry);
clientSettingsBuilder.listRulesSettings().setRetrySettings(listRulesRetrySettings);

RetrySettings getRuleRetrySettings =
RetryUtil.updateRetrySettings(
clientSettingsBuilder.getRuleSettings().getRetrySettings(), serviceRetry);
clientSettingsBuilder.getRuleSettings().setRetrySettings(getRuleRetrySettings);

RetrySettings updateRuleRetrySettings =
RetryUtil.updateRetrySettings(
clientSettingsBuilder.updateRuleSettings().getRetrySettings(), serviceRetry);
clientSettingsBuilder.updateRuleSettings().setRetrySettings(updateRuleRetrySettings);

RetrySettings deleteRuleRetrySettings =
RetryUtil.updateRetrySettings(
clientSettingsBuilder.deleteRuleSettings().getRetrySettings(), serviceRetry);
clientSettingsBuilder.deleteRuleSettings().setRetrySettings(deleteRuleRetrySettings);

RetrySettings setIamPolicyRetrySettings =
RetryUtil.updateRetrySettings(
clientSettingsBuilder.setIamPolicySettings().getRetrySettings(), serviceRetry);
Expand Down Expand Up @@ -331,6 +366,23 @@ public ArtifactRegistrySettings artifactRegistrySettings(
.updateVPCSCConfigSettings()
.setRetrySettings(updateVPCSCConfigRetrySettings);

RetrySettings updatePackageRetrySettings =
RetryUtil.updateRetrySettings(
clientSettingsBuilder.updatePackageSettings().getRetrySettings(), serviceRetry);
clientSettingsBuilder.updatePackageSettings().setRetrySettings(updatePackageRetrySettings);

RetrySettings listAttachmentsRetrySettings =
RetryUtil.updateRetrySettings(
clientSettingsBuilder.listAttachmentsSettings().getRetrySettings(), serviceRetry);
clientSettingsBuilder
.listAttachmentsSettings()
.setRetrySettings(listAttachmentsRetrySettings);

RetrySettings getAttachmentRetrySettings =
RetryUtil.updateRetrySettings(
clientSettingsBuilder.getAttachmentSettings().getRetrySettings(), serviceRetry);
clientSettingsBuilder.getAttachmentSettings().setRetrySettings(getAttachmentRetrySettings);

RetrySettings listLocationsRetrySettings =
RetryUtil.updateRetrySettings(
clientSettingsBuilder.listLocationsSettings().getRetrySettings(), serviceRetry);
Expand Down Expand Up @@ -527,6 +579,16 @@ public ArtifactRegistrySettings artifactRegistrySettings(
LOGGER.trace("Configured method-level retry settings for getVersion from properties.");
}
}
Retry updateVersionRetry = clientProperties.getUpdateVersionRetry();
if (updateVersionRetry != null) {
RetrySettings updateVersionRetrySettings =
RetryUtil.updateRetrySettings(
clientSettingsBuilder.updateVersionSettings().getRetrySettings(), updateVersionRetry);
clientSettingsBuilder.updateVersionSettings().setRetrySettings(updateVersionRetrySettings);
if (LOGGER.isTraceEnabled()) {
LOGGER.trace("Configured method-level retry settings for updateVersion from properties.");
}
}
Retry listFilesRetry = clientProperties.getListFilesRetry();
if (listFilesRetry != null) {
RetrySettings listFilesRetrySettings =
Expand All @@ -547,6 +609,16 @@ public ArtifactRegistrySettings artifactRegistrySettings(
LOGGER.trace("Configured method-level retry settings for getFile from properties.");
}
}
Retry updateFileRetry = clientProperties.getUpdateFileRetry();
if (updateFileRetry != null) {
RetrySettings updateFileRetrySettings =
RetryUtil.updateRetrySettings(
clientSettingsBuilder.updateFileSettings().getRetrySettings(), updateFileRetry);
clientSettingsBuilder.updateFileSettings().setRetrySettings(updateFileRetrySettings);
if (LOGGER.isTraceEnabled()) {
LOGGER.trace("Configured method-level retry settings for updateFile from properties.");
}
}
Retry listTagsRetry = clientProperties.getListTagsRetry();
if (listTagsRetry != null) {
RetrySettings listTagsRetrySettings =
Expand Down Expand Up @@ -597,6 +669,56 @@ public ArtifactRegistrySettings artifactRegistrySettings(
LOGGER.trace("Configured method-level retry settings for deleteTag from properties.");
}
}
Retry createRuleRetry = clientProperties.getCreateRuleRetry();
if (createRuleRetry != null) {
RetrySettings createRuleRetrySettings =
RetryUtil.updateRetrySettings(
clientSettingsBuilder.createRuleSettings().getRetrySettings(), createRuleRetry);
clientSettingsBuilder.createRuleSettings().setRetrySettings(createRuleRetrySettings);
if (LOGGER.isTraceEnabled()) {
LOGGER.trace("Configured method-level retry settings for createRule from properties.");
}
}
Retry listRulesRetry = clientProperties.getListRulesRetry();
if (listRulesRetry != null) {
RetrySettings listRulesRetrySettings =
RetryUtil.updateRetrySettings(
clientSettingsBuilder.listRulesSettings().getRetrySettings(), listRulesRetry);
clientSettingsBuilder.listRulesSettings().setRetrySettings(listRulesRetrySettings);
if (LOGGER.isTraceEnabled()) {
LOGGER.trace("Configured method-level retry settings for listRules from properties.");
}
}
Retry getRuleRetry = clientProperties.getGetRuleRetry();
if (getRuleRetry != null) {
RetrySettings getRuleRetrySettings =
RetryUtil.updateRetrySettings(
clientSettingsBuilder.getRuleSettings().getRetrySettings(), getRuleRetry);
clientSettingsBuilder.getRuleSettings().setRetrySettings(getRuleRetrySettings);
if (LOGGER.isTraceEnabled()) {
LOGGER.trace("Configured method-level retry settings for getRule from properties.");
}
}
Retry updateRuleRetry = clientProperties.getUpdateRuleRetry();
if (updateRuleRetry != null) {
RetrySettings updateRuleRetrySettings =
RetryUtil.updateRetrySettings(
clientSettingsBuilder.updateRuleSettings().getRetrySettings(), updateRuleRetry);
clientSettingsBuilder.updateRuleSettings().setRetrySettings(updateRuleRetrySettings);
if (LOGGER.isTraceEnabled()) {
LOGGER.trace("Configured method-level retry settings for updateRule from properties.");
}
}
Retry deleteRuleRetry = clientProperties.getDeleteRuleRetry();
if (deleteRuleRetry != null) {
RetrySettings deleteRuleRetrySettings =
RetryUtil.updateRetrySettings(
clientSettingsBuilder.deleteRuleSettings().getRetrySettings(), deleteRuleRetry);
clientSettingsBuilder.deleteRuleSettings().setRetrySettings(deleteRuleRetrySettings);
if (LOGGER.isTraceEnabled()) {
LOGGER.trace("Configured method-level retry settings for deleteRule from properties.");
}
}
Retry setIamPolicyRetry = clientProperties.getSetIamPolicyRetry();
if (setIamPolicyRetry != null) {
RetrySettings setIamPolicyRetrySettings =
Expand Down Expand Up @@ -684,6 +806,39 @@ public ArtifactRegistrySettings artifactRegistrySettings(
"Configured method-level retry settings for updateVPCSCConfig from properties.");
}
}
Retry updatePackageRetry = clientProperties.getUpdatePackageRetry();
if (updatePackageRetry != null) {
RetrySettings updatePackageRetrySettings =
RetryUtil.updateRetrySettings(
clientSettingsBuilder.updatePackageSettings().getRetrySettings(), updatePackageRetry);
clientSettingsBuilder.updatePackageSettings().setRetrySettings(updatePackageRetrySettings);
if (LOGGER.isTraceEnabled()) {
LOGGER.trace("Configured method-level retry settings for updatePackage from properties.");
}
}
Retry listAttachmentsRetry = clientProperties.getListAttachmentsRetry();
if (listAttachmentsRetry != null) {
RetrySettings listAttachmentsRetrySettings =
RetryUtil.updateRetrySettings(
clientSettingsBuilder.listAttachmentsSettings().getRetrySettings(),
listAttachmentsRetry);
clientSettingsBuilder
.listAttachmentsSettings()
.setRetrySettings(listAttachmentsRetrySettings);
if (LOGGER.isTraceEnabled()) {
LOGGER.trace("Configured method-level retry settings for listAttachments from properties.");
}
}
Retry getAttachmentRetry = clientProperties.getGetAttachmentRetry();
if (getAttachmentRetry != null) {
RetrySettings getAttachmentRetrySettings =
RetryUtil.updateRetrySettings(
clientSettingsBuilder.getAttachmentSettings().getRetrySettings(), getAttachmentRetry);
clientSettingsBuilder.getAttachmentSettings().setRetrySettings(getAttachmentRetrySettings);
if (LOGGER.isTraceEnabled()) {
LOGGER.trace("Configured method-level retry settings for getAttachment from properties.");
}
}
Retry listLocationsRetry = clientProperties.getListLocationsRetry();
if (listLocationsRetry != null) {
RetrySettings listLocationsRetrySettings =
Expand Down
Loading

0 comments on commit a270a7d

Please sign in to comment.