Azure / azure-functions-durable-extension

Durable Task Framework extension for Azure Functions
MIT License
717 stars 271 forks source link

Calling "rewind" on a failed function will not clear the output #968

Open Nican opened 5 years ago

Nican commented 5 years ago

Description

I have a long-running durable function. The durable function failed due to a bad edge case, so I patched-up the code, redeployed, and called the "rewind" POST endpoint for the instance.

I was actually happily surprised that the function is now running from where it left off, but the "output" was not cleared. So the long-running durable function is still making progress, and updating the "customStatus", but the "output" is now not null.

As per the documentation (https://docs.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-http-api#get-instance-status), the output should be null when "the instance is not in a completed state."

Expected behavior

I expect for the "output" to be null when the durable function is still running.

Actual behavior

The "output" is not cleared from the error message when a failed function is rewinded.

App Details

If deployed to Azure

kunjan13 commented 2 years ago

Any updates on this bug? is it fixed now??

AdamCoulterOz commented 2 years ago

@ConnorMcMahon The same thing happens if you start an instance with the same instance ID that has previously finished, starting a new orchestration (essentially using the orchestration instance id as a mutex lock), it will still have the output from the previous time it ran.

davidmrdavid commented 2 years ago

Hey all, thanks for reaching out and apologies for the late response here.

My understanding is that rewind is still a "preview" / experimental feature (as seen by the docs here: https://docs.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-instance-management?tabs=csharp#rewind-instances-preview), which is probably why this hasn't been prioritized yet. That's probably why some of the edge cases, such as this one, are still a little rough. Still, I'll add this to our backlog to restart a discussion on the status of rewind and our plans moving forward, so thanks for the ping!

Finally, just a heads up that Connor is now with a different organization, so he probably won't be responding to pings in these threads :) . Feel free to ping me, or any of the Durable Functions maintainers, instead!