Azure/azure-functions-dotnet-worker

CosmosDBTrigger does not accept any valid StartFromTime value

lostincomputer opened this issue · 0 comments

Description

CosmosDBTrigger does not accept any valid StartFromTime value and always fails with:

The listener for function 'Functions.Function1' was unable to start. Microsoft.Azure.WebJobs.Extensions.CosmosDB: The specified StartFromTime parameter is not in the correct format. Please use the ISO 8601 format with the UTC designator. For example: '2021-02-16T14:19:29Z'.

The exact same setup works in in-process model with Microsoft.Azure.WebJobs.Extensions.CosmosDB, but not in isolated worker model with Microsoft.Azure.Functions.Worker.Extensions.CosmosDB.

Steps to reproduce

Create an Isolated worker Azure function and reference Microsoft.Azure.Functions.Worker.Extensions.CosmosDB

[Function("Function1")]
public void Run([CosmosDBTrigger(
    databaseName: "databaseName",
    containerName: "containerName",
    Connection = "CosmosDbConnectionString",
    LeaseContainerName = "LeaseContainerName ",
    CreateLeaseContainerIfNotExists = true,
    StartFromTime = "2021-02-16T14:19:29Z" // Error is thrown even when I use the example value in the error message
    )] IReadOnlyList<Transaction> transactions)
{
}