-
Notifications
You must be signed in to change notification settings - Fork 362
Dapr Workflow Overhaul #1662
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
Open
WhitWaldo
wants to merge
36
commits into
dapr:master
Choose a base branch
from
WhitWaldo:wf-overhaul
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Dapr Workflow Overhaul #1662
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… the SDK Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Whit Waldo <[email protected]>
… necessary types from Dapr.Workflow to generalize them and reworking to modernize and improve them Signed-off-by: Whit Waldo <[email protected]>
…egistering gRPC client with no request/response size limits and without timeouts that uses an IHttpClientFactory to provision clients. Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Whit Waldo <[email protected]>
…rotocolHandler (for processing workflow messages) Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Whit Waldo <[email protected]>
…r, WorkflowActivityContextImpl, WorkflowOrchestrationContext and WorkflowWorker) Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Whit Waldo <[email protected]>
…pe may include other values in the near future Signed-off-by: Whit Waldo <[email protected]>
…d `ILogger<T>` instances properly Signed-off-by: Whit Waldo <[email protected]>
…generic type and via functions Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Whit Waldo <[email protected]>
…s, and fix a typo Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Whit Waldo <[email protected]>
… new approach in how registration is performed under the hood, this also resolves the issue raised at dapr#1567 Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Whit Waldo <[email protected]>
…d for it Signed-off-by: Whit Waldo <[email protected]>
…his be using custom JsonSerializerOptions or even swapping it altogether to use MessagePack/BSON. So long as the implementation serializes to a string, it can be registered and used throughout Dapr.Workflow. This solves dapr#1537 Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Whit Waldo <[email protected]>
…parameters for backwards compatibility reasons Signed-off-by: Whit Waldo <[email protected]>
…adata - only observed change following migration Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Whit Waldo <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR represents an effort to dramatically overhaul how the .NET implementation of Dapr Workflows is written.
This completely removes our dependency on the DurableTask libraries (including our fork of Dapr.DurableTask) and fundamentally alters how the underlying system works operationally to remove all the logic not directly used by the Dapr runtime, applies modern .NET architecture ideas and syntax (nullability support, DI, records) and most of all, seeks to avoid any breaking changes with the existing Dapr.Workflow public API.
This approach simplifies the gRPC client creation to eliminate several types of bugs seen in the development of 1.16 and to further improve reliability and performance of the client, especially during heavy load.
Updating the examples, the only change needed was that requests to get the workflow state return a nullable instance of
WorkflowState, but I otherwise saw drop-in support.Outside of just making it easier to develop and maintain the project, this implementation also fixes several issues raised by the broader community:
#1567 identified issues with Serilog registration because of the additional scope creation as part of the DI registration - because the underlying types are registered differently, the additional scope creation has been removed and this issue will be resolved.
#1537 and #1582 sought more customized workflow serialization support. I'll do you one better - this implementation completely abstracts all serialization into an
IWorkflowSerializerand provides a default implementation using System.Text.Json. Via the DI registration methods, you can pass in your ownJsonSerializationOptionsor even implement your own concrete serializer (just needs to be able to serialize/deserialize to and from a string) to support MessagePack, BSON or whatever you want and it'll just work. Do use some caution here - changing any of these settings means that when a workflow is rehydrated, it may not deserialize properly and would throw instead of complete successfully. Further, if you're using multi-app run (not yet supported in .NET, but WIP), your other applications will need to similarly support the same serialization scheme - to my knowledge, all other Dapr SDKs support JSON exclusively, so be advised.#1532 calls to making it easier to demonstrate testing workflows, so I've added several interfaces throughout that can be used to facilitate this.
I'm currently working to add support for task execution IDs per #1541, multi-app run per #1636 and a bunch of unit tests to validate it through.
No changes should be necessary to the documentation as it should be a drop-in replacement for the existing public API, even though the entire backing apparatus has changed.
Issue reference
We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.
Please reference the issue this PR will close: #[issue number]
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list: