Skip to content

Improved handling of env reload request - handles older version of worker sdk#1955

Merged
kshyju merged 6 commits intomainfrom
shkr/check_worker_version_in_nativeplaceholder
Oct 11, 2023
Merged

Improved handling of env reload request - handles older version of worker sdk#1955
kshyju merged 6 commits intomainfrom
shkr/check_worker_version_in_nativeplaceholder

Conversation

@kshyju
Copy link
Copy Markdown
Member

@kshyju kshyju commented Oct 10, 2023

Updating native placeholder to handle specialization request for function app payload which has older version worker package.

We will be updating the worker.sdk package to include a new property called "isSpecializable" canUsePlaceholder the "worker.config.json". The native placeholder will look for this property and if not present, it will the environment reload response with "failure" as status and a special exception. On the host we will check the exception associated with the failed env reload response and if it is this special exception. we will execute the fallback code - which is to shut down this channel and start a new channel with the customer payload dll.

For reference - the host changes are going to look like this: Azure/azure-functions-host#9602 - This is the host version I used to test my changes locally.

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
  • I have added all required tests (Unit tests, E2E tests)

Additional information

Additional PR information

Comment thread host/src/FunctionsNetHost/Grpc/WorkerConfig/WorkerDescription.cs Outdated
Comment thread host/src/FunctionsNetHost/Grpc/WorkerConfig/WorkerConfigUtils.cs Outdated
Comment thread host/src/FunctionsNetHost/Grpc/IncomingGrpcMessageHandler.cs Outdated
Comment thread host/src/FunctionsNetHost/Grpc/WorkerConfig/WorkerConfigUtils.cs Outdated
Comment thread host/src/FunctionsNetHost/Grpc/WorkerConfig/WorkerConfigUtils.cs
Comment thread host/src/FunctionsNetHost/Grpc/IncomingGrpcMessageHandler.cs
Switched to async overload for deserialization.
Updated global.json to use rc2
@mattchenderson mattchenderson added the perf: cold-start Tracking performance items related to cold start label Oct 11, 2023
@mattchenderson mattchenderson linked an issue Oct 11, 2023 that may be closed by this pull request
Comment thread host/src/FunctionsNetHost/Grpc/WorkerConfig/WorkerDescription.cs Outdated
@kshyju kshyju merged commit da4e1f2 into main Oct 11, 2023
@kshyju kshyju deleted the shkr/check_worker_version_in_nativeplaceholder branch October 11, 2023 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

perf: cold-start Tracking performance items related to cold start

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prevent placeholder attempts with older versions of the SDK

5 participants