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

Store the retry policy with the DurablePromise. #123

Merged
merged 1 commit into from
Jun 12, 2024

Conversation

avillega
Copy link
Contributor

With this change we start storing the retry policy with the DurablePromise.
This enables the recovery path to use the retry policy that was set when executing the function originally instead of the default retry policy.

With this change we start storing the retry policy with
the DurablePromise. This enables the invocation to use the
retry policy that was set when executing the function originally
instead of the default retry policy in the recovery path.
@avillega avillega requested a review from dfarr June 12, 2024 20:18
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 65.00000% with 14 lines in your changes missing coverage. Please review.

Project coverage is 82.70%. Comparing base (6160891) to head (4d20a70).

Files Patch % Lines
lib/core/retry.ts 55.55% 12 Missing ⚠️
lib/core/encoders/json.ts 75.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #123      +/-   ##
==========================================
- Coverage   83.23%   82.70%   -0.54%     
==========================================
  Files          22       22              
  Lines        1360     1399      +39     
  Branches      337      362      +25     
==========================================
+ Hits         1132     1157      +25     
- Misses        228      242      +14     

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

Copy link
Member

@dfarr dfarr left a comment

Choose a reason for hiding this comment

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

Looks good! Other than the retry policy are there any other additional options we should store in the params?

@avillega
Copy link
Contributor Author

Looks good! Other than the retry policy are there any other additional options we should store in the params?

The only two other params that are not being store are poll (polling frequency) and the encoder. The polling frequency can be stored easily if we wanted to. The encoder might be a bit more complex, I've been thinking in the encoder a bit, and seems a bit tangled that the encoder is part of the invocation, instead of being something more global. I don't see how someone will want a different encoder for each different invocation.

@avillega avillega merged commit cd7d6b7 into main Jun 12, 2024
2 checks passed
@avillega avillega deleted the avillega/store-retry-policy branch June 12, 2024 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants