Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
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
14 changes: 7 additions & 7 deletions eng/versioning/version_client.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,18 +105,18 @@ com.azure:azure-core-test;1.27.0-beta.14;1.27.0-beta.15
com.azure:azure-core-tracing-opentelemetry;1.0.0-beta.62;1.0.0-beta.63
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.77.0;4.78.0-beta.1
com.azure:azure-cosmos;4.77.0;4.78.0
com.azure:azure-cosmos-benchmark;4.0.1-beta.1;4.0.1-beta.1
com.azure.cosmos.spark:azure-cosmos-spark_3;0.0.1-beta.1;0.0.1-beta.1
com.azure.cosmos.spark:azure-cosmos-spark_3-5;0.0.1-beta.1;0.0.1-beta.1
com.azure:azure-cosmos-encryption;2.26.0;2.27.0-beta.1
com.azure:azure-cosmos-encryption;2.26.0;2.27.0
com.azure.cosmos.spark:azure-cosmos-spark-account-data-resolver-sample;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-cosmos-test;1.0.0-beta.17;1.0.0-beta.18
com.azure.cosmos.spark:azure-cosmos-spark_3-3_2-12;4.42.0;4.43.0-beta.1
com.azure.cosmos.spark:azure-cosmos-spark_3-4_2-12;4.42.0;4.43.0-beta.1
com.azure.cosmos.spark:azure-cosmos-spark_3-5_2-12;4.42.0;4.43.0-beta.1
com.azure.cosmos.spark:azure-cosmos-spark_3-5_2-13;4.43.0-beta.1;4.43.0-beta.1
com.azure.cosmos.spark:azure-cosmos-spark_4-0_2-13;4.43.0-beta.1;4.43.0-beta.1
com.azure.cosmos.spark:azure-cosmos-spark_3-3_2-12;4.42.0;4.43.0
com.azure.cosmos.spark:azure-cosmos-spark_3-4_2-12;4.42.0;4.43.0
com.azure.cosmos.spark:azure-cosmos-spark_3-5_2-12;4.42.0;4.43.0
com.azure.cosmos.spark:azure-cosmos-spark_3-5_2-13;4.43.0-beta.1;4.43.0
com.azure.cosmos.spark:azure-cosmos-spark_4-0_2-13;4.43.0-beta.1;4.43.0
com.azure.cosmos.spark:fabric-cosmos-spark-auth_3;1.1.0;1.2.0-beta.1
com.azure:azure-cosmos-tests;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-data-appconfiguration;1.9.1;1.10.0-beta.1
Expand Down
164 changes: 164 additions & 0 deletions sdk/cosmos/.copilot/release.instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
# Cosmos SDK Release Instructions

This file teaches Copilot how to perform Cosmos SDK releases. When a user asks to
release a Cosmos package or group of packages, follow the workflows below.

The user will specify the version in their command (e.g., "release spark connector 4.43.0 GA").
Use that version directly — do not prompt for it or look it up.

## Release Groups

| Group | Packages | Notes |
|-------|----------|-------|
| **Spark connector** | `azure-cosmos-spark_3-3_2-12`, `azure-cosmos-spark_3-4_2-12`, `azure-cosmos-spark_3-5_2-12`, `azure-cosmos-spark_3-5_2-13`, `azure-cosmos-spark_4-0_2-13` | All released at the same version simultaneously |
| **Core SDK** | `azure-cosmos`, optionally `azure-cosmos-encryption` | |
| **Kafka connector** | `azure-cosmos-kafka-connect` | |
| **Single package** | Any individual cosmos package | |

When the user says "release spark connector", release all 5 spark packages.
When the user says "release core SDK", release azure-cosmos (ask if azure-cosmos-encryption should be included).
Comment thread
xinlian12 marked this conversation as resolved.
Outdated

## Step 1: Run Prepare-Release.ps1

For each package in the release, run the `Prepare-Release.ps1` script. The script handles:
changelog updates, pom.xml version updates, `eng/versioning/version_client.txt` updates,
and dependent pom.xml updates (e.g., `azure-cosmos-spark-account-data-resolver-sample/pom.xml`,
`fabric-cosmos-spark-auth_3/pom.xml`).

