Skip to content
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
2 changes: 1 addition & 1 deletion src/main/java/io/temporal/activity/Activity.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import io.temporal.client.ActivityCompletionException;
import io.temporal.internal.sync.ActivityInternal;
import io.temporal.internal.sync.WorkflowInternal;
import io.temporal.proto.execution.WorkflowExecution;
import io.temporal.proto.common.WorkflowExecution;
import io.temporal.serviceclient.WorkflowServiceStubs;
import io.temporal.workflow.ActivityException;
import io.temporal.workflow.ActivityTimeoutException;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/temporal/activity/ActivityTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
package io.temporal.activity;

import io.temporal.proto.common.Payloads;
import io.temporal.proto.common.WorkflowExecution;
import io.temporal.proto.common.WorkflowType;
import io.temporal.proto.execution.WorkflowExecution;
import java.time.Duration;
import java.util.Optional;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
package io.temporal.client;

import io.temporal.activity.Activity;
import io.temporal.proto.execution.WorkflowExecution;
import io.temporal.proto.common.WorkflowExecution;
import java.util.concurrent.CancellationException;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
package io.temporal.client;

import io.temporal.activity.ActivityTask;
import io.temporal.proto.execution.WorkflowExecution;
import io.temporal.proto.common.WorkflowExecution;

/** Base exception for all failures returned by an activity completion client. */
public class ActivityCompletionException extends RuntimeException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

package io.temporal.client;

import io.temporal.proto.execution.WorkflowExecution;
import io.temporal.proto.common.WorkflowExecution;
import java.util.Optional;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/temporal/client/WorkflowClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

import io.temporal.activity.Activity;
import io.temporal.internal.sync.WorkflowClientInternal;
import io.temporal.proto.execution.WorkflowExecution;
import io.temporal.proto.common.WorkflowExecution;
import io.temporal.serviceclient.WorkflowServiceStubs;
import io.temporal.workflow.Functions;
import io.temporal.workflow.Functions.Func;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

package io.temporal.client;

import io.temporal.proto.execution.WorkflowExecution;
import io.temporal.proto.common.WorkflowExecution;
import java.util.Optional;

public interface WorkflowClientInterceptor {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

package io.temporal.client;

import io.temporal.proto.execution.WorkflowExecution;
import io.temporal.proto.common.WorkflowExecution;
import java.util.Optional;

public class WorkflowClientInterceptorBase implements WorkflowClientInterceptor {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/temporal/client/WorkflowException.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

package io.temporal.client;

import io.temporal.proto.execution.WorkflowExecution;
import io.temporal.proto.common.WorkflowExecution;
import io.temporal.workflow.ChildWorkflowException;
import java.util.Optional;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

package io.temporal.client;

import io.temporal.proto.execution.WorkflowExecution;
import io.temporal.proto.common.WorkflowExecution;
import java.util.Optional;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

package io.temporal.client;

import io.temporal.proto.execution.WorkflowExecution;
import io.temporal.proto.common.WorkflowExecution;
import java.util.Optional;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

package io.temporal.client;

import io.temporal.proto.execution.WorkflowExecution;
import io.temporal.proto.common.WorkflowExecution;
import java.util.Optional;

public class WorkflowQueryException extends WorkflowException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

package io.temporal.client;

import io.temporal.proto.execution.WorkflowExecution;
import io.temporal.proto.common.WorkflowExecution;
import io.temporal.proto.execution.WorkflowExecutionStatus;
import io.temporal.proto.query.QueryRejectCondition;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
package io.temporal.client;

import io.temporal.internal.common.CheckedExceptionWrapper;
import io.temporal.proto.execution.WorkflowExecution;
import io.temporal.proto.common.WorkflowExecution;
import java.util.Optional;

public final class WorkflowServiceException extends WorkflowException {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/temporal/client/WorkflowStub.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
package io.temporal.client;

import io.temporal.internal.sync.StubMarker;
import io.temporal.proto.execution.WorkflowExecution;
import io.temporal.proto.common.WorkflowExecution;
import io.temporal.proto.query.QueryRejectCondition;
import java.lang.reflect.Type;
import java.util.Optional;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

package io.temporal.client;

import io.temporal.proto.execution.WorkflowExecution;
import io.temporal.proto.common.WorkflowExecution;
import java.util.Optional;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

package io.temporal.client;

import io.temporal.proto.event.TimeoutType;
import io.temporal.proto.execution.WorkflowExecution;
import io.temporal.proto.common.TimeoutType;
import io.temporal.proto.common.WorkflowExecution;
import java.util.Optional;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

import io.temporal.activity.ActivityOptions;
import io.temporal.activity.LocalActivityOptions;
import io.temporal.proto.execution.WorkflowExecution;
import io.temporal.proto.common.WorkflowExecution;
import io.temporal.workflow.ChildWorkflowOptions;
import io.temporal.workflow.ContinueAsNewOptions;
import io.temporal.workflow.Functions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

import io.temporal.activity.ActivityOptions;
import io.temporal.activity.LocalActivityOptions;
import io.temporal.proto.execution.WorkflowExecution;
import io.temporal.proto.common.WorkflowExecution;
import io.temporal.workflow.ChildWorkflowOptions;
import io.temporal.workflow.ContinueAsNewOptions;
import io.temporal.workflow.Functions;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/io/temporal/internal/common/GrpcRetryer.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

import io.grpc.Status;
import io.grpc.StatusRuntimeException;
import io.temporal.proto.failure.QueryFailed;
import io.temporal.proto.errordetails.QueryFailedFailure;
import java.time.Duration;
import java.util.concurrent.CancellationException;
import java.util.concurrent.CompletableFuture;
Expand Down Expand Up @@ -61,7 +61,7 @@ public final class GrpcRetryer {
.addDoNotRetry(Status.Code.UNAUTHENTICATED, null)
.addDoNotRetry(Status.Code.UNIMPLEMENTED, null)
.addDoNotRetry(Status.Code.CANCELLED, null)
.addDoNotRetry(Status.Code.INTERNAL, QueryFailed.class);
.addDoNotRetry(Status.Code.INTERNAL, QueryFailedFailure.class);
DEFAULT_SERVICE_OPERATION_RETRY_OPTIONS = roBuilder.validateBuildWithDefaults();
}

Expand Down
10 changes: 5 additions & 5 deletions src/main/java/io/temporal/internal/common/RetryParameters.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public RetryParameters(RetryOptions retryOptions) {
for (Class<? extends Throwable> r : doNotRetry) {
reasons.add(r.getName());
}
setNonRetriableErrorReasons(reasons);
setNonRetriableErrorTypes(reasons);
}
}

Expand Down Expand Up @@ -86,18 +86,18 @@ public void setMaximumAttempts(int maximumAttempts) {
this.maximumAttempts = maximumAttempts;
}

public List<String> getNonRetriableErrorReasons() {
public List<String> getNonRetriableErrorTypes() {
return nonRetriableErrorReasons == null ? new ArrayList<>() : nonRetriableErrorReasons;
}

public void setNonRetriableErrorReasons(List<String> nonRetriableErrorReasons) {
public void setNonRetriableErrorTypes(List<String> nonRetriableErrorReasons) {
this.nonRetriableErrorReasons = nonRetriableErrorReasons;
}

public RetryParameters copy() {
RetryParameters result = new RetryParameters();
result.setMaximumIntervalInSeconds(maximumIntervalInSeconds);
result.setNonRetriableErrorReasons(new ImmutableList<>(nonRetriableErrorReasons));
result.setNonRetriableErrorTypes(new ImmutableList<>(nonRetriableErrorReasons));
result.setInitialIntervalInSeconds(initialIntervalInSeconds);
result.setMaximumAttempts(maximumAttempts);
result.setBackoffCoefficient(backoffCoefficient);
Expand All @@ -111,7 +111,7 @@ public RetryPolicy toRetryPolicy() {
+ getInitialIntervalInSeconds());
}
return RetryPolicy.newBuilder()
.addAllNonRetriableErrorReasons(getNonRetriableErrorReasons())
.addAllNonRetryableErrorTypes(getNonRetriableErrorTypes())
.setMaximumAttempts(getMaximumAttempts())
.setInitialIntervalInSeconds(getInitialIntervalInSeconds())
.setBackoffCoefficient(getBackoffCoefficient())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ public static StartWorkflowExecutionParameters fromWorkflowOptions(WorkflowOptio
for (Class<? extends Throwable> r : doNotRetry) {
reasons.add(r.getName());
}
rp.setNonRetriableErrorReasons(reasons);
rp.setNonRetriableErrorTypes(reasons);
}
parameters.setRetryParameters(rp);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
package io.temporal.internal.common;

import io.temporal.proto.common.Payloads;
import io.temporal.proto.execution.WorkflowExecution;
import io.temporal.proto.common.WorkflowExecution;

public class TerminateWorkflowExecutionParameters {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
import com.google.gson.JsonSerializationContext;
import com.google.gson.JsonSerializer;
import com.google.gson.reflect.TypeToken;
import io.temporal.proto.common.WorkflowExecution;
import io.temporal.proto.event.EventType;
import io.temporal.proto.event.HistoryEvent;
import io.temporal.proto.execution.WorkflowExecution;
import java.lang.reflect.Type;
import java.nio.ByteBuffer;
import java.util.Base64;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import io.temporal.client.WorkflowTimedOutException;
import io.temporal.common.converter.DataConverter;
import io.temporal.proto.common.Payloads;
import io.temporal.proto.common.WorkflowExecution;
import io.temporal.proto.decision.Decision;
import io.temporal.proto.decision.DecisionType;
import io.temporal.proto.event.EventType;
Expand All @@ -46,7 +47,6 @@
import io.temporal.proto.event.WorkflowExecutionFailedEventAttributes;
import io.temporal.proto.event.WorkflowExecutionTerminatedEventAttributes;
import io.temporal.proto.event.WorkflowExecutionTimedOutEventAttributes;
import io.temporal.proto.execution.WorkflowExecution;
import io.temporal.proto.execution.WorkflowExecutionInfo;
import io.temporal.proto.execution.WorkflowExecutionStatus;
import io.temporal.proto.filter.HistoryEventFilterType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import io.temporal.internal.common.TerminateWorkflowExecutionParameters;
import io.temporal.internal.replay.QueryWorkflowParameters;
import io.temporal.internal.replay.SignalExternalWorkflowParameters;
import io.temporal.proto.execution.WorkflowExecution;
import io.temporal.proto.common.WorkflowExecution;
import io.temporal.proto.workflowservice.QueryWorkflowResponse;
import io.temporal.serviceclient.WorkflowServiceStubs;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
import io.temporal.proto.common.Payloads;
import io.temporal.proto.common.RetryPolicy;
import io.temporal.proto.common.SearchAttributes;
import io.temporal.proto.execution.WorkflowExecution;
import io.temporal.proto.common.WorkflowExecution;
import io.temporal.proto.query.WorkflowQuery;
import io.temporal.proto.tasklist.TaskList;
import io.temporal.proto.workflowservice.QueryWorkflowRequest;
Expand Down Expand Up @@ -188,7 +188,7 @@ private RetryPolicy toRetryPolicy(RetryParameters retryParameters) {
.setInitialIntervalInSeconds(retryParameters.getInitialIntervalInSeconds())
.setMaximumAttempts(retryParameters.getMaximumAttempts())
.setMaximumIntervalInSeconds(retryParameters.getMaximumIntervalInSeconds())
.addAllNonRetriableErrorReasons(retryParameters.getNonRetriableErrorReasons())
.addAllNonRetryableErrorTypes(retryParameters.getNonRetriableErrorTypes())
.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

package io.temporal.internal.external;

import io.temporal.proto.execution.WorkflowExecution;
import io.temporal.proto.common.WorkflowExecution;

public interface ManualActivityCompletionClientFactory {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import com.uber.m3.util.ImmutableMap;
import io.temporal.common.converter.DataConverter;
import io.temporal.internal.metrics.MetricsTag;
import io.temporal.proto.execution.WorkflowExecution;
import io.temporal.proto.common.WorkflowExecution;
import io.temporal.serviceclient.WorkflowServiceStubs;
import java.util.Map;
import java.util.Objects;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import io.temporal.internal.common.OptionsUtils;
import io.temporal.internal.metrics.MetricsType;
import io.temporal.proto.common.Payloads;
import io.temporal.proto.execution.WorkflowExecution;
import io.temporal.proto.common.WorkflowExecution;
import io.temporal.proto.workflowservice.RecordActivityTaskHeartbeatByIdRequest;
import io.temporal.proto.workflowservice.RecordActivityTaskHeartbeatByIdResponse;
import io.temporal.proto.workflowservice.RecordActivityTaskHeartbeatRequest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@
import io.temporal.proto.common.ActivityType;
import io.temporal.proto.common.Header;
import io.temporal.proto.common.Payloads;
import io.temporal.proto.common.TimeoutType;
import io.temporal.proto.decision.ScheduleActivityTaskDecisionAttributes;
import io.temporal.proto.event.ActivityTaskCanceledEventAttributes;
import io.temporal.proto.event.ActivityTaskCompletedEventAttributes;
import io.temporal.proto.event.ActivityTaskFailedEventAttributes;
import io.temporal.proto.event.ActivityTaskTimedOutEventAttributes;
import io.temporal.proto.event.HistoryEvent;
import io.temporal.proto.event.TimeoutType;
import io.temporal.proto.tasklist.TaskList;
import java.util.HashMap;
import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,23 @@ final class ActivityDecisionStateMachine extends DecisionStateMachineBase {
private long scheduledEventId;

public ActivityDecisionStateMachine(
DecisionId id, ScheduleActivityTaskDecisionAttributes scheduleAttributes) {
DecisionId id,
ScheduleActivityTaskDecisionAttributes scheduleAttributes,
long scheduledEventId) {
super(id);
this.scheduleAttributes = scheduleAttributes;
this.scheduledEventId = scheduledEventId;
}

/** Used for unit testing */
ActivityDecisionStateMachine(
DecisionId id,
ScheduleActivityTaskDecisionAttributes scheduleAttributes,
DecisionState state) {
DecisionState state,
long scheduledEventId) {
super(id, state);
this.scheduleAttributes = scheduleAttributes;
this.scheduledEventId = scheduledEventId;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

import io.temporal.proto.common.ActivityType;
import io.temporal.proto.common.Payloads;
import io.temporal.proto.event.TimeoutType;
import io.temporal.proto.common.TimeoutType;
import java.util.Optional;

/** Exception that indicates Activity time out. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
package io.temporal.internal.replay;

import io.temporal.proto.common.Payloads;
import io.temporal.proto.common.WorkflowExecution;
import io.temporal.proto.common.WorkflowType;
import io.temporal.proto.execution.WorkflowExecution;
import java.util.Optional;

/** Internal. Do not catch or throw by application level code. */
Expand Down
Loading