Skip to content

Conversation

@dandavison
Copy link
Contributor

@dandavison dandavison commented Nov 30, 2025

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?

  • built
  • added new functional test(s)

Note

Allow activity retries when ScheduleToCloseTimeout is unset and add tests validating retry and schedule-to-close handling.

  • Activity runtime (backend):
    • Update hasEnoughTimeForRetry in chasm/lib/activity/activity.go to allow retries when ScheduleToCloseTimeout is unset (0), using computed retryInterval; refactor to use local scheduleToClose before calculating deadline.
  • Tests:
    • Add TestRetryWithoutScheduleToCloseTimeout ensuring retries are scheduled without a schedule-to-close timeout.
    • Rename/adjust schedule-to-close retry test to Test_ScheduleToCloseTimeout_WithRetry and validate timeout behavior.

Written by Cursor Bugbot for commit c8e5800. This will update automatically on new commits. Configure here.

@dandavison dandavison requested review from a team as code owners November 30, 2025 21:57
}

deadline := a.ScheduledTime.AsTime().Add(scheduleToClose)
return ctx.Now(a).Add(retryInterval).Before(deadline), retryInterval, nil
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@dandavison dandavison force-pushed the saa-schedule-to-close-bug-2 branch from 8eab8d6 to 23118cf Compare November 30, 2025 22:54
require.Error(t, err)
}

func (s *standaloneActivityTestSuite) Test_RetryWithoutScheduleToCloseTimeout() {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
func (s *standaloneActivityTestSuite) Test_RetryWithoutScheduleToCloseTimeout() {
func (s *standaloneActivityTestSuite) TestRetryWithoutScheduleToCloseTimeout() {

Copy link
Contributor Author

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.

@dandavison dandavison force-pushed the saa-schedule-to-close-bug-2 branch from 5714fcf to acec4a6 Compare December 1, 2025 20:28
@dandavison dandavison force-pushed the saa-schedule-to-close-bug branch from 333da11 to 4325002 Compare December 6, 2025 00:11
@dandavison dandavison force-pushed the saa-schedule-to-close-bug-2 branch from acec4a6 to c9f8b34 Compare December 6, 2025 00:13
Base automatically changed from saa-schedule-to-close-bug to standalone-activity December 6, 2025 00:21
@dandavison dandavison force-pushed the saa-schedule-to-close-bug-2 branch from c9f8b34 to 81b2516 Compare December 6, 2025 00:22
@dandavison dandavison force-pushed the saa-schedule-to-close-bug-2 branch from 81b2516 to c8e5800 Compare December 6, 2025 00:24
@dandavison dandavison merged commit 799f496 into standalone-activity Dec 6, 2025
43 of 50 checks passed
@dandavison dandavison deleted the saa-schedule-to-close-bug-2 branch December 6, 2025 00:31
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 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.
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.

4 participants