-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Handle new command line arguments with "functions-" prefix #1897
Conversation
Relevant host change (still in draft because waiting for some lang workers to fix their packages to handle this): https://github.com/Azure/azure-functions-host/pull/9514/files |
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.
While we are enhancing this, couple comments:
- Technically command-line semantics is to start with
--
, then kebab-case the argument. So it would be--functions-request-id
and not--functions-requestid
. - Should we map these into a specific configuration section so they don't get accidentally overriden by something unrelated? Maybe everything under
Functions:Worker
section? (Functions:Worker:HostUri
,Functions:Worker:RequestId
,Functions:Worker:WorkerId
)
@jviau Pushed an update to switch to kebab case. |
…ure/azure-functions-dotnet-worker into shkr/gh-1547_new_cmdline_args
- Removed Host and Port property and using the new Uri property on GrpcWorkerStartupOptions type.
extensions/Worker.Extensions.Rpc/src/ConfigurationExtensions.cs
Outdated
Show resolved
Hide resolved
extensions/Worker.Extensions.Rpc/src/ConfigurationExtensions.cs
Outdated
Show resolved
Hide resolved
extensions/Worker.Extensions.Rpc/src/ConfigurationExtensions.cs
Outdated
Show resolved
Hide resolved
- Using switchMap for commandline configuraton provider. - Mapped the command line args to "Functions:Worker" section in configuration. - Added project reference (Worker.Extensions.Rpc) to Worker.Grpc to reuse the extension method.
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.
Looks great! Only concern is the reference to Extensions.Rpc. I suggest we just duplicate code for now. We can follow up later and see if there is an opportunity to make Extensions.Rpc appropriate for DotNetWorker.Grpc to leverage.
extensions/Worker.Extensions.Rpc/src/ConfigurationExtensions.cs
Outdated
Show resolved
Hide resolved
…"GetFunctionsHostGrpcUri" in DotnetWorker.Grpc
Part of #1900
Resolves #1547
This PR adds the relevant changes to read the new command line arguments we plan to send from the host. See the host issue Azure/azure-functions-host#9504 for understanding the need for this change.
Example of command line argument string host will send to worker process.
Pull request checklist
release_notes.md
Additional information
Additional PR information