Azure / logicapps

Azure Logic Apps labs, samples, and tools
MIT License
361 stars 301 forks source link

Logic Apps Standard Project runtime doesn't support functions runtime v4 #434

Closed hari-dotnet closed 1 year ago

hari-dotnet commented 2 years ago

I am trying to create logic app standard workflow project in visual studio code with .Net 6.0 and functions runtime v4 but getting the error "You must have the .Net Core SDK installed to perform this operation" and realize that Project Runtime setting doesn't have selection of 4 and default doesn't seem to work for latest version. Is there a way to use .Net 6.0 and functions runtime v4 with logic app standard project?

AB#15963074

kennyMSFT commented 2 years ago

Hello @hari-dotnet

For now Logic App Standard on VSCode supports only Azure Functions Core Tools - 3.x version. .NET 6.0 should work but not functions rutime v4.

https://docs.microsoft.com/en-us/azure/logic-apps/create-single-tenant-workflows-visual-studio-code#tools

Thanks Kenny

anthonywhite commented 2 years ago

Hi @kennyMSFT, is there a projected roadmap date for v4 support?

Rajre commented 2 years ago

Hi @kennyMSFT, is there a projected roadmap date for v4 support?

Hi @anthonywhite, as of now there is no confirmation but we would request you to file a user voice request for same over here: https://feedback.azure.com/forums/287593-logic-apps/

anthonywhite commented 2 years ago

Hi @kennyMSFT, is there a projected roadmap date for v4 support?

Hi @anthonywhite, as of now there is no confirmation but we would request you to file a user voice request for same over here: https://feedback.azure.com/forums/287593-logic-apps/

Are you saying it's not even on the roadmap and needs uservoice votes to get there?! Rather surprised...

gastonmuijtjens commented 2 years ago

@Rajre I filed a new User Voice request for this issue: https://feedback.azure.com/d365community/idea/c3f46128-0188-ec11-a81b-6045bd7956bb. This should be a top priority since currently it is very complicated to have both Azure Functions v4 and Logic Apps (Standard) in the same project/solution, without using something like VSCode Dev Containers. Moreover, for NuGet-based Logic Apps (Standard) projects, support for the target framework netcoreapp3.1 will drop from December 2022.

anthonywhite commented 2 years ago

@kennyMSFT @Rajre any news on this yet?

NitashaV commented 2 years ago

Thanks for the feedback. We plan to get Logic apps Standard running on Azure Functions v4 and to get this done well before Dec 2022. Can share more specific ETA in a month.

Garyljackson commented 2 years ago

Hi @NitashaV

Are you able to update us on the ETA now?

Garyljackson commented 2 years ago

Hi Guys

Checking in to see if there is progress on this?

NitashaV commented 2 years ago

We are now actively working on getting Logic apps Standard on Azure Functions v4 and we plan to release this support by Fall this year.

Garyljackson commented 2 years ago

We are now actively working on getting Logic apps Standard on Azure Functions v4 and we plan to release this support by Fall this year.

Thanks for the update @NitashaV

rubenaster commented 2 years ago

So we received the recommended action, that we should update our Function Apps to use runtime version 4.x before 3 December 2022. Since we don't have any Azure Functions I guess this recommendation refers to our Standard Logic Apps.

What is the actual plan here, if runtime 4 will be supported that late?

image

rohithah commented 2 years ago

Our plan is to move most of Logic App standard apps to Functions v4 without any user involvement before the end of the year. We will continue to support v3 based apps until they are are moved to v4. We are planning to release a v4 based Logic App package in couple of months so that users can try running Logic Apps on top of Functions v4.

Pauwelz commented 1 year ago

A few months have passed since the last update, are there any timelines known concerning the release of the v4 package yet?

anthonywhite commented 1 year ago

We are now actively working on getting Logic apps Standard on Azure Functions v4 and we plan to release this support by Fall this year.

