Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ResetReapplyExcludeType (preparation for Update reapply) #348

Merged
merged 3 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions temporal/api/enums/v1/reset.proto
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,24 @@ option java_outer_classname = "ResetProto";
option ruby_package = "Temporalio::Api::Enums::V1";
option csharp_namespace = "Temporalio.Api.Enums.V1";

// Reset reapply (replay) options
// * RESET_REAPPLY_TYPE_SIGNAL (default) - Signals are reapplied when workflow is reset
// * RESET_REAPPLY_TYPE_NONE - nothing is reapplied
// Event types to exclude when reapplying events.
enum ResetReapplyExcludeType {
RESET_REAPPLY_EXCLUDE_TYPE_UNSPECIFIED = 0;
// Exclude signals when reapplying events.
RESET_REAPPLY_EXCLUDE_TYPE_SIGNAL = 1;
}

// Event types to include when reapplying events. Deprecated: applications
// should use ResetReapplyExcludeType to specify exclusions from this set, and
// new event types should be added to ResetReapplyExcludeType instead of here.
enum ResetReapplyType {
RESET_REAPPLY_TYPE_UNSPECIFIED = 0;
// Signals are reapplied when workflow is reset.
RESET_REAPPLY_TYPE_SIGNAL = 1;
// No events are reapplied when workflow is reset.
RESET_REAPPLY_TYPE_NONE = 2;
// All eligible events are reapplied when workflow is reset.
RESET_REAPPLY_TYPE_ALL_ELIGIBLE = 3;
}

// Reset type options. Deprecated, see temporal.api.common.v1.ResetOptions.
Expand Down
5 changes: 4 additions & 1 deletion temporal/api/workflowservice/v1/request_response.proto
Original file line number Diff line number Diff line change
Expand Up @@ -669,8 +669,11 @@ message ResetWorkflowExecutionRequest {
int64 workflow_task_finish_event_id = 4;
// Used to de-dupe reset requests
string request_id = 5;
// Reset reapply (replay) options.
// Event types to be reapplied (deprecated)
// Default: RESET_REAPPLY_TYPE_ALL_ELIGIBLE
temporal.api.enums.v1.ResetReapplyType reset_reapply_type = 6;
// Event types not to be reapplied
repeated temporal.api.enums.v1.ResetReapplyExcludeType reset_reapply_exclude_types = 7;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
repeated temporal.api.enums.v1.ResetReapplyExcludeType reset_reapply_exclude_types = 7;
repeated temporal.api.enums.v1.ResetReapplyType reset_reapply_types = 7;

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.

}

message ResetWorkflowExecutionResponse {
Expand Down