-
Notifications
You must be signed in to change notification settings - Fork 320
Add Tags to SubOrchestrationInstanceCreatedEvent #1293
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
base: main
Are you sure you want to change the base?
Add Tags to SubOrchestrationInstanceCreatedEvent #1293
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds the Tags property to the SubOrchestrationInstanceCreatedEvent history event class to support rewind operations in the DTS backend. The Tags dictionary is needed to reconstruct ExecutionStartedEvent instances when sub-orchestrations have been purged before a rewind.
- Added
Tagsproperty toSubOrchestrationInstanceCreatedEventclass with appropriate documentation and serialization attributes - Refactored tag merging in
TaskOrchestrationDispatcher.csto compute merged tags once and assign to both the history event and execution started event - Updated the abridged event generation to preserve the Tags property
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/DurableTask.Core/History/SubOrchestrationInstanceCreatedEvent.cs | Added Tags property with DataMember attribute and updated copy constructor to include Tags |
| src/DurableTask.Core/TaskOrchestrationDispatcher.cs | Refactored to compute mergedTags once and assign to both SubOrchestrationInstanceCreatedEvent and ExecutionStartedEvent |
| src/DurableTask.Core/OrchestrationRuntimeState.cs | Updated abridged event generation to preserve Tags property |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
This PR might be a good chance to add the warning that we discussed earlier: #1264 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
I think you can just merge the latter, I approved it. |
Previously the history event for creating suborchestration did not record the
Tagsdictionary. This creates challenges for the rewind implementation in the DTS backend, since it uses this history event to reconstruct the ExecutionStartedEvent in cases where a suborchestration was purged prior to a rewind.