-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG]: AzureFunctionApp@2 fails to deploy if Private EndPoints exists even with correct network permissions on scm #18503
Comments
We experience the same error here |
Another way to use the work around when using the GUI, is to use the 'Azure App Service Deploy' task and select the App Service type to be Function App on Linux / Function App on Windows. Note that the system clearly tells you that this is not recommended on at least two occasions; when making the App Service type selection and when running the task on the agent, it will give the following message: Nonetheless the Function App is deployed successfully. |
We are running into the same problem. Any updates on this? |
We are also facing same problem. I tried deploying through @jj-halfspace 's step but no luck |
We ran into same situation! |
May I know when this will be fixed? We encounter same issue now @FinVamp1 thanks |
We are experiencing the same. Is this going to be fixed? |
Just wanted to add that I was having the same problem when trying to deploy to a function app I set into a private vNet. I have it with a private link and vnet integration, but configured to allow certain IP's through. I have it set to deny all and I added the Tags AzureDevOps and AzureCloud on the allow list in the tools site (because I'm using the shared build agents and not hosting my own). This worked for deploying a regular app service, and should work for the Function deploy, but does not. I also have my storage account on the same vnet in a different subnet with access granted and the Function Deploy errors because it claims it cannot connect to the storage account. Switching to an App service deploy did deploy my code as @jj-halfspace recommended. |
Come on Microsoft! We need cloud hosted VNET integrated agents already like GitHub does. |
Is there any update on this issue? Experiencing it too, and I would like to know if a fix can be expected, or if a workaround is needed. |
Hello, it's on the backlog for the task and we need to figure out what the right thing is to do. No ETA at present. |
What is the recommended workaround as this does not seem to be on a high priority? Seems like switching back to version 1 or using the app services deployment is working. |
We utilized the deployment slots to get around this. Since the issue is that you cannot directly deploy to a slot that is inside the vnet, we added some a script to our pipeline that spins up a new deployment slot outside of the vnet, deploy the new code to it, swap the new deployment slot with the old one, then delete the old one. This might not work for every use case, but it solved the problem for us. |
Workaround using AzureRmWebAppDeployment@4 (as outlined by the original poster) also worked for me. Source code reference: azure-pipelines-tasks/Tasks/AzureFunctionAppV2/operations/AzureAppServiceUtilityExt.ts Line 215 in b6464a4
|
Task name
AzureFunctionApp@2
Task version
2.221.105
Environment type (Please select at least one enviroment where you face this issue)
Azure DevOps Server type
dev.azure.com (formerly visualstudio.com)
Azure DevOps Server Version (if applicable)
No response
Operation system
ubuntu-latest
Task log
Relevant log output
Aditional info
TL;DR;
AzureFunctionApp@2
fails with "Function app has private endpoint(s). But you are not running this pipeline from a self-hosted agent that has access to the Functions App. Relevant documentation: https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/agents?view=azure-devops&tabs=browser#install " even when "AzureCloud" is allowed access to SCM site.Note that Pipelines are able to talk to the Function app as folders and logs are created by Pipelines in the /site/deployments folder.
Using
AzureRmWebAppDeployment@4
works correctly.Details
Create an Azure Function with the following security restrictions (Bicep syntax)
Then add a Private EndPoint
When you try to deploy like this from an Azure Pipeline:
You get the following result:
Importantly, Pipelines does manage to create a deployments folder on the Function App server and create a log file, with the content "Deployment failed."
Using the following instead - which is not recommended - successfully deploys the app:
The text was updated successfully, but these errors were encountered: