temporalio / features

Behavior and history compatibility testing for Temporal SDKs
14 stars 17 forks source link

WorkflowInfo.lastCompletionResult #54

Open lorensr opened 2 years ago

lorensr commented 2 years ago

Document what it is

It's a list of Payloads. So is it previousResults plural? With most recent result at beginning or end of array? And is it different between Crons vs ContinueAsNew?

Include it

cretz commented 2 years ago

I believe workflow results have always been a collection. But I wouldn't be surprised if TS only supports single-item collections for workflow results.

In TS, please treat this just like workflow results. If it's singular named and errors if there is more than one, do the same here. I think, though I haven't confirmed, that Go can technically return multiple results, but I am unsure if any non-Go SDK supports that.

josh-berry commented 1 year ago

I'm a little confused by this—is it a TS-specific issue? Would making a change to this API now be a breaking change? And if so, is it worth doing or should we just close this?

lorensr commented 4 months ago

IIRC no SDKs support returning multiple values, and some subset of [SDKs, UI, CLI] return the single return value that's in the list instead of the list. If I'm right, IMO all should do so. TS does not and it would be breaking.