Function App
8 TopicsFunction app script stopped working
I have a simple function app that uses this script to shut down inactive AVD VMs that had worked for about two years simply stopped working. Instead, it produce this error: ERROR: Error stopping the VM: GenericArguments[0], 'Microsoft.Azure.Management.Compute.Models.VirtualMachine', on 'System.Nullable`1[T] MaxInteger[T](System.Collections.Generic.IEnumerable`1[System.Nullable`1[T]])' violates the constraint of type 'T'. After much troubleshooting and searching for something relevant, I discovered that the function app's host.json file was set to: { "version":"2.0", "managedDependency": { "Enabled": true }, "extensionBundle": { "id": "Microsoft.Azure.Functions.ExtensionBundle", "version": "[2.*, 3.0.0]" } } Since v.2 and v.3 are [no longer supported](http://learn.microsoft.com/en-us/azure/azure-functions/functions-versions?tabs=isolated-process%2Cv4&pivots=programming-language-powershell), I changed it to { "version":"2.0", "managedDependency": { "Enabled": true }, "extensionBundle": { "id": "Microsoft.Azure.Functions.ExtensionBundle", "version": "[4.0.0, 5.0.0]" } } ``` I also noticed that the `requirements.psd1` file was set to # This file enables modules to be automatically managed by the Functions service. # See https://aka.ms/functionsmanageddependency for additional information. # @{ # For latest supported version, go to 'https://www.powershellgallery.com/packages/Az'. # To use the Az module in your function app, please uncomment the line below. 'Az' = '8.*' } So I changed it to # This file enables modules to be automatically managed by the Functions service. # See https://aka.ms/functionsmanageddependency for additional information. # @{ # For latest supported version, go to 'https://www.powershellgallery.com/packages/Az'. # To use the Az module in your function app, please uncomment the line below. 'Az' = '13.*' } None of this helped. The same error was generated. I then realized I might need to restart the app, which I did. After this, I see this warning and error: 2025-03-03T21:42:45Z [Warning] The first managed dependency download is in progress, function execution will continue when it's done. Depending on the content of requirements.psd1, this can take a few minutes. Subsequent function executions will not block and updates will be performed in the background. 2025-03-03T21:42:45Z [Error] Executed 'Functions.TwelveMinuteTimerTrigger' (Failed, Id=58b46678-c1d2-4ca8-8083-fab1e657c608, Duration=95ms) After waiting a while for the download to finish, I get this error: [Error] ERROR: Error getting a list of user sessions: The term 'Get-AzWvdUserSession' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. The line "Get-AzWvdUserSession is not recognized" seems to indicate that the download of the Az modules has failed. Does anyone know what would cause the download to fail and how to fix it?23Views0likes1CommentEvent transfer from Onprem to Cloud Connectivity
We have a On-Premises application (with Linux OS) that generates an multiple type of events and write them as files into local file system, with more than 50k events per day. The On-Premises infra have connectivity to Azure but application doesn't have it. These event needs to be published to cloud based application, and we also need to audit every events, there will be high impact even if single event is lost. The existing documentation is not sufficient to arrive at a solution, Is there any recommended options.297Views0likes1CommentAzure Func Deployment error: The 'Performing deployment' operation conflicts with the pending
I am trying to create a devops pipeline to deploy an azure function. Each time I try I get the error: BadRequest: The 'Performing deployment' operation conflicts with the pending 'Performing deployment' operation started at 2022-08-16T13:01:47.6881726Z. Please retry operation later. I have waited 2 hours and still get this error. In the resource group, i cannot see any pending deployments, only failed deployments. Also, get-AzDeployment cmdlet returns no data so i cant find any deployments that may be blocking. Any ideas how to resolve this?1.2KViews0likes0CommentsAzure Functions - New Comic
You are a Cloud lover? But you prefer Azure? Learning with fun? And most of all, you like serverless? You will probably enjoy our new comic about Azure Function with Jonah Andersson as guest star! If you want to deep dive, do not hesitate to visit the official documentation on the Microsoft website: https://learn.microsoft.com/en-us/azure/azure-functions/functions-overview Enjoy and share, it's free!1.4KViews0likes0CommentsAzure function require private git package
At the moment we are deploying our python application to a server-less azure function app. For this we use the kudu config-zip deployment. az functionapp deployment source config-zip -g "xxxx" -n "xxxx" --src "xxxx.zip" --build-remote We also want a remote build, because this will install the correct version of the packages. Because some packages have different versions voor different python versions (e.g. 3.8 vs 3.10) and different environment (windows vs linux). The remote build will make sure the correct packages are installed, cause the build (azure's default oryx) will run in the same environment. Recently we moved some of our code to another package. This package is shared by multiple other applications. To install it, we add it to our requirements.txt: git+ssh://Email address removed/xxxxx/xxxxx.git@f4e2bf2e3dxxxxxxxxx This works perfect on our local machines. But not once we deploy to azure. Unfortunately there are no logs. Well the logs shows "oryx build...." and that's it. There is no way to access the build logs. Anyway, we know the cause of the issue: the build doesn't have access to the repository. We do have a ssh key, which can be used to access the git repo. But we have no clue how to pass it to the orxy builder. We tried to make a work around with the "PRE_BUILD_COMMAND" environment variable, but since there are no logs, we cannot determine what is failing during the build. So we cannot install private python packages with azure serverless functions. We see two ways to solve this issue, but for neither we have a clue how to do it: Make the orxy builder use the ssh key Do a local build and push it to the azure function Did some tried this before or can give someone some pointers how to get started on this?1.3KViews1like0CommentsFunction apps conflicting
Has anyone seen function apps conflicting? I run two functions under the same app. They both receive data from webhooks that come from the same place, but different types of data. When I run the second one, some data doesn't go to the first one. Has anyone seen or heard of this before?866Views0likes0Comments