Function App not showing up on list of functions after deployment from VS Code (V2 Python Programming Model)

Stephen Funk 40 Reputation points
2023-04-21T20:08:26.0333333+00:00

Hey community, I am having trouble deploying a simple Python script to Azure Function Apps through VS Code (which uses Azure CLI in the background, I assume). My app runs fine locally, and my code looks like it gets uploaded okay. However, when I go to the "Functions" tab in the developer console, the function name is not listed. I also can't make API calls to the endpoints that I expect to exist after development. Any suggestions on what might be causing this? DETAILS My codes contains one well-formatted app defined using the V2 Python Programming Model User's image

My function app has the name "umr" and route "parse_umr". I can confirm that this name/route scheme works when I enter debugging mode (which runs func start). The name registers correctly... User's image

, and I can call my app with a HTTP request to localhost... User's image

My code is copied to Azure Function Apps correctly I publish my code to Azure using the Azure Extension on VS Code.User's image

I believe that VS Code runs Azure CLI commands in the background to zip and deploy my code. Regardless of how it is accomplished, my code is uploaded correctly. I can see my code files in the Azure console.User's image

However, when I navigate to the Functions tab, nothing appears. The "umr" function is not listed. User's image

I also cannot send requests to the {my-app}.../api/parse_umr endpoint. Notice the 404 error here. User's image

I have tried clicking "Refresh", redeploying the code, etc., but nothing will make my app show up or endpoint register. This issue has happened to me before The last time I deployed a Functions App I had the same issue. Everything went well, but my function's name didn't register. I decided to sleep on the issue, and when I woke up, the problem had resolved itself. This was nice, but I don't want to wait 8 hours for my deployments to work. Is there something I can do to speed up whatever function registration process is going on in the backend? Thank you in advance.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,908 questions
0 comments No comments
{count} votes

6 answers

Sort by: Most helpful
  1. Ryan Hill 30,281 Reputation points Microsoft Employee Moderator
    2023-04-30T17:26:57.6966667+00:00

    I ran into the same issue as you. We're missing the following setting in your environment,

    When you're using the new programming model, enable the following app setting in the local.settings.json file, as shown here:

    "AzureWebJobsFeatureFlags": "EnableWorkerIndexing"
    

    Azure Function Application Settings

    Once added, you function will show appropriately.

    Functions List in Azure Portal

    I created my function through the portal after I ran into issues with using the Azure Tools VS Code extension. Upon doing this, this setting wasn't propagated from the local.settinsg.json which did have the setting during deployment.

    4 people found this answer helpful.

  2. jatin.gandhi 10 Reputation points
    2023-08-24T05:31:52.38+00:00

    I'm also facing the same issue with the V2 programming model. I had "AzureWebJobsFeatureFlags": "EnableWorkerIndexing" this environment in place too but still, it didn't work. I tried deploying my function app in both the consumption and premium plans but I still have the same issue (functions not showing up in the Function App).

    I have migrated back to the V1 model as I couldn't find any solution.

    2 people found this answer helpful.
    0 comments No comments

  3. Milan van Roessel 10 Reputation points
    2024-07-17T11:04:39.6066667+00:00

    User's image

    User's image

    What worked for me was adding a folder with the function name and adding a function.json and the following code.

    2 people found this answer helpful.

  4. Ben VanDerPloeg 5 Reputation points
    2024-05-03T18:28:27.18+00:00

    Same issue here. The "AzureWebJobsFeatureFlags": "EnableWorkerIndexing" setting is properly configured (it has been for the lifetime of the app). Deployments were working fine until today. Also tried restarting function app/redeploying etc. function_app.py is visible from the "App Files" tab. I'm doing zip deployment through azure CLI.

    1 person found this answer helpful.
    0 comments No comments

  5. Daria Lyubaeva 5 Reputation points
    2024-07-01T17:19:49.12+00:00

    Same issue here, "AzureWebJobsFeatureFlags": "EnableWorkerIndexing" is configured, restarting the app does not help, redeploying also does not help.

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.