vlingo / xoom-common

The VLINGO XOOM platform SDK common tools shared across various projects.
Other
16 stars 10 forks source link

Allow client pipelines continue once the failure outcome was dealt with in otherwise() #44

Closed jakzal closed 3 years ago

jakzal commented 3 years ago

Examples in tests.

jakzal commented 3 years ago

Existing tests verify that the pipeline has failed, even if there was an otherwise branch that recovered from the failure:

https://github.com/vlingo/xoom-common/blob/c74e88f1fcf0579113a42d105727c81adb33317c/src/test/java/io/vlingo/xoom/common/completes/FutureCompletesTest.java#L196-L208

Is this intended?

jakzal commented 3 years ago

@VaughnVernon please take a look at this change when you get a chance. I'll merge it now, as it's needed for a change in actors I'm about to submit (https://github.com/vlingo/xoom-actors/pull/91).

VaughnVernon commented 3 years ago

@jakzal I think that the original intention was that a failure handled by an otherwise() would terminate the pipeline. However, I don't disagree that it should be possible to continue the pipeline if otherwise() actually recovers the failure.

Given that preexisting pipelines terminate on failure should (or would hopefully) not cause problems because most/all purposely short circuit by producing a final outcome. For example, 404 or 500 on some HTTP response.

It should be proven by the snapshot build tonight 😃

jakzal commented 3 years ago

Snapshot schemata builds won’t pass yet as I didn’t get this to pass : https://github.com/vlingo/xoom-schemata/pull/201