Skip to content

Conversation

Sushisource
Copy link
Member

@Sushisource Sushisource commented Nov 18, 2020

First PR so please fill me in on anything I'm missing arch or style wise. Thanks!

Closes #257

@CLAassistant
Copy link

CLAassistant commented Nov 18, 2020

CLA assistant check
All committers have signed the CLA.

@Sushisource Sushisource requested a review from vitarb November 19, 2020 00:46
}
}
Optional<TestServiceRetryState> retryState;
Optional<Failure> lastFailure = Optional.empty();
Copy link
Member

@mfateev mfateev Nov 25, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would move empty() initialization to else block:

Optional<Failure> lastFailure;
if (...) {
   lastFailure = ...
} else {
   lastFailure = Optional.empty();
}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would require us to set it to empty in two branching paths to ensure it's non-null, thus more verbose. Any particular reason not to leave it this way?

@mfateev
Copy link
Member

mfateev commented Nov 25, 2020

Earlier you asked about time skipping logic. It is encapsulated in the SelfAdvancingTime.

Comment on lines +1204 to +1205
data,
data.lastCompletionResult,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit. I know you haven't changed this, but do we really need to pass both data and data.lastCompletionResult separately?

Copy link
Member Author

@Sushisource Sushisource Dec 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do - at a different call site the last completion result comes from another source.

Copy link
Contributor

@vitarb vitarb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comments, otherwise LGTM.

@Sushisource Sushisource merged commit e735da2 into temporalio:master Dec 4, 2020
@Sushisource Sushisource deleted the sj-feat-257 branch December 4, 2020 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose previous run failure though workflow context API

4 participants