Skip to content

Commit

Permalink
Updated release versions to 4.45 for azure-cosmos and azure-cosmos-en…
Browse files Browse the repository at this point in the history
…cryption (Azure#34925)

* Updated releaese versions to 4.45 for azure-cosmos and azure-cosmos-encryption

* Code review comments

* Code / API review comments

* Making PriorityLevel a string enum

* Renamed end to end timeout APIs

* Reverted hot and control plane path  timeout changes

* Fixed compilation error

* renamed latency policy

---------

Co-authored-by: Fabian Meiswinkel <[email protected]>
  • Loading branch information
kushagraThapar and FabianMeiswinkel authored May 13, 2023
1 parent 7d3e306 commit 32f53bd
Show file tree
Hide file tree
Showing 50 changed files with 357 additions and 375 deletions.
4 changes: 2 additions & 2 deletions eng/jacoco-test-coverage/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,12 @@
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-cosmos</artifactId>
<version>4.45.0-beta.1</version> <!-- {x-version-update;com.azure:azure-cosmos;current} -->
<version>4.45.0</version> <!-- {x-version-update;com.azure:azure-cosmos;current} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-cosmos-encryption</artifactId>
<version>2.1.0-beta.1</version> <!-- {x-version-update;com.azure:azure-cosmos-encryption;current} -->
<version>2.1.0</version> <!-- {x-version-update;com.azure:azure-cosmos-encryption;current} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
Expand Down
4 changes: 2 additions & 2 deletions eng/versioning/version_client.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,14 @@ com.azure:azure-core-test;1.17.0;1.18.0-beta.1
com.azure:azure-core-tracing-opentelemetry;1.0.0-beta.35;1.0.0-beta.36
com.azure:azure-core-tracing-opentelemetry-samples;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-core-version-tests;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-cosmos;4.44.0;4.45.0-beta.1
com.azure:azure-cosmos;4.44.0;4.45.0
com.azure:azure-cosmos-benchmark;4.0.1-beta.1;4.0.1-beta.1
com.azure:azure-cosmos-dotnet-benchmark;4.0.1-beta.1;4.0.1-beta.1
com.azure.cosmos.spark:azure-cosmos-spark_3_2-12;1.0.0-beta.1;1.0.0-beta.1
com.azure.cosmos.spark:azure-cosmos-spark_3-1_2-12;4.18.1;4.19.0-beta.1
com.azure.cosmos.spark:azure-cosmos-spark_3-2_2-12;4.18.1;4.19.0-beta.1
com.azure.cosmos.spark:azure-cosmos-spark_3-3_2-12;4.18.1;4.19.0-beta.1
com.azure:azure-cosmos-encryption;2.0.0;2.1.0-beta.1
com.azure:azure-cosmos-encryption;2.0.0;2.1.0
com.azure:azure-cosmos-test;1.0.0-beta.3;1.0.0-beta.4
com.azure:azure-cosmos-tests;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-data-appconfiguration;1.4.4;1.5.0-beta.1
Expand Down
4 changes: 2 additions & 2 deletions sdk/cosmos/azure-cosmos-benchmark/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ Licensed under the MIT License.
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-cosmos</artifactId>
<version>4.45.0-beta.1</version> <!-- {x-version-update;com.azure:azure-cosmos;current} -->
<version>4.45.0</version> <!-- {x-version-update;com.azure:azure-cosmos;current} -->
</dependency>

<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-cosmos-encryption</artifactId>
<version>2.1.0-beta.1</version> <!-- {x-version-update;com.azure:azure-cosmos-encryption;current} -->
<version>2.1.0</version> <!-- {x-version-update;com.azure:azure-cosmos-encryption;current} -->
</dependency>

<dependency>
Expand Down
2 changes: 1 addition & 1 deletion sdk/cosmos/azure-cosmos-dotnet-benchmark/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Licensed under the MIT License.
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-cosmos</artifactId>
<version>4.45.0-beta.1</version> <!-- {x-version-update;com.azure:azure-cosmos;current} -->
<version>4.45.0</version> <!-- {x-version-update;com.azure:azure-cosmos;current} -->
</dependency>

<dependency>
Expand Down
9 changes: 3 additions & 6 deletions sdk/cosmos/azure-cosmos-encryption/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
## Release History

### 2.1.0-beta.1 (Unreleased)

#### Features Added

#### Breaking Changes

### 2.1.0 (2023-05-12)
#### Bugs Fixed
* Fixed an issue where empty array causes `NoSuchElementException` in `EncryptionProcessor` - See [PR 34847](https://github.com/Azure/azure-sdk-for-java/pull/34847)

#### Other Changes
* Updated `azure-cosmos` to version `4.45.0`.

### 2.0.0 (2023-04-25)

Expand Down
2 changes: 1 addition & 1 deletion sdk/cosmos/azure-cosmos-encryption/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The Azure Cosmos Encryption Plugin is used for encrypting data with a user-provi
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-cosmos-encryption</artifactId>
<version>2.0.0</version>
<version>2.1.0</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down
4 changes: 2 additions & 2 deletions sdk/cosmos/azure-cosmos-encryption/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Licensed under the MIT License.

<groupId>com.azure</groupId>
<artifactId>azure-cosmos-encryption</artifactId>
<version>2.1.0-beta.1</version> <!-- {x-version-update;com.azure:azure-cosmos-encryption;current} -->
<version>2.1.0</version> <!-- {x-version-update;com.azure:azure-cosmos-encryption;current} -->
<name>Encryption Plugin for Azure Cosmos DB SDK</name>
<description>This Package contains Encryption Plugin for Microsoft Azure Cosmos SDK</description>
<packaging>jar</packaging>
Expand Down Expand Up @@ -57,7 +57,7 @@ Licensed under the MIT License.
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-cosmos</artifactId>
<version>4.45.0-beta.1</version> <!-- {x-version-update;com.azure:azure-cosmos;current} -->
<version>4.45.0</version> <!-- {x-version-update;com.azure:azure-cosmos;current} -->
</dependency>

<dependency>
Expand Down
2 changes: 1 addition & 1 deletion sdk/cosmos/azure-cosmos-spark_3_2-12/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-cosmos</artifactId>
<version>4.45.0-beta.1</version> <!-- {x-version-update;com.azure:azure-cosmos;current} -->
<version>4.45.0</version> <!-- {x-version-update;com.azure:azure-cosmos;current} -->
</dependency>
<dependency>
<groupId>org.scala-lang.modules</groupId>
Expand Down
2 changes: 1 addition & 1 deletion sdk/cosmos/azure-cosmos-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Licensed under the MIT License.
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-cosmos</artifactId>
<version>4.45.0-beta.1</version> <!-- {x-version-update;com.azure:azure-cosmos;current} -->
<version>4.45.0</version> <!-- {x-version-update;com.azure:azure-cosmos;current} -->
</dependency>

<dependency>
Expand Down
2 changes: 1 addition & 1 deletion sdk/cosmos/azure-cosmos-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ Licensed under the MIT License.
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-cosmos</artifactId>
<version>4.45.0-beta.1</version> <!-- {x-version-update;com.azure:azure-cosmos;current} -->
<version>4.45.0</version> <!-- {x-version-update;com.azure:azure-cosmos;current} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ public void directDiagnosticsOnCancelledOperation() throws Exception {
.key(TestConfigurations.MASTER_KEY)
.endpoint(TestConfigurations.HOST)
.endToEndOperationLatencyPolicyConfig(
new CosmosE2EOperationRetryPolicyConfigBuilder(Duration.ofSeconds(1)).build()
new CosmosEndToEndOperationLatencyPolicyConfigBuilder(Duration.ofSeconds(1)).build()
).buildAsyncClient();

CosmosAsyncContainer container =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ public class EndToEndTimeOutValidationTests extends TestSuiteBase {
private CosmosAsyncContainer createdContainer;
private final Random random;
private final List<TestObject> createdDocuments = new ArrayList<>();
private final CosmosE2EOperationRetryPolicyConfig endToEndOperationLatencyPolicyConfig;
private final CosmosEndToEndOperationLatencyPolicyConfig endToEndOperationLatencyPolicyConfig;

@Factory(dataProvider = "clientBuildersWithDirectTcpSession")
public EndToEndTimeOutValidationTests(CosmosClientBuilder clientBuilder) {
super(clientBuilder);
random = new Random();
endToEndOperationLatencyPolicyConfig = new CosmosE2EOperationRetryPolicyConfigBuilder(Duration.ofSeconds(1))
endToEndOperationLatencyPolicyConfig = new CosmosEndToEndOperationLatencyPolicyConfigBuilder(Duration.ofSeconds(1))
.build();
}

Expand Down Expand Up @@ -149,12 +149,12 @@ public void queryItemWithEndToEndTimeoutPolicyInOptionsShouldTimeout() {
if (getClientBuilder().buildConnectionPolicy().getConnectionMode() != ConnectionMode.DIRECT) {
throw new SkipException("Failure injection only supported for DIRECT mode");
}
CosmosE2EOperationRetryPolicyConfig endToEndOperationLatencyPolicyConfig =
new CosmosE2EOperationRetryPolicyConfigBuilder(Duration.ofSeconds(1))
CosmosEndToEndOperationLatencyPolicyConfig endToEndOperationLatencyPolicyConfig =
new CosmosEndToEndOperationLatencyPolicyConfigBuilder(Duration.ofSeconds(1))
.build();

CosmosQueryRequestOptions options = new CosmosQueryRequestOptions();
options.setCosmosE2EOperationRetryPolicyConfig(endToEndOperationLatencyPolicyConfig);
options.setCosmosEndToEndOperationLatencyPolicyConfig(endToEndOperationLatencyPolicyConfig);

TestObject itemToQuery = createdDocuments.get(random.nextInt(createdDocuments.size()));

Expand Down Expand Up @@ -234,7 +234,7 @@ public void clientLevelEndToEndTimeoutPolicyInOptionsShouldTimeout() {
// with injected delay
CosmosItemRequestOptions options = new CosmosItemRequestOptions()
.setCosmosEndToEndOperationLatencyPolicyConfig(
new CosmosE2EOperationRetryPolicyConfigBuilder(Duration.ofSeconds(1))
new CosmosEndToEndOperationLatencyPolicyConfigBuilder(Duration.ofSeconds(1))
.enable(false)
.build());
cosmosItemResponseMono =
Expand All @@ -247,8 +247,8 @@ public void clientLevelEndToEndTimeoutPolicyInOptionsShouldTimeout() {
// Enabling at client level and disabling at the query item operation level should not fail the request even
// with injected delay
CosmosQueryRequestOptions queryRequestOptions = new CosmosQueryRequestOptions()
.setCosmosE2EOperationRetryPolicyConfig(
new CosmosE2EOperationRetryPolicyConfigBuilder(Duration.ofSeconds(1))
.setCosmosEndToEndOperationLatencyPolicyConfig(
new CosmosEndToEndOperationLatencyPolicyConfigBuilder(Duration.ofSeconds(1))
.enable(false)
.build());
queryPagedFlux = container.queryItems(sqlQuerySpec, queryRequestOptions, TestObject.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public class EndToEndTimeOutWithSpeculationTest extends TestSuiteBase {
private CosmosAsyncContainer createdContainer;
private final Random random;
private final List<TestObject> createdDocuments = new ArrayList<>();
private final CosmosE2EOperationRetryPolicyConfig endToEndOperationLatencyPolicyConfig;
private final CosmosEndToEndOperationLatencyPolicyConfig endToEndOperationLatencyPolicyConfig;

// These regions should match the ones in test-resources.json
// private final List<String> regions = ImmutableList.of("West Central US", "Central US");
Expand All @@ -60,7 +60,7 @@ public class EndToEndTimeOutWithSpeculationTest extends TestSuiteBase {
public EndToEndTimeOutWithSpeculationTest(CosmosClientBuilder clientBuilder) {
super(clientBuilder);
random = new Random();
endToEndOperationLatencyPolicyConfig = new CosmosE2EOperationRetryPolicyConfigBuilder(Duration.ofSeconds(10))
endToEndOperationLatencyPolicyConfig = new CosmosEndToEndOperationLatencyPolicyConfigBuilder(Duration.ofSeconds(10))
.build();
}

Expand Down Expand Up @@ -126,7 +126,7 @@ public void queryItemWithEndToEndTimeoutPolicyWithSpeculationShouldNotTimeout()
}

CosmosQueryRequestOptions options = new CosmosQueryRequestOptions();
options.setCosmosE2EOperationRetryPolicyConfig(endToEndOperationLatencyPolicyConfig);
options.setCosmosEndToEndOperationLatencyPolicyConfig(endToEndOperationLatencyPolicyConfig);

TestObject itemToQuery = createdDocuments.get(random.nextInt(createdDocuments.size()));

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import com.azure.cosmos.BridgeInternal;
import com.azure.cosmos.ConsistencyLevel;
import com.azure.cosmos.CosmosDiagnostics;
import com.azure.cosmos.CosmosE2EOperationRetryPolicyConfig;
import com.azure.cosmos.CosmosEndToEndOperationLatencyPolicyConfig;
import com.azure.cosmos.implementation.apachecommons.lang.tuple.ImmutablePair;
import com.azure.cosmos.implementation.caches.RxClientCollectionCache;
import com.azure.cosmos.implementation.caches.RxPartitionKeyRangeCache;
Expand Down Expand Up @@ -76,7 +76,7 @@ public class RxDocumentClientImplTest {
private RxClientCollectionCache collectionCacheMock;
private RxPartitionKeyRangeCache partitionKeyRangeCacheMock;
private IRetryPolicyFactory resetSessionTokenRetryPolicyMock;
private CosmosE2EOperationRetryPolicyConfig endToEndOperationLatencyPolicyConfig;
private CosmosEndToEndOperationLatencyPolicyConfig endToEndOperationLatencyPolicyConfig;

@BeforeClass(groups = "unit")
public void setUp() {
Expand All @@ -96,7 +96,7 @@ public void setUp() {
this.collectionCacheMock = Mockito.mock(RxClientCollectionCache.class);
this.partitionKeyRangeCacheMock = Mockito.mock(RxPartitionKeyRangeCache.class);
this.resetSessionTokenRetryPolicyMock = Mockito.mock(IRetryPolicyFactory.class);
this.endToEndOperationLatencyPolicyConfig = Mockito.mock(CosmosE2EOperationRetryPolicyConfig.class);
this.endToEndOperationLatencyPolicyConfig = Mockito.mock(CosmosEndToEndOperationLatencyPolicyConfig.class);
}

@Test(groups = {"unit"})
Expand Down
Loading

0 comments on commit 32f53bd

Please sign in to comment.