Skip to content

Use 1.16 rc.3 #1488

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Aug 11, 2025
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
GOPROXY: https://proxy.golang.org
JDK_VER: ${{ matrix.java }}
DAPR_CLI_VER: 1.15.0
DAPR_RUNTIME_VER: 1.16.0-rc.2
DAPR_RUNTIME_VER: 1.16.0-rc.3
DAPR_INSTALL_URL: https://raw.githubusercontent.com/dapr/cli/v1.15.0/install/install.sh
DAPR_CLI_REF:
DAPR_REF:
Expand Down
45 changes: 21 additions & 24 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
GOPROXY: https://proxy.golang.org
JDK_VER: ${{ matrix.java }}
DAPR_CLI_VER: 1.15.0
DAPR_RUNTIME_VER: 1.16.0-rc.2
DAPR_RUNTIME_VER: 1.16.0-rc.3
DAPR_INSTALL_URL: https://raw.githubusercontent.com/dapr/cli/v1.15.0/install/install.sh
DAPR_CLI_REF:
DAPR_REF:
Expand Down Expand Up @@ -107,12 +107,26 @@ jobs:
pip3 install mechanical-markdown
- name: Verify scheduler is listening on port.
run: sleep 30 && docker logs dapr_scheduler && nc -vz localhost 50006
- name: Clean up files
run: ./mvnw clean
- name: Build sdk
run: ./mvnw compile -q
- name: Install jars
run: ./mvnw install -q
run: ./mvnw clean install -DskipTests -q
env:
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
- name: Validate workflows example
working-directory: ./examples
run: |
mm.py ./src/main/java/io/dapr/examples/workflows/README.md
env:
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
- name: Validate Spring Boot examples
working-directory: ./spring-boot-examples
run: |
mm.py README.md
env:
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
- name: Validate Spring Boot Workflow examples
working-directory: ./spring-boot-examples/workflows
run: |
mm.py README.md
env:
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
- name: Validate Jobs example
Expand Down Expand Up @@ -199,27 +213,10 @@ jobs:
mm.py ./src/main/java/io/dapr/examples/querystate/README.md
env:
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
- name: Validate workflows example
working-directory: ./examples
run: |
mm.py ./src/main/java/io/dapr/examples/workflows/README.md
env:
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
- name: Validate streaming subscription example
working-directory: ./examples
run: |
mm.py ./src/main/java/io/dapr/examples/pubsub/stream/README.md
env:
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
- name: Validate Spring Boot examples
working-directory: ./spring-boot-examples
run: |
mm.py README.md
env:
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
- name: Validate Spring Boot Workflow examples
working-directory: ./spring-boot-examples/workflows
run: |
mm.py README.md
env:
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}

