Add SDK-owned blob purge service contract and shared task integration - #805
wangbill (YunchuWang) wants to merge 13 commits into
Conversation
Reuse the existing purge tasks and bootstrap sequence with a task-hub-bound transport interface. Preserve standalone behavior and prove DTFx shim execution, failure handling, replay, and per-hub setup. Copilot-Session: 883b4cbd-e93c-4d4e-8cb8-ffcf69525cfa Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Reuse the existing native gRPC client for setup instead of adding an alternate bootstrap overload. Remove the unused setting facade and client shim tests while retaining actual DTFx purge task execution coverage. Copilot-Session: 883b4cbd-e93c-4d4e-8cb8-ffcf69525cfa Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Document normal function indexing, language-worker task execution, and the bound local-host transport. Preserve the existing SDK implementation and explicit bootstrap without claiming Functions end-to-end validation. Copilot-Session: 883b4cbd-e93c-4d4e-8cb8-ffcf69525cfa Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Clarify normal compiled-library Function indexing and opt-in package registration without a metadata transformer or generator. Preserve the base extension behavior and unchanged shared SDK tasks. Copilot-Session: 883b4cbd-e93c-4d4e-8cb8-ffcf69525cfa Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Describe explicit registration, normal function metadata and bindings without naming an unreleased package or prescribing its metadata implementation. Leave shared task APIs and bootstrap unchanged. Copilot-Session: 883b4cbd-e93c-4d4e-8cb8-ffcf69525cfa Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Describe the optional feature package's normal build-time Function discovery and generated invocation. Preserve shared SDK task APIs, explicit bootstrap behavior, and standalone operation. Copilot-Session: 883b4cbd-e93c-4d4e-8cb8-ffcf69525cfa Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Restore the constants file to its upstream scope after verifying final consumers use only the public activities and transport facade. Trim integration documentation to the current isolated Functions path. Copilot-Session: 883b4cbd-e93c-4d4e-8cb8-ffcf69525cfa Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Preserve the interface package identity and canonical SDK Client model references with an independent version. Add focused API and signing tests, Apache license attribution, solution discovery, and existing release signing coverage. Copilot-Session: 883b4cbd-e93c-4d4e-8cb8-ffcf69525cfa Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Add the preserved package ID to the existing independent NuGet publication jobs, retaining the manual approval gate and symbol exclusion. Copilot-Session: 883b4cbd-e93c-4d4e-8cb8-ffcf69525cfa Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Explain the interface-only netstandard2.0 target alongside the matching Client model library. Use a typed xUnit assertion before validating activity deadlines. Copilot-Session: 883b4cbd-e93c-4d4e-8cb8-ffcf69525cfa Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Preserve both interface APIs and SDK model identities while removing the Blob implementation dependency from transport consumers. Add ownership and dependency regression coverage and package the existing Apache and MIT notices together. Copilot-Session: 883b4cbd-e93c-4d4e-8cb8-ffcf69525cfa Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Use an extension-bearing package path so NuGet places the linked MIT license at the documented package root rather than treating it as a directory. Copilot-Session: 883b4cbd-e93c-4d4e-8cb8-ffcf69525cfa Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep the repository license linked without duplicating it and document the actual NuGet directory layout. Copilot-Session: 883b4cbd-e93c-4d4e-8cb8-ffcf69525cfa Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
halspang
left a comment
There was a problem hiding this comment.
A few questions and some concerns about the license. It seems like we did a lot of custom release stuff for this package. Is there a reason we didn't follow the same path as something like the ExportHistory which also releases under its own version but doesn't pull in its own licensing.
| | Package prefix | Registry | | ||
| |---|---| | ||
| | `Microsoft.DurableTask.*` | [NuGet](https://www.nuget.org/profiles/durabletask) | | ||
| | `Microsoft.Azure.DurableTask.LargePayloadPurge.Abstractions` | [NuGet](https://www.nuget.org/profiles/durabletask) | |
There was a problem hiding this comment.
I feel like our prefix is usually either Microsoft or Azure. I don't think we usually do both. Since this repo is in microsoft I think we should just use that.
| displayName: 'NuGet push (Microsoft.Azure.DurableTask.LargePayloadPurge.Abstractions)' | ||
| inputs: | ||
| command: push | ||
| nuGetFeedType: external | ||
| publishFeedCredentials: 'DurableTask org NuGet API Key' | ||
| packagesToPush: '$(System.DefaultWorkingDirectory)/drop/Microsoft.Azure.DurableTask.LargePayloadPurge.Abstractions.*.nupkg;!$(System.DefaultWorkingDirectory)/**/*.symbols.nupkg' |
There was a problem hiding this comment.
Make sure you change these as well if we do decide to drop Azure from the package.
| using static Microsoft.DurableTask.Protobuf.LargePayloads.LargePayloadPurge; | ||
| using LP = Microsoft.DurableTask.Protobuf.LargePayloads; |
There was a problem hiding this comment.
This is probably nothing, but the way these imports look makes me a little concerned with how we've structured interface here. I might feel better if we just didn't have the using LP though, I dunno it just feels weird to have it like this.
| new GetLargePayloadTombstonesActivity( | ||
| sp.GetRequiredKeyedService<LargePayloadPurgeClient>(builder.Name), | ||
| sp.GetRequiredService<ILogger<GetLargePayloadTombstonesActivity>>())); | ||
| r.AddActivity<DeleteExternalBlobActivity>(); | ||
| r.AddActivity(nameof(ReportLargePayloadPurgeResultsActivity), sp => | ||
| ActivatorUtilities.CreateInstance<ReportLargePayloadPurgeResultsActivity>( | ||
| sp, sp.GetRequiredKeyedService<LargePayloadPurgeClient>(builder.Name))); | ||
| new ReportLargePayloadPurgeResultsActivity( | ||
| sp.GetRequiredKeyedService<LargePayloadPurgeClient>(builder.Name), | ||
| sp.GetRequiredService<ILogger<ReportLargePayloadPurgeResultsActivity>>())); |
There was a problem hiding this comment.
Nit: Doing these with the new internal constructor feels weirder to me than having a static method that returns the object. You can ignore this if you feel I'm being too pedantic :)
| namespace Microsoft.DurableTask.AzureBlobPayloads; | ||
|
|
||
| /// <summary> | ||
| /// Provides task-hub-bound transport operations for integrating blob auto-purge with an alternate .NET host. |
There was a problem hiding this comment.
Nit: We don't usually hyphenate task hub in our public documents, so I wouldn't here either.
| <RootNamespace>DurableTask.LargePayloadPurge</RootNamespace> | ||
| <PackageId>Microsoft.Azure.DurableTask.LargePayloadPurge.Abstractions</PackageId> | ||
| <PackageDescription>Service and activity transport contracts for large payload purge using the Durable Task SDK client models.</PackageDescription> | ||
| <PackageLicenseExpression>Apache-2.0 AND MIT</PackageLicenseExpression> |
There was a problem hiding this comment.
Isn't this code using the MIT license? Where did Apache come from?
| <VersionPrefix>0.1.0</VersionPrefix> | ||
| <VersionSuffix></VersionSuffix> | ||
| <EnableStyleCop>true</EnableStyleCop> | ||
| <!-- Preserve the imported Apache notice rather than replacing it with the repository's MIT header. --> |
There was a problem hiding this comment.
Same, why is there an apache notice in here?
| Apache License | ||
| Version 2.0, January 2004 | ||
| http://www.apache.org/licenses/ | ||
|
|
||
| TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION |
There was a problem hiding this comment.
Why a different license than the root repo?
|
|
||
| ## License | ||
|
|
||
| The service interface originated in [Azure/durabletask](https://github.com/Azure/durabletask) and retains |
There was a problem hiding this comment.
I don't understand why we're including this.
| @@ -0,0 +1 @@ | |||
| - Initial service and activity transport contracts for large payload auto-purge, using the canonical Durable Task SDK Client models. | |||
There was a problem hiding this comment.
Any reason we're not using a CHANGELOG like the repo root?
Summary
What changed?
Microsoft.Azure.DurableTask.LargePayloadPurge.Abstractions, an independently versioned package containing the service capability and activity transport interfaces, with a source reference to the SDK Client project.Microsoft.DurableTask.Client; no model copies, moves or type forwarders.GetLargePayloadTombstonesActivityandReportLargePayloadPurgeResultsActivitypublicly constructible with a task-hub-boundILargePayloadPurgeClient.ILargePayloadPurgeClientin the contracts assembly, preserving its namespace and signatures. The Blob implementation references the contracts package, so transport consumers do not need a reference to the Blob implementation.Why is this change needed?
Microsoft.Azure.Functions.Worker.Extensions.DurableTask.AzureBlobPayloadspackage invokes the shared purge tasks through ordinary function bindings. Public construction and the narrow transport interface let it reuse the SDK implementation with a bound local-host bridge and worker-owned blob storage.ProjectReferencerather than requiring an externally published SDK model package to bootstrap compilation.Issues / work items
Project checklist
release_notes.mdNo breaking change for released SDK packages - the constructors and interfaces are additive relative to main.
The constants remain internal. The original bootstrap, orchestration, deletion, task names, payloads, retries
and continue-as-new behavior are unchanged.
The package preserves assembly name
DurableTask.LargePayloadPurge.Abstractions, SDK signing key and planned0.1.0version. The service capability remains inDurableTask.LargePayloadPurgewith its three requireddeadline/cancellation signatures. The activity transport remains in
Microsoft.DurableTask.AzureBlobPayloadswith its original two signatures and optional cancellation-token defaults. Canonical SDK model identity and
all runtime implementations are unchanged. No protobuf changes are included.
Breaking Change (unreleased prototype binaries only)
ILargePayloadPurgeClientmoves from the unreleased Blob implementation assembly to the contracts assembly; no duplicate definition or type forwarder remains.AI-assisted code disclosure (required)
Was an AI tool used? (select one)
If AI was used:
AI verification (required if AI was used):
These first-person attestations remain for the human author.
Testing
Automated tests
dotnet test test\LargePayloadPurge.Abstractions.Tests\LargePayloadPurge.Abstractions.Tests.csproj --no-restore --verbosity quietdotnet test test\Extensions\AzureBlobPayloads.Tests\AzureBlobPayloads.Tests.csproj --no-restore --verbosity quietIOrchestrationServiceLargePayloadPurgeClientandILargePayloadPurgeClient, references the canonical Client models, and carries the SDK strong-name token.Apache-2.0 AND MIT.Manual validation (only if runtime/behavior changed)
Notes for reviewers
0.1.0, independent of the repository-wide SDK version. The service interface retains its Apache-2.0 notice and the activity transport interface retains its MIT notice. The package includes both original texts and declaresApache-2.0 AND MIT; no source was relicensed.1.26.0lacks those models. Source builds do not need an external Client-version override; local package versions used for validation are not release claims.SetLargePayloadAutoPurgeAsyncremains authoritative: enable sets the backend flag, deduplicates the fixed unversioned runner, verifies identity/Running status and sends the batch event; disable only writes the setting.