azure-functions-core-tools icon indicating copy to clipboard operation
azure-functions-core-tools copied to clipboard

Publishing a function app changes LinuxFxVersion

Open sw-vish opened this issue 1 year ago • 10 comments

Hi, I'm publishing a linux function app that uses .NET 8 with the isolated runtime using the following command:

func azure functionapp publish my_function_app --build local

When I do this, I get the log message Updating 'linuxFxVersion' to 'DOTNET-ISOLATED|6.0'., and sure enough if I check the function app on Azure, it's .NET version has been changed to 6, which then prevents the newly deployed app from starting up.

Is this a bug? If not, is there a way to not have the func command change settings?

Thanks!

sw-vish avatar Jan 15 '24 05:01 sw-vish

It has been fixed. It will be released with the next version of core tools.

khkh-ms avatar Jan 25 '24 16:01 khkh-ms

Is there an ETA for next release and a PR to track?

morten-b avatar Feb 10 '24 09:02 morten-b

It has been fixed. It will be released with the next version of core tools.

If not released yet; is there a workaround?

ovestoerholt avatar Feb 22 '24 11:02 ovestoerholt

It has been fixed. It will be released with the next version of core tools.

If not released yet; is there a workaround?

I'm currently adding --isolated-worker as flag

morten-b avatar Feb 22 '24 11:02 morten-b

I see that my pipeline is trying to install the former version of the tools: Setting up azure-functions-core-tools-4 (4.0.5455-1) ...

While I on my Mac Azure Core Tools version is 4.0.5530. And deploying from command line works from my Mac. Is 4.0.5530 the version mentioned by @khkh-ms above? Is there a way to enforce the newer version from ubuntu-latest? (cause it seems like azure-functions-core-tools-4 is not a standard Ubuntu package...)

ovestoerholt avatar Feb 22 '24 11:02 ovestoerholt

It has been fixed. It will be released with the next version of core tools.

If not released yet; is there a workaround?

I'm currently adding --isolated-worker as flag

Did not work for me unfortunately 🙁

ovestoerholt avatar Feb 22 '24 11:02 ovestoerholt

@ovestoerholt try this?

func azure functionapp publish "${func_name}" -g "${rg_name}" --dotnet-isolated --dotnet-version 8.0

gukoff avatar Feb 23 '24 09:02 gukoff

@gukoff Flags --dotnet-isolated --dotnet-version 8.0 made the trick, thanks.

koxt avatar Feb 23 '24 11:02 koxt

It has been fixed. It will be released with the next version of core tools.

Just for clarification, when this is released .. does that mean we do NOT need to include the flags --dotnet-isolated --dotnet-version 8.0 and the tool is "smart enough" to use the dotnet version of the app?

PureKrome avatar Mar 04 '24 07:03 PureKrome

Even adding the flags doesn't work for me. Another reason for us to move away from functions (actively doing)

JordyGit avatar Oct 10 '24 11:10 JordyGit