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

Added workflow retry policy propagation during continue-as-new and to ContinueAsNewOptions. #1961

Merged
merged 5 commits into from
Jan 3, 2024

Conversation

mfateev
Copy link
Member

@mfateev mfateev commented Dec 29, 2023

What was changed

After this change if a worklfow has RetryOptions configured then they are copied to the continued workflow.

Added RetryOptions to ContinueAsNewOptions to allow overriding them when calling contineu-as-new.

Added WorkflowInfo.getRetryOptions to give access to the options from the worklfow code.

Why?

Currently there is no ability to specify retry options to the next workflow execution when calling continue-as-new.

@mfateev mfateev requested a review from a team as a code owner December 29, 2023 19:15
Copy link
Contributor

@Quinn-With-Two-Ns Quinn-With-Two-Ns left a comment

Choose a reason for hiding this comment

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

Thanks for this,

Technically this is a backwards incompatible change, but we where OK with it in the Go SDK so I see no reason not to allow it here.

@Quinn-With-Two-Ns
Copy link
Contributor

closes #1959

@Quinn-With-Two-Ns
Copy link
Contributor

related #1201

@MatthewHou
Copy link

@mfateev Thank you for the fix! I have tested out your change locally and noticed 2 things:

  1. An empty ContinueAsNewOptions needs to be provided when calling continueAsNew for the default RetryOptions to be copied over. This seems to be related to the null check here. I'm not sure if this the expected behaviour.
  2. The retry attempt count resets to 1 in the continued workflow. I guess this is a server side bug related to this issue?
    Retry Policy should be copied to the continued as new workflow. temporal#5249

@mfateev
Copy link
Member Author

mfateev commented Jan 3, 2024

@MatthewHou

  1. Good catch. I've updated the PR to copy RetryOptions on empty ContinueAsNewOptions.
  2. This is by design, as retries are reset on each continue-as-new. Note that the specific run of a workflow is retried not the whole chain.

@mfateev mfateev merged commit 9174397 into temporalio:master Jan 3, 2024
6 checks passed
@mfateev mfateev deleted the retry-policy branch January 3, 2024 01: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.

None yet

3 participants