4 changes: 2 additions & 2 deletions daprdocs/content/en/java-sdk-docs/spring-boot/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public class DaprTestContainersConfig {
@ServiceConnection
public DaprContainer daprContainer(Network daprNetwork, PostgreSQLContainer<?> postgreSQLContainer){

return new DaprContainer("daprio/daprd:1.16.0-rc.2")
return new DaprContainer("daprio/daprd:1.16.0-rc.3")
.withAppName("producer-app")
.withNetwork(daprNetwork)
.withComponent(new Component("kvstore", "state.postgresql", "v1", STATE_STORE_PROPERTIES))
Expand Down Expand Up @@ -250,7 +250,7 @@ Finally, because Dapr PubSub requires a bidirectional connection between your ap
@ServiceConnection
public DaprContainer daprContainer(Network daprNetwork, PostgreSQLContainer<?> postgreSQLContainer, RabbitMQContainer rabbitMQContainer){

return new DaprContainer("daprio/daprd:1.16.0-rc.2")
return new DaprContainer("daprio/daprd:1.16.0-rc.3")
.withAppName("producer-app")
.withNetwork(daprNetwork)
.withComponent(new Component("kvstore", "state.postgresql", "v1", STATE_STORE_PROPERTIES))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ expected_stdout_lines:
- '== APP == Subscriber got: This is message #0'
- '== APP == Subscriber got: This is message #1'
background: true
sleep: 30
sleep: 15
timeout_seconds: 30
-->

```bash
Expand All @@ -111,6 +112,7 @@ expected_stdout_lines:
- '== APP == Published message: This is message #1'
background: true
sleep: 15
timeout_seconds: 30
-->

```bash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public static void main(String[] args) throws Exception {
openTelemetrySdk.getSdkTracerProvider().shutdown();
Validation.validate();
System.out.println("Done");
System.exit(0);
}
}
}
3 changes: 3 additions & 0 deletions examples/src/main/java/io/dapr/examples/tracing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ name: Run demo service
expected_stdout_lines:
background: true
sleep: 20
timeout_seconds: 40
-->

```bash
Expand Down Expand Up @@ -225,6 +226,7 @@ name: Run proxy service
expected_stdout_lines:
background: true
sleep: 20
timeout_seconds: 40
-->

```bash
Expand Down Expand Up @@ -284,6 +286,7 @@ expected_stdout_lines:
- '== APP == Done'
background: true
sleep: 20
timeout_seconds: 40
-->

```bash
Expand Down
84 changes: 58 additions & 26 deletions examples/src/main/java/io/dapr/examples/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,12 @@ expected_stdout_lines:
- 'Message Received from input: Seattle'
- 'Sending message to output: SEATTLE'
- 'Workflow finished with result: TOKYO, LONDON, SEATTLE'
timeout_seconds: 20
background: true
sleep: 60
timeout_seconds: 60
-->
Execute the following script in order to run DemoChainWorker:
```sh
dapr run --app-id demoworkflowworker --resources-path ./components/workflows --dapr-grpc-port 50001 -- java -jar target/dapr-java-sdk-examples-exec.jar io.dapr.examples.workflows.chain.DemoChainWorker
dapr run --app-id demoworkflowworker --resources-path ./components/workflows --dapr-grpc-port 50001 -- java -jar target/dapr-java-sdk-examples-exec.jar io.dapr.examples.workflows.chain.DemoChainWorker 50001
```

Once running, the logs will start displaying the different steps: First, you can see workflow is starting:
Expand All @@ -158,9 +157,19 @@ Once running, the logs will start displaying the different steps: First, you can
== APP == INFO: Durable Task worker is connecting to sidecar at 127.0.0.1:50001.
```

<!-- END_STEP -->

<!-- STEP
name: Execute Chaining Pattern workflow
match_order: none
output_match_mode: substring
expected_stdout_lines:
- 'completed with result: TOKYO, LONDON, SEATTLE'
timeout_seconds: 20
-->
Then, execute the following script in order to run DemoChainClient:
```sh
java -jar target/dapr-java-sdk-examples-exec.jar io.dapr.examples.workflows.chain.DemoChainClient
sleep 10 && java -jar target/dapr-java-sdk-examples-exec.jar io.dapr.examples.workflows.chain.DemoChainClient 50001
```
<!-- END_STEP -->

Expand Down Expand Up @@ -241,7 +250,7 @@ public class CountWordsActivity implements WorkflowActivity {
}
```
<!-- STEP
name: Run Chaining Pattern workflow
name: Run FanInOut Pattern workflow
match_order: none
output_match_mode: substring
expected_stdout_lines:
Expand All @@ -251,20 +260,29 @@ expected_stdout_lines:
- 'Activity returned: 17.'
- 'Activity returned: 11.'
- 'Workflow finished with result: 60'
timeout_seconds: 20
background: true
sleep: 60
timeout_seconds: 60
-->

Execute the following script in order to run DemoFanInOutWorker:
```sh
dapr run --app-id demoworkflowworker --resources-path ./components/workflows --dapr-grpc-port 50001 -- java -jar target/dapr-java-sdk-examples-exec.jar io.dapr.examples.workflows.faninout.DemoFanInOutWorker
dapr run --app-id demoworkflowworker --resources-path ./components/workflows --dapr-grpc-port 50002 -- java -jar target/dapr-java-sdk-examples-exec.jar io.dapr.examples.workflows.faninout.DemoFanInOutWorker 50002
```

<!-- END_STEP -->

<!-- STEP
name: Execute FanInOut Pattern workflow
match_order: none
output_match_mode: substring
expected_stdout_lines:
- 'completed with result: 60'
timeout_seconds: 20
-->
Execute the following script in order to run DemoFanInOutClient:

```sh
java -jar target/dapr-java-sdk-examples-exec.jar io.dapr.examples.workflows.faninout.DemoFanInOutClient
sleep 10 && java -jar target/dapr-java-sdk-examples-exec.jar io.dapr.examples.workflows.faninout.DemoFanInOutClient 50002
```
<!-- END_STEP -->

Expand Down Expand Up @@ -294,7 +312,6 @@ and the client:
Started a new fan out/fan in model model workflow with instance ID: 092c1928-b5dd-4576-9468-300bf6aed986
workflow instance with ID: 092c1928-b5dd-4576-9468-300bf6aed986 completed with result: 60
```

### Continue As New Pattern
`ContinueAsNew` API allows you to restart the workflow with a new input.

Expand Down Expand Up @@ -606,8 +623,6 @@ expected_stdout_lines:
- "Registered Activity: CancelCarActivity"
- "Successfully built dapr workflow runtime"
- "Start workflow runtime"
- "Durable Task worker is connecting to sidecar at 127.0.0.1:50001."

- "Starting Workflow: io.dapr.examples.workflows.compensation.BookTripWorkflow"
- "Starting Activity: io.dapr.examples.workflows.compensation.BookFlightActivity"
- "Activity completed with result: Flight booked successfully"
Expand All @@ -625,18 +640,27 @@ expected_stdout_lines:
- "Starting Activity: io.dapr.examples.workflows.compensation.CancelFlightActivity"
- "Activity completed with result: Flight canceled successfully"
background: true
sleep: 60
timeout_seconds: 60
timeout_seconds: 30
-->

Execute the following script in order to run the BookTripWorker:
```sh
dapr run --app-id book-trip-worker --resources-path ./components/workflows --dapr-grpc-port 50001 -- java -jar target/dapr-java-sdk-examples-exec.jar io.dapr.examples.workflows.compensation.BookTripWorker
dapr run --app-id book-trip-worker --resources-path ./components/workflows --dapr-grpc-port 50003 -- java -jar target/dapr-java-sdk-examples-exec.jar io.dapr.examples.workflows.compensation.BookTripWorker 50003
```

<!-- END_STEP -->

<!-- STEP
name: Execute Compensation Pattern workflow
match_order: none
output_match_mode: substring
expected_stdout_lines:
- 'Workflow failed, compensation applied'
timeout_seconds: 30
-->
Once running, execute the following script to run the BookTripClient:
```sh
java -jar target/dapr-java-sdk-examples-exec.jar io.dapr.examples.workflows.compensation.BookTripClient
sleep 15 && java -jar target/dapr-java-sdk-examples-exec.jar io.dapr.examples.workflows.compensation.BookTripClient 50003
```
<!-- END_STEP -->

Expand All @@ -656,7 +680,7 @@ Key Points:

### Suspend/Resume Pattern

Workflow instances can be suspended and resumed. This example shows how to use the suspend and resume commands.
Workflow instances can be suspended and resumed. This example shows how to use the suspend and resume commands.

For testing the suspend and resume operations we will use the same workflow definition used by the DemoExternalEventWorkflow.

Expand All @@ -669,26 +693,34 @@ match_order: none
output_match_mode: substring
expected_stdout_lines:
- "Waiting for approval..."
- "Suspending Workflow Instance"
- "Workflow Instance Status: SUSPENDED"
- "Let's resume the Workflow Instance before sending the external event"
- "Workflow Instance Status: RUNNING"
- "Now that the instance is RUNNING again, lets send the external event."
- "approval granted - do the approved action"
- "Starting Activity: io.dapr.examples.workflows.externalevent.ApproveActivity"
- "Running approval activity..."
- "approval-activity finished"
background: true
sleep: 60
timeout_seconds: 60
timeout_seconds: 30
-->

```sh
dapr run --app-id demoworkflowworker --resources-path ./components/workflows --dapr-grpc-port 50001 -- java -jar target/dapr-java-sdk-examples-exec.jar io.dapr.examples.workflows.suspendresume.DemoSuspendResumeWorker
dapr run --app-id demoworkflowworker --resources-path ./components/workflows --dapr-grpc-port 50004 -- java -jar target/dapr-java-sdk-examples-exec.jar io.dapr.examples.workflows.suspendresume.DemoSuspendResumeWorker 50004
```

<!-- END_STEP -->

<!-- STEP
name: Execute Suspend/Resume workflow
match_order: none
output_match_mode: substring
expected_stdout_lines:
- "Suspending Workflow Instance"
- "Workflow Instance Status: SUSPENDED"
- "Let's resume the Workflow Instance before sending the external event"
- "Workflow Instance Status: RUNNING"
- "Now that the instance is RUNNING again, lets send the external event."
timeout_seconds: 30
-->
```sh
java -jar target/dapr-java-sdk-examples-exec.jar io.dapr.examples.workflows.suspendresume.DemoSuspendResumeClient
sleep 15 && java -jar target/dapr-java-sdk-examples-exec.jar io.dapr.examples.workflows.suspendresume.DemoSuspendResumeClient 50004
```

<!-- END_STEP -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

package io.dapr.examples.workflows.chain;

import io.dapr.examples.workflows.utils.PropertyUtils;
import io.dapr.workflows.client.DaprWorkflowClient;
import io.dapr.workflows.client.WorkflowInstanceStatus;

Expand All @@ -26,7 +27,7 @@ public class DemoChainClient {
* @throws InterruptedException If program has been interrupted.
*/
public static void main(String[] args) {
try (DaprWorkflowClient client = new DaprWorkflowClient()) {
try (DaprWorkflowClient client = new DaprWorkflowClient(PropertyUtils.getProperties(args))) {
String instanceId = client.scheduleNewWorkflow(DemoChainWorkflow.class);
System.out.printf("Started a new chaining model workflow with instance ID: %s%n", instanceId);
WorkflowInstanceStatus workflowInstanceStatus =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

package io.dapr.examples.workflows.chain;

import io.dapr.examples.workflows.utils.PropertyUtils;
import io.dapr.workflows.runtime.WorkflowRuntime;
import io.dapr.workflows.runtime.WorkflowRuntimeBuilder;

Expand All @@ -25,7 +26,7 @@ public class DemoChainWorker {
*/
public static void main(String[] args) throws Exception {
// Register the Workflow with the builder.
WorkflowRuntimeBuilder builder = new WorkflowRuntimeBuilder().registerWorkflow(DemoChainWorkflow.class);
WorkflowRuntimeBuilder builder = new WorkflowRuntimeBuilder(PropertyUtils.getProperties(args)).registerWorkflow(DemoChainWorkflow.class);
builder.registerActivity(ToUpperCaseActivity.class);

// Build and then start the workflow runtime pulling and executing tasks
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

package io.dapr.examples.workflows.childworkflow;

import io.dapr.examples.workflows.utils.PropertyUtils;
import io.dapr.workflows.client.DaprWorkflowClient;
import io.dapr.workflows.client.WorkflowInstanceStatus;

Expand All @@ -26,7 +27,7 @@ public class DemoChildWorkerflowClient {
* @throws InterruptedException If program has been interrupted.
*/
public static void main(String[] args) {
try (DaprWorkflowClient client = new DaprWorkflowClient()) {
try (DaprWorkflowClient client = new DaprWorkflowClient(PropertyUtils.getProperties(args))) {
String instanceId = client.scheduleNewWorkflow(DemoWorkflow.class);
System.out.printf("Started a new child-workflow model workflow with instance ID: %s%n", instanceId);
WorkflowInstanceStatus workflowInstanceStatus =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

package io.dapr.examples.workflows.childworkflow;

import io.dapr.examples.workflows.utils.PropertyUtils;
import io.dapr.workflows.runtime.WorkflowRuntime;
import io.dapr.workflows.runtime.WorkflowRuntimeBuilder;

Expand All @@ -25,7 +26,7 @@ public class DemoChildWorkflowWorker {
*/
public static void main(String[] args) throws Exception {
// Register the Workflow with the builder.
WorkflowRuntimeBuilder builder = new WorkflowRuntimeBuilder()
WorkflowRuntimeBuilder builder = new WorkflowRuntimeBuilder(PropertyUtils.getProperties(args))
.registerWorkflow(DemoWorkflow.class)
.registerWorkflow(DemoChildWorkflow.class);
builder.registerActivity(ReverseActivity.class);
Expand Down
Loading
Loading