-
Notifications
You must be signed in to change notification settings - Fork 44
Activity tag support #426
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
YunchuWang
wants to merge
7
commits into
main
Choose a base branch
from
wangbill/atag
base: main
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
Activity tag support #426
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
cgillum
requested changes
May 12, 2025
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.
I think we need to revisit the public API change. In particular, I don't think we should limit tags to activity calls.
cgillum
reviewed
May 12, 2025
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.
This pull request introduces several enhancements and new features to improve the functionality and flexibility of the Durable Task framework. The most significant changes include the addition of tagging support for tasks, the creation of a new activity class for cache clearing, and updates to orchestrator logic to utilize the new activity. Below is a breakdown of the changes:
Related prs:
https://github.com/microsoft/durabletask-protobuf/pull/43/files
https://github.com/Azure/durabletask/pull/1211/files
https://msazure.visualstudio.com/One/_git/AAPT-DTMB/pullrequest/12388270
Task Tagging Support
Tags
property to theTaskOptions
class, enabling tasks to have associated metadata tags. This includes a new constructor for initializingTaskOptions
with tags. (src/Abstractions/TaskOptions.cs
, src/Abstractions/TaskOptions.csR22-R42)CallActivityOptions
class, inheriting fromTaskOptions
, specifically for configuring activity calls with tags. (src/Abstractions/TaskOptions.cs
, src/Abstractions/TaskOptions.csR128-R153)ProtoUtils
to handle tags during task scheduling and history event conversion, ensuring tags are serialized and deserialized properly. (src/Shared/Grpc/ProtoUtils.cs
, [1] [2]TaskOrchestrationContextWrapper
to pass tags when scheduling tasks, ensuring they are included in the orchestration execution. (src/Worker/Core/Shims/TaskOrchestrationContextWrapper.cs
, src/Worker/Core/Shims/TaskOrchestrationContextWrapper.csR141-R170)New Cache Clearing Activity
CacheClearingActivity
class, which simulates cache clearing and can be invoked as part of an orchestration. (samples/ScheduleWebApp/Activities/CacheClearingActivity.cs
, samples/ScheduleWebApp/Activities/CacheClearingActivity.csR1-R17)CacheClearingOrchestrator
to call the newCacheClearingActivity
usingCallActivityAsync
with tagging options. (samples/ScheduleWebApp/Orchestrations/CacheClearingOrchestrator.cs
, samples/ScheduleWebApp/Orchestrations/CacheClearingOrchestrator.csL17-R23)Integration with Sample Application
CacheClearingActivity
and updated the Durable Task worker configuration in the sample application to include the new activity. (samples/ScheduleWebApp/Program.cs
, samples/ScheduleWebApp/Program.csR23-L28)using
directives for the new activity in the orchestrator and program files. (samples/ScheduleWebApp/Orchestrations/CacheClearingOrchestrator.cs
, [1];samples/ScheduleWebApp/Program.cs
, [2]Dependency Updates
Microsoft.Azure.DurableTask.Core
package from version3.1.0
to3.1.1
to ensure compatibility with the new features. (Directory.Packages.props
, Directory.Packages.propsL31-R31)Code Cleanup
using
directive fromProtoUtils.cs
to improve code clarity. (src/Shared/Grpc/ProtoUtils.cs
, src/Shared/Grpc/ProtoUtils.csL7)