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

Return last error instead of ctx error #3857

Merged
merged 3 commits into from
Jan 27, 2023

Conversation

pdoerner
Copy link
Contributor

When retrying with context, we will now return the last error returned by the retryable operation instead of the ctx.Err() if the deadline is exceeded or the context is cancelled. If we were not able to get an error in this case (e.g. context was cancelled before attempting a retry), then that ctx.Err() will still be returned.

Fixes #3630

Why?

How did you test it?

Potential risks

Is hotfix candidate?

@pdoerner pdoerner requested a review from a team as a code owner January 26, 2023 23:57
@pdoerner pdoerner requested a review from yycptt January 27, 2023 00:00
Copy link
Member

@yycptt yycptt left a comment

Choose a reason for hiding this comment

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

👍
Plz add a comment re. why we should always return the last error from operation(), if exists, even if it may be context timeout.

@pdoerner pdoerner merged commit 6e732e7 into temporalio:master Jan 27, 2023
@pdoerner pdoerner deleted the return-last-error-context branch January 27, 2023 22:22
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.

Return last error instead of context deadline exceeded
2 participants