Skip to content

Commit

Permalink
Revert "Revert change to default reapply type" (#5956)
Browse files Browse the repository at this point in the history
## What changed?
Change default `ResetReapply` enum value to `ALL_ELIGIBLE`.

## Why?
Reverts #5688, i.e. after this PR we will have the
behavior described in #5360.
This means both signals *and* updates will be reapplied by default
during resets and coinflict resolution, which is the product behavior we
want.

### Explanation
- #5360 attempted to introduce a new proto enum value and start using it
as the default
- However, that is not a valid single-deploy change, since it can cause
a frontend client on the new version to send a value that is unknown to
a history node on the old version.
- Therefore #5688 reverted the change to the default, allowing the new
proto enum value to be introduced to the codebase
- This PR is deployable iff all clusters that we deploy to have #5360
deployed


## How did you test it?
I didn't. Tests were added in the original PR
#5360.

## Potential risks
Could break reset or history conflict resolution.

## Is hotfix candidate?
1.25.1
  • Loading branch information
dandavison authored Sep 25, 2024
1 parent 97d0437 commit 0123ee6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion common/enums/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func SetDefaultContinueAsNewInitiator(f *enumspb.ContinueAsNewInitiator) {

func SetDefaultResetReapplyType(f *enumspb.ResetReapplyType) {
if *f == enumspb.RESET_REAPPLY_TYPE_UNSPECIFIED {
*f = enumspb.RESET_REAPPLY_TYPE_SIGNAL
*f = enumspb.RESET_REAPPLY_TYPE_ALL_ELIGIBLE
}
}

Expand Down
8 changes: 8 additions & 0 deletions tests/reset_workflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,14 @@ func (s *FunctionalSuite) TestResetWorkflowAfterTimeout() {
8 WorkflowExecutionCompleted`, events)
}

func (s *FunctionalSuite) TestResetWorkflow_ExcludeNoneReapplyDefault() {
t := resetTest{
FunctionalSuite: s,
tv: testvars.New(s.T()),
}
t.run()
}

func (s *FunctionalSuite) TestResetWorkflow_ExcludeNoneReapplyAll() {
t := resetTest{
FunctionalSuite: s,
Expand Down
1 change: 0 additions & 1 deletion tests/xdc/history_replication_signals_and_updates_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1015,7 +1015,6 @@ func (c *hrsuTestCluster) resetWorkflow(ctx context.Context, workflowTaskFinishE
WorkflowExecution: c.t.tv.WorkflowExecution(),
Reason: "reset",
WorkflowTaskFinishEventId: workflowTaskFinishEventId,
ResetReapplyType: enumspb.RESET_REAPPLY_TYPE_ALL_ELIGIBLE,
})
c.t.s.NoError(err)
return resp.RunId
Expand Down

0 comments on commit 0123ee6

Please sign in to comment.