azure-maven-plugins icon indicating copy to clipboard operation
azure-maven-plugins copied to clipboard

The function cannot be executed even though the environment variable 'AzureWebJobsStorage' is set.

Open m-moris opened this issue 4 years ago • 1 comments

Plugin in version.

azure-functions-maven-plugin:1.9.2

Reproduce steps.

Set the storage connection strings to envrionment variable 'AzureWebJobsStorage'.

export AzureWebJobsStorage='.....'

The value of AzureWebJobsStorage in local.settings.json is empty.

{
  "IsEncrypted": false,
  "Values": {
    "AzureWebJobsStorage": "",
    "FUNCTIONS_WORKER_RUNTIME": "java",
  }
}

When you execute mvn azure-functions:run command, you will see following messages.

Missing value for AzureWebJobsStorage in local.settings.json. This is required for all triggers other than httptrigger, kafkatrigger. You can run 'func azure functionapp fetch-app-settings <functionAppName>' or specify a connection string in local.settings.json.

But you execute func host start command directly, it works correctly.

Skipping 'AzureWebJobsStorage' from local settings as it's already defined in current environment variables.

Is it checked on the maven plugin? I expect to be able to execute without AzureWebJobsStorage is not set in local.settings.json.

m-moris avatar Mar 18 '21 07:03 m-moris

@m-moris Thanks for your report, maven plugin just call func host start with no app settings value validation during run task, I'll check it soon and will update here once there are updates.

Flanker32 avatar Mar 19 '21 03:03 Flanker32