-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix 2nd bug in CHASM activity schedule-to-close timer task validation #8723
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
Conversation
| } | ||
|
|
||
| deadline := a.ScheduledTime.AsTime().Add(scheduleToClose) | ||
| return ctx.Now(a).Add(retryInterval).Before(deadline), retryInterval, nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The corresponding workflow activity implementation is https://github.com/temporalio/temporal/blob/main/service/history/workflow/retry.go#L116-L118
8eab8d6 to
23118cf
Compare
tests/standalone_activity_test.go
Outdated
| require.Error(t, err) | ||
| } | ||
|
|
||
| func (s *standaloneActivityTestSuite) Test_RetryWithoutScheduleToCloseTimeout() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| func (s *standaloneActivityTestSuite) Test_RetryWithoutScheduleToCloseTimeout() { | |
| func (s *standaloneActivityTestSuite) TestRetryWithoutScheduleToCloseTimeout() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, got rid of the underscore in Test_ here and in my other PR.
5714fcf to
acec4a6
Compare
333da11 to
4325002
Compare
acec4a6 to
c9f8b34
Compare
c9f8b34 to
81b2516
Compare
81b2516 to
c8e5800
Compare
The test expects a timeout for activity that is started but not completed. But the fix in #8723 ensures that we do schedule retries even when `schedule-to-close` is not set. So, add a retry policy that only permits one attempt.
The test expects a timeout for activity that is started but not completed. But the fix in #8723 ensures that we do schedule retries even when `schedule-to-close` is not set. So, add a retry policy that only permits one attempt.
What changed?
Bug fix: with schedule-to-close timeout not set by the caller, we were not scheduling retries
Why?
Required for CHASM activity correctness (e.g. standalone activity)
How did you test it?
Note
Allow activity retries when
ScheduleToCloseTimeoutis unset and add tests validating retry and schedule-to-close handling.hasEnoughTimeForRetryinchasm/lib/activity/activity.goto allow retries whenScheduleToCloseTimeoutis unset (0), using computedretryInterval; refactor to use localscheduleToClosebefore calculating deadline.TestRetryWithoutScheduleToCloseTimeoutensuring retries are scheduled without a schedule-to-close timeout.Test_ScheduleToCloseTimeout_WithRetryand validate timeout behavior.Written by Cursor Bugbot for commit c8e5800. This will update automatically on new commits. Configure here.