Add samples and sample validation ci#100
Merged
YunchuWang merged 18 commits intomainfrom Feb 10, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a set of runnable Azure Managed Durable Task Scheduler (DTS) samples under examples/azure-managed/ and introduces CI to automatically discover and execute them (with/without the emulator).
Changes:
- Added multiple new Azure Managed DTS sample scenarios (hello orchestrations, retries, lifecycle ops, query/history, versioning, human interaction, unit testing).
- Added a GitHub Actions workflow to auto-discover samples via
sample.jsonand run them in CI (including emulator-backed runs). - Expanded the Azure Managed samples README with an index and guidance for adding/validating samples.
Reviewed changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| test/e2e-azuremanaged/retry-handler.spec.ts | Removes eslint-disable comment lines (but introduces trailing whitespace). |
| examples/azure-managed/README.md | Adds a sample index + CI validation notes for Azure Managed samples. |
| .github/workflows/validate-samples.yaml | New workflow to discover and run samples (emulator + non-emulator). |
| examples/azure-managed/sample.json | Adds metadata for the root “azure-managed basics” sample. |
| examples/azure-managed/hello-orchestrations/sample.json | Sample metadata for core orchestration patterns. |
| examples/azure-managed/hello-orchestrations/index.ts | New “hello orchestrations” runnable sample. |
| examples/azure-managed/hello-orchestrations/README.md | Documentation for running/validating the “hello orchestrations” sample. |
| examples/azure-managed/retry-and-error-handling/sample.json | Sample metadata for retry/error-handling scenarios. |
| examples/azure-managed/retry-and-error-handling/index.ts | New runnable sample covering retry policies and handlers. |
| examples/azure-managed/retry-and-error-handling/README.md | Documentation for running/validating the retry sample. |
| examples/azure-managed/human-interaction/sample.json | Sample metadata for event-driven/human interaction patterns. |
| examples/azure-managed/human-interaction/index.ts | New runnable sample demonstrating external events, timers, sendEvent, etc. |
| examples/azure-managed/human-interaction/README.md | Documentation for running/validating the human-interaction sample. |
| examples/azure-managed/lifecycle-management/sample.json | Sample metadata for lifecycle operations. |
| examples/azure-managed/lifecycle-management/index.ts | New runnable sample for terminate/suspend/restart/purge/tags/etc. |
| examples/azure-managed/lifecycle-management/README.md | Documentation for running/validating the lifecycle sample. |
| examples/azure-managed/query-and-history/sample.json | Sample metadata for query and history inspection. |
| examples/azure-managed/query-and-history/index.ts | New runnable sample demonstrating query APIs and typed history events. |
| examples/azure-managed/query-and-history/README.md | Documentation for running/validating the query/history sample. |
| examples/azure-managed/versioning/sample.json | Sample metadata for versioning strategies. |
| examples/azure-managed/versioning/index.ts | New runnable sample demonstrating orchestration version matching/failure strategies. |
| examples/azure-managed/versioning/README.md | Documentation for running/validating the versioning sample. |
| examples/azure-managed/unit-testing/sample.json | Sample metadata for in-memory unit testing (no emulator). |
| examples/azure-managed/unit-testing/index.ts | New runnable sample demonstrating in-memory test client/worker/backend. |
| examples/azure-managed/unit-testing/README.md | Documentation for running/validating the unit-testing sample. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…nted-out client version in versioning sample
…r commands directly
…ic, and fix dotenv path
…timeout durations in human interaction samples
…larify workflow logging
…roved responsiveness
…e termination and adjust step numbering for clarity
kaibocai
approved these changes
Feb 10, 2026
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
What changed?
examples/azure-managed/demonstrating all major SDK features:whenAll), sub-orchestrations,whenAny, deterministic GUID (newGuid)RetryPolicy,handleFailurepredicate,AsyncRetryHandler, sub-orchestration retry,raiseIfFailed()whenAnyrace pattern,sendEvent,setCustomStatusgetAllInstanceswith pagination,listInstanceIds,getOrchestrationHistory, typed history eventsVersionMatchStrategy,VersionFailureStrategy,ctx.version,ctx.compareVersionTo()InMemoryOrchestrationBackend,TestOrchestrationClient/TestOrchestrationWorker,ReplaySafeLogger,NoOpLogger(no emulator required)sample.json(metadata/discovery marker),index.ts, andREADME.mdexamples/azure-managed/sample.jsonmarker for the existing root-level distributed-tracing example.github/workflows/validate-samples.yamlwith auto-discovery, Docker service containers (DTS emulator), and matrix strategyexamples/azure-managed/README.mdwith a comprehensive Samples Index including feature coverage map (40+ features → samples), quick-start instructions, and troubleshooting — existing distributed-tracing documentation preserved below the indexWhy is this change needed?
Issues / work items
Project checklist
CHANGELOG.mdvalidate-samples.yamlCI workflow; no unit/E2E test changes needed since these are documentation/example filesexamples/azure-managed/README.md(documentation only — prepended Samples Index, preserved existing content)test/e2e-azuremanaged/retry-handler.spec.ts(removed 5 staleeslint-disabledirectives via--fix)AI-assisted code disclosure (required)
Was an AI tool used? (select one)
If AI was used:
index.ts,README.md,sample.json).github/workflows/validate-samples.yamlexamples/azure-managed/README.md(Samples Index)packages/durabletask-js/src/index.tsandpackages/durabletask-js-azuremanaged/src/index.tsyieldin generators, unused imports/variables)retry-handler.spec.tsAI verification (required if AI was used):
Testing
Automated tests
npm run lintpasses with 0 errors, 0 warningsManual validation (only if runtime/behavior changed)
npm install && npm run build— SDK builds successfullynpm run lint— 0 errors, 0 warningsunit-testingsample runs without emulator viaInMemoryOrchestrationBackendNotes for reviewers
unit-testingsample is the only one with"requiresEmulator": falsein itssample.json— CI runs it without Docker.sample.jsonmarker files, so adding new samples requires no workflow changes.examples/azure-managed/README.md), plus lint auto-fix inretry-handler.spec.ts.