1

I am currently trying to list all instances of an activity function and the orchestrator function using azure function core tools. The application synchronizes data from different sources into a centralized location.

The setup is as follows:

TimerTrigger -> Durable Orchestrator -> Multiple Activity Functions

In my concrete example, it is like this:

Start Synchronization -> Orchestrate Synchronizations -> Synchronize Source

So we start the synchronization process which starts the orchestrator. The orchestrator then starts multiple different synchronizations, one for each source. The problem though is that I cannot seem to get the azure function core tools to list me all instances of the functions I am interested in.

Unfortunately, I would really prefer not to have to use the REST api to query for this information. The setup really complicates things with IP restrictions and managed identity authentication. I think I can correct the setup to get things to work from my network + user, if really needed, but I think that will take way longer than required.

I have tried running the following command:

func durable get-instances

in a directory with a file called host.json with the following contents:

{
    "version": "2.0",
    "AzureWebJobsStorage":"DefaultEndpointsProtocol=https;AccountName=Name;AccountKey=Key;EndpointSuffix=core.windows.net",
}

I have also tried where the contents of the file are as follows:

{
    "version": "2.0",
    "extensions": {
      "durableTask": {
        "storageProvider": {
          "connectionStringName": "DefaultEndpointsProtocol=https;AccountName=Name;AccountKey=Key;EndpointSuffix=core.windows.net"
        }
      }
    }
  }

I have tried calling the func durable get-instances with and without the --connection-string-setting parameter, with the values 'AzureWebJobsStorage' and 'extensions:durableTask:storageProvider:connectionStringName', but nothing seems to work. I keep getting the error No storage connection string found.

I know that the connection string is correct. I have pulled it directly from the storage account 'Access keys' blade.

'Access keys' blade

Is there anything I am missing? What am I doing wrong?

1
  • 1
    You should specify only the setting name in connectionStringName. The setting is locally in local.settings.json and in Azure in the Configuration. Commented Apr 21, 2022 at 8:22

1 Answer 1

0

Thanks to @juunas, I got it to work. I edited the host.json file to have the following content:

{
    "version": "2.0"
}

and created another file called local.settings.json with the following contents:

{
  "IsEncrypted": false,
  "Values": {
    "AzureWebJobsStorage": "DefaultEndpointsProtocol=https;AccountName=Name;AccountKey=Key;EndpointSuffix=core.windows.net",
  }
}

Running func durable get-instances now works and returns a continuation token, but an empty list. I was not expecting that, but I can now start exploring and understanding here what is going on.

Sign up to request clarification or add additional context in comments.

1 Comment

I highly recommend the Azure Durable Functions Monitor for looking at and debugging instances. I installed Azure Functions Core Tools locally and then run the monitor from within Visual Studio Code by right-clicking the host.json.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.