Skip to content

Commit 9c0dd2f

Browse files
authored
Merge branch 'master' into 1584-middleware
2 parents ac451eb + 9508747 commit 9c0dd2f

File tree

97 files changed

+10266
-2761
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+10266
-2761
lines changed

.github/scripts/update_docs.sh

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,12 @@ DAPR_JAVA_SDK_ALPHA_VERSION=`echo $DAPR_JAVA_SDK_VERSION | sed 's/^[0-9]*\./0./'
1111
if [[ "$OSTYPE" == "darwin"* ]]; then
1212
sed -i bak "s/<version>.*<\/version>\$/<version>${DAPR_JAVA_SDK_VERSION}<\/version>/g" README.md
1313
sed -i bak "s/compile('io.dapr:\(.*\):.*')/compile('io.dapr:\\1:${DAPR_JAVA_SDK_VERSION}')/g" README.md
14-
sed -i bak "s/<version>.*<\/version>\$/<version>${DAPR_JAVA_SDK_VERSION}<\/version>/g" daprdocs/content/en/java-sdk-docs/_index.md
15-
sed -i bak "s/compile('io.dapr:\(.*\):.*')/compile('io.dapr:\\1:${DAPR_JAVA_SDK_VERSION}')/g" daprdocs/content/en/java-sdk-docs/_index.md
16-
sed -i bak "s/<version>.*<\/version>\$/<version>${DAPR_JAVA_SDK_ALPHA_VERSION}<\/version>/g" daprdocs/content/en/java-sdk-docs/spring-boot/_index.md
1714
rm README.mdbak
1815
else
1916
sed -i "s/<version>.*<\/version>\$/<version>${DAPR_JAVA_SDK_VERSION}<\/version>/g" README.md
2017
sed -i "s/compile('io.dapr:\(.*\):.*')/compile('io.dapr:\\1:${DAPR_JAVA_SDK_VERSION}')/g" README.md
21-
sed -i "s/<version>.*<\/version>\$/<version>${DAPR_JAVA_SDK_VERSION}<\/version>/g" daprdocs/content/en/java-sdk-docs/_index.md
22-
sed -i "s/compile('io.dapr:\(.*\):.*')/compile('io.dapr:\\1:${DAPR_JAVA_SDK_VERSION}')/g" daprdocs/content/en/java-sdk-docs/_index.md
23-
sed -i "s/<version>.*<\/version>\$/<version>${DAPR_JAVA_SDK_ALPHA_VERSION}<\/version>/g" daprdocs/content/en/java-sdk-docs/spring-boot/_index.md
2418
fi
2519

26-
rm -f daprdocs/content/en/java-sdk-docs/_index.mdbak || echo
27-
rm -f daprdocs/content/en/java-sdk-docs/spring-boot/_index.md/_index.mdbak || echo
28-
2920
rm -rf docs
3021
./mvnw -Dmaven.test.skip=true -Djacoco.skip=true clean install
3122
./mvnw -Dmaven.test.skip=true -Djacoco.skip=true site-deploy

.github/scripts/update_sdk_version.sh

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,11 @@ DAPR_JAVA_SDK_VERSION=$1
88
# Replaces the SDK major version to 0 for alpha artifacts.
99
DAPR_JAVA_SDK_ALPHA_VERSION=`echo $DAPR_JAVA_SDK_VERSION | sed 's/^[0-9]*\./0./'`
1010

11-
mvn versions:set -DnewVersion=$DAPR_JAVA_SDK_VERSION
11+
mvn versions:set -DnewVersion=$DAPR_JAVA_SDK_VERSION -DprocessDependencies=true
1212
mvn versions:set-property -Dproperty=dapr.sdk.alpha.version -DnewVersion=$DAPR_JAVA_SDK_ALPHA_VERSION
1313
mvn versions:set-property -Dproperty=dapr.sdk.version -DnewVersion=$DAPR_JAVA_SDK_VERSION
1414
mvn versions:set-property -Dproperty=dapr.sdk.version -DnewVersion=$DAPR_JAVA_SDK_VERSION -f sdk-tests/pom.xml
1515
mvn versions:set-property -Dproperty=dapr.sdk.alpha.version -DnewVersion=$DAPR_JAVA_SDK_ALPHA_VERSION -f sdk-tests/pom.xml
1616

17-
###################
18-
# Alpha artifacts #
19-
###################
20-
21-
# sdk-workflows
22-
mvn versions:set -DnewVersion=$DAPR_JAVA_SDK_VERSION -f sdk-workflows/pom.xml
23-
24-
# testcontainers-dapr
25-
mvn versions:set -DnewVersion=$DAPR_JAVA_SDK_VERSION -f testcontainers-dapr/pom.xml
26-
27-
# dapr-spring
28-
mvn versions:set -DnewVersion=$DAPR_JAVA_SDK_VERSION -DprocessDependencies=true -f dapr-spring/pom.xml
29-
mvn versions:set-property -Dproperty=dapr.spring.version -DnewVersion=$DAPR_JAVA_SDK_VERSION -f dapr-spring/pom.xml
30-
31-
# spring-boot-examples
32-
mvn versions:set -DnewVersion=$DAPR_JAVA_SDK_VERSION -f spring-boot-examples/pom.xml
3317

3418
git clean -f

.github/workflows/build.yml

Lines changed: 55 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
- name: Run tests
3333
run: ./mvnw clean install -B -q -DskipITs=true
3434
- name: Codecov
35-
uses: codecov/codecov-action@v5.5.1
35+
uses: codecov/codecov-action@v5.5.2
3636
- name: Upload test report for sdk
3737
uses: actions/upload-artifact@v5
3838
with:
@@ -44,10 +44,58 @@ jobs:
4444
name: report-dapr-java-sdk-actors-jdk${{ env.JDK_VER }}
4545
path: sdk-actors/target/jacoco-report/
4646

47+
build-durabletask:
48+
name: "Durable Task build & tests"
49+
runs-on: ubuntu-latest
50+
timeout-minutes: 30
51+
continue-on-error: false
52+
env:
53+
JDK_VER: 17
54+
steps:
55+
- uses: actions/checkout@v5
56+
- name: Set up OpenJDK ${{ env.JDK_VER }}
57+
uses: actions/setup-java@v4
58+
with:
59+
distribution: 'temurin'
60+
java-version: ${{ env.JDK_VER }}
61+
- name: Checkout Durable Task Sidecar
62+
uses: actions/checkout@v4
63+
with:
64+
repository: dapr/durabletask-go
65+
path: durabletask-sidecar
66+
67+
# TODO: Move the sidecar into a central image repository
68+
- name: Initialize Durable Task Sidecar
69+
run: docker run -d --name durabletask-sidecar -p 4001:4001 --rm -i $(docker build -q ./durabletask-sidecar)
70+
71+
- name: Display Durable Task Sidecar Logs
72+
run: nohup docker logs --since=0 durabletask-sidecar > durabletask-sidecar.log 2>&1 &
73+
74+
# wait for 10 seconds, so sidecar container can be fully up, this will avoid intermittent failing issues for integration tests causing by failed to connect to sidecar
75+
- name: Wait for 10 seconds
76+
run: sleep 10
77+
78+
- name: Integration Tests For Durable Tasks
79+
run: ./mvnw -B -pl durabletask-client -Pintegration-tests dependency:copy-dependencies verify || echo "TEST_FAILED=true" >> $GITHUB_ENV
80+
continue-on-error: true
81+
82+
- name: Kill Durable Task Sidecar
83+
run: docker kill durabletask-sidecar
84+
85+
- name: Upload Durable Task Sidecar Logs
86+
uses: actions/upload-artifact@v4
87+
with:
88+
name: Durable Task Sidecar Logs
89+
path: durabletask-sidecar.log
90+
91+
- name: Fail the job if tests failed
92+
if: env.TEST_FAILED == 'true'
93+
run: exit 1
94+
4795
build:
4896
name: "Build jdk:${{ matrix.java }} sb:${{ matrix.spring-boot-display-version }} exp:${{ matrix.experimental }}"
4997
runs-on: ubuntu-latest
50-
timeout-minutes: 30
98+
timeout-minutes: 45
5199
continue-on-error: ${{ matrix.experimental }}
52100
strategy:
53101
fail-fast: false
@@ -74,12 +122,9 @@ jobs:
74122
DAPR_REF:
75123
TOXIPROXY_URL: https://github.com/Shopify/toxiproxy/releases/download/v2.5.0/toxiproxy-server-linux-amd64
76124
steps:
77-
- name: Install Stable Docker
78-
id: setup_docker
79-
uses: docker/setup-docker-action@v4
80-
- name: Check Docker version
81-
run: docker version
82125
- uses: actions/checkout@v5
126+
- name: Check Docker version
127+
run: docker version
83128
- name: Set up OpenJDK ${{ env.JDK_VER }}
84129
uses: actions/setup-java@v5
85130
with:
@@ -152,9 +197,7 @@ jobs:
152197
run: ./mvnw clean install -B -q -DskipTests
153198
- name: Integration tests using spring boot version ${{ matrix.spring-boot-version }}
154199
id: integration_tests
155-
run: PRODUCT_SPRING_BOOT_VERSION=${{ matrix.spring-boot-version }} ./mvnw -B -Pintegration-tests dependency:copy-dependencies verify
156-
env:
157-
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
200+
run: PRODUCT_SPRING_BOOT_VERSION=${{ matrix.spring-boot-version }} ./mvnw -B -pl !durabletask-client -Pintegration-tests dependency:copy-dependencies verify
158201
- name: Upload failsafe test report for sdk-tests on failure
159202
if: ${{ failure() && steps.integration_tests.conclusion == 'failure' }}
160203
uses: actions/upload-artifact@v5
@@ -168,9 +211,10 @@ jobs:
168211
name: surefire-report-sdk-tests-jdk${{ matrix.java }}-sb${{ matrix.spring-boot-version }}
169212
path: sdk-tests/target/surefire-reports
170213

214+
171215
publish:
172216
runs-on: ubuntu-latest
173-
needs: [ build, test ]
217+
needs: [ build, test, build-durabletask ]
174218
timeout-minutes: 30
175219
env:
176220
JDK_VER: 17

.github/workflows/validate.yml

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,6 @@ jobs:
4949
with:
5050
distribution: 'temurin'
5151
java-version: ${{ env.JDK_VER }}
52-
- name: Install Stable Docker
53-
id: setup_docker
54-
uses: docker/setup-docker-action@v4
5552
- name: Check Docker version
5653
run: docker version
5754
- name: Set up Dapr CLI
@@ -116,114 +113,76 @@ jobs:
116113
run: sleep 30 && docker logs dapr_scheduler && nc -vz localhost 50006
117114
- name: Install jars
118115
run: ./mvnw clean install -DskipTests -q
119-
env:
120-
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
121116
- name: Validate workflows example
122117
working-directory: ./examples
123118
run: |
124119
mm.py ./src/main/java/io/dapr/examples/workflows/README.md
125-
env:
126-
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
127120
- name: Validate Spring Boot examples
128121
working-directory: ./spring-boot-examples
129122
run: |
130123
mm.py README.md
131-
env:
132-
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
133124
- name: Validate Spring Boot Workflow Patterns examples
134125
working-directory: ./spring-boot-examples/workflows/patterns
135126
run: |
136127
mm.py README.md
137-
env:
138-
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
139128
- name: Validate Jobs example
140129
working-directory: ./examples
141130
run: |
142131
mm.py ./src/main/java/io/dapr/examples/jobs/README.md
143-
env:
144-
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
145132
- name: Validate conversation ai example
146133
working-directory: ./examples
147134
run: |
148135
mm.py ./src/main/java/io/dapr/examples/conversation/README.md
149-
env:
150-
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
151136
- name: Validate invoke http example
152137
working-directory: ./examples
153138
run: |
154139
mm.py ./src/main/java/io/dapr/examples/invoke/http/README.md
155-
env:
156-
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
157140
- name: Validate invoke grpc example
158141
working-directory: ./examples
159142
run: |
160143
mm.py ./src/main/java/io/dapr/examples/invoke/grpc/README.md
161-
env:
162-
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
163144
- name: Validate tracing example
164145
working-directory: ./examples
165146
run: |
166147
mm.py ./src/main/java/io/dapr/examples/tracing/README.md
167-
env:
168-
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
169148
- name: Validate expection handling example
170149
working-directory: ./examples
171150
run: |
172151
mm.py ./src/main/java/io/dapr/examples/exception/README.md
173-
env:
174-
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
175152
- name: Validate state example
176153
working-directory: ./examples
177154
run: |
178155
mm.py ./src/main/java/io/dapr/examples/state/README.md
179-
env:
180-
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
181156
- name: Validate pubsub example
182157
working-directory: ./examples
183158
run: |
184159
mm.py ./src/main/java/io/dapr/examples/pubsub/README.md
185-
env:
186-
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
187160
- name: Validate bindings HTTP example
188161
working-directory: ./examples
189162
run: |
190163
mm.py ./src/main/java/io/dapr/examples/bindings/http/README.md
191-
env:
192-
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
193164
- name: Validate secrets example
194165
working-directory: ./examples
195166
run: |
196167
mm.py ./src/main/java/io/dapr/examples/secrets/README.md
197-
env:
198-
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
199168
- name: Validate unit testing example
200169
working-directory: ./examples
201170
run: |
202171
mm.py ./src/main/java/io/dapr/examples/unittesting/README.md
203-
env:
204-
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
205172
- name: Validate Configuration API example
206173
working-directory: ./examples
207174
run: |
208175
mm.py ./src/main/java/io/dapr/examples/configuration/README.md
209-
env:
210-
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
211176
- name: Validate actors example
212177
working-directory: ./examples
213178
run: |
214179
mm.py ./src/main/java/io/dapr/examples/actors/README.md
215-
env:
216-
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
217180
- name: Validate query state HTTP example
218181
working-directory: ./examples
219182
run: |
220183
mm.py ./src/main/java/io/dapr/examples/querystate/README.md
221-
env:
222-
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
223184
- name: Validate streaming subscription example
224185
working-directory: ./examples
225186
run: |
226187
mm.py ./src/main/java/io/dapr/examples/pubsub/stream/README.md
227-
env:
228-
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
229188

.mise.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[tools]
2+
java = "temurin-17"
3+
4+
[env]
5+
JAVA_HOME = "{{exec(command='mise where java')}}"

dapr-spring/dapr-spring-boot-autoconfigure/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<groupId>io.dapr.spring</groupId>
88
<artifactId>dapr-spring-parent</artifactId>
99
<version>1.17.0-SNAPSHOT</version>
10+
<relativePath>../pom.xml</relativePath>
1011
</parent>
1112

1213
<artifactId>dapr-spring-boot-autoconfigure</artifactId>

dapr-spring/dapr-spring-boot-tests/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<groupId>io.dapr.spring</groupId>
88
<artifactId>dapr-spring-parent</artifactId>
99
<version>1.17.0-SNAPSHOT</version>
10+
<relativePath>../pom.xml</relativePath>
1011
</parent>
1112

1213
<artifactId>dapr-spring-boot-tests</artifactId>

dapr-spring/dapr-spring-data/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<groupId>io.dapr.spring</groupId>
88
<artifactId>dapr-spring-parent</artifactId>
99
<version>1.17.0-SNAPSHOT</version>
10+
<relativePath>../pom.xml</relativePath>
1011
</parent>
1112

1213
<artifactId>dapr-spring-data</artifactId>

dapr-spring/dapr-spring-messaging/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<groupId>io.dapr.spring</groupId>
88
<artifactId>dapr-spring-parent</artifactId>
99
<version>1.17.0-SNAPSHOT</version>
10+
<relativePath>../pom.xml</relativePath>
1011
</parent>
1112

1213
<artifactId>dapr-spring-messaging</artifactId>

dapr-spring/dapr-spring-workflows/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<groupId>io.dapr.spring</groupId>
88
<artifactId>dapr-spring-parent</artifactId>
99
<version>1.17.0-SNAPSHOT</version>
10+
<relativePath>../pom.xml</relativePath>
1011
</parent>
1112

1213
<artifactId>dapr-spring-workflows</artifactId>

0 commit comments

Comments
 (0)