Description
New issue checklist
- I searched for existing GitHub issues
- I read pipeline troubleshooting guide
- I checked how to collect logs
Task name
AzureFunctionApp
Task version
Issue Description
Hi
I had an issue when upgrading from azure-functions v3 to v4 node.js programming model, where my AzureFunctionApp tasks succeeded with no clue on anything wrong, but all functions where suddenly missing on the running function app on Azure, as in a breaking change. It took me some time, before I realized that I was missing an (sudo) npm install command in the pipeline to deploy the @azure/functions dependency needed for v4. My project has no other external dependencies, hence working with v3 without the npm install command in the pipeline.
It should be trivial for the AzureFunctionApp task to check package.json for dependencies, fail the task and log the error if the node_modules folder is missing ( when needed as per package.json )
Cheers
Environment type (Please select at least one enviroment where you face this issue)
- Self-Hosted
- Microsoft Hosted
- VMSS Pool
- Container
Azure DevOps Server type
dev.azure.com (formerly visualstudio.com)
Azure DevOps Server Version (if applicable)
No response
Operation system
ubuntu-latest
Relevant log output
The problem is that there is no error message ;)..
Full task logs with system.debug enabled
Repro steps
Create an azure functions node project with external dependencies
Create a yml pipeline for deployment without the (sudo) npm install command
Use AzureFunctionApp task for deployment
- task: AzureFunctionApp@2
displayName: 'Deploying to api to proxy on production'
condition: eq(variables['Build.SourceBranchName'], 'main')
inputs:
azureSubscription: ##
resourceGroupName: ##
appName: ##
appType: functionApp
package: $(Agent.BuildDirectory)/src/functions
deploymentMethod: runFromPackage
runtimeStack: 'NODE|18'