Skip to content

Restructure entity examples as standalone apps with DTS emulator support#83

Merged
torosent merged 5 commits intowangbill/entitiesfrom
copilot/sub-pr-75
Feb 2, 2026
Merged

Restructure entity examples as standalone apps with DTS emulator support#83
torosent merged 5 commits intowangbill/entitiesfrom
copilot/sub-pr-75

Conversation

Copy link
Contributor

Copilot AI commented Feb 2, 2026

Entity examples were single TypeScript files in hello-world/, making them difficult to test against the DTS emulator. They needed proper app structure with package management.

Changes

Standalone App Structure

  • Moved entity-counter and entity-orchestration to separate directories with package.json, index.ts, and README.md
  • Replaced TaskHubGrpcClient with DurableTaskAzureManagedClientBuilder for DTS emulator compatibility
  • Added start:emulator npm scripts configuring ENDPOINT=localhost:8080 and TASKHUB=default

Environment Configuration

const endpoint = process.env.ENDPOINT || "localhost:4001";
const taskHub = process.env.TASKHUB || "default";

const client = new DurableTaskAzureManagedClientBuilder()
  .endpoint(endpoint)
  .taskHubName(taskHub)
  .useGrpc()
  .build();

Documentation

  • Created examples/README.md documenting all examples and testing approaches
  • Created examples/TESTING.md with DTS emulator testing instructions
  • Updated examples/hello-world/README.md to reflect moved examples

Examples now run against DTS emulator:

docker run --name dts-emulator -i -p 8080:8080 -d --rm mcr.microsoft.com/dts/dts-emulator:latest
cd examples/entity-counter && npm run start:emulator

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 4 commits February 2, 2026 18:40
Co-authored-by: torosent <17064840+torosent@users.noreply.github.com>
Co-authored-by: torosent <17064840+torosent@users.noreply.github.com>
Co-authored-by: torosent <17064840+torosent@users.noreply.github.com>
Co-authored-by: torosent <17064840+torosent@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 2, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • node-precompiled-binaries.grpc.io
    • Triggering command: /usr/local/bin/node node /home/REDACTED/work/durabletask-js/durabletask-js/node_modules/.bin/node-pre-gyp install (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Add durable entities support to SDK Restructure entity examples as standalone apps with DTS emulator support Feb 2, 2026
Copilot AI requested a review from torosent February 2, 2026 18:47
@torosent torosent marked this pull request as ready for review February 2, 2026 18:48
@torosent torosent merged commit b0c1eb0 into wangbill/entities Feb 2, 2026
1 check passed
@torosent torosent deleted the copilot/sub-pr-75 branch February 2, 2026 18:48
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.

2 participants