Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Durable Function returns a largemessages URL but the link returns a 404 #801

Closed
SteveNesbitt opened this issue Jun 11, 2019 · 2 comments
Closed
Milestone

Comments

@SteveNesbitt
Copy link

I have a durable function that implements a fan-out, fan-in pattern. The function is a HttpTrigger function that accepts one or more scheduleIds in the request and the Orchestrator function parses this list of ids and fires off parallel calls to an Activity function to retrieve data from my application layer. It then gathers the responses from the Activity function and produces a consolidated JSON response for the client.

I invoke the Orchestrator function using the starter.WaitForCompletionOrCreateCheckStatusResponseAsync() method.

To test this function I'm using Postman.

When I pass one or two ids to the function, the JSON results are returned synchronously as expected.

When I pass, say, 5 ids to the function, the response code is a 200 but the body contains a URL to a blob storage location (https://something.blob.core.windows.net/durablefunctionshub-largemessages/blahblahblah-executioncompleted-result.json.gz) rather than the JSON array.

Firstly, I don't seem to be able to control whether or not my function returns JSON or a URL. The response size is not huge (about 40K) so it hardly needs temporary blob storage in this instance. But the DurableOrchestrationClient object doesn't seem to allow me to override this behaviour. The runtime seems to be making the decision that the response payload is too large. Is there a way to override this?

Secondly, whenever I try to access the blob storage using the URL in the response I always get a 404. I know the function completed so the result data should be there, but it's never available. Why would this be the case?

Ideally I always want the client to wait for the full dataset to be returned. This is a background task that can take over 60 seconds to complete. I don't want the client to have to make another call to the blob storage to get the data - which as my Postman testing has shown so far is never available anyway.

Investigative information

  • Durable Functions extension version: 1.8.1
  • Function App version (1.0 or 2.0): 2.0
  • Programming language used: C#

Expected behavior
When using starter.WaitForCompletionOrCreateCheckStatusResponseAsync() to start an orchestration instance, I expect the response to be returned if the function completes before the timeout.

Actual behavior
The function is completing before the timeout but the response is a URL to a storage location rather than the JSON content my function should return. And the URL always returns a 404 so the response is not recoverable.

@ghost ghost added the Needs: Triage 🔍 label Jun 11, 2019
@SimonLuckenuik
Copy link

SimonLuckenuik commented Jun 11, 2019

@SteveNesbitt this is being addressed here: #665

The URL points to a file in a private container, so you would require to get the file using the Storage SDK. With the fix, the actual file content will be returned instead of the URL.

@cgillum cgillum added this to the v1.8.3 milestone Jun 21, 2019
@ghost
Copy link

ghost commented Jun 22, 2019

This issue has been marked as duplicate and has not had any activity for 1 day. It will be closed for housekeeping purposes.

@ghost ghost closed this as completed Jun 22, 2019
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants