Skip to content

Commit

Permalink
Remove Experimental annotations from Update APIs (#2347)
Browse files Browse the repository at this point in the history
  • Loading branch information
dandavison authored Dec 12, 2024
1 parent e1bef89 commit 53a8af7
Show file tree
Hide file tree
Showing 13 changed files with 1 addition and 46 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,6 @@ static <A1, A2, A3, A4, A5, A6> WorkflowUpdateHandle<Void> startUpdate(
* @param options update options
* @return WorkflowUpdateHandle that can be used to get the result of the update
*/
@Experimental
static <R> WorkflowUpdateHandle<R> startUpdate(
Functions.Func<R> updateMethod, @Nonnull UpdateOptions<R> options) {
return WorkflowClientInternalImpl.startUpdate(updateMethod, options);
Expand All @@ -734,7 +733,6 @@ static <R> WorkflowUpdateHandle<R> startUpdate(
* @param options update options
* @return WorkflowUpdateHandle that can be used to get the result of the update
*/
@Experimental
static <R, A1> WorkflowUpdateHandle<R> startUpdate(
Functions.Func1<A1, R> updateMethod, A1 arg1, @Nonnull UpdateOptions<R> options) {
return WorkflowClientInternalImpl.startUpdate(updateMethod, arg1, options);
Expand All @@ -750,7 +748,6 @@ static <R, A1> WorkflowUpdateHandle<R> startUpdate(
* @param options update options
* @return WorkflowUpdateHandle that can be used to get the result of the update
*/
@Experimental
static <R, A1, A2> WorkflowUpdateHandle<R> startUpdate(
Functions.Func2<A1, A2, R> updateMethod,
A1 arg1,
Expand All @@ -770,7 +767,6 @@ static <R, A1, A2> WorkflowUpdateHandle<R> startUpdate(
* @param options update options
* @return WorkflowUpdateHandle that can be used to get the result of the update
*/
@Experimental
static <R, A1, A2, A3> WorkflowUpdateHandle<R> startUpdate(
Functions.Func3<A1, A2, A3, R> updateMethod,
A1 arg1,
Expand All @@ -792,7 +788,6 @@ static <R, A1, A2, A3> WorkflowUpdateHandle<R> startUpdate(
* @param options update options
* @return WorkflowUpdateHandle that can be used to get the result of the update
*/
@Experimental
static <R, A1, A2, A3, A4> WorkflowUpdateHandle<R> startUpdate(
Functions.Func4<A1, A2, A3, A4, R> updateMethod,
A1 arg1,
Expand All @@ -816,7 +811,6 @@ static <R, A1, A2, A3, A4> WorkflowUpdateHandle<R> startUpdate(
* @param options update options
* @return WorkflowUpdateHandle that can be used to get the result of the update
*/
@Experimental
static <R, A1, A2, A3, A4, A5> WorkflowUpdateHandle<R> startUpdate(
Functions.Func5<A1, A2, A3, A4, A5, R> updateMethod,
A1 arg1,
Expand All @@ -843,7 +837,6 @@ static <R, A1, A2, A3, A4, A5> WorkflowUpdateHandle<R> startUpdate(
* @param options update options
* @return WorkflowUpdateHandle that can be used to get the result of the update
*/
@Experimental
static <R, A1, A2, A3, A4, A5, A6> WorkflowUpdateHandle<R> startUpdate(
Functions.Func6<A1, A2, A3, A4, A5, A6, R> updateMethod,
A1 arg1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ static <T> WorkflowStub fromTyped(T typed) {
* @throws WorkflowServiceException for all other failures including networking and service
* availability issues.
*/
@Experimental
<R> R update(String updateName, Class<R> resultClass, Object... args);

/**
Expand All @@ -109,7 +108,6 @@ static <T> WorkflowStub fromTyped(T typed) {
* @throws WorkflowServiceException for all other failures including networking and service
* availability issues.
*/
@Experimental
<R> WorkflowUpdateHandle<R> startUpdate(
String updateName, WorkflowUpdateStage waitForStage, Class<R> resultClass, Object... args);

Expand All @@ -125,7 +123,6 @@ <R> WorkflowUpdateHandle<R> startUpdate(
* @throws WorkflowServiceException for all other failures including networking and service
* availability issues.
*/
@Experimental
<R> WorkflowUpdateHandle<R> startUpdate(UpdateOptions<R> options, Object... args);

/**
Expand All @@ -137,7 +134,6 @@ <R> WorkflowUpdateHandle<R> startUpdate(
* @param <R> type of the update return value.
* @return update handle that can be used to get the result of the update.
*/
@Experimental
<R> WorkflowUpdateHandle<R> getUpdateHandle(String updateId, Class<R> resultClass);

/**
Expand All @@ -151,7 +147,6 @@ <R> WorkflowUpdateHandle<R> startUpdate(
* @param resultType type of the update return value. Differs from resultClass for generic types.
* @return update handle that can be used to get the result of the update.
*/
@Experimental
<R> WorkflowUpdateHandle<R> getUpdateHandle(
String updateId, Class<R> resultClass, Type resultType);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,8 @@
package io.temporal.client;

import io.temporal.api.common.v1.WorkflowExecution;
import io.temporal.common.Experimental;

/**
* Exception used to communicate failure of an update workflow execution request to an external
* workflow.
*/
@Experimental
/** Exception used to communicate failure of an update workflow execution request. */
public final class WorkflowUpdateException extends WorkflowException {

private final String updateId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,13 @@
package io.temporal.client;

import io.temporal.api.common.v1.WorkflowExecution;
import io.temporal.common.Experimental;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.TimeUnit;

/**
* WorkflowUpdateHandle is a handle to an update workflow execution request that can be used to get
* the status of that update request.
*/
@Experimental
public interface WorkflowUpdateHandle<T> {
/**
* Gets the workflow execution this update request was sent to.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,8 @@ public interface WorkflowClientCallsInterceptor {

<R> QueryOutput<R> query(QueryInput<R> input);

@Experimental
<R> WorkflowUpdateHandle<R> startUpdate(StartUpdateInput<R> input);

@Experimental
<R> PollWorkflowUpdateOutput<R> pollWorkflowUpdate(PollWorkflowUpdateInput<R> input);

CancelOutput cancel(CancelInput input);
Expand Down Expand Up @@ -428,7 +426,6 @@ public WorkflowExecution getWorkflowExecution() {
}
}

@Experimental
final class StartUpdateInput<R> {
private final WorkflowExecution workflowExecution;
private final Optional<String> workflowType;
Expand Down Expand Up @@ -505,7 +502,6 @@ public WaitPolicy getWaitPolicy() {
}
}

@Experimental
final class PollWorkflowUpdateInput<R> {
private final WorkflowExecution workflowExecution;
private long timeout;
Expand Down Expand Up @@ -561,7 +557,6 @@ public String getUpdateId() {
}
}

@Experimental
final class PollWorkflowUpdateOutput<R> {
private final CompletableFuture<R> result;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ public Object getResult() {
}
}

@Experimental
final class UpdateInput {
private final String updateName;
private final Header header;
Expand All @@ -168,7 +167,6 @@ public Object[] getArguments() {
}
}

@Experimental
final class UpdateOutput {
private final Object result;

Expand Down Expand Up @@ -212,14 +210,12 @@ public Object getResult() {
* Called when update workflow execution request is delivered to a workflow execution, before the
* update is executed.
*/
@Experimental
void validateUpdate(UpdateInput input);

/**
* Called when update workflow execution request is delivered to a workflow execution, after
* passing the validator.
*/
@Experimental
UpdateOutput executeUpdate(UpdateInput input);

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,6 @@ public List<SignalRegistrationRequest> getRequests() {
}
}

@Experimental
final class UpdateRegistrationRequest {
private final String updateName;
private final String description;
Expand Down Expand Up @@ -626,7 +625,6 @@ public Functions.Func1<Object[], Object> getExecuteCallback() {
}
}

@Experimental
final class RegisterUpdateHandlersInput {
private final List<UpdateRegistrationRequest> requests;

Expand Down Expand Up @@ -718,7 +716,6 @@ public DynamicSignalHandler getHandler() {
}
}

@Experimental
final class RegisterDynamicUpdateHandlerInput {
private final DynamicUpdateHandler handler;

Expand Down Expand Up @@ -769,14 +766,12 @@ <R> R mutableSideEffect(

void registerSignalHandlers(RegisterSignalHandlersInput input);

@Experimental
void registerUpdateHandlers(RegisterUpdateHandlersInput input);

void registerDynamicSignalHandler(RegisterDynamicSignalHandlerInput handler);

void registerDynamicQueryHandler(RegisterDynamicQueryHandlerInput input);

@Experimental
void registerDynamicUpdateHandler(RegisterDynamicUpdateHandlerInput input);

UUID randomUUID();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,13 +222,11 @@ public List<POJOWorkflowMethodMetadata> getQueryMethods() {
}

/** List of update methods an object implements across all the workflow interfaces. */
@Experimental
public List<POJOWorkflowMethodMetadata> getUpdateMethods() {
return updateMethods;
}

/** List of update validator methods an object implements across all the workflow interfaces. */
@Experimental
public List<POJOWorkflowMethodMetadata> getUpdateValidatorMethods() {
return updateValidatorMethods;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@
import io.temporal.api.common.v1.WorkflowExecution;
import io.temporal.client.WorkflowUpdateException;
import io.temporal.client.WorkflowUpdateHandle;
import io.temporal.common.Experimental;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.TimeUnit;

@Experimental
public final class CompletedWorkflowUpdateHandleImpl<T> implements WorkflowUpdateHandle<T> {

private final String id;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,11 @@
import io.temporal.client.WorkflowException;
import io.temporal.client.WorkflowServiceException;
import io.temporal.client.WorkflowUpdateHandle;
import io.temporal.common.Experimental;
import io.temporal.common.interceptors.WorkflowClientCallsInterceptor;
import io.temporal.serviceclient.CheckedExceptionWrapper;
import java.lang.reflect.Type;
import java.util.concurrent.*;

@Experimental
public final class LazyWorkflowUpdateHandleImpl<T> implements WorkflowUpdateHandle<T> {

private final WorkflowClientCallsInterceptor workflowClientInvoker;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,9 @@ SignalWithStartWorkflowExecutionResponse signalWithStart(

QueryWorkflowResponse query(QueryWorkflowRequest queryParameters);

@Experimental
UpdateWorkflowExecutionResponse update(
@Nonnull UpdateWorkflowExecutionRequest updateParameters, @Nonnull Deadline deadline);

@Experimental
CompletableFuture<PollWorkflowExecutionUpdateResponse> pollUpdateAsync(
@Nonnull PollWorkflowExecutionUpdateRequest request, @Nonnull Deadline deadline);

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

package io.temporal.workflow;

import io.temporal.common.Experimental;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
Expand All @@ -34,7 +33,6 @@
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
@Experimental
public @interface UpdateMethod {
/**
* Name of the update handler. Default is method name.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

package io.temporal.workflow;

import io.temporal.common.Experimental;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
Expand All @@ -36,7 +35,6 @@
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
@Experimental
public @interface UpdateValidatorMethod {

/**
Expand Down

0 comments on commit 53a8af7

Please sign in to comment.