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

Fix fail workflow task and generate new workflow task #2335

Merged
merged 4 commits into from
Dec 30, 2021

Conversation

yiminc
Copy link
Member

@yiminc yiminc commented Dec 30, 2021

What changed?
Correctly handle new workflow task in case RespondWorkflowTaskCompleted failed.

Why?
In case of RespondWorkflowTaskCompleted failed, server would return error and won't be able to piggyback a new workflow task. The new workflow task needs to go through normal transfer queue -> matching -> poller route to be delivered to worker.

How did you test it?
Added new integration test

Potential risks
No

Is hotfix candidate?
No

@yiminc yiminc requested a review from a team December 30, 2021 20:20
@yiminc yiminc changed the title Fix fail workflow task with test Fix fail workflow task and generate new workflow task Dec 30, 2021
Comment on lines 665 to 666
WorkflowRunTimeout: 10 * time.Second,
WorkflowTaskTimeout: 10 * time.Second,
Copy link
Member

Choose a reason for hiding this comment

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

nit: is my understanding correct that taskTimeout here must equal to runTimeout? Otherwise workflow may still succeed after the workflow task timeout? If so, probably add a comment here?

Copy link
Member Author

Choose a reason for hiding this comment

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

That is correct. The timeout was intentionally set to the same so if workflow task timeout it would fail the workflow. I could add a comment to clarify.

Copy link
Member Author

Choose a reason for hiding this comment

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

But the test also verify the workflow history events.

@yiminc yiminc enabled auto-merge (squash) December 30, 2021 22:21
@yiminc yiminc merged commit 733a052 into temporalio:master Dec 30, 2021
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.

3 participants