@NitashaV can you give us a date we can start using v4

anthonywhite commented 1 year ago

Our plan is to move most of Logic App standard apps to Functions v4 without any user involvement before the end of the year. We will continue to support v3 based apps until they are are moved to v4. We are planning to release a v4 based Logic App package in couple of months so that users can try running Logic Apps on top of Functions v4.

@rohithah any update?

wsilveiranz commented 1 year ago

Hi @anthonywhite - We are starting rollout of Azure Functions V4. In the next weeks we will rolling changes in the portal. The migration will happen automatically for the most part:

I hope this helps, Wagner.

anthonywhite commented 1 year ago

@wsilveiranz thanks for the info, but me and others here I think would also like to know when the AF Core Tools for local development of Logic App Standard will be available?

mark-abrams commented 1 year ago

Thanks @wsilveiranz. You say that existing Standard Logic Apps will be migrated automatically by Microsoft, will this include changing the value of the FUNCTIONS_EXTENSION_VERSION setting from ~3 to ~4? Will any other settings be changed? We use Terraform to manage our application settings for Logic Apps so any changes to settings that happen outside of Terraform could be reversed by a Terraform deployment. Are you able to share details about exactly how this migration is going to occur, rollback options (if any) and when in November it will occur?

I also agree with @anthonywhite's point about the local development environment, this migration to Functions v4 is more than just migrating Azure Logic Apps, we have development environments that need to be updated (and tested) as well.

MassimoC commented 1 year ago

A few months have passed since the last update, are there any timelines known concerning the release of the v4 package yet?

Any news on this? Thanks!!!!!!!

anthonywhite commented 1 year ago

Only a few weeks to that December deadline and still deafening silence here. Any news @NitashaV @rohithah @wsilveiranz @hartra344 on the local development story???

hartra344 commented 1 year ago

Just an update. This is being included in the next bundle release. We were hoping to release it at the same time as the Azure Side deployment but we need a change in the azure core tools first. We're working with the Azure Functions team to get this done and out ASAP.

rob-thijssen commented 1 year ago

I wonder if the following steps are the correct one to take to upgrade NuGet-based project for logicapps standard to v4? I followed the instructions mentioned on this page. Now when deploying a logicapp resource to azure I'm `"FUNCTIONS_EXTENSION_VERSION": "~4" as mentioned in the instructions

When using the NuGet-based project, it also includes a csproj file. I upgrade part of this file to the following values:

<PropertyGroup>
    <TargetFramework>net6.0</TargetFramework>
    <TargetFramework>v4</AzureFunctionsVersion>
    <RootNamespace>MyNamespace</RootNamespace>
    <MSBuildWarningsAsMessages>MSB3246;$(MSBuildWarningsAsMessages)</MSBuildWarningsAsMessages>
    <!-- Surpress warning 
      NU1701: Package 'Microsoft.SqlServer.Types 11.0.0' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, 
      .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8, .NETFramework,Version=v4.8.1' 
      instead of the project target framework 'net6.0'. This package may not be fully compatible with your project.
    -->
    <NoWarn>NU1701</NoWarn>
  </PropertyGroup>
  <ItemGroup>
       <PackageReference Include="Microsoft.NET.Sdk.Functions" Version="4.1.3" />
       <PackageReference Include="Microsoft.Azure.Workflows.WebJobs.Extension" Version="1.2.*" />
  </ItemGroup>

Upgrading the csproj file is not mentioned in the instructions on the previously mentioned page.

I assume the values for Microsoft.NET.Sdk.Functions (net6.0) and TargetFramework (v4) are the correct ones. That seems to be pretty obvious. But are the values for the packageReferences correct?

When building the project in the devops build pipelines, I'm using dotnetVersion: 6.0.x.

At first glance the logicapp is deployed correctly to Azure and the first run does not throw any unexpected exceptions.

Can anyone from the Logic Apps team please confirm that current actions taken are correct and complete?

