15 January, 2024

How to find Azure Functions running Python 3.8

Going through my inbox, I see that Microsoft are ending support for Python 3.8 Functions on 14 October 2024.

This is likely to catch some people out, as (IME) few teams understand what Python runtimes they're using, and fewer are likely to know what or how to prepare for this (hint: just upgrade Python 3.10, which is mostly non-breaking).

To find Functions in your environment using Python 3.8, you can use the below Azure Resource Graph query:

| where type == 'microsoft.web/sites'
| extend state = tolower(properties.state)
| where (kind in~ ('functionapp','functionapp,linux','functionapp,linux,container','functionapp,linux,container,kubernetes','functionapp,linux,kubernetes','functionapp,kubernetes','functionapp,linux,container,azurecontainerapps')) and ((type =~ ('microsoft.web/sites')))
| mv-expand properties.siteProperties.properties
| where isnotnull(properties_siteProperties_properties.value) and properties_siteProperties_properties.value != ""
| extend runtime_version=properties_siteProperties_properties.value
| project name,runtime_version,state,kind,location,subscriptionId,resourceGroup,tags
| sort by (tolower(tostring(name))) asc
| where runtime_version =~ "python|3.8"