Skip to content

Fix the issue with retries not happening correctly for Activities and Workflows #1373

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

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
c318705
Add coverage for some properties (#1297)
mcruzdev Apr 16, 2025
8683d8b
Make the DAPR version being used consistent across all tests (#1299)
siri-varma Apr 18, 2025
b2c130d
Separate Dapr constants from IT container constants (#1315)
artur-ciocanu Apr 22, 2025
aa241ca
Use Java Bean for connection details and add more tests (#1317)
artur-ciocanu Apr 22, 2025
84d16ea
Update CONTRIBUTING.md
siri-varma Apr 29, 2025
1ee9e1e
Bump codecov/codecov-action from 5.4.0 to 5.4.2 (#1318)
dependabot[bot] Apr 22, 2025
4df7714
Fix URL building logic (#1320)
artur-ciocanu Apr 29, 2025
5151bc7
Generate updated javadocs for 1.14.1
dapr-bot Apr 30, 2025
94bb144
Add Conversation AI to Java SDK (#1235)
siri-varma May 1, 2025
df4f20a
Add docs for usage of Jobs SDK (#1323)
siri-varma May 6, 2025
55c143d
Use dapr/durabletask-java (#1336)
cicoyle May 8, 2025
81d8a22
Update master version to 1.16.0-SNAPSHOT
dapr-bot May 8, 2025
e3f4224
Fix NPE
siri-varma May 13, 2025
562c09c
Fix NPE
siri-varma May 13, 2025
b799023
Fix NPE
siri-varma May 13, 2025
267b421
Fix NPE
siri-varma May 13, 2025
9c894a8
Fix NPE
siri-varma May 13, 2025
c63822e
Fix NPE
siri-varma May 13, 2025
0b52c9c
Fix things
siri-varma May 13, 2025
8449d25
Renaming and exposing connection details (#1341)
artur-ciocanu May 13, 2025
e06fc85
[Master] Fix Vulnerabilities (#1354)
cicoyle May 13, 2025
7e834ed
Feat Add TLS & mTLS support for gRPC with root CA and insecure mode (…
cicoyle May 14, 2025
d40c8c9
Address comments
siri-varma May 15, 2025
f390b24
Fix things
siri-varma May 15, 2025
f79b21c
Fix things
siri-varma May 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
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 @@ -39,7 +39,7 @@ jobs:
GOPROXY: https://proxy.golang.org
JDK_VER: ${{ matrix.java }}
DAPR_CLI_VER: 1.15.0
DAPR_RUNTIME_VER: 1.15.3
DAPR_RUNTIME_VER: 1.15.4
DAPR_INSTALL_URL: https://raw.githubusercontent.com/dapr/cli/v1.15.0/install/install.sh
DAPR_CLI_REF:
DAPR_REF:
Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:
env:
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
- name: Codecov
uses: codecov/codecov-action@v5.4.0
uses: codecov/codecov-action@v5.4.2
- name: Install jars
run: ./mvnw install -q -B -DskipTests
- name: Integration tests using spring boot version ${{ matrix.spring-boot-version }}
Expand Down
8 changes: 7 additions & 1 deletion .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.15.3
DAPR_RUNTIME_VER: 1.15.4
DAPR_INSTALL_URL: https://raw.githubusercontent.com/dapr/cli/v1.15.0/install/install.sh
DAPR_CLI_REF:
DAPR_REF:
Expand Down Expand Up @@ -121,6 +121,12 @@ jobs:
mm.py ./src/main/java/io/dapr/examples/jobs/README.md
env:
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
- name: Validate conversation ai example
working-directory: ./examples
run: |
mm.py ./src/main/java/io/dapr/examples/conversation/README.md
env:
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
- name: Validate invoke http example
working-directory: ./examples
run: |
Expand Down
6 changes: 6 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ Before you file an issue, make sure you've checked the following:

This section describes the guidelines for contributing code / docs to Dapr.

### Things to consider when adding new API to SDK

1. All the new API's go under [dapr-sdk maven package](https://github.com/dapr/java-sdk/tree/master/sdk)
2. Make sure there is an example talking about how to use the API along with a README. [Example](https://github.com/dapr/java-sdk/pull/1235/files#diff-69ed756c4c01fd5fa884aac030dccb8f3f4d4fefa0dc330862d55a6f87b34a14)

### Pull Requests

All contributions come through pull requests. To submit a proposed change, we recommend following this workflow:
Expand All @@ -64,6 +69,7 @@ All contributions come through pull requests. To submit a proposed change, we re
6. Commit and open a PR
7. Wait for the CI process to finish and make sure all checks are green
8. A maintainer of the project will be assigned, and you can expect a review within a few days
9. All the files have the Copyright header.

### Configure the code style with checkstyle

Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,19 @@ For a Maven project, add the following to your `pom.xml` file:
<dependency>
<groupId>io.dapr</groupId>
<artifactId>dapr-sdk</artifactId>
<version>1.14.0</version>
<version>1.14.1</version>
</dependency>
<!-- Dapr's SDK for Actors (optional). -->
<dependency>
<groupId>io.dapr</groupId>
<artifactId>dapr-sdk-actors</artifactId>
<version>1.14.0</version>
<version>1.14.1</version>
</dependency>
<!-- Dapr's SDK integration with SpringBoot (optional). -->
<dependency>
<groupId>io.dapr</groupId>
<artifactId>dapr-sdk-springboot</artifactId>
<version>1.14.0</version>
<version>1.14.1</version>
</dependency>
...
</dependencies>
Expand All @@ -76,11 +76,11 @@ For a Gradle project, add the following to your `build.gradle` file:
dependencies {
...
// Dapr's core SDK with all features, except Actors.
compile('io.dapr:dapr-sdk:1.14.0')
compile('io.dapr:dapr-sdk:1.14.1')
// Dapr's SDK for Actors (optional).
compile('io.dapr:dapr-sdk-actors:1.14.0')
compile('io.dapr:dapr-sdk-actors:1.14.1')
// Dapr's SDK integration with SpringBoot (optional).
compile('io.dapr:dapr-sdk-springboot:1.14.0')
compile('io.dapr:dapr-sdk-springboot:1.14.1')
}
```

Expand Down
2 changes: 1 addition & 1 deletion dapr-spring/dapr-spring-boot-autoconfigure/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.dapr.spring</groupId>
<artifactId>dapr-spring-parent</artifactId>
<version>0.15.0-SNAPSHOT</version>
<version>0.16.0-SNAPSHOT</version>
</parent>

<artifactId>dapr-spring-boot-autoconfigure</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,31 @@

package io.dapr.spring.boot.autoconfigure.client;

class PropertiesDaprConnectionDetails implements DaprConnectionDetails {
public class ClientPropertiesDaprConnectionDetails implements DaprConnectionDetails {

private final DaprClientProperties daprClientProperties;

public PropertiesDaprConnectionDetails(DaprClientProperties daprClientProperties) {
public ClientPropertiesDaprConnectionDetails(DaprClientProperties daprClientProperties) {
this.daprClientProperties = daprClientProperties;
}

@Override
public String httpEndpoint() {
public String getHttpEndpoint() {
return this.daprClientProperties.getHttpEndpoint();
}

@Override
public String grpcEndpoint() {
public String getGrpcEndpoint() {
return this.daprClientProperties.getGrpcEndpoint();
}

@Override
public Integer httpPort() {
public Integer getHttpPort() {
return this.daprClientProperties.getHttpPort();
}

@Override
public Integer grpcPort() {
public Integer getGrpcPort() {
return this.daprClientProperties.getGrpcPort();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,25 +37,37 @@ public class DaprClientAutoConfiguration {
@Bean
@ConditionalOnMissingBean(DaprConnectionDetails.class)
DaprConnectionDetails daprConnectionDetails(DaprClientProperties properties) {
return new PropertiesDaprConnectionDetails(properties);
return new ClientPropertiesDaprConnectionDetails(properties);
}

@Bean
@ConditionalOnMissingBean
DaprClientBuilder daprClientBuilder(DaprConnectionDetails daprConnectionDetails) {
DaprClientBuilder builder = new DaprClientBuilder();
if (daprConnectionDetails.httpEndpoint() != null) {
builder.withPropertyOverride(Properties.HTTP_ENDPOINT, daprConnectionDetails.httpEndpoint());
DaprClientBuilder builder = createDaprClientBuilder();
String httpEndpoint = daprConnectionDetails.getHttpEndpoint();

if (httpEndpoint != null) {
builder.withPropertyOverride(Properties.HTTP_ENDPOINT, httpEndpoint);
}
if (daprConnectionDetails.grpcEndpoint() != null) {
builder.withPropertyOverride(Properties.GRPC_ENDPOINT, daprConnectionDetails.grpcEndpoint());

String grpcEndpoint = daprConnectionDetails.getGrpcEndpoint();

if (grpcEndpoint != null) {
builder.withPropertyOverride(Properties.GRPC_ENDPOINT, grpcEndpoint);
}
if (daprConnectionDetails.httpPort() != null) {
builder.withPropertyOverride(Properties.HTTP_PORT, String.valueOf(daprConnectionDetails.httpPort()));

Integer httpPort = daprConnectionDetails.getHttpPort();

if (httpPort != null) {
builder.withPropertyOverride(Properties.HTTP_PORT, String.valueOf(httpPort));
}
if (daprConnectionDetails.grpcPort() != null) {
builder.withPropertyOverride(Properties.GRPC_PORT, String.valueOf(daprConnectionDetails.grpcPort()));

Integer grpcPort = daprConnectionDetails.getGrpcPort();

if (grpcPort != null) {
builder.withPropertyOverride(Properties.GRPC_PORT, String.valueOf(grpcPort));
}

return builder;
}

Expand Down Expand Up @@ -90,22 +102,50 @@ ActorRuntime daprActorRuntime(DaprConnectionDetails daprConnectionDetails) {
@ConditionalOnMissingBean
WorkflowRuntimeBuilder daprWorkflowRuntimeBuilder(DaprConnectionDetails daprConnectionDetails) {
Properties properties = createPropertiesFromConnectionDetails(daprConnectionDetails);

return new WorkflowRuntimeBuilder(properties);
}

private Properties createPropertiesFromConnectionDetails(DaprConnectionDetails daprConnectionDetails) {
final Map<String, String> propertyOverrides = new HashMap<>();
propertyOverrides.put(Properties.HTTP_ENDPOINT.getName(), daprConnectionDetails.httpEndpoint());
if (daprConnectionDetails.httpPort() != null) {
propertyOverrides.put(Properties.HTTP_PORT.getName(), String.valueOf(daprConnectionDetails.httpPort()));
/**
* We use this method in tests to override the default DaprClientBuilder.
*/
protected DaprClientBuilder createDaprClientBuilder() {
return new DaprClientBuilder();
}

/**
* Creates a Properties object from the DaprConnectionDetails.
*
* @param daprConnectionDetails the DaprConnectionDetails
* @return the Properties object
*/
protected Properties createPropertiesFromConnectionDetails(DaprConnectionDetails daprConnectionDetails) {
Map<String, String> propertyOverrides = new HashMap<>();
String httpEndpoint = daprConnectionDetails.getHttpEndpoint();

if (httpEndpoint != null) {
propertyOverrides.put(Properties.HTTP_ENDPOINT.getName(), httpEndpoint);
}
propertyOverrides.put(Properties.GRPC_ENDPOINT.getName(), daprConnectionDetails.grpcEndpoint());
if (daprConnectionDetails.grpcPort() != null) {
propertyOverrides.put(Properties.GRPC_PORT.getName(), String.valueOf(daprConnectionDetails.grpcPort()));

Integer httpPort = daprConnectionDetails.getHttpPort();

if (httpPort != null) {
propertyOverrides.put(Properties.HTTP_PORT.getName(), String.valueOf(httpPort));
}
return new Properties(propertyOverrides);
}

String grpcEndpoint = daprConnectionDetails.getGrpcEndpoint();

if (grpcEndpoint != null) {
propertyOverrides.put(Properties.GRPC_ENDPOINT.getName(), grpcEndpoint);
}

Integer grpcPort = daprConnectionDetails.getGrpcPort();

if (grpcPort != null) {
propertyOverrides.put(Properties.GRPC_PORT.getName(), String.valueOf(grpcPort));
}

return new Properties(propertyOverrides);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@
import org.springframework.boot.autoconfigure.service.connection.ConnectionDetails;

public interface DaprConnectionDetails extends ConnectionDetails {
String httpEndpoint();

String grpcEndpoint();
String getHttpEndpoint();

Integer httpPort();
String getGrpcEndpoint();

Integer getHttpPort();

Integer getGrpcPort();

Integer grpcPort();
}
Loading