Skip to content

Conversation

Spikhalskiy
Copy link
Contributor

@Spikhalskiy Spikhalskiy commented Sep 13, 2021

What was changed

WorkflowExecutionUtils is split into WorkflowExecutionUtils, WorkflowClientHelper, WorkflowClientLongPollAsyncHelper, WorkflowClientLongPollHelper.

Why?

WorkflowExecutionUtils is a large class without a single specific function.
WorkflowExecutionUtils is split to

  • WorkflowExecutionUtils - utility methods helping with all kinds of statuses, internal structures, etc. Intended to be a collection of small static utility methods.
  • WorkflowClientLongPollAsyncHelper and WorkflowClientLongPollHelper - Async and Sync implementations of Long Poll to hide inherent complexity of retries and other machinery of our workflow state polling. Used only by RootWorkflowClientInvoker and basically encapsulate pieces of RootWorkflowClientInvoker, so made package-local.
  • WorkflowClientHelper contains different methods that could but didn't become a part of the main WorkflowClient, mostly because they shouldn't be a part of normal usage and exist for tests / debug only.

This PR improves code quality and maintainability and helps achieve #650

How was this tested:
This PR doesn't change any behaviors, it's just relocation of methods.

@Spikhalskiy Spikhalskiy force-pushed the workflowwxecutionutils-refactoring branch 3 times, most recently from 95defe9 to 5ad2e42 Compare September 13, 2021 20:59
WorkflowExecutionUtils is split into WorkflowExecutionUtils, WorkflowClientHelper, WorkflowClientLongPollAsyncHelper, WorkflowClientLongPollHelper to encapsulate independent pieces and simplify further testing and maintenance
@Spikhalskiy Spikhalskiy force-pushed the workflowwxecutionutils-refactoring branch from 5ad2e42 to 39fa88f Compare September 13, 2021 20:59
@Spikhalskiy Spikhalskiy merged commit 99fa4af into temporalio:master Sep 13, 2021
@Spikhalskiy Spikhalskiy deleted the workflowwxecutionutils-refactoring branch April 15, 2022 20:12
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.

2 participants