The script can be run non-interactively by piping answers:

```bash
echo -e "{GROUP_ID}\n{VERSION}\n{RELEASE_DATE}\nn" | pwsh -Command "./eng/common/scripts/Prepare-Release.ps1 {PACKAGE_NAME} cosmos"
```

Where:
- **{GROUP_ID}**: `com.azure.cosmos.spark` for spark connectors, `com.azure` for core packages
- **{VERSION}**: The version from the user's command (e.g., `4.43.0`)
- **{RELEASE_DATE}**: In `MM/dd/yyyy` format — ask the user if not specified
- The final `n` answers "no" to the prompt about replacing an existing changelog entry title

For **Spark connector group releases**, run for each of the 5 packages:
```bash
echo -e "com.azure.cosmos.spark\n{VERSION}\n{DATE}\nn" | pwsh -Command "./eng/common/scripts/Prepare-Release.ps1 azure-cosmos-spark_3-3_2-12 cosmos"
echo -e "com.azure.cosmos.spark\n{VERSION}\n{DATE}\nn" | pwsh -Command "./eng/common/scripts/Prepare-Release.ps1 azure-cosmos-spark_3-4_2-12 cosmos"
echo -e "com.azure.cosmos.spark\n{VERSION}\n{DATE}\nn" | pwsh -Command "./eng/common/scripts/Prepare-Release.ps1 azure-cosmos-spark_3-5_2-12 cosmos"
echo -e "com.azure.cosmos.spark\n{VERSION}\n{DATE}\nn" | pwsh -Command "./eng/common/scripts/Prepare-Release.ps1 azure-cosmos-spark_3-5_2-13 cosmos"
echo -e "com.azure.cosmos.spark\n{VERSION}\n{DATE}\nn" | pwsh -Command "./eng/common/scripts/Prepare-Release.ps1 azure-cosmos-spark_4-0_2-13 cosmos"
```

After each run, check the tail of the output for `Some changes were made to the repo source` to confirm success.

## Step 2: Manual README Updates (Spark Connector Only)

After `Prepare-Release.ps1` completes for all packages, the following files need manual updates.

### 2a. Version Compatibility Tables

Each spark connector README contains version compatibility tables for **itself and cross-references
to other connectors**. Add a new row as the **first data row** (right after the header separator
`|---|...`) in every table.

**IMPORTANT**: Always copy the format AND values from the topmost existing row, only changing the
version number. The Databricks runtimes, Fabric runtimes, and Spark version ranges evolve over time
— do NOT use hardcoded values from this document. Look at the current top row of each table.

#### Files and tables to update:

| README file | Contains tables for |
|-------------|-------------------|
| `azure-cosmos-spark_3-3_2-12/README.md` | `#### azure-cosmos-spark_3-3_2-12`, `#### azure-cosmos-spark_3-4_2-12`, `#### azure-cosmos-spark_3-5_2-12` |
| `azure-cosmos-spark_3-4_2-12/README.md` | `#### azure-cosmos-spark_3-4_2-12`, `#### azure-cosmos-spark_3-3_2-12`, `#### azure-cosmos-spark_3-5_2-12` |
| `azure-cosmos-spark_3-5_2-12/README.md` | `#### azure-cosmos-spark_3-5_2-12`, `#### azure-cosmos-spark_3-4_2-12`, `#### azure-cosmos-spark_3-3_2-12` |
| `azure-cosmos-spark_3-5_2-13/README.md` | `#### azure-cosmos-spark_3-5_2-12`, `#### azure-cosmos-spark_3-4_2-12`, `#### azure-cosmos-spark_3-3_2-12` |
| `azure-cosmos-spark_4-0_2-13/README.md` | `#### azure-cosmos-spark_4-0_2-13` (own only) |

Total: **4 READMEs × 3 tables + 1 README × 1 table = 13 table row insertions**.

#### Table column differences by connector:

