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

Allow client to suggest delay until next retry #1319

Merged
merged 10 commits into from
Jan 23, 2024
Merged

Allow client to suggest delay until next retry #1319

merged 10 commits into from
Jan 23, 2024

Conversation

ast2023
Copy link
Contributor

@ast2023 ast2023 commented Dec 8, 2023

What was changed

A new error type was introduced, which allows requesting next retry interval from an activity.

Why?

Allow developers to adjust retry interval on specific errors.

Checklist

  1. Closes 1858

  2. How was this tested:
    Created a workflow/activity. Activity would return the new error with the retry interval. Verified that the value was received by the server.

  3. Any docs updates needed?
    The new error should be documented in the developer's guide.

@ast2023 ast2023 requested a review from a team as a code owner December 8, 2023 22:19
temporal/error.go Outdated Show resolved Hide resolved
internal/error.go Outdated Show resolved Hide resolved
internal/error.go Outdated Show resolved Hide resolved
internal/error.go Outdated Show resolved Hide resolved
internal/failure_converter.go Outdated Show resolved Hide resolved
temporal/error.go Outdated Show resolved Hide resolved
activity/activity.go Outdated Show resolved Hide resolved
activity/activity.go Outdated Show resolved Hide resolved
internal/extra_information.go Outdated Show resolved Hide resolved
activity/activity.go Outdated Show resolved Hide resolved
internal/error.go Outdated Show resolved Hide resolved
internal/error.go Outdated Show resolved Hide resolved
temporal/error.go Outdated Show resolved Hide resolved
internal/error.go Outdated Show resolved Hide resolved
activity/activity.go Outdated Show resolved Hide resolved
internal/activity.go Outdated Show resolved Hide resolved
activity/activity.go Outdated Show resolved Hide resolved
internal/activity.go Outdated Show resolved Hide resolved
internal/activity.go Outdated Show resolved Hide resolved
internal/error.go Outdated Show resolved Hide resolved
temporal/error.go Outdated Show resolved Hide resolved
@ast2023 ast2023 force-pushed the sasha/OSS-1858 branch 3 times, most recently from d5e4f14 to fcf630e Compare January 9, 2024 00:03
temporal/error.go Outdated Show resolved Hide resolved
Copy link
Member

@cretz cretz left a comment

Choose a reason for hiding this comment

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

Looking good, I love the simplicity. Some minor things.

temporal/error.go Outdated Show resolved Hide resolved
internal/error.go Outdated Show resolved Hide resolved
internal/internal_task_pollers.go Outdated Show resolved Hide resolved
internal/error.go Show resolved Hide resolved
internal/error.go Outdated Show resolved Hide resolved
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.

LGTM, I'll wait for @cretz or @bergundy to review as well before merging

Copy link
Member

@cretz cretz left a comment

Choose a reason for hiding this comment

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

Sorry, only one minor thing about proto nil and I can mark approved

@@ -523,6 +548,8 @@ func (e *ApplicationError) Unwrap() error {
return e.cause
}

func (e *ApplicationError) NextRetryDelay() time.Duration { return e.nextRetryDelay }
Copy link
Member

Choose a reason for hiding this comment

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

Should have godoc, but not that big of a deal.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am failing to find documentation which will explain NextRetryDelay better than the name of the method.

Copy link
Member

Choose a reason for hiding this comment

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

Godoc rules often stipulate Godoc for all exported items regardless of obviousness (yes that means usually if redundant). Granted we don't have such a strict requirement, but we usually follow it.

internal/failure_converter.go Outdated Show resolved Hide resolved
@ast2023 ast2023 merged commit 94a5f5f into master Jan 23, 2024
13 checks passed
@ast2023 ast2023 deleted the sasha/OSS-1858 branch January 23, 2024 00: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.

5 participants