Repository navigation
Support tags on entity-started orchestrations - #1412
Open
wangbill (YunchuWang) wants to merge 1 commit into
Open
wangbill (YunchuWang) wants to merge 1 commit into
wangbill (YunchuWang) wants to merge 1 commit into
Conversation
Merge optional caller tags with inherited entity tags while keeping the mandatory FireAndForget runtime marker authoritative. Cover serialization, tag precedence and defaults, input dictionary isolation, scheduling/tracing preservation, and child completion/failure dispatch. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3d59e0dc-efdb-4b0a-b588-6dbd83416193
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused implementation correctly preserves existing behavior and is comprehensively covered by active Core tests.
Review effort: Balanced
Findings: None
What changed in this PR
Adds tag propagation for entity-started child orchestrations while preserving inheritance and fire-and-forget semantics.
Changes:
- Adds a public optional
Tagsproperty. - Merges caller and inherited tags without mutation.
- Adds serialization, merge, tracing, and completion tests.
| File | Description |
|---|---|
StartNewOrchestrationOperationAction.cs |
Exposes caller-supplied tags. |
TaskEntityDispatcher.cs |
Merges tags and enforces fire-and-forget. |
TestTaskEntityDispatcher.cs |
Covers serialization and dispatch behavior. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
| var (startEvent, _) = SendStartMessage(runtimeState, action); | ||
|
|
||
| Assert.AreEqual("", startEvent.Tags[OrchestrationTags.FireAndForget]); | ||
| Assert.IsTrue(startEvent.Tags.ContainsKey("custom")); |
| Assert.AreEqual(1, runtimeState.Tags.Count); | ||
| if (useTags) | ||
| { | ||
| Assert.IsTrue(service.State.Tags.ContainsKey("custom")); |
This was referenced Oct 6, 2026
wangbill (YunchuWang)
marked this pull request as ready for review
October 7, 2026 19:42
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
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.
Support tags on entity-started orchestrations
Carry caller-supplied tags from an entity's start-orchestration action into the child orchestration, while preserving inherited entity tags and the mandatory fire-and-forget behavior.
Changes
IDictionary<string, string>? TagstoStartNewOrchestrationOperationAction, including API documentation.OrchestrationTags.MergeTagsto let caller tags override ordinary inherited keys, then apply the runtimeFireAndForgetmarker in the final merge. Neither source dictionary is mutated.Validation
Tags; five dispatcher cases failed because caller tags were missing before changing the merge. All focused checks pass with this change.Microsoft.Azure.DurableTask.Core3.10.1-entitytags807.localwas produced from this PR's source using build-only version overrides. It satisfies the downstream AzureStorage floor of Core >= 3.10.0 stable. Package/DLL identities and the source commit were verified. This package was not published, and the Core repository release version remains unchanged.git diff origin/main...HEAD --check: passed.Related Issues
Related dependency for microsoft/durabletask-dotnet#807, not a standalone fix for the entire issue. SDK and Functions/protobuf conversion changes are also required to carry caller tags end to end.
Compatibility
Missing, null, and empty caller tags preserve existing scheduling behavior. The runtime marker always wins collisions, so successful or failed child completion does not send an unsupported completion event back to the entity. No orchestration naming, versioning, IDs, inputs, scheduled time, parent linkage, tracing, or transactional message handling is changed. No dependency or repository release-version updates, package publication, or PR merge are included.
Companion PRs and release order
tagsfield 8.Package dependency versions must be updated after prerequisite release only. Do not commit unpublished
.localvalidation pins, guessed future versions, or validation-only feeds/overrides. Local previews are build-only test inputs. SDK/Functions PRs remain dependency-blocked until the published prerequisite API is available and the later version updates are made; local tests are not a normal-CI or release claim.