Skip to content

Add version check to activities#472

Merged
halspang merged 2 commits into
microsoft:mainfrom
halspang:halspang/activity_version
Oct 1, 2025
Merged

Add version check to activities#472
halspang merged 2 commits into
microsoft:mainfrom
halspang:halspang/activity_version

Conversation

@halspang

Copy link
Copy Markdown
Member

Activities were previously not checking the versioning status of the worker. This was because it was assumed that the orchestration level check would satisfy the activity. However, when multiple workers of the same version are present, the activities can be sent to workers of the incorrect version. This change adds the orchestration version to the activity to allow for versioning checks.

Activities were previously not checking the versioning status of
the worker. This was because it was assumed that the orchestration
level check would satisfy the activity. However, when multiple
workers of the same version are present, the activities can be
sent to workers of the incorrect version. This change adds the
orchestration version to the activity to allow for versioning checks.

Signed-off-by: Hal Spang <halspang@microsoft.com>
@AnatoliB

AnatoliB commented Sep 30, 2025

Copy link
Copy Markdown

This fix will make changes safer in general, but there is a trade-off here: it may hurt performance in scenarios when the user is not making changes to activities (or simply doesn't mind the old activity implementation to be active even for new orchestrations for some time). Currently, old workers can still participate in handling the workload while they are still alive. After the fix, they will be immediately excluded. I still believe the fix is a better default behavior, but let's consider either making it configurable, or (long-term) have separate versioning for activities.

I'm not blocking on this though: if making it configurable is not trivial, I'm still ok with this fix.

@halspang

Copy link
Copy Markdown
Member Author

This fix will make changes safer in general, but there is a trade-off here: it may hurt performance in scenarios when the user is not making changes to activities (or simply doesn't mind the old activity implementation to be active even for new orchestrations for some time). Currently, old workers can still participate in handling the workload while they are still alive. After the fix, they will be immediately excluded. I still believe the fix is a better default behavior, but let's consider either making it configurable, or (long-term) have separate versioning for activities.

I'm not blocking on this though: if making it configurable is not trivial, I'm still ok with this fix.

Agreed! Long-term I want to be able to specify activities versions. This change is to target the immediate user pain and then we can work towards that in the future.

Signed-off-by: Hal Spang <halspang@microsoft.com>
@halspang halspang requested a review from cgillum September 30, 2025 22:05
Comment thread src/Worker/Core/Shims/TaskOrchestrationContextWrapper.cs
@halspang halspang merged commit 74c3d7d into microsoft:main Oct 1, 2025
4 checks passed
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