Home > front end >  Redeployment of Azure Function does not happen
Redeployment of Azure Function does not happen

Time:01-31

I am experimenting with an Azure Function in PowerShell to answer a simple HTTP request.

I am editing directly in the Azure Portal.

I do not understand how deployment works. I assume it should directly redeploy after "save".

When I change my code and test it within Azure Portal I get debug results in the console/log and expected results in the HTTP-Output.

However: When I call the function from a browser, it returns different results. I think these are old results, so either the function is not redeployed or some cache / proxy is fooling my browser.

How can I see if redeployment took place after "save" in the AzurePortal? How can I check debug / console output of a real invocation?

CodePudding user response:

First, I run with the default Code from the Http Trigger Function (PowerShell Runtime) - i.e., created in the Azure Portal and edited the Function Code from the Portal itself > Saved > Clicked on Run again.

If we save the function, it will just save the changes in the code. We have to run again the Function for changes made in the Code Logic for new response.

enter image description here

You can see how many times your function in the Azure Function App is executed, in Monitor > Invocations with more information such as Response Code for every invocation (Function Run), Execution Time, enter image description here

And I have updated the Function Code two times after 1st run of the default Code. Here in the Activity Logs, you can see number of times updated the run.ps1 function code updates registered:

enter image description here

Updated Answer:

I have run the Azure Function App PowerShell Http Trigger in the browser tab with its function URL for 4 times and the invocations are display after 4 minutes of time because my function app is hosted in Consumption plan:

enter image description here

CodePudding user response:

Seems the function was "disabled" - after enabling it again all works as expected!

  • Related