Skip to content

Commit 6a376b1

Browse files
authored
Merge branch 'master' into development-cloudconfig
2 parents 841b2f8 + c909d26 commit 6a376b1

File tree

20 files changed

+539
-184
lines changed

20 files changed

+539
-184
lines changed

.github/workflows/build.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ jobs:
4545
DAPR_REF:
4646
TOXIPROXY_URL: https://github.com/Shopify/toxiproxy/releases/download/v2.5.0/toxiproxy-server-linux-amd64
4747
steps:
48+
- name: Install Stable Docker
49+
id: setup_docker
50+
uses: docker/setup-docker-action@v4
51+
- name: Check Docker version
52+
run: docker version
4853
- uses: actions/checkout@v4
4954
- name: Set up OpenJDK ${{ env.JDK_VER }}
5055
uses: actions/setup-java@v4
@@ -113,13 +118,17 @@ jobs:
113118
run: ./mvnw compile -B -q
114119
- name: Unit tests
115120
run: ./mvnw test # making it temporarily verbose.
121+
env:
122+
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
116123
- name: Codecov
117-
uses: codecov/codecov-action@v4.1.0
124+
uses: codecov/codecov-action@v5.4.0
118125
- name: Install jars
119126
run: ./mvnw install -q -B -DskipTests
120127
- name: Integration tests using spring boot version ${{ matrix.spring-boot-version }}
121128
id: integration_tests
122129
run: PRODUCT_SPRING_BOOT_VERSION=${{ matrix.spring-boot-version }} ./mvnw -B -Pintegration-tests verify
130+
env:
131+
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
123132
- name: Upload test report for sdk
124133
uses: actions/upload-artifact@v4
125134
with:

.github/workflows/fossa.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ jobs:
3535
uses: actions/checkout@v4
3636

3737
- name: "Run FOSSA Scan"
38-
uses: fossas/fossa-action@v1.3.3 # Use a specific version if locking is preferred
38+
uses: fossas/fossa-action@v1.6.0 # Use a specific version if locking is preferred
3939
with:
4040
api-key: ${{ env.FOSSA_API_KEY }}
4141

4242
- name: "Run FOSSA Test"
43-
uses: fossas/fossa-action@v1.3.3 # Use a specific version if locking is preferred
43+
uses: fossas/fossa-action@v1.6.0 # Use a specific version if locking is preferred
4444
with:
4545
api-key: ${{ env.FOSSA_API_KEY }}
4646
run-tests: true

