Function App
13 TopicsAzure function app to read files from SMB mounted file share
How can I programmatically connect an Azure Function App to multiple (50+) SMB-mounted Azure File Shares that use the same credentials, given that Logic Apps aren't suitable due to their static connection requirements?76Views0likes1CommentFunction app script stopped working
I have a simple function app that uses https://github.com/tsrob50/WVD-Public/blob/master/StopSH-MultiHostPools.ps1 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?125Views0likes2CommentsError on Function APP - 502 Bad Gateway
Hi All, This is with regards to my setup in Azure function, I'm currently using .NET 6 and Consumption plan. But intermittently I'm getting 502 Bad Gateway while calling the api. It happens usually around 4 AM GMT. From logs I can see that there are 3 server nodes running at the time of the error. Is there any known issue with Azure function errors running on consumption plan? Regards,176Views1like2CommentsAzure Database for MySQL triggers for Azure Functions (Public Preview)
Developers can now accelerate development time and focus only on the core business logic of their applications, for developing event-driven applications with Azure Database for MySQL as the backend data store. We are excited to announce that you can now invoke an Azure Function based on changes to an Azure Database for MySQL table. This new capability is made possible through the Azure Database for MySQL triggers for Azure Functions, now available in public preview. Azure Database for MySQL triggers The Azure Database for MySQL trigger uses change tracking functionality to monitor a MySQL table for changes and trigger a function when a row is created, updated, or deleted enabling customers to build highly-scalable event-driven applications. Similar to the Azure Database for MySQL Input and Output bindings for Azure Functions, a connection string for the MySQL database is stored in the application settings of the Azure Function to trigger the function when a change is detected on the tables. Note: In public preview, Azure Database for MySQL triggers for Azure Functions are available only for dedicated and premium plan of Azure Functions To enable change tracking on an existing Azure Database for MySQL table to use trigger bindings for an Azure Function, it is necessary to alter the table structure, for example, enabling change tracking on an employees data table: ALTER TABLE employees ADD COLUMN az_func_updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; Azure Database for MySQL trigger uses the 'az_func_updated_at' and column's data to monitor the table for any changes on which change tracking is enabled. Changes are then processed in the order that they were made, with the oldest changes being processed first. Important: If changes to multiple rows are made at once, then the exact order they're sent to the function is determined on the ascending order of the az_func_updated_at and the primary key columns. If multiple changes are made to a row in-between an iteration, then only the latest changes for that particular rows are considered. The following example demonstrates a C# function that is triggered when changes occur in the employees table. The MySQL trigger uses attributes for the table name and the connection string. using System.Collections.Generic; using Microsoft.Azure.WebJobs; using Microsoft.Azure.WebJobs.Extensions.MySql; using Microsoft.Extensions.Logging; namespace EmployeeSample.Function { public static class EmployeesTrigger { [FunctionName(nameof(EmployeesTrigger))] public static void Run( [MySqlTrigger("Employees", "MySqlConnectionString")] IReadOnlyList<MySqlChange<Employee>> changes, ILogger logger) { foreach (MySqlChange<Employee> change in changes) { Employee employee= change. Item; logger.LogInformation($"Change operation: {change.Operation}"); logger.LogInformation($"EmployeeId: {employee.employeeId}, FirstName: {employee.FirstName}, LastName: {employee.LastName}, Company: {employee. Company}, Department: {employee. Department}, Role: {employee. Role}"); } } } } Join the preview and share your feedback! We are eager for you to try out the new Azure Database for MySQL triggers for Azure Functions and build highly scalable event-driven and serverless applications. For more information refer https://aka.ms/mysqltriggers about using MySQL triggers for all the supported programming frameworks with detailed step-by-step instructions If you have any feedback or questions about the information provided above, please leave a comment below or email us at AskAzureDBforMySQL@service.microsoft.com. Thank you!Event 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.367Views0likes1CommentAzure 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.3KViews0likes0CommentsAzure 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.5KViews0likes0CommentsAzure 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.4KViews1like0Comments