The Azure function has 3 different environment - Dev, Test and Prod.
The Dev and Test did not shows the warning given below and only Prod showed the warning. When I analyze, I found Prod is not build since 2023 where as Dev and Test build recently. so I understand that Prod used old image and need to build and deploy.
To simulate the same problem in Dev, deployed Prod old artifact to dev and I did not see the warning immediately. couple of day later I see the warning on Dev enviornment. so I thought it is the old image is causing the issue. now when I build and deploy the latestdev branch to dev in azure portal the message is still appearing and waited for 1 days.
''''' We've noticed that your function app (func-xyz) is running on an older version of the Azure Functions host. The app is running on version 4.17.3.3, which is missing important security patches. It is strongly recommended that you update your app to the latest versions as soon as possible. We are also making a platform change which we expect to take effect on October 28, 2025. Although it is not guaranteed, this change might impact some apps running on older runtime versions without certain security features. As a precaution, we recommend that you update your apps ahead of this date. The most common reason that an app might be running on an older version is that it is using a custom container image which hasn't had its base layers updated. Your app might also be configured to pin itself to this old version. You should ensure any container images are rebuilt against updated base image tags and remove pinning from your apps. Please see https://aka.ms/functions-maintain-custom-images and https://aka.ms/functions-runtime-version for more information. '''''
I checked the docker inspect mcr.microsoft.com/azure-functions/dotnet:4 --format='{{index .RepoDigests 0}}' in local wsl and get the result
mcr.microsoft.com/azure-functions/dotnet@sha256:afde22c6a8966c652fc56420535a24dd4775d02f8e56991134f221946f46e1b7
The digest refer to 4.0 Docker Image sha256:afde22c6a8966c652fc56420535a24dd4775d02f8e56991134f221946f46e1b7 03/07/2025 4 Docker Image sha256:afde22c6a8966c652fc56420535a24dd4775d02f8e56991134f221946f46e1b7 03/07/2025 4.36.1.2-6-refresh Docker Image sha256:afde22c6a8966c652fc56420535a24dd4775d02f8e56991134f221946f46e1b7 03/07/2025
So logically it is referring the latest image but why warning displayed in dev environment in azure portal.
please advise