Open kshyju opened 2 years ago
@kshyju I took a look at https://github.com/Azure/azure-functions-dotnet-worker/pull/1091/, and I'm confused by workerOptions
. Is that unique to .NET? Can you explain how it works?
Specifically, I'm confused how it would handle the placeholder specialization scenario where the worker gets an initRequest with a dummy app and later a functionEnvironmentReloadRequest with the real app. AFAIK the only time we can set worker capabilities is during worker init, right? So seems like for placeholders the user would have no way to set these options
Discussed with @kshyju offline and filed https://github.com/Azure/azure-functions-host/issues/8877 which would be a prereq for us doing this
The prereq in the host was fixed: https://github.com/Azure/azure-functions-host/issues/8983. So we could theoretically support a flag now to let users specify this option
The worker PR to allow updating capabilities is here: https://github.com/Azure/azure-functions-nodejs-worker/pull/720
Once that is merged, the library would actually be able to expose this particular capability to users if we want to, so moving the issue to the library repo.
For trigger payloads of collection type(ex: event hub trigger payload with batched messages), host will skip empty entries by default. We recently made a host level change so that host will not skip empty entries if worker includes
IncludeEmptyEntriesInMessagePayload
capability when advertising the capability list to host. The dotnet worker was updated to send this capability if user opts in for that(In the next major version, we will enable it by default). node worker should consider making similar change.