Summary
We hit a catastrophic silent failure mode in Python v2 function indexing: a single trigger-binding parameter mismatch (_req instead of req on @app.route) caused the worker to effectively drop registration for the whole app (all routes 404), with no actionable ERROR log pointing to the offending function.
Minimal repro shape
import azure.functions as func
app = func.FunctionApp(http_auth_level=func.AuthLevel.ANONYMOUS)
@app.function_name(name="health")
@app.route(route="health", methods=[func.HttpMethod.GET])
async def health(_req: func.HttpRequest) -> func.HttpResponse:
return func.HttpResponse("ok")
With _req (or other non-binding name), production indexing rejects registration. Local unit tests using app.get_functions() can still appear green, which makes this hard to catch pre-deploy.
Requested improvements
-
Log binding rejections at ERROR level with function-level detail.
Example expected message:
ERROR: Function 'health' rejected: @app.route expects first parameter 'req', got '_req'. Function not registered.
-
Avoid all-or-nothing registration failure.
Prefer registering valid functions and skipping only invalid ones (with explicit logs), instead of ending in an apparent "0 functions" state for the full app.
-
Validate binding-name mismatches earlier (decoration-time / app.get_functions() path).
Today this mismatch can slip through local tests and fail only in deployed worker indexing.
Why this matters
This is a high-severity operator experience issue: a one-character source bug can lead to full app outage with no direct diagnostic surface to localize root cause quickly.
References
Summary
We hit a catastrophic silent failure mode in Python v2 function indexing: a single trigger-binding parameter mismatch (
_reqinstead ofreqon@app.route) caused the worker to effectively drop registration for the whole app (all routes 404), with no actionable ERROR log pointing to the offending function.Minimal repro shape
With
_req(or other non-binding name), production indexing rejects registration. Local unit tests usingapp.get_functions()can still appear green, which makes this hard to catch pre-deploy.Requested improvements
Log binding rejections at ERROR level with function-level detail.
Example expected message:
ERROR: Function 'health' rejected: @app.route expects first parameter 'req', got '_req'. Function not registered.Avoid all-or-nothing registration failure.
Prefer registering valid functions and skipping only invalid ones (with explicit logs), instead of ending in an apparent "0 functions" state for the full app.
Validate binding-name mismatches earlier (decoration-time /
app.get_functions()path).Today this mismatch can slip through local tests and fail only in deployed worker indexing.
Why this matters
This is a high-severity operator experience issue: a one-character source bug can lead to full app outage with no direct diagnostic surface to localize root cause quickly.
References