cc: @wsilveiranz, @hartra344, @rohithah

rohithah commented 1 year ago

@rob-thijssen - At this time, we are only moving the runtime version to v4 (so that we run on top of .NET6) and not moving the sdk versions. So you shouldnt need to change anything on how you would build your LogicApp nuget based project except for the latest Microsoft.Azure.Workflows.WebJobs.Extension package to latest version (1.2.18.1).

You need the following settings on the Logic App resource: "FUNCTIONS_EXTENSION_VERSION": "~4" "netFrameworkVersion":"v6.0"

rob-thijssen commented 1 year ago

@rohithah, Thank you very much for you reply. I have only one question regarding your answer. I hope you can help me on this last one as well??

You need the following settings on the Logic App resource: "FUNCTIONS_EXTENSION_VERSION": "~4" "netFrameworkVersion":"v6.0"

This confuses me a little. If netFrameworkVersion is set to v6.0. Then I would think that I should also upgrade the properties

<TargetFramework>net6.0</TargetFramework>
<TargetFramework>v4</AzureFunctionsVersion>

Or are these properties in the csproj file only used for building LogicApps?

Thanks in advance!

oananicolaie commented 1 year ago

Hi, I upgraded the logic apps to the newer version, but it fails to start. I've deployed logic apps with

"FUNCTIONS_EXTENSION_VERSION": "~4" FUNCTIONS_WORKER_RUNTIME: node WEBSITE_NODE_DEFAULT_VERSION: ~16

and in csproj: <PropertyGroup> <TargetFramework>net6.0</TargetFramework> <AzureFunctionsVersion>v4</AzureFunctionsVersion> <MSBuildWarningsAsMessages>MSB3246;$(MSBuildWarningsAsMessages)</MSBuildWarningsAsMessages> </PropertyGroup> <ItemGroup> <PackageReference Include="CachedApiTokenProvider" Version="1.0.1" /> <PackageReference Include="Microsoft.NET.Sdk.Functions" Version="4.1.3" /> <PackageReference Include="Microsoft.Azure.Workflows.WebJobs.Extension" Version="1.2.18.1" /> </ItemGroup>

CachedApiTokenProvider is a local Nuget which is using Azure.Security.KeyVault.Secrets 4.4.0.

Build and deploy are done without errors, but the logic apps are not started. On the portal I see "Functions runtime error: Error Microsoft.Azure.WebJobs.Script.WebHost: vaultUri."

Can anyone please help? What can go wrong?

Thanks in advance!

rob-thijssen commented 1 year ago

@oananicolaie, There's at least one thing I notice in your configuration:

FUNCTIONS_WORKER_RUNTIME: node
WEBSITE_NODE_DEFAULT_VERSION: ~16

FUNCTIONS_WORKER_RUNTIME should be set to dotnet WEBSITE_NODE_DEFAULT_VERSION can (should?) be removed

anthonywhite commented 1 year ago

There's at least one thing I notice in your configuration:

FUNCTIONS_WORKER_RUNTIME: node
WEBSITE_NODE_DEFAULT_VERSION: ~16

FUNCTIONS_WORKER_RUNTIME should be set to dotnet WEBSITE_NODE_DEFAULT_VERSION can (should?) be removed

@rob-thijssen @oananicolaie for our Logic App Standard FUNCTIONS_WORKER_RUNTIME has been set to node up to now.

@rohithah can you confirm valid values for this with the new runtime please?

timjansenortec commented 1 year ago

I have preciously created a documentation ticket about FUNCTIONS_WORKER_RUNTIME. see https://github.com/MicrosoftDocs/azure-docs/issues/97193

For me it is still unclear what this setting actually does...

timjansenortec commented 1 year ago

The problem that @oananicolaie (she is a colleague) reported was solved by adding setting AzureWebJobsSecretStorageKeyVaultUri, since we use "AzureWebJobsSecretStorageType": "KeyVault".