| Table header for | Columns |
|-----------------|---------|
| `_3-3_2-12` | Connector, Supported Spark Versions, Supported JVM Versions, Supported Scala Versions, Supported Databricks Runtimes (5 cols) |
| `_3-4_2-12` | Same as 3-3 + Supported Fabric Runtimes (6 cols, Fabric usually empty) |
| `_3-5_2-12` | Connector, Supported Spark Versions, **Minimum Java Version**, Supported Scala Versions, Supported Databricks Runtimes, Supported Fabric Runtimes (6 cols) |
| `_4-0_2-13` | Same structure as 3-5 but Java `[17, 21]`, Scala `2.13` |

### 2b. Download Section Updates

Each spark connector README has a `### Download` section with a Maven coordinate and SBT dependency.
Update the version number in both places. Find the inline code and `libraryDependencies` lines
and replace the old version with the new one.

**Important**: Each README's Download section references **its own** artifact, except:
- `azure-cosmos-spark_3-5_2-13/README.md` → references `azure-cosmos-spark_3-5_2-12` (not itself)

### 2c. Quick-Start Doc Updates

Update `sdk/cosmos/azure-cosmos-spark_3/docs/quick-start.md`:

Three version references to update — search for the old version and replace with the new one:

```
For Spark 3.3:
...azure-cosmos-spark_3-3_2-12:{VERSION}...

For Spark 3.4:
...azure-cosmos-spark_3-4_2-12:{VERSION}...

For Spark 3.5:
...azure-cosmos-spark_3-5_2-12:{VERSION}...
```

Each line contains the version twice: once in the link text and once in the URL.

## Step 3: Verification

After all edits, run these checks:

```bash
# 1. Check all changed files (~19 expected for full Spark release)
git diff --stat

# 2. Verify version_client.txt
grep "azure-cosmos-spark" eng/versioning/version_client.txt

# 3. Verify CHANGELOGs
for pkg in azure-cosmos-spark_3-3_2-12 azure-cosmos-spark_3-4_2-12 azure-cosmos-spark_3-5_2-12 azure-cosmos-spark_3-5_2-13 azure-cosmos-spark_4-0_2-13; do
echo "=== $pkg ===" && head -5 sdk/cosmos/$pkg/CHANGELOG.md
done

# 4. Verify new version in READMEs and quick-start
grep -c "{NEW_VERSION}" sdk/cosmos/azure-cosmos-spark_3-3_2-12/README.md \
sdk/cosmos/azure-cosmos-spark_3-4_2-12/README.md \
sdk/cosmos/azure-cosmos-spark_3-5_2-12/README.md \
sdk/cosmos/azure-cosmos-spark_3-5_2-13/README.md \
sdk/cosmos/azure-cosmos-spark_4-0_2-13/README.md \
sdk/cosmos/azure-cosmos-spark_3/docs/quick-start.md
```

## Core SDK Release Workflow

For `azure-cosmos` (and optionally `azure-cosmos-encryption`):

1. Run `Prepare-Release.ps1`:
```bash
echo -e "com.azure\n{VERSION}\n{DATE}\nn" | pwsh -Command "./eng/common/scripts/Prepare-Release.ps1 azure-cosmos cosmos"
echo -e "com.azure\n{VERSION}\n{DATE}\nn" | pwsh -Command "./eng/common/scripts/Prepare-Release.ps1 azure-cosmos-encryption cosmos"
```
2. No README table updates needed — the core SDK README uses Azure BOM references.
3. Verify CHANGELOG.md and pom.xml updates.

## Kafka Connector Release Workflow

For `azure-cosmos-kafka-connect`:

1. Run `Prepare-Release.ps1`:
```bash
echo -e "com.azure\n{VERSION}\n{DATE}\nn" | pwsh -Command "./eng/common/scripts/Prepare-Release.ps1 azure-cosmos-kafka-connect cosmos"
```
2. No README table updates needed — the version in README is managed by x-version-update tags.
3. Verify CHANGELOG.md and pom.xml updates.

## Reference: Example PRs

