Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Schedules start workflows through frontend #3935

Merged
merged 4 commits into from
Feb 10, 2023
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
8 changes: 5 additions & 3 deletions api/historyservice/v1/request_response.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

292 changes: 79 additions & 213 deletions api/schedule/v1/message.pb.go

Large diffs are not rendered by default.

9 changes: 8 additions & 1 deletion common/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,10 @@ func FromConfigToDefaultRetrySettings(options map[string]interface{}) DefaultRet
return defaultSettings
}

// CreateHistoryStartWorkflowRequest create a start workflow request for history
// CreateHistoryStartWorkflowRequest create a start workflow request for history.
// Note: this mutates startRequest by unsetting the fields ContinuedFailure and
// LastCompletionResult (these should only be set on workflows created by the scheduler
// worker).
func CreateHistoryStartWorkflowRequest(
namespaceID string,
startRequest *workflowservice.StartWorkflowExecutionRequest,
Expand All @@ -574,7 +577,11 @@ func CreateHistoryStartWorkflowRequest(
Attempt: 1,
ParentExecutionInfo: parentExecutionInfo,
FirstWorkflowTaskBackoff: backoff.GetBackoffForNextScheduleNonNegative(startRequest.GetCronSchedule(), now, now),
ContinuedFailure: startRequest.ContinuedFailure,
LastCompletionResult: startRequest.LastCompletionResult,
}
startRequest.ContinuedFailure = nil
startRequest.LastCompletionResult = nil

if timestamp.DurationValue(startRequest.GetWorkflowExecutionTimeout()) > 0 {
deadline := now.Add(timestamp.DurationValue(startRequest.GetWorkflowExecutionTimeout()))
Expand Down
20 changes: 10 additions & 10 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,18 @@ require (
go.opentelemetry.io/otel/metric v0.34.0
go.opentelemetry.io/otel/sdk v1.11.2
go.opentelemetry.io/otel/sdk/metric v0.34.0
go.temporal.io/api v1.16.0
go.temporal.io/api v1.16.1-0.20230210062249-90fb5b4a7b41
go.temporal.io/sdk v1.21.0
go.temporal.io/version v0.3.0
go.uber.org/atomic v1.10.0
go.uber.org/fx v1.18.2
go.uber.org/multierr v1.8.0
go.uber.org/zap v1.24.0
golang.org/x/exp v0.0.0-20221126150942-6ab00d035af9
golang.org/x/oauth2 v0.2.0
golang.org/x/oauth2 v0.4.0
golang.org/x/time v0.2.0
google.golang.org/api v0.103.0
google.golang.org/grpc v1.52.3
google.golang.org/grpc v1.53.0
google.golang.org/grpc/examples v0.0.0-20221201195934-736197138d20
gopkg.in/square/go-jose.v2 v2.6.0
gopkg.in/validator.v2 v2.0.1
Expand All @@ -65,15 +65,15 @@ require (

require (
cloud.google.com/go v0.107.0 // indirect
cloud.google.com/go/compute v1.13.0 // indirect
cloud.google.com/go/compute/metadata v0.2.2 // indirect
cloud.google.com/go/compute v1.15.1 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
cloud.google.com/go/iam v0.8.0 // indirect
github.com/apache/thrift v0.17.0 // indirect
github.com/benbjohnson/clock v1.3.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bitly/go-hostpool v0.1.0 // indirect
github.com/cenkalti/backoff/v4 v4.2.0 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a // indirect
Expand Down Expand Up @@ -121,13 +121,13 @@ require (
go.uber.org/dig v1.15.0 // indirect
golang.org/x/crypto v0.3.0 // indirect
golang.org/x/mod v0.7.0 // indirect
golang.org/x/net v0.5.0 // indirect
golang.org/x/sys v0.4.0 // indirect
golang.org/x/text v0.6.0 // indirect
golang.org/x/net v0.6.0 // indirect
golang.org/x/sys v0.5.0 // indirect
golang.org/x/text v0.7.0 // indirect
golang.org/x/tools v0.3.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20230127162408-596548ed4efa // indirect
google.golang.org/genproto v0.0.0-20230209215440-0dfe4f8abfcc // indirect
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
lukechampine.com/uint128 v1.2.0 // indirect
Expand Down
Loading