-
Notifications
You must be signed in to change notification settings - Fork 217
Spring boot workflow patterns examples with mechanical markdown and tests #1377
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
base: master
Are you sure you want to change the base?
Conversation
4008dcd
to
cacbe04
Compare
@dapr/maintainers-java-sdk please review and add suggestions if you have them. |
e275c5f
to
abf72c4
Compare
* Run Fan Out/in Demo Workflow | ||
* @return confirmation that the workflow instance was created for the workflow pattern faninout | ||
*/ | ||
@PostMapping("wfp/fanoutin") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you pull out the different patterns here to their respective folder? It will be cleaner to users to have 1 clear example per pattern rather than a shared file used by all examples.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The examples are all in different folders, this is just the access point. I can create separate applications per pattern (as it is done in the Dapr University) but that sounds like an overkill for the samples app
@@ -0,0 +1,40 @@ | |||
/* | |||
* Copyright 2023 The Dapr Authors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: can you rename this directory from fanoutin
to faninout
since that is the name of the example from here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cicoyle the example is fanning out tasks to then do a fan-in.. I think the original example name was wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is also aligned with how the Dapr University is doing it: https://github.com/dapr/quickstarts/tree/master/tutorials/workflow/csharp/fan-out-fan-in
@@ -0,0 +1,51 @@ | |||
/* | |||
* Copyright 2023 The Dapr Authors | |||
* Licensed under the Apache License, Version 2.0 (the "License"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same for this filename: fanoutin
-> faninout
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cicoyle the example is fanning out tasks to then do a fan-in.. I think the original example name was wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is also aligned with how the Dapr University is doing it: https://github.com/dapr/quickstarts/tree/master/tutorials/workflow/csharp/fan-out-fan-in
|
||
assertEquals(5, cleanUpLog.getCleanUpTimes()); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you delete this if its an empty file: spring-boot-examples/workflows/src/test/resources/application.properties
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is something that we do in spring applications, if you want to customize the app configuration, that file needs to be there to accept properties. Instead of deleting it, I will add the spring boot app name to follow what https://start.spring.io/ is doing.
...amples/workflows/src/test/java/io/dapr/springboot/examples/wfp/DaprTestContainersConfig.java
Outdated
Show resolved
Hide resolved
|
||
The Parent workflow looks like this: | ||
|
||
```mermaid |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you mean to put mermaid
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cicoyle yes.. can you please elaborate on the question?
…apr#1361) * feat: Support for GRPC ssl Signed-off-by: Javier Aliaga <[email protected]> * add tests Signed-off-by: Cassandra Coyle <[email protected]> * fix CI Signed-off-by: Cassandra Coyle <[email protected]> * add back else if Signed-off-by: Cassandra Coyle <[email protected]> * channel cleanup Signed-off-by: Cassandra Coyle <[email protected]> * add root ca support Signed-off-by: Cassandra Coyle <[email protected]> * checkstyles Signed-off-by: Cassandra Coyle <[email protected]> * add insecure Signed-off-by: Cassandra Coyle <[email protected]> * fix checkstyles Signed-off-by: Cassandra Coyle <[email protected]> * use InsecureTrustManagerFactory Signed-off-by: Cassandra Coyle <[email protected]> * fix test Signed-off-by: Cassandra Coyle <[email protected]> --------- Signed-off-by: Javier Aliaga <[email protected]> Signed-off-by: Cassandra Coyle <[email protected]> Co-authored-by: Javier Aliaga <[email protected]> Signed-off-by: salaboy <[email protected]>
Signed-off-by: salaboy <[email protected]>
Signed-off-by: salaboy <[email protected]>
Signed-off-by: salaboy <[email protected]>
Signed-off-by: salaboy <[email protected]>
Signed-off-by: salaboy <[email protected]>
… Workflows (dapr#1343) * Add coverage for some properties (dapr#1297) Signed-off-by: sirivarma <[email protected]> * Make the DAPR version being used consistent across all tests (dapr#1299) Signed-off-by: sirivarma <[email protected]> * Separate Dapr constants from IT container constants (dapr#1315) Signed-off-by: Artur Ciocanu <[email protected]> Co-authored-by: Artur Ciocanu <[email protected]> Signed-off-by: sirivarma <[email protected]> * Use Java Bean for connection details and add more tests (dapr#1317) * Use Java Bean for connection details and add more tests Signed-off-by: Artur Ciocanu <[email protected]> * Simplify mock setup Signed-off-by: Artur Ciocanu <[email protected]> * Adding even more tests for test coverage Signed-off-by: Artur Ciocanu <[email protected]> --------- Signed-off-by: Artur Ciocanu <[email protected]> Co-authored-by: Artur Ciocanu <[email protected]> Co-authored-by: Cassie Coyle <[email protected]> Signed-off-by: sirivarma <[email protected]> * Update CONTRIBUTING.md Signed-off-by: Siri Varma Vegiraju <[email protected]> Signed-off-by: sirivarma <[email protected]> * Bump codecov/codecov-action from 5.4.0 to 5.4.2 (dapr#1318) Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 5.4.0 to 5.4.2. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](codecov/codecov-action@v5.4.0...v5.4.2) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-version: 5.4.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Cassie Coyle <[email protected]> Co-authored-by: Dapr Bot <[email protected]> Signed-off-by: sirivarma <[email protected]> * Fix URL building logic (dapr#1320) * Fix URL building logic Signed-off-by: Artur Ciocanu <[email protected]> * Add test for query params Signed-off-by: Artur Ciocanu <[email protected]> * Fix the assertion in the test Signed-off-by: Artur Ciocanu <[email protected]> * Adjust the tests Signed-off-by: Artur Ciocanu <[email protected]> * Remove uneeded changes from IT test Signed-off-by: Artur Ciocanu <[email protected]> * Revert some unintended changes Signed-off-by: Artur Ciocanu <[email protected]> * Simplify the testing a little bit Signed-off-by: Artur Ciocanu <[email protected]> * Adjust the test to use ServerRequest Signed-off-by: Artur Ciocanu <[email protected]> * Test removing things from method invoke controller Signed-off-by: Artur Ciocanu <[email protected]> * Add query param encoding test Signed-off-by: Artur Ciocanu <[email protected]> * Revert some unintended changes Signed-off-by: Artur Ciocanu <[email protected]> * Some tiny styles Signed-off-by: Artur Ciocanu <[email protected]> --------- Signed-off-by: Artur Ciocanu <[email protected]> Co-authored-by: Artur Ciocanu <[email protected]> Signed-off-by: sirivarma <[email protected]> * Generate updated javadocs for 1.14.1 Signed-off-by: Dapr Bot <[email protected]> Signed-off-by: sirivarma <[email protected]> * Add Conversation AI to Java SDK (dapr#1235) * Conversation first commit Signed-off-by: Siri Varma Vegiraju <[email protected]> Signed-off-by: sirivarma <[email protected]> Signed-off-by: siri-varma <[email protected]> * Add unit tests Signed-off-by: sirivarma <[email protected]> Signed-off-by: siri-varma <[email protected]> * change ai to conv Signed-off-by: sirivarma <[email protected]> Signed-off-by: siri-varma <[email protected]> * Move to single module Signed-off-by: sirivarma <[email protected]> Signed-off-by: siri-varma <[email protected]> * Remove module Signed-off-by: sirivarma <[email protected]> Signed-off-by: siri-varma <[email protected]> * Add Integration tests Signed-off-by: siri-varma <[email protected]> * Update sdk-tests/src/test/java/io/dapr/it/testcontainers/DaprConversationIT.java Co-authored-by: Cassie Coyle <[email protected]> Signed-off-by: Siri Varma Vegiraju <[email protected]> Signed-off-by: siri-varma <[email protected]> * Fix things Signed-off-by: siri-varma <[email protected]> * Address comments Signed-off-by: siri-varma <[email protected]> * Import tag Signed-off-by: siri-varma <[email protected]> * Address comments Signed-off-by: siri-varma <[email protected]> * Make common config Signed-off-by: siri-varma <[email protected]> * Address comments Signed-off-by: siri-varma <[email protected]> * fix constant Signed-off-by: siri-varma <[email protected]> * fix constant Signed-off-by: siri-varma <[email protected]> * fix constant Signed-off-by: siri-varma <[email protected]> * fix s Signed-off-by: siri-varma <[email protected]> * Fix things Signed-off-by: siri-varma <[email protected]> * Fix things Signed-off-by: siri-varma <[email protected]> * Fix things Signed-off-by: siri-varma <[email protected]> * Make common config Signed-off-by: siri-varma <[email protected]> * Update README.md Signed-off-by: Siri Varma Vegiraju <[email protected]> * Update README.md Signed-off-by: Siri Varma Vegiraju <[email protected]> --------- Signed-off-by: Siri Varma Vegiraju <[email protected]> Signed-off-by: sirivarma <[email protected]> Signed-off-by: siri-varma <[email protected]> Signed-off-by: Siri Varma Vegiraju <[email protected]> Co-authored-by: Cassie Coyle <[email protected]> Co-authored-by: Cassie Coyle <[email protected]> Signed-off-by: sirivarma <[email protected]> * Add docs for usage of Jobs SDK (dapr#1323) * Add doc for jobs Signed-off-by: siri-varma <[email protected]> * Add docs for Jobs Signed-off-by: siri-varma <[email protected]> * Apply suggestions from code review Co-authored-by: Cassie Coyle <[email protected]> Signed-off-by: Siri Varma Vegiraju <[email protected]> --------- Signed-off-by: siri-varma <[email protected]> Signed-off-by: Siri Varma Vegiraju <[email protected]> Co-authored-by: artur-ciocanu <[email protected]> Co-authored-by: Cassie Coyle <[email protected]> Signed-off-by: sirivarma <[email protected]> * Use dapr/durabletask-java (dapr#1336) * microsoft durabletask-java -> dapr durabletask-java Signed-off-by: Cassandra Coyle <[email protected]> * update another ref Signed-off-by: Cassandra Coyle <[email protected]> * 1.5.2 release Signed-off-by: Cassandra Coyle <[email protected]> * fix import order Signed-off-by: Cassandra Coyle <[email protected]> * Sdk new changes Signed-off-by: siri-varma <[email protected]> * Refine workflows Signed-off-by: siri-varma <[email protected]> * add ; Signed-off-by: Cassandra Coyle <[email protected]> * rm try Signed-off-by: Cassandra Coyle <[email protected]> --------- Signed-off-by: Cassandra Coyle <[email protected]> Signed-off-by: siri-varma <[email protected]> Co-authored-by: siri-varma <[email protected]> Signed-off-by: sirivarma <[email protected]> * Update master version to 1.16.0-SNAPSHOT Signed-off-by: Dapr Bot <[email protected]> Signed-off-by: sirivarma <[email protected]> * Fix NPE Signed-off-by: siri-varma <[email protected]> Signed-off-by: sirivarma <[email protected]> * Fix NPE Signed-off-by: siri-varma <[email protected]> Signed-off-by: sirivarma <[email protected]> * Fix NPE Signed-off-by: siri-varma <[email protected]> Signed-off-by: sirivarma <[email protected]> * Fix NPE Signed-off-by: siri-varma <[email protected]> Signed-off-by: sirivarma <[email protected]> * Fix NPE Signed-off-by: siri-varma <[email protected]> Signed-off-by: sirivarma <[email protected]> * Fix NPE Signed-off-by: siri-varma <[email protected]> Signed-off-by: sirivarma <[email protected]> * Fix things Signed-off-by: siri-varma <[email protected]> Signed-off-by: sirivarma <[email protected]> * Renaming and exposing connection details (dapr#1341) Signed-off-by: Artur Ciocanu <[email protected]> Co-authored-by: Artur Ciocanu <[email protected]> Signed-off-by: sirivarma <[email protected]> * [Master] Fix Vulnerabilities (dapr#1354) * update okio Signed-off-by: Cassandra Coyle <[email protected]> * rm unused dep Signed-off-by: Cassandra Coyle <[email protected]> --------- Signed-off-by: Cassandra Coyle <[email protected]> Signed-off-by: sirivarma <[email protected]> * Feat Add TLS & mTLS support for gRPC with root CA and insecure mode (dapr#1361) * feat: Support for GRPC ssl Signed-off-by: Javier Aliaga <[email protected]> * add tests Signed-off-by: Cassandra Coyle <[email protected]> * fix CI Signed-off-by: Cassandra Coyle <[email protected]> * add back else if Signed-off-by: Cassandra Coyle <[email protected]> * channel cleanup Signed-off-by: Cassandra Coyle <[email protected]> * add root ca support Signed-off-by: Cassandra Coyle <[email protected]> * checkstyles Signed-off-by: Cassandra Coyle <[email protected]> * add insecure Signed-off-by: Cassandra Coyle <[email protected]> * fix checkstyles Signed-off-by: Cassandra Coyle <[email protected]> * use InsecureTrustManagerFactory Signed-off-by: Cassandra Coyle <[email protected]> * fix test Signed-off-by: Cassandra Coyle <[email protected]> --------- Signed-off-by: Javier Aliaga <[email protected]> Signed-off-by: Cassandra Coyle <[email protected]> Co-authored-by: Javier Aliaga <[email protected]> Signed-off-by: sirivarma <[email protected]> * Address comments Signed-off-by: siri-varma <[email protected]> Signed-off-by: sirivarma <[email protected]> * Fix things Signed-off-by: siri-varma <[email protected]> Signed-off-by: sirivarma <[email protected]> * Fix things Signed-off-by: siri-varma <[email protected]> Signed-off-by: sirivarma <[email protected]> --------- Signed-off-by: sirivarma <[email protected]> Signed-off-by: Artur Ciocanu <[email protected]> Signed-off-by: Siri Varma Vegiraju <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: Dapr Bot <[email protected]> Signed-off-by: Siri Varma Vegiraju <[email protected]> Signed-off-by: siri-varma <[email protected]> Signed-off-by: Cassandra Coyle <[email protected]> Signed-off-by: Javier Aliaga <[email protected]> Co-authored-by: Matheus Cruz <[email protected]> Co-authored-by: artur-ciocanu <[email protected]> Co-authored-by: Artur Ciocanu <[email protected]> Co-authored-by: Cassie Coyle <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Dapr Bot <[email protected]> Co-authored-by: Dapr Bot <[email protected]> Co-authored-by: Cassie Coyle <[email protected]> Co-authored-by: Javier Aliaga <[email protected]> Signed-off-by: salaboy <[email protected]>
Signed-off-by: Cassandra Coyle <[email protected]> Signed-off-by: salaboy <[email protected]>
Signed-off-by: salaboy <[email protected]>
Signed-off-by: salaboy <[email protected]>
Signed-off-by: salaboy <[email protected]>
Signed-off-by: salaboy <[email protected]>
8374edf
to
aa7e980
Compare
@dapr/maintainers-java-sdk all comments addressed, please re review |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1377 +/- ##
============================================
+ Coverage 76.91% 78.12% +1.21%
- Complexity 1592 1827 +235
============================================
Files 145 221 +76
Lines 4843 5633 +790
Branches 562 600 +38
============================================
+ Hits 3725 4401 +676
- Misses 821 913 +92
- Partials 297 319 +22 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Description
Adding separate module for Workflow Patterns
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: #1344
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list: