Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions eng/common/testproxy/test-proxy-standalone-tool.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ steps:

# nohup does NOT continue beyond the current session if you use it within powershell
- bash: |
if [[ "$(uname)" == "Darwin" ]]; then
export DOTNET_ROOT="$HOME/.dotnet"
fi
echo "nohup $(PROXY_EXE) 1>${{ parameters.rootFolder }}/test-proxy.log 2>${{ parameters.rootFolder }}/test-proxy-error.log &"
nohup $(PROXY_EXE) 1>${{ parameters.rootFolder }}/test-proxy.log 2>${{ parameters.rootFolder }}/test-proxy-error.log &

Expand All @@ -84,6 +87,8 @@ steps:
displayName: "Run the testproxy - linux/mac"
condition: and(succeeded(), ne(variables['Agent.OS'],'Windows_NT'), ${{ parameters.condition }})
workingDirectory: "${{ parameters.rootFolder }}"
env:
DOTNET_ROLL_FORWARD: 'Major'

- pwsh: |
for ($i = 0; $i -lt 10; $i++) {
Expand Down
3 changes: 3 additions & 0 deletions eng/common/testproxy/test-proxy-tool.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ steps:

# nohup does NOT continue beyond the current session if you use it within powershell
- bash: |
if [[ "$(uname)" == "Darwin" ]]; then
export DOTNET_ROOT="$HOME/.dotnet"
fi
nohup $(Build.BinariesDirectory)/test-proxy/test-proxy 1>${{ parameters.rootFolder }}/test-proxy.log 2>${{ parameters.rootFolder }}/test-proxy-error.log &

echo $! > $(Build.SourcesDirectory)/test-proxy.pid
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ stages:
# the Validation step below publishes a package to a "burner" feed which is cleaned up after the
# pipeline completes.
- ${{if and(in(variables['Build.Reason'], 'Manual', ''), eq(variables['System.TeamProject'], 'internal'))}}:
- stage:
- stage: Release
displayName: 'Releasing: ${{ length(parameters.Artifacts) }} libraries'
dependsOn: Signing
condition: and(succeeded(), ne(variables['SetDevVersion'], 'true'), ne(variables['Skip.Release'], 'true'), ne(variables['Build.Repository.Name'], 'Azure/azure-sdk-for-java-pr'))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ stages:
# the Validation step below publishes a package to a "burner" feed which is cleaned up after the
# pipeline completes.
- ${{if and(in(variables['Build.Reason'], 'Manual', ''), eq(variables['System.TeamProject'], 'internal'))}}:
- stage:
- stage: Release
displayName: 'Releasing: ${{ length(parameters.Artifacts) }} libraries'
dependsOn: Signing
variables:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ stages:
# pipeline completes.
- ${{if and(eq(variables['Build.Reason'], 'Manual'), eq(variables['System.TeamProject'], 'internal'))}}:
- ${{ each artifact in parameters.Artifacts }}:
- stage:
- stage: Release_${{artifact.safeName}}
displayName: 'Release: ${{artifact.name}}'
dependsOn: Signing
variables:
Expand Down
10 changes: 10 additions & 0 deletions eng/pipelines/templates/steps/install-latest-jdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,13 @@ steps:
Write-Host "Latest JDK: $Env:JAVA_HOME_${{ parameters.LatestJdkFeatureVersion }}_X64"
displayName: 'Verify Latest JDK Install'
condition: eq(variables['IsLatestNonLtsJdk'], 'true')

- task: PowerShell@2
displayName: 'Install JDK 8 on macOS'
inputs:
pwsh: true
arguments: >
-JdkFeatureVersion 8
workingDirectory: $(Agent.BuildDirectory)
filePath: eng/scripts/Install-Latest-JDK.ps1
condition: eq(variables['Agent.OS'], 'Darwin')
32 changes: 28 additions & 4 deletions eng/scripts/Install-Latest-JDK.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,19 @@ if ($IsWindows) {
$os = "linux"
}

$jdkFeatureVersionJavaHome = "JAVA_HOME_" + $JdkFeatureVersion + "_X64"
Write-Host "Checking if $jdkFeatureVersionJavaHome is already set and exists..."
$javaHomeValue = [System.Environment]::GetEnvironmentVariable($jdkFeatureVersionJavaHome)
if ($javaHomeValue) {
$jdkBinPath = Join-Path -Path $javaHomeValue -ChildPath "bin/java"
if (Test-Path -Path $jdkBinPath) {
Write-Host "$jdkFeatureVersionJavaHome is already set to $javaHomeValue"
exit 0
}
} else {
Write-Host "$jdkFeatureVersionJavaHome is not set, proceeding with installation..."
}

$getInstalls = "$adoptiumApiUrl/v3/assets/latest/$JdkFeatureVersion/hotspot?architecture=x64&image_type=jdk&os=$os&vendor=eclipse"
$jdkUnzipName = "jdk-$JdkFeatureVersion"

Expand Down Expand Up @@ -43,11 +56,22 @@ if (!(Test-Path -Path $jdkUnzipName -PathType container)) {
}

$javaHome = (Convert-Path $jdkUnzipName)
Write-Host "Latest JDK: $javaHome"

if ($IsMacOS) {
# On macOS, the JDK is inside a subdirectory of the unzipped folder.
$correctJavaHome = Join-Path -Path $javaHome -ChildPath "Contents/Home"
$javaBinPath = Join-Path -Path $correctJavaHome -ChildPath "bin/java"
if (Test-Path $javaBinPath) {
$javaHome = $correctJavaHome
Write-Host "Updated JAVA_HOME on macOS: $correctJavaHome"
} else {
Write-Error "Failed to find Java at: $correctJavaHome"
exit 1
}
}

Write-Host "Latest JDK: $javaHome"
Write-Host "Current JAVA_HOME: $Env:JAVA_HOME"
Write-Host "##vso[task.setvariable variable=JAVA_HOME;]$javaHome"
Write-Host "Updated JAVA_HOME: $Env:JAVA_HOME"

$jdkFeatureVersionJavaHome = "JAVA_HOME_" + $JdkFeatureVersion + "_X64"
Write-Host "Updated JAVA_HOME to : $javaHome"
Write-Host "##vso[task.setvariable variable=$jdkFeatureVersionJavaHome;]$javaHome"
9 changes: 6 additions & 3 deletions eng/versioning/external_dependencies.txt
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ commons-cli:commons-cli;1.9.0
org.assertj:assertj-core;3.22.0
org.bouncycastle:bcprov-jdk15to18;1.78.1
org.bouncycastle:bcprov-jdk18on;1.78.1
org.bouncycastle:bcpkix-lts8on;2.73.6
org.bouncycastle:bcpkix-lts8on;2.73.8
org.eclipse.jetty:jetty-alpn-conscrypt-server;9.4.57.v20241219
org.eclipse.jetty:jetty-server;9.4.57.v20241219
org.eclipse.jetty:jetty-servlet;9.4.57.v20241219
Expand Down Expand Up @@ -411,8 +411,11 @@ springboot3_org.springframework:spring-test;6.2.9
springboot3_org.springframework:spring-tx;6.2.9
springboot3_org.springframework:spring-web;6.2.9
springboot3_org.springframework:spring-webmvc;6.2.9
springboot3_org.testcontainers:junit-jupiter;1.21.3
springboot3_org.testcontainers:azure;1.21.3
springboot3_org.testcontainers:testcontainers-junit-jupiter;2.0.3
springboot3_org.testcontainers:testcontainers-azure;2.0.3
springboot3_org.testcontainers:testcontainers;2.0.3
springboot3_org.awaitility:awaitility;4.3.0
springboot3_com.microsoft.sqlserver:mssql-jdbc;13.2.1.jre11
# Used for Spring version updates
springboot3_org.springframework.boot:spring-boot-dependencies;3.5.4
springboot3_org.springframework.cloud:spring-cloud-dependencies;2025.0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-lts8on</artifactId>
<version>2.73.6</version> <!-- {x-version-update;org.bouncycastle:bcpkix-lts8on;external_dependency} -->
<version>2.73.8</version> <!-- {x-version-update;org.bouncycastle:bcpkix-lts8on;external_dependency} -->
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
4 changes: 2 additions & 2 deletions sdk/keyvault/azure-security-keyvault-jca/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-lts8on</artifactId>
<version>2.73.6</version> <!-- {x-version-update;org.bouncycastle:bcpkix-lts8on;external_dependency} -->
<version>2.73.8</version> <!-- {x-version-update;org.bouncycastle:bcpkix-lts8on;external_dependency} -->
<optional>true</optional>
</dependency>
<!-- Apache HttpClient -->
Expand Down Expand Up @@ -274,7 +274,7 @@
<rules>
<bannedDependencies>
<includes>
<include>org.bouncycastle:bcpkix-lts8on:[2.73.6]</include> <!-- {x-include-update;org.bouncycastle:bcpkix-lts8on;external_dependency} -->
<include>org.bouncycastle:bcpkix-lts8on:[2.73.8]</include> <!-- {x-include-update;org.bouncycastle:bcpkix-lts8on;external_dependency} -->
<include>org.conscrypt:conscrypt-openjdk-uber:[2.5.2]</include> <!-- {x-include-update;org.conscrypt:conscrypt-openjdk-uber;external_dependency} -->
<include>org.apache.httpcomponents.client5:httpclient5:[5.4.3]</include> <!-- {x-include-update;org.apache.httpcomponents.client5:httpclient5;external_dependency} -->
<include>org.brotli:dec:[0.1.2]</include> <!-- {x-include-update;org.brotli:dec;external_dependency} -->
Expand Down
29 changes: 29 additions & 0 deletions sdk/spring/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,34 @@
# Release History

## 5.25.0 (Not Released)

### Spring Cloud Azure Autoconfigure

This section includes changes in `spring-cloud-azure-autoconfigure` module.

#### New Features

- Add ConnectionDetails for ServiceBus. [#44019](https://github.com/Azure/azure-sdk-for-java/pull/44019).
- Add ConnectionDetails for EventHubs. [#47926](https://github.com/Azure/azure-sdk-for-java/pull/47926).

### Spring Cloud Azure Docker Compose

This section includes changes in `spring-cloud-azure-docker-compose` module.

#### New Features

- Add ServiceBusDockerComposeConnectionDetailsFactory. [#44019](https://github.com/Azure/azure-sdk-for-java/pull/44019).
- Add EventHubsDockerComposeConnectionDetailsFactory. [#47926](https://github.com/Azure/azure-sdk-for-java/pull/47926).

### Spring Cloud Azure Test Containers

This section includes changes in `spring-cloud-azure-testcontainers` module.

#### New Features

- Add ServiceBusContainerConnectionDetailsFactory. [#44019](https://github.com/Azure/azure-sdk-for-java/pull/44019).
- Add EventHubsContainerConnectionDetailsFactory. [#47926](https://github.com/Azure/azure-sdk-for-java/pull/47926).

## 5.24.1 (2025-12-09)
- This release is compatible with Spring Boot 3.5.0-3.5.8, 3.4.0-3.4.12, 3.3.0-3.3.13, 3.2.0-3.2.12, 3.1.0-3.1.12, 3.0.0-3.0.13. (Note: 3.5.x (x>8) and 3.4.y (y>12) should be supported, but they aren't tested with this release.)
- This release is compatible with Spring Cloud 2025.0.0, 2024.0.0-2024.0.2, 2023.0.0-2023.0.5, 2022.0.0-2022.0.5. (Note: 2025.0.x(x>0) and 2024.0.y (y>2) should be supported, but they aren't tested with this release.)
Expand Down
2 changes: 1 addition & 1 deletion sdk/spring/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ dependencyManagement {

## Spring Boot 3 Support

The source code of Spring Cloud Azure for Spring Boot 3.x can be found on the [feature/spring-boot-3](https://github.com/Azure/azure-sdk-for-java/tree/feature/spring-boot-3) branch.
Spring Cloud Azure 5.25.0 is the latest supported version of Spring Boot 3.x.

#### Spring AOT and Spring native images

Expand Down
10 changes: 5 additions & 5 deletions sdk/spring/azure-spring-data-cosmos/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,8 @@ java -javaagent:"<path-to-applicationinsights-agent-jar>" -jar <myapp.jar>

#### Using database provisioned throughput

Cosmos supports both [container](https://learn.microsoft.com/azure/cosmos-db/sql/how-to-provision-container-throughput)
and [database](https://learn.microsoft.com/azure/cosmos-db/sql/how-to-provision-database-throughput) provisioned
Cosmos supports both [container](https://learn.microsoft.com/azure/cosmos-db/how-to-provision-container-throughput)
and [database](https://learn.microsoft.com/azure/cosmos-db/how-to-provision-database-throughput) provisioned
throughput. By default, spring-data-cosmos will provision throughput for each container created. If you prefer
to share throughput between containers, you can enable database provisioned throughput via CosmosConfig.

Expand Down Expand Up @@ -608,7 +608,7 @@ public class MyItem {
String _etag;
}
```
- Read more about Optimistic Locking [here](https://learn.microsoft.com/azure/cosmos-db/sql/database-transactions-optimistic-concurrency#optimistic-concurrency-control)
- Read more about Optimistic Locking [here](https://learn.microsoft.com/azure/cosmos-db/database-transactions-optimistic-concurrency#optimistic-concurrency-control)

### Spring Data custom query, pageable and sorting
- Azure-spring-data-cosmos supports [spring data custom queries][spring_data_custom_query]
Expand Down Expand Up @@ -1148,8 +1148,8 @@ or contact [opencode@microsoft.com][coc_contact] with any additional questions o
[coc_contact]: mailto:opencode@microsoft.com
[azure_subscription]: https://azure.microsoft.com/free/
[samples]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/azure-spring-data-cosmos/src/samples/java/com/azure/spring/data/cosmos
[sample-for-multi-database]: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_v4.3.0/cosmos/azure-spring-data-cosmos/cosmos-multi-database-multi-account
[sample-for-multi-database-single-account]: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-cloud-azure_v4.3.0/cosmos/azure-spring-data-cosmos/cosmos-multi-database-single-account
[sample-for-multi-database]: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-boot-3.x/cosmos/azure-spring-data-cosmos/cosmos-multi-database-multi-account
[sample-for-multi-database-single-account]: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/spring-boot-3.x/cosmos/azure-spring-data-cosmos/cosmos-multi-database-single-account
[sql_api_query]: https://learn.microsoft.com/azure/cosmos-db/sql-api-sql-query
[local_emulator]: https://learn.microsoft.com/azure/cosmos-db/local-emulator
[local_emulator_export_ssl_certificates]: https://learn.microsoft.com/azure/cosmos-db/local-emulator-export-ssl-certificates
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@
"current" : false,
"releaseStatus" : "GENERAL_AVAILABILITY",
"snapshot" : false,
"supportStatus" : "SUPPORTED",
"supportStatus" : "END_OF_LIFE",
"spring-boot-version" : "3.0.13",
"spring-cloud-version" : "2022.0.5"
},
Expand Down
14 changes: 14 additions & 0 deletions sdk/spring/scripts/compatibility_delete_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,20 @@
SPRING_BOOT_MAJOR_3_VERSION_TAG_PREFIX + "net.bytebuddy:byte-buddy",
SPRING_BOOT_MAJOR_3_VERSION_TAG_PREFIX + "net.bytebuddy:byte-buddy-agent",
SPRING_BOOT_MAJOR_3_VERSION_TAG_PREFIX + "org.mockito:mockito-core"
},
"3.1.12": {
SPRING_BOOT_MAJOR_3_VERSION_TAG_PREFIX + "org.apache.commons:commons-lang3",
SPRING_BOOT_MAJOR_3_VERSION_TAG_PREFIX + "org.testcontainers:azure",
SPRING_BOOT_MAJOR_3_VERSION_TAG_PREFIX + "org.testcontainers:testcontainers"
},
"3.2.12": {
SPRING_BOOT_MAJOR_3_VERSION_TAG_PREFIX + "org.apache.commons:commons-lang3",
SPRING_BOOT_MAJOR_3_VERSION_TAG_PREFIX + "org.testcontainers:azure",
SPRING_BOOT_MAJOR_3_VERSION_TAG_PREFIX + "org.testcontainers:testcontainers"
},
"3.3.13": {
SPRING_BOOT_MAJOR_3_VERSION_TAG_PREFIX + "org.testcontainers:azure",
SPRING_BOOT_MAJOR_3_VERSION_TAG_PREFIX + "org.testcontainers:testcontainers"
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
package com.azure.spring.cloud.autoconfigure.implementation.cosmos;

import com.azure.cosmos.CosmosClientBuilder;
import com.azure.spring.cloud.autoconfigure.implementation.AzureServiceConfigurationBase;
import com.azure.spring.cloud.autoconfigure.implementation.context.properties.AzureGlobalProperties;
import com.azure.spring.cloud.autoconfigure.implementation.cosmos.properties.AzureCosmosPropertiesConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
Expand All @@ -21,9 +19,5 @@
CosmosClientConfiguration.class
})
@ConditionalOnClass(CosmosClientBuilder.class)
public class AzureCosmosAutoConfiguration extends AzureServiceConfigurationBase {

protected AzureCosmosAutoConfiguration(AzureGlobalProperties azureProperties) {
super(azureProperties);
}
public class AzureCosmosAutoConfiguration {
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.ObjectProvider;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
Expand All @@ -32,6 +33,7 @@
*/
@Configuration(proxyBeanMethods = false)
@ConditionalOnClass({ BlobCheckpointStore.class, EventHubClientBuilder.class})
@ConditionalOnBean(AzureEventHubsProperties.class)
@ConditionalOnProperty(prefix = "spring.cloud.azure.eventhubs.processor.checkpoint-store", name = { "container-name", "account-name" })
class AzureBlobCheckpointStoreConfiguration {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,10 @@
package com.azure.spring.cloud.autoconfigure.implementation.eventhubs;

import com.azure.messaging.eventhubs.EventHubClientBuilder;
import com.azure.spring.cloud.autoconfigure.implementation.AzureServiceConfigurationBase;
import com.azure.spring.cloud.autoconfigure.implementation.condition.ConditionalOnAnyProperty;
import com.azure.spring.cloud.autoconfigure.implementation.context.properties.AzureGlobalProperties;
import com.azure.spring.cloud.autoconfigure.implementation.eventhubs.properties.AzureEventHubsProperties;
import com.azure.spring.cloud.core.provider.connectionstring.ServiceConnectionStringProvider;
import com.azure.spring.cloud.core.provider.connectionstring.StaticConnectionStringProvider;
import com.azure.spring.cloud.core.service.AzureServiceType;
import com.azure.spring.cloud.autoconfigure.implementation.eventhubs.properties.AzureEventHubsPropertiesConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Import;

/**
Expand All @@ -27,33 +17,14 @@
*/
@ConditionalOnClass(EventHubClientBuilder.class)
@ConditionalOnProperty(value = "spring.cloud.azure.eventhubs.enabled", havingValue = "true", matchIfMissing = true)
@ConditionalOnAnyProperty(prefix = "spring.cloud.azure.eventhubs", name = { "connection-string", "namespace" })
@Import({
AzureEventHubsPropertiesConfiguration.class,
AzureEventHubsClientBuilderConfiguration.class,
AzureEventHubsConsumerClientConfiguration.class,
AzureEventHubsProducerClientConfiguration.class,
AzureBlobCheckpointStoreConfiguration.class,
AzureEventHubsProcessorClientConfiguration.class
})
public class AzureEventHubsAutoConfiguration extends AzureServiceConfigurationBase {

AzureEventHubsAutoConfiguration(AzureGlobalProperties azureGlobalProperties) {
super(azureGlobalProperties);
}

@Bean
@ConfigurationProperties(AzureEventHubsProperties.PREFIX)
AzureEventHubsProperties azureEventHubsProperties() {
return loadProperties(getAzureGlobalProperties(), new AzureEventHubsProperties());
}

@Bean
@ConditionalOnExpression("'${spring.cloud.azure.eventhubs.connection-string:}' != ''")
@ConditionalOnMissingBean(value = AzureServiceType.EventHubs.class, parameterizedContainer = ServiceConnectionStringProvider.class)
StaticConnectionStringProvider<AzureServiceType.EventHubs> eventHubsStaticConnectionStringProvider(
AzureEventHubsProperties eventHubsProperties) {
return new StaticConnectionStringProvider<>(AzureServiceType.EVENT_HUBS,
eventHubsProperties.getConnectionString());
}
public class AzureEventHubsAutoConfiguration {

}
Loading
Loading