Skip to content

Adding remote endpoint request from inside activity with retry #1388

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
May 31, 2025

Conversation

salaboy
Copy link
Collaborator

@salaboy salaboy commented May 27, 2025

Description

Adding Spring Boot workflow example containing a remote request to a REST endpoint with retry policies

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: #1386

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 May 27, 2025 11:34
@salaboy salaboy marked this pull request as draft May 27, 2025 11:34
@salaboy salaboy force-pushed the 1386-http-endpoint-from-workflow branch from bc98433 to 9a4df89 Compare May 27, 2025 11:37
@salaboy salaboy force-pushed the 1386-http-endpoint-from-workflow branch from c3b1e1d to 3922b66 Compare May 28, 2025 14:26
@salaboy salaboy marked this pull request as ready for review May 28, 2025 14:26
Copy link
Contributor

@siri-varma siri-varma left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks a lot for the great examples

@artur-ciocanu
Copy link
Contributor

@salaboy love the examples, could you please take a look at the failing unit tests. Thank you.

salaboy and others added 9 commits May 29, 2025 10:06
Signed-off-by: salaboy <Salaboy@gmail.com>
Signed-off-by: salaboy <Salaboy@gmail.com>
Signed-off-by: salaboy <Salaboy@gmail.com>
* chore: New task execution task id test

test how taskExecutionTaskId can be used for idempotency

Signed-off-by: Javier Aliaga <javier@diagrid.io>

* chore: Clean up not used files

Signed-off-by: Javier Aliaga <javier@diagrid.io>

* docs: Task execution keys

Signed-off-by: Javier Aliaga <javier@diagrid.io>

* test: Modify unit tests

Signed-off-by: Javier Aliaga <javier@diagrid.io>

* Remove new lines

Signed-off-by: artur-ciocanu <artur.ciocanu@gmail.com>

---------

Signed-off-by: Javier Aliaga <javier@diagrid.io>
Signed-off-by: artur-ciocanu <artur.ciocanu@gmail.com>
Co-authored-by: Cassie Coyle <cassie.i.coyle@gmail.com>
Co-authored-by: artur-ciocanu <artur.ciocanu@gmail.com>
Signed-off-by: salaboy <Salaboy@gmail.com>
This reverts commit 949584f.

Signed-off-by: Javier Aliaga <javier@diagrid.io>
Signed-off-by: salaboy <Salaboy@gmail.com>
Signed-off-by: Cassandra Coyle <cassie@diagrid.io>
Signed-off-by: salaboy <Salaboy@gmail.com>
Signed-off-by: salaboy <Salaboy@gmail.com>
* Update CONTRIBUTING.md

Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>

* Fix spring

Signed-off-by: siri-varma <siri.varma@outlook.com>

* Add context

Signed-off-by: siri-varma <siri.varma@outlook.com>

* Phase 1

Signed-off-by: siri-varma <siri.varma@outlook.com>

* Fix things

Signed-off-by: siri-varma <siri.varma@outlook.com>

* Fix things

Signed-off-by: siri-varma <siri.varma@outlook.com>

* Fix spring

Signed-off-by: siri-varma <siri.varma@outlook.com>

* Add context

Signed-off-by: siri-varma <siri.varma@outlook.com>

* Phase 1

Signed-off-by: siri-varma <siri.varma@outlook.com>

* Fix things

Signed-off-by: siri-varma <siri.varma@outlook.com>

* Fix things

Signed-off-by: siri-varma <siri.varma@outlook.com>

* move version

Signed-off-by: sirivarma <siri.varma@outlook.com>

* Fix pom

Signed-off-by: sirivarma <siri.varma@outlook.com>

* change version

Signed-off-by: sirivarma <siri.varma@outlook.com>

* remove unused

Signed-off-by: siri-varma <siri.varma@outlook.com>

* Address comments

Signed-off-by: siri-varma <siri.varma@outlook.com>

* Fix test

Signed-off-by: siri-varma <siri.varma@outlook.com>

* Fix test

Signed-off-by: siri-varma <siri.varma@outlook.com>

* Fix things

Signed-off-by: sirivarma <siri.varma@outlook.com>

---------

Signed-off-by: Siri Varma Vegiraju <siri.varma@outlook.com>
Signed-off-by: siri-varma <siri.varma@outlook.com>
Signed-off-by: sirivarma <siri.varma@outlook.com>
Co-authored-by: artur-ciocanu <artur.ciocanu@gmail.com>
Signed-off-by: salaboy <Salaboy@gmail.com>
Signed-off-by: salaboy <Salaboy@gmail.com>
@salaboy salaboy force-pushed the 1386-http-endpoint-from-workflow branch from 4388aeb to 35e7b3a Compare May 29, 2025 09:06
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 love the example, I have just one tiny comment regarding RestTemplate, as far as I know RestClient is the recommended API since RestTemplate has been deprecated.

@artur-ciocanu
Copy link
Contributor

@salaboy could you please check my comment regarding RestTemplate, thank you!

@salaboy
Copy link
Collaborator Author

salaboy commented May 30, 2025

@artur-ciocanu I want to cover RestTemplate for now.. we can check with RestClient later.. RestClient is not as widely adopted as RestTemplate

@salaboy
Copy link
Collaborator Author

salaboy commented May 30, 2025

@salaboy love the examples, could you please take a look at the failing unit tests. Thank you.

All green now

@dapr-bot dapr-bot merged commit 447e2bf into dapr:master May 31, 2025
9 checks passed
Copy link

codecov bot commented May 31, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.34%. Comparing base (d759c53) to head (d6c6e42).
Report is 162 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1388      +/-   ##
============================================
+ Coverage     76.91%   78.34%   +1.42%     
- Complexity     1592     1847     +255     
============================================
  Files           145      226      +81     
  Lines          4843     5707     +864     
  Branches        562      601      +39     
============================================
+ Hits           3725     4471     +746     
- Misses          821      916      +95     
- Partials        297      320      +23     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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 Example for Workflow calling an HTTP endpoint
6 participants