Files
tasks/tests/ndc/testevents/migration_back_forth.json
Will DuanandGitHub e54aeec8ca Fix migration back and forth local event handler (#5774)
- Fix migration back and forth usecase and add more tests
- fix lint

## What changed?
<!-- Describe what has changed in this PR -->
1. Fix a bug on handling replication back and forth case
2. Add more integration test to test the ^ scenario
## Why?
<!-- Tell your future self why have you made these changes -->
LocalGeneratedEventHandler cannot properly handle force replication
case.
## How did you test it?
<!-- How have you verified this change? Tested locally? Added a unit
test? Checked in staging env? -->
Integration test
## Potential risks
<!-- Assuming the worst case, what can be broken when deploying this
change to production? -->
Feature is gated by a feature flag
## Documentation
<!-- Have you made sure this change doesn't falsify anything currently
stated in `docs/`? If significant
new behavior is added, have you described that in `docs/`? -->
n/a
## Is hotfix candidate?
<!-- Is this PR a hotfix candidate or does it require a notification to
be sent to the broader community? (Yes/No) -->
no.
2024-04-25 18:33:41 +00:00

177 lines
4.7 KiB
JSON

{
"workflow_1": [
[
{
"eventId": "1",
"eventTime": "2024-04-22T00:45:37.993831Z",
"eventType": "EVENT_TYPE_WORKFLOW_EXECUTION_STARTED",
"version": "1",
"taskId": "34603008",
"workflowExecutionStartedEventAttributes": {
"workflowType": {
"name": "workflowType"
},
"taskQueue": {
"name": "taskqueue"
},
"workflowRunTimeout": "1000s",
"workflowTaskTimeout": "1000s",
"firstWorkflowTaskBackoff": "100s"
}
}
],
[
{
"eventId": "2",
"eventTime": "2024-04-22T00:45:37.993839Z",
"eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED",
"version": "1",
"taskId": "34603009",
"workflowTaskScheduledEventAttributes": {
"taskQueue": {
"name": "taskqueue",
"kind": "TASK_QUEUE_KIND_NORMAL"
},
"startToCloseTimeout": "1000s",
"attempt": 1
}
}
],
[
{
"eventId": "3",
"eventTime": "2024-04-22T00:45:37.993842Z",
"eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED",
"version": "1",
"taskId": "34603018",
"workflowTaskStartedEventAttributes": {
"scheduledEventId": "2",
"identity": "identity",
"requestId": "983c3dcc-5261-491b-8e2f-7e3c142cf87a"
}
}
],
[
{
"eventId": "4",
"eventTime": "2024-04-22T00:45:38.993839Z",
"eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED",
"version": "1",
"taskId": "462550534",
"workflowTaskCompletedEventAttributes": {
"scheduledEventId": "2",
"startedEventId": "3",
"identity": "identity"
}
},
{
"eventId": "5",
"eventTime": "2024-04-22T00:45:39.993839Z",
"eventType": "EVENT_TYPE_TIMER_STARTED",
"version": "1",
"taskId": "462555824",
"timerStartedEventAttributes": {
"timerId": "1",
"startToFireTimeout": "360s",
"workflowTaskCompletedEventId": "4"
}
}
],
[
{
"eventId": "6",
"eventTime": "2024-04-22T00:51:48.993839Z",
"eventType": "EVENT_TYPE_TIMER_FIRED",
"version": "2",
"taskId": "462555827",
"timerFiredEventAttributes": {
"timerId": "1",
"startedEventId": "5"
}
},
{
"eventId": "7",
"eventTime": "2024-04-22T00:51:48.993839Z",
"eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED",
"version": "2",
"taskId": "462555828",
"workflowTaskScheduledEventAttributes": {
"taskQueue": {
"name": "taskqueue",
"normalName": "temporal-bench"
},
"startToCloseTimeout": "10s",
"attempt": 1
}
}
],
[
{
"eventId": "8",
"eventTime": "2024-04-22T00:51:49.993839Z",
"eventType": "EVENT_TYPE_WORKFLOW_TASK_STARTED",
"version": "2",
"taskId": "462555828",
"workflowTaskStartedEventAttributes": {
"scheduledEventId": "7",
"identity": "identity",
"requestId": "983c3dcc-5261-491b-8e2f-7e3c142cf87a"
}
}
],
[
{
"eventId": "9",
"eventTime": "2024-04-22T00:51:50.993839Z",
"eventType": "EVENT_TYPE_WORKFLOW_TASK_COMPLETED",
"version": "2",
"taskId": "462555828",
"workflowTaskCompletedEventAttributes": {
"scheduledEventId": "7",
"startedEventId": "8",
"identity": "identity"
}
},
{
"eventId": "10",
"eventTime": "2024-04-22T00:51:50.993839Z",
"eventType": "EVENT_TYPE_TIMER_STARTED",
"version": "2",
"taskId": "462555829",
"timerStartedEventAttributes": {
"timerId": "2",
"startToFireTimeout": "360s",
"workflowTaskCompletedEventId": "9"
}
}
],
[
{
"eventId": "11",
"eventTime": "2024-04-22T00:56:50.993839Z",
"eventType": "EVENT_TYPE_TIMER_FIRED",
"version": "11",
"taskId": "462555829",
"timerFiredEventAttributes": {
"timerId": "2",
"startedEventId": "10"
}
},
{
"eventId": "12",
"eventTime": "2024-04-22T00:56:50.993839Z",
"eventType": "EVENT_TYPE_WORKFLOW_TASK_SCHEDULED",
"version": "11",
"taskId": "462555830",
"workflowTaskScheduledEventAttributes": {
"taskQueue": {
"name": "taskqueue",
"normalName": "temporal-bench"
},
"startToCloseTimeout": "10s",
"attempt": 1
}
}
]
]
}