Errors in new programming model can cause functions to no longer be listed
Check for a solution in the Azure portal
For issues in production, please check for a solution to common issues in the Azure portal before opening a bug. In the Azure portal, navigate to your function app, select Diagnose and solve problems from the left, and view relevant dashboards before opening your issue.
Investigative information
Please provide the following:
- Timestamp: 2024-03-19T19:27:42.475Z
- Function App version: 4.31.1.1
- Function App name: v2-python-0319
- Function name(s) (as appropriate):
http_trigger - Invocation ID: Not applicable
- Region: East US
Repro steps
Provide the steps required to reproduce the problem:
- Create a Python Function App in East US with a Consumption plan.
- Create an HTTP trigger function in this app (with default name and authorization level).
- Edit the function using the Code + Test editor in such a way as to introduce a syntax error.
- Save the function.
- Go back to the function app overview.
Expected behavior
The HTTP trigger function should be listed in the Functions tab.
Actual behavior
The HTTP trigger function is no longer listed in the Functions tab. There is no indication of why there are no longer any functions being listed.
Known workarounds
Fix the syntax error:
- Go to the App files page to open the
function_app.pyfile. - Fix the syntax error.
- Save the file.
- Go back to the App overview page to refresh the list of functions.
Additional context
In this simplified repro, it is possible to fix the error. Generally speaking, however, one or more errors may cause the list of functions to be empty with no easy way to (a) know what errors there were and (b) navigate to the files with issues and correct those errors.
The Azure portal depends on function metadata being available so it can present a list of functions and a code editor and configuration management experience for each function. However, in the new programming models where configuration is stored with the code, errors which cause failures when processing the function metadata stored there can cause the function metadata to become unavailable, resulting in a significantly degraded portal editing and management experience.
The impact is not limited to the Azure portal. Once an error has occurred which causes the function metadata to become unavailable, Azure CLI and REST API operations will also be impacted.
@joechung-msft the desired behavior listed here may not be feasible, as the host won't know anything about the functions in the app.
We need to define a flow that enables the host to return worker provided indexing failure details to ensure those are surfaced.