Azure / azure-functions-durable-extension

Durable Task Framework extension for Azure Functions
MIT License
711 stars 263 forks source link

No FunctionContext available on Durable functions Activity function #2741

Closed marcosamaral closed 2 months ago

marcosamaral commented 4 months ago

Description

After updating to Microsoft.Azure.Functions.Worker.Extensions.DurableTask 1.1.1, I get null on my FunctionContext on activity function, with that being the only change.

App Details

Microsoft.Azure.Functions.Worker.Extensions.DurableTask 1.1.1 Azure Functions runtime version 4 Programming language used: C#

nytian commented 4 months ago

Hi, @marcosamaral can you give me a sample that does not work? Thanks!

marcosamaral commented 4 months ago

@nytian I get this issue with something as basic as:

[Function(nameof(ReadInbox))]
public async Task<List<string>> ReadInbox([ActivityTrigger] FunctionContext functionContext)
{
    ILogger logger = functionContext.GetLogger(nameof(ReadInbox));
    (...)

with functionContext just being null in the function. Again, same code works fine with 1.1.0, and I get this behavior by just updating the version 1.1.1.

nytian commented 2 months ago

Close as bug fixed at PR #2806