Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update-reapply 4: Functional tests of scenarios involving updates and history replication #5595

Merged
merged 11 commits into from
Apr 23, 2024

Conversation

dandavison
Copy link
Contributor

@dandavison dandavison commented Mar 25, 2024

This PR adds functional test coverage for various scenarios involving updates and history event replication:

TestConflictResolutionReappliesUpdates: this test passes without requiring further changes (the necessary work was done in the previous PRs addressing WorkflowReset and reapplying updates).

TestAcceptedUpdateCanBeCompletedAfterFailoverAndFailback, TestUpdateCompletedAfterFailoverCannotBeCompletedAgainAfterFailback: to make these tests pass, this PR modifies update registry mechanics: we now update the registry from mutable state every time we obtain the registry from the workflow context. This is needed because, when we failback to cluster 1 after a failover, cluster 1 already has a populated registry, which must be brought up to date with events in history received from cluster2 (and hence in mutable state).

@alexshtin and I are discussing an alternative solution based on dropping the registry instead of updating it, so a future PR may change the way that the tests introduced here are satisfied.

TestConflictResolutionReappliesUpdatesSameIds: this test fails and is skipped; it will be addressed in the next PR.

Potential risks

If the update registry changes here are incorrect then update could be broken in various ways.

Is hotfix candidate?

No

@dandavison dandavison force-pushed the ndc-conflict-functional-tests branch 2 times, most recently from 5e58033 to e785d10 Compare March 26, 2024 14:14
@dandavison dandavison force-pushed the ndc-conflict-functional-tests-update-reapply branch 2 times, most recently from 3e2e7c0 to 35556c9 Compare March 26, 2024 14:22
@dandavison dandavison marked this pull request as ready for review March 26, 2024 16:31
@dandavison dandavison requested a review from a team as a code owner March 26, 2024 16:31
@dandavison dandavison force-pushed the ndc-conflict-functional-tests-update-reapply branch from d7b3b85 to 0ec0b9e Compare March 28, 2024 17:51
@dandavison dandavison force-pushed the ndc-conflict-functional-tests branch from e785d10 to 0ad39ad Compare March 28, 2024 17:52
@dandavison dandavison force-pushed the ndc-conflict-functional-tests branch from 0ad39ad to 1d87277 Compare April 8, 2024 10:29
@dandavison dandavison force-pushed the ndc-conflict-functional-tests-update-reapply branch 4 times, most recently from 5c433e8 to d0bcf40 Compare April 8, 2024 16:14
@dandavison dandavison force-pushed the ndc-conflict-functional-tests branch from 1d87277 to 8a7751e Compare April 8, 2024 19:23
@dandavison dandavison force-pushed the ndc-conflict-functional-tests-update-reapply branch from d0bcf40 to 782e9fb Compare April 8, 2024 19:24
@dandavison dandavison force-pushed the ndc-conflict-functional-tests branch from 8a7751e to 0dc8396 Compare April 9, 2024 12:20
@dandavison dandavison force-pushed the ndc-conflict-functional-tests-update-reapply branch from 782e9fb to d77900b Compare April 9, 2024 12:22
@dandavison dandavison force-pushed the ndc-conflict-functional-tests branch from 0dc8396 to 58937d1 Compare April 9, 2024 12:37
@dandavison dandavison force-pushed the ndc-conflict-functional-tests-update-reapply branch from d77900b to 9db463d Compare April 9, 2024 12:37
@dandavison dandavison force-pushed the ndc-conflict-functional-tests branch from 58937d1 to 608743c Compare April 9, 2024 13:03
@dandavison dandavison force-pushed the ndc-conflict-functional-tests-update-reapply branch from 9db463d to ccb993d Compare April 9, 2024 13:03
@dandavison dandavison force-pushed the ndc-conflict-functional-tests branch from 608743c to 74be8f7 Compare April 9, 2024 21:01
Base automatically changed from ndc-conflict-functional-tests to main April 10, 2024 12:18
@dandavison dandavison force-pushed the ndc-conflict-functional-tests-update-reapply branch 3 times, most recently from ec91aa5 to b1c5fe5 Compare April 13, 2024 14:27
@dandavison dandavison marked this pull request as draft April 18, 2024 14:20
@dandavison dandavison force-pushed the ndc-conflict-functional-tests-update-reapply branch from 59bb98f to 2446a34 Compare April 18, 2024 15:21
@dandavison dandavison marked this pull request as ready for review April 18, 2024 20:42
@dandavison
Copy link
Contributor Author

I'm looking into the test failures, but feel free to review.

Copy link
Member

@yycptt yycptt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests look awesome!

service/history/workflow/update/registry.go Outdated Show resolved Hide resolved
@dandavison dandavison force-pushed the ndc-conflict-functional-tests-update-reapply branch from 396eb8f to d21786d Compare April 22, 2024 20:24
@dandavison dandavison force-pushed the ndc-conflict-functional-tests-update-reapply branch from d21786d to b89117b Compare April 22, 2024 21:04
@dandavison dandavison force-pushed the ndc-conflict-functional-tests-update-reapply branch 3 times, most recently from 3bceb9a to b4ea111 Compare April 23, 2024 19:10
@dandavison dandavison force-pushed the ndc-conflict-functional-tests-update-reapply branch from b4ea111 to 80bb7b9 Compare April 23, 2024 19:44
@dandavison dandavison enabled auto-merge (squash) April 23, 2024 19:45
@dandavison dandavison merged commit 4ae4cb1 into main Apr 23, 2024
46 checks passed
@dandavison dandavison deleted the ndc-conflict-functional-tests-update-reapply branch April 23, 2024 20:10
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.

None yet

3 participants