I have a simple python Azure function on consumption plan.
It runs well on local very well. Code below.
import logging
import azure.functions as func
def main(req: func.HttpRequest) -> func.HttpResponse:
logging.info('Python HTTP trigger function processed a request.')
name = req.params.get('name')
if not name:
try:
req_body = req.get_json()
except ValueError:
pass
else:
name = req_body.get('name')
if name:
return func.HttpResponse(f"Hello, {name}. This HTTP triggered function executed successfully.")
else:
return func.HttpResponse(
"This HTTP triggered function executed successfully. Pass a name in the query string or in the request body for a personalized response.",
status_code=200
)
when deploying to Server, all the code and necessary packages get deployed well as well.
However, the http trigger's are not at all getting synchronized.
the error is either.
11:25:36 pm MyAzureFunctionConsumptionPlan04: Uploading built content /home/site/artifacts/functionappartifact.squashfs for linux consumption function app...
11:25:36 pm MyAzureFunctionConsumptionPlan04: Resetting all workers for MyAzureFunctionConsumptionPlan04.azurewebsites.net
11:25:37 pm MyAzureFunctionConsumptionPlan04: Deployment successful.
11:25:52 pm MyAzureFunctionConsumptionPlan04: Syncing triggers...
11:25:54 pm MyAzureFunctionConsumptionPlan04: Querying triggers...
11:25:57 pm MyAzureFunctionConsumptionPlan04: No HTTP triggers found.
or it just creates one trigger called WarmUp, which is not used in my code.
11:16:57 pm MyAzureFunctionConsumptionPlan01: Querying triggers...
11:16:59 pm MyAzureFunctionConsumptionPlan01: HTTP Trigger Urls:
WarmUp: https://MyAzureFunctionConsumptionPlan01.azurewebsites.net/api/%7Bx:regex(^(warmup|csharphttpwarmup)$)%7D
The trigger I'm using, viz. myhttptrigger does not get synchronized at all. What could possibly be wrong.
I've tried all the steps from microsoft support article, over here : https://learn.microsoft.com/en-us/answers/questions/249753/azure-functions-are-not-visible-in-the-function-li.html including
restarting the Azure function,
recreating the Azure function from scratch and also
verifying the files manually on ssh
querying the kudu console,
hitting the management url(via REST API).
none of them seem to have a positive solution as yet!