Durable Task Scheduler: add health checks and client integration#15928
Open
philliphoff wants to merge 8 commits intomicrosoft:mainfrom
Open
Durable Task Scheduler: add health checks and client integration#15928philliphoff wants to merge 8 commits intomicrosoft:mainfrom
philliphoff wants to merge 8 commits intomicrosoft:mainfrom
Conversation
Signed-off-by: Phillip Hoff <phillip@orst.edu>
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 15928Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 15928" |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new Aspire client integration for Durable Task Scheduler (Azure Managed) and improves the hosting-side emulator experience by adding documentation and a container HTTP health check endpoint. It also introduces a standalone playground worker sample and adds the required DurableTask AzureManaged package versions plus a new test project.
Changes:
- Added new component package
Aspire.Microsoft.DurableTask.AzureManaged(DI registration for DTS worker/client, settings binding, health checks, tracing, schema + README). - Enhanced DTS emulator hosting integration with additional docs and an HTTP health check (
/healthz) on the emulator container. - Added
DurableTaskWorkerWithDtsplayground app and a new test project validating config binding, connection string parsing, and schema behavior.
Reviewed changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Aspire.Microsoft.DurableTask.AzureManaged.Tests/DurableTaskSchedulerConnectionStringTests.cs | Adds unit tests for parsing endpoint/task hub from DTS connection strings. |
| tests/Aspire.Microsoft.DurableTask.AzureManaged.Tests/ConfigurationSchemaTests.cs | Validates the component’s ConfigurationSchema.json against sample configs. |
| tests/Aspire.Microsoft.DurableTask.AzureManaged.Tests/AspireDurableTaskSchedulerExtensionsTests.cs | Covers extension method validation, config binding, health check toggles, and registration behavior. |
| tests/Aspire.Microsoft.DurableTask.AzureManaged.Tests/Aspire.Microsoft.DurableTask.AzureManaged.Tests.csproj | New test project referencing the component and copying schema to output. |
| src/Components/Aspire.Microsoft.DurableTask.AzureManaged/README.md | New client integration README with usage/config/AppHost guidance. |
| src/Components/Aspire.Microsoft.DurableTask.AzureManaged/DurableTaskSchedulerSettings.cs | Settings model for config binding (ConnectionString, health checks, tracing). |
| src/Components/Aspire.Microsoft.DurableTask.AzureManaged/DurableTaskSchedulerHealthCheck.cs | Implements HTTP-based scheduler ping health check. |
| src/Components/Aspire.Microsoft.DurableTask.AzureManaged/DurableTaskSchedulerConnectionString.cs | Parser utilities used by health check setup. |
| src/Components/Aspire.Microsoft.DurableTask.AzureManaged/ConfigurationSchema.json | Adds appsettings schema for IntelliSense/validation. |
| src/Components/Aspire.Microsoft.DurableTask.AzureManaged/AssemblyInfo.cs | Registers schema + logging categories via assembly attributes. |
| src/Components/Aspire.Microsoft.DurableTask.AzureManaged/AspireDurableTaskSchedulerExtensions.cs | Main registration APIs for DTS worker/client with health checks and OpenTelemetry tracing. |
| src/Components/Aspire.Microsoft.DurableTask.AzureManaged/Aspire.Microsoft.DurableTask.AzureManaged.csproj | New packable component project with DurableTask AzureManaged dependencies. |
| src/Aspire.Hosting.Azure.Functions/README.md | Documents emulator in-memory state + persistent lifetime behavior. |
| src/Aspire.Hosting.Azure.Functions/DurableTask/DurableTaskResourceExtensions.cs | Adds emulator HTTP health check and expands emulator docs/examples; adds port customization helpers. |
| playground/DurableTaskWorkerWithDts/DurableTaskWorkerWithDts.Worker/SayHelloActivity.cs | Activity sample for standalone DTS worker playground. |
| playground/DurableTaskWorkerWithDts/DurableTaskWorkerWithDts.Worker/ChainingOrchestrator.cs | Orchestrator sample for the playground. |
| playground/DurableTaskWorkerWithDts/DurableTaskWorkerWithDts.Worker/Program.cs | Worker host wiring using the new component registration method. |
| playground/DurableTaskWorkerWithDts/DurableTaskWorkerWithDts.Worker/DurableTaskWorkerWithDts.Worker.csproj | Adds playground worker project referencing the new component. |
| playground/DurableTaskWorkerWithDts/DurableTaskWorkerWithDts.AppHost/Properties/launchSettings.json | Launch profiles for the new playground AppHost. |
| playground/DurableTaskWorkerWithDts/DurableTaskWorkerWithDts.AppHost/Program.cs | AppHost that starts emulator + task hub and references the worker. |
| playground/DurableTaskWorkerWithDts/DurableTaskWorkerWithDts.AppHost/DurableTaskWorkerWithDts.AppHost.csproj | Adds playground AppHost project referencing Azure Functions hosting integration. |
| playground/AzureFunctionsWithDts/AzureFunctionsWithDts.AppHost/Program.cs | Ensures Functions app waits for the DTS task hub resource to be healthy before starting. |
| Directory.Packages.props | Adds pinned versions for DurableTask AzureManaged worker/client packages. |
| Aspire.slnx | Adds new component, test project, and new playground projects to the solution. |
...Components/Aspire.Microsoft.DurableTask.AzureManaged/AspireDurableTaskSchedulerExtensions.cs
Outdated
Show resolved
Hide resolved
...Components/Aspire.Microsoft.DurableTask.AzureManaged/AspireDurableTaskSchedulerExtensions.cs
Outdated
Show resolved
Hide resolved
src/Components/Aspire.Microsoft.DurableTask.AzureManaged/README.md
Outdated
Show resolved
Hide resolved
Signed-off-by: Phillip Hoff <phillip@orst.edu>
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.
Description
Adds a new Aspire client integration package for Durable Task Scheduler (
Aspire.Microsoft.DurableTask.AzureManaged), along with hosting-side improvements and a standalone worker playground app.Client integration (
Aspire.Microsoft.DurableTask.AzureManaged)New NuGet package that registers Durable Task workers and/or clients in the DI container for connecting to a Durable Task Scheduler instance. Includes:
AddDurableTaskSchedulerWorker/AddKeyedDurableTaskSchedulerWorker— Registers a Durable Task worker (and optionally aDurableTaskClient) with configuration, health checks, and OpenTelemetry tracing.AddDurableTaskSchedulerClient/AddKeyedDurableTaskSchedulerClient— Registers only aDurableTaskClientfor starting/managing orchestrations without hosting a worker.DurableTaskSchedulerSettings— Configuration class supportingConnectionString,DisableHealthChecks, andDisableTracingvia theAspire:Microsoft:DurableTask:AzureManagedconfiguration section.DurableTaskSchedulerHealthCheck— HTTP-based health check that pings the scheduler's task hub endpoint.ConfigurationSchema.json— JSON schema for IntelliSense support inappsettings.json.Hosting-side improvements
<remarks>and additional<example>XML docs toRunAsEmulator()documenting persistent container lifetime and in-memory state behavior./healthz) to the emulator container's HTTP endpoint.Playground app
New
DurableTaskWorkerWithDtsplayground demonstrating a standalone (non-Azure Functions) Durable Task worker using the client integration package with the DTS emulator. Includes a sample chaining orchestrator and activity.Package dependencies
Microsoft.DurableTask.Worker.AzureManagedv1.23.3 andMicrosoft.DurableTask.Client.AzureManagedv1.23.3 toDirectory.Packages.props.Tests
Aspire.Microsoft.DurableTask.AzureManaged.Tests— 42 tests covering:DurableTaskSchedulerConnectionString)ConfigurationSchema.jsonvalidation against valid/invalid JSONFixes # (issue)
Checklist
<remarks />and<code />elements on your triple slash comments?aspire.devissue: