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

Add possibility to remove the RetryPolicy from the workflow context without overriding the other existing ActivityOptions in it #1417

Open
kittinanasi opened this issue Jan 21, 2025 · 1 comment

Comments

@kittinanasi
Copy link

kittinanasi commented Jan 21, 2025

Is your feature request related to a problem? Please describe.
I set the ActivityOptions including a non-nil RetryOptions configuration at the beginning of my workflow, these ActivityOptions are used by all activities in my workflow by default. I would like to override the RetryPolicy to nil for just one activity in that workflow without overriding the other ActivityOptions configurations.

Proposed Solution
If the existing WithRetryPolicy() function syntaxes were changed to accept a pointer receiver RetryPolicy as a parameter, than that function could be called with a nil parameter value to solve the above problem.

Current syntax:

func WithRetryPolicy(ctx Context, retryPolicy RetryPolicy) Context {
	return internal.WithRetryPolicy(ctx, retryPolicy)
}

Suggested syntax:

func WithRetryPolicy(ctx Context, retryPolicy *RetryPolicy) Context {
	return internal.WithRetryPolicy(ctx, retryPolicy)
}
@kittinanasi
Copy link
Author

I created a pull request for this: #1418

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

No branches or pull requests

1 participant