- [PR #46852](https://github.com/Azure/azure-sdk-for-java/pull/46852) — Spark connector 4.40.0 release (13 files changed)
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 @@ -52,13 +52,13 @@ Licensed under the MIT License.
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-cosmos</artifactId>
<version>4.78.0-beta.1</version> <!-- {x-version-update;com.azure:azure-cosmos;current} -->
<version>4.78.0</version> <!-- {x-version-update;com.azure:azure-cosmos;current} -->
</dependency>

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

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

### 2.27.0-beta.1 (Unreleased)

#### Features Added

#### Breaking Changes

#### Bugs Fixed
### 2.27.0 (2026-02-10)

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

### 2.26.0 (2026-01-26)

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.26.0</version>
<version>2.27.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.27.0-beta.1</version> <!-- {x-version-update;com.azure:azure-cosmos-encryption;current} -->
<version>2.27.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 @@ -61,7 +61,7 @@ Licensed under the MIT License.
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-cosmos</artifactId>
<version>4.78.0-beta.1</version> <!-- {x-version-update;com.azure:azure-cosmos;current} -->
<version>4.78.0</version> <!-- {x-version-update;com.azure:azure-cosmos;current} -->
</dependency>

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

<!-- Added this provided dependency to include necessary annotations used by "reactor-core".
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
<dependency>
<groupId>com.azure.cosmos.spark</groupId>
<artifactId>azure-cosmos-spark_3-5_2-12</artifactId>
<version>4.43.0-beta.1</version> <!-- {x-version-update;com.azure.cosmos.spark:azure-cosmos-spark_3-5_2-12;current} -->
<version>4.43.0</version> <!-- {x-version-update;com.azure.cosmos.spark:azure-cosmos-spark_3-5_2-12;current} -->
<scope>provided</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -290,7 +290,7 @@
<include>com.fasterxml.jackson.core:jackson-databind:[2.18.4]</include> <!-- {x-include-update;com.fasterxml.jackson.core:jackson-databind;external_dependency} -->
<include>com.fasterxml.jackson.module:jackson-module-scala_2.12:[2.18.4]</include> <!-- {x-include-update;com.fasterxml.jackson.module:jackson-module-scala_2.12;external_dependency} -->
<include>com.globalmentor:hadoop-bare-naked-local-fs:[0.1.0]</include> <!-- {x-include-update;cosmos_com.globalmentor:hadoop-bare-naked-local-fs;external_dependency} -->
<include>com.azure.cosmos.spark:azure-cosmos-spark_3-5_2-12:[4.43.0-beta.1]</include> <!-- {x-include-update;com.azure.cosmos.spark:azure-cosmos-spark_3-5_2-12;current} -->
<include>com.azure.cosmos.spark:azure-cosmos-spark_3-5_2-12:[4.43.0]</include> <!-- {x-include-update;com.azure.cosmos.spark:azure-cosmos-spark_3-5_2-12;current} -->
</includes>
</bannedDependencies>
</rules>
Expand Down
8 changes: 2 additions & 6 deletions sdk/cosmos/azure-cosmos-spark_3-3_2-12/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
## Release History

### 4.43.0-beta.1 (Unreleased)
### 4.43.0 (2026-02-10)

#### Features Added
* Added support for throughput bucket. - See [47856](https://github.com/Azure/azure-sdk-for-java/pull/47856)

#### Breaking Changes

#### Bugs Fixed
* Fixed an issue for micro batch stream query where feed range starts with null or incorrect initial offset. **NOTE: This issue only happens when a partition split happened during initial offset calculation stage. - See [47742](https://github.com/Azure/azure-sdk-for-java/pull/47742)
* Fixed an issue for micro batch stream query where feed range starts with null or incorrect initial offset. **NOTE:** This issue only happens when a partition split happened during initial offset calculation stage. - See [47742](https://github.com/Azure/azure-sdk-for-java/pull/47742)
* Fixed `java.lang.ClassCastException` during bulk write operations for write strategy `ItemPatch` or `ItemPatchIfExists`. - See [47748](https://github.com/Azure/azure-sdk-for-java/pull/47748)

#### Other Changes

### 4.42.0 (2025-12-09)

#### Other Changes
Expand Down
7 changes: 5 additions & 2 deletions sdk/cosmos/azure-cosmos-spark_3-3_2-12/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ https://github.com/Azure/azure-sdk-for-java/issues/new
#### azure-cosmos-spark_3-3_2-12
| Connector | Supported Spark Versions | Supported JVM Versions | Supported Scala Versions | Supported Databricks Runtimes |
|-----------|--------------------------|------------------------|--------------------------|-------------------------------|
| 4.43.0 | 3.3.0 - 3.3.2 | [8, 11] | 2.12 | 11.\*, 12.\* |
| 4.42.0 | 3.3.0 - 3.3.2 | [8, 11] | 2.12 | 11.\*, 12.\* |
| 4.41.0 | 3.3.0 - 3.3.2 | [8, 11] | 2.12 | 11.\*, 12.\* |
| 4.40.0 | 3.3.0 - 3.3.2 | [8, 11] | 2.12 | 11.\*, 12.\* |
Expand Down Expand Up @@ -77,6 +78,7 @@ https://github.com/Azure/azure-sdk-for-java/issues/new
#### azure-cosmos-spark_3-4_2-12
| Connector | Supported Spark Versions | Supported JVM Versions | Supported Scala Versions | Supported Databricks Runtimes | Supported Fabric Runtimes |
|-----------|--------------------------|------------------------|--------------------------|-------------------------------|---------------------------|
| 4.43.0 | 3.4.0 - 3.4.1 | [8, 11] | 2.12 | 13.\* | |
| 4.42.0 | 3.4.0 - 3.4.1 | [8, 11] | 2.12 | 13.\* | |
| 4.41.0 | 3.4.0 - 3.4.1 | [8, 11] | 2.12 | 13.\* | |
| 4.40.0 | 3.4.0 - 3.4.1 | [8, 11] | 2.12 | 13.\* | |
Expand Down Expand Up @@ -117,6 +119,7 @@ https://github.com/Azure/azure-sdk-for-java/issues/new
#### azure-cosmos-spark_3-5_2-12
| Connector | Supported Spark Versions | Minimum Java Version | Supported Scala Versions | Supported Databricks Runtimes | Supported Fabric Runtimes |
|-----------|--------------------------|----------------------|----------------------------|-------------------------------|------------------------------|
| 4.43.0 | 3.5.0 | [8, 11] | 2.12 | 14.*, 15.\*, 16.4 LTS | 1.3.\* |
| 4.42.0 | 3.5.0 | [8, 11] | 2.12 | 14.*, 15.\*, 16.4 LTS | 1.3.\* |
| 4.41.0 | 3.5.0 | [8, 11] | 2.12 | 14.*, 15.\*, 16.4 LTS | 1.3.\* |
| 4.40.0 | 3.5.0 | [8, 11] | 2.12 | 14.*, 15.\* | |
Expand All @@ -143,11 +146,11 @@ to use the same version of Scala that Spark was compiled for.
### Download

You can use the maven coordinate of the jar to auto install the Spark Connector to your Databricks Runtime from Maven:
`com.azure.cosmos.spark:azure-cosmos-spark_3-3_2-12:4.42.0`
`com.azure.cosmos.spark:azure-cosmos-spark_3-3_2-12:4.43.0`

You can also integrate against Cosmos DB Spark Connector in your SBT project:
```scala
libraryDependencies += "com.azure.cosmos.spark" % "azure-cosmos-spark_3-3_2-12" % "4.42.0"
libraryDependencies += "com.azure.cosmos.spark" % "azure-cosmos-spark_3-3_2-12" % "4.43.0"
```

Cosmos DB Spark Connector is available on [Maven Central Repo](https://central.sonatype.com/search?namespace=com.azure.cosmos.spark).
Expand Down
2 changes: 1 addition & 1 deletion sdk/cosmos/azure-cosmos-spark_3-3_2-12/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</parent>
<groupId>com.azure.cosmos.spark</groupId>
<artifactId>azure-cosmos-spark_3-3_2-12</artifactId>
<version>4.43.0-beta.1</version> <!-- {x-version-update;com.azure.cosmos.spark:azure-cosmos-spark_3-3_2-12;current} -->
<version>4.43.0</version> <!-- {x-version-update;com.azure.cosmos.spark:azure-cosmos-spark_3-3_2-12;current} -->
<packaging>jar</packaging>
<url>https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/cosmos/azure-cosmos-spark_3-3_2-12</url>
<name>OLTP Spark 3.3 Connector for Azure Cosmos DB SQL API</name>
Expand Down
Loading
Loading