Giter VIP home page Giter VIP logo

Comments (8)

paulyuk avatar paulyuk commented on June 23, 2024 1

Im escalating and will take a look and assign. If zip is bad suspect this is somewhere in the deployment center package build.

from azure-functions-dotnet-worker.

kshyju avatar kshyju commented on June 23, 2024

@mattchenderson Who can help with deployment center(in portal) related issues?

from azure-functions-dotnet-worker.

mattchenderson avatar mattchenderson commented on June 23, 2024

@kulkarnisonia16 for deployment center and tools

from azure-functions-dotnet-worker.

patelchandni avatar patelchandni commented on June 23, 2024

It is recommended to use the "GitHub" option from the deployment center, instead of "External Git". It will help you configure a GitHub action workflow which is more reliable and uses this deployment action: https://github.com/Azure/functions-action

from azure-functions-dotnet-worker.

scale-tone avatar scale-tone commented on June 23, 2024

@patelchandni , in many scenarios (like the one I'm currently in, which is allowing people to deploy DfMon with an ARM template) deploying with GitHub actions is not an option, as it requires you to have full control over the repo, which many people don't have or don't want to have.

Are you saying that App Service Build Service is now deprecated (because I haven't seen any announcements like that) ?

from azure-functions-dotnet-worker.

paulyuk avatar paulyuk commented on June 23, 2024

@scale-tone
We understand root cause and have a workaround. Could you please try this?
paulyuk/azure-func-dotnet-isolated-test (github.com)

Here is a PR for it:
Add solution file (enables Deployment Center deploy) by paulyuk · Pull Request #1 · scale-tone/azure-func-dotnet-isolated-test (github.com)

The root issue triggering the Deployment center bug is there's no solution file, and then Deployment Center assumes this is a vanilla web app, and not a function, during the deployment build.

from azure-functions-dotnet-worker.

pontusanderssonXD avatar pontusanderssonXD commented on June 23, 2024

I have the same problem with a .NET 8 Isolated function being zip deployed through a Bamboo plan via Azure CLI.

Build log without .sln file

Command: "C:\home\site\deployments\tools\deploy.cmd"
Handling .NET Console Application deployment with MSBuild16.

  Determining projects to restore...
  Restored C:\local\Temp\zipdeploy\extracted\compileRevenuePerCustomer\func.csproj (in 58.13 sec).
C:\local\Temp\zipdeploy\extracted\compileRevenuePerCustomer\compileRevenuePerCustomer.cs(106,38): warning CS8604: Possible null reference argument for parameter 'source' in 'IEnumerable<<anonymous type: string customer, string articleNumber, SapDataGroupedArticleNumber jsonObj>> Enumerable.Select<SapData, <anonymous type: string customer, string articleNumber, SapDataGroupedArticleNumber jsonObj>>(IEnumerable<SapData> source, Func<SapData, int, <anonymous type: string customer, string articleNumber, SapDataGroupedArticleNumber jsonObj>> selector)'. [C:\local\Temp\zipdeploy\extracted\compileRevenuePerCustomer\func.csproj]
C:\local\Temp\zipdeploy\extracted\compileRevenuePerCustomer\compileRevenuePerCustomer.cs(132,51): warning CS8619: Nullability of reference types in value of type 'KeyValuePair<string, JToken?>' doesn't match target type 'KeyValuePair<string, JToken>'. [C:\local\Temp\zipdeploy\extracted\compileRevenuePerCustomer\func.csproj]
C:\local\Temp\zipdeploy\extracted\compileRevenuePerCustomer\compileRevenuePerCustomer.cs(138,39): warning CS8602: Dereference of a possibly null reference. [C:\local\Temp\zipdeploy\extracted\compileRevenuePerCustomer\func.csproj]
C:\local\Temp\zipdeploy\extracted\compileRevenuePerCustomer\compileRevenuePerCustomer.cs(165,26): warning CS8604: Possible null reference argument for parameter 'source' in 'IEnumerable<mappingData> Enumerable.Where<mappingData>(IEnumerable<mappingData> source, Func<mappingData, bool> predicate)'. [C:\local\Temp\zipdeploy\extracted\compileRevenuePerCustomer\func.csproj]
  func -> C:\local\Temp\8dc187b3b93af8e\app_data\jobs\continuous\deployedJob\func.dll
  Determining projects to restore...
  Restored C:\local\Temp\43xmtwa1.g5j\WorkerExtensions.csproj (in 27.52 sec).
  WorkerExtensions -> C:\local\Temp\43xmtwa1.g5j\buildout\Microsoft.Azure.Functions.Worker.Extensions.dll
        1 file(s) copied.
Creating app_offline.htm
KuduSync.NET from: 'C:\local\Temp\8dc187b3b93af8e' to: 'C:\home\site\wwwroot'
Copying file: 'hostingstart.html'
Copying file: 'app_data\jobs\continuous\deployedJob\Azure.Core.dll'
Copying file: 'app_data\jobs\continuous\deployedJob\extensions.json'
Copying file: 'app_data\jobs\continuous\deployedJob\func.deps.json'
Copying file: 'app_data\jobs\continuous\deployedJob\func.dll'
Copying file: 'app_data\jobs\continuous\deployedJob\func.exe'
Copying file: 'app_data\jobs\continuous\deployedJob\func.pdb'
Copying file: 'app_data\jobs\continuous\deployedJob\func.runtimeconfig.json'
Copying file: 'app_data\jobs\continuous\deployedJob\functions.metadata'
Copying file: 'app_data\jobs\continuous\deployedJob\Google.Protobuf.dll'
Copying file: 'app_data\jobs\continuous\deployedJob\Grpc.Core.Api.dll'
Copying file: 'app_data\jobs\continuous\deployedJob\Grpc.Net.Client.dll'
Copying file: 'app_data\jobs\continuous\deployedJob\Grpc.Net.ClientFactory.dll'
Copying file: 'app_data\jobs\continuous\deployedJob\Grpc.Net.Common.dll'
Copying file: 'app_data\jobs\continuous\deployedJob\Microsoft.AI.DependencyCollector.dll'
Copying file: 'app_data\jobs\continuous\deployedJob\Microsoft.AI.EventCounterCollector.dll'
Copying file: 'app_data\jobs\continuous\deployedJob\Microsoft.AI.PerfCounterCollector.dll'
Copying file: 'app_data\jobs\continuous\deployedJob\Microsoft.AI.ServerTelemetryChannel.dll'
Copying file: 'app_data\jobs\continuous\deployedJob\Microsoft.AI.WindowsServer.dll'
Copying file: 'app_data\jobs\continuous\deployedJob\Microsoft.ApplicationInsights.dll'
Copying file: 'app_data\jobs\continuous\deployedJob\Microsoft.ApplicationInsights.WorkerService.dll'
Copying file: 'app_data\jobs\continuous\deployedJob\Microsoft.Azure.Functions.Worker.ApplicationInsights.dll'
Copying file: 'app_data\jobs\continuous\deployedJob\Microsoft.Azure.Functions.Worker.Core.dll'
Copying file: 'app_data\jobs\continuous\deployedJob\Microsoft.Azure.Functions.Worker.dll'
Copying file: 'app_data\jobs\continuous\deployedJob\Microsoft.Azure.Functions.Worker.Extensions.Abstractions.dll'
Copying file: 'app_data\jobs\continuous\deployedJob\Microsoft.Azure.Functions.Worker.Extensions.Http.dll'
Copying file: 'app_data\jobs\continuous\deployedJob\Microsoft.Azure.Functions.Worker.Grpc.dll'
Copying file: 'app_data\jobs\continuous\deployedJob\Microsoft.Bcl.AsyncInterfaces.dll'
Copying file: 'app_data\jobs\continuous\deployedJob\Microsoft.Extensions.Caching.Abstractions.dll'
Copying file: 'app_data\jobs\continuous\deployedJob\Microsoft.Extensions.Caching.Memory.dll'
Copying file: 'app_data\jobs\continuous\deployedJob\Microsoft.Extensions.Configuration.Abstractions.dll'
Copying file: 'app_data\jobs\continuous\deployedJob\Microsoft.Extensions.Configuration.Binder.dll'
Copying file: 'app_data\jobs\continuous\deployedJob\Microsoft.Extensions.Configuration.CommandLine.dll'
Copying file: 'app_data\jobs\continuous\deployedJob\Microsoft.Extensions.Configuration.dll'
Copying file: 'app_data\jobs\continuous\deployedJob\Microsoft.Extensions.Configuration.EnvironmentVariables.dll'
Copying file: 'app_data\jobs\continuous\deployedJob\Microsoft.Extensions.Configuration.FileExtensions.dll'
Copying file: 'app_data\jobs\continuous\deployedJob\Microsoft.Extensions.Configuration.Json.dll'
Copying file: 'app_data\jobs\continuous\deployedJob\Microsoft.Extensions.Configuration.UserSecrets.dll'
Copying file: 'app_data\jobs\continuous\deployedJob\Microsoft.Extensions.DependencyInjection.Abstractions.dll'
Copying file: 'app_data\jobs\continuous\deployedJob\Microsoft.Extensions.DependencyInjection.dll'
Copying file: 'app_data\jobs\continuous\deployedJob\Microsoft.Extensions.FileProviders.Abstractions.dll'
Copying file: 'app_data\jobs\continuous\deployedJob\Microsoft.Extensions.FileProviders.Physical.dll'
Copying file: 'app_data\jobs\continuous\deployedJob\Microsoft.Extensions.FileSystemGlobbing.dll'
Copying file: 'app_data\jobs\continuous\deployedJob\Microsoft.Extensions.Hosting.Abstractions.dll'
Copying file: 'app_data\jobs\continuous\deployedJob\Microsoft.Extensions.Hosting.dll'
Copying file: 'app_data\jobs\continuous\deployedJob\Microsoft.Extensions.Http.dll'
Copying file: 'app_data\jobs\continuous\deployedJob\Microsoft.Extensions.Logging.Abstractions.dll'
Copying file: 'app_data\jobs\continuous\deployedJob\Microsoft.Extensions.Logging.ApplicationInsights.dll'
Omitting next output lines...
Finished successfully.

After i added the solution file the Deployment Center seems to understand that it is a function and seems to build correctly. See attached log
deploy log with solution file.txt

The function seems to be built directly to the wwwroot folder as expected:
Skärmavbild 2024-01-21 kl  12 03 18

However the deploy seems to somehow break the Function App resource. Here are the overview before deployment:
Skärmavbild 2024-01-21 kl  12 13 39

After deployment there is an error Microsoft.Azure.WebJobs.Script: Did not find functions with language [dotnet-isolated]. and the Runtime version says Error:
Skärmavbild 2024-01-21 kl  12 16 13

Trying to call the functions gives a 503 response saying Function host is not running.

These are the appSettings declared in the ARM template:

"appSettings": [
                        {
                            "name": "APPLICATIONINSIGHTS_CONNECTION_STRING",
                            "value": "[concat('InstrumentationKey=',parameters('application_insights_key'),';IngestionEndpoint=https://',resourceGroup().location,'in.applicationinsights.azure.com/;LiveEndpoint=https://',resourceGroup().location,'.livediagnostics.monitor.azure.com/')]"
                        },
                        {
                            "name": "AzureWebJobsStorage",
                            "value": "[concat('DefaultEndpointsProtocol=https;AccountName=',parameters('storageaccount_hostname'),';AccountKey=',listkeys(resourceId('Microsoft.Storage/storageAccounts', parameters('storageaccount_hostname')), providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).keys[0].value)]"
                        },
                        {
                            "name": "FUNCTIONS_EXTENSION_VERSION",
                            "value": "~4"
                        },
                        {
                            "name": "WEBSITE_CONTENTAZUREFILECONNECTIONSTRING",
                            "value": "[concat('DefaultEndpointsProtocol=https;AccountName=',parameters('storageaccount_hostname'),';AccountKey=',listkeys(resourceId('Microsoft.Storage/storageAccounts', parameters('storageaccount_hostname')), providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]).keys[0].value)]"
                        },
                        {
                            "name": "WEBSITE_CONTENTSHARE",
                            "value": "[toLower(parameters('azurefunctionapp_hostname'))]"
                        },
                        {
                            "name": "WEBSITE_USE_PLACEHOLDER_DOTNETISOLATED",
                            "value": "1"
                        },
                        {
                            "name": "FUNCTIONS_WORKER_RUNTIME",
                            "value": "dotnet-isolated"
                        },
                        {
                            "name": "SCM_DO_BUILD_DURING_DEPLOYMENT",
                            "value": "true"
                        }
                    ]

Edit
My bad, I had a error in the deployment. All works as it should after adding the .sln file. Thanks!

from azure-functions-dotnet-worker.

scale-tone avatar scale-tone commented on June 23, 2024

Thanks for your help, @paulyuk .
I confirm that adding an .sln file helps, but only if the project is in repo's root folder.

When deploying something that isn't in the root (and using Project app setting to point to the correct project folder/.csproj file) it still doesn't work.
The correct project is picked up for the build, the build succeeds, but the app instance remains empty.

And you cannot set Project setting to an .sln file path - the build fails then:

The specified project 'C:\home\site\repository\durablefunctionsmonitor.dotnetisolated\sln.sln' is not valid. It needs to point to either a csproj/vbproj file or to a directory.

from azure-functions-dotnet-worker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.