Skip to content

Update language worker to support parsing command-line arguments prefix with functions-<argumentname> #992

@Francisco-Gamino

Description

@Francisco-Gamino

The command-line arguments that the language worker receives from the Functions Host have generic names (such as 'host' and 'port'). This can cause conflicts with other environment variables in certain environments. To address this issue, the Functions Host will now send a new set of arguments prefixed with functions-<argumentname>. This will be in addition to the existing arguments.

With the current parsing implementation, the language worker throws and it is not able to start given that the new prefix options are unknown, see error below:

ERROR(S):
  Option 'functions-uri' is unknown.
  Option 'functions-workerid' is unknown.
  Option 'functions-requestid' is unknown.
  Option 'functions-grpcmaxmessagelength' is unknown.

To resolve the language worker parsing issue, we need to do the following:

  1. Add support for the new prefix arguments.
  2. Ignore unknown arguments (this will be useful in preparation for number 3).
  3. After the Functions Host changes have propagated, and we have a Core Tools version with this new Functions Host, we can remove the parsing support for the old arguments.

This is the PR that contains the Functions Host changes: Azure/azure-functions-host#9514.

/cc @fabiocav @kshyju

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions