Skip to content
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

Using of AzureAppConfigurationRefreshMiddleware breaks durable function orchestration #484

Open
ivankaurov opened this issue Oct 30, 2023 · 3 comments
Assignees

Comments

@ivankaurov
Copy link

ivankaurov commented Oct 30, 2023

Code of AzureAppConfigurationRefreshMiddleware includes the following line

await next(context).ConfigureAwait(false);

This line breaks the execution of Durable Orchestrator by leaving it in running state even after the execution is completed succesfully. It means that Microsoft.Azure.AppConfiguration.Functions.Worker package and especially AzureAppConfigurationRefreshExtensions.UseAzureAppConfiguration can't be used with Durable out-of-process Azure functions.

This can refer to the constraint that Orchestrators can't use .ConfigureAwait(false) in there code.

@ivankaurov ivankaurov changed the title Using of AzureAppConfigurationRefreshMiddleware breaks durable function orhestration Using of AzureAppConfigurationRefreshMiddleware breaks durable function orchestration Oct 30, 2023
@jimmyca15
Copy link
Member

@ivankaurov

It sounds then that our library needs to know if it's running on a platform that doesn't support ConfigureAwait. Up until this point the adopted practice has been always use ConfigureAwait. My initial thinking is that we'll need to figure out a way to detect that our library is running in this environment and have some helper to decide whether to configure await or not.

Thank you for reporting !

@amerjusupovic

@amerjusupovic amerjusupovic self-assigned this Oct 30, 2023
@cgillum
Copy link

cgillum commented Nov 30, 2023

/cc @jviau

@jviau
Copy link

jviau commented Dec 4, 2023

I don't believe there is anything for AppConfiguration team to do here. The issue lies entirely on the durable side, we are imposing a constraint on the rest of the functions middleware pipeline - which frankly is not a good design on our end. There is an issue I opened to provide an extensibility point to for durable to avoid the issue: Azure/azure-functions-dotnet-worker#1666

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants