Fix Durable Task Scheduler ATS export annotations#15684
Fix Durable Task Scheduler ATS export annotations#15684
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 15684Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 15684" |
There was a problem hiding this comment.
Pull request overview
Fixes a build break caused by ASPIREEXPORT008 by adding ATS export annotations to newly introduced Durable Task Scheduler builder extension methods, keeping the C# API available while preventing premature ATS exposure.
Changes:
- Add a shared ignore-reason constant for ATS export suppression.
- Mark Durable Task Scheduler/Hub builder extension methods with
[AspireExportIgnore]to satisfy the analyzer and avoid ATS export.
Comments suppressed due to low confidence (1)
src/Aspire.Hosting.Azure.Functions/DurableTask/DurableTaskResourceExtensions.cs:15
- The shared ignore reason mentions only "Durable Task Scheduler resources", but this attribute is also applied to task hub-related methods (e.g., AddTaskHub/WithTaskHubName). Consider broadening the text (e.g., "Durable Task resources...") so the diagnostic reason remains accurate for all annotated methods.
/// <summary>
This reverts commit 2eebd53.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
9d0c736 to
c18d6c0
Compare
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
JamesNK
left a comment
There was a problem hiding this comment.
A few issues spotted — most notably the "latest" container tag and the missing http2 transport on the gRPC endpoint.
...Aspire.Hosting.Azure.Functions/DurableTask/DurableTaskSchedulerEmulatorContainerImageTags.cs
Show resolved
Hide resolved
src/Aspire.Hosting.Azure.Functions/DurableTask/DurableTaskResourceExtensions.cs
Outdated
Show resolved
Hide resolved
src/Aspire.Hosting.Azure.Functions/DurableTask/DurableTaskSchedulerResource.cs
Show resolved
Hide resolved
playground/AzureFunctionsWithDts/AzureFunctionsWithDts.Functions/MyOrchestrationTrigger.cs
Outdated
Show resolved
Hide resolved
- Set Transport = "http2" on gRPC endpoint per repo convention - Replace NotImplementedException with InvalidOperationException - Use endpoint scheme expression instead of hardcoded "http://" - Add missing trailing newline in MyOrchestrationTrigger.cs Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
c148d49 to
29bdd70
Compare
|
Re-running the failed jobs in the CI workflow for this pull request because 2 jobs were identified as retry-safe transient failures in the CI run attempt.
|
|
@copilot fix the failing test |
Agent-Logs-Url: https://github.com/microsoft/aspire/sessions/72c23597-975c-4688-8bc8-cdb15823aca8 Co-authored-by: davidfowl <95136+davidfowl@users.noreply.github.com>
Fixed in d281753. The |
src/Aspire.Hosting.Azure.Functions/DurableTask/DurableTaskHubResource.cs
Outdated
Show resolved
Hide resolved
Include ConnectionStringExpression and Parent in ATS exports per review feedback. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
src/Aspire.Hosting.Azure.Functions/DurableTask/DurableTaskSchedulerResource.cs
Outdated
Show resolved
Hide resolved
Simplifies CreateDashboardEndpoint by using EndpointProperty.Url instead of manually composing scheme://host:port. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
DurableTaskHubResource now implements IResourceWithAzureFunctionsConfig, enabling .WithReference(taskHub) on Azure Functions projects. This replaces manual .WithEnvironment() calls for the scheduler connection string and task hub name. Updated playground and README to use the new pattern. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
a80b0d0 to
67d7147
Compare
|
🎬 CLI E2E Test Recordings — 52 recordings uploaded (commit View recordings
📹 Recordings uploaded automatically from CI run #23757259567 |
Description
Fixes the build break in the Durable Task Scheduler Azure Functions work.
The root cause was ATS export analyzer failures on the new Durable Task builder APIs. This change now uses a cleaner overload strategy for polyglot export:
stringandIResourceBuilder<ParameterResource>AspireUnionRunSyncOnBackgroundThread = trueonRunAsEmulator(...)because it invokes a sync callback delegateThis avoids exposing overload-specific ATS methods while preserving the existing C# API shape.
Additionally, the following issues were addressed based on PR review feedback:
grpcendpoint registration inRunAsEmulatorto useWithHttpEndpoint(settingUriScheme = "http") followed byTransport = "http2", matching the convention used by Milvus and Qdrant. This corrects the emulator connection string scheme fromtcp://tohttp://.throw new NotImplementedException()withthrow new InvalidOperationException(...)inDurableTaskSchedulerResourcefor a clearer error message when the dashboard endpoint is accessed outside of emulator mode.Validation:
./dotnet.sh build src/Aspire.Hosting.Azure.Functions/Aspire.Hosting.Azure.Functions.csproj /p:SkipNativeBuild=true./dotnet.sh test tests/Aspire.Hosting.Azure.Tests/Aspire.Hosting.Azure.Tests.csproj -- --filter-class "*.DurableTaskResourceExtensionsTests" --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true"Checklist
<remarks />and<code />elements on your triple slash comments?aspire.devissue:🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.