-
Notifications
You must be signed in to change notification settings - Fork 441
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
Fallback behavior to ensure in-proc payload compatibility with dotnet-isolated
as the FUNCTIONS_WORKER_RUNTIME
value
#10439
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… match with deployed payload
kshyju
commented
Aug 28, 2024
kshyju
force-pushed
the
shkr/handle_dotnet_worker_channel
branch
from
August 29, 2024 17:25
1bd8f81
to
5ecb2e7
Compare
kshyju
commented
Aug 29, 2024
test/WebJobs.Script.Tests.Integration/WebHostEndToEnd/WebJobsStartupEndToEndTests.cs
Show resolved
Hide resolved
satvu
reviewed
Aug 29, 2024
brettsam
reviewed
Aug 29, 2024
src/WebJobs.Script/Workers/Rpc/FunctionRegistration/RpcFunctionInvocationDispatcher.cs
Show resolved
Hide resolved
src/WebJobs.Script/Workers/Rpc/FunctionRegistration/RpcFunctionInvocationDispatcher.cs
Outdated
Show resolved
Hide resolved
mathewc
reviewed
Aug 29, 2024
mathewc
reviewed
Aug 29, 2024
mathewc
reviewed
Aug 29, 2024
kshyju
force-pushed
the
shkr/handle_dotnet_worker_channel
branch
from
August 29, 2024 20:18
8efc5bc
to
bf3f611
Compare
kshyju
commented
Aug 29, 2024
kshyju
changed the title
Fallback behavior when FUNCTIONS_WORKER_RUNTIME does not match with metadata from app payload
Fallback behavior to ensure in-proc payload compatibility with Aug 29, 2024
dotnet-isolated
as the FUNCTIONS_WORKER_RUNTIME
value
kshyju
requested review from
mathewc,
mattchenderson,
satvu,
cjaliaga and
brettsam
August 30, 2024 14:58
cjaliaga
approved these changes
Aug 30, 2024
mathewc
approved these changes
Sep 3, 2024
src/WebJobs.Script/Workers/Rpc/FunctionRegistration/RpcFunctionInvocationDispatcher.cs
Outdated
Show resolved
Hide resolved
brettsam
approved these changes
Sep 3, 2024
kshyju
added a commit
that referenced
this pull request
Sep 4, 2024
…t-isolated` as the `FUNCTIONS_WORKER_RUNTIME` value (#10439) * Adding diagnostic warning/error when function worker runtime does not match with deployed payload * Making the new condition specific to "dotnet-isolated" worker to reduce impact. * Adding a test * PR feedback fixes * Missed release notes in last push * Removed an unnecessary code change. * Minor cleanup * Minor cleanup- made a method private and vairable renaming * Updating HostingConfig test to reflect the new hosting config property addition. * PR Feedback updates. * Fix test to reflect renaming changes from PR feedback.
kshyju
added a commit
that referenced
this pull request
Sep 4, 2024
…t-isolated` as the `FUNCTIONS_WORKER_RUNTIME` value (#10439) (#10449) * Adding diagnostic warning/error when function worker runtime does not match with deployed payload * Making the new condition specific to "dotnet-isolated" worker to reduce impact. * Adding a test * PR feedback fixes * Missed release notes in last push * Removed an unnecessary code change. * Minor cleanup * Minor cleanup- made a method private and vairable renaming * Updating HostingConfig test to reflect the new hosting config property addition. * PR Feedback updates. * Fix test to reflect renaming changes from PR feedback.
Merged
9 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This update addresses the issue of running a function app where the
FUNCTIONS_WORKER_RUNTIME
setting does not match the function metadata from the deployed code. For example, if a function app is configured with"dotnet-isolated"
as theFUNCTIONS_WORKER_RUNTIME
but has an in-process (in-proc) app payload deployed, this scenario previously worked in version 4.34.However, in version 4.35, a change was introduced (see this PR) that restricts the use of the dotnet-isolated worker configuration to only when the app is running in placeholder mode. This change was intentional to ensure that
FunctionsNetHost
starts only in placeholder mode. However, it inadvertently caused issues for incorrectly configured apps (i.e., those with an in-proc payload and a"dotnet-isolated"
FUNCTIONS_WORKER_RUNTIME
value), as this new behavior prevents the creation of the worker configuration instance, thereby stopping the function app from running.This PR includes changes to temporarily support this use case while also emitting a diagnostic warning to customers. The intention is to remove this support in a future release.
Why it works in 4.34
The reason it works in 4.34 is we update the "Language" property of function metadata to "dotnet-isolated" (the language present in the workerconfig instance). Code here and here). Having this change (Language in function metadata entries matching with FUNCTIONS_WORKER_RUNTIME
) and having at least one workerconfig instance to match the worker runtime value (dotnet-isolated) make things works.
Pull request checklist
IMPORTANT: Currently, changes must be backported to the
in-proc
branch to be included in Core Tools and non-Flex deployments.in-proc
branch is not requiredrelease_notes.md
Additional information
Additional PR information