Azure / azure-functions-docker

This repo contains the base Docker images for working with azure functions
MIT License
247 stars 115 forks source link

4.33.2 may be broken #1068

Open jessephelps opened 2 months ago

jessephelps commented 2 months ago

I don't have a lot of diagnostic data to provide here publicly, but when allowing my CI/CD to pull in the current latest image for node 4.0 (which is aliased to 4.33.2) my functions are not working when they deploy to azure. I spent a lot of time trying to figure out what was wrong in my code and after not finding anything, I noticed my last successful deploy was the day before the latest modification to 4.0 (4/19/24). So I identified that 4.33.1 was the image I was on previously, I specified it in my base image and everything is working again. I'm not sure what else to provide to help here but at least wanted to get it on the radar and see if anyone else was noticing issues.

jessephelps commented 2 months ago

I can also add that I found a couple other people having issues with similar symptoms here:

https://github.com/Azure/azure-functions-host/issues/10033 https://github.com/Azure/azure-functions-host/issues/10032

asalvo commented 1 month ago

We are having the same problem. What is interesting is that we had a version of our container built using 4.33.2-refresh-python3.11-slim working in Azure. We pushed a new version of our container on Thursday 5/9 and the container failed to start. Redeploying the immediate previous version of our container, which was also built using 4.33.2-refresh-python3.11-slim also failed to start. We had to go back several versions until we found one that would start, and later concluded that it was built using 4.31.1-refresh-python3.11-slim.

The container is deployed to two different app services, running on 2 different App Service plans (beta and production) and the problem exists and started on the same day.

We have another container that was built using 4.34.1-refresh-python3.10-slim (python 3.10 instead of 3.11) and it is still working.

I did manage to find 1 error in the docker logs.

A host error has occurred during startup operation '57481047-e90c-41fe-84c3-5c1219734341'.
2024-05-09T22:55:34.568983678Z       System.InvalidOperationException: No initialized language worker channel found for runtime: python.
2024-05-09T22:55:34.568989078Z          at Microsoft.Azure.WebJobs.Script.WorkerFunctionMetadataProvider.GetFunctionMetadataAsync(IEnumerable`1 workerConfigs, Boolean forceRefresh) in /src/azure-functions-host/src/WebJobs.Script/Host/WorkerFunctionMetadataProvider.cs:line 105
2024-05-09T22:55:34.568994278Z          at Microsoft.Azure.WebJobs.Script.WebHost.FunctionMetadataProvider.GetFunctionMetadataAsync(IEnumerable`1 workerConfigs, IEnvironment environment, Boolean forceRefresh) in /src/azure-functions-host/src/WebJobs.Script/Host/FunctionMetadataProvider.cs:line 45
2024-05-09T22:55:34.568998978Z          at Microsoft.Azure.WebJobs.Script.FunctionMetadataManager.LoadFunctionMetadata(Boolean forceRefresh, Boolean includeCustomProviders, IFunctionInvocationDispatcher dispatcher, IList`1 workerConfigs) in /src/azure-functions-host/src/WebJobs.Script/Host/FunctionMetadataManager.cs:line 146
2024-05-09T22:55:34.569003179Z          at Microsoft.Azure.WebJobs.Script.FunctionMetadataManager.GetFunctionMetadata(Boolean forceRefresh, Boolean applyAllowList, Boolean includeCustomProviders, IList`1 workerConfigs) in /src/azure-functions-host/src/WebJobs.Script/Host/FunctionMetadataManager.cs:line 90
2024-05-09T22:55:34.569007979Z          at Microsoft.Azure.WebJobs.Script.ScriptHost.GetFunctionsMetadata() in /src/azure-functions-host/src/WebJobs.Script/Host/ScriptHost.cs:line 375
2024-05-09T22:55:34.569012979Z          at Microsoft.Azure.WebJobs.Script.ScriptHost.InitializeAsync(CancellationToken cancellationToken) in /src/azure-functions-host/src/WebJobs.Script/Host/ScriptHost.cs:line 282
2024-05-09T22:55:34.569017579Z          at Microsoft.Azure.WebJobs.Script.ScriptHost.StartAsyncCore(CancellationToken cancellationToken) in /src/azure-functions-host/src/WebJobs.Script/Host/ScriptHost.cs:line 259
2024-05-09T22:55:34.569021379Z          at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
2024-05-09T22:55:34.569025979Z          at Microsoft.Azure.WebJobs.Script.WebHost.WebJobsScriptHostService.UnsynchronizedStartHostAsync(ScriptHostStartupOperation activeOperation, Int32 attemptCount, JobHostStartupMode startupMode) in /src/azure-functions-host/src/WebJobs.Script.WebHost/WebJobsScriptHostService.cs:line 376
dafi-dnv commented 1 month ago

Same here. I had to go back to python:4.31.1-python3.11-appservice to make it run on Azure.

That's strange as this container is 2 months old. My last successful build wasn't that old. But it seems that it's not possible to tell what version was used from logs when you use python:4-python3.11-appservice tag. 🤦🏻‍♂️ That's the log from last working container build.

Status: Downloaded newer image for mcr.microsoft.com/azure-functions/python:4-python3.11-appservice
mcr.microsoft.com/azure-functions/python:4-python3.11-appservice
/usr/bin/docker inspect mcr.microsoft.com/azure-functions/python:4-python3.11-appservice
[
    {
        "Id": "sha256:393b7eac8292b797c65486ce4367d557b034e98667335097d5995fd7f25acea9",
        "RepoTags": [
            "mcr.microsoft.com/azure-functions/python:4-python3.11-appservice"
        ],
        "RepoDigests": [
            "mcr.microsoft.com/azure-functions/python@sha256:682ad96cd658ad03d525a9dcb7f54bf1794768ce88018221cb87c882ded3be74"
        ],
        "Parent": "",
        "Comment": "buildkit.dockerfile.v0",
        "Created": "2024-04-19T15:45:57.471090862Z",