Azure / azure-functions-servicebus-extension

Service Bus extension for Azure Functions
MIT License
65 stars 35 forks source link

[QUERY] Azure function upgrade from .NET Core 3.1 to .NET 6 for service bus triggered function #188

Open jsquire opened 2 years ago

jsquire commented 2 years ago

Issue Transfer

This issue has been transferred from the Azure SDK for .NET repository, #28373.

Please be aware that @JD-4810 is the author of the original issue and include them for any questions or replies.

Details

Library name and version

Microsoft.Azure.WebJobs.Extensions.ServiceBus 4.3.0

Query/Question

I upgraded a service bus triggered Azure function running inside a Kubernetes cluster to v4 and .NET6. Post that, the function stopped processing messages from the service bus. I see no logs whatsoever. Initially, I thought it could be that the package Microsoft.Azure.WebJobs.Extensions.ServiceBus version 4.3.0 might not be supported in .NET 6 but then I ran a newly created Azure function in .NET 6 and v4 locally with Microsoft.Azure.WebJobs.Extensions.ServiceBus 4.3.0 and it hit the breakpoint on sending a message to the Service bus.

Environment

Kubernetes cluster version 1.21.7

JD-4810 commented 2 years ago

If it helps, the dockerfile is as below :

FROM mcr.microsoft.com/dotnet/sdk:6.0 AS installer-env

ARG VERSION="UNSET-VERSION"
ARG NUGET_URL="UNSET-URL"
ARG NUGET_USER="UNSET-USER"
ARG NUGET_SECRET="UNSET-SECRET"
COPY . /src/dotnet-function-app
RUN cd /src/dotnet-function-app && \
    mkdir -p /home/site/wwwroot && \
    dotnet nuget add source $NUGET_URL -n DummyName -u $NUGET_USER -p $NUGET_SECRET --store-password-in-clear-text && \
    dotnet publish MyProject.csproj --output /home/site/wwwroot /p:Version=$VERSION

FROM mcr.microsoft.com/azure-functions/dotnet:4
ENV AzureWebJobsScriptRoot=/home/site/wwwroot \
    AzureFunctionsJobHost__Logging__Console__IsEnabled=true

COPY --from=installer-env ["/home/site/wwwroot", "/home/site/wwwroot"]