-
Notifications
You must be signed in to change notification settings - Fork 10
Add samples and sample validation ci #100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
…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
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.