Fix get_status_all() to return all the instances. #477
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
WARNING: THIS PATCH IS JUST TO HINT ABOUT THE EXISTING ISSUE. IT NEEDS SOME ADDITIONAL WORK FROM THE MAINTAINERS TO BE MERGED.
get_status_all() function is meant to return all the instances of the durable function. However, if there is more than 100 instances, the function will not return all of them.
This is due to the fact that the if more than 100 instances exists, a continuation token is returned in the response header which is called x-ms-continuation-token. Please see:
https://learn.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-http-api#response-2
If we set the continuation token in the next request header, we get the next 100 instances. This is essentially what we want to do in this patch: to supply x-ms-continuation-token if it is given from the API.
Please note that in DurableOrchestrationClient, I have used "response.header" while this attribute does not exist in the "response" object. Adding it is beyond my knowledge and requires maintainer's attention.