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

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

Closed
Francisco-Gamino opened this issue Sep 8, 2023 · 2 comments
Assignees

Comments

@Francisco-Gamino
Copy link
Contributor

Francisco-Gamino commented Sep 8, 2023

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

@fabiocav
Copy link
Member

fabiocav commented Sep 8, 2023

Could you set the parser setting to ignore unknown arguments? The command line parser supports that and it might be a better option than the current strict model. Unless you do that, you might not be able to remove the old option.

@Francisco-Gamino
Copy link
Contributor Author

This issue has been fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants