Skip to content

Commit

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

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.

- #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

I didn't. Tests were added in the original PR
#5360.

Could break reset or history conflict resolution.

1.25.1
  • Loading branch information
dandavison authored and dnr committed Oct 4, 2024
1 parent be848c8 commit d1e8bcd
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 @@ -219,6 +219,14 @@ func (s *FunctionalSuite) TestResetWorkflow() {
s.Equal(we.RunId, descResp.WorkflowExecutionInfo.GetFirstRunId())
}

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 @@ -935,7 +935,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 d1e8bcd

Please sign in to comment.