-
Notifications
You must be signed in to change notification settings - Fork 464
Description
I am working on a version of the PowerShell worker which supports indexing of functions from within the worker, similar to PyStein. When the PowerShell 7.2 worker and the Function App report compatibility with worker indexing, and extension bundles are enabled, the Core Tools reports an issue starting the Host. Here is the error I get:
Investigative information
Log output from func host start --verbose:
Azure Functions Core Tools
Core Tools Version: 4.0.4590 Commit hash: N/A (64-bit)
Function Runtime Version: 4.5.2.18383
<other stuff>
[2022-07-20T18:00:26.555Z] Initializing Host. OperationId: '22148f0c-ba24-4fcc-82d7-dac02bdffa41'.
[2022-07-20T18:00:26.573Z] Host initialization: ConsecutiveErrors=0, StartupCount=1, OperationId=22148f0c-ba24-4fcc-82d7-dac02bdffa41
[2022-07-20T18:00:26.607Z] Loading functions metadata
[2022-07-20T18:00:26.611Z] Reading functions metadata
[2022-07-20T18:00:26.646Z] A host error has occurred during startup operation '22148f0c-ba24-4fcc-82d7-dac02bdffa41'.
[2022-07-20T18:00:26.666Z] Microsoft.Azure.WebJobs.Script: _dispatcher.
[2022-07-20T18:00:26.675Z] Stopping JobHost
[2022-07-20T18:00:26.679Z] Closing local http RPC endpoint: http://127.0.0.1:17071/durabletask/. InstanceId: . Function: . HubName: TestHubName. AppName: . SlotName: . ExtensionVersion: 2.7.1. SequenceNumber: 1.
[2022-07-20T18:00:26.704Z] Failed to stop host instance 'ed26e5ee-ced0-48fc-8169-6a9132fa4c96'.
[2022-07-20T18:00:26.704Z] Microsoft.Azure.WebJobs.Host: The host has not yet started.
Value cannot be null. (Parameter 'provider')
[2022-07-20T18:00:26.737Z] Initialization cancellation requested by runtime.
[2022-07-20T18:00:26.741Z] Stopping host...
[2022-07-20T18:00:26.762Z] Host shutdown completed.
Host error is reported immediately after reading the functions metadata, something to do with _dispatcher
Repro steps
Provide the steps required to reproduce the problem:
- Setup a PowerShell 7.2 Function App, include "AzureWebJobsFeatureFlags":"EnableWorkerIndexing" in the local.settings.json
- Modify the PowerShell worker to report compatibility with worker indexing by modifying worker.config.json to include "workerIndexing": "true" in both 'Azure Functions Core Tools\workers\powershell' and 'Azure Functions Core Tools\workers\powershell\7.2'
- Attempt to run the Function App
Expected behavior
When the PowerShell 7.2 worker and the Function App report compatibility with Worker Indexing, the Host should start from Core Tools.
Actual behavior
Core tools reports "A host error has occurred during startup operation "
Known workarounds
Removing the extensionBundle from host.json will prevent this error