-
Notifications
You must be signed in to change notification settings - Fork 272
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
Fail fast if ExtendedSessionsEnabled
is requested for a non-.NET worker.
#2732
Fail fast if ExtendedSessionsEnabled
is requested for a non-.NET worker.
#2732
Conversation
While the code does emit the warning and overwrites the option value, this is too late. The frameworks reads the "old" option value before the options are validated and actually runs as if the extended sessions are on. This leads to the hard-to-troubleshoot problems, e.g. the python worker never re-triggers the orchestration and never completes them.
I am surprised all checks have passed, because I didn't edit the tests for the old logic: https://github.com/Azure/azure-functions-durable-extension/pull/1502/files#diff-cc6c49a98ce039f487dcb8326901a4efd087351398aa832615d2041389d99bf2R4502 Is there a way to run all tests on this change? I can't easily run tests for this repo locally on OSX, getting various build errors. Would be easier to just do it on CI. |
@gukoff the tests that ran and passed are just the smoke tests - it looks like the integration tests didn't run. @davidmrdavid what's the proper way to run integration tests for community-contributed PRs for this repo now? Is it |
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.
Some minor feedback on the error message.
src/WebJobs.Extensions.DurableTask/Options/DurableTaskOptions.cs
Outdated
Show resolved
Hide resolved
src/WebJobs.Extensions.DurableTask/Options/DurableTaskOptions.cs
Outdated
Show resolved
Hide resolved
src/WebJobs.Extensions.DurableTask/Options/DurableTaskOptions.cs
Outdated
Show resolved
Hide resolved
/azp run |
Azure Pipelines successfully started running 1 pipeline(s), but failed to run 1 pipeline(s). |
Hi @gukoff, it looks like there is at least one test that needs to be updated to account for this new behavior:
|
…-extended-sessions
…-extended-sessions
…-extended-sessions
The CI checks fail for the seemingly unrelated reasons.
|
…from the latest base images, no matter where it's built.
Ping? |
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.
Thanks @gukoff - I really appreciate this contribution - especially the improvements to the CI! I think this change you've introduced is really important, and we can go ahead and accept it in spite of the MSSQL failure (which has been broken for a little while already and may require some process changes as it involves secret management).
Problem
If you set
extendedSessionsEnabled
to true for Python durable function, it fails to complete orchestrations. Although the control queues are properly processed and the history tables are written accordingly, Python worker only triggers the orchestration once and never replays it.Excerpt from host.json:
Excerpt from the logs:
Related issue about this parameter I've found via github search: https://github.com/briandunnington/briandunnington.github.com/blob/97f5a9cca08b41654c07d3552e8ede184ae1b8e4/_posts/durable_functions_an_eventstarted_event_is_required.md?plain=1#L61
Solution
The current code emits the warning and overwrites the option value to false. However, it seems like the framework reads the "old" option value before that, e.g. in the
InitializeForFunctionsV1I()
During execution, at least part of the framework logic still assumes that the extended sessions are on.A more simple and reliable approach is to just disallow this option value for non-dotnet workers and fail when it's provided.
Pull request checklist
pending_docs.md
release_notes.md
/src/Worker.Extensions.DurableTask/AssemblyInfo.cs