Skip to content
This repository has been archived by the owner on Jul 19, 2024. It is now read-only.

Azure devops build fails to deploy python function #45

Open
devslb opened this issue Oct 19, 2019 · 1 comment
Open

Azure devops build fails to deploy python function #45

devslb opened this issue Oct 19, 2019 · 1 comment
Assignees

Comments

@devslb
Copy link

devslb commented Oct 19, 2019

I am trying to deploy a python function to Azure function app using Linux ubuntu-18.04 agent.
It is failing with below error

Syncing triggers...
Request:
Method: POST, RequestUri: 'https://management.azure.com/subscriptions/XXXXXXXX/resourceGroups/XXXXX/providers/Microsoft.Web/sites/YYYYYYY/hostruntime/admin/host/synctriggers?api-version=2015-08-01', Version: 2.0, Content: System.Net.Http.StringContent, Headers:
{
Authorization:
User-Agent: functions-core-tools/2.7.1724
Accept: application/json
x-ms-request-id: b9f510cb-a473-4885-90df-7bf7de5dd730
Content-Type: application/json; charset=utf-8
}
null

Response:
StatusCode: 400, ReasonPhrase: 'Bad Request', Version: 1.1, Content: System.Net.Http.HttpConnection+HttpConnectionResponseContent, Headers:
{
Cache-Control: no-cache
Pragma: no-cache
Strict-Transport-Security: max-age=31536000; includeSubDomains
Server: Microsoft-IIS/10.0
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
x-ms-ratelimit-remaining-subscription-writes: 1198
x-ms-request-id: a98cd971-21f5-42d0-9011-e944e847e5ed
x-ms-correlation-request-id: a98cd971-21f5-42d0-9011-e944e847e5ed
x-ms-routing-request-id: CENTRALUS:20191019T015647Z:a98cd971-21f5-42d0-9011-e944e847e5ed
X-Content-Type-Options: nosniff
Date: Sat, 19 Oct 2019 01:56:46 GMT
Content-Length: 331
Content-Type: application/json; charset=utf-8
Expires: -1
}
{"Code":"Unauthorized","Message":"Encountered an error (Forbidden) from extensions API.","Target":null,"Details":[{"Message":"Encountered an error (Forbidden) from extensions API."},{"Code":"Unauthorized"},{"ErrorEntity":{"Code":"Unauthorized","Message":"Encountered an error (Forbidden) from extensions API."}}],"Innererror":null}

@Hazhzeng
Copy link

Hazhzeng commented Oct 21, 2019

@devslb, thanks for reporting this issue. Currently, this is a known issue related to the sync trigger Azure/Azure-Functions#1170.

The functions core tool deployment takes three step:
pack local content -> publish to function app -> perform synctrigger in Azure Resource Manager

According to your log, the latest content should be published to your Azure function app. If you don't see your function triggers in the portal, try hitting it with any http trigger and wait for 30 seconds.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants