Search code examples
azure-java-tools

Azurefunctions plugin long azureFunctionsPackage execution


I'm using the com.microsoft.azure.azurefunctions.gradle.plugin in version 1.11.0 in my project and can run it successfully locally when running "gradlew clean azureFunctionsRun".

My issue is, that it takes up to 7m 41sec in the step azureFunctionsPackage ("Step 8 of 8: Installing function extensions if needed" is where it spends most of the time).

When debugging, I see that I'm getting a "Read timed out" for https://rt.services.visualstudio.com:443

2022-10-06T11:27:17.709+0200 [DEBUG] [com.microsoft.applicationinsights.core.dependencies.http.impl.conn.PoolingHttpClientConnectionManager] Connection request: [route: {s}->https://rt.services.visualstudio.com:443][total kept alive: 3; route allocated: 1 of 20; total allocated: 3 of 200]
2022-10-06T11:27:17.711+0200 [DEBUG] [com.microsoft.applicationinsights.core.dependencies.http.wire] http-outgoing-3 << "[read] I/O error: Read timed out"
2022-10-06T11:27:17.711+0200 [DEBUG] [com.microsoft.applicationinsights.core.dependencies.http.impl.conn.PoolingHttpClientConnectionManager] Connection leased: [id: 3][route: {s}->https://rt.services.visualstudio.com:443][total kept alive: 2; route allocated: 1 of 20; total allocated: 3 of 200]

And also for https://dc.services.visualstudio.com:443:

2022-10-06T11:31:28.280+0200 [DEBUG] [com.microsoft.applicationinsights.core.dependencies.http.impl.conn.PoolingHttpClientConnectionManager] Connection request: [route: {s}->https://dc.services.visualstudio.com:443][total kept alive: 3; route allocated: 2 of 20; total allocated: 3 of 200]
2022-10-06T11:31:28.281+0200 [DEBUG] [com.microsoft.applicationinsights.core.dependencies.http.wire] http-outgoing-2 << "[read] I/O error: Read timed out"
2022-10-06T11:31:28.281+0200 [DEBUG] [com.microsoft.applicationinsights.core.dependencies.http.impl.conn.PoolingHttpClientConnectionManager] Connection leased: [id: 2][route: {s}->https://dc.services.visualstudio.com:443][total kept alive: 2; route allocated: 2 of 20; total allocated: 3 of 200]

But always after around 7min 41sec the execution finishes with:

Failed to check update for Azure Functions Core Tools
Failed to check update for Azure Functions Core Tools
Function extension installation done.
Successfully built Azure Functions.

Any way to block the "check update for Azure Functions Core Tools"?

Or any other way to solve the issue with the "timed out"?

Used:

  • Java 17
  • Gradle 7.5.1
  • Ubuntu 22.04
  • Azure Functions Plugin 1.11.0

Solution

  • I've added following entry to my host.json:

    "extensionBundle": {
      "id": "Microsoft.Azure.Functions.ExtensionBundle",
      "version": "[3.3.0, 4.0.0)"
    }
    

    This doesn't really "solve" the problem, but skips the "install extension" step and therefore isn't stuck anymore. This is good enough for me.