see https://github.com/Azure/azure-functions-host/pull/7683

rohithah commented 1 year ago

versions specified on the csproj files are only used for referencing the sdks being used and to build the Logic Apps package that gets deployed. The actual function runtime version is determined by the app settings that you specify.

so you can keep these setting unchanged (these are only used for building the app).

netcoreapp3.1 v3

and set the app setting to the following: "FUNCTIONS_EXTENSION_VERSION": "~4" FUNCTIONS_WORKER_RUNTIME: node (and no need for netFrameworkVersion if you have set the worker runtime to node) WEBSITE_NODE_DEFAULT_VERSION: ~16

mark-abrams commented 1 year ago

Hi @rohithah , can you please confirm that for node-based Logic Apps we should be changing the WEBSITE_NODE_DEFAULT_VERSION to ~16, as well as the FUNCTIONS_EXTENSION_VERSION setting?

The blog posting on the Tech Community site only refers to changing the FUNCTIONS_EXTENSION_VERSION setting, it doesn't mention the default Node version.

Can you please clarify, thanks.

rohithah commented 1 year ago

WEBSITE_NODE_DEFAULT_VERSION configures the node worker version that we use for inline JScript. You could either set this for node 14 or 16 (both supported)

palak-chadha commented 1 year ago

I have a Standard Logic App that is built as a csproj based project. I have just updated the logic app to use Workflows.WebJobs.Extension version 1.2.18.1 and it fails to run in Azure with the error "System.Private.CoreLib: Could not find file 'C:\home\site\wwwroot\NetFxWorker\cs'.".

App settings: FUNCTIONS_EXTENSION_VERSION : ~4 FUNCTIONS_WORKER_RUNTIME : dotnet

Added site config: netFrameworkVersion: 'v6.0'

Updated the csproj file as below:

`

net6.0
 <AzureFunctionsVersion>v4</AzureFunctionsVersion>
 <MSBuildWarningsAsMessages>MSB3246;$(MSBuildWarningsAsMessages)</MSBuildWarningsAsMessages>

(which is pointing to v1.2.18.1 on build) ` The error persists even if I revert it back to v3 runtime with .net Core 3.1. What am I missing here? Any ideas are appreciated. Thanks! @rohithah @wsilveiranz @hartra344 Can you please confirm if there is a miss here? Thanks in advance!
mark-abrams commented 1 year ago

WEBSITE_NODE_DEFAULT_VERSION configures the node worker version that we use for inline JScript. You could either set this for node 14 or 16 (both supported)

Thanks for the clarification. I'll take this opportunity to upgrade the node version from 14 to 16 so that I'm running the latest supported versions of both the Functions runtime (~4) and node (~16).

rohithah commented 1 year ago

@palak-chadha - Microsoft.NET.Sdk.Functions version supported is 3.*. The following version is what we are using in our vscode experience - can you try that?

<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="3.0.13"/>
anthonywhite commented 1 year ago

@palak-chadha - Microsoft.NET.Sdk.Functions version supported is 3.*. The following version is what we are using in our vscode experience - can you try that?

<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="3.0.13"/>

@rohithah re this and any other compatibility/dependencies, is there a doc published you can link us to?

anthonywhite commented 1 year ago

Hi @anthonywhite - We are starting rollout of Azure Functions V4. In the next weeks we will rolling changes in the portal. The migration will happen automatically for the most part:

  • Customer creating new Logic Apps Standard instances: between now and end of October, we will stage rollout creation with V4 as the default setting.
  • Existing Logic Apps Standard: During November we will migrate existing Logic App Standard to Functions V4. This will be automatically done and in stages (like the creation).
  • Edge cases (customer that deployed using nuget or pinned a specific version of the Function runtime) - we are working on guidance with steps to update the configuration and will publish that documentation. I will include links for that documentation here once published.