.github/workflows/validate.yml

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ 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
55+
- name: Check Docker version
56+
run: docker version
5257
- name: Set up Dapr CLI
5358
run: wget -q ${{ env.DAPR_INSTALL_URL }} -O - | /bin/bash -s ${{ env.DAPR_CLI_VER }}
5459
- name: Set up Go ${{ env.GOVER }}
@@ -108,63 +113,95 @@ jobs:
108113
run: ./mvnw compile -q
109114
- name: Install jars
110115
run: ./mvnw install -q
116+
env:
117+
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
111118
- name: Validate invoke http example
112119
working-directory: ./examples
113120
run: |
114121
mm.py ./src/main/java/io/dapr/examples/invoke/http/README.md
122+
env:
123+
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
115124
- name: Validate invoke grpc example
116125
working-directory: ./examples
117126
run: |
118127
mm.py ./src/main/java/io/dapr/examples/invoke/grpc/README.md
128+
env:
129+
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
119130
- name: Validate tracing example
120131
working-directory: ./examples
121132
run: |
122133
mm.py ./src/main/java/io/dapr/examples/tracing/README.md
134+
env:
135+
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
123136
- name: Validate expection handling example
124137
working-directory: ./examples
125138
run: |
126139
mm.py ./src/main/java/io/dapr/examples/exception/README.md
140+
env:
141+
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
127142
- name: Validate state example
128143
working-directory: ./examples
129144
run: |
130145
mm.py ./src/main/java/io/dapr/examples/state/README.md
146+
env:
147+
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
131148
- name: Validate pubsub example
132149
working-directory: ./examples
133150
run: |
134151
mm.py ./src/main/java/io/dapr/examples/pubsub/README.md
152+
env:
153+
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
135154
- name: Validate bindings HTTP example
136155
working-directory: ./examples
137156
run: |
138157
mm.py ./src/main/java/io/dapr/examples/bindings/http/README.md
158+
env:
159+
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
139160
- name: Validate secrets example
140161
working-directory: ./examples
141162
run: |
142163
mm.py ./src/main/java/io/dapr/examples/secrets/README.md
164+
env:
165+
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
143166
- name: Validate unit testing example
144167
working-directory: ./examples
145168
run: |
146169
mm.py ./src/main/java/io/dapr/examples/unittesting/README.md
170+
env:
171+
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
147172
- name: Validate Configuration API example
148173
working-directory: ./examples
149174
run: |
150175
mm.py ./src/main/java/io/dapr/examples/configuration/README.md
176+
env:
177+
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
151178
- name: Validate actors example
152179
working-directory: ./examples
153180
run: |
154181
mm.py ./src/main/java/io/dapr/examples/actors/README.md
182+
env:
183+
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
155184
- name: Validate query state HTTP example
156185
working-directory: ./examples
157186
run: |
158187
mm.py ./src/main/java/io/dapr/examples/querystate/README.md
188+
env:
189+
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
159190
- name: Validate workflows example
160191
working-directory: ./examples
161192
run: |
162193
mm.py ./src/main/java/io/dapr/examples/workflows/README.md
194+
env:
195+
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
163196
- name: Validate streaming subscription example
164197
working-directory: ./examples
165198
run: |
166199
mm.py ./src/main/java/io/dapr/examples/pubsub/stream/README.md
200+
env:
201+
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
167202
- name: Validate Spring Boot examples
168203
working-directory: ./spring-boot-examples
169204
run: |
170-
mm.py README.md
205+
mm.py README.md
206+
env:
207+
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}

CONTRIBUTING.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ A non-exclusive list of code that must be places in `vendor/`:
120120

121121
**Thank You!** - Your contributions to open source, large or small, make projects like this possible. Thank you for taking the time to contribute.
122122

