Skip to content
Draft
Show file tree
Hide file tree
Changes from all 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
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ jobs:
fail-fast: false
matrix:
java: [ 17, 21, 25 ]
spring-boot-version: [ 4.0.5 ]
spring-boot-display-version: [ 4.0.x ]
spring-boot-version: [ 4.1.3 ]
spring-boot-display-version: [ 4.1.x ]
experimental: [ false ]
env:
JDK_VER: ${{ matrix.java }}
Expand Down
161 changes: 161 additions & 0 deletions .github/workflows/merge-checker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
#
# Copyright 2026 The Dapr Authors
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# Reports on every pull request whether the scheduled test workflows are
# currently green on master, and whether the latest commit of master and of the
# two newest release branches passed CI. It does not test the pull request
# itself, and it is not a required check: a red result means one of those is
# failing, so reviewers can see that before merging.

name: master-health (maintainers only)

on:
workflow_dispatch:
pull_request:
branches:
- master
- release-*

permissions: {}

jobs:
health:
name: Scheduled tests and latest commits
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
actions: read
checks: read
contents: read
statuses: read
env:
GH_TOKEN: ${{ github.token }}
# Workflow files to check, as <file> or <file>:<event>. The latest
# completed run on master with that event counts; the default event is
# schedule.
WORKFLOWS: >-
spring-boot-compat.yml
# Check runs that are not part of a commit's CI. GitHub attaches the
# automerge bot's scheduled runs to the default branch's latest commit.
IGNORE: '^(Automerge and update PRs\.|notify-on-failure)$'
steps:
- name: Check the latest run of each workflow
run: |
total=0
failed=0
missing=0
rows=""
for entry in $WORKFLOWS; do
wf=${entry%%:*}
event=schedule
if [ "$entry" != "$wf" ]; then
event=${entry#*:}
fi
total=$((total + 1))
# Filter with jq rather than the API's event, status and branch query
# parameters, which sometimes return runs that are weeks old.
# The API returns 404 until the workflow file exists on the default
# branch; that counts as no run.
run=$(gh api "repos/${{ github.repository }}/actions/workflows/$wf/runs?per_page=100" --jq "
[.workflow_runs[] | select(.event == \"$event\" and .status == \"completed\" and .head_branch == \"master\")][0] // empty
| (now - (.created_at | fromdateiso8601)) as \$s
| (if \$s < 3600 then \"\\(\$s / 60 | floor)m ago\" elif \$s < 172800 then \"\\(\$s / 3600 | floor)h ago\" else \"\\(\$s / 86400 | floor)d ago\" end) as \$age
| [.conclusion, \$age, .html_url, .name] | join(\"\\t\")" 2>/dev/null) || run=""
if [ -z "$run" ]; then
missing=$((missing + 1))
echo "::warning::$wf has no completed $event run on master"
rows+="| \`$wf\` | ⚠️ no run | | $event |"$'\n'
continue
fi
IFS=$'\t' read -r conclusion age url name <<< "$run"
if [ "$conclusion" = "success" ]; then
icon="✅ success"
else
icon="❌ $conclusion"
failed=$((failed + 1))
echo "::error title=$name::latest $event run on master ($age) is $conclusion: $url"
fi
rows+="| $name | $icon | [$age]($url) | $event |"$'\n'
done
if [ "$failed" -eq 0 ] && [ "$missing" -eq 0 ]; then
title="✅ All $total workflows are green on master"
elif [ "$failed" -eq 0 ]; then
title="⚠️ $((total - missing)) of $total workflows are green on master, $missing with no run"
else
title="❌ $failed of $total workflows are not green on master"
fi
{
echo "## $title"
echo
echo "| Workflow | Result | Last run | Event |"
echo "| --- | --- | --- | --- |"
printf '%s' "$rows"
echo
echo "_Latest completed run of each workflow on \`master\`. This check does not test the pull request._"
} >> "$GITHUB_STEP_SUMMARY"
[ "$failed" -eq 0 ]

- name: Check the latest commit of each branch
# Run even when the previous step failed, so both results are reported.
if: ${{ !cancelled() }}
run: |
repo=${{ github.repository }}
releases=$(gh api --paginate "repos/$repo/branches?per_page=100" --jq '.[].name' \
| grep -E '^release-[0-9]+\.[0-9]+$' | sort -V | tail -2 | sort -rV)
failed=0
running=0
rows=""
for branch in master $releases; do
sha=$(gh api "repos/$repo/commits/$branch" --jq .sha)
checks=$(gh api --paginate "repos/$repo/commits/$sha/check-runs?per_page=100" \
--jq '.check_runs[] | [.name, (.conclusion // .status), .html_url] | @tsv' \
| awk -F'\t' -v re="$IGNORE" '$1 !~ re')
total=$(printf '%s\n' "$checks" | grep -c . || true)
bad=$(printf '%s\n' "$checks" | awk -F'\t' '$2 !~ /^(success|skipped|neutral|queued|in_progress|pending|waiting)$/ && $2 != ""')
pending=$(printf '%s\n' "$checks" | awk -F'\t' '$2 ~ /^(queued|in_progress|pending|waiting)$/' | grep -c . || true)
status=$(gh api "repos/$repo/commits/$sha/status" --jq '.state')
link="[\`${sha:0:9}\`](${{ github.server_url }}/$repo/commit/$sha)"
if [ -n "$bad" ] || [ "$status" = "failure" ] || [ "$status" = "error" ]; then
failed=$((failed + 1))
names=$(printf '%s\n' "$bad" | cut -f1 | sort -u | paste -sd, - | sed 's/,/, /g')
[ -z "$names" ] && names="commit status: $status"
echo "::error title=$branch::latest commit $sha is not green: $names"
rows+="| \`$branch\` | $link | ❌ $names |"$'\n'
elif [ "$pending" -gt 0 ]; then
running=$((running + 1))
echo "::warning title=$branch::latest commit $sha still has $pending of $total checks running"
rows+="| \`$branch\` | $link | ⏳ $pending of $total checks still running |"$'\n'
Comment thread
javier-aliaga marked this conversation as resolved.
Resolved
elif [ "$total" -eq 0 ]; then
echo "::warning::$branch latest commit $sha has no check runs"
rows+="| \`$branch\` | $link | ⚠️ no checks |"$'\n'
else
rows+="| \`$branch\` | $link | ✅ $total checks passed |"$'\n'
fi
done
if [ "$failed" -eq 0 ] && [ "$running" -gt 0 ]; then
title="⏳ No failures yet; CI is still running on $running branch(es)"
elif [ "$failed" -eq 0 ]; then
title="✅ Latest commit is green on master and the newest release branches"
else
title="❌ $failed branch(es) have a failing latest commit"
fi
{
echo "## $title"
echo
echo "| Branch | Commit | Result |"
echo "| --- | --- | --- |"
printf '%s' "$rows"
echo
echo "_Check runs on the latest commit of each branch. This check does not test the pull request._"
} >> "$GITHUB_STEP_SUMMARY"
[ "$failed" -eq 0 ]
59 changes: 59 additions & 0 deletions .github/workflows/spring-boot-compat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Spring Boot compatibility

# Runs the integration tests against every supported Spring Boot line, the way an application
# sees the SDK: compiled against the baseline in pom.xml, run with a newer Spring Boot, and with
# the Jackson, Netty and OpenTelemetry versions that Spring Boot manages instead of the SDK's pins.
# Weekly instead of on every pull request to keep runner usage down. merge-checker.yml shows the
# result of the latest run on every pull request.

on:
workflow_dispatch:
schedule:
- cron: '0 4 * * 1'

permissions:
contents: read

jobs:
compat:
name: "Compat jdk:${{ matrix.java }} sb:${{ matrix.spring-boot-version }}"
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
java: [ 17, 25 ]
spring-boot-version: [ 4.1.3, 4.2.0 ]
steps:
- uses: actions/checkout@v7
- name: Set up OpenJDK ${{ matrix.java }}
uses: actions/setup-java@v6
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- name: Install sdk
run: ./mvnw clean install -B -q -DskipTests
- name: Read versions managed by Spring Boot ${{ matrix.spring-boot-version }}
id: managed
run: |
pom=$(curl -sSfL "https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-dependencies/${{ matrix.spring-boot-version }}/spring-boot-dependencies-${{ matrix.spring-boot-version }}.pom")
prop() { echo "$pom" | sed -n "s:.*<$1>\(.*\)</$1>.*:\1:p"; }
echo "args=-Djackson.version=$(prop jackson-2-bom.version) -Djackson3.version=$(prop jackson-bom.version) -Dnetty.version=$(prop netty.version) -Dopentelemetry.version=$(prop opentelemetry.version)" | tee -a "$GITHUB_OUTPUT"
Comment thread
javier-aliaga marked this conversation as resolved.
Resolved
- name: Integration tests using Spring Boot ${{ matrix.spring-boot-version }}
id: integration_tests
uses: nick-fields/retry@v4
with:
max_attempts: 2
timeout_minutes: 25
retry_wait_seconds: 15
command: PRODUCT_SPRING_BOOT_VERSION=${{ matrix.spring-boot-version }} ./mvnw -B -pl !sdk-workflows -Pintegration-tests ${{ steps.managed.outputs.args }} clean dependency:copy-dependencies verify
- name: Upload test reports on failure
if: ${{ failure() && steps.integration_tests.conclusion == 'failure' }}
uses: actions/upload-artifact@v7
with:
name: reports-jdk${{ matrix.java }}-sb${{ matrix.spring-boot-version }}
path: |
sdk-tests/target/failsafe-reports
sdk-tests/target/surefire-reports
spring-boot-sdk-tests/target/failsafe-reports
spring-boot-sdk-tests/target/surefire-reports
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ IDE setup and the tools needed to work on the SDK itself are under [Development]

### Importing Dapr's Java SDK

> **Spring Boot compatibility:** from **1.19.0** onward, the SDK's Spring integration targets **Spring Boot 4.0**. If you are on **Spring Boot 3.5**, use the **1.18.x** line instead. See **[SUPPORT.md](SUPPORT.md)** for the full compatibility matrix and version-support policy.
> **Spring Boot compatibility:** from **1.20.0** onward, the SDK's Spring integration targets **Spring Boot 4.1** and is tested against **4.2**. If you are on **Spring Boot 4.0**, use the **1.19.x** line. If you are on **Spring Boot 3.5**, use the **1.18.x** line. See **[SUPPORT.md](SUPPORT.md)** for the full compatibility matrix and version-support policy.

#### Using a BOM (recommended)

Expand Down Expand Up @@ -119,6 +119,8 @@ dependencies {

##### Spring Boot projects

Your Spring Boot parent or BOM sets the Spring Boot version, not the Dapr BOM. See [SUPPORT.md](SUPPORT.md#which-spring-boot-version-you-get) for the supported Spring Boot versions and the BOM import order.
Comment thread
Copilot marked this conversation as resolved.
Resolved
Comment thread
javier-aliaga marked this conversation as resolved.
Resolved

For Maven:
```xml
<project>
Expand Down
51 changes: 47 additions & 4 deletions SUPPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ at a given version pins the whole stack, core and Spring, to that single version

| SDK line | Dapr runtime API | Spring Boot (Spring modules only) | JDK | Status |
|-------------|------------------|-----------------------------------|-----|---------------------------------------------------|
| **1.19.x+** | v1.18 | 4.0.x | 17+ | Active — new features and fixes |
| **1.20.x+** | v1.19 | 4.1.x, 4.2.x | 17+ | Active — new features and fixes |
| **1.19.x** | v1.18 | 4.0.x | 17+ | Maintenance — best-effort security/critical fixes |
| **1.18.x** | v1.18 | 3.5.x | 17+ | Maintenance — best-effort security/critical fixes |

### Migrating to the unified workflows module
Expand All @@ -31,7 +32,7 @@ For the Spring integration modules, each Spring Boot generation implies the foll

| Spring Boot | Spring Framework | Jakarta EE | Jackson | JUnit |
|-------------|------------------|------------|---------------------|-------|
| 4.0.x | 7.x | 11 | 3 (`tools.jackson`) | 6 |
| 4.0.x–4.2.x | 7.x | 11 | 3 (`tools.jackson`) | 6 |
| 3.5.x | 6.x | 10 | 2 (`com.fasterxml`) | 5 |

Spring Boot 4 is **not** binary-compatible with Spring Boot 3 (Spring Framework 6→7, Jakarta EE
Expand All @@ -40,14 +41,54 @@ across SDK lines.

## Choosing a version

- **Spring integration on Spring Boot 4.0.x** → **1.19.x+**
- **Spring integration on Spring Boot 4.1.x or 4.2.x** → **1.20.x+**
- **Spring integration on Spring Boot 4.0.x** → **1.19.x**
- **Spring integration on Spring Boot 3.5.x** → **1.18.x**
- **Core SDK only (no Spring)** → any supported line; choose by the Dapr runtime you target.

Mixing a 1.19.x Spring starter into a Spring Boot 3 application (or a 1.18.x starter into Spring
Boot 4) results in runtime failures such as `NoClassDefFoundError` / `NoSuchMethodError`, caused by
the incompatible Spring Framework, Jakarta namespace, and Jackson versions.

## Which Spring Boot version you get

The Dapr BOMs do not set the Spring Boot version. Your application's Spring Boot parent
(`spring-boot-starter-parent`) or Spring Boot BOM (`spring-boot-dependencies`) does. The Spring
modules are compiled against the lowest Spring Boot version of their line (4.1.x for 1.20.x) and
tested in CI against every Spring Boot version listed for that line.

`dapr-sdk-bom` also manages Netty, Jackson and OpenTelemetry, which Spring Boot manages too. In
Maven, the first BOM imported in `<dependencyManagement>` wins, so import order decides whose
versions you get:

- **Recommended:** use `spring-boot-starter-parent`, or import `spring-boot-dependencies` before
`dapr-spring-bom`. You get the versions Spring Boot manages. This is the combination CI tests.
- Import `dapr-spring-bom` first only if you need a Netty, Jackson or OpenTelemetry fix that your
Spring Boot version does not have yet.

```xml
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>4.2.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>io.dapr.spring</groupId>
<artifactId>dapr-spring-bom</artifactId>
<version>1.20.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
```

In Gradle, the highest requested version wins regardless of order.

## Dapr runtime compatibility

Dapr runtime compatibility applies to **all** SDK modules (core and Spring alike) and does not change
Expand All @@ -59,7 +100,9 @@ runtime's own supported-version window.

## Support policy

- **1.19.x (Spring Boot 4.0)** is the actively developed line.
- **1.20.x (Spring Boot 4.1 and 4.2)** is the actively developed line.
- **1.19.x (Spring Boot 4.0)** is maintained on a best-effort basis for security and critical fixes.
Spring Boot 4.0's own OSS support ends on 2026-12-31.
- **1.18.x (Spring Boot 3.5)** is maintained on a best-effort basis for security and critical fixes,
as a bridge for users still on Spring Boot 3.5 while they move to Spring Boot 4. Spring Boot 3.5's
own OSS support window has ended (see the
Expand Down
5 changes: 2 additions & 3 deletions dapr-spring/dapr-spring-boot-autoconfigure/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
<packaging>jar</packaging>

<properties>
<springboot4.version>4.0.8</springboot4.version>
<!-- Override JUnit version to align with Spring Boot 4.0.x -->
<junit-bom.version>6.0.2</junit-bom.version>
</properties>
Expand All @@ -27,7 +26,7 @@
<dependency>
<groupId>tools.jackson</groupId>
<artifactId>jackson-bom</artifactId>
<version>3.1.7</version>
<version>${jackson3.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -58,7 +57,7 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${springboot4.version}</version>
<version>${springboot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
<packaging>jar</packaging>

<properties>
<springboot4.version>4.0.8</springboot4.version>
<!-- Override JUnit version to align with Spring Boot 4.x -->
<junit-bom.version>6.0.2</junit-bom.version>
</properties>
Expand All @@ -40,7 +39,7 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${springboot4.version}</version>
<version>${springboot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
<packaging>jar</packaging>

<properties>
<springboot4.version>4.0.8</springboot4.version>
<!-- Override JUnit version to align with Spring Boot 4.x -->
<junit-bom.version>6.0.2</junit-bom.version>
</properties>
Expand Down Expand Up @@ -50,7 +49,7 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${springboot4.version}</version>
<version>${springboot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
Loading
Loading