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

Handling env reload response from native placeholder for failure case. #9602

Merged
merged 8 commits into from Oct 12, 2023

Conversation

kshyju
Copy link
Member

@kshyju kshyju commented Oct 10, 2023

If customer payload for dotnet isolated app is using an older version of worker package (which does not have the support to handle environment reload request via native placeholder, currently the request will crash. We recently updated the NativePlaceholder to handle this case and return a response for the env reload request. That version of Native placeholder is included in this PR. We also updated the code to handle the new response. If the failure is caused due to customer payload having an older version of package, then we will execute our fallback logic, which is to shutdown the placeholder channel and start a new channel where we will load the customer assembly directly using dotnet.exe.

resolves #9606

Pull request checklist

  • My changes do not require documentation changes
    • Otherwise: Documentation issue linked to PR
  • My changes should not be added to the release notes for the next release
    • Otherwise: I've added my notes to release_notes.md
  • My changes do not need to be backported to a previous version
    • Otherwise: Backport tracked by issue/PR #issue_or_pr
  • My changes do not require diagnostic events changes
    • Otherwise: I have added/updated all related diagnostic events and their documentation (Documentation issue linked to PR)
  • I have added all required tests (Unit tests, E2E tests)

Additional information

Additional PR information

@kshyju kshyju marked this pull request as ready for review October 12, 2023 00:37
@kshyju kshyju requested a review from a team as a code owner October 12, 2023 00:37
@kshyju kshyju merged commit d6a572b into dev Oct 12, 2023
9 checks passed
@kshyju kshyju deleted the shkr/check_dni_worker_supports_specialization branch October 12, 2023 18:46
VpOfEngineering pushed a commit that referenced this pull request Oct 12, 2023
#9602)

* Handling env reload response from native placeholder for failure case.

* Almost working except one test needs cleanup

* Cleanup

* Cleanup

* Fixing Worker.Extensions.Http package version to align with Http.AspNetCore package.

* Logging error as it is received from the worker.

* DotNetIsolatedNativeHost package to 1.0.2

* Inlining a variable (Reverting to previous version)
@VpOfEngineering VpOfEngineering mentioned this pull request Oct 12, 2023
8 tasks
VpOfEngineering pushed a commit that referenced this pull request Oct 12, 2023
#9602)

* Handling env reload response from native placeholder for failure case.

* Almost working except one test needs cleanup

* Cleanup

* Cleanup

* Fixing Worker.Extensions.Http package version to align with Http.AspNetCore package.

* Logging error as it is received from the worker.

* DotNetIsolatedNativeHost package to 1.0.2

* Inlining a variable (Reverting to previous version)
@VpOfEngineering VpOfEngineering mentioned this pull request Oct 12, 2023
8 tasks
@safihamid
Copy link
Contributor

    private bool UsePlaceholderChannel(IRpcWorkerChannel channel)

@kshyju remind me again, do we need to shutdown the channel immediately or can wait like 5 sec? trying to see if this will have negative cold start impact on existing apps once we switch to opt out only


Refers to: src/WebJobs.Script/Workers/Rpc/WebHostRpcWorkerChannelManager.cs:160 in 42e4df3. [](commit_id = 42e4df3, deletion_comment = False)

VpOfEngineering added a commit that referenced this pull request Oct 12, 2023
* Updating patch version

* Sending command line args with functions- prefix to prevent conflicts (#9514)

* Sending a second copy of command line args with "FUNCTIONS_" prefix

* Cleanup

* Sending a second copy of command line args with "FUNCTIONS_" prefix

* switched to functions- prefix

* Removed duplicate port from functions_uri

* Switching to kebab case for the new args

* Update test

* Update native placeholder package to handle new args

* Update release notes.

* Limit dotnet-isolated specialization to 64 bit host process (#9553)

* Skipping native placeholder specialization if host is not 64 bit process

* formatting linting fix

* Stylecop fix.

* fix indentation

* Adding E2E test.

* Improving log message.

* Switch from LogDebug to LogInformation

* Fix tests to reflect logging changes

* Logging with EventId

* Logging using an event name

* Updated release notes after rebase merge

* Handling env reload response from native placeholder for failure case. (#9602)

* Handling env reload response from native placeholder for failure case.

* Almost working except one test needs cleanup

* Cleanup

* Cleanup

* Fixing Worker.Extensions.Http package version to align with Http.AspNetCore package.

* Logging error as it is received from the worker.

* DotNetIsolatedNativeHost package to 1.0.2

* Inlining a variable (Reverting to previous version)

* Updating release notes for 4.27.5

* Update PowerShell Language Workers 7.0 (to version 4.0.2973), 7.2 (to version 4.0.2974), and 7.4 (to version 4.0.2975)  (#9528)

* Upgrade PowerShell language worker 7.4 to 4.0.2975

* Upgrade PowerShell language worker 7.2 to 4.0.2974

* Upgrade PowerShell language worker 7.0 to 4.0.2973

* Update release notes

* Update Java Worker Version to 2.13.0 (#9544)

* Update Java Worker Version to 2.13.0

* Update release_notes.md for Java worker

---------

Co-authored-by: AzureFunctionsJava <funcdisc@microsoft.com>

---------

Co-authored-by: azfuncgh <azfuncgh@github.com>
Co-authored-by: Shyju Krishnankutty <connectshyju@gmail.com>
Co-authored-by: Francisco Gamino <Francisco-Gamino@users.noreply.github.com>
Co-authored-by: Shreyas Gopalakrishna <11889130+shreyas-gopalakrishna@users.noreply.github.com>
Co-authored-by: AzureFunctionsJava <funcdisc@microsoft.com>
@kshyju
Copy link
Member Author

kshyju commented Oct 13, 2023

    private bool UsePlaceholderChannel(IRpcWorkerChannel channel)

@kshyju remind me again, do we need to shutdown the channel immediately or can wait like 5 sec? trying to see if this will have negative cold start impact on existing apps once we switch to opt out only

Refers to: src/WebJobs.Script/Workers/Rpc/WebHostRpcWorkerChannelManager.cs:160 in 42e4df3. [](commit_id = 42e4df3, deletion_comment = False)

Opened #9615 to investigate that.

Francisco-Gamino pushed a commit that referenced this pull request Oct 26, 2023
#9602)

* Handling env reload response from native placeholder for failure case.

* Almost working except one test needs cleanup

* Cleanup

* Cleanup

* Fixing Worker.Extensions.Http package version to align with Http.AspNetCore package.

* Logging error as it is received from the worker.

* DotNetIsolatedNativeHost package to 1.0.2

* Inlining a variable (Reverting to previous version)
VpOfEngineering added a commit that referenced this pull request Nov 16, 2023
* Updating patch version

* Sending command line args with functions- prefix to prevent conflicts (#9514)

* Sending a second copy of command line args with "FUNCTIONS_" prefix

* Cleanup

* Sending a second copy of command line args with "FUNCTIONS_" prefix

* switched to functions- prefix

* Removed duplicate port from functions_uri

* Switching to kebab case for the new args

* Update test

* Update native placeholder package to handle new args

* Update release notes.

* Limit dotnet-isolated specialization to 64 bit host process (#9553)

* Skipping native placeholder specialization if host is not 64 bit process

* formatting linting fix

* Stylecop fix.

* fix indentation

* Adding E2E test.

* Improving log message.

* Switch from LogDebug to LogInformation

* Fix tests to reflect logging changes

* Logging with EventId

* Logging using an event name

* Updated release notes after rebase merge

* Handling env reload response from native placeholder for failure case. (#9602)

* Handling env reload response from native placeholder for failure case.

* Almost working except one test needs cleanup

* Cleanup

* Cleanup

* Fixing Worker.Extensions.Http package version to align with Http.AspNetCore package.

* Logging error as it is received from the worker.

* DotNetIsolatedNativeHost package to 1.0.2

* Inlining a variable (Reverting to previous version)

* Updating release notes for 4.27.5

* Update PowerShell Language Workers 7.0 (to version 4.0.2973), 7.2 (to version 4.0.2974), and 7.4 (to version 4.0.2975)  (#9528)

* Upgrade PowerShell language worker 7.4 to 4.0.2975

* Upgrade PowerShell language worker 7.2 to 4.0.2974

* Upgrade PowerShell language worker 7.0 to 4.0.2973

* Update release notes

* Update Java Worker Version to 2.13.0 (#9544)

* Update Java Worker Version to 2.13.0

* Update release_notes.md for Java worker

---------

Co-authored-by: AzureFunctionsJava <funcdisc@microsoft.com>

---------

Co-authored-by: azfuncgh <azfuncgh@github.com>
Co-authored-by: Shyju Krishnankutty <connectshyju@gmail.com>
Co-authored-by: Francisco Gamino <Francisco-Gamino@users.noreply.github.com>
Co-authored-by: Shreyas Gopalakrishna <11889130+shreyas-gopalakrishna@users.noreply.github.com>
Co-authored-by: AzureFunctionsJava <funcdisc@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prevent placeholder attempts with older versions of the SDK
6 participants