Skip to content

Conversation

@alexshtin
Copy link
Contributor

What changed?
LatestTime on StartTimeFilter is default to UTC now in ListOpen/CloseWorkflowExecutions APIs.

Why?
Default it to zero time makes no sense.

How did you test it?
Run tests.

Potential risks
No risks.

Copy link
Member

@mastermanu mastermanu left a comment

Choose a reason for hiding this comment

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

great change!

}

if timestamp.TimeValue(request.GetStartTimeFilter().GetLatestTime()).IsZero() {
request.GetStartTimeFilter().LatestTime = timestamp.TimeNowPtrUtc()
Copy link
Contributor

Choose a reason for hiding this comment

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

Time.max() instead of Time.now() because of possible clock skew?

Choose a reason for hiding this comment

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

i wonder if it might also make sense

  • to have the frontend just leave the values as is, and
  • to let whoever is actually handling the request to interpret IsZero values as "no upper bound", and produce the data accordingly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

"Whoever" is persistence layer and we have 4 different calls to it. I will have to modify it in 4 places, or just one (here). I agree frontend handler is not a best place for it. Although all our validation/default logic is in frontend.

@alexshtin alexshtin merged commit 381c67f into temporalio:master Jul 31, 2020
@alexshtin alexshtin deleted the feature/default-latest-time branch July 31, 2020 04:45
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.

4 participants