Skip to content
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

Adding producer and consumer app examples for Spring Boot integration #1208

Merged
merged 42 commits into from
Mar 1, 2025

Conversation

salaboy
Copy link
Contributor

@salaboy salaboy commented Feb 4, 2025

Description

This PR adds two Spring Boot application examples as part of a new directory called spring-boot-examples to differentiate from the plain Java examples provided in this repo.
This tests uses Testcontainers and the dapr-spring modules.

Issue reference

We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.

Please reference the issue this PR will close: #1207

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests
  • Extended the documentation

@salaboy salaboy requested review from a team as code owners February 4, 2025 10:08
@salaboy
Copy link
Contributor Author

salaboy commented Feb 4, 2025

@artur-ciocanu @artursouza @cicoyle recommendations are more than welcome on these examples.. I will add a README.md to this, but I appreciate code reviews and suggestions to get this merged ASAP

@salaboy
Copy link
Contributor Author

salaboy commented Feb 5, 2025

This PR depends on: #1192 for the actor runtime connections

@salaboy salaboy force-pushed the 1207-sb-examples branch 2 times, most recently from 42a423d to abbdf7c Compare February 6, 2025 09:33
@salaboy salaboy force-pushed the 1207-sb-examples branch 7 times, most recently from 2c47a2b to c52312a Compare February 11, 2025 04:13
Copy link

There was an error handling pipeline event f3c3e364-6449-4327-8949-b4bcc2287e1c.

Copy link

There was an error handling pipeline event e2ad4049-1f9c-43b5-9730-d9968016868d.

Copy link

There was an error handling pipeline event bfb343e8-cca5-46c1-932c-b2d0a739308e.

@salaboy
Copy link
Contributor Author

salaboy commented Feb 11, 2025

@artursouza I've updated the tutorial to use a local registry, so we don't need to create container images and push containers to the dapr registry.

@salaboy salaboy requested a review from artursouza February 11, 2025 06:48
@salaboy
Copy link
Contributor Author

salaboy commented Feb 12, 2025

@artursouza this is ready for reviewing and merging.. I am not sure if there are more things to update on the release scripts.. can you please check?
Now there is a flaky test completely unrelated to this code.

artur-ciocanu
artur-ciocanu previously approved these changes Feb 12, 2025
Copy link
Contributor

@artur-ciocanu artur-ciocanu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@salaboy great job! I have left comments, but those are mostly about formatting, I think it makes sense to add Checkstyle and fix all the issues. The POM files are also weirdly formatted, ideally it should use the same convention as in the other modules.

My biggest concern/question is around usage of DockerClient, to be honest I am not sure why it was required and if there is a way to have a simpler setup.

salaboy and others added 11 commits February 25, 2025 08:28
Co-authored-by: Cassie Coyle <cassie.i.coyle@gmail.com>
Signed-off-by: salaboy <Salaboy@gmail.com>
Co-authored-by: Cassie Coyle <cassie.i.coyle@gmail.com>
Signed-off-by: salaboy <Salaboy@gmail.com>
Co-authored-by: Cassie Coyle <cassie.i.coyle@gmail.com>
Signed-off-by: salaboy <Salaboy@gmail.com>
Co-authored-by: Cassie Coyle <cassie.i.coyle@gmail.com>
Signed-off-by: salaboy <Salaboy@gmail.com>
…boot/examples/consumer/ConsumerAppTests.java

Co-authored-by: Cassie Coyle <cassie.i.coyle@gmail.com>
Signed-off-by: salaboy <Salaboy@gmail.com>
…boot/examples/producer/TestSubscriberRestController.java

Co-authored-by: Cassie Coyle <cassie.i.coyle@gmail.com>
Signed-off-by: salaboy <Salaboy@gmail.com>
Signed-off-by: salaboy <Salaboy@gmail.com>
Signed-off-by: salaboy <Salaboy@gmail.com>
Signed-off-by: salaboy <Salaboy@gmail.com>
Signed-off-by: salaboy <Salaboy@gmail.com>
Signed-off-by: salaboy <Salaboy@gmail.com>
@cicoyle
Copy link
Contributor

cicoyle commented Feb 25, 2025

The build is failing to validate examples, specifically for workflows. I'll merge in latest and see if that fixes the issue

cicoyle
cicoyle previously approved these changes Feb 25, 2025
Copy link
Contributor

@cicoyle cicoyle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@salaboy
Copy link
Contributor Author

salaboy commented Feb 26, 2025

I am going to cry.. all tests are green, and the example has automation :)

@artur-ciocanu
Copy link
Contributor

@artursouza could you please take another look and if everything looks good, approve and merge. Thank you!

artursouza
artursouza previously approved these changes Feb 28, 2025
Signed-off-by: Artur Souza <artursouza.ms@outlook.com>
@artursouza artursouza dismissed stale reviews from cicoyle and themself via f293f74 February 28, 2025 23:56
Copy link
Contributor

@artur-ciocanu artur-ciocanu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@artur-ciocanu
Copy link
Contributor

@artursouza the build is 🟢 could you please approve and merge.

@dapr-bot dapr-bot merged commit 5dbeafc into dapr:master Mar 1, 2025
8 checks passed
@artur-ciocanu artur-ciocanu deleted the 1207-sb-examples branch March 1, 2025 04:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Spring Boot examples to SDK that uses Testcontainers and dapr-spring modules
6 participants