Bring Testcontainers integration to Dapr for local spring boot development experience
salaboy opened this issue · 3 comments
Describe the proposal
Spring Boot developers should be able to use Testcontainers to start a local Dapr setup. This is already working here: https://github.com/diagridio/testcontainers-dapr, but this should be part of the Spring Boot and Dapr Java SDK integration, so it provides an out of the box experience to Spring Boot users.
I propose to adapt and move this code to the Dapr Java SDK repository so it is part of the Java SDK release stream.
This is work in progress and it is coming along slowly but surely
After building the Testcontainers integration with Dapr here: https://github.com/diagridio/testcontainers-dapr I will create a PR containing the Testcontainers module to be released as part of the Java SDK, so it can be versioned and distributed together for developers to use. This also needs to include documentation and community validation.
As part of this work, and after the testcontainers support is merged, we are working with @artur-ciocanu to bring the Spring Boot integration to support core Spring Data and Messaging interfaces. The goal is to demonstrate that Spring developers can leverage Dapr functionalities by using constructs that they already know, as KeyValueTemplate
, CrudRepositories
and MessagingTemplates
.
The initial implementation of these constructs does not aim to be complete, but it includes the building blocks to provide more features that can be iteratively added.
The PR: #1089 (under review)
Includes a new structure for Spring Boot related artifacts following Spring and Spring Boot naming guidelines.
It also includes basic implementations for the Templates mentioned before and test to demonstrate their usage. This PR allows us to write documentation targeting Spring Boot users, while we have time to refine the implementation details.
The PubSub, Statestore and Binding APIs are used to implement functionality exposed by the Spring interfaces and highlights mismatches in support of different features by different Dapr components. The initial PR covers PostgreSQL and MySQL to avoid using the deprecated Query API.
Artur created this issue too: #1088 which covers part of what the PR under review includes.