Fix 2nd bug in CHASM activity schedule-to-close timer task validation#8723
Merged
dandavison merged 3 commits intostandalone-activityfrom Dec 6, 2025
Merged
Fix 2nd bug in CHASM activity schedule-to-close timer task validation#8723dandavison merged 3 commits intostandalone-activityfrom
dandavison merged 3 commits intostandalone-activityfrom
Conversation
dandavison
commented
Nov 30, 2025
|
|
||
| deadline := a.ScheduledTime.AsTime().Add(scheduleToClose) | ||
| return ctx.Now(a).Add(retryInterval).Before(deadline), retryInterval, nil |
Contributor
Author
There was a problem hiding this comment.
The corresponding workflow activity implementation is https://github.com/temporalio/temporal/blob/main/service/history/workflow/retry.go#L116-L118
8eab8d6 to
23118cf
Compare
bergundy
approved these changes
Dec 1, 2025
tests/standalone_activity_test.go
Outdated
| @@ -709,6 +709,58 @@ func (s *standaloneActivityTestSuite) TestCompletedActivity_CannotTerminate() { | |||
| require.Error(t, err) | |||
| } | |||
|
|
|||
| func (s *standaloneActivityTestSuite) Test_RetryWithoutScheduleToCloseTimeout() { | |||
Member
There was a problem hiding this comment.
Suggested change
| func (s *standaloneActivityTestSuite) Test_RetryWithoutScheduleToCloseTimeout() { | |
| func (s *standaloneActivityTestSuite) TestRetryWithoutScheduleToCloseTimeout() { |
Contributor
Author
There was a problem hiding this comment.
Right, got rid of the underscore in Test_ here and in my other PR.
fretz12
approved these changes
Dec 1, 2025
5714fcf to
acec4a6
Compare
333da11 to
4325002
Compare
acec4a6 to
c9f8b34
Compare
Base automatically changed from
saa-schedule-to-close-bug
to
standalone-activity
December 6, 2025 00:21
c9f8b34 to
81b2516
Compare
81b2516 to
c8e5800
Compare
dandavison
added a commit
that referenced
this pull request
Dec 6, 2025
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.
dandavison
added a commit
that referenced
this pull request
Dec 19, 2025
…#8723) ## 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? - [x] built - [x] added new functional test(s)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.