Azure / durabletask

Durable Task Framework allows users to write long running persistent workflows in C# using the async/await capabilities.
Apache License 2.0
1.47k stars 287 forks source link

support task registration from interface with inheritance, generics, method overloading #1021

Closed kevxms closed 5 months ago

kevxms commented 6 months ago

there is a bug in TaskHubWorker.AddTaskActivitiesFromInterface where each method of a registered interface is keyed by a weak "qualified name" that hits collisions when using C# code reuse features such as inheritance, generics, method overloading. This is reproducible even with useFullyQualifiedMethodNames = true. This PR fixes by making a stronger qualified name in "V2" methods for task registration and client creation. It is essential to keep the "V1" methods for back-compatibility.

sainipankaj90k commented 6 months ago

@davidmrdavid adding you for review.

This is for updating interface methods registration as task-activity for objects implementing interfaces with generic type.

cgillum commented 5 months ago

/azp run

azure-pipelines[bot] commented 5 months ago
EDIT: Azure Pipelines run scheduled successfully.
davidmrdavid commented 5 months ago

/azp run

azure-pipelines[bot] commented 5 months ago
EDIT: Azure Pipelines run scheduled successfully.