Skip to content

Drop reset_attempts and reset_heartbeat from UnpauseActivityExecution - #11393

Draft
dandavison wants to merge 3 commits into
mainfrom
simplify-activity-unpause-wfa
Draft

Drop reset_attempts and reset_heartbeat from UnpauseActivityExecution#11393
dandavison wants to merge 3 commits into
mainfrom
simplify-activity-unpause-wfa

Conversation

@dandavison

Copy link
Copy Markdown
Contributor

What changed?

Describe what has changed in this PR.

Why?

See API change temporalio/api#846

How did you test it?

  • covered by existing tests

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/...
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.

1 participant