I hope this helps, Wagner.

Hi @wsilveiranz has the timetable for updating existing Logic Apps changed? We're now past November and I can't see any changes in our tenant. Is there something you can link us to for latest timetable/roadmap etc.?

rohithah commented 1 year ago

We have migrated over 60% of the apps and the migration have been paused due to various deployment freezes during holidays. We now expect migration of some of apps will extend into January next year.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 45 days with no activity.

kmmdev commented 1 year ago

@rohithah @wsilveiranz can you please provide the documentation for Edge cases (customer that deployed using nugget or pinned a specific version of the Function runtime).

I am facing issue that's similar to @palak-chadha. error "System.Private.CoreLib: Could not find file 'C:\home\site\wwwroot\NetFxWorker\cs'.". My build and deployment pipelines are running fine without any error

Updated the csproj file as below:

net6.0 v4 MSB3246;$(MSBuildWarningsAsMessages) (which is pointing to v1.2.18.1 on build)
rohithah commented 1 year ago

@kmmdev - can you share the csproj file you are using in your logic app project?

kmmdev commented 1 year ago

@rohithah thanks for the response, the issue was resolved by making few changes to deployment pipeline

palak-chadha commented 1 year ago

@kmmdev Could you please elaborate a bit on what change in your deployment pipeline resolved this issue for you. I couldn't get it resolved with dotnet function worker runtime. I deployed my logic app standard with a node runtime and followed the steps mentioned here Logic apps standard V3 to V4 migration and that worked fine for me. Luckily, I didn't have any custom connectors in my logic app workflows so I could make it work with node runtime and by moving away from the Nuget based project deployment. But I am really keen to know if you could make it work with FUNCTION_WORKER_RUNTIME as 'dotnet' as a NuGet-based project. Thanks in advance!

loganathan-kannaiyan commented 1 year ago

I am trying to create a logic apps standard work flow using Visual studio code and getting the below error code.

currently I have installed .NET SDK 7.0 and Azure function 4.0.4865 as well

still I am getting the error "you must have the .net core sdk installed to perform this operation"

Am I missing anything?

I have referred this one too. https://learn.microsoft.com/en-us/azure/logic-apps/create-single-tenant-workflows-visual-studio-code#tools

Error1

func Dotnet SDK error

lohithgn commented 1 year ago

Those having the issue/error of ".NET Core SDK" required during local development:

The main pre-req is .NET 6.0 SDK installation.

This resolved the error for me.

Thanks.

StefanPuntNL commented 1 year ago

@kmmdev I'm also experiencing the same issues. Can you elaborate on what changes you made to your build server and/or pipelines?

kmmdev commented 1 year ago

Followed this document for code change https://techcommunity.microsoft.com/t5/integrations-on-azure-blog/azure-logic-apps-standard-now-supports-azure-functions-v4/ba-p/3656072. Beyond those, the only change that I made was changing the deployment method from Auto-deployment to Zip deployment in ADO pipeline image

StefanPuntNL commented 1 year ago

Followed this document for code change https://techcommunity.microsoft.com/t5/integrations-on-azure-blog/azure-logic-apps-standard-now-supports-azure-functions-v4/ba-p/3656072. Beyond those, the only change that I made was changing the deployment method from Auto-deployment to Zip deployment in ADO pipeline image

Using Zip Deploy indeed 'solves' my issue. However, I prefer to work with immutable app packages (Run From Package). This used to work fine until I upgraded my NuGet based projects to .NET6 and V4.

I've also noticed that there is a difference between the app packages that are built locally versus the ones that are built using the Azure DevOps Managed Pipeline agents.

kenchon commented 1 year ago

In my case, it occured when upgrading FUNCTIONS_EXTENSION_VERSION configuration to ~4 from ~3. I resolved this issue by adding WEBSITE_NODE_DEFAULT_VERSION = ~14 as migration guide describes.