Analyzer DURABLE2002: What is the "correct" way to start an activity with an OutputBinding #3319
Unanswered
BorisWilhelms
asked this question in
Q&A
Replies: 1 comment
-
|
I see this as a "bug" in the sense that the analyzer should respect the fact that the caller isn't interested in processing the result. Would you mind opening a bug in https://github.com/microsoft/durabletask-dotnet repo (which is where the analyzer code in question lives)? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In our Orchestrator Functions (Isolared Functions) we call Acitivity Functions with OutputBinding
e.g.
await context.CallActivityAsync(FunctionNames.ToolMailSendActivity, messages);With enabled Analyzers we get a
DURABLE2002 warning: CallActivityAsync is expecting the return type 'none' and that does not match the return type 'List<JsonSendGridMessage>' of the activity function 'Tool_Mail_Send_Activity'. I understand this behaviour, since the Activity actually returns something, but we are not interested in the result, as it should be handled by the runtime.I understand we could just change the call to
await context.CallActivityAsync<List<JsonSendGridMessage>>(FunctionNames.ToolMailSendActivity, messages);and just discard the result. This works, but just adds code that should not be needed and is not obvious why it is there.Is this a "bug" in the Analyzer or is there another way to call the activity, that is ok for the analyzer?
Beta Was this translation helpful? Give feedback.
All reactions