123+
## Github Dapr Bot Commands
124+
125+
Checkout the [daprbot documentation](https://docs.dapr.io/contributing/daprbot/) for Github commands you can run in this repo for common tasks. For example, you can run the `/assign` (as a comment on an issue) to assign the issue to yourself.
126+
123127
## Code of Conduct
124128

125129
This project has adopted the [Contributor Covenant Code of Conduct](https://github.com/dapr/community/blob/master/CODE-OF-CONDUCT.md)

dapr-spring/pom.xml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
<maven.compiler.source>11</maven.compiler.source>
3434
<maven.compiler.target>11</maven.compiler.target>
3535
<maven.compiler.release>11</maven.compiler.release>
36+
<testcontainers.version>1.19.8</testcontainers.version>
37+
<junit.version>5.10.2</junit.version>
3638
</properties>
3739

3840
<dependencyManagement>
@@ -44,6 +46,31 @@
4446
<type>pom</type>
4547
<scope>import</scope>
4648
</dependency>
49+
<dependency>
50+
<groupId>org.junit.jupiter</groupId>
51+
<artifactId>junit-jupiter-api</artifactId>
52+
<version>${junit.version}</version>
53+
</dependency>
54+
<dependency>
55+
<groupId>org.junit.jupiter</groupId>
56+
<artifactId>junit-jupiter-params</artifactId>
57+
<version>${junit.version}</version>
58+
</dependency>
59+
<dependency>
60+
<groupId>org.junit.jupiter</groupId>
61+
<artifactId>junit-jupiter-engine</artifactId>
62+
<version>${junit.version}</version>
63+
</dependency>
64+
<dependency>
65+
<groupId>org.junit.jupiter</groupId>
66+
<artifactId>junit-jupiter</artifactId>
67+
<version>${junit.version}</version>
68+
</dependency>
69+
<dependency>
70+
<groupId>org.testcontainers</groupId>
71+
<artifactId>junit-jupiter</artifactId>
72+
<version>${testcontainers.version}</version>
73+
</dependency>
4774
</dependencies>
4875
</dependencyManagement>
4976

@@ -74,13 +101,15 @@
74101
<dependency>
75102
<groupId>org.springframework.boot</groupId>
76103
<artifactId>spring-boot-configuration-processor</artifactId>
104+
<version>${springboot.version}</version>
77105
<optional>true</optional>
78106
</dependency>
79107

80108
<!-- Test dependencies -->
81109
<dependency>
82110
<groupId>org.springframework.boot</groupId>
83111
<artifactId>spring-boot-starter-test</artifactId>
112+
<version>${springboot.version}</version>
84113
<scope>test</scope>
85114
</dependency>
86115
<dependency>

daprdocs/content/en/java-sdk-contributing/java-contributing.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,7 @@ The `daprdocs` directory contains the markdown files that are rendered into the
2121

2222
- All rules in the [docs guide]({{< ref contributing-docs.md >}}) should be followed in addition to these.
2323
- All files and directories should be prefixed with `java-` to ensure all file/directory names are globally unique across all Dapr documentation.
24+
25+
## Github Dapr Bot Commands
26+
27+
Checkout the [daprbot documentation](https://docs.dapr.io/contributing/daprbot/) for Github commands you can run in this repo for common tasks. For example, you can run the `/assign` (as a comment on an issue) to assign the issue to yourself.

examples/src/main/java/io/dapr/examples/workflows/README.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -226,13 +226,13 @@ public class CountWordsActivity implements WorkflowActivity {
226226
@Override
227227
public Object run(WorkflowActivityContext ctx) {
228228
Logger logger = LoggerFactory.getLogger(ToUpperCaseActivity.class);
229-
logger.info("Starting Activity: " + ctx.getName());
229+
logger.info("Starting Activity: {}", ctx.getName());
230230

231231
String input = ctx.getInput(String.class);
232232
StringTokenizer tokenizer = new StringTokenizer(input);
233233
int result = tokenizer.countTokens();
234234

235-
logger.info("Activity returned: " + result);
235+
logger.info("Activity returned: {}.", result);
236236
logger.info("Activity finished");
237237

238238
return result;
@@ -244,10 +244,11 @@ name: Run Chaining Pattern workflow
244244
match_order: none
245245
output_match_mode: substring
246246
expected_stdout_lines:
247-
- 'Activity returned: 2'
248-
- 'Activity returned: 9'
249-
- 'Activity returned: 21'
250-
- 'Activity returned: 17'
247+
- 'Activity returned: 2.'
248+
- 'Activity returned: 9.'
249+
- 'Activity returned: 21.'
250+
- 'Activity returned: 17.'
251+
- 'Activity returned: 11.'
251252
- 'Workflow finished with result: 60'
252253
background: true
253254
sleep: 60
@@ -270,19 +271,19 @@ Now you can see the logs from worker:
270271
```text
271272
== APP == 2023-11-07 14:52:03,075 {HH:mm:ss.SSS} [main] INFO io.dapr.workflows.WorkflowContext - Starting Workflow: io.dapr.examples.workflows.faninout.DemoFanInOutWorkflow
272273
== APP == 2023-11-07 14:52:03,144 {HH:mm:ss.SSS} [main] INFO i.d.e.w.faninout.CountWordsActivity - Starting Activity: io.dapr.examples.workflows.faninout.CountWordsActivity
273-
== APP == 2023-11-07 14:52:03,147 {HH:mm:ss.SSS} [main] INFO i.d.e.w.faninout.CountWordsActivity - Activity returned: 2
274+
== APP == 2023-11-07 14:52:03,147 {HH:mm:ss.SSS} [main] INFO i.d.e.w.faninout.CountWordsActivity - Activity returned: 2.
274275
== APP == 2023-11-07 14:52:03,148 {HH:mm:ss.SSS} [main] INFO i.d.e.w.faninout.CountWordsActivity - Activity finished
275276
== APP == 2023-11-07 14:52:03,152 {HH:mm:ss.SSS} [main] INFO i.d.e.w.faninout.CountWordsActivity - Starting Activity: io.dapr.examples.workflows.faninout.CountWordsActivity
276-
== APP == 2023-11-07 14:52:03,152 {HH:mm:ss.SSS} [main] INFO i.d.e.w.faninout.CountWordsActivity - Activity returned: 9
277+
== APP == 2023-11-07 14:52:03,152 {HH:mm:ss.SSS} [main] INFO i.d.e.w.faninout.CountWordsActivity - Activity returned: 9.
277278
== APP == 2023-11-07 14:52:03,152 {HH:mm:ss.SSS} [main] INFO i.d.e.w.faninout.CountWordsActivity - Activity finished
278279
== APP == 2023-11-07 14:52:03,167 {HH:mm:ss.SSS} [main] INFO i.d.e.w.faninout.CountWordsActivity - Starting Activity: io.dapr.examples.workflows.faninout.CountWordsActivity
279-
== APP == 2023-11-07 14:52:03,167 {HH:mm:ss.SSS} [main] INFO i.d.e.w.faninout.CountWordsActivity - Activity returned: 21
280+
== APP == 2023-11-07 14:52:03,167 {HH:mm:ss.SSS} [main] INFO i.d.e.w.faninout.CountWordsActivity - Activity returned: 21.
280281
== APP == 2023-11-07 14:52:03,167 {HH:mm:ss.SSS} [main] INFO i.d.e.w.faninout.CountWordsActivity - Activity finished
281282
== APP == 2023-11-07 14:52:03,170 {HH:mm:ss.SSS} [main] INFO i.d.e.w.faninout.CountWordsActivity - Starting Activity: io.dapr.examples.workflows.faninout.CountWordsActivity
282-
== APP == 2023-11-07 14:52:03,170 {HH:mm:ss.SSS} [main] INFO i.d.e.w.faninout.CountWordsActivity - Activity returned: 17
283+
== APP == 2023-11-07 14:52:03,170 {HH:mm:ss.SSS} [main] INFO i.d.e.w.faninout.CountWordsActivity - Activity returned: 17.
283284
== APP == 2023-11-07 14:52:03,170 {HH:mm:ss.SSS} [main] INFO i.d.e.w.faninout.CountWordsActivity - Activity finished
284285
== APP == 2023-11-07 14:52:03,173 {HH:mm:ss.SSS} [main] INFO i.d.e.w.faninout.CountWordsActivity - Starting Activity: io.dapr.examples.workflows.faninout.CountWordsActivity
285-
== APP == 2023-11-07 14:52:03,173 {HH:mm:ss.SSS} [main] INFO i.d.e.w.faninout.CountWordsActivity - Activity returned: 11
286+
== APP == 2023-11-07 14:52:03,173 {HH:mm:ss.SSS} [main] INFO i.d.e.w.faninout.CountWordsActivity - Activity returned: 11.
286287
== APP == 2023-11-07 14:52:03,174 {HH:mm:ss.SSS} [main] INFO i.d.e.w.faninout.CountWordsActivity - Activity finished
287288
== APP == 2023-11-07 14:52:03,212 {HH:mm:ss.SSS} [main] INFO io.dapr.workflows.WorkflowContext - Workflow finished with result: 60
288289
```
@@ -538,4 +539,4 @@ The log from client:
538539
```text
539540
Started a new child-workflow model workflow with instance ID: c2fb9c83-435b-4b55-bdf1-833b39366cfb
540541
workflow instance with ID: c2fb9c83-435b-4b55-bdf1-833b39366cfb completed with result: !wolfkroW rpaD olleH
541-
```
542+
```

examples/src/main/java/io/dapr/examples/workflows/faninout/CountWordsActivity.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ public class CountWordsActivity implements WorkflowActivity {
2424
@Override
2525
public Object run(WorkflowActivityContext ctx) {
2626
Logger logger = LoggerFactory.getLogger(CountWordsActivity.class);
27-
logger.info("Starting Activity: " + ctx.getName());
27+
logger.info("Starting Activity: {}", ctx.getName());
2828

2929
String input = ctx.getInput(String.class);
3030
StringTokenizer tokenizer = new StringTokenizer(input);
3131
int result = tokenizer.countTokens();
3232

33-
logger.info("Activity returned: " + result);
33+
logger.info("Activity returned: {}.", result);
3434
logger.info("Activity finished");
3535

3636
return result;

0 commit comments

Comments
 (0)