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

[#1727] Use default RetryOptions for LocalActivities when not set #2257

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ghaskins
Copy link

@ghaskins ghaskins commented Oct 7, 2024

Setting setMaximumAttempts=0 (or not setting any value, default = 0) for local activities should make the activity retry forever.

This is currently broken because the logic treats both no policy set and a policy with all default values (including MaxiumAttempts = 0) as abort conditional. What should happen (at least according the doc and to align with normal activities) is that no policy set should be processed according to the default values of the retry policy, which includes unlimited retries when the MaxiumAttempts = 0.

Fixes #1727

…ot set or setMaximumAttempts(0)

Setting setMaximumAttempts=0 (or not setting any value, default = 0) for local activities should make the activity retry forever.

This is currently broken because the logic treats both no policy set and a policy with all default values (including MaxiumAttempts = 0)
as abort conditional.  What should happen (at least according the doc and to align with normal activities) is that no policy set should
be processed according to the default values of the retry policy, which includes unlimited retries when the MaxiumAttempts = 0.

Fixes temporalio#1727

Signed-off-by: Greg Haskins <[email protected]>
@ghaskins ghaskins requested a review from a team as a code owner October 7, 2024 17:08
@Quinn-With-Two-Ns
Copy link
Contributor

Hey @ghaskins I know we discussed this a bit offline, but if we do want to change this we should add some tests (like the one in the reproduction you provided) that this change fixes.

@ghaskins
Copy link
Author

@Quinn-With-Two-Ns ok, I can take a stab at that. Normally I would have already submitted them but I was having trouble with the UT framework on my mac (most tests seem to be failing even with unmodified code). I'll see if I can sort that out.

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.

inconsistency on MaximumAttempts attribute between local activities and "normal" activities
2 participants