-
Notifications
You must be signed in to change notification settings - Fork 271
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
Override new "base" Terminate API #2829
Conversation
src/Worker.Extensions.DurableTask/FunctionsDurableTaskClient.cs
Outdated
Show resolved
Hide resolved
using Microsoft.Azure.Functions.Worker.Extensions.Abstractions; | ||
|
||
// TODO: Find a way to generate this dynamically at build-time | ||
[assembly: ExtensionInformation("Microsoft.Azure.WebJobs.Extensions.DurableTask", "2.13.3")] | ||
[assembly: InternalsVisibleTo("Worker.Extensions.DurableTask.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100cd1dabd5a893b40e75dc901fe7293db4a3caf9cd4d3e3ed6178d49cd476969abe74a9e0b7f4a0bb15edca48758155d35a4f05e6e852fff1b319d103b39ba04acbadd278c2753627c95e1f6f6582425374b92f51cca3deb0d2aab9de3ecda7753900a31f70a236f163006beefffe282888f85e3c76d1205ec7dfef7fa472a17b1")] |
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.
So that internal classes can be tested in the tests project. This is a standard pattern, and we use it for the DF WebJobs Extension tests afaik.
string readerString = reader.GetString() ?? string.Empty; | ||
return new HttpMethod(readerString); |
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.
There was a small warning that reader.GetString()
might return null
. So I added this to make sure the method was well typed.
Follow up to: #2802
The PR above made the
FunctionsDurableTaskClient
override new overloads fromDurableTaskClient
which were causing issues as reported here: microsoft/durabletask-dotnet#282 (comment)Seems we missed the
TerminateInstanceAsync
API in the PR above, so this PR adds it.This PR also adds what appears to be the first set of unit tests for the .NET isolated worker extension. In it, we're testing against this particular exception: that the
TerminateInstanceAsync
API can be invoked without triggering exceptions. I tested with and without the code change and confirmed that the test is fails without the change, and passes with it.Note: the new test project I added won't run as part of the CI automatically. I think to do that, I need to create a new ADO pipeline. Given that we're migrating our CI to a different ADO organization, now may not be the right time to add it either, so I'd like to do that in a different PR.
Issue describing the changes in this PR
resolves microsoft/durabletask-dotnet#282 (comment)
Pull request checklist
pending_docs.md
release_notes.md
/src/Worker.Extensions.DurableTask/AssemblyInfo.cs