Skip to content

Commit

Permalink
Remove "Experimental" notices on Update APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
dandavison committed Dec 12, 2024
1 parent 1b21084 commit ed8e70d
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 46 deletions.
11 changes: 0 additions & 11 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,21 +106,16 @@ const (
)

// WorkflowUpdateStage indicates the stage of an update request.
// NOTE: Experimental
type WorkflowUpdateStage = internal.WorkflowUpdateStage

const (
// WorkflowUpdateStageUnspecified indicates the wait stage was not specified
// NOTE: Experimental
WorkflowUpdateStageUnspecified = internal.WorkflowUpdateStageUnspecified
// WorkflowUpdateStageAdmitted indicates the update is admitted
// NOTE: Experimental
WorkflowUpdateStageAdmitted = internal.WorkflowUpdateStageAdmitted
// WorkflowUpdateStageAccepted indicates the update is accepted
// NOTE: Experimental
WorkflowUpdateStageAccepted = internal.WorkflowUpdateStageAccepted
// WorkflowUpdateStageCompleted indicates the update is completed
// NOTE: Experimental
WorkflowUpdateStageCompleted = internal.WorkflowUpdateStageCompleted
)

Expand Down Expand Up @@ -271,7 +266,6 @@ type (

// UpdateWorkflowOptions encapsulates the parameters for
// sending an update to a workflow execution.
// NOTE: Experimental
UpdateWorkflowOptions = internal.UpdateWorkflowOptions

// UpdateWithStartWorkflowOptions encapsulates the parameters used by UpdateWithStartWorkflow.
Expand All @@ -281,12 +275,10 @@ type (

// WorkflowUpdateHandle represents a running or completed workflow
// execution update and gives the holder access to the outcome of the same.
// NOTE: Experimental
WorkflowUpdateHandle = internal.WorkflowUpdateHandle

// GetWorkflowUpdateHandleOptions encapsulates the parameters needed to unambiguously
// refer to a Workflow Update
// NOTE: Experimental
GetWorkflowUpdateHandleOptions = internal.GetWorkflowUpdateHandleOptions

// UpdateWorkerBuildIdCompatibilityOptions is the input to Client.UpdateWorkerBuildIdCompatibility.
Expand Down Expand Up @@ -488,7 +480,6 @@ type (
// WorkflowUpdateServiceTimeoutOrCanceledError is an error that occurs when an update call times out or is cancelled.
//
// Note, this is not related to any general concept of timing out or cancelling a running update, this is only related to the client call itself.
// NOTE: Experimental
WorkflowUpdateServiceTimeoutOrCanceledError = internal.WorkflowUpdateServiceTimeoutOrCanceledError

// Client is the client for starting and getting information about a workflow executions as well as
Expand Down Expand Up @@ -844,7 +835,6 @@ type (
//
// The errors it can return:
// - WorkflowUpdateServiceTimeoutOrCanceledError
// NOTE: Experimental
UpdateWorkflow(ctx context.Context, options UpdateWorkflowOptions) (WorkflowUpdateHandle, error)

// UpdateWithStartWorkflow issues an update-with-start request. A
Expand All @@ -864,7 +854,6 @@ type (
// GetWorkflowUpdateHandle creates a handle to the referenced update
// which can be polled for an outcome. Note that runID is optional and
// if not specified the most recent runID will be used.
// NOTE: Experimental
GetWorkflowUpdateHandle(ref GetWorkflowUpdateHandleOptions) WorkflowUpdateHandle

// WorkflowService provides access to the underlying gRPC service. This should only be used for advanced use cases
Expand Down
2 changes: 0 additions & 2 deletions interceptor/interceptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,6 @@ type HandleQueryInput = internal.HandleQueryInput

// UpdateInput is input for WorkflowInboundInterceptor.ExecuteUpdate
// and WorkflowInboundInterceptor.ValidateUpdate.
//
// NOTE: Experimental
type UpdateInput = internal.UpdateInput

// ExecuteNexusOperationInput is the input to WorkflowOutboundInterceptor.ExecuteNexusOperation.
Expand Down
2 changes: 0 additions & 2 deletions internal/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,6 @@ type (
// update is requested (e.g. if the required workflow ID field is
// missing from the UpdateWorkflowOptions) are returned
// directly from this function call.
// NOTE: Experimental
UpdateWorkflow(ctx context.Context, options UpdateWorkflowOptions) (WorkflowUpdateHandle, error)

// UpdateWithStartWorkflow issues an update-with-start request. A
Expand All @@ -417,7 +416,6 @@ type (
// GetWorkflowUpdateHandle creates a handle to the referenced update
// which can be polled for an outcome. Note that runID is optional and
// if not specified the most recent runID will be used.
// NOTE: Experimental
GetWorkflowUpdateHandle(GetWorkflowUpdateHandleOptions) WorkflowUpdateHandle

// WorkflowService provides access to the underlying gRPC service. This should only be used for advanced use cases
Expand Down
16 changes: 0 additions & 16 deletions internal/interceptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,16 +153,12 @@ type WorkflowInboundInterceptor interface {
// as part of its optional configuration. The same prohibition against
// mutating workflow state that is demanded of UpdateOptions.Validator
// functions also applies to this function.
//
// NOTE: Experimental
ValidateUpdate(ctx Context, in *UpdateInput) error

// ExecuteUpdate is called after ValidateUpdate if and only if the latter
// returns nil. interceptor.WorkflowHeader will return a non-nil map for
// this context. ExecuteUpdate is allowed to mutate workflow state and
// perform workflow actions such as scheduling activities, timers, etc.
//
// NOTE: Experimental
ExecuteUpdate(ctx Context, in *UpdateInput) (interface{}, error)

mustEmbedWorkflowInboundInterceptorBase()
Expand Down Expand Up @@ -289,8 +285,6 @@ type WorkflowOutboundInterceptor interface {
GetTypedSearchAttributes(ctx Context) SearchAttributes

// GetCurrentUpdateInfo intercepts workflow.GetCurrentUpdateInfo.
//
// NOTE: Experimental
GetCurrentUpdateInfo(ctx Context) *UpdateInfo

// GetLogger intercepts workflow.GetLogger.
Expand Down Expand Up @@ -366,8 +360,6 @@ type WorkflowOutboundInterceptor interface {
SetQueryHandlerWithOptions(ctx Context, queryType string, handler interface{}, options QueryHandlerOptions) error

// SetUpdateHandler intercepts workflow.SetUpdateHandler.
//
// NOTE: Experimental
SetUpdateHandler(ctx Context, updateName string, handler interface{}, opts UpdateHandlerOptions) error

// IsReplaying intercepts workflow.IsReplaying.
Expand Down Expand Up @@ -449,8 +441,6 @@ type ClientOutboundInterceptor interface {

// UpdateWorkflow intercepts client.Client.UpdateWorkflow
// interceptor.Header will return a non-nil map for this context.
//
// NOTE: Experimental
UpdateWorkflow(context.Context, *ClientUpdateWorkflowInput) (WorkflowUpdateHandle, error)

// UpdateWithStartWorkflow intercepts client.Client.UpdateWithStartWorkflow.
Expand All @@ -460,8 +450,6 @@ type ClientOutboundInterceptor interface {

// PollWorkflowUpdate requests the outcome of a specific update from the
// server.
//
// NOTE: Experimental
PollWorkflowUpdate(context.Context, *ClientPollWorkflowUpdateInput) (*ClientPollWorkflowUpdateOutput, error)

mustEmbedClientOutboundInterceptorBase()
Expand All @@ -470,10 +458,6 @@ type ClientOutboundInterceptor interface {
// ClientUpdateWorkflowInput is the input to
// ClientOutboundInterceptor.UpdateWorkflow
//
// NOTE: Experimental
//
// Exposed as: [go.temporal.io/sdk/interceptor.ClientUpdateWorkflowInput]
//
// Exposed as: [go.temporal.io/sdk/interceptor.ClientUpdateWorkflowInput]
type ClientUpdateWorkflowInput struct {
UpdateID string
Expand Down
2 changes: 0 additions & 2 deletions internal/internal_workflow_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,6 @@ type UpdateWithStartWorkflowOptions struct {
// similar to a Future with respect to the outcome of the update. If the update
// is rejected or returns an error, the Get function on this type will return
// that error through the output valuePtr.
// NOTE: Experimental
type WorkflowUpdateHandle interface {
// WorkflowID observes the update's workflow ID.
WorkflowID() string
Expand All @@ -833,7 +832,6 @@ type WorkflowUpdateHandle interface {

// GetWorkflowUpdateHandleOptions encapsulates the parameters needed to unambiguously
// refer to a Workflow Update.
// NOTE: Experimental
type GetWorkflowUpdateHandleOptions struct {
// WorkflowID of the target update
WorkflowID string
Expand Down
4 changes: 0 additions & 4 deletions internal/workflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -456,8 +456,6 @@ type (

// UpdateHandlerOptions consists of options for executing a named workflow update.
//
// NOTE: Experimental
//
// Exposed as: [go.temporal.io/sdk/workflow.UpdateHandlerOptions]
UpdateHandlerOptions struct {
// Validator is an optional (i.e. can be left nil) func with exactly the
Expand Down Expand Up @@ -2184,8 +2182,6 @@ func (wc *workflowEnvironmentInterceptor) SetQueryHandlerWithOptions(
// handlers must be deterministic and can observe workflow state but must not
// mutate workflow state in any way.
//
// NOTE: Experimental
//
// Exposed as: [go.temporal.io/sdk/workflow.SetUpdateHandlerWithOptions]
func SetUpdateHandler(ctx Context, updateName string, handler interface{}, opts UpdateHandlerOptions) error {
assertNotInReadOnlyState(ctx)
Expand Down
10 changes: 1 addition & 9 deletions workflow/workflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ type (
Info = internal.WorkflowInfo

// UpdateInfo information about a currently running update
//
// NOTE: Experimental
UpdateInfo = internal.UpdateInfo

// ContinueAsNewError can be returned by a workflow implementation function and indicates that
Expand Down Expand Up @@ -272,16 +270,14 @@ func GetTypedSearchAttributes(ctx Context) temporal.SearchAttributes {

// GetCurrentUpdateInfo returns information about the currently running update if any
// from the context.
//
// NOTE: Experimental
func GetCurrentUpdateInfo(ctx Context) *UpdateInfo {
return internal.GetCurrentUpdateInfo(ctx)
}

// GetLogger returns a logger to be used in workflow's context.
// This logger does not record logs during replay.
//
// The logger may also extract additional fields from the context, such as update info
// The logger may also extract additional fields from the context, such as update info
// if used in an update handler.
func GetLogger(ctx Context) log.Logger {
return internal.GetLogger(ctx)
Expand Down Expand Up @@ -529,8 +525,6 @@ func SetQueryHandlerWithOptions(ctx Context, queryType string, handler interface
// SetUpdateHandler forwards to SetUpdateHandlerWithOptions with an
// zero-initialized UpdateHandlerOptions struct. See SetUpdateHandlerWithOptions
// for more details.
//
// NOTE: Experimental
func SetUpdateHandler(ctx Context, updateName string, handler interface{}) error {
return SetUpdateHandlerWithOptions(ctx, updateName, handler, UpdateHandlerOptions{})
}
Expand Down Expand Up @@ -583,8 +577,6 @@ func SetUpdateHandler(ctx Context, updateName string, handler interface{}) error
// _ = ctx.Done().Receive(ctx, nil)
// return counter, nil
// }
//
// NOTE: Experimental
func SetUpdateHandlerWithOptions(ctx Context, updateName string, handler interface{}, opts UpdateHandlerOptions) error {
return internal.SetUpdateHandler(ctx, updateName, handler, opts)
}
Expand Down

0 comments on commit ed8e70d

Please sign in to comment.