Honor start_delay on pause/unpause for standalone activities#10768
Open
fretz12 wants to merge 2 commits into
Open
Honor start_delay on pause/unpause for standalone activities#10768fretz12 wants to merge 2 commits into
fretz12 wants to merge 2 commits into
Conversation
4748df2 to
b1d3d85
Compare
eb8bd4a to
c1f8606
Compare
b1d3d85 to
0e74b39
Compare
d75f595 to
0ce42ee
Compare
Pre-dispatch unpause now lifts the next dispatch to scheduleTime + start_delay instead of firing at unpause time. A new respectStartDelay helper is shared across UpdateActivityExecutionOptions, handleReset, and unpause. Also tightens handleReset's RestoreOriginalOptions block: the start_delay value restore (and dispatch clamp) now gate on FirstAttemptStartedTime instead of Status, so retry-backoff resets no longer surface a stale start_delay value in Describe.
0e74b39 to
7e132e7
Compare
0ce42ee to
1d632a3
Compare
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?
Pre-dispatch unpause for standalone activities now lifts the next dispatch to
scheduleTime + start_delayinstead of firing at unpause time, by wiring the existingrespectStartDelayhelper into theunpausepath (one line). This means:start_delayis not re-applied (no-op once the activity has been picked up).ScheduleToStartTimeoutre-emitted on unpause is anchored to the new dispatch target, not to "now."ScheduleToClosebehavior during pause is intentionally unchanged: the deadline stays active and can fire while paused, matching the existingScheduleToCloseTimeoutWhilePausedtest.Also annotates the time-constants across the
TestStartDelaysubtests with the math/intent behind each.Why?
The
start_delaycountdown is wall-clock and keeps ticking through pause; on unpause the activity should dispatch at the originalscheduleTime + start_delay(or immediately if that target is already past). Before this change, unpause in the delay window dispatched at "now," so a user could accidentally shrink the delay by pausing and unpausing.How did you test it?