You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#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.
9
11
---
10
12
11
13
# How to target Azure Functions runtime versions
12
14
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.
14
16
15
17
::: zone pivot="platform-windows"
16
18
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
19
21
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.
20
22
::: zone-end
21
23
>[!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.
23
25
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).
25
27
26
28
## Update your runtime version
27
29
@@ -41,7 +43,7 @@ You can view the current runtime version of your function app in one of these wa
41
43
42
44
### [Azure CLI](#tab/azure-cli)
43
45
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.
45
47
46
48
Using the Azure CLI, view the current runtime version with the [`az functionapp config appsettings list`](/cli/azure/functionapp/config/appsettings) command:
47
49
@@ -52,7 +54,7 @@ az functionapp config appsettings list --name <function_app> \
52
54
53
55
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.
54
56
55
-
You see the `FUNCTIONS_EXTENSION_VERSION` in the following output:
57
+
You see the `FUNCTIONS_EXTENSION_VERSION` in the following partial output:
56
58
57
59
```output
58
60
[
@@ -77,7 +79,7 @@ Choose **Open Cloud Shell** in the previous code example to run the command in [
77
79
78
80
To check the Azure Functions runtime, use the following cmdlet:
@@ -87,13 +89,13 @@ Replace `<FUNCTION_APP>` with the name of your function app and `<RESOURCE_GROUP
87
89
88
90
## <aname="manual-version-updates-on-linux"></a>Pin to a specific version
89
91
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.
91
93
::: zone pivot="platform-linux"
92
94
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.
93
95
::: zone-end
94
96
Pinning to a specific runtime version causes your function app to restart.
95
97
::: 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).
97
99
98
100
> [!NOTE]
99
101
> 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
112
114
113
115
### [Azure CLI](#tab/azure-cli)
114
116
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.
116
118
117
119
```azurecli-interactive
118
120
az functionapp config appsettings set --name <FUNCTION_APP> \
@@ -122,13 +124,13 @@ az functionapp config appsettings set --name <FUNCTION_APP> \
122
124
123
125
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.
124
126
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.
@@ -152,26 +154,26 @@ The following example shows the [`linuxFxVersion`] value required to pin a Node.
152
154
153
155
When needed, a support professional can provide you with a valid base image URI for your application.
154
156
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:
156
158
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:
158
160
159
161
```azurecli-interactive
160
162
az functionapp config show --name <function_app> \
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.
165
167
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:
167
169
168
170
```azurecli-interactive
169
171
az functionapp config set --name <FUNCTION_APP> \
170
172
--resource-group <RESOURCE_GROUP> \
171
173
--linux-fx-version <LINUX_FX_VERSION>
172
174
```
173
175
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.
175
177
176
178
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.
177
179
@@ -181,6 +183,6 @@ The function app restarts after the change is made to the site config.
181
183
## Next steps
182
184
183
185
> [!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)
0 commit comments