New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure Functions Runtime 2.0.12050-alpha breaking changes notice #129

Open
fabiocav opened this Issue Aug 11, 2018 · 6 comments

Comments

Projects
None yet
5 participants
@fabiocav
Member

fabiocav commented Aug 11, 2018

Deployment of Azure Functions Runtime 2.0.12050-alpha has started. This release has significant breaking changes so please read the details below.

Please use Azure/app-service-announcements-discussions#64 for discussions related to this release.

TL;DR

If you are running on the Azure Functions 2.0 preview and don't want your app to break, you need to pin your Function App by following the instructions in the What can I do to avoid being impacted? section at the bottom of this announcement.

What is changing?

Extension model updates

Changes in bindings and extension model will impact your app:

  • Any previously installed extensions will need to be updated
  • The Azure Storage bindings (blob, queues and tables triggers and bindings) were previously part of the runtime, but moving forward, will need to be explicitly installed. This change was made to allow Azure Functions to support multiple versions of the Azure Storage SDK

Configuration settings changes

As part of configuration enhancements made to the runtime to allow for more flexibility, configuration settings names and the structure of host.json has changed. The "version": "2.0" setting is now required in host.json. If there are no current settings in the file, the host will automatically add this value. Otherwise, an exception will be thrown directing you to http://aka.ms/functions-hostjson. This page has information detailing the changes. Once the settings are updated and "version": "2.0" is added, the host will automatically restart and pick up the new configuration values.

Function App secrets storage change

Function App secrets (function, system and master keys) will be stored in blob storage by default.

Previously they were stored in the file system and we are automatically migrating them to blob storage as part of this change, so keys should not change, but if you relied on direct file access or SCM APIs to manage those secrets, that will no longer work.

Single language functions in a Function App

Function App can only have functions of a selected language.

Previously a function app could have more than one language functions. We will now start enforcing a single language per app.

What do I need to do?

Choose a language for your Function App

  • If your app contains functions with a single language for example only C# functions, then no action is needed
  • If your app contains functions with multiple languages for example, C# and JavaScript then
    Select a language: by adding an App setting named FUNCTIONS_WORKER_RUNTIME
    • Set value to dotnet for C#/F#/Precompiled functions
    • Set value to node for JavaScript functions
    • Set value to java for Java functions

Update host.json

Update your host.json file according to the updated schema located here.

Update your dependencies, extensions and/or code

Local Development

If your function app is C#/F# based and developed locally (not through the portal) you'll need to update your NuGet reference for Microsoft.NET.Sdk.Functions to version 1.0.19. This will bring in other necessary updates such as moving to Microsoft.Azure.WebJobs 3.0.0-beta8. You'll also need to look for updates for any of the extensions that you're app is using. For the expected versions see the table below. After performing these updates you'll need to recompile, test locally (VS and VS Code should have already pulled the update) and publish your application.

If your function app is written in Java or JavaScript (developed locally) you can take advantage of the func extensions install command that is part of the Core Tools to get the necessary extension update. This is discussed in more detail here.

Portal Development

Follow the instructions to update the extensions installed through portal

Extension Versions

NuGet Package Version
Microsoft.NET.Sdk.Functions 1.0.19
Microsoft.Azure.WebJobs.Extensions.CosmosDB 3.0.1-beta2
Microsoft.Azure.WebJobs.Extensions.DurableTask 1.6.0
Microsoft.Azure.WebJobs.Extensions.MicrosoftGraph 1.0.0-beta4
Microsoft.Azure.WebJobs.ServiceBus 3.0.0-beta8
Microsoft.Azure.WebJobs.Extensions.EventHubs 3.0.0-beta8
Microsoft.Azure.WebJobs.Extensions.SendGrid 3.0.0-beta8
Microsoft.Azure.WebJobs.Extensions.EventGrid 2.0.0-beta4
Microsoft.Azure.WebJobs.Extensions.Storage 3.0.0-beta8
Microsoft.Azure.WebJobs.Extensions.Twilio 3.0.0-beta8
Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator 1.0.0

Read the Durable Functions release notes

If you use Durable Functions, read the release notes for the 1.6.0 release here.

Reference the Storage Extension where appropriate

If you have functions that work with Azure Storage (queue/tables/blob) either with triggers, input bindings or output bindings, you'll need to reference the new Microsoft.Azure.WebJobs.Extensions.Storage extension.

Simplified WebHook URLs

WebHook URLs (like those used for EventGrid and Microsoft Graph) have been simplified. https://myapp.azurewebsites.net/runtime/webhooks/EventGridExtensionConfig is now https://myapp.azurewebsites.net/runtime/webhooks/eventgrid

I'm getting errors I dont understand, help!

There is a list of error messages with tips on how to resolve here.

What can I do to avoid being impacted?

To temporarily avoid impact, you can pin your Function App to the previous version of the runtime by updating the app setting FUNCTIONS_EXTENSION_VERSION to 2.0.11961-alpha. Your app will continue to work as it was previously and will give you time to test your code with the new version, which we recommend you do in a different Function App.

Version 2.0.11961-alpha will be available until the end of September 2018.

To pin your Azure Functions on Linux app, please update your image using the following mapping:

From To
Microsoft/azure-functions-dotnet-core2.0:2.0 Microsoft/azure-functions-dotnet-core2.0:v2.0.11961-alpha
Microsoft/azure-functions-node8:2.0 Microsoft/azure-functions-node8:v2.0.11961-alpha
Microsoft/azure-functions-python3.6:2.0 Microsoft/azure-functions-python3.6:v2.0.11961-alpha

Using pinned version of core tools with Visual Studio

Visual studio keeps the core tools updated and in-sync with runtime version in Azure. You can override the default version of core tools launched by visual studio by performing the steps below.

  1. Download and extract this zip file
    https://functionscdn.azureedge.net/public/2.0.1-beta.35/Azure.Functions.Cli.win-x86.2.0.1-beta.35.zip
  2. In your function project properties, under Debug create a new profile and update the following values:
    • Launch: Executable
    • Executable: <Path_Where_Zip_File_Was_Extracted>\func.exe
    • Application arguments: host start
  3. Switch over to the new launch profile
  4. Press F5 to run the project

One thing to note:

  • the steps above only control the core tools version that gets launched when you press F5, and will not impact the templates used by Visual Studio when you make new functions.

Publishing from Visual Studio to a pinned Function App

  • Make sure the Azure Function tooling for VS is updated.
    Go to tools -> Extensions and Updates -> Updates -> Azure Functions and Web Jobs Tools (15.10.2009.0)->update.
  • Right click on the Function App Project file -> Edit -> .csproj
  • Add <DisableFunctionExtensionVersionUpdate>true</DisableFunctionExtensionVersionUpdate> to the PropertyGroup. This will prevent Visual Studio from updating the FUNCTIONS_EXTENSION_VERSION app setting in Azure when publishing from VS.
  • Publish from Visual Studio as would normally do.

@Azure Azure locked and limited conversation to collaborators Aug 11, 2018

@pragnagopa

This comment has been minimized.

Show comment
Hide comment
@pragnagopa

pragnagopa Aug 27, 2018

Starting with this release, a Function App can only have functions of a selected language. Please see above for more details on how to select a language for your Function App.

pragnagopa commented Aug 27, 2018

Starting with this release, a Function App can only have functions of a selected language. Please see above for more details on how to select a language for your Function App.

@brettsam

This comment has been minimized.

Show comment
Hide comment
@brettsam

brettsam Aug 27, 2018

Member

Added additional information about host.json above:

The "version": "2.0" setting is now required in host.json. If there are no current settings in the file, the host will automatically add this value. Otherwise, an exception will be thrown directing you to http://aka.ms/functions-hostjson. This page has information detailing the changes. Once the settings are updated and "version": "2.0" is added, the host will automatically restart and pick up the new configuration values.

Member

brettsam commented Aug 27, 2018

Added additional information about host.json above:

The "version": "2.0" setting is now required in host.json. If there are no current settings in the file, the host will automatically add this value. Otherwise, an exception will be thrown directing you to http://aka.ms/functions-hostjson. This page has information detailing the changes. Once the settings are updated and "version": "2.0" is added, the host will automatically restart and pick up the new configuration values.

@paulbatum

This comment has been minimized.

Show comment
Hide comment
@paulbatum

paulbatum Aug 30, 2018

Member

Deployment of Azure Functions Runtime 2.0.12050-alpha has started and NuGet packages have been published. Further updates to tooling (VS, VS Code, Core Tools, etc) are forthcoming.

Member

paulbatum commented Aug 30, 2018

Deployment of Azure Functions Runtime 2.0.12050-alpha has started and NuGet packages have been published. Further updates to tooling (VS, VS Code, Core Tools, etc) are forthcoming.

@pragnagopa pragnagopa changed the title from Azure Functions Runtime 2.0 preview breaking changes notice to Azure Functions Runtime 2.0.12050-alpha breaking changes notice Aug 30, 2018

@paulbatum

This comment has been minimized.

Show comment
Hide comment
@paulbatum

paulbatum Aug 31, 2018

Member

The update is now available for VS users. A small delay has prevented the update propagating to NPM, we expect to have more news on this tomorrow (8/31).

Member

paulbatum commented Aug 31, 2018

The update is now available for VS users. A small delay has prevented the update propagating to NPM, we expect to have more news on this tomorrow (8/31).

@brettsam

This comment has been minimized.

Show comment
Hide comment
@brettsam

brettsam Aug 31, 2018

Member

Added note about simplified WebHook URLs.

Member

brettsam commented Aug 31, 2018

Added note about simplified WebHook URLs.

@soninaren

This comment has been minimized.

Show comment
Hide comment
@soninaren

soninaren Sep 1, 2018

Azure Function Core Tools (2.0.1-beta.37) has been published to npm.

Run this command to install the latest version of core tools:

 npm i -g azure-functions-core-tools@core --unsafe-perm true

soninaren commented Sep 1, 2018

Azure Function Core Tools (2.0.1-beta.37) has been published to npm.

Run this command to install the latest version of core tools:

 npm i -g azure-functions-core-tools@core --unsafe-perm true
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.