Azure functions not listed after publishing the containing Function App from Azure CLI

Amir Katz 65 Reputation points
2023-01-30T09:29:52.99+00:00

I defined a Python script that implements an HTTP trigger function. The development & deployments are done with 'az' and 'func' CLIs, so all the supporting files are in the folder (requirements.txt, local_settings.json, .funcignore, etc.)

Next step - create the Function App - no errors.

Next step - publish the Function App (using the CLI 'func azure functionapp publish') - works. However, the last messages from the publish command are supposed to be the list of functions in the app, but nothing is listed.

When I navigate to the published Function App in Azure portal and navigate to Functions, the list is also empty.

I saw postings with some hacks (send some HTTP post messages to related URLs), but it did not help.

I also tried the solution from here (https://stackoverflow.com/questions/74846943/azure-function-published-to-app-from-cli-not-listed-under-functions) but it did not help either.

The CLI versions that I have installed are the latest: azure-cli 2.44.1, func 4.0.4915.

Thanks.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,263 questions
{count} votes

4 answers

Sort by: Most helpful
  1. MughundhanRaveendran-MSFT 12,421 Reputation points
    2023-02-04T11:02:00.93+00:00

    @Amir Katz

    Please zip your project file and try the zip deployment method to deploy the function and check if it works. Once it is deployed, please restart the function app so that the triggers are synced.

    CLI command:

    az functionapp deployment source config-zip -g <resource_group> -n \ <app_name> --src <zip_file_path>

    https://learn.microsoft.com/en-us/azure/azure-functions/deployment-zip-push#cli


  2. Remo H. Jansen 0 Reputation points
    2023-04-14T10:26:50.01+00:00

    For me, the problem was a missing config settings to enable the V4 version in azure:

    az functionapp config appsettings set --name <FUNCTION_APP_NAME> \
    --resource-group <RESOURCE_GROUP_NAME> \
    --settings AzureWebJobsFeatureFlags=EnableWorkerIndexing
    
    0 comments No comments

  3. Amir Katz 65 Reputation points
    2023-04-23T14:38:05.0033333+00:00

    Thanks for everyone who has answered. After exploring the different deployment options, I have re-visited the Visual Studio Code option and it works with Python programming model V1 (meaning using function.json and init.py). When using VSC, it supports requirements.txt, so one can install any supported Python package. For now, this works for me, so I am not spending time on the other options. I will check again on my next Azure function.


  4. Craig Harris 0 Reputation points
    2023-09-22T20:54:23.02+00:00

    In my case the name of my function was invalid. The publish action didn't throw any errors, but the function never showed up in portal. Hope this helps some one!

    0 comments No comments