Azure / Azure/azure-functions-core-tools

Setting ENV variables via local.settings.json triggers existing M1 error

Open
#3,497 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
1.5k
Forks
498
Avg merge
4d 20h
Merged PRs (30d)
14

Description

I just found a bug/edge case, that in theory it was ironed out.

It turns out that when I adding an `env` variable to `local.settings.json`, that contains a `list` or a `dict` as value, the already M1 tracked bug resurfaces

```
[2023-10-19T13:26:57.042Z] Failed to initialize worker provider for: /opt/homebrew/Cellar/azure-functions-core-tools@4/4.0.5413/workers/python
[2023-10-19T13:26:57.042Z] Microsoft.Azure.WebJobs.Script: Architecture Arm64 is not supported for language python.
```

Just by adding
```json
{
"IsEncrypted": false,
"Values": {
"FUNCTIONS_WORKER_RUNTIME": "node",
"FUNCTIONS_EXTENSION_VERSION": "~4",
"AzureWebJobsFeatureFlags": "EnableWorkerIndexing",
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"AzureWebJobsDashboard": "UseDevelopmentStorage=true",
"AzureTaskHub": "parallelTaskProcessor",
"list": ["one"],
"dict": {"i": {"like": "turtles"}}
},
"Host": {
"LocalHttpPort": 7072,
"CORS": "*",
"CORSCredentials": false
}
}
```

Perhaps those types of values are not supported at all, but it is strange that this issue appears for that

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the startup failure with the provided local.settings.json, especially the list and dict values under Values, and compare it with scalar-only settings. Trace the local settings loading and worker initialization entry points to determine whether these value types are supported; done means the behavior is corrected or the supported-value limitation is clearly established.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.