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

Send command line args with non-generic names to language worker #9504

Closed
4 tasks done
kshyju opened this issue Aug 31, 2023 · 1 comment · Fixed by #9514
Closed
4 tasks done

Send command line args with non-generic names to language worker #9504

kshyju opened this issue Aug 31, 2023 · 1 comment · Fixed by #9514
Assignees

Comments

@kshyju
Copy link
Member

kshyju commented Aug 31, 2023

The command line arguments we currently send to language worker process has generic names (HOST, PORT etc). This would cause conflict with other environment variables in certain environments. For example, dotnet isolated in Linux + VNET is one of those cases where the PORT gets overwritten when the customer calls "ConfigureAppConfiguration" in the main method (as shown in Azure/azure-functions-dotnet-worker#1547)

We want to send these args with FUNCTIONS_ prefix. Initially we will send both (ex: HOST and FUNCTIONS_HOST) and once all language workers adopts to the new arguments & we are confident that no existing apps are using the old approach, we shall consider retiring the old ones.

Language workers are advised to use the new command line arguments if present, and fallback to existing one.

We also decided to combine the host and port part to a single argument "functions-uri".

For example, for dotnet-isolated worker, we will do something like below

grpcWorkerStartupOption.RequestId= config["functions-requestid"] ?? config["requestid"];

where config is an instance of IConfiguration which contains all command line arguments. We will first check FUNCTIONS_HOST entry is present and use it's value if present, else will use host.

Issues tracking fixes on language workers side to support the new arguments (to not throw while parsing)

@kshyju kshyju self-assigned this Aug 31, 2023
@jviau
Copy link
Contributor

jviau commented Sep 6, 2023

  1. Can we combine this into FUNCTIONS_URL?
  2. For command line, can we make sure to use --functions-url and make sure it maps to FUNCTIONS_URL in IConfiguration? (I think this may be the default behavior, but would need to verify).

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

Successfully merging a pull request may close this issue.

3 participants