feat: add entity registration methods to Azure managed worker builder#266
Merged
YunchuWang merged 1 commit intoJun 12, 2026
Merged
Conversation
…bleTaskAzureManagedWorkerBuilder The Azure managed worker builder supports registering orchestrators and activities through addOrchestrator/addNamedOrchestrator and addActivity/addNamedActivity, but has no corresponding methods for entity registration. Users must call worker.addEntity() or worker.addNamedEntity() directly on the worker after build(), breaking the fluent builder pattern. This adds addEntity() and addNamedEntity() methods to DurableTaskAzureManagedWorkerBuilder, following the same pattern used for orchestrators and activities. Entities are stored during builder configuration and registered on the worker during build(). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
YunchuWang
force-pushed
the
copilot-finds/improve/worker-builder-add-entity-methods
branch
from
June 11, 2026 20:57
aad566b to
3f8ea8a
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Adds fluent entity registration support to the Azure-managed worker builder so users can register entities via the same builder pattern used for orchestrators and activities (fixing the gap described in #239).
Changes:
- Added
addEntity(factory)andaddNamedEntity(name, factory)toDurableTaskAzureManagedWorkerBuilder. - Registered configured entities onto the underlying
TaskHubGrpcWorkerduringbuild(). - Added unit tests covering chaining behavior and verifying entities are registered on build.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/durabletask-js-azuremanaged/src/worker-builder.ts | Adds entity registration methods, stores entity factories, and registers them on the worker during build(). |
| packages/durabletask-js-azuremanaged/test/unit/worker-builder.spec.ts | Adds unit tests validating fluent chaining and that entity factories are applied to the built worker. |
kaibocai
approved these changes
Jun 12, 2026
YunchuWang
deleted the
copilot-finds/improve/worker-builder-add-entity-methods
branch
June 12, 2026 20:22
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.
Summary
Fixes #239