temporalio / api

Temporal gRPC API and proto files
https://temporal.io
MIT License
83 stars 66 forks source link

ResetReapplyExcludeType (preparation for Update reapply) #348

Closed dandavison closed 8 months ago

dandavison commented 8 months ago

These are proposed proto changes in preparation for Update reapply, based on a design by @yycptt.

Thus what I'm proposing is that, in the future, the server's implementation will be to:

  1. Take the set of events to reapply implied by the value of ResetReapplyType
  2. Remove from this set all ResetReapplyExcludeType events

The result is the set of event types that will be reapplied during Reset.

dandavison commented 8 months ago

One wonders if this makes more sense, and it can be validated as mutually exclusive with the singular one. I fear we're going to later regret not letting you choose the types to reapply.

Why use exclusion in the api instead of inclusion with a default to apply all?

I agree that a pure inclusion-based API would be preferable. I'll push a second commit along those lines shortly.

dandavison commented 8 months ago

I agree that a pure inclusion-based API would be preferable. I'll push a second commit along those lines shortly.

We discussed this offline and concluded that exclusion semantics were best seeing as the default needs to be "all". I've included a commit implementing an inclusion variant, but reverted it.