Azure Function successfully published but missing from Azure Portal

断了今生、忘了曾经 提交于 2020-12-15 06:09:25

问题


My Function app is not showing up in the Portal though it publishes successfully from local machine.

Example:

Success!:

Failure:

Tried:

  • Visiting https:myapp.azurewebsites.net
  • Visiting https://myapp.scm.azurewebsites.net/api/deployments
    • Last deployment looks good:
{
        "id": "<redacted>",
        "status": 4,
        "status_text": "",
        "author_email": "N/A",
        "author": "<redacted>",
        "deployer": "Push-Deployer",
        "message": "Created via a push deployment",
        "progress": "",
        "received_time": "2020-10-23T20:38:47.1069702Z",
        "start_time": "2020-10-23T20:38:47.3075338Z",
        "end_time": "2020-10-23T20:39:19.3128742Z",
        "last_success_end_time": "2020-10-23T20:39:19.3128742Z",
        "complete": true,
        "active": true,
        "is_temp": false,
        "is_readonly": true,
        "url": "https://myapp.scm.azurewebsites.net/api/deployments/5e446e26fc934a75b4ab7241ce589e9f",
        "log_url": "https://myapp.scm.azurewebsites.net/api/deployments/5e446e26fc934a75b4ab7241ce589e9f/log",
        "site_name": "myapp"
    }
  • Visiting https://myapp.scm.azurewebsites.net/api/deployments/5e446e26fc934a75b4ab7241ce589e9f/log
    • Steps looks good:
[
    {
        "log_time": "2020-10-23T20:38:47.2134775Z",
        "id": "a9bfd9e3-dee2-4bfc-9e82-9b003d3df991",
        "message": "Updating submodules.",
        "type": 0,
        "details_url": null
    },
    {
        "log_time": "2020-10-23T20:38:47.2820867Z",
        "id": "e980bad8-ee6a-467f-98ea-c78135e29eeb",
        "message": "Preparing deployment for commit id '5e446e26fc'.",
        "type": 0,
        "details_url": null
    },
    {
        "log_time": "2020-10-23T20:38:47.4606839Z",
        "id": "961ce7eb-2388-4a36-9646-32a7455fce10",
        "message": "Repository path is /tmp/zipdeploy/extracted",
        "type": 0,
        "details_url": null
    },
    {
        "log_time": "2020-10-23T20:38:47.5141536Z",
        "id": "1f1ad9b0-d5bf-41f0-ad77-537c2da9a010",
        "message": "Running oryx build...",
        "type": 1,
        "details_url": "https://myapp.scm.azurewebsites.net/api/deployments/5e446e26fc934a75b4ab7241ce589e9f/log/1f1ad9b0-d5bf-41f0-ad77-537c2da9a010"
    },
    {
        "log_time": "2020-10-23T20:39:14.3176646Z",
        "id": "45fc756f-4873-469c-8adf-7b8968ceec95",
        "message": "Writing the artifacts to a Zip file",
        "type": 0,
        "details_url": null
    },
    {
        "log_time": "2020-10-23T20:39:18.8047683Z",
        "id": "3f9b3434-dcbc-496e-8480-d3bff123159e",
        "message": "Running post deployment command(s)...",
        "type": 0,
        "details_url": null
    },
    {
        "log_time": "2020-10-23T20:39:18.9330242Z",
        "id": "11e6d453-3aa0-4afd-a20e-7edc6369d774",
        "message": "Triggering recycle (preview mode disabled).",
        "type": 0,
        "details_url": null
    },
    {
        "log_time": "2020-10-23T20:39:19.0915157Z",
        "id": "43df8884-3066-434b-91ed-6b2bbfac6236",
        "message": "Deployment successful.",
        "type": 0,
        "details_url": null
    }
]
  • I even created a whole new Function App (in the same resource group, using the same App Service Plan) and tried publishing the Function to it... no go.
  • I have 6 or 7 python Functions in prod, this is not my first deployment.

Is this a known issue that is being worked on? How do I get the Function to be visible in Portal?


回答1:


I was able to determine the issue. It was my fault.

  • SSH into Function app via https://myFunctionName.scm.azurewebsites.net/webssh/host
  • ls /home/site/wwwroot/myFunctionName
  • The main python filename had a space " " in the filename
  • Was: __init__ .py
  • Should have been: __init__.py
  • Fixed this and republished


来源:https://stackoverflow.com/questions/64507609/azure-function-successfully-published-but-missing-from-azure-portal

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!