Drop reset_attempts and reset_heartbeat from UnpauseActivityExecution - #11393
Draft
dandavison wants to merge 3 commits into
Draft
Drop reset_attempts and reset_heartbeat from UnpauseActivityExecution#11393dandavison wants to merge 3 commits into
reset_attempts and reset_heartbeat from UnpauseActivityExecution#11393dandavison wants to merge 3 commits into
Conversation
Unpause resumes an activity; it should not also mutate the attempt counter or discard the heartbeat checkpoint. An operator wanting either would look for it on Reset, which offers both. Ship the simple API first. Picks up temporalio/api-go simplify-activity-unpause, which removes the two fields from UnpauseActivityExecutionRequest. The deprecated UnpauseActivity keeps them, so TestActivityPauseApi_WithReset now runs only against that API. Removing the reset_attempts branch also fixes a defect it carried: unpauseDispatchTime skipped dispatchTimeForRetry when the flag was set, so an operator could defeat a retry backoff by pausing and unpausing. go build ./... && go vet -tags test_dep ./... && go test ./chasm/lib/activity/...
Drops reset_attempts and reset_heartbeat from the deprecated UnpauseActivity and from the unpause batch operation, so unpause means the same thing on every surface: it resumes an activity, and Reset is the operation that restarts it as if on its first attempt. workflow.UnpauseActivity loses both parameters with them. TestActivityPauseApi_WithReset goes too: no unpause API can restart attempts now, so the case it covered no longer exists. ActivityInfo.reset_heartbeats stays: it is written by the Reset path, which keeps its own reset_heartbeat flag. go build ./... && go vet -tags test_dep ./... && go test ./chasm/lib/activity/... ./service/history/api/unpauseactivity/... ./service/worker/batcher/...
This reverts commit 8295082.
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?
Describe what has changed in this PR.
Why?
See API change temporalio/api#846
How did you test it?