You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mutable state changes for unpausing a single workflow. (#8674)
## What changed?
- Recording unpause event
- Regenerating workflow and activity tasks
- Made EVENT_TYPE_WORKFLOW_EXECUTION_UNPAUSED a buffered event (since
pause event is buffered)
- Added unit tests (Functional tests are added along with the API
changes)
## Why?
This is needed to implement pause/unpause operation APIs.
## How did you test it?
- [x] built
- [ ] run locally and tested manually
- [ ] covered by existing tests
- [x] added new unit test(s)
- [ ] added new functional test(s)
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Introduce workflow "unpaused" history event end-to-end, buffer
pause/unpause consistently, and reschedule activities on unpause with
tests.
>
> - **History Events**:
> - Add `CreateWorkflowExecutionUnpausedEvent` and
`HistoryBuilder.AddWorkflowExecutionUnpausedEvent`.
> - Update event buffering: buffer both `WORKFLOW_EXECUTION_PAUSED` and
`WORKFLOW_EXECUTION_UNPAUSED` in `historybuilder/event_store.go`.
> - **Mutable State**:
> - Add `AddWorkflowExecutionUnpausedEvent` and
`ApplyWorkflowExecutionUnpausedEvent` to transition to `RUNNING`, clear
`PauseInfo`, bump activity stamps, and (re)generate activity tasks as
needed.
> - Extend `interfaces.MutableState` + mocks with unpause methods.
> - Rebuilder applies `WORKFLOW_EXECUTION_UNPAUSED` events.
> - **Logging/Tags**:
> - Add `tag.WorkflowActionWorkflowUnpaused`.
> - **Tests**:
> - Add unit tests for pause/unpause flow, stamps, and buffering
behavior; adjust existing buffering test expectations.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
f139027. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
---------
Co-authored-by: Sean Kane <[email protected]>
// ApplyWorkflowExecutionUnpausedEvent applies the unpaused event to the mutable state. It updates the workflow execution status to running and clears the pause info.
0 commit comments