Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,15 @@ public enum RetryLogic {
private SchemaDef outputSchema;
private boolean enforceSchema;

/**
* When true, updates to tasks of this type are replicated region-durably in an active-active
* deployment: the update is committed locally and synchronously confirmed to the peer region(s)
* before the caller is acked (falling back to asynchronous convergence if the sync quorum is
* missed). Defaults to false (locally durable only).
*/
@ProtoField(id = 26)
private boolean regionDurable;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

can we follow the same enum as workflow start request for consistency mode?


public TaskDef() {}

public TaskDef(String name) {
Expand Down Expand Up @@ -529,6 +538,14 @@ public void setEnforceSchema(boolean enforceSchema) {
this.enforceSchema = enforceSchema;
}

public boolean isRegionDurable() {
return regionDurable;
}

public void setRegionDurable(boolean regionDurable) {
this.regionDurable = regionDurable;
}

public long getTotalTimeoutSeconds() {
return totalTimeoutSeconds;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ public class RerunWorkflowRequest {
@ProtoField(id = 5)
private String correlationId;

/**
* When rerunning from a task inside a sub-workflow, also re-run the downstream tasks of each
* ancestor workflow. Off by default: only the workflow named in the request is re-run, and
* already-completed tasks in its ancestors are left as they are.
*/
@ProtoField(id = 6)
private boolean rerunParentDownstreamTasks;

public String getReRunFromWorkflowId() {
return reRunFromWorkflowId;
}
Expand Down Expand Up @@ -67,6 +75,14 @@ public void setTaskInput(Map<String, Object> taskInput) {
this.taskInput = taskInput;
}

public boolean isRerunParentDownstreamTasks() {
return rerunParentDownstreamTasks;
}

public void setRerunParentDownstreamTasks(boolean rerunParentDownstreamTasks) {
this.rerunParentDownstreamTasks = rerunParentDownstreamTasks;
}

public String getCorrelationId() {
return correlationId;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import jakarta.validation.ValidatorFactory;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertTrue;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,7 @@ public RerunWorkflowRequestPb.RerunWorkflowRequest toProto(RerunWorkflowRequest
if (from.getCorrelationId() != null) {
to.setCorrelationId( from.getCorrelationId() );
}
to.setRerunParentDownstreamTasks( from.isRerunParentDownstreamTasks() );
return to.build();
}

Expand All @@ -623,6 +624,7 @@ public RerunWorkflowRequest fromProto(RerunWorkflowRequestPb.RerunWorkflowReques
}
to.setTaskInput(taskInputMap);
to.setCorrelationId( from.getCorrelationId() );
to.setRerunParentDownstreamTasks( from.getRerunParentDownstreamTasks() );
return to;
}

Expand Down Expand Up @@ -1037,6 +1039,7 @@ public TaskDefPb.TaskDef toProto(TaskDef from) {
}
to.setTotalTimeoutSeconds( from.getTotalTimeoutSeconds() );
to.setTaskStatusListenerEnabled( from.isTaskStatusListenerEnabled() );
to.setRegionDurable( from.isRegionDurable() );
return to.build();
}

Expand Down Expand Up @@ -1070,6 +1073,7 @@ public TaskDef fromProto(TaskDefPb.TaskDef from) {
to.setBaseType( from.getBaseType() );
to.setTotalTimeoutSeconds( from.getTotalTimeoutSeconds() );
to.setTaskStatusListenerEnabled( from.getTaskStatusListenerEnabled() );
to.setRegionDurable( from.getRegionDurable() );
return to;
}

Expand Down
1 change: 1 addition & 0 deletions grpc/src/main/proto/model/rerunworkflowrequest.proto
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ message RerunWorkflowRequest {
string re_run_from_task_id = 3;
map<string, google.protobuf.Value> task_input = 4;
string correlation_id = 5;
bool rerun_parent_downstream_tasks = 6;
}
1 change: 1 addition & 0 deletions grpc/src/main/proto/model/taskdef.proto
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,5 @@ message TaskDef {
string base_type = 21;
int64 total_timeout_seconds = 22;
bool task_status_listener_enabled = 23;
bool region_durable = 26;
}
Loading