Azure / Azure/azure-functions-core-tools
Python -m v2 programming model will not start by default on HTTP trigger without AzureWebJobsStorage
- Dominant language
- C#
- Stars
- 1.5k
- Forks
- 498
- Avg merge
- 4d 20h
- Merged PRs (30d)
- 14
Description
Core Tools Version: 4.0.4829 Commit hash: N/A (64-bit) << using Rosetta and x64 core tools (not a mac M1 bug)
Function Runtime Version: 4.11.2.19273
OS: MacOS Monterey 12.6, Mac M1 Pro
In the new programming model, I feel it's a regression that HTTP triggers require AzureWebJobStorage. As a result the default `func init` `func start` flow fails, and you need to fulfill the storage account either with a real resource or azurite. This impacts the default case, and the top 1-2 triggers.
Can we please revisit?
Repro
```console
paulyuk@Pauls-MBP-2 ~/src/functions/trynewpythonmodel1 func init --worker-runtime python -m v2
Found Python version 3.9.6 (python3).
The new Python programming model is in public preview. Learn more at https://aka.ms/pythonprogrammingmodel
Writing requirements.txt
Writing function_app.py
Writing .gitignore
Writing host.json
Writing local.settings.json
Writing /Users/paulyuk/src/functions/trynewpythonmodel1/.vscode/extensions.json
✘ paulyuk@Pauls-MBP-2 ~/src/functions/trynewpythonmodel1 pip3 install -r requirements.txt
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: azure-functions in /Users/paulyuk/Library/Python/3.9/lib/python/site-packages (from -r requirements.txt (line 5)) (1.12.0)
WARNING: You are using pip version 21.2.4; however, version 22.3 is available.
You should consider upgrading via the '/Library/Developer/CommandLineTools/usr/bin/python3 -m pip install --upgrade pip' command.
paulyuk@Pauls-MBP-2 ~/src/functions/trynewpythonmodel1 func start
Found Python version 3.9.6 (python3).
Azure Functions Core Tools
Core Tools Version: 4.0.4829 Commit hash: N/A (64-bit)
Function Runtime Version: 4.11.2.19273
[2022-10-21T20:21:35.901Z] A host error has occurred during startup operation '65491219-bd78-4cc3-9270-69c490fb4d3a'.
[2022-10-21T20:21:35.903Z] Microsoft.Azure.WebJobs.Extensions.DurableTask: Unable to resolve the Azure Storage connection named 'Storage'.
Value cannot be null. (Parameter 'provider')
```
Note, I'm also surprised the model is trying to use DurableTasks here and errors out on that. Why is that a new dependency?
Contributor guide
Research direction
Reproduce the failure with `func init --worker-runtime python -m v2` followed by `func start`, without AzureWebJobsStorage or Azurite. Trace why the HTTP-triggered Python v2 startup resolves DurableTask and the `Storage` connection; done when the default flow starts without requiring storage, or the required setup is generated and documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, python
- Domain
- cli, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100