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
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ public static final class Builder {
private List<ContextPropagator> contextPropagators;
private ActivityCancellationType cancellationType;
private boolean disableEagerExecution;

@SuppressWarnings("deprecation")
private VersioningIntent versioningIntent;

private String summary;
private Priority priority;

Expand Down Expand Up @@ -219,7 +222,10 @@ public Builder setDisableEagerExecution(boolean disableEagerExecution) {
/**
* Specifies whether this activity should run on a worker with a compatible Build Id or not. See
* the variants of {@link VersioningIntent}.
*
* @deprecated Use Worker Deployments
*/
@Deprecated
public Builder setVersioningIntent(VersioningIntent versioningIntent) {
this.versioningIntent = versioningIntent;
return this;
Expand Down Expand Up @@ -249,6 +255,7 @@ public Builder setPriority(Priority priority) {
return this;
}

@SuppressWarnings("deprecation")
public Builder mergeActivityOptions(ActivityOptions override) {
if (override == null) {
return this;
Expand Down Expand Up @@ -309,6 +316,7 @@ public ActivityOptions build() {
priority);
}

@SuppressWarnings("deprecation")
public ActivityOptions validateAndBuildWithDefaults() {
return new ActivityOptions(
heartbeatTimeout,
Expand Down Expand Up @@ -337,7 +345,10 @@ public ActivityOptions validateAndBuildWithDefaults() {
private final List<ContextPropagator> contextPropagators;
private final ActivityCancellationType cancellationType;
private final boolean disableEagerExecution;

@SuppressWarnings("deprecation")
private final VersioningIntent versioningIntent;

private final String summary;
private final Priority priority;

Expand All @@ -351,7 +362,7 @@ private ActivityOptions(
List<ContextPropagator> contextPropagators,
ActivityCancellationType cancellationType,
boolean disableEagerExecution,
VersioningIntent versioningIntent,
@SuppressWarnings("deprecation") VersioningIntent versioningIntent,
String summary,
Priority priority) {
this.heartbeatTimeout = heartbeatTimeout;
Expand Down Expand Up @@ -430,7 +441,10 @@ public boolean isEagerExecutionDisabled() {

/**
* @see ActivityOptions.Builder#setVersioningIntent(VersioningIntent)
* @deprecated Worker Versioning is now deprecated please migrate to the <a
* href="https://docs.temporal.io/worker-deployments">Worker Deployment API</a>.
*/
@Deprecated
public VersioningIntent getVersioningIntent() {
return versioningIntent;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* Indicates whether the user intends certain commands to be run on a compatible worker Build Id
* version or not.
*/
@Deprecated
public enum VersioningIntent {
/**
* Indicates that the SDK should choose the most sensible default behavior for the type of
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,7 @@ private CompletablePromise<Optional<Payloads>> executeLocalActivityLocally(
return callback.result;
}

@SuppressWarnings("deprecation")
private ExecuteActivityParameters constructExecuteActivityParameters(
String name, ActivityOptions options, Header header, Optional<Payloads> input) {
String taskQueue = options.getTaskQueue();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ public static final class Builder {
private SearchAttributes typedSearchAttributes;
private List<ContextPropagator> contextPropagators;
private ChildWorkflowCancellationType cancellationType;

@SuppressWarnings("deprecation")
private VersioningIntent versioningIntent;

private String staticSummary;
private String staticDetails;
private Priority priority;
Expand Down Expand Up @@ -283,7 +286,11 @@ public Builder setCronSchedule(CronSchedule c) {
/**
* Specifies whether this child workflow should run on a worker with a compatible Build Id or
* not. See the variants of {@link VersioningIntent}.
*
* @deprecated Worker Versioning is now deprecated please migrate to the <a
* href="https://docs.temporal.io/worker-deployments">Worker Deployment API</a>.
*/
@Deprecated
public Builder setVersioningIntent(VersioningIntent versioningIntent) {
this.versioningIntent = versioningIntent;
return this;
Expand Down Expand Up @@ -347,6 +354,7 @@ public ChildWorkflowOptions build() {
priority);
}

@SuppressWarnings("deprecation")
public ChildWorkflowOptions validateAndBuildWithDefaults() {
return new ChildWorkflowOptions(
namespace,
Expand Down Expand Up @@ -390,7 +398,10 @@ public ChildWorkflowOptions validateAndBuildWithDefaults() {
private final SearchAttributes typedSearchAttributes;
private final List<ContextPropagator> contextPropagators;
private final ChildWorkflowCancellationType cancellationType;

@SuppressWarnings("deprecation")
private final VersioningIntent versioningIntent;

private final String staticSummary;
private final String staticDetails;
private final Priority priority;
Expand All @@ -411,7 +422,7 @@ private ChildWorkflowOptions(
SearchAttributes typedSearchAttributes,
List<ContextPropagator> contextPropagators,
ChildWorkflowCancellationType cancellationType,
VersioningIntent versioningIntent,
@SuppressWarnings("deprecation") VersioningIntent versioningIntent,
String staticSummary,
String staticDetails,
Priority priority) {
Expand Down Expand Up @@ -500,6 +511,11 @@ public ChildWorkflowCancellationType getCancellationType() {
return cancellationType;
}

/**
* @deprecated Worker Versioning is now deprecated please migrate to the <a
* href="https://docs.temporal.io/worker-deployments">Worker Deployment API</a>.
*/
@Deprecated
public VersioningIntent getVersioningIntent() {
return versioningIntent;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package io.temporal.workflow;

import io.temporal.common.RetryOptions;
import io.temporal.common.SearchAttributes;
import io.temporal.common.VersioningIntent;
import io.temporal.common.*;
import io.temporal.common.context.ContextPropagator;
import java.time.Duration;
import java.util.List;
Expand Down Expand Up @@ -43,6 +41,8 @@ public static final class Builder {
private Map<String, Object> searchAttributes;
private SearchAttributes typedSearchAttributes;
private List<ContextPropagator> contextPropagators;

@SuppressWarnings("deprecation")
private VersioningIntent versioningIntent;

private Builder() {}
Expand Down Expand Up @@ -121,7 +121,11 @@ public Builder setContextPropagators(List<ContextPropagator> contextPropagators)
/**
* Specifies whether this continued workflow should run on a worker with a compatible Build Id
* or not. See the variants of {@link VersioningIntent}.
*
* @deprecated Worker Versioning is now deprecated please migrate to the <a
* href="https://docs.temporal.io/worker-deployments">Worker Deployment API</a>.
*/
@Deprecated
public Builder setVersioningIntent(VersioningIntent versioningIntent) {
this.versioningIntent = versioningIntent;
return this;
Expand Down Expand Up @@ -149,6 +153,8 @@ public ContinueAsNewOptions build() {
private final @Nullable Map<String, Object> searchAttributes;
private final @Nullable SearchAttributes typedSearchAttributes;
private final @Nullable List<ContextPropagator> contextPropagators;

@SuppressWarnings("deprecation")
private final @Nullable VersioningIntent versioningIntent;

public ContinueAsNewOptions(
Expand All @@ -160,7 +166,7 @@ public ContinueAsNewOptions(
@Nullable Map<String, Object> searchAttributes,
@Nullable SearchAttributes typedSearchAttributes,
@Nullable List<ContextPropagator> contextPropagators,
@Nullable VersioningIntent versioningIntent) {
@SuppressWarnings("deprecation") @Nullable VersioningIntent versioningIntent) {
this.workflowRunTimeout = workflowRunTimeout;
this.taskQueue = taskQueue;
this.retryOptions = retryOptions;
Expand Down Expand Up @@ -209,6 +215,11 @@ public RetryOptions getRetryOptions() {
return contextPropagators;
}

/**
* @deprecated Worker Versioning is now deprecated please migrate to the <a
* href="https://docs.temporal.io/worker-deployments">Worker Deployment API</a>.
*/
@Deprecated
public @Nullable VersioningIntent getVersioningIntent() {
return versioningIntent;
}
Expand Down
Loading