Skip to content

Commit 22de45e

Browse files
committed
Additional edits
1 parent ac37fdf commit 22de45e

File tree

1 file changed

+20
-18
lines changed

1 file changed

+20
-18
lines changed

articles/azure-functions/set-runtime-version.md

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@
22
title: How to target Azure Functions runtime versions
33
description: Learn how to specify the runtime version of a function app hosted in Azure.
44
ms.service: azure-functions
5-
ms.topic: conceptual
5+
ms.topic: how-to
66
ms.date: 07/03/2024
77
ms.custom: ignite-2023, linux-related-content
88
zone_pivot_groups: app-service-platform-windows-linux
9+
10+
#Customer intent: As a function developer, I want to learn how to view and edit the runtime version of my function app so that I can pin it to a specific minor version, if necessary.
911
---
1012

1113
# How to target Azure Functions runtime versions
1214

13-
A function app runs on a specific version of the Azure Functions runtime. By default, function apps are created in latest 4.x version of the Functions runtime. Your function apps are only supported when running on a [supported major version](functions-versions.md). This article explains how to configure a function app in Azure to target, or _pin_ to, a specific version when required.
15+
A function app runs on a specific version of the Azure Functions runtime. By default, function apps are created in the latest 4.x version of the Functions runtime. Your function apps are supported only when they run on a [supported major version](functions-versions.md). This article explains how to configure a function app in Azure to target, or _pin_ to, a specific version when required.
1416

1517
::: zone pivot="platform-windows"
1618
The way that you target a specific version depends on whether you're running Windows or Linux. This version of the article supports Windows. Choose your operating system at the top of the article.
@@ -19,9 +21,9 @@ The way that you target a specific version depends on whether you're running Win
1921
The way that you target a specific version depends on whether you're running Windows or Linux. This version of the article supports Linux. Choose your operating system at the top of the article.
2022
::: zone-end
2123
>[!IMPORTANT]
22-
>When possible, always run your functions on the latest supported version of the Azure Functions runtime. You should only pin your app to a specific version when instructed to do so because of an issue in the latest version. You should always move up to the latest runtime version as soon as your functions can run correctly.
24+
>When possible, always run your functions on the latest supported version of the Azure Functions runtime. You should only pin your app to a specific version if you're instructed to do so due to an issue with the latest version. Always move up to the latest runtime version as soon as your functions can run correctly.
2325
24-
During local development, your installed version of Azure Functions Core Tools must match major runtime version used by the function app in Azure. For more information, see [Core Tools versions](functions-run-local.md#v2).
26+
During local development, your installed version of Azure Functions Core Tools must match the major runtime version used by the function app in Azure. For more information, see [Core Tools versions](functions-run-local.md#v2).
2527

2628
## Update your runtime version
2729

@@ -41,7 +43,7 @@ You can view the current runtime version of your function app in one of these wa
4143

4244
### [Azure CLI](#tab/azure-cli)
4345

44-
You can view the `FUNCTIONS_EXTENSION_VERSION` from the Azure CLI.
46+
You can view the `FUNCTIONS_EXTENSION_VERSION` app setting from the Azure CLI.
4547

4648
Using the Azure CLI, view the current runtime version with the [`az functionapp config appsettings list`](/cli/azure/functionapp/config/appsettings) command:
4749

@@ -52,7 +54,7 @@ az functionapp config appsettings list --name <function_app> \
5254

5355
In this code, replace `<function_app>` with the name of your function app. Also replace `<my_resource_group>` with the name of the resource group for your function app.
5456

55-
You see the `FUNCTIONS_EXTENSION_VERSION` in the following output:
57+
You see the `FUNCTIONS_EXTENSION_VERSION` in the following partial output:
5658

5759
```output
5860
[
@@ -77,7 +79,7 @@ Choose **Open Cloud Shell** in the previous code example to run the command in [
7779

7880
To check the Azure Functions runtime, use the following cmdlet:
7981

80-
```powershell
82+
```azurepowershell-interactive
8183
Get-AzFunctionAppSetting -Name "<FUNCTION_APP>" -ResourceGroupName "<RESOURCE_GROUP>"
8284
```
8385

@@ -87,13 +89,13 @@ Replace `<FUNCTION_APP>` with the name of your function app and `<RESOURCE_GROUP
8789

8890
## <a name="manual-version-updates-on-linux"></a>Pin to a specific version
8991

90-
Azure Functions lets you use the `FUNCTIONS_EXTENSION_VERSION` application setting to target the runtime version used by a given function app. When you specify only the major version (`~4`), the function app is automatically updated to new minor versions of the runtime when they become available. Minor version updates are done automatically because new minor versions shouldn't introduce breaking changes.
92+
Azure Functions lets you use the `FUNCTIONS_EXTENSION_VERSION` app setting to target the runtime version used by a given function app. If you specify only the major version (`~4`), the function app is automatically updated to new minor versions of the runtime as they become available. Minor version updates are done automatically because new minor versions aren't likely to introduce changes that would break your functions.
9193
::: zone pivot="platform-linux"
9294
Linux apps use the [`linuxFxVersion` site setting](./functions-app-settings.md#linuxfxversion) along with `FUNCTIONS_EXTENSION_VERSION` to determine the correct Linux base image in which to run your functions. When you create a new function app on Linux, the runtime automatically chooses the correct base image for you based on the runtime version of your language stack.
9395
::: zone-end
9496
Pinning to a specific runtime version causes your function app to restart.
9597
::: zone pivot="platform-windows"
96-
When you specify a specific minor version (such as `4.0.12345`) in `FUNCTIONS_EXTENSION_VERSION`, the function app is pinned to that specific version of the runtime until you explicitly choose to move back to automatic updates. You should only pin to a specific minor version long enough to resolve any issues with your function app that prevent you from targeting the major version. Older minor versions are regularly removed from the production environment. When your function app is pinned to a minor version that is later removed, your function app is instead run on the closest existing version instead of the version set in `FUNCTIONS_EXTENSION_VERSION`. Minor version removals are announced in [App Service announcements](https://github.com/Azure/app-service-announcements/issues).
98+
When you specify a specific minor version (such as `4.0.12345`) in `FUNCTIONS_EXTENSION_VERSION`, the function app is pinned to that specific version of the runtime until you explicitly choose to move back to automatic version updates. You should only pin to a specific minor version long enough to resolve any issues with your function app that prevent you from targeting the major version. Older minor versions are regularly removed from the production environment. When your function app is pinned to a minor version that is later removed, your function app is instead run on the closest existing version instead of the version set in `FUNCTIONS_EXTENSION_VERSION`. Minor version removals are announced in [App Service announcements](https://github.com/Azure/app-service-announcements/issues).
9799

98100
> [!NOTE]
99101
> When you try to publish from Visual Studio to an app that is pinned to a specific minor version of the runtime, a dialog prompts you to update to the latest version or cancel the publish. To avoid this check when you must use a specific minor version, add the `<DisableFunctionExtensionVersionUpdate>true</DisableFunctionExtensionVersionUpdate>` property in your `.csproj` file.
@@ -112,7 +114,7 @@ Use one of these methods to temporarily pin your app to a specific version of th
112114

113115
### [Azure CLI](#tab/azure-cli)
114116

115-
You can update the `FUNCTIONS_EXTENSION_VERSION` setting in the function app with the [az functionapp config appsettings set](/cli/azure/functionapp/config/appsettings) command.
117+
You can update the `FUNCTIONS_EXTENSION_VERSION` app setting in the function app with the [az functionapp config appsettings set](/cli/azure/functionapp/config/appsettings) command.
116118

117119
```azurecli-interactive
118120
az functionapp config appsettings set --name <FUNCTION_APP> \
@@ -122,13 +124,13 @@ az functionapp config appsettings set --name <FUNCTION_APP> \
122124

123125
Replace `<FUNCTION_APP>` with the name of your function app and `<RESOURCE_GROUP>` with the name of the resource group for your function app. Also, replace `<VERSION>` with the specific minor version you temporarily need to target.
124126

125-
Choose **Try it** in the previous code example to run the command in [Azure Cloud Shell](../cloud-shell/overview.md). You can also run the [Azure CLI locally](/cli/azure/install-azure-cli) to execute this command. When running locally, you must first run [`az login`](/cli/azure/reference-index#az-login) to sign in.
127+
Choose **Open Cloud Shell** in the previous code example to run the command in [Azure Cloud Shell](../cloud-shell/overview.md). You can also run the [Azure CLI locally](/cli/azure/install-azure-cli) to execute this command. When running locally, you must first run [`az login`](/cli/azure/reference-index#az-login) to sign in.
126128

127129
### [Azure PowerShell](#tab/azure-powershell)
128130

129131
Use this script to pin the Functions runtime:
130132

131-
```powershell
133+
```azurepowershell-interactive
132134
Update-AzFunctionAppSetting -Name "<FUNCTION_APP>" -ResourceGroupName "<RESOURCE_GROUP>" -AppSetting @{"FUNCTIONS_EXTENSION_VERSION" = "<VERSION>"} -Force
133135
```
134136

@@ -152,26 +154,26 @@ The following example shows the [`linuxFxVersion`] value required to pin a Node.
152154

153155
When needed, a support professional can provide you with a valid base image URI for your application.
154156

155-
Use the following Azure CLI commands to view and set the [`linuxFxVersion`]. You can't currently set [`linuxFxVersion`] in the portal or by using Azure PowerShell.
157+
Use the following Azure CLI commands to view and set the [`linuxFxVersion`]. You can't currently set [`linuxFxVersion`] in the portal or by using Azure PowerShell:
156158

157-
+ To view the current runtime version, use with the [az functionapp config show](/cli/azure/functionapp/config) command.
159+
+ To view the current runtime version, use the [az functionapp config show](/cli/azure/functionapp/config) command:
158160

159161
```azurecli-interactive
160162
az functionapp config show --name <function_app> \
161163
--resource-group <my_resource_group> --query 'linuxFxVersion' -o tsv
162164
```
163165
164-
In this code, replace `<function_app>` with the name of your function app. Also replace `<my_resource_group>` with the name of the resource group for your function app. The current value of [`linuxFxVersion`] is returned.
166+
In this code, replace `<function_app>` with the name of your function app. Also, replace `<my_resource_group>` with the name of the resource group for your function app. The current value of [`linuxFxVersion`] is returned.
165167
166-
+ To update the [`linuxFxVersion`] setting in the function app, use the [az functionapp config set](/cli/azure/functionapp/config) command.
168+
+ To update the [`linuxFxVersion`] setting in the function app, use the [az functionapp config set](/cli/azure/functionapp/config) command:
167169
168170
```azurecli-interactive
169171
az functionapp config set --name <FUNCTION_APP> \
170172
--resource-group <RESOURCE_GROUP> \
171173
--linux-fx-version <LINUX_FX_VERSION>
172174
```
173175
174-
Replace `<FUNCTION_APP>` with the name of your function app. Also replace `<RESOURCE_GROUP>` with the name of the resource group for your function app. Finally, replace `<LINUX_FX_VERSION>` with the value of a specific image provided to you by a support professional.
176+
Replace `<FUNCTION_APP>` with the name of your function app. Also, replace `<RESOURCE_GROUP>` with the name of the resource group for your function app. Finally, replace `<LINUX_FX_VERSION>` with the value of a specific image provided to you by a support professional.
175177
176178
You can run these commands from the [Azure Cloud Shell](../cloud-shell/overview.md) by choosing **Open Cloud Shell** in the preceding code examples. You can also use the [Azure CLI locally](/cli/azure/install-azure-cli) to execute this command after executing [`az login`](/cli/azure/reference-index#az-login) to sign in.
177179
@@ -181,6 +183,6 @@ The function app restarts after the change is made to the site config.
181183
## Next steps
182184
183185
> [!div class="nextstepaction"]
184-
> [See Release notes for runtime versions](https://github.com/Azure/azure-webjobs-sdk-script/releases)
186+
> [Release notes for runtime versions](https://github.com/Azure/azure-webjobs-sdk-script/releases)
185187
186188
[`linuxFxVersion`]: functions-app-settings.md#linuxfxversion

0 commit comments

Comments
 (0)