From 268636e16aa157010b7642c1c2e13edb3fe68927 Mon Sep 17 00:00:00 2001 From: James Watkins-Harvey Date: Mon, 25 May 2026 14:20:28 -0400 Subject: [PATCH] deps: sync api_upstream subtree to temporal-api@cd46361 --- crates/client/src/grpc.rs | 36 + crates/client/src/lib.rs | 6 +- crates/client/src/schedules.rs | 1 + crates/client/src/workflow_handle.rs | 3 + .../.github/workflows/publish-docs.yml | 23 - crates/common/protos/api_upstream/Makefile | 23 +- crates/common/protos/api_upstream/buf.lock | 13 +- crates/common/protos/api_upstream/buf.yaml | 4 + .../protoc-gen-nexus-rpc-yaml/generator.go | 272 ++++ .../cmd/protoc-gen-nexus-rpc-yaml/go.mod | 12 + .../cmd/protoc-gen-nexus-rpc-yaml/go.sum | 10 + .../cmd/protoc-gen-nexus-rpc-yaml/main.go | 13 + .../nexus/temporal-proto-models-nexusrpc.yaml | 19 + .../nexusannotations/v1/options.proto | 29 + .../api_upstream/openapi/openapiv2.json | 1352 ++++++++++++++-- .../api_upstream/openapi/openapiv3.yaml | 1357 +++++++++++++++-- .../temporal/api/activity/v1/message.proto | 8 + .../temporal/api/common/v1/message.proto | 11 + .../temporal/api/history/v1/message.proto | 11 + .../temporal/api/namespace/v1/message.proto | 6 + .../temporal/api/nexus/v1/message.proto | 1 + .../temporal/api/schedule/v1/message.proto | 6 + .../temporal/api/update/v1/message.proto | 6 + .../temporal/api/workflow/v1/message.proto | 6 + .../workflowservice/v1/request_response.proto | 166 +- .../api/workflowservice/v1/service.proto | 144 +- crates/sdk-core-c-bridge/src/client.rs | 17 + crates/sdk-core/src/replay/history_builder.rs | 3 + .../sdk-core/src/test_help/integ_helpers.rs | 3 + .../workflow/machines/update_state_machine.rs | 1 + .../workflow/machines/workflow_machines.rs | 1 + .../integ_tests/worker_heartbeat_tests.rs | 6 + 32 files changed, 3297 insertions(+), 272 deletions(-) delete mode 100644 crates/common/protos/api_upstream/.github/workflows/publish-docs.yml create mode 100644 crates/common/protos/api_upstream/cmd/protoc-gen-nexus-rpc-yaml/generator.go create mode 100644 crates/common/protos/api_upstream/cmd/protoc-gen-nexus-rpc-yaml/go.mod create mode 100644 crates/common/protos/api_upstream/cmd/protoc-gen-nexus-rpc-yaml/go.sum create mode 100644 crates/common/protos/api_upstream/cmd/protoc-gen-nexus-rpc-yaml/main.go create mode 100644 crates/common/protos/api_upstream/nexus/temporal-proto-models-nexusrpc.yaml create mode 100644 crates/common/protos/api_upstream/nexusannotations/v1/options.proto diff --git a/crates/client/src/grpc.rs b/crates/client/src/grpc.rs index 00e64447a..e5a12d69d 100644 --- a/crates/client/src/grpc.rs +++ b/crates/client/src/grpc.rs @@ -1325,6 +1325,15 @@ proxier! { r.extensions_mut().insert(labels); } ); + ( + update_activity_execution_options, + UpdateActivityExecutionOptionsRequest, + UpdateActivityExecutionOptionsResponse, + |r| { + let labels = namespaced_request!(r); + r.extensions_mut().insert(labels); + } + ); ( pause_activity, PauseActivityRequest, @@ -1334,6 +1343,15 @@ proxier! { r.extensions_mut().insert(labels); } ); + ( + pause_activity_execution, + PauseActivityExecutionRequest, + PauseActivityExecutionResponse, + |r| { + let labels = namespaced_request!(r); + r.extensions_mut().insert(labels); + } + ); ( unpause_activity, UnpauseActivityRequest, @@ -1343,6 +1361,15 @@ proxier! { r.extensions_mut().insert(labels); } ); + ( + unpause_activity_execution, + UnpauseActivityExecutionRequest, + UnpauseActivityExecutionResponse, + |r| { + let labels = namespaced_request!(r); + r.extensions_mut().insert(labels); + } + ); ( update_workflow_execution_options, UpdateWorkflowExecutionOptionsRequest, @@ -1361,6 +1388,15 @@ proxier! { r.extensions_mut().insert(labels); } ); + ( + reset_activity_execution, + ResetActivityExecutionRequest, + ResetActivityExecutionResponse, + |r| { + let labels = namespaced_request!(r); + r.extensions_mut().insert(labels); + } + ); ( delete_worker_deployment, DeleteWorkerDeploymentRequest, diff --git a/crates/client/src/lib.rs b/crates/client/src/lib.rs index 906469137..ab0bbda97 100644 --- a/crates/client/src/lib.rs +++ b/crates/client/src/lib.rs @@ -765,7 +765,11 @@ impl Namespace { Namespace::Name(n) => (n, "".to_owned()), Namespace::Id(n) => ("".to_owned(), n), }; - DescribeNamespaceRequest { namespace, id } + DescribeNamespaceRequest { + namespace, + id, + weak_consistency: false, + } } } diff --git a/crates/client/src/schedules.rs b/crates/client/src/schedules.rs index 4c9fd417f..f93251052 100644 --- a/crates/client/src/schedules.rs +++ b/crates/client/src/schedules.rs @@ -1550,6 +1550,7 @@ mod tests { seconds: 1_700_000_000, nanos: 0, }], + state_size_bytes: 0, }), }; diff --git a/crates/client/src/workflow_handle.rs b/crates/client/src/workflow_handle.rs index 976dd07e7..0d440b708 100644 --- a/crates/client/src/workflow_handle.rs +++ b/crates/client/src/workflow_handle.rs @@ -746,6 +746,9 @@ where name: update.name().to_string(), args: Some(Payloads { payloads }), }), + request_id: String::new(), + completion_callbacks: vec![], + links: vec![], }), ..Default::default() } diff --git a/crates/common/protos/api_upstream/.github/workflows/publish-docs.yml b/crates/common/protos/api_upstream/.github/workflows/publish-docs.yml deleted file mode 100644 index 5b218f021..000000000 --- a/crates/common/protos/api_upstream/.github/workflows/publish-docs.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Publish docs - -on: - push: - branches: - - master - -env: - VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} - VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} - -jobs: - publish: - runs-on: ubuntu-latest - - steps: - - name: Checkout repo - uses: actions/checkout@v3 - - name: Generate docs - run: | - docker run -v $(pwd)/docs:/out -v $(pwd)/:/protos pseudomuto/protoc-gen-doc --doc_opt=html,index.html $(find temporal/api -type f -name "*.proto") - - name: Deploy - run: npx vercel deploy docs/ --prod --token=${{ secrets.VERCEL_TOKEN }} diff --git a/crates/common/protos/api_upstream/Makefile b/crates/common/protos/api_upstream/Makefile index b4b33bdb5..ea42652e9 100644 --- a/crates/common/protos/api_upstream/Makefile +++ b/crates/common/protos/api_upstream/Makefile @@ -8,7 +8,7 @@ ci-build: install proto http-api-docs install: grpc-install api-linter-install buf-install # Run all linters and compile proto files. -proto: grpc http-api-docs +proto: grpc http-api-docs nexus-rpc-yaml ######################################################################## ##### Variables ###### @@ -95,6 +95,11 @@ buf-install: printf $(COLOR) "Install/update buf..." go install github.com/bufbuild/buf/cmd/buf@v1.27.0 +##### Sync external proto dependencies ##### +sync-nexus-annotations: + printf $(COLOR) "Sync nexusannotations from buf.build/temporalio/nexus-annotations..." + buf export buf.build/temporalio/nexus-annotations --output . + ##### Linters ##### api-linter: printf $(COLOR) "Run api-linter..." @@ -116,6 +121,22 @@ buf-breaking: @printf $(COLOR) "Run buf breaking changes check against master branch..." @(cd $(PROTO_ROOT) && buf breaking --against 'https://github.com/temporalio/api.git#branch=master') +nexus-rpc-yaml: nexus-rpc-yaml-install + printf $(COLOR) "Generate nexus/temporal-proto-models-nexusrpc.yaml..." + mkdir -p nexus + protoc -I $(PROTO_ROOT) \ + --nexus-rpc-yaml_opt=nexus-rpc_langs_out=nexus/temporal-proto-models-nexusrpc.yaml \ + --nexus-rpc-yaml_opt=python_package_prefix=temporalio.api \ + --nexus-rpc-yaml_opt=typescript_package_prefix=@temporalio/api \ + --nexus-rpc-yaml_opt=include_operation_tags=exposed \ + --nexus-rpc-yaml_out=. \ + temporal/api/workflowservice/v1/* \ + temporal/api/operatorservice/v1/* + +nexus-rpc-yaml-install: + printf $(COLOR) "Build and install protoc-gen-nexus-rpc-yaml..." + @cd cmd/protoc-gen-nexus-rpc-yaml && go install . + ##### Clean ##### clean: printf $(COLOR) "Delete generated go files..." diff --git a/crates/common/protos/api_upstream/buf.lock b/crates/common/protos/api_upstream/buf.lock index fccbfb89d..f43352bf2 100644 --- a/crates/common/protos/api_upstream/buf.lock +++ b/crates/common/protos/api_upstream/buf.lock @@ -4,10 +4,15 @@ deps: - remote: buf.build owner: googleapis repository: googleapis - commit: 28151c0d0a1641bf938a7672c500e01d - digest: shake256:49215edf8ef57f7863004539deff8834cfb2195113f0b890dd1f67815d9353e28e668019165b9d872395871eeafcbab3ccfdb2b5f11734d3cca95be9e8d139de + commit: 004180b77378443887d3b55cabc00384 + digest: shake256:d26c7c2fd95f0873761af33ca4a0c0d92c8577122b6feb74eb3b0a57ebe47a98ab24a209a0e91945ac4c77204e9da0c2de0020b2cedc27bdbcdea6c431eec69b - remote: buf.build owner: grpc-ecosystem repository: grpc-gateway - commit: 048ae6ff94ca4476b3225904b1078fad - digest: shake256:e5250bf2d999516c02206d757502b902e406f35c099d0e869dc3e4f923f6870fe0805a9974c27df0695462937eae90cd4d9db90bb9a03489412560baa74a87b6 + commit: 6467306b4f624747aaf6266762ee7a1c + digest: shake256:833d648b99b9d2c18b6882ef41aaeb113e76fc38de20dda810c588d133846e6593b4da71b388bcd921b1c7ab41c7acf8f106663d7301ae9e82ceab22cf64b1b7 + - remote: buf.build + owner: temporalio + repository: nexus-annotations + commit: 599b78404fbe4e78b833d527a1d0da40 + digest: shake256:1f41ef11ccbf31d7318b0fe1915550ba6567c99dc94694d60b117fc1ffc756290ba9766c58b403986f079e2b861b42538e5f8cf0495f744cd390d223b81854ca diff --git a/crates/common/protos/api_upstream/buf.yaml b/crates/common/protos/api_upstream/buf.yaml index e984c1439..2f2fa5389 100644 --- a/crates/common/protos/api_upstream/buf.yaml +++ b/crates/common/protos/api_upstream/buf.yaml @@ -3,11 +3,14 @@ name: buf.build/temporalio/api deps: - buf.build/grpc-ecosystem/grpc-gateway - buf.build/googleapis/googleapis + - buf.build/temporalio/nexus-annotations build: excludes: # Buf won't accept a local dependency on the google protos but we need them # to run api-linter, so just tell buf it ignore it - google + # Same for nexusannotations - local copy for api-linter, BSR dep for buf + - nexusannotations breaking: use: - WIRE_JSON @@ -18,3 +21,4 @@ lint: - DEFAULT ignore: - google + - cmd diff --git a/crates/common/protos/api_upstream/cmd/protoc-gen-nexus-rpc-yaml/generator.go b/crates/common/protos/api_upstream/cmd/protoc-gen-nexus-rpc-yaml/generator.go new file mode 100644 index 000000000..2e4a939c8 --- /dev/null +++ b/crates/common/protos/api_upstream/cmd/protoc-gen-nexus-rpc-yaml/generator.go @@ -0,0 +1,272 @@ +package main + +import ( + "fmt" + "slices" + "sort" + "strings" + + nexusannotationsv1 "github.com/nexus-rpc/nexus-proto-annotations/go/nexusannotations/v1" + "google.golang.org/protobuf/compiler/protogen" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/types/descriptorpb" + "gopkg.in/yaml.v3" +) + +// params holds the parsed protoc plugin options. +// Passed via --nexus-rpc-yaml_opt=key=value (multiple opts are comma-joined by protoc). +// +// - nexus-rpc_langs_out: optional. Output path for the langs YAML. +// If empty, nothing is written. +// Example: "nexus/temporal-proto-models-nexusrpc.yaml" +// +// - python_package_prefix: optional. Dot-separated package prefix for $pythonRef. +// The last two path segments of the go_package ({service}/v{n}) are appended. +// Example: "temporalio.api" → "temporalio.api.workflowservice.v1.TypeName" +// If empty, $pythonRef is omitted. +// +// - typescript_package_prefix: optional. Scoped package prefix for $typescriptRef. +// The last two path segments of the go_package ({service}/v{n}) are appended. +// Example: "@temporalio/api" → "@temporalio/api/workflowservice/v1.TypeName" +// If empty, $typescriptRef is omitted. +// +// - include_operation_tags: optional, repeatable. Only include operations whose tags +// contain at least one of these values. If empty, all annotated operations are included +// (subject to exclude_operation_tags). Specify multiple times for multiple tags. +// Example: include_operation_tags=exposed +// +// - exclude_operation_tags: optional, repeatable. Exclude operations whose tags contain +// any of these values. Applied after include_operation_tags. +// Example: exclude_operation_tags=internal +type params struct { + nexusRpcLangsOut string + pythonPackagePrefix string + typescriptPackagePrefix string + includeOperationTags []string + excludeOperationTags []string +} + +// parseParams parses the comma-separated key=value parameter string provided by protoc. +func parseParams(raw string) (params, error) { + var p params + if raw == "" { + return p, nil + } + for kv := range strings.SplitSeq(raw, ",") { + key, value, ok := strings.Cut(kv, "=") + if !ok { + return p, fmt.Errorf("invalid parameter %q: expected key=value", kv) + } + switch key { + case "nexus-rpc_langs_out": + p.nexusRpcLangsOut = value + case "python_package_prefix": + p.pythonPackagePrefix = value + case "typescript_package_prefix": + p.typescriptPackagePrefix = value + case "include_operation_tags": + p.includeOperationTags = append(p.includeOperationTags, value) + case "exclude_operation_tags": + p.excludeOperationTags = append(p.excludeOperationTags, value) + default: + return p, fmt.Errorf("unknown parameter %q", key) + } + } + return p, nil +} + +// shouldIncludeOperation returns true if the method's nexus operation tags pass +// the include/exclude filters. Mirrors the logic from protoc-gen-go-nexus: +// 1. Method must have the nexus operation extension set. +// 2. If includeOperationTags is non-empty, at least one of the method's tags must match. +// 3. If excludeOperationTags is non-empty, none of the method's tags may match. +func shouldIncludeOperation(p params, m *protogen.Method) bool { + opts, ok := m.Desc.Options().(*descriptorpb.MethodOptions) + if !ok || opts == nil { + return false + } + if !proto.HasExtension(opts, nexusannotationsv1.E_Operation) { + return false + } + tags := proto.GetExtension(opts, nexusannotationsv1.E_Operation).(*nexusannotationsv1.OperationOptions).GetTags() + if len(p.includeOperationTags) > 0 && !slices.ContainsFunc(p.includeOperationTags, func(t string) bool { + return slices.Contains(tags, t) + }) { + return false + } + return !slices.ContainsFunc(p.excludeOperationTags, func(t string) bool { + return slices.Contains(tags, t) + }) +} + +func generate(gen *protogen.Plugin) error { + p, err := parseParams(gen.Request.GetParameter()) + if err != nil { + return err + } + + langsDoc := newDoc() + hasOps := false + + for _, f := range gen.Files { + if !f.Generate { + continue + } + for _, svc := range f.Services { + for _, m := range svc.Methods { + if !shouldIncludeOperation(p, m) { + continue + } + svcName := string(svc.Desc.Name()) + methodName := string(m.Desc.Name()) + hasOps = true + addOperation(langsDoc, svcName, methodName, + langRefs(p, f.Desc, m.Input.Desc), + langRefs(p, f.Desc, m.Output.Desc), + ) + } + } + } + + if !hasOps { + return nil + } + if p.nexusRpcLangsOut != "" { + return writeFile(gen, p.nexusRpcLangsOut, langsDoc) + } + return nil +} + +// langRefs builds the map of language-specific type refs for a message. +// +// Go, Java, dotnet, and Ruby refs are derived from proto file-level package options. +// Python and TypeScript refs require the corresponding prefix params to be set; if +// empty they are omitted. Both use the last two path segments of go_package +// ({service}/v{n}), dropping any intermediate grouping directory. +func langRefs(p params, file protoreflect.FileDescriptor, msg protoreflect.MessageDescriptor) map[string]string { + opts, ok := file.Options().(*descriptorpb.FileOptions) + if !ok || opts == nil { + return nil + } + name := string(msg.Name()) + refs := make(map[string]string) + + if pkg := opts.GetGoPackage(); pkg != "" { + // strip the ";alias" suffix (e.g. "go.temporal.io/api/workflowservice/v1;workflowservice") + pkg = strings.SplitN(pkg, ";", 2)[0] + refs["$goRef"] = pkg + "." + name + + segments := strings.Split(pkg, "/") + if len(segments) >= 2 { + tail := segments[len(segments)-2] + "/" + segments[len(segments)-1] + if p.pythonPackagePrefix != "" { + dotTail := strings.ReplaceAll(tail, "/", ".") + refs["$pythonRef"] = p.pythonPackagePrefix + "." + dotTail + "." + name + } + if p.typescriptPackagePrefix != "" { + refs["$typescriptRef"] = p.typescriptPackagePrefix + "/" + tail + "." + name + } + } + } + if pkg := opts.GetJavaPackage(); pkg != "" { + refs["$javaRef"] = pkg + "." + name + } + if pkg := opts.GetRubyPackage(); pkg != "" { + refs["$rubyRef"] = pkg + "::" + name + } + if pkg := opts.GetCsharpNamespace(); pkg != "" { + refs["$dotnetRef"] = pkg + "." + name + } + if len(refs) == 0 { + return nil + } + return refs +} + +// newDoc creates a yaml.Node document with the "nexusrpc: 1.0.0" header +// and an empty "services" mapping node. +func newDoc() *yaml.Node { + doc := &yaml.Node{Kind: yaml.DocumentNode} + root := &yaml.Node{Kind: yaml.MappingNode, Tag: "!!map"} + doc.Content = []*yaml.Node{root} + root.Content = append(root.Content, + scalarNode("nexusrpc"), + scalarNode("1.0.0"), + scalarNode("services"), + &yaml.Node{Kind: yaml.MappingNode, Tag: "!!map"}, + ) + return doc +} + +// servicesNode returns the "services" mapping node from a doc created by newDoc. +func servicesNode(doc *yaml.Node) *yaml.Node { + root := doc.Content[0] + for i := 0; i < len(root.Content)-1; i += 2 { + if root.Content[i].Value == "services" { + return root.Content[i+1] + } + } + panic("services node not found") +} + +// addOperation inserts a service → operation → {input, output} entry into doc. +// Services and operations are inserted in the order first encountered. +func addOperation(doc *yaml.Node, svcName, methodName string, input, output map[string]string) { + svcs := servicesNode(doc) + + var svcOps *yaml.Node + for i := 0; i < len(svcs.Content)-1; i += 2 { + if svcs.Content[i].Value == svcName { + svcMap := svcs.Content[i+1] + for j := 0; j < len(svcMap.Content)-1; j += 2 { + if svcMap.Content[j].Value == "operations" { + svcOps = svcMap.Content[j+1] + } + } + } + } + if svcOps == nil { + svcMap := &yaml.Node{Kind: yaml.MappingNode, Tag: "!!map"} + svcOps = &yaml.Node{Kind: yaml.MappingNode, Tag: "!!map"} + svcMap.Content = append(svcMap.Content, scalarNode("operations"), svcOps) + svcs.Content = append(svcs.Content, scalarNode(svcName), svcMap) + } + + opNode := &yaml.Node{Kind: yaml.MappingNode, Tag: "!!map"} + if len(input) > 0 { + opNode.Content = append(opNode.Content, scalarNode("input"), mapNode(input)) + } + if len(output) > 0 { + opNode.Content = append(opNode.Content, scalarNode("output"), mapNode(output)) + } + svcOps.Content = append(svcOps.Content, scalarNode(methodName), opNode) +} + +// mapNode serializes a map[string]string as a yaml mapping node with keys in sorted order. +func mapNode(m map[string]string) *yaml.Node { + keys := make([]string, 0, len(m)) + for k := range m { + keys = append(keys, k) + } + sort.Strings(keys) + node := &yaml.Node{Kind: yaml.MappingNode, Tag: "!!map"} + for _, k := range keys { + node.Content = append(node.Content, scalarNode(k), scalarNode(m[k])) + } + return node +} + +func scalarNode(value string) *yaml.Node { + return &yaml.Node{Kind: yaml.ScalarNode, Tag: "!!str", Value: value} +} + +func writeFile(gen *protogen.Plugin, name string, doc *yaml.Node) error { + f := gen.NewGeneratedFile(name, "") + enc := yaml.NewEncoder(f) + enc.SetIndent(2) + if err := enc.Encode(doc); err != nil { + return err + } + return enc.Close() +} diff --git a/crates/common/protos/api_upstream/cmd/protoc-gen-nexus-rpc-yaml/go.mod b/crates/common/protos/api_upstream/cmd/protoc-gen-nexus-rpc-yaml/go.mod new file mode 100644 index 000000000..863c771a6 --- /dev/null +++ b/crates/common/protos/api_upstream/cmd/protoc-gen-nexus-rpc-yaml/go.mod @@ -0,0 +1,12 @@ +module github.com/temporalio/api/cmd/protoc-gen-nexus-rpc-yaml + +go 1.25.4 + +require ( + google.golang.org/protobuf v1.36.1 + gopkg.in/yaml.v3 v3.0.1 +) + +require github.com/nexus-rpc/nexus-proto-annotations v0.0.0-20260330194009-e558d6edaf84 + +require github.com/google/go-cmp v0.6.0 // indirect diff --git a/crates/common/protos/api_upstream/cmd/protoc-gen-nexus-rpc-yaml/go.sum b/crates/common/protos/api_upstream/cmd/protoc-gen-nexus-rpc-yaml/go.sum new file mode 100644 index 000000000..cbc5252ff --- /dev/null +++ b/crates/common/protos/api_upstream/cmd/protoc-gen-nexus-rpc-yaml/go.sum @@ -0,0 +1,10 @@ +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/nexus-rpc/nexus-proto-annotations v0.0.0-20260330194009-e558d6edaf84 h1:SWHt3Coj0VvF0Km1A0wlY+IjnHKsjQLgO29io84r3wY= +github.com/nexus-rpc/nexus-proto-annotations v0.0.0-20260330194009-e558d6edaf84/go.mod h1:n3UjF1bPCW8llR8tHvbxJ+27yPWrhpo8w/Yg1IOuY0Y= +google.golang.org/protobuf v1.36.1 h1:yBPeRvTftaleIgM3PZ/WBIZ7XM/eEYAaEyCwvyjq/gk= +google.golang.org/protobuf v1.36.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/crates/common/protos/api_upstream/cmd/protoc-gen-nexus-rpc-yaml/main.go b/crates/common/protos/api_upstream/cmd/protoc-gen-nexus-rpc-yaml/main.go new file mode 100644 index 000000000..31cdca92f --- /dev/null +++ b/crates/common/protos/api_upstream/cmd/protoc-gen-nexus-rpc-yaml/main.go @@ -0,0 +1,13 @@ +// protoc-gen-nexus-rpc-yaml is a protoc plugin that generates nexus/temporal-proto-models-nexusrpc.yaml +// from proto service methods annotated with option (nexusannotations.v1.operation).tags = "exposed". +package main + +import ( + "google.golang.org/protobuf/compiler/protogen" +) + +func main() { + protogen.Options{}.Run(func(gen *protogen.Plugin) error { + return generate(gen) + }) +} diff --git a/crates/common/protos/api_upstream/nexus/temporal-proto-models-nexusrpc.yaml b/crates/common/protos/api_upstream/nexus/temporal-proto-models-nexusrpc.yaml new file mode 100644 index 000000000..e0761fd15 --- /dev/null +++ b/crates/common/protos/api_upstream/nexus/temporal-proto-models-nexusrpc.yaml @@ -0,0 +1,19 @@ +nexusrpc: 1.0.0 +services: + WorkflowService: + operations: + SignalWithStartWorkflowExecution: + input: + $dotnetRef: Temporalio.Api.WorkflowService.V1.SignalWithStartWorkflowExecutionRequest + $goRef: go.temporal.io/api/workflowservice/v1.SignalWithStartWorkflowExecutionRequest + $javaRef: io.temporal.api.workflowservice.v1.SignalWithStartWorkflowExecutionRequest + $pythonRef: temporalio.api.workflowservice.v1.SignalWithStartWorkflowExecutionRequest + $rubyRef: Temporalio::Api::WorkflowService::V1::SignalWithStartWorkflowExecutionRequest + $typescriptRef: '@temporalio/api/workflowservice/v1.SignalWithStartWorkflowExecutionRequest' + output: + $dotnetRef: Temporalio.Api.WorkflowService.V1.SignalWithStartWorkflowExecutionResponse + $goRef: go.temporal.io/api/workflowservice/v1.SignalWithStartWorkflowExecutionResponse + $javaRef: io.temporal.api.workflowservice.v1.SignalWithStartWorkflowExecutionResponse + $pythonRef: temporalio.api.workflowservice.v1.SignalWithStartWorkflowExecutionResponse + $rubyRef: Temporalio::Api::WorkflowService::V1::SignalWithStartWorkflowExecutionResponse + $typescriptRef: '@temporalio/api/workflowservice/v1.SignalWithStartWorkflowExecutionResponse' diff --git a/crates/common/protos/api_upstream/nexusannotations/v1/options.proto b/crates/common/protos/api_upstream/nexusannotations/v1/options.proto new file mode 100644 index 000000000..e137896bb --- /dev/null +++ b/crates/common/protos/api_upstream/nexusannotations/v1/options.proto @@ -0,0 +1,29 @@ +syntax = "proto3"; + +package nexusannotations.v1; + +import "google/protobuf/descriptor.proto"; + +option go_package = "github.com/nexus-rpc/nexus-proto-annotations/go/nexusannotations/v1"; + +extend google.protobuf.ServiceOptions { + optional ServiceOptions service = 8233; +} + +extend google.protobuf.MethodOptions { + optional OperationOptions operation = 8234; +} + +message OperationOptions { + // Nexus operation name (defaults to proto method name). + string name = 1; + // Tags to attach to the operation. Used by code generators to include and exclude operations. + repeated string tags = 2; +} + +message ServiceOptions { + // Nexus service name (defaults to proto service full name). + string name = 1; + // Tags to attach to the service. Used by code generators to include and exclude services. + repeated string tags = 2; +} diff --git a/crates/common/protos/api_upstream/openapi/openapiv2.json b/crates/common/protos/api_upstream/openapi/openapiv2.json index 6544ba8a4..a9538a26c 100644 --- a/crates/common/protos/api_upstream/openapi/openapiv2.json +++ b/crates/common/protos/api_upstream/openapi/openapiv2.json @@ -150,6 +150,13 @@ "in": "query", "required": false, "type": "string" + }, + { + "name": "weakConsistency", + "description": "If true, the server may serve the response from an eventually-consistent\nsource instead of reading through to persistence. Defaults to false,\nwhich preserves read-after-write consistency. SDKs should set this when\nfetching namespace capabilities on worker/client startup.", + "in": "query", + "required": false, + "type": "boolean" } ], "tags": [ @@ -716,6 +723,102 @@ ] } }, + "/api/v1/namespaces/{namespace}/activities/{activityId}/pause": { + "post": { + "summary": "PauseActivityExecution pauses the execution of an activity specified by its ID.\nThis API can be used to target a workflow activity or a standalone activity", + "description": "Pausing an activity means:\n- If the activity is currently waiting for a retry or is running and subsequently fails,\n it will not be rescheduled until it is unpaused.\n- If the activity is already paused, calling this method will have no effect.\n- If the activity is running and finishes successfully, the activity will be completed.\n- If the activity is running and finishes with failure:\n * if there is no retry left - the activity will be completed.\n * if there are more retries left - the activity will be paused.\nFor long-running activities:\n- activities in paused state will send a cancellation with \"activity_paused\" set to 'true' in response to 'RecordActivityTaskHeartbeat'.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID", + "operationId": "PauseActivityExecution2", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1PauseActivityExecutionResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "namespace", + "description": "Namespace of the workflow which scheduled this activity.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "activityId", + "description": "The ID of the activity to target.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WorkflowServicePauseActivityExecutionBody" + } + } + ], + "tags": [ + "WorkflowService" + ] + } + }, + "/api/v1/namespaces/{namespace}/activities/{activityId}/reset": { + "post": { + "summary": "ResetActivityExecution resets the execution of an activity specified by its ID.\nThis API can be used to target a workflow activity or a standalone activity.", + "description": "Resetting an activity means:\n* number of attempts will be reset to 0.\n* activity timeouts will be reset.\n* if the activity is waiting for retry, and it is not paused or 'keep_paused' is not provided:\n it will be scheduled immediately (* see 'jitter' flag)\n\nReturns a `NotFound` error if there is no pending activity with the provided ID or type.", + "operationId": "ResetActivityExecution2", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ResetActivityExecutionResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "namespace", + "description": "Namespace of the workflow which scheduled this activity.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "activityId", + "description": "The ID of the activity to target.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WorkflowServiceResetActivityExecutionBody" + } + } + ], + "tags": [ + "WorkflowService" + ] + } + }, "/api/v1/namespaces/{namespace}/activities/{activityId}/resolve-as-canceled": { "post": { "summary": "See `RespondActivityTaskCanceled`. This version allows clients to record failures by\nnamespace/workflow id/activity id instead of task token.", @@ -809,6 +912,101 @@ ] } }, + "/api/v1/namespaces/{namespace}/activities/{activityId}/unpause": { + "post": { + "summary": "UnpauseActivityExecution unpauses the execution of an activity specified by its ID.\nThis API can be used to target a workflow activity or a standalone activity.", + "description": "If activity is not paused, this call will have no effect.\nIf the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag).\nOnce the activity is unpaused, all timeout timers will be regenerated.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID", + "operationId": "UnpauseActivityExecution2", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1UnpauseActivityExecutionResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "namespace", + "description": "Namespace of the workflow which scheduled this activity.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "activityId", + "description": "The ID of the activity to target.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WorkflowServiceUnpauseActivityExecutionBody" + } + } + ], + "tags": [ + "WorkflowService" + ] + } + }, + "/api/v1/namespaces/{namespace}/activities/{activityId}/update-options": { + "post": { + "summary": "UpdateActivityExecutionOptions is called by the client to update the options of an activity by its ID.\nThis API can be used to target a workflow activity or a standalone activity.", + "operationId": "UpdateActivityExecutionOptions2", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1UpdateActivityExecutionOptionsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "namespace", + "description": "Namespace of the workflow which scheduled this activity", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "activityId", + "description": "The ID of the activity to target.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WorkflowServiceUpdateActivityExecutionOptionsBody" + } + } + ], + "tags": [ + "WorkflowService" + ] + } + }, "/api/v1/namespaces/{namespace}/activity-complete": { "post": { "summary": "RespondActivityTaskCompleted is called by workers when they successfully complete an activity\ntask.", @@ -3290,6 +3488,13 @@ "in": "query", "required": false, "type": "string" + }, + { + "name": "includeSystemWorkers", + "description": "When true, the response will include system workers that are created implicitly\nby the server and not by the user. By default, system workers are excluded.", + "in": "query", + "required": false, + "type": "boolean" } ], "tags": [ @@ -4470,15 +4675,16 @@ ] } }, - "/api/v1/namespaces/{namespace}/workflows/{workflowId}/activities/{activityId}/resolve-as-canceled": { + "/api/v1/namespaces/{namespace}/workflows/{workflowId}/activities/{activityId}/pause": { "post": { - "summary": "See `RespondActivityTaskCanceled`. This version allows clients to record failures by\nnamespace/workflow id/activity id instead of task token.", - "operationId": "RespondActivityTaskCanceledById4", + "summary": "PauseActivityExecution pauses the execution of an activity specified by its ID.\nThis API can be used to target a workflow activity or a standalone activity", + "description": "Pausing an activity means:\n- If the activity is currently waiting for a retry or is running and subsequently fails,\n it will not be rescheduled until it is unpaused.\n- If the activity is already paused, calling this method will have no effect.\n- If the activity is running and finishes successfully, the activity will be completed.\n- If the activity is running and finishes with failure:\n * if there is no retry left - the activity will be completed.\n * if there are more retries left - the activity will be paused.\nFor long-running activities:\n- activities in paused state will send a cancellation with \"activity_paused\" set to 'true' in response to 'RecordActivityTaskHeartbeat'.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID", + "operationId": "PauseActivityExecution4", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1RespondActivityTaskCanceledByIdResponse" + "$ref": "#/definitions/v1PauseActivityExecutionResponse" } }, "default": { @@ -4491,21 +4697,21 @@ "parameters": [ { "name": "namespace", - "description": "Namespace of the workflow which scheduled this activity", + "description": "Namespace of the workflow which scheduled this activity.", "in": "path", "required": true, "type": "string" }, { "name": "workflowId", - "description": "Id of the workflow which scheduled this activity, leave empty to target a standalone activity", + "description": "If provided, pause a workflow activity (or activities) for the given workflow ID.\nIf empty, targets a standalone activity.", "in": "path", "required": true, "type": "string" }, { "name": "activityId", - "description": "Id of the activity to confirm is cancelled", + "description": "The ID of the activity to target.", "in": "path", "required": true, "type": "string" @@ -4515,7 +4721,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WorkflowServiceRespondActivityTaskCanceledByIdBody" + "$ref": "#/definitions/WorkflowServicePauseActivityExecutionBody" } } ], @@ -4524,15 +4730,16 @@ ] } }, - "/api/v1/namespaces/{namespace}/workflows/{workflowId}/pause": { + "/api/v1/namespaces/{namespace}/workflows/{workflowId}/activities/{activityId}/reset": { "post": { - "summary": "Note: This is an experimental API and the behavior may change in a future release.\nPauseWorkflowExecution pauses the workflow execution specified in the request. Pausing a workflow execution results in\n- The workflow execution status changes to `PAUSED` and a new WORKFLOW_EXECUTION_PAUSED event is added to the history\n- No new workflow tasks or activity tasks are dispatched.\n - Any workflow task currently executing on the worker will be allowed to complete.\n - Any activity task currently executing will be paused.\n- All server-side events will continue to be processed by the server.\n- Queries & Updates on a paused workflow will be rejected.", - "operationId": "PauseWorkflowExecution2", + "summary": "ResetActivityExecution resets the execution of an activity specified by its ID.\nThis API can be used to target a workflow activity or a standalone activity.", + "description": "Resetting an activity means:\n* number of attempts will be reset to 0.\n* activity timeouts will be reset.\n* if the activity is waiting for retry, and it is not paused or 'keep_paused' is not provided:\n it will be scheduled immediately (* see 'jitter' flag)\n\nReturns a `NotFound` error if there is no pending activity with the provided ID or type.", + "operationId": "ResetActivityExecution4", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1PauseWorkflowExecutionResponse" + "$ref": "#/definitions/v1ResetActivityExecutionResponse" } }, "default": { @@ -4545,14 +4752,21 @@ "parameters": [ { "name": "namespace", - "description": "Namespace of the workflow to pause.", + "description": "Namespace of the workflow which scheduled this activity.", "in": "path", "required": true, "type": "string" }, { "name": "workflowId", - "description": "ID of the workflow execution to be paused. Required.", + "description": "If provided, targets a workflow activity for the given workflow ID.\nIf empty, targets a standalone activity.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "activityId", + "description": "The ID of the activity to target.", "in": "path", "required": true, "type": "string" @@ -4562,7 +4776,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WorkflowServicePauseWorkflowExecutionBody" + "$ref": "#/definitions/WorkflowServiceResetActivityExecutionBody" } } ], @@ -4571,16 +4785,15 @@ ] } }, - "/api/v1/namespaces/{namespace}/workflows/{workflowId}/signal-with-start/{signalName}": { + "/api/v1/namespaces/{namespace}/workflows/{workflowId}/activities/{activityId}/resolve-as-canceled": { "post": { - "summary": "SignalWithStartWorkflowExecution is used to ensure a signal is sent to a workflow, even if\nit isn't yet started.", - "description": "If the workflow is running, a `WORKFLOW_EXECUTION_SIGNALED` event is recorded in the history\nand a workflow task is generated.\n\nIf the workflow is not running or not found, then the workflow is created with\n`WORKFLOW_EXECUTION_STARTED` and `WORKFLOW_EXECUTION_SIGNALED` events in its history, and a\nworkflow task is generated.", - "operationId": "SignalWithStartWorkflowExecution2", + "summary": "See `RespondActivityTaskCanceled`. This version allows clients to record failures by\nnamespace/workflow id/activity id instead of task token.", + "operationId": "RespondActivityTaskCanceledById4", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1SignalWithStartWorkflowExecutionResponse" + "$ref": "#/definitions/v1RespondActivityTaskCanceledByIdResponse" } }, "default": { @@ -4593,19 +4806,21 @@ "parameters": [ { "name": "namespace", + "description": "Namespace of the workflow which scheduled this activity", "in": "path", "required": true, "type": "string" }, { "name": "workflowId", + "description": "Id of the workflow which scheduled this activity, leave empty to target a standalone activity", "in": "path", "required": true, "type": "string" }, { - "name": "signalName", - "description": "The workflow author-defined name of the signal to send to the workflow", + "name": "activityId", + "description": "Id of the activity to confirm is cancelled", "in": "path", "required": true, "type": "string" @@ -4615,7 +4830,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WorkflowServiceSignalWithStartWorkflowExecutionBody" + "$ref": "#/definitions/WorkflowServiceRespondActivityTaskCanceledByIdBody" } } ], @@ -4624,15 +4839,16 @@ ] } }, - "/api/v1/namespaces/{namespace}/workflows/{workflowId}/unpause": { + "/api/v1/namespaces/{namespace}/workflows/{workflowId}/activities/{activityId}/unpause": { "post": { - "summary": "Note: This is an experimental API and the behavior may change in a future release.\nUnpauseWorkflowExecution unpauses a previously paused workflow execution specified in the request.\nUnpausing a workflow execution results in\n- The workflow execution status changes to `RUNNING` and a new WORKFLOW_EXECUTION_UNPAUSED event is added to the history\n- Workflow tasks and activity tasks are resumed.", - "operationId": "UnpauseWorkflowExecution2", + "summary": "UnpauseActivityExecution unpauses the execution of an activity specified by its ID.\nThis API can be used to target a workflow activity or a standalone activity.", + "description": "If activity is not paused, this call will have no effect.\nIf the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag).\nOnce the activity is unpaused, all timeout timers will be regenerated.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID", + "operationId": "UnpauseActivityExecution4", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1UnpauseWorkflowExecutionResponse" + "$ref": "#/definitions/v1UnpauseActivityExecutionResponse" } }, "default": { @@ -4645,14 +4861,21 @@ "parameters": [ { "name": "namespace", - "description": "Namespace of the workflow to unpause.", + "description": "Namespace of the workflow which scheduled this activity.", "in": "path", "required": true, "type": "string" }, { "name": "workflowId", - "description": "ID of the workflow execution to be paused. Required.", + "description": "If provided, targets a workflow activity for the given workflow ID.\nIf empty, targets a standalone activity.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "activityId", + "description": "The ID of the activity to target.", "in": "path", "required": true, "type": "string" @@ -4662,7 +4885,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WorkflowServiceUnpauseWorkflowExecutionBody" + "$ref": "#/definitions/WorkflowServiceUnpauseActivityExecutionBody" } } ], @@ -4671,15 +4894,15 @@ ] } }, - "/api/v1/nexus/endpoints": { - "get": { - "summary": "List all Nexus endpoints for the cluster, sorted by ID in ascending order. Set page_token in the request to the\nnext_page_token field of the previous response to get the next page of results. An empty next_page_token\nindicates that there are no more results. During pagination, a newly added service with an ID lexicographically\nearlier than the previous page's last endpoint's ID may be missed.", - "operationId": "ListNexusEndpoints2", + "/api/v1/namespaces/{namespace}/workflows/{workflowId}/activities/{activityId}/update-options": { + "post": { + "summary": "UpdateActivityExecutionOptions is called by the client to update the options of an activity by its ID.\nThis API can be used to target a workflow activity or a standalone activity.", + "operationId": "UpdateActivityExecutionOptions4", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1ListNexusEndpointsResponse" + "$ref": "#/definitions/v1UpdateActivityExecutionOptionsResponse" } }, "default": { @@ -4691,23 +4914,224 @@ }, "parameters": [ { - "name": "pageSize", - "in": "query", - "required": false, - "type": "integer", - "format": "int32" + "name": "namespace", + "description": "Namespace of the workflow which scheduled this activity", + "in": "path", + "required": true, + "type": "string" }, { - "name": "nextPageToken", - "description": "To get the next page, pass in `ListNexusEndpointsResponse.next_page_token` from the previous page's\nresponse, the token will be empty if there's no other page.\nNote: the last page may be empty if the total number of endpoints registered is a multiple of the page size.", - "in": "query", - "required": false, - "type": "string", - "format": "byte" + "name": "workflowId", + "description": "If provided, targets a workflow activity for the given workflow ID.\nIf empty, targets a standalone activity.", + "in": "path", + "required": true, + "type": "string" }, { - "name": "name", - "description": "Name of the incoming endpoint to filter on - optional. Specifying this will result in zero or one results.", + "name": "activityId", + "description": "The ID of the activity to target.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WorkflowServiceUpdateActivityExecutionOptionsBody" + } + } + ], + "tags": [ + "WorkflowService" + ] + } + }, + "/api/v1/namespaces/{namespace}/workflows/{workflowId}/pause": { + "post": { + "summary": "Note: This is an experimental API and the behavior may change in a future release.\nPauseWorkflowExecution pauses the workflow execution specified in the request. Pausing a workflow execution results in\n- The workflow execution status changes to `PAUSED` and a new WORKFLOW_EXECUTION_PAUSED event is added to the history\n- No new workflow tasks or activity tasks are dispatched.\n - Any workflow task currently executing on the worker will be allowed to complete.\n - Any activity task currently executing will be paused.\n- All server-side events will continue to be processed by the server.\n- Queries & Updates on a paused workflow will be rejected.", + "operationId": "PauseWorkflowExecution2", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1PauseWorkflowExecutionResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "namespace", + "description": "Namespace of the workflow to pause.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "workflowId", + "description": "ID of the workflow execution to be paused. Required.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WorkflowServicePauseWorkflowExecutionBody" + } + } + ], + "tags": [ + "WorkflowService" + ] + } + }, + "/api/v1/namespaces/{namespace}/workflows/{workflowId}/signal-with-start/{signalName}": { + "post": { + "summary": "SignalWithStartWorkflowExecution is used to ensure a signal is sent to a workflow, even if\nit isn't yet started.", + "description": "If the workflow is running, a `WORKFLOW_EXECUTION_SIGNALED` event is recorded in the history\nand a workflow task is generated.\n\nIf the workflow is not running or not found, then the workflow is created with\n`WORKFLOW_EXECUTION_STARTED` and `WORKFLOW_EXECUTION_SIGNALED` events in its history, and a\nworkflow task is generated.", + "operationId": "SignalWithStartWorkflowExecution2", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1SignalWithStartWorkflowExecutionResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "namespace", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "workflowId", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "signalName", + "description": "The workflow author-defined name of the signal to send to the workflow", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WorkflowServiceSignalWithStartWorkflowExecutionBody" + } + } + ], + "tags": [ + "WorkflowService" + ] + } + }, + "/api/v1/namespaces/{namespace}/workflows/{workflowId}/unpause": { + "post": { + "summary": "Note: This is an experimental API and the behavior may change in a future release.\nUnpauseWorkflowExecution unpauses a previously paused workflow execution specified in the request.\nUnpausing a workflow execution results in\n- The workflow execution status changes to `RUNNING` and a new WORKFLOW_EXECUTION_UNPAUSED event is added to the history\n- Workflow tasks and activity tasks are resumed.", + "operationId": "UnpauseWorkflowExecution2", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1UnpauseWorkflowExecutionResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "namespace", + "description": "Namespace of the workflow to unpause.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "workflowId", + "description": "ID of the workflow execution to be paused. Required.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WorkflowServiceUnpauseWorkflowExecutionBody" + } + } + ], + "tags": [ + "WorkflowService" + ] + } + }, + "/api/v1/nexus/endpoints": { + "get": { + "summary": "List all Nexus endpoints for the cluster, sorted by ID in ascending order. Set page_token in the request to the\nnext_page_token field of the previous response to get the next page of results. An empty next_page_token\nindicates that there are no more results. During pagination, a newly added service with an ID lexicographically\nearlier than the previous page's last endpoint's ID may be missed.", + "operationId": "ListNexusEndpoints2", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ListNexusEndpointsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "pageSize", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "nextPageToken", + "description": "To get the next page, pass in `ListNexusEndpointsResponse.next_page_token` from the previous page's\nresponse, the token will be empty if there's no other page.\nNote: the last page may be empty if the total number of endpoints registered is a multiple of the page size.", + "in": "query", + "required": false, + "type": "string", + "format": "byte" + }, + { + "name": "name", + "description": "Name of the incoming endpoint to filter on - optional. Specifying this will result in zero or one results.", "in": "query", "required": false, "type": "string" @@ -5013,6 +5437,13 @@ "in": "query", "required": false, "type": "string" + }, + { + "name": "weakConsistency", + "description": "If true, the server may serve the response from an eventually-consistent\nsource instead of reading through to persistence. Defaults to false,\nwhich preserves read-after-write consistency. SDKs should set this when\nfetching namespace capabilities on worker/client startup.", + "in": "query", + "required": false, + "type": "boolean" } ], "tags": [ @@ -5754,7 +6185,194 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1RecordActivityTaskHeartbeatByIdResponse" + "$ref": "#/definitions/v1RecordActivityTaskHeartbeatByIdResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "namespace", + "description": "Namespace of the workflow which scheduled this activity", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "activityId", + "description": "Id of the activity we're heartbeating", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WorkflowServiceRecordActivityTaskHeartbeatByIdBody" + } + } + ], + "tags": [ + "WorkflowService" + ] + } + }, + "/namespaces/{namespace}/activities/{activityId}/outcome": { + "get": { + "summary": "PollActivityExecution long-polls for an activity execution to complete and returns the\noutcome (result or failure).", + "operationId": "PollActivityExecution", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1PollActivityExecutionResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "namespace", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "activityId", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "runId", + "description": "Activity run ID. If empty the request targets the latest run.", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "WorkflowService" + ] + } + }, + "/namespaces/{namespace}/activities/{activityId}/pause": { + "post": { + "summary": "PauseActivityExecution pauses the execution of an activity specified by its ID.\nThis API can be used to target a workflow activity or a standalone activity", + "description": "Pausing an activity means:\n- If the activity is currently waiting for a retry or is running and subsequently fails,\n it will not be rescheduled until it is unpaused.\n- If the activity is already paused, calling this method will have no effect.\n- If the activity is running and finishes successfully, the activity will be completed.\n- If the activity is running and finishes with failure:\n * if there is no retry left - the activity will be completed.\n * if there are more retries left - the activity will be paused.\nFor long-running activities:\n- activities in paused state will send a cancellation with \"activity_paused\" set to 'true' in response to 'RecordActivityTaskHeartbeat'.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID", + "operationId": "PauseActivityExecution", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1PauseActivityExecutionResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "namespace", + "description": "Namespace of the workflow which scheduled this activity.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "activityId", + "description": "The ID of the activity to target.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WorkflowServicePauseActivityExecutionBody" + } + } + ], + "tags": [ + "WorkflowService" + ] + } + }, + "/namespaces/{namespace}/activities/{activityId}/reset": { + "post": { + "summary": "ResetActivityExecution resets the execution of an activity specified by its ID.\nThis API can be used to target a workflow activity or a standalone activity.", + "description": "Resetting an activity means:\n* number of attempts will be reset to 0.\n* activity timeouts will be reset.\n* if the activity is waiting for retry, and it is not paused or 'keep_paused' is not provided:\n it will be scheduled immediately (* see 'jitter' flag)\n\nReturns a `NotFound` error if there is no pending activity with the provided ID or type.", + "operationId": "ResetActivityExecution", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ResetActivityExecutionResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "namespace", + "description": "Namespace of the workflow which scheduled this activity.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "activityId", + "description": "The ID of the activity to target.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WorkflowServiceResetActivityExecutionBody" + } + } + ], + "tags": [ + "WorkflowService" + ] + } + }, + "/namespaces/{namespace}/activities/{activityId}/resolve-as-canceled": { + "post": { + "summary": "See `RespondActivityTaskCanceled`. This version allows clients to record failures by\nnamespace/workflow id/activity id instead of task token.", + "operationId": "RespondActivityTaskCanceledById", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1RespondActivityTaskCanceledByIdResponse" } }, "default": { @@ -5774,7 +6392,7 @@ }, { "name": "activityId", - "description": "Id of the activity we're heartbeating", + "description": "Id of the activity to confirm is cancelled", "in": "path", "required": true, "type": "string" @@ -5784,7 +6402,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WorkflowServiceRecordActivityTaskHeartbeatByIdBody" + "$ref": "#/definitions/WorkflowServiceRespondActivityTaskCanceledByIdBody" } } ], @@ -5793,15 +6411,16 @@ ] } }, - "/namespaces/{namespace}/activities/{activityId}/outcome": { - "get": { - "summary": "PollActivityExecution long-polls for an activity execution to complete and returns the\noutcome (result or failure).", - "operationId": "PollActivityExecution", + "/namespaces/{namespace}/activities/{activityId}/terminate": { + "post": { + "summary": "TerminateActivityExecution terminates an existing activity execution immediately.", + "description": "Termination does not reach the worker and the activity code cannot react to it. A terminated activity may have a\nrunning attempt.", + "operationId": "TerminateActivityExecution", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1PollActivityExecutionResponse" + "$ref": "#/definitions/v1TerminateActivityExecutionResponse" } }, "default": { @@ -5825,11 +6444,12 @@ "type": "string" }, { - "name": "runId", - "description": "Activity run ID. If empty the request targets the latest run.", - "in": "query", - "required": false, - "type": "string" + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WorkflowServiceTerminateActivityExecutionBody" + } } ], "tags": [ @@ -5837,15 +6457,16 @@ ] } }, - "/namespaces/{namespace}/activities/{activityId}/resolve-as-canceled": { + "/namespaces/{namespace}/activities/{activityId}/unpause": { "post": { - "summary": "See `RespondActivityTaskCanceled`. This version allows clients to record failures by\nnamespace/workflow id/activity id instead of task token.", - "operationId": "RespondActivityTaskCanceledById", + "summary": "UnpauseActivityExecution unpauses the execution of an activity specified by its ID.\nThis API can be used to target a workflow activity or a standalone activity.", + "description": "If activity is not paused, this call will have no effect.\nIf the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag).\nOnce the activity is unpaused, all timeout timers will be regenerated.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID", + "operationId": "UnpauseActivityExecution", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1RespondActivityTaskCanceledByIdResponse" + "$ref": "#/definitions/v1UnpauseActivityExecutionResponse" } }, "default": { @@ -5858,14 +6479,14 @@ "parameters": [ { "name": "namespace", - "description": "Namespace of the workflow which scheduled this activity", + "description": "Namespace of the workflow which scheduled this activity.", "in": "path", "required": true, "type": "string" }, { "name": "activityId", - "description": "Id of the activity to confirm is cancelled", + "description": "The ID of the activity to target.", "in": "path", "required": true, "type": "string" @@ -5875,7 +6496,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WorkflowServiceRespondActivityTaskCanceledByIdBody" + "$ref": "#/definitions/WorkflowServiceUnpauseActivityExecutionBody" } } ], @@ -5884,16 +6505,15 @@ ] } }, - "/namespaces/{namespace}/activities/{activityId}/terminate": { + "/namespaces/{namespace}/activities/{activityId}/update-options": { "post": { - "summary": "TerminateActivityExecution terminates an existing activity execution immediately.", - "description": "Termination does not reach the worker and the activity code cannot react to it. A terminated activity may have a\nrunning attempt.", - "operationId": "TerminateActivityExecution", + "summary": "UpdateActivityExecutionOptions is called by the client to update the options of an activity by its ID.\nThis API can be used to target a workflow activity or a standalone activity.", + "operationId": "UpdateActivityExecutionOptions", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1TerminateActivityExecutionResponse" + "$ref": "#/definitions/v1UpdateActivityExecutionOptionsResponse" } }, "default": { @@ -5906,12 +6526,14 @@ "parameters": [ { "name": "namespace", + "description": "Namespace of the workflow which scheduled this activity", "in": "path", "required": true, "type": "string" }, { "name": "activityId", + "description": "The ID of the activity to target.", "in": "path", "required": true, "type": "string" @@ -5921,7 +6543,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WorkflowServiceTerminateActivityExecutionBody" + "$ref": "#/definitions/WorkflowServiceUpdateActivityExecutionOptionsBody" } } ], @@ -8341,6 +8963,13 @@ "in": "query", "required": false, "type": "string" + }, + { + "name": "includeSystemWorkers", + "description": "When true, the response will include system workers that are created implicitly\nby the server and not by the user. By default, system workers are excluded.", + "in": "query", + "required": false, + "type": "boolean" } ], "tags": [ @@ -9361,13 +9990,231 @@ }, "/namespaces/{namespace}/workflows/{workflowId}/activities/{activityId}/complete": { "post": { - "summary": "See `RespondActivityTaskCompleted`. This version allows clients to record completions by\nnamespace/workflow id/activity id instead of task token.", - "operationId": "RespondActivityTaskCompletedById3", + "summary": "See `RespondActivityTaskCompleted`. This version allows clients to record completions by\nnamespace/workflow id/activity id instead of task token.", + "operationId": "RespondActivityTaskCompletedById3", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1RespondActivityTaskCompletedByIdResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "namespace", + "description": "Namespace of the workflow which scheduled this activity", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "workflowId", + "description": "Id of the workflow which scheduled this activity, leave empty to target a standalone activity", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "activityId", + "description": "Id of the activity to complete", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WorkflowServiceRespondActivityTaskCompletedByIdBody" + } + } + ], + "tags": [ + "WorkflowService" + ] + } + }, + "/namespaces/{namespace}/workflows/{workflowId}/activities/{activityId}/fail": { + "post": { + "summary": "See `RecordActivityTaskFailed`. This version allows clients to record failures by\nnamespace/workflow id/activity id instead of task token.", + "operationId": "RespondActivityTaskFailedById3", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1RespondActivityTaskFailedByIdResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "namespace", + "description": "Namespace of the workflow which scheduled this activity", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "workflowId", + "description": "Id of the workflow which scheduled this activity, leave empty to target a standalone activity", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "activityId", + "description": "Id of the activity to fail", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WorkflowServiceRespondActivityTaskFailedByIdBody" + } + } + ], + "tags": [ + "WorkflowService" + ] + } + }, + "/namespaces/{namespace}/workflows/{workflowId}/activities/{activityId}/heartbeat": { + "post": { + "summary": "See `RecordActivityTaskHeartbeat`. This version allows clients to record heartbeats by\nnamespace/workflow id/activity id instead of task token.", + "operationId": "RecordActivityTaskHeartbeatById3", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1RecordActivityTaskHeartbeatByIdResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "namespace", + "description": "Namespace of the workflow which scheduled this activity", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "workflowId", + "description": "Id of the workflow which scheduled this activity, leave empty to target a standalone activity", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "activityId", + "description": "Id of the activity we're heartbeating", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WorkflowServiceRecordActivityTaskHeartbeatByIdBody" + } + } + ], + "tags": [ + "WorkflowService" + ] + } + }, + "/namespaces/{namespace}/workflows/{workflowId}/activities/{activityId}/pause": { + "post": { + "summary": "PauseActivityExecution pauses the execution of an activity specified by its ID.\nThis API can be used to target a workflow activity or a standalone activity", + "description": "Pausing an activity means:\n- If the activity is currently waiting for a retry or is running and subsequently fails,\n it will not be rescheduled until it is unpaused.\n- If the activity is already paused, calling this method will have no effect.\n- If the activity is running and finishes successfully, the activity will be completed.\n- If the activity is running and finishes with failure:\n * if there is no retry left - the activity will be completed.\n * if there are more retries left - the activity will be paused.\nFor long-running activities:\n- activities in paused state will send a cancellation with \"activity_paused\" set to 'true' in response to 'RecordActivityTaskHeartbeat'.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID", + "operationId": "PauseActivityExecution3", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1PauseActivityExecutionResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "namespace", + "description": "Namespace of the workflow which scheduled this activity.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "workflowId", + "description": "If provided, pause a workflow activity (or activities) for the given workflow ID.\nIf empty, targets a standalone activity.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "activityId", + "description": "The ID of the activity to target.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/WorkflowServicePauseActivityExecutionBody" + } + } + ], + "tags": [ + "WorkflowService" + ] + } + }, + "/namespaces/{namespace}/workflows/{workflowId}/activities/{activityId}/reset": { + "post": { + "summary": "ResetActivityExecution resets the execution of an activity specified by its ID.\nThis API can be used to target a workflow activity or a standalone activity.", + "description": "Resetting an activity means:\n* number of attempts will be reset to 0.\n* activity timeouts will be reset.\n* if the activity is waiting for retry, and it is not paused or 'keep_paused' is not provided:\n it will be scheduled immediately (* see 'jitter' flag)\n\nReturns a `NotFound` error if there is no pending activity with the provided ID or type.", + "operationId": "ResetActivityExecution3", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1RespondActivityTaskCompletedByIdResponse" + "$ref": "#/definitions/v1ResetActivityExecutionResponse" } }, "default": { @@ -9380,21 +10227,21 @@ "parameters": [ { "name": "namespace", - "description": "Namespace of the workflow which scheduled this activity", + "description": "Namespace of the workflow which scheduled this activity.", "in": "path", "required": true, "type": "string" }, { "name": "workflowId", - "description": "Id of the workflow which scheduled this activity, leave empty to target a standalone activity", + "description": "If provided, targets a workflow activity for the given workflow ID.\nIf empty, targets a standalone activity.", "in": "path", "required": true, "type": "string" }, { "name": "activityId", - "description": "Id of the activity to complete", + "description": "The ID of the activity to target.", "in": "path", "required": true, "type": "string" @@ -9404,7 +10251,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WorkflowServiceRespondActivityTaskCompletedByIdBody" + "$ref": "#/definitions/WorkflowServiceResetActivityExecutionBody" } } ], @@ -9413,15 +10260,15 @@ ] } }, - "/namespaces/{namespace}/workflows/{workflowId}/activities/{activityId}/fail": { + "/namespaces/{namespace}/workflows/{workflowId}/activities/{activityId}/resolve-as-canceled": { "post": { - "summary": "See `RecordActivityTaskFailed`. This version allows clients to record failures by\nnamespace/workflow id/activity id instead of task token.", - "operationId": "RespondActivityTaskFailedById3", + "summary": "See `RespondActivityTaskCanceled`. This version allows clients to record failures by\nnamespace/workflow id/activity id instead of task token.", + "operationId": "RespondActivityTaskCanceledById3", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1RespondActivityTaskFailedByIdResponse" + "$ref": "#/definitions/v1RespondActivityTaskCanceledByIdResponse" } }, "default": { @@ -9448,7 +10295,7 @@ }, { "name": "activityId", - "description": "Id of the activity to fail", + "description": "Id of the activity to confirm is cancelled", "in": "path", "required": true, "type": "string" @@ -9458,7 +10305,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WorkflowServiceRespondActivityTaskFailedByIdBody" + "$ref": "#/definitions/WorkflowServiceRespondActivityTaskCanceledByIdBody" } } ], @@ -9467,15 +10314,16 @@ ] } }, - "/namespaces/{namespace}/workflows/{workflowId}/activities/{activityId}/heartbeat": { + "/namespaces/{namespace}/workflows/{workflowId}/activities/{activityId}/unpause": { "post": { - "summary": "See `RecordActivityTaskHeartbeat`. This version allows clients to record heartbeats by\nnamespace/workflow id/activity id instead of task token.", - "operationId": "RecordActivityTaskHeartbeatById3", + "summary": "UnpauseActivityExecution unpauses the execution of an activity specified by its ID.\nThis API can be used to target a workflow activity or a standalone activity.", + "description": "If activity is not paused, this call will have no effect.\nIf the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag).\nOnce the activity is unpaused, all timeout timers will be regenerated.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID", + "operationId": "UnpauseActivityExecution3", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1RecordActivityTaskHeartbeatByIdResponse" + "$ref": "#/definitions/v1UnpauseActivityExecutionResponse" } }, "default": { @@ -9488,21 +10336,21 @@ "parameters": [ { "name": "namespace", - "description": "Namespace of the workflow which scheduled this activity", + "description": "Namespace of the workflow which scheduled this activity.", "in": "path", "required": true, "type": "string" }, { "name": "workflowId", - "description": "Id of the workflow which scheduled this activity, leave empty to target a standalone activity", + "description": "If provided, targets a workflow activity for the given workflow ID.\nIf empty, targets a standalone activity.", "in": "path", "required": true, "type": "string" }, { "name": "activityId", - "description": "Id of the activity we're heartbeating", + "description": "The ID of the activity to target.", "in": "path", "required": true, "type": "string" @@ -9512,7 +10360,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WorkflowServiceRecordActivityTaskHeartbeatByIdBody" + "$ref": "#/definitions/WorkflowServiceUnpauseActivityExecutionBody" } } ], @@ -9521,15 +10369,15 @@ ] } }, - "/namespaces/{namespace}/workflows/{workflowId}/activities/{activityId}/resolve-as-canceled": { + "/namespaces/{namespace}/workflows/{workflowId}/activities/{activityId}/update-options": { "post": { - "summary": "See `RespondActivityTaskCanceled`. This version allows clients to record failures by\nnamespace/workflow id/activity id instead of task token.", - "operationId": "RespondActivityTaskCanceledById3", + "summary": "UpdateActivityExecutionOptions is called by the client to update the options of an activity by its ID.\nThis API can be used to target a workflow activity or a standalone activity.", + "operationId": "UpdateActivityExecutionOptions3", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1RespondActivityTaskCanceledByIdResponse" + "$ref": "#/definitions/v1UpdateActivityExecutionOptionsResponse" } }, "default": { @@ -9549,14 +10397,14 @@ }, { "name": "workflowId", - "description": "Id of the workflow which scheduled this activity, leave empty to target a standalone activity", + "description": "If provided, targets a workflow activity for the given workflow ID.\nIf empty, targets a standalone activity.", "in": "path", "required": true, "type": "string" }, { "name": "activityId", - "description": "Id of the activity to confirm is cancelled", + "description": "The ID of the activity to target.", "in": "path", "required": true, "type": "string" @@ -9566,7 +10414,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/WorkflowServiceRespondActivityTaskCanceledByIdBody" + "$ref": "#/definitions/WorkflowServiceUpdateActivityExecutionOptionsBody" } } ], @@ -9751,6 +10599,15 @@ "type": "object", "description": "Trigger for when the activity is closed." }, + "CallbackInfoUpdateWorkflowExecutionCompleted": { + "type": "object", + "properties": { + "updateId": { + "type": "string" + } + }, + "description": "Trigger for when a workflow update is completed." + }, "CallbackInfoWorkflowClosed": { "type": "object", "description": "Trigger for when the workflow is closed." @@ -9897,6 +10754,24 @@ }, "description": "A link to a standalone Nexus operation." }, + "LinkWorkflow": { + "type": "object", + "properties": { + "namespace": { + "type": "string" + }, + "workflowId": { + "type": "string" + }, + "runId": { + "type": "string" + }, + "reason": { + "type": "string" + } + }, + "description": "A link to a workflow execution. This is a more general version of WorkflowEvent that doesn't specify a \nparticular event within the workflow, useful when you want to link to a workflow but there is no particular event to link to,\nsuch as a Query or a Rejected Update." + }, "LinkWorkflowEvent": { "type": "object", "properties": { @@ -10234,6 +11109,27 @@ }, "description": "RequestIdReference is a indirect reference to a history event through the request ID." }, + "WorkflowExecutionOptionsUpdatedEventAttributesWorkflowUpdateOptionsUpdate": { + "type": "object", + "properties": { + "updateId": { + "type": "string", + "description": "The ID of the workflow update this update options update corresponds to." + }, + "attachedRequestId": { + "type": "string", + "title": "Request ID attached to the running workflow update so that subsequent requests with same\nrequest ID will be deduped" + }, + "attachedCompletionCallbacks": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1Callback" + }, + "description": "Completion callbacks attached to the running workflow update." + } + } + }, "WorkflowRuleActionActionActivityPause": { "type": "object" }, @@ -10402,6 +11298,36 @@ "reason": { "type": "string", "description": "Reason to pause the activity." + }, + "requestId": { + "type": "string", + "description": "Used to de-dupe pause requests." + } + }, + "description": "Deprecated. Use `PauseActivityExecutionRequest`." + }, + "WorkflowServicePauseActivityExecutionBody": { + "type": "object", + "properties": { + "runId": { + "type": "string", + "description": "Run ID of the workflow or standalone activity." + }, + "identity": { + "type": "string", + "description": "The identity of the client who initiated this request." + }, + "reason": { + "type": "string", + "description": "Reason to pause the activity." + }, + "resourceId": { + "type": "string", + "description": "Resource ID for routing. Contains \"workflow:{workflow_id}\" for workflow activities or \"activity:{activity_id}\" for standalone activities." + }, + "requestId": { + "type": "string", + "description": "Used to de-dupe pause requests." } } }, @@ -10639,10 +11565,43 @@ }, "restoreOriginalOptions": { "type": "boolean", - "description": "If set, the activity options will be restored to the defaults.\nDefault options are then options activity was created with.\nThey are part of the first SCHEDULE event." + "description": "If set, the activity options will be restored to the defaults.\nDefault options are then options activity was created with.\nThey are part of the first schedule event." } }, - "title": "NOTE: keep in sync with temporal.api.batch.v1.BatchOperationResetActivities" + "description": "NOTE: keep in sync with temporal.api.batch.v1.BatchOperationResetActivities\nDeprecated. Use `ResetActivityExecutionRequest`." + }, + "WorkflowServiceResetActivityExecutionBody": { + "type": "object", + "properties": { + "runId": { + "type": "string", + "description": "Run ID of the workflow or standalone activity." + }, + "identity": { + "type": "string", + "description": "The identity of the client who initiated this request." + }, + "resetHeartbeat": { + "type": "boolean", + "description": "Indicates that activity should reset heartbeat details.\nThis flag will be applied only to the new instance of the activity." + }, + "keepPaused": { + "type": "boolean", + "title": "If activity is paused, it will remain paused after reset" + }, + "jitter": { + "type": "string", + "title": "If set, and activity is in backoff, the activity will start at a random time within the specified jitter duration.\n(unless it is paused and keep_paused is set)" + }, + "restoreOriginalOptions": { + "type": "boolean", + "description": "If set, the activity options will be restored to the defaults.\nDefault options are then options activity was created with.\nThey are part of the first schedule event." + }, + "resourceId": { + "type": "string", + "description": "Resource ID for routing. Contains \"workflow:{workflow_id}\" for workflow activities or \"activity:{activity_id}\" for standalone activities." + } + } }, "WorkflowServiceResetWorkflowExecutionBody": { "type": "object", @@ -11601,6 +12560,40 @@ "type": "string", "description": "If set, the activity will start at a random time within the specified jitter duration." } + }, + "description": "Deprecated. Use `UnpauseActivityExecutionRequest`." + }, + "WorkflowServiceUnpauseActivityExecutionBody": { + "type": "object", + "properties": { + "runId": { + "type": "string", + "description": "Run ID of the workflow or standalone activity." + }, + "identity": { + "type": "string", + "description": "The identity of the client who initiated this request." + }, + "resetAttempts": { + "type": "boolean", + "description": "Providing this flag will also reset the number of attempts." + }, + "resetHeartbeat": { + "type": "boolean", + "description": "Providing this flag will also reset the heartbeat details." + }, + "reason": { + "type": "string", + "description": "Reason to unpause the activity." + }, + "jitter": { + "type": "string", + "description": "If set, the activity will start at a random time within the specified jitter duration." + }, + "resourceId": { + "type": "string", + "description": "Resource ID for routing. Contains \"workflow:{workflow_id}\" for workflow activities or \"activity:{activity_id}\" for standalone activities." + } } }, "WorkflowServiceUnpauseWorkflowExecutionBody": { @@ -11624,6 +12617,35 @@ } } }, + "WorkflowServiceUpdateActivityExecutionOptionsBody": { + "type": "object", + "properties": { + "runId": { + "type": "string", + "description": "Run ID of the workflow or standalone activity." + }, + "identity": { + "type": "string", + "title": "The identity of the client who initiated this request" + }, + "activityOptions": { + "$ref": "#/definitions/v1ActivityOptions", + "title": "Activity options. Partial updates are accepted and controlled by update_mask" + }, + "updateMask": { + "type": "string", + "title": "Controls which fields from `activity_options` will be applied" + }, + "restoreOriginal": { + "type": "boolean", + "description": "If set, the activity options will be restored to the default.\nDefault options are then options activity was created with.\nThey are part of the first schedule event.\nThis flag cannot be combined with any other option; if you supply\nrestore_original together with other options, the request will be rejected." + }, + "resourceId": { + "type": "string", + "description": "Resource ID for routing. Contains \"workflow:{workflow_id}\" for workflow activities or \"activity:{activity_id}\" for standalone activities." + } + } + }, "WorkflowServiceUpdateActivityOptionsBody": { "type": "object", "properties": { @@ -11657,10 +12679,10 @@ }, "restoreOriginal": { "type": "boolean", - "description": "If set, the activity options will be restored to the default.\nDefault options are then options activity was created with.\nThey are part of the first SCHEDULE event.\nThis flag cannot be combined with any other option; if you supply\nrestore_original together with other options, the request will be rejected." + "description": "If set, the activity options will be restored to the default.\nDefault options are then options activity was created with.\nThey are part of the first schedule event.\nThis flag cannot be combined with any other option; if you supply\nrestore_original together with other options, the request will be rejected." } }, - "title": "NOTE: keep in sync with temporal.api.batch.v1.BatchOperationUpdateActivityOptions" + "description": "NOTE: keep in sync with temporal.api.batch.v1.BatchOperationUpdateActivityOptions\nDeprecated. Use `UpdateActivityExecutionOptionsRequest`." }, "WorkflowServiceUpdateNamespaceBody": { "type": "object", @@ -11883,6 +12905,26 @@ "description": "The arguments to pass to the named Update handler." } } + }, + "requestId": { + "type": "string", + "description": "The request ID of the request." + }, + "completionCallbacks": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1Callback" + }, + "description": "Callbacks to be called by the server when this update reaches a terminal state." + }, + "links": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/apiCommonV1Link" + }, + "description": "Links to be associated with this update." } }, "description": "The request information that will be delivered all the way down to the\nWorkflow Execution." @@ -12078,6 +13120,9 @@ "properties": { "workflowClosed": { "$ref": "#/definitions/CallbackInfoWorkflowClosed" + }, + "updateWorkflowExecutionCompleted": { + "$ref": "#/definitions/CallbackInfoUpdateWorkflowExecutionCompleted" } } }, @@ -12277,6 +13322,14 @@ "type": "string", "format": "int64", "description": "Total number of heartbeats recorded across all attempts of this activity, including retries." + }, + "sdkName": { + "type": "string", + "description": "The name of the SDK of the worker that most recently picked up an attempt of this activity.\nOverwritten on each new attempt. Empty if unknown." + }, + "sdkVersion": { + "type": "string", + "description": "The version of the SDK of the worker that most recently picked up an attempt of this activity.\nOverwritten on each new attempt. Empty if unknown." } }, "description": "Information about a standalone activity." @@ -15018,6 +16071,9 @@ }, "nexusOperation": { "$ref": "#/definitions/LinkNexusOperation" + }, + "workflow": { + "$ref": "#/definitions/LinkWorkflow" } }, "description": "Link can be associated with history events. It might contain information about an external entity\nrelated to the history event. For example, workflow A makes a Nexus call that starts workflow B:\nin this case, a history event in workflow A could contain a Link to the workflow started event in\nworkflow B, and vice-versa." @@ -15476,6 +16532,18 @@ "pollerAutoscaling": { "type": "boolean", "title": "True if the namespace supports poller autoscaling" + }, + "workerCommands": { + "type": "boolean", + "description": "True if the namespace supports worker commands (server-to-worker communication via control queues)." + }, + "standaloneNexusOperation": { + "type": "boolean", + "description": "True if the namespace supports standalone Nexus operations." + }, + "workflowUpdateCallbacks": { + "type": "boolean", + "title": "True if the namespace supports attaching callbacks on workflow updates" } }, "description": "Namespace capability details. Should contain what features are enabled in a namespace." @@ -16184,9 +17252,13 @@ "v1PatchScheduleResponse": { "type": "object" }, - "v1PauseActivityResponse": { + "v1PauseActivityExecutionResponse": { "type": "object" }, + "v1PauseActivityResponse": { + "type": "object", + "description": "Deprecated. Use `PauseActivityExecutionResponse`." + }, "v1PauseWorkflowExecutionResponse": { "type": "object", "description": "Response to a successful PauseWorkflowExecution request." @@ -16923,6 +17995,26 @@ }, "input": { "$ref": "#/definitions/v1Input" + }, + "requestId": { + "type": "string", + "description": "The request ID of the request." + }, + "completionCallbacks": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1Callback" + }, + "description": "Callbacks to be called by the server when this update reaches a terminal state." + }, + "links": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1Link" + }, + "description": "Links to be associated with this update." } }, "description": "The client request that triggers a Workflow Update." @@ -17019,9 +18111,13 @@ }, "description": "RequestIdInfo contains details of a request ID." }, - "v1ResetActivityResponse": { + "v1ResetActivityExecutionResponse": { "type": "object" }, + "v1ResetActivityResponse": { + "type": "object", + "description": "Deprecated. Use `ResetActivityExecutionRequest`." + }, "v1ResetOptions": { "type": "object", "properties": { @@ -17411,6 +18507,11 @@ "invalidScheduleError": { "type": "string", "description": "Deprecated." + }, + "stateSizeBytes": { + "type": "string", + "format": "int64", + "description": "Size of the schedule's internal state (including payloads) in bytes." } } }, @@ -17464,6 +18565,11 @@ "type": "string", "format": "date-time" } + }, + "stateSizeBytes": { + "type": "string", + "format": "int64", + "description": "Size of the schedule's internal state (including payloads) in bytes." } }, "description": "ScheduleListInfo is an abbreviated set of values from Schedule and ScheduleInfo\nthat's returned in ListSchedules." @@ -18498,14 +19604,18 @@ } } }, - "v1UnpauseActivityResponse": { + "v1UnpauseActivityExecutionResponse": { "type": "object" }, + "v1UnpauseActivityResponse": { + "type": "object", + "description": "Deprecated. Use `UnpauseActivityExecutionResponse`." + }, "v1UnpauseWorkflowExecutionResponse": { "type": "object", "description": "Response to a successful UnpauseWorkflowExecution request." }, - "v1UpdateActivityOptionsResponse": { + "v1UpdateActivityExecutionOptionsResponse": { "type": "object", "properties": { "activityOptions": { @@ -18514,6 +19624,16 @@ } } }, + "v1UpdateActivityOptionsResponse": { + "type": "object", + "properties": { + "activityOptions": { + "$ref": "#/definitions/v1ActivityOptions", + "title": "Activity options after an update" + } + }, + "description": "Deprecated. Use `UpdateActivityExecutionOptionsResponse`." + }, "v1UpdateAdmittedEventOrigin": { "type": "string", "enum": [ @@ -18672,6 +19792,10 @@ "stage": { "$ref": "#/definitions/v1UpdateWorkflowExecutionLifecycleStage", "description": "The most advanced lifecycle stage that the Update is known to have\nreached, where lifecycle stages are ordered\nUPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_UNSPECIFIED <\nUPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ADMITTED <\nUPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED <\nUPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED.\nUNSPECIFIED will be returned if and only if the server's maximum wait\ntime was reached before the Update reached the stage specified in the\nrequest WaitPolicy, and before the context deadline expired; clients may\nmay then retry the call as needed." + }, + "link": { + "$ref": "#/definitions/v1Link", + "description": "Link to the update event. May be null if the update has not yet been accepted." } } }, @@ -19694,6 +20818,14 @@ "timeSkippingConfig": { "$ref": "#/definitions/v1TimeSkippingConfig", "description": "If set, the time-skipping configuration was changed. Contains the full updated configuration." + }, + "workflowUpdateOptions": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/WorkflowExecutionOptionsUpdatedEventAttributesWorkflowUpdateOptionsUpdate" + }, + "description": "Updates to workflow updates options." } } }, diff --git a/crates/common/protos/api_upstream/openapi/openapiv3.yaml b/crates/common/protos/api_upstream/openapi/openapiv3.yaml index 50030712a..0899317ef 100644 --- a/crates/common/protos/api_upstream/openapi/openapiv3.yaml +++ b/crates/common/protos/api_upstream/openapi/openapiv3.yaml @@ -109,6 +109,15 @@ paths: in: query schema: type: string + - name: weakConsistency + in: query + description: |- + If true, the server may serve the response from an eventually-consistent + source instead of reading through to persistence. Defaults to false, + which preserves read-after-write consistency. SDKs should set this when + fetching namespace capabilities on worker/client startup. + schema: + type: boolean responses: "200": description: OK @@ -661,6 +670,107 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' + /api/v1/namespaces/{namespace}/activities/{activityId}/pause: + post: + tags: + - WorkflowService + description: |- + PauseActivityExecution pauses the execution of an activity specified by its ID. + This API can be used to target a workflow activity or a standalone activity + + Pausing an activity means: + - If the activity is currently waiting for a retry or is running and subsequently fails, + it will not be rescheduled until it is unpaused. + - If the activity is already paused, calling this method will have no effect. + - If the activity is running and finishes successfully, the activity will be completed. + - If the activity is running and finishes with failure: + * if there is no retry left - the activity will be completed. + * if there are more retries left - the activity will be paused. + For long-running activities: + - activities in paused state will send a cancellation with "activity_paused" set to 'true' in response to 'RecordActivityTaskHeartbeat'. + + Returns a `NotFound` error if there is no pending activity with the provided ID + operationId: PauseActivityExecution + parameters: + - name: namespace + in: path + description: Namespace of the workflow which scheduled this activity. + required: true + schema: + type: string + - name: activityId + in: path + description: The ID of the activity to target. + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PauseActivityExecutionRequest' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/PauseActivityExecutionResponse' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /api/v1/namespaces/{namespace}/activities/{activityId}/reset: + post: + tags: + - WorkflowService + description: |- + ResetActivityExecution resets the execution of an activity specified by its ID. + This API can be used to target a workflow activity or a standalone activity. + + Resetting an activity means: + * number of attempts will be reset to 0. + * activity timeouts will be reset. + * if the activity is waiting for retry, and it is not paused or 'keep_paused' is not provided: + it will be scheduled immediately (* see 'jitter' flag) + + Returns a `NotFound` error if there is no pending activity with the provided ID or type. + operationId: ResetActivityExecution + parameters: + - name: namespace + in: path + description: Namespace of the workflow which scheduled this activity. + required: true + schema: + type: string + - name: activityId + in: path + description: The ID of the activity to target. + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ResetActivityExecutionRequest' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ResetActivityExecutionResponse' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' /api/v1/namespaces/{namespace}/activities/{activityId}/resolve-as-canceled: post: tags: @@ -744,6 +854,92 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' + /api/v1/namespaces/{namespace}/activities/{activityId}/unpause: + post: + tags: + - WorkflowService + description: |- + UnpauseActivityExecution unpauses the execution of an activity specified by its ID. + This API can be used to target a workflow activity or a standalone activity. + + If activity is not paused, this call will have no effect. + If the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag). + Once the activity is unpaused, all timeout timers will be regenerated. + + Returns a `NotFound` error if there is no pending activity with the provided ID + operationId: UnpauseActivityExecution + parameters: + - name: namespace + in: path + description: Namespace of the workflow which scheduled this activity. + required: true + schema: + type: string + - name: activityId + in: path + description: The ID of the activity to target. + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UnpauseActivityExecutionRequest' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/UnpauseActivityExecutionResponse' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /api/v1/namespaces/{namespace}/activities/{activityId}/update-options: + post: + tags: + - WorkflowService + description: |- + UpdateActivityExecutionOptions is called by the client to update the options of an activity by its ID. + This API can be used to target a workflow activity or a standalone activity. + operationId: UpdateActivityExecutionOptions + parameters: + - name: namespace + in: path + description: Namespace of the workflow which scheduled this activity + required: true + schema: + type: string + - name: activityId + in: path + description: The ID of the activity to target. + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateActivityExecutionOptionsRequest' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateActivityExecutionOptionsResponse' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' /api/v1/namespaces/{namespace}/activity-complete: post: tags: @@ -2965,6 +3161,13 @@ paths: * Status schema: type: string + - name: includeSystemWorkers + in: query + description: |- + When true, the response will include system workers that are created implicitly + by the server and not by the user. By default, system workers are excluded. + schema: + type: boolean responses: "200": description: OK @@ -3739,33 +3942,45 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' - /api/v1/namespaces/{namespace}/workflows/{workflowId}/activities/{activityId}/resolve-as-canceled: + /api/v1/namespaces/{namespace}/workflows/{workflowId}/activities/{activityId}/pause: post: tags: - WorkflowService description: |- - See `RespondActivityTaskCanceled`. This version allows clients to record failures by - namespace/workflow id/activity id instead of task token. + PauseActivityExecution pauses the execution of an activity specified by its ID. + This API can be used to target a workflow activity or a standalone activity - (-- api-linter: core::0136::prepositions=disabled - aip.dev/not-precedent: "By" is used to indicate request type. --) - operationId: RespondActivityTaskCanceledById + Pausing an activity means: + - If the activity is currently waiting for a retry or is running and subsequently fails, + it will not be rescheduled until it is unpaused. + - If the activity is already paused, calling this method will have no effect. + - If the activity is running and finishes successfully, the activity will be completed. + - If the activity is running and finishes with failure: + * if there is no retry left - the activity will be completed. + * if there are more retries left - the activity will be paused. + For long-running activities: + - activities in paused state will send a cancellation with "activity_paused" set to 'true' in response to 'RecordActivityTaskHeartbeat'. + + Returns a `NotFound` error if there is no pending activity with the provided ID + operationId: PauseActivityExecution parameters: - name: namespace in: path - description: Namespace of the workflow which scheduled this activity + description: Namespace of the workflow which scheduled this activity. required: true schema: type: string - name: workflowId in: path - description: Id of the workflow which scheduled this activity, leave empty to target a standalone activity + description: |- + If provided, pause a workflow activity (or activities) for the given workflow ID. + If empty, targets a standalone activity. required: true schema: type: string - name: activityId in: path - description: Id of the activity to confirm is cancelled + description: The ID of the activity to target. required: true schema: type: string @@ -3773,7 +3988,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/RespondActivityTaskCanceledByIdRequest' + $ref: '#/components/schemas/PauseActivityExecutionRequest' required: true responses: "200": @@ -3781,37 +3996,47 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/RespondActivityTaskCanceledByIdResponse' + $ref: '#/components/schemas/PauseActivityExecutionResponse' default: description: Default error response content: application/json: schema: $ref: '#/components/schemas/Status' - /api/v1/namespaces/{namespace}/workflows/{workflowId}/pause: + /api/v1/namespaces/{namespace}/workflows/{workflowId}/activities/{activityId}/reset: post: tags: - WorkflowService description: |- - Note: This is an experimental API and the behavior may change in a future release. - PauseWorkflowExecution pauses the workflow execution specified in the request. Pausing a workflow execution results in - - The workflow execution status changes to `PAUSED` and a new WORKFLOW_EXECUTION_PAUSED event is added to the history - - No new workflow tasks or activity tasks are dispatched. - - Any workflow task currently executing on the worker will be allowed to complete. - - Any activity task currently executing will be paused. - - All server-side events will continue to be processed by the server. - - Queries & Updates on a paused workflow will be rejected. - operationId: PauseWorkflowExecution + ResetActivityExecution resets the execution of an activity specified by its ID. + This API can be used to target a workflow activity or a standalone activity. + + Resetting an activity means: + * number of attempts will be reset to 0. + * activity timeouts will be reset. + * if the activity is waiting for retry, and it is not paused or 'keep_paused' is not provided: + it will be scheduled immediately (* see 'jitter' flag) + + Returns a `NotFound` error if there is no pending activity with the provided ID or type. + operationId: ResetActivityExecution parameters: - name: namespace in: path - description: Namespace of the workflow to pause. + description: Namespace of the workflow which scheduled this activity. required: true schema: type: string - name: workflowId in: path - description: ID of the workflow execution to be paused. Required. + description: |- + If provided, targets a workflow activity for the given workflow ID. + If empty, targets a standalone activity. + required: true + schema: + type: string + - name: activityId + in: path + description: The ID of the activity to target. required: true schema: type: string @@ -3819,7 +4044,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PauseWorkflowExecutionRequest' + $ref: '#/components/schemas/ResetActivityExecutionRequest' required: true responses: "200": @@ -3827,45 +4052,40 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PauseWorkflowExecutionResponse' + $ref: '#/components/schemas/ResetActivityExecutionResponse' default: description: Default error response content: application/json: schema: $ref: '#/components/schemas/Status' - /api/v1/namespaces/{namespace}/workflows/{workflowId}/signal-with-start/{signalName}: + /api/v1/namespaces/{namespace}/workflows/{workflowId}/activities/{activityId}/resolve-as-canceled: post: tags: - WorkflowService description: |- - SignalWithStartWorkflowExecution is used to ensure a signal is sent to a workflow, even if - it isn't yet started. - - If the workflow is running, a `WORKFLOW_EXECUTION_SIGNALED` event is recorded in the history - and a workflow task is generated. - - If the workflow is not running or not found, then the workflow is created with - `WORKFLOW_EXECUTION_STARTED` and `WORKFLOW_EXECUTION_SIGNALED` events in its history, and a - workflow task is generated. + See `RespondActivityTaskCanceled`. This version allows clients to record failures by + namespace/workflow id/activity id instead of task token. (-- api-linter: core::0136::prepositions=disabled - aip.dev/not-precedent: "With" is used to indicate combined operation. --) - operationId: SignalWithStartWorkflowExecution + aip.dev/not-precedent: "By" is used to indicate request type. --) + operationId: RespondActivityTaskCanceledById parameters: - name: namespace in: path + description: Namespace of the workflow which scheduled this activity required: true schema: type: string - name: workflowId in: path + description: Id of the workflow which scheduled this activity, leave empty to target a standalone activity required: true schema: type: string - - name: signalName + - name: activityId in: path - description: The workflow author-defined name of the signal to send to the workflow + description: Id of the activity to confirm is cancelled required: true schema: type: string @@ -3873,7 +4093,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SignalWithStartWorkflowExecutionRequest' + $ref: '#/components/schemas/RespondActivityTaskCanceledByIdRequest' required: true responses: "200": @@ -3881,28 +4101,230 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SignalWithStartWorkflowExecutionResponse' + $ref: '#/components/schemas/RespondActivityTaskCanceledByIdResponse' default: description: Default error response content: application/json: schema: $ref: '#/components/schemas/Status' - /api/v1/namespaces/{namespace}/workflows/{workflowId}/unpause: + /api/v1/namespaces/{namespace}/workflows/{workflowId}/activities/{activityId}/unpause: post: tags: - WorkflowService description: |- - Note: This is an experimental API and the behavior may change in a future release. - UnpauseWorkflowExecution unpauses a previously paused workflow execution specified in the request. - Unpausing a workflow execution results in - - The workflow execution status changes to `RUNNING` and a new WORKFLOW_EXECUTION_UNPAUSED event is added to the history - - Workflow tasks and activity tasks are resumed. - operationId: UnpauseWorkflowExecution + UnpauseActivityExecution unpauses the execution of an activity specified by its ID. + This API can be used to target a workflow activity or a standalone activity. + + If activity is not paused, this call will have no effect. + If the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag). + Once the activity is unpaused, all timeout timers will be regenerated. + + Returns a `NotFound` error if there is no pending activity with the provided ID + operationId: UnpauseActivityExecution parameters: - name: namespace in: path - description: Namespace of the workflow to unpause. + description: Namespace of the workflow which scheduled this activity. + required: true + schema: + type: string + - name: workflowId + in: path + description: |- + If provided, targets a workflow activity for the given workflow ID. + If empty, targets a standalone activity. + required: true + schema: + type: string + - name: activityId + in: path + description: The ID of the activity to target. + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UnpauseActivityExecutionRequest' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/UnpauseActivityExecutionResponse' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /api/v1/namespaces/{namespace}/workflows/{workflowId}/activities/{activityId}/update-options: + post: + tags: + - WorkflowService + description: |- + UpdateActivityExecutionOptions is called by the client to update the options of an activity by its ID. + This API can be used to target a workflow activity or a standalone activity. + operationId: UpdateActivityExecutionOptions + parameters: + - name: namespace + in: path + description: Namespace of the workflow which scheduled this activity + required: true + schema: + type: string + - name: workflowId + in: path + description: |- + If provided, targets a workflow activity for the given workflow ID. + If empty, targets a standalone activity. + required: true + schema: + type: string + - name: activityId + in: path + description: The ID of the activity to target. + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateActivityExecutionOptionsRequest' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateActivityExecutionOptionsResponse' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /api/v1/namespaces/{namespace}/workflows/{workflowId}/pause: + post: + tags: + - WorkflowService + description: |- + Note: This is an experimental API and the behavior may change in a future release. + PauseWorkflowExecution pauses the workflow execution specified in the request. Pausing a workflow execution results in + - The workflow execution status changes to `PAUSED` and a new WORKFLOW_EXECUTION_PAUSED event is added to the history + - No new workflow tasks or activity tasks are dispatched. + - Any workflow task currently executing on the worker will be allowed to complete. + - Any activity task currently executing will be paused. + - All server-side events will continue to be processed by the server. + - Queries & Updates on a paused workflow will be rejected. + operationId: PauseWorkflowExecution + parameters: + - name: namespace + in: path + description: Namespace of the workflow to pause. + required: true + schema: + type: string + - name: workflowId + in: path + description: ID of the workflow execution to be paused. Required. + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PauseWorkflowExecutionRequest' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/PauseWorkflowExecutionResponse' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /api/v1/namespaces/{namespace}/workflows/{workflowId}/signal-with-start/{signalName}: + post: + tags: + - WorkflowService + description: |- + SignalWithStartWorkflowExecution is used to ensure a signal is sent to a workflow, even if + it isn't yet started. + + If the workflow is running, a `WORKFLOW_EXECUTION_SIGNALED` event is recorded in the history + and a workflow task is generated. + + If the workflow is not running or not found, then the workflow is created with + `WORKFLOW_EXECUTION_STARTED` and `WORKFLOW_EXECUTION_SIGNALED` events in its history, and a + workflow task is generated. + + (-- api-linter: core::0136::prepositions=disabled + aip.dev/not-precedent: "With" is used to indicate combined operation. --) + operationId: SignalWithStartWorkflowExecution + parameters: + - name: namespace + in: path + required: true + schema: + type: string + - name: workflowId + in: path + required: true + schema: + type: string + - name: signalName + in: path + description: The workflow author-defined name of the signal to send to the workflow + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SignalWithStartWorkflowExecutionRequest' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/SignalWithStartWorkflowExecutionResponse' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /api/v1/namespaces/{namespace}/workflows/{workflowId}/unpause: + post: + tags: + - WorkflowService + description: |- + Note: This is an experimental API and the behavior may change in a future release. + UnpauseWorkflowExecution unpauses a previously paused workflow execution specified in the request. + Unpausing a workflow execution results in + - The workflow execution status changes to `RUNNING` and a new WORKFLOW_EXECUTION_UNPAUSED event is added to the history + - Workflow tasks and activity tasks are resumed. + operationId: UnpauseWorkflowExecution + parameters: + - name: namespace + in: path + description: Namespace of the workflow to unpause. required: true schema: type: string @@ -4466,6 +4888,15 @@ paths: in: query schema: type: string + - name: weakConsistency + in: query + description: |- + If true, the server may serve the response from an eventually-consistent + source instead of reading through to persistence. Defaults to false, + which preserves read-after-write consistency. SDKs should set this when + fetching namespace capabilities on worker/client startup. + schema: + type: boolean responses: "200": description: OK @@ -5155,24 +5586,205 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/RespondActivityTaskFailedByIdResponse' + $ref: '#/components/schemas/RespondActivityTaskFailedByIdResponse' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /namespaces/{namespace}/activities/{activityId}/heartbeat: + post: + tags: + - WorkflowService + description: |- + See `RecordActivityTaskHeartbeat`. This version allows clients to record heartbeats by + namespace/workflow id/activity id instead of task token. + + (-- api-linter: core::0136::prepositions=disabled + aip.dev/not-precedent: "By" is used to indicate request type. --) + operationId: RecordActivityTaskHeartbeatById + parameters: + - name: namespace + in: path + description: Namespace of the workflow which scheduled this activity + required: true + schema: + type: string + - name: activityId + in: path + description: Id of the activity we're heartbeating + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RecordActivityTaskHeartbeatByIdRequest' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/RecordActivityTaskHeartbeatByIdResponse' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /namespaces/{namespace}/activities/{activityId}/outcome: + get: + tags: + - WorkflowService + description: |- + PollActivityExecution long-polls for an activity execution to complete and returns the + outcome (result or failure). + operationId: PollActivityExecution + parameters: + - name: namespace + in: path + required: true + schema: + type: string + - name: activityId + in: path + required: true + schema: + type: string + - name: runId + in: query + description: Activity run ID. If empty the request targets the latest run. + schema: + type: string + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/PollActivityExecutionResponse' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /namespaces/{namespace}/activities/{activityId}/pause: + post: + tags: + - WorkflowService + description: |- + PauseActivityExecution pauses the execution of an activity specified by its ID. + This API can be used to target a workflow activity or a standalone activity + + Pausing an activity means: + - If the activity is currently waiting for a retry or is running and subsequently fails, + it will not be rescheduled until it is unpaused. + - If the activity is already paused, calling this method will have no effect. + - If the activity is running and finishes successfully, the activity will be completed. + - If the activity is running and finishes with failure: + * if there is no retry left - the activity will be completed. + * if there are more retries left - the activity will be paused. + For long-running activities: + - activities in paused state will send a cancellation with "activity_paused" set to 'true' in response to 'RecordActivityTaskHeartbeat'. + + Returns a `NotFound` error if there is no pending activity with the provided ID + operationId: PauseActivityExecution + parameters: + - name: namespace + in: path + description: Namespace of the workflow which scheduled this activity. + required: true + schema: + type: string + - name: activityId + in: path + description: The ID of the activity to target. + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PauseActivityExecutionRequest' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/PauseActivityExecutionResponse' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /namespaces/{namespace}/activities/{activityId}/reset: + post: + tags: + - WorkflowService + description: |- + ResetActivityExecution resets the execution of an activity specified by its ID. + This API can be used to target a workflow activity or a standalone activity. + + Resetting an activity means: + * number of attempts will be reset to 0. + * activity timeouts will be reset. + * if the activity is waiting for retry, and it is not paused or 'keep_paused' is not provided: + it will be scheduled immediately (* see 'jitter' flag) + + Returns a `NotFound` error if there is no pending activity with the provided ID or type. + operationId: ResetActivityExecution + parameters: + - name: namespace + in: path + description: Namespace of the workflow which scheduled this activity. + required: true + schema: + type: string + - name: activityId + in: path + description: The ID of the activity to target. + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ResetActivityExecutionRequest' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/ResetActivityExecutionResponse' default: description: Default error response content: application/json: schema: $ref: '#/components/schemas/Status' - /namespaces/{namespace}/activities/{activityId}/heartbeat: + /namespaces/{namespace}/activities/{activityId}/resolve-as-canceled: post: tags: - WorkflowService description: |- - See `RecordActivityTaskHeartbeat`. This version allows clients to record heartbeats by + See `RespondActivityTaskCanceled`. This version allows clients to record failures by namespace/workflow id/activity id instead of task token. (-- api-linter: core::0136::prepositions=disabled aip.dev/not-precedent: "By" is used to indicate request type. --) - operationId: RecordActivityTaskHeartbeatById + operationId: RespondActivityTaskCanceledById parameters: - name: namespace in: path @@ -5182,7 +5794,7 @@ paths: type: string - name: activityId in: path - description: Id of the activity we're heartbeating + description: Id of the activity to confirm is cancelled required: true schema: type: string @@ -5190,7 +5802,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/RecordActivityTaskHeartbeatByIdRequest' + $ref: '#/components/schemas/RespondActivityTaskCanceledByIdRequest' required: true responses: "200": @@ -5198,21 +5810,23 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/RecordActivityTaskHeartbeatByIdResponse' + $ref: '#/components/schemas/RespondActivityTaskCanceledByIdResponse' default: description: Default error response content: application/json: schema: $ref: '#/components/schemas/Status' - /namespaces/{namespace}/activities/{activityId}/outcome: - get: + /namespaces/{namespace}/activities/{activityId}/terminate: + post: tags: - WorkflowService description: |- - PollActivityExecution long-polls for an activity execution to complete and returns the - outcome (result or failure). - operationId: PollActivityExecution + TerminateActivityExecution terminates an existing activity execution immediately. + + Termination does not reach the worker and the activity code cannot react to it. A terminated activity may have a + running attempt. + operationId: TerminateActivityExecution parameters: - name: namespace in: path @@ -5224,45 +5838,49 @@ paths: required: true schema: type: string - - name: runId - in: query - description: Activity run ID. If empty the request targets the latest run. - schema: - type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TerminateActivityExecutionRequest' + required: true responses: "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/PollActivityExecutionResponse' + $ref: '#/components/schemas/TerminateActivityExecutionResponse' default: description: Default error response content: application/json: schema: $ref: '#/components/schemas/Status' - /namespaces/{namespace}/activities/{activityId}/resolve-as-canceled: + /namespaces/{namespace}/activities/{activityId}/unpause: post: tags: - WorkflowService description: |- - See `RespondActivityTaskCanceled`. This version allows clients to record failures by - namespace/workflow id/activity id instead of task token. + UnpauseActivityExecution unpauses the execution of an activity specified by its ID. + This API can be used to target a workflow activity or a standalone activity. - (-- api-linter: core::0136::prepositions=disabled - aip.dev/not-precedent: "By" is used to indicate request type. --) - operationId: RespondActivityTaskCanceledById + If activity is not paused, this call will have no effect. + If the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag). + Once the activity is unpaused, all timeout timers will be regenerated. + + Returns a `NotFound` error if there is no pending activity with the provided ID + operationId: UnpauseActivityExecution parameters: - name: namespace in: path - description: Namespace of the workflow which scheduled this activity + description: Namespace of the workflow which scheduled this activity. required: true schema: type: string - name: activityId in: path - description: Id of the activity to confirm is cancelled + description: The ID of the activity to target. required: true schema: type: string @@ -5270,7 +5888,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/RespondActivityTaskCanceledByIdRequest' + $ref: '#/components/schemas/UnpauseActivityExecutionRequest' required: true responses: "200": @@ -5278,31 +5896,31 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/RespondActivityTaskCanceledByIdResponse' + $ref: '#/components/schemas/UnpauseActivityExecutionResponse' default: description: Default error response content: application/json: schema: $ref: '#/components/schemas/Status' - /namespaces/{namespace}/activities/{activityId}/terminate: + /namespaces/{namespace}/activities/{activityId}/update-options: post: tags: - WorkflowService description: |- - TerminateActivityExecution terminates an existing activity execution immediately. - - Termination does not reach the worker and the activity code cannot react to it. A terminated activity may have a - running attempt. - operationId: TerminateActivityExecution + UpdateActivityExecutionOptions is called by the client to update the options of an activity by its ID. + This API can be used to target a workflow activity or a standalone activity. + operationId: UpdateActivityExecutionOptions parameters: - name: namespace in: path + description: Namespace of the workflow which scheduled this activity required: true schema: type: string - name: activityId in: path + description: The ID of the activity to target. required: true schema: type: string @@ -5310,7 +5928,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TerminateActivityExecutionRequest' + $ref: '#/components/schemas/UpdateActivityExecutionOptionsRequest' required: true responses: "200": @@ -5318,7 +5936,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TerminateActivityExecutionResponse' + $ref: '#/components/schemas/UpdateActivityExecutionOptionsResponse' default: description: Default error response content: @@ -7488,6 +8106,13 @@ paths: * Status schema: type: string + - name: includeSystemWorkers + in: query + description: |- + When true, the response will include system workers that are created implicitly + by the server and not by the user. By default, system workers are excluded. + schema: + type: boolean responses: "200": description: OK @@ -8100,7 +8725,215 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/StartWorkflowExecutionRequest' + $ref: '#/components/schemas/StartWorkflowExecutionRequest' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/StartWorkflowExecutionResponse' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /namespaces/{namespace}/workflows/{workflowId}/activities/{activityId}/complete: + post: + tags: + - WorkflowService + description: |- + See `RespondActivityTaskCompleted`. This version allows clients to record completions by + namespace/workflow id/activity id instead of task token. + + (-- api-linter: core::0136::prepositions=disabled + aip.dev/not-precedent: "By" is used to indicate request type. --) + operationId: RespondActivityTaskCompletedById + parameters: + - name: namespace + in: path + description: Namespace of the workflow which scheduled this activity + required: true + schema: + type: string + - name: workflowId + in: path + description: Id of the workflow which scheduled this activity, leave empty to target a standalone activity + required: true + schema: + type: string + - name: activityId + in: path + description: Id of the activity to complete + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RespondActivityTaskCompletedByIdRequest' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/RespondActivityTaskCompletedByIdResponse' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /namespaces/{namespace}/workflows/{workflowId}/activities/{activityId}/fail: + post: + tags: + - WorkflowService + description: |- + See `RecordActivityTaskFailed`. This version allows clients to record failures by + namespace/workflow id/activity id instead of task token. + + (-- api-linter: core::0136::prepositions=disabled + aip.dev/not-precedent: "By" is used to indicate request type. --) + operationId: RespondActivityTaskFailedById + parameters: + - name: namespace + in: path + description: Namespace of the workflow which scheduled this activity + required: true + schema: + type: string + - name: workflowId + in: path + description: Id of the workflow which scheduled this activity, leave empty to target a standalone activity + required: true + schema: + type: string + - name: activityId + in: path + description: Id of the activity to fail + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RespondActivityTaskFailedByIdRequest' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/RespondActivityTaskFailedByIdResponse' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /namespaces/{namespace}/workflows/{workflowId}/activities/{activityId}/heartbeat: + post: + tags: + - WorkflowService + description: |- + See `RecordActivityTaskHeartbeat`. This version allows clients to record heartbeats by + namespace/workflow id/activity id instead of task token. + + (-- api-linter: core::0136::prepositions=disabled + aip.dev/not-precedent: "By" is used to indicate request type. --) + operationId: RecordActivityTaskHeartbeatById + parameters: + - name: namespace + in: path + description: Namespace of the workflow which scheduled this activity + required: true + schema: + type: string + - name: workflowId + in: path + description: Id of the workflow which scheduled this activity, leave empty to target a standalone activity + required: true + schema: + type: string + - name: activityId + in: path + description: Id of the activity we're heartbeating + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RecordActivityTaskHeartbeatByIdRequest' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/RecordActivityTaskHeartbeatByIdResponse' + default: + description: Default error response + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /namespaces/{namespace}/workflows/{workflowId}/activities/{activityId}/pause: + post: + tags: + - WorkflowService + description: |- + PauseActivityExecution pauses the execution of an activity specified by its ID. + This API can be used to target a workflow activity or a standalone activity + + Pausing an activity means: + - If the activity is currently waiting for a retry or is running and subsequently fails, + it will not be rescheduled until it is unpaused. + - If the activity is already paused, calling this method will have no effect. + - If the activity is running and finishes successfully, the activity will be completed. + - If the activity is running and finishes with failure: + * if there is no retry left - the activity will be completed. + * if there are more retries left - the activity will be paused. + For long-running activities: + - activities in paused state will send a cancellation with "activity_paused" set to 'true' in response to 'RecordActivityTaskHeartbeat'. + + Returns a `NotFound` error if there is no pending activity with the provided ID + operationId: PauseActivityExecution + parameters: + - name: namespace + in: path + description: Namespace of the workflow which scheduled this activity. + required: true + schema: + type: string + - name: workflowId + in: path + description: |- + If provided, pause a workflow activity (or activities) for the given workflow ID. + If empty, targets a standalone activity. + required: true + schema: + type: string + - name: activityId + in: path + description: The ID of the activity to target. + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PauseActivityExecutionRequest' required: true responses: "200": @@ -8108,40 +8941,47 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/StartWorkflowExecutionResponse' + $ref: '#/components/schemas/PauseActivityExecutionResponse' default: description: Default error response content: application/json: schema: $ref: '#/components/schemas/Status' - /namespaces/{namespace}/workflows/{workflowId}/activities/{activityId}/complete: + /namespaces/{namespace}/workflows/{workflowId}/activities/{activityId}/reset: post: tags: - WorkflowService description: |- - See `RespondActivityTaskCompleted`. This version allows clients to record completions by - namespace/workflow id/activity id instead of task token. + ResetActivityExecution resets the execution of an activity specified by its ID. + This API can be used to target a workflow activity or a standalone activity. - (-- api-linter: core::0136::prepositions=disabled - aip.dev/not-precedent: "By" is used to indicate request type. --) - operationId: RespondActivityTaskCompletedById + Resetting an activity means: + * number of attempts will be reset to 0. + * activity timeouts will be reset. + * if the activity is waiting for retry, and it is not paused or 'keep_paused' is not provided: + it will be scheduled immediately (* see 'jitter' flag) + + Returns a `NotFound` error if there is no pending activity with the provided ID or type. + operationId: ResetActivityExecution parameters: - name: namespace in: path - description: Namespace of the workflow which scheduled this activity + description: Namespace of the workflow which scheduled this activity. required: true schema: type: string - name: workflowId in: path - description: Id of the workflow which scheduled this activity, leave empty to target a standalone activity + description: |- + If provided, targets a workflow activity for the given workflow ID. + If empty, targets a standalone activity. required: true schema: type: string - name: activityId in: path - description: Id of the activity to complete + description: The ID of the activity to target. required: true schema: type: string @@ -8149,7 +8989,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/RespondActivityTaskCompletedByIdRequest' + $ref: '#/components/schemas/ResetActivityExecutionRequest' required: true responses: "200": @@ -8157,24 +8997,24 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/RespondActivityTaskCompletedByIdResponse' + $ref: '#/components/schemas/ResetActivityExecutionResponse' default: description: Default error response content: application/json: schema: $ref: '#/components/schemas/Status' - /namespaces/{namespace}/workflows/{workflowId}/activities/{activityId}/fail: + /namespaces/{namespace}/workflows/{workflowId}/activities/{activityId}/resolve-as-canceled: post: tags: - WorkflowService description: |- - See `RecordActivityTaskFailed`. This version allows clients to record failures by + See `RespondActivityTaskCanceled`. This version allows clients to record failures by namespace/workflow id/activity id instead of task token. (-- api-linter: core::0136::prepositions=disabled aip.dev/not-precedent: "By" is used to indicate request type. --) - operationId: RespondActivityTaskFailedById + operationId: RespondActivityTaskCanceledById parameters: - name: namespace in: path @@ -8190,7 +9030,7 @@ paths: type: string - name: activityId in: path - description: Id of the activity to fail + description: Id of the activity to confirm is cancelled required: true schema: type: string @@ -8198,7 +9038,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/RespondActivityTaskFailedByIdRequest' + $ref: '#/components/schemas/RespondActivityTaskCanceledByIdRequest' required: true responses: "200": @@ -8206,40 +9046,45 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/RespondActivityTaskFailedByIdResponse' + $ref: '#/components/schemas/RespondActivityTaskCanceledByIdResponse' default: description: Default error response content: application/json: schema: $ref: '#/components/schemas/Status' - /namespaces/{namespace}/workflows/{workflowId}/activities/{activityId}/heartbeat: + /namespaces/{namespace}/workflows/{workflowId}/activities/{activityId}/unpause: post: tags: - WorkflowService description: |- - See `RecordActivityTaskHeartbeat`. This version allows clients to record heartbeats by - namespace/workflow id/activity id instead of task token. + UnpauseActivityExecution unpauses the execution of an activity specified by its ID. + This API can be used to target a workflow activity or a standalone activity. - (-- api-linter: core::0136::prepositions=disabled - aip.dev/not-precedent: "By" is used to indicate request type. --) - operationId: RecordActivityTaskHeartbeatById + If activity is not paused, this call will have no effect. + If the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag). + Once the activity is unpaused, all timeout timers will be regenerated. + + Returns a `NotFound` error if there is no pending activity with the provided ID + operationId: UnpauseActivityExecution parameters: - name: namespace in: path - description: Namespace of the workflow which scheduled this activity + description: Namespace of the workflow which scheduled this activity. required: true schema: type: string - name: workflowId in: path - description: Id of the workflow which scheduled this activity, leave empty to target a standalone activity + description: |- + If provided, targets a workflow activity for the given workflow ID. + If empty, targets a standalone activity. required: true schema: type: string - name: activityId in: path - description: Id of the activity we're heartbeating + description: The ID of the activity to target. required: true schema: type: string @@ -8247,7 +9092,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/RecordActivityTaskHeartbeatByIdRequest' + $ref: '#/components/schemas/UnpauseActivityExecutionRequest' required: true responses: "200": @@ -8255,24 +9100,21 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/RecordActivityTaskHeartbeatByIdResponse' + $ref: '#/components/schemas/UnpauseActivityExecutionResponse' default: description: Default error response content: application/json: schema: $ref: '#/components/schemas/Status' - /namespaces/{namespace}/workflows/{workflowId}/activities/{activityId}/resolve-as-canceled: + /namespaces/{namespace}/workflows/{workflowId}/activities/{activityId}/update-options: post: tags: - WorkflowService description: |- - See `RespondActivityTaskCanceled`. This version allows clients to record failures by - namespace/workflow id/activity id instead of task token. - - (-- api-linter: core::0136::prepositions=disabled - aip.dev/not-precedent: "By" is used to indicate request type. --) - operationId: RespondActivityTaskCanceledById + UpdateActivityExecutionOptions is called by the client to update the options of an activity by its ID. + This API can be used to target a workflow activity or a standalone activity. + operationId: UpdateActivityExecutionOptions parameters: - name: namespace in: path @@ -8282,13 +9124,15 @@ paths: type: string - name: workflowId in: path - description: Id of the workflow which scheduled this activity, leave empty to target a standalone activity + description: |- + If provided, targets a workflow activity for the given workflow ID. + If empty, targets a standalone activity. required: true schema: type: string - name: activityId in: path - description: Id of the activity to confirm is cancelled + description: The ID of the activity to target. required: true schema: type: string @@ -8296,7 +9140,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/RespondActivityTaskCanceledByIdRequest' + $ref: '#/components/schemas/UpdateActivityExecutionOptionsRequest' required: true responses: "200": @@ -8304,7 +9148,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/RespondActivityTaskCanceledByIdResponse' + $ref: '#/components/schemas/UpdateActivityExecutionOptionsResponse' default: description: Default error response content: @@ -8888,6 +9732,16 @@ components: totalHeartbeatCount: type: string description: Total number of heartbeats recorded across all attempts of this activity, including retries. + sdkName: + type: string + description: |- + The name of the SDK of the worker that most recently picked up an attempt of this activity. + Overwritten on each new attempt. Empty if unknown. + sdkVersion: + type: string + description: |- + The version of the SDK of the worker that most recently picked up an attempt of this activity. + Overwritten on each new attempt. Empty if unknown. description: Information about a standalone activity. ActivityExecutionListInfo: type: object @@ -11645,6 +12499,8 @@ components: $ref: '#/components/schemas/Link_Activity' nexusOperation: $ref: '#/components/schemas/Link_NexusOperation' + workflow: + $ref: '#/components/schemas/Link_Workflow' description: |- Link can be associated with history events. It might contain information about an external entity related to the history event. For example, workflow A makes a Nexus call that starts workflow B: @@ -11679,6 +12535,18 @@ components: runId: type: string description: A link to a standalone Nexus operation. + Link_Workflow: + type: object + properties: + namespace: + type: string + workflowId: + type: string + runId: + type: string + reason: + type: string + description: "A link to a workflow execution. This is a more general version of WorkflowEvent that doesn't specify a \n particular event within the workflow, useful when you want to link to a workflow but there is no particular event to link to,\n such as a Query or a Rejected Update." Link_WorkflowEvent: type: object properties: @@ -12077,6 +12945,15 @@ components: pollerAutoscaling: type: boolean description: True if the namespace supports poller autoscaling + workerCommands: + type: boolean + description: True if the namespace supports worker commands (server-to-worker communication via control queues). + standaloneNexusOperation: + type: boolean + description: True if the namespace supports standalone Nexus operations. + workflowUpdateCallbacks: + type: boolean + description: True if the namespace supports attaching callbacks on workflow updates description: Namespace capability details. Should contain what features are enabled in a namespace. NamespaceInfo_Limits: type: object @@ -12729,6 +13606,38 @@ components: PatchScheduleResponse: type: object properties: {} + PauseActivityExecutionRequest: + type: object + properties: + namespace: + type: string + description: Namespace of the workflow which scheduled this activity. + workflowId: + type: string + description: |- + If provided, pause a workflow activity (or activities) for the given workflow ID. + If empty, targets a standalone activity. + activityId: + type: string + description: The ID of the activity to target. + runId: + type: string + description: Run ID of the workflow or standalone activity. + identity: + type: string + description: The identity of the client who initiated this request. + reason: + type: string + description: Reason to pause the activity. + resourceId: + type: string + description: Resource ID for routing. Contains "workflow:{workflow_id}" for workflow activities or "activity:{activity_id}" for standalone activities. + requestId: + type: string + description: Used to de-dupe pause requests. + PauseActivityExecutionResponse: + type: object + properties: {} PauseActivityRequest: type: object properties: @@ -12753,9 +13662,14 @@ components: reason: type: string description: Reason to pause the activity. + requestId: + type: string + description: Used to de-dupe pause requests. + description: Deprecated. Use `PauseActivityExecutionRequest`. PauseActivityResponse: type: object properties: {} + description: Deprecated. Use `PauseActivityExecutionResponse`. PauseInfo_Manual: type: object properties: @@ -13671,6 +14585,19 @@ components: $ref: '#/components/schemas/Meta' input: $ref: '#/components/schemas/Input' + requestId: + type: string + description: The request ID of the request. + completionCallbacks: + type: array + items: + $ref: '#/components/schemas/Callback' + description: Callbacks to be called by the server when this update reaches a terminal state. + links: + type: array + items: + $ref: '#/components/schemas/Link' + description: Links to be associated with this update. description: The client request that triggers a Workflow Update. RequestCancelActivityExecutionRequest: type: object @@ -13885,6 +14812,52 @@ components: Indicate if the request is still buffered. If so, the event ID is not known and its value will be an invalid event ID. description: RequestIdInfo contains details of a request ID. + ResetActivityExecutionRequest: + type: object + properties: + namespace: + type: string + description: Namespace of the workflow which scheduled this activity. + workflowId: + type: string + description: |- + If provided, targets a workflow activity for the given workflow ID. + If empty, targets a standalone activity. + activityId: + type: string + description: The ID of the activity to target. + runId: + type: string + description: Run ID of the workflow or standalone activity. + identity: + type: string + description: The identity of the client who initiated this request. + resetHeartbeat: + type: boolean + description: |- + Indicates that activity should reset heartbeat details. + This flag will be applied only to the new instance of the activity. + keepPaused: + type: boolean + description: If activity is paused, it will remain paused after reset + jitter: + pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ + type: string + description: |- + If set, and activity is in backoff, the activity will start at a random time within the specified jitter duration. + (unless it is paused and keep_paused is set) + restoreOriginalOptions: + type: boolean + description: |- + If set, the activity options will be restored to the defaults. + Default options are then options activity was created with. + They are part of the first schedule event. + resourceId: + type: string + description: Resource ID for routing. Contains "workflow:{workflow_id}" for workflow activities or "activity:{activity_id}" for standalone activities. + ResetActivityExecutionResponse: + type: object + properties: {} ResetActivityRequest: type: object properties: @@ -13926,11 +14899,14 @@ components: description: |- If set, the activity options will be restored to the defaults. Default options are then options activity was created with. - They are part of the first SCHEDULE event. - description: 'NOTE: keep in sync with temporal.api.batch.v1.BatchOperationResetActivities' + They are part of the first schedule event. + description: |- + NOTE: keep in sync with temporal.api.batch.v1.BatchOperationResetActivities + Deprecated. Use `ResetActivityExecutionRequest`. ResetActivityResponse: type: object properties: {} + description: Deprecated. Use `ResetActivityExecutionRequest`. ResetOptions: type: object properties: @@ -14517,6 +15493,9 @@ components: invalidScheduleError: type: string description: Deprecated. + stateSizeBytes: + type: string + description: Size of the schedule's internal state (including payloads) in bytes. ScheduleListEntry: type: object properties: @@ -14560,6 +15539,9 @@ components: items: type: string format: date-time + stateSizeBytes: + type: string + description: Size of the schedule's internal state (including payloads) in bytes. description: |- ScheduleListInfo is an abbreviated set of values from Schedule and ScheduleInfo that's returned in ListSchedules. @@ -16379,6 +17361,45 @@ components: applied: type: boolean description: True is the rule was applied, based on the rule conditions (predicate/visibility_query). + UnpauseActivityExecutionRequest: + type: object + properties: + namespace: + type: string + description: Namespace of the workflow which scheduled this activity. + workflowId: + type: string + description: |- + If provided, targets a workflow activity for the given workflow ID. + If empty, targets a standalone activity. + activityId: + type: string + description: The ID of the activity to target. + runId: + type: string + description: Run ID of the workflow or standalone activity. + identity: + type: string + description: The identity of the client who initiated this request. + resetAttempts: + type: boolean + description: Providing this flag will also reset the number of attempts. + resetHeartbeat: + type: boolean + description: Providing this flag will also reset the heartbeat details. + reason: + type: string + description: Reason to unpause the activity. + jitter: + pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ + type: string + description: If set, the activity will start at a random time within the specified jitter duration. + resourceId: + type: string + description: Resource ID for routing. Contains "workflow:{workflow_id}" for workflow activities or "activity:{activity_id}" for standalone activities. + UnpauseActivityExecutionResponse: + type: object + properties: {} UnpauseActivityRequest: type: object properties: @@ -16411,9 +17432,11 @@ components: pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ type: string description: If set, the activity will start at a random time within the specified jitter duration. + description: Deprecated. Use `UnpauseActivityExecutionRequest`. UnpauseActivityResponse: type: object properties: {} + description: Deprecated. Use `UnpauseActivityExecutionResponse`. UnpauseWorkflowExecutionRequest: type: object properties: @@ -16439,6 +17462,52 @@ components: type: object properties: {} description: Response to a successful UnpauseWorkflowExecution request. + UpdateActivityExecutionOptionsRequest: + type: object + properties: + namespace: + type: string + description: Namespace of the workflow which scheduled this activity + workflowId: + type: string + description: |- + If provided, targets a workflow activity for the given workflow ID. + If empty, targets a standalone activity. + activityId: + type: string + description: The ID of the activity to target. + runId: + type: string + description: Run ID of the workflow or standalone activity. + identity: + type: string + description: The identity of the client who initiated this request + activityOptions: + allOf: + - $ref: '#/components/schemas/ActivityOptions' + description: Activity options. Partial updates are accepted and controlled by update_mask + updateMask: + type: string + description: Controls which fields from `activity_options` will be applied + format: field-mask + restoreOriginal: + type: boolean + description: |- + If set, the activity options will be restored to the default. + Default options are then options activity was created with. + They are part of the first schedule event. + This flag cannot be combined with any other option; if you supply + restore_original together with other options, the request will be rejected. + resourceId: + type: string + description: Resource ID for routing. Contains "workflow:{workflow_id}" for workflow activities or "activity:{activity_id}" for standalone activities. + UpdateActivityExecutionOptionsResponse: + type: object + properties: + activityOptions: + allOf: + - $ref: '#/components/schemas/ActivityOptions' + description: Activity options after an update UpdateActivityOptionsRequest: type: object properties: @@ -16474,10 +17543,12 @@ components: description: |- If set, the activity options will be restored to the default. Default options are then options activity was created with. - They are part of the first SCHEDULE event. + They are part of the first schedule event. This flag cannot be combined with any other option; if you supply restore_original together with other options, the request will be rejected. - description: 'NOTE: keep in sync with temporal.api.batch.v1.BatchOperationUpdateActivityOptions' + description: |- + NOTE: keep in sync with temporal.api.batch.v1.BatchOperationUpdateActivityOptions + Deprecated. Use `UpdateActivityExecutionOptionsRequest`. UpdateActivityOptionsResponse: type: object properties: @@ -16485,6 +17556,7 @@ components: allOf: - $ref: '#/components/schemas/ActivityOptions' description: Activity options after an update + description: Deprecated. Use `UpdateActivityExecutionOptionsResponse`. UpdateDeploymentMetadata: type: object properties: @@ -16907,6 +17979,10 @@ components: request WaitPolicy, and before the context deadline expired; clients may may then retry the call as needed. format: enum + link: + allOf: + - $ref: '#/components/schemas/Link' + description: Link to the update event. May be null if the update has not yet been accepted. UpsertWorkflowSearchAttributesEventAttributes: type: object properties: @@ -18251,6 +19327,27 @@ components: allOf: - $ref: '#/components/schemas/TimeSkippingConfig' description: If set, the time-skipping configuration was changed. Contains the full updated configuration. + workflowUpdateOptions: + type: array + items: + $ref: '#/components/schemas/WorkflowExecutionOptionsUpdatedEventAttributes_WorkflowUpdateOptionsUpdate' + description: Updates to workflow updates options. + WorkflowExecutionOptionsUpdatedEventAttributes_WorkflowUpdateOptionsUpdate: + type: object + properties: + updateId: + type: string + description: The ID of the workflow update this update options update corresponds to. + attachedRequestId: + type: string + description: |- + Request ID attached to the running workflow update so that subsequent requests with same + request ID will be deduped + attachedCompletionCallbacks: + type: array + items: + $ref: '#/components/schemas/Callback' + description: Completion callbacks attached to the running workflow update. WorkflowExecutionPauseInfo: type: object properties: diff --git a/crates/common/protos/api_upstream/temporal/api/activity/v1/message.proto b/crates/common/protos/api_upstream/temporal/api/activity/v1/message.proto index 8262cf88b..2a2015400 100644 --- a/crates/common/protos/api_upstream/temporal/api/activity/v1/message.proto +++ b/crates/common/protos/api_upstream/temporal/api/activity/v1/message.proto @@ -168,6 +168,14 @@ message ActivityExecutionInfo { // Total number of heartbeats recorded across all attempts of this activity, including retries. int64 total_heartbeat_count = 34; + + // The name of the SDK of the worker that most recently picked up an attempt of this activity. + // Overwritten on each new attempt. Empty if unknown. + string sdk_name = 35; + + // The version of the SDK of the worker that most recently picked up an attempt of this activity. + // Overwritten on each new attempt. Empty if unknown. + string sdk_version = 36; } // Limited activity information returned in the list response. diff --git a/crates/common/protos/api_upstream/temporal/api/common/v1/message.proto b/crates/common/protos/api_upstream/temporal/api/common/v1/message.proto index 13d9d1dc8..98908cf89 100644 --- a/crates/common/protos/api_upstream/temporal/api/common/v1/message.proto +++ b/crates/common/protos/api_upstream/temporal/api/common/v1/message.proto @@ -254,11 +254,22 @@ message Link { string run_id = 3; } + // A link to a workflow execution. This is a more general version of WorkflowEvent that doesn't specify a + // particular event within the workflow, useful when you want to link to a workflow but there is no particular event to link to, + // such as a Query or a Rejected Update. + message Workflow { + string namespace = 1; + string workflow_id = 2; + string run_id = 3; + string reason = 4; + } + oneof variant { WorkflowEvent workflow_event = 1; BatchJob batch_job = 2; Activity activity = 3; NexusOperation nexus_operation = 4; + Workflow workflow = 5; } } diff --git a/crates/common/protos/api_upstream/temporal/api/history/v1/message.proto b/crates/common/protos/api_upstream/temporal/api/history/v1/message.proto index e57ec8d60..96a06ab85 100644 --- a/crates/common/protos/api_upstream/temporal/api/history/v1/message.proto +++ b/crates/common/protos/api_upstream/temporal/api/history/v1/message.proto @@ -881,6 +881,15 @@ message ChildWorkflowExecutionTerminatedEventAttributes { } message WorkflowExecutionOptionsUpdatedEventAttributes { + message WorkflowUpdateOptionsUpdate { + // The ID of the workflow update this update options update corresponds to. + string update_id = 1; + // Request ID attached to the running workflow update so that subsequent requests with same + // request ID will be deduped + string attached_request_id = 2; + // Completion callbacks attached to the running workflow update. + repeated temporal.api.common.v1.Callback attached_completion_callbacks = 3; + } // Versioning override upserted in this event. // Ignored if nil or if unset_versioning_override is true. temporal.api.workflow.v1.VersioningOverride versioning_override = 1; @@ -898,6 +907,8 @@ message WorkflowExecutionOptionsUpdatedEventAttributes { temporal.api.common.v1.Priority priority = 6; // If set, the time-skipping configuration was changed. Contains the full updated configuration. temporal.api.workflow.v1.TimeSkippingConfig time_skipping_config = 7; + // Updates to workflow updates options. + repeated WorkflowUpdateOptionsUpdate workflow_update_options = 8; } // Not used anywhere. Use case is replaced by WorkflowExecutionOptionsUpdatedEventAttributes diff --git a/crates/common/protos/api_upstream/temporal/api/namespace/v1/message.proto b/crates/common/protos/api_upstream/temporal/api/namespace/v1/message.proto index cded0e372..4b722147d 100644 --- a/crates/common/protos/api_upstream/temporal/api/namespace/v1/message.proto +++ b/crates/common/protos/api_upstream/temporal/api/namespace/v1/message.proto @@ -50,6 +50,12 @@ message NamespaceInfo { bool worker_poll_complete_on_shutdown = 8; // True if the namespace supports poller autoscaling bool poller_autoscaling = 9; + // True if the namespace supports worker commands (server-to-worker communication via control queues). + bool worker_commands = 10; + // True if the namespace supports standalone Nexus operations. + bool standalone_nexus_operation = 11; + // True if the namespace supports attaching callbacks on workflow updates + bool workflow_update_callbacks = 12; } // Namespace configured limits diff --git a/crates/common/protos/api_upstream/temporal/api/nexus/v1/message.proto b/crates/common/protos/api_upstream/temporal/api/nexus/v1/message.proto index 3623daa70..ec03a2ac7 100644 --- a/crates/common/protos/api_upstream/temporal/api/nexus/v1/message.proto +++ b/crates/common/protos/api_upstream/temporal/api/nexus/v1/message.proto @@ -202,6 +202,7 @@ message EndpointTarget { // Nexus task queue to route requests to. string task_queue = 2; } + // Target an external server by URL. // At a later point, this will support providing credentials, in the meantime, an http.RoundTripper can be injected // into the server to modify the request. diff --git a/crates/common/protos/api_upstream/temporal/api/schedule/v1/message.proto b/crates/common/protos/api_upstream/temporal/api/schedule/v1/message.proto index b35e1f0eb..3a0a9344c 100644 --- a/crates/common/protos/api_upstream/temporal/api/schedule/v1/message.proto +++ b/crates/common/protos/api_upstream/temporal/api/schedule/v1/message.proto @@ -349,6 +349,9 @@ message ScheduleInfo { // Deprecated. string invalid_schedule_error = 8 [deprecated = true]; + + // Size of the schedule's internal state (including payloads) in bytes. + int64 state_size_bytes = 12; } message Schedule { @@ -377,6 +380,9 @@ message ScheduleListInfo { // From info (maybe fewer entries): repeated ScheduleActionResult recent_actions = 5; repeated google.protobuf.Timestamp future_action_times = 6; + + // Size of the schedule's internal state (including payloads) in bytes. + int64 state_size_bytes = 7; } // ScheduleListEntry is returned by ListSchedules. diff --git a/crates/common/protos/api_upstream/temporal/api/update/v1/message.proto b/crates/common/protos/api_upstream/temporal/api/update/v1/message.proto index ce29a5694..76c46d47d 100644 --- a/crates/common/protos/api_upstream/temporal/api/update/v1/message.proto +++ b/crates/common/protos/api_upstream/temporal/api/update/v1/message.proto @@ -62,6 +62,12 @@ message Input { message Request { Meta meta = 1; Input input = 2; + // The request ID of the request. + string request_id = 3; + // Callbacks to be called by the server when this update reaches a terminal state. + repeated temporal.api.common.v1.Callback completion_callbacks = 4; + // Links to be associated with this update. + repeated temporal.api.common.v1.Link links = 5; } // An Update protocol message indicating that a Workflow Update has been rejected. diff --git a/crates/common/protos/api_upstream/temporal/api/workflow/v1/message.proto b/crates/common/protos/api_upstream/temporal/api/workflow/v1/message.proto index 51b39b76a..fdca1df4d 100644 --- a/crates/common/protos/api_upstream/temporal/api/workflow/v1/message.proto +++ b/crates/common/protos/api_upstream/temporal/api/workflow/v1/message.proto @@ -459,9 +459,15 @@ message CallbackInfo { // Trigger for when the workflow is closed. message WorkflowClosed {} + // Trigger for when a workflow update is completed. + message UpdateWorkflowExecutionCompleted { + string update_id = 1; + } + message Trigger { oneof variant { WorkflowClosed workflow_closed = 1; + UpdateWorkflowExecutionCompleted update_workflow_execution_completed = 2; } } diff --git a/crates/common/protos/api_upstream/temporal/api/workflowservice/v1/request_response.proto b/crates/common/protos/api_upstream/temporal/api/workflowservice/v1/request_response.proto index 5653ddf23..6d2d324a7 100644 --- a/crates/common/protos/api_upstream/temporal/api/workflowservice/v1/request_response.proto +++ b/crates/common/protos/api_upstream/temporal/api/workflowservice/v1/request_response.proto @@ -86,6 +86,11 @@ message ListNamespacesResponse { message DescribeNamespaceRequest { string namespace = 1; string id = 2; + // If true, the server may serve the response from an eventually-consistent + // source instead of reading through to persistence. Defaults to false, + // which preserves read-after-write consistency. SDKs should set this when + // fetching namespace capabilities on worker/client startup. + bool weak_consistency = 3; } message DescribeNamespaceResponse { @@ -199,6 +204,7 @@ message StartWorkflowExecutionRequest { temporal.api.common.v1.Priority priority = 27; // Deployment Options of the worker who will process the eager task. Passed when `request_eager_execution=true`. temporal.api.deployment.v1.WorkerDeploymentOptions eager_worker_deployment_options = 28; + // Time-skipping configuration. If not set, time skipping is disabled. temporal.api.workflow.v1.TimeSkippingConfig time_skipping_config = 29; } @@ -1803,6 +1809,9 @@ message UpdateWorkflowExecutionResponse { // request WaitPolicy, and before the context deadline expired; clients may // may then retry the call as needed. temporal.api.enums.v1.UpdateWorkflowExecutionLifecycleStage stage = 3; + + // Link to the update event. May be null if the update has not yet been accepted. + temporal.api.common.v1.Link link = 4; } message StartBatchOperationRequest { @@ -2065,6 +2074,7 @@ message ExecuteMultiOperationResponse { } // NOTE: keep in sync with temporal.api.batch.v1.BatchOperationUpdateActivityOptions +// Deprecated. Use `UpdateActivityExecutionOptionsRequest`. message UpdateActivityOptionsRequest { // Namespace of the workflow which scheduled this activity string namespace = 1; @@ -2092,17 +2102,56 @@ message UpdateActivityOptionsRequest { // If set, the activity options will be restored to the default. // Default options are then options activity was created with. - // They are part of the first SCHEDULE event. + // They are part of the first schedule event. + // This flag cannot be combined with any other option; if you supply + // restore_original together with other options, the request will be rejected. + bool restore_original = 8; +} + +message UpdateActivityExecutionOptionsRequest { + // Namespace of the workflow which scheduled this activity + string namespace = 1; + + // If provided, targets a workflow activity for the given workflow ID. + // If empty, targets a standalone activity. + string workflow_id = 2; + // The ID of the activity to target. + string activity_id = 3; + // Run ID of the workflow or standalone activity. + string run_id = 4; + + // The identity of the client who initiated this request + string identity = 5; + + // Activity options. Partial updates are accepted and controlled by update_mask + temporal.api.activity.v1.ActivityOptions activity_options = 6; + + // Controls which fields from `activity_options` will be applied + google.protobuf.FieldMask update_mask = 7; + + // If set, the activity options will be restored to the default. + // Default options are then options activity was created with. + // They are part of the first schedule event. // This flag cannot be combined with any other option; if you supply // restore_original together with other options, the request will be rejected. bool restore_original = 8; + + // Resource ID for routing. Contains "workflow:{workflow_id}" for workflow activities or "activity:{activity_id}" for standalone activities. + string resource_id = 9; } +// Deprecated. Use `UpdateActivityExecutionOptionsResponse`. message UpdateActivityOptionsResponse { // Activity options after an update temporal.api.activity.v1.ActivityOptions activity_options = 1; } +message UpdateActivityExecutionOptionsResponse { + // Activity options after an update + temporal.api.activity.v1.ActivityOptions activity_options = 1; +} + +// Deprecated. Use `PauseActivityExecutionRequest`. message PauseActivityRequest { // Namespace of the workflow which scheduled this activity. string namespace = 1; @@ -2123,11 +2172,45 @@ message PauseActivityRequest { // Reason to pause the activity. string reason = 6; + + // Used to de-dupe pause requests. + string request_id = 7; + +} + +message PauseActivityExecutionRequest { + // Namespace of the workflow which scheduled this activity. + string namespace = 1; + + // If provided, pause a workflow activity (or activities) for the given workflow ID. + // If empty, targets a standalone activity. + string workflow_id = 2; + // The ID of the activity to target. + string activity_id = 3; + // Run ID of the workflow or standalone activity. + string run_id = 4; + + // The identity of the client who initiated this request. + string identity = 5; + + // Reason to pause the activity. + string reason = 6; + + // Resource ID for routing. Contains "workflow:{workflow_id}" for workflow activities or "activity:{activity_id}" for standalone activities. + string resource_id = 7; + + // Used to de-dupe pause requests. + string request_id = 8; } +// Deprecated. Use `PauseActivityExecutionResponse`. message PauseActivityResponse { } +message PauseActivityExecutionResponse { +} + +// Deprecated. Use `UnpauseActivityExecutionRequest`. message UnpauseActivityRequest { // Namespace of the workflow which scheduled this activity. string namespace = 1; @@ -2157,10 +2240,46 @@ message UnpauseActivityRequest { google.protobuf.Duration jitter = 9; } +message UnpauseActivityExecutionRequest { + // Namespace of the workflow which scheduled this activity. + string namespace = 1; + + // If provided, targets a workflow activity for the given workflow ID. + // If empty, targets a standalone activity. + string workflow_id = 2; + // The ID of the activity to target. + string activity_id = 3; + // Run ID of the workflow or standalone activity. + string run_id = 4; + + // The identity of the client who initiated this request. + string identity = 5; + + // Providing this flag will also reset the number of attempts. + bool reset_attempts = 6; + + // Providing this flag will also reset the heartbeat details. + bool reset_heartbeat = 7; + + // Reason to unpause the activity. + string reason = 8; + + // If set, the activity will start at a random time within the specified jitter duration. + google.protobuf.Duration jitter = 9; + + // Resource ID for routing. Contains "workflow:{workflow_id}" for workflow activities or "activity:{activity_id}" for standalone activities. + string resource_id = 10; +} + +// Deprecated. Use `UnpauseActivityExecutionResponse`. message UnpauseActivityResponse { } +message UnpauseActivityExecutionResponse { +} + // NOTE: keep in sync with temporal.api.batch.v1.BatchOperationResetActivities +// Deprecated. Use `ResetActivityExecutionRequest`. message ResetActivityRequest { // Namespace of the workflow which scheduled this activity. string namespace = 1; @@ -2193,14 +2312,52 @@ message ResetActivityRequest { // If set, the activity options will be restored to the defaults. // Default options are then options activity was created with. - // They are part of the first SCHEDULE event. + // They are part of the first schedule event. bool restore_original_options = 9; +} + +message ResetActivityExecutionRequest { + // Namespace of the workflow which scheduled this activity. + string namespace = 1; + // If provided, targets a workflow activity for the given workflow ID. + // If empty, targets a standalone activity. + string workflow_id = 2; + // The ID of the activity to target. + string activity_id = 3; + // Run ID of the workflow or standalone activity. + string run_id = 4; + + // The identity of the client who initiated this request. + string identity = 5; + + // Indicates that activity should reset heartbeat details. + // This flag will be applied only to the new instance of the activity. + bool reset_heartbeat = 6; + + // If activity is paused, it will remain paused after reset + bool keep_paused = 7; + + // If set, and activity is in backoff, the activity will start at a random time within the specified jitter duration. + // (unless it is paused and keep_paused is set) + google.protobuf.Duration jitter = 8; + + // If set, the activity options will be restored to the defaults. + // Default options are then options activity was created with. + // They are part of the first schedule event. + bool restore_original_options = 9; + + // Resource ID for routing. Contains "workflow:{workflow_id}" for workflow activities or "activity:{activity_id}" for standalone activities. + string resource_id = 10; } +// Deprecated. Use `ResetActivityExecutionRequest`. message ResetActivityResponse { } +message ResetActivityExecutionResponse { +} + // Keep the parameters in sync with: // - temporal.api.batch.v1.BatchOperationUpdateWorkflowExecutionOptions. // - temporal.api.workflow.v1.PostResetOperation.UpdateWorkflowOptions. @@ -2754,6 +2911,7 @@ message RecordWorkerHeartbeatRequest { string identity = 2; repeated temporal.api.worker.v1.WorkerHeartbeat worker_heartbeat = 3; + // Resource ID for routing. Contains the worker grouping key. string resource_id = 4; } @@ -2780,6 +2938,10 @@ message ListWorkersRequest { //* StartTime //* Status string query = 4; + + // When true, the response will include system workers that are created implicitly + // by the server and not by the user. By default, system workers are excluded. + bool include_system_workers = 5; } message ListWorkersResponse { diff --git a/crates/common/protos/api_upstream/temporal/api/workflowservice/v1/service.proto b/crates/common/protos/api_upstream/temporal/api/workflowservice/v1/service.proto index 6a4287100..49be10dfb 100644 --- a/crates/common/protos/api_upstream/temporal/api/workflowservice/v1/service.proto +++ b/crates/common/protos/api_upstream/temporal/api/workflowservice/v1/service.proto @@ -10,9 +10,10 @@ option ruby_package = "Temporalio::Api::WorkflowService::V1"; option csharp_namespace = "Temporalio.Api.WorkflowService.V1"; -import "temporal/api/workflowservice/v1/request_response.proto"; import "google/api/annotations.proto"; +import "nexusannotations/v1/options.proto"; import "temporal/api/protometa/v1/annotations.proto"; +import "temporal/api/workflowservice/v1/request_response.proto"; // WorkflowService API defines how Temporal SDKs and other clients interact with the Temporal server // to create and interact with workflows and activities. @@ -495,6 +496,8 @@ service WorkflowService { // (-- api-linter: core::0136::prepositions=disabled // aip.dev/not-precedent: "With" is used to indicate combined operation. --) rpc SignalWithStartWorkflowExecution (SignalWithStartWorkflowExecutionRequest) returns (SignalWithStartWorkflowExecutionResponse) { + option (nexusannotations.v1.operation).tags = "exposed"; + option (google.api.http) = { post: "/namespaces/{namespace}/workflows/{workflow_id}/signal-with-start/{signal_name}" body: "*" @@ -1527,6 +1530,10 @@ service WorkflowService { body: "*" } }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "workflow:{execution.workflow_id}" + }; } // WorkerHeartbeat receive heartbeat request from the worker. @@ -1862,6 +1869,141 @@ service WorkflowService { // aip.dev/not-precedent: Activity deletion not exposed to HTTP, users should use cancel or terminate. --) rpc DeleteActivityExecution (DeleteActivityExecutionRequest) returns (DeleteActivityExecutionResponse) {} + // PauseActivityExecution pauses the execution of an activity specified by its ID. + // This API can be used to target a workflow activity or a standalone activity + // + // Pausing an activity means: + // - If the activity is currently waiting for a retry or is running and subsequently fails, + // it will not be rescheduled until it is unpaused. + // - If the activity is already paused, calling this method will have no effect. + // - If the activity is running and finishes successfully, the activity will be completed. + // - If the activity is running and finishes with failure: + // * if there is no retry left - the activity will be completed. + // * if there are more retries left - the activity will be paused. + // For long-running activities: + // - activities in paused state will send a cancellation with "activity_paused" set to 'true' in response to 'RecordActivityTaskHeartbeat'. + // + // Returns a `NotFound` error if there is no pending activity with the provided ID + rpc PauseActivityExecution (PauseActivityExecutionRequest) returns (PauseActivityExecutionResponse) { + option (google.api.http) = { + // Standalone activity + post: "/namespaces/{namespace}/activities/{activity_id}/pause" + body: "*" + additional_bindings { + post: "/api/v1/namespaces/{namespace}/activities/{activity_id}/pause" + body: "*" + } + // Workflow activity + additional_bindings { + post: "/namespaces/{namespace}/workflows/{workflow_id}/activities/{activity_id}/pause" + body: "*" + } + additional_bindings { + post: "/api/v1/namespaces/{namespace}/workflows/{workflow_id}/activities/{activity_id}/pause" + body: "*" + } + }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "{resource_id}" + }; + } + + // ResetActivityExecution resets the execution of an activity specified by its ID. + // This API can be used to target a workflow activity or a standalone activity. + // + // Resetting an activity means: + // * number of attempts will be reset to 0. + // * activity timeouts will be reset. + // * if the activity is waiting for retry, and it is not paused or 'keep_paused' is not provided: + // it will be scheduled immediately (* see 'jitter' flag) + // + // Returns a `NotFound` error if there is no pending activity with the provided ID or type. + rpc ResetActivityExecution (ResetActivityExecutionRequest) returns (ResetActivityExecutionResponse) { + option (google.api.http) = { + // Standalone activity + post: "/namespaces/{namespace}/activities/{activity_id}/reset" + body: "*" + additional_bindings { + post: "/api/v1/namespaces/{namespace}/activities/{activity_id}/reset" + body: "*" + } + // Workflow activity + additional_bindings { + post: "/namespaces/{namespace}/workflows/{workflow_id}/activities/{activity_id}/reset" + body: "*" + } + additional_bindings { + post: "/api/v1/namespaces/{namespace}/workflows/{workflow_id}/activities/{activity_id}/reset" + body: "*" + } + }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "{resource_id}" + }; + } + + // UnpauseActivityExecution unpauses the execution of an activity specified by its ID. + // This API can be used to target a workflow activity or a standalone activity. + // + // If activity is not paused, this call will have no effect. + // If the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag). + // Once the activity is unpaused, all timeout timers will be regenerated. + // + // Returns a `NotFound` error if there is no pending activity with the provided ID + rpc UnpauseActivityExecution (UnpauseActivityExecutionRequest) returns (UnpauseActivityExecutionResponse) { + option (google.api.http) = { + // Standalone activity + post: "/namespaces/{namespace}/activities/{activity_id}/unpause" + body: "*" + additional_bindings { + post: "/api/v1/namespaces/{namespace}/activities/{activity_id}/unpause" + body: "*" + } + // Workflow activity + additional_bindings { + post: "/namespaces/{namespace}/workflows/{workflow_id}/activities/{activity_id}/unpause" + body: "*" + } + additional_bindings { + post: "/api/v1/namespaces/{namespace}/workflows/{workflow_id}/activities/{activity_id}/unpause" + body: "*" + } + }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "{resource_id}" + }; + } + + // UpdateActivityExecutionOptions is called by the client to update the options of an activity by its ID. + // This API can be used to target a workflow activity or a standalone activity. + rpc UpdateActivityExecutionOptions (UpdateActivityExecutionOptionsRequest) returns (UpdateActivityExecutionOptionsResponse) { + option (google.api.http) = { + // Standalone activity + post: "/namespaces/{namespace}/activities/{activity_id}/update-options" + body: "*" + additional_bindings { + post: "/api/v1/namespaces/{namespace}/activities/{activity_id}/update-options" + body: "*" + } + // Workflow activity + additional_bindings { + post: "/namespaces/{namespace}/workflows/{workflow_id}/activities/{activity_id}/update-options" + body: "*" + } + additional_bindings { + post: "/api/v1/namespaces/{namespace}/workflows/{workflow_id}/activities/{activity_id}/update-options" + body: "*" + } + }; + option (temporal.api.protometa.v1.request_header) = { + header: "temporal-resource-id" + value: "{resource_id}" + }; + } + // TerminateNexusOperationExecution terminates an existing Nexus operation immediately. // // Termination happens immediately and the operation handler cannot react to it. A terminated operation will have diff --git a/crates/sdk-core-c-bridge/src/client.rs b/crates/sdk-core-c-bridge/src/client.rs index a050533bd..72b9d7b3e 100644 --- a/crates/sdk-core-c-bridge/src/client.rs +++ b/crates/sdk-core-c-bridge/src/client.rs @@ -784,6 +784,9 @@ async fn call_workflow_service( } "PatchSchedule" => rpc_call_on_trait!(client, call, WorkflowService, patch_schedule), "PauseActivity" => rpc_call_on_trait!(client, call, WorkflowService, pause_activity), + "PauseActivityExecution" => { + rpc_call_on_trait!(client, call, WorkflowService, pause_activity_execution) + } "PauseWorkflowExecution" => { rpc_call_on_trait!(client, call, WorkflowService, pause_workflow_execution) } @@ -859,6 +862,9 @@ async fn call_workflow_service( ) } "ResetActivity" => rpc_call_on_trait!(client, call, WorkflowService, reset_activity), + "ResetActivityExecution" => { + rpc_call_on_trait!(client, call, WorkflowService, reset_activity_execution) + } "ResetStickyTaskQueue" => { rpc_call_on_trait!(client, call, WorkflowService, reset_sticky_task_queue) } @@ -999,9 +1005,20 @@ async fn call_workflow_service( "UnpauseActivity" => { rpc_call_on_trait!(client, call, WorkflowService, unpause_activity) } + "UnpauseActivityExecution" => { + rpc_call_on_trait!(client, call, WorkflowService, unpause_activity_execution) + } "UnpauseWorkflowExecution" => { rpc_call_on_trait!(client, call, WorkflowService, unpause_workflow_execution) } + "UpdateActivityExecutionOptions" => { + rpc_call_on_trait!( + client, + call, + WorkflowService, + update_activity_execution_options + ) + } "UpdateActivityOptions" => { rpc_call_on_trait!(client, call, WorkflowService, update_activity_options) } diff --git a/crates/sdk-core/src/replay/history_builder.rs b/crates/sdk-core/src/replay/history_builder.rs index 0bcbf5453..b4040c1eb 100644 --- a/crates/sdk-core/src/replay/history_builder.rs +++ b/crates/sdk-core/src/replay/history_builder.rs @@ -519,6 +519,9 @@ impl TestHistoryBuilder { name: update_name.into(), args: None, }), + request_id: String::new(), + completion_callbacks: vec![], + links: vec![], }), protocol_instance_id, }; diff --git a/crates/sdk-core/src/test_help/integ_helpers.rs b/crates/sdk-core/src/test_help/integ_helpers.rs index 773244b96..75effd510 100644 --- a/crates/sdk-core/src/test_help/integ_helpers.rs +++ b/crates/sdk-core/src/test_help/integ_helpers.rs @@ -921,6 +921,9 @@ impl PollWFTRespExt for PollWorkflowTaskQueueResponse { name: "update_fn".to_string(), args: None, }), + request_id: String::new(), + completion_callbacks: vec![], + links: vec![], }; self.messages.push(protocol::v1::Message { id: format!("update-{}", update_id.to_string()), diff --git a/crates/sdk-core/src/worker/workflow/machines/update_state_machine.rs b/crates/sdk-core/src/worker/workflow/machines/update_state_machine.rs index b3222355b..db4a7e6c2 100644 --- a/crates/sdk-core/src/worker/workflow/machines/update_state_machine.rs +++ b/crates/sdk-core/src/worker/workflow/machines/update_state_machine.rs @@ -64,6 +64,7 @@ fsm! { } #[derive(Debug, derive_more::Display)] +#[allow(clippy::large_enum_variant)] pub(super) enum UpdateMachineCommand { #[display("Accept")] Accept(update::v1::Request), diff --git a/crates/sdk-core/src/worker/workflow/machines/workflow_machines.rs b/crates/sdk-core/src/worker/workflow/machines/workflow_machines.rs index 9dbf4c35e..45b745a8b 100644 --- a/crates/sdk-core/src/worker/workflow/machines/workflow_machines.rs +++ b/crates/sdk-core/src/worker/workflow/machines/workflow_machines.rs @@ -754,6 +754,7 @@ impl WorkflowMachines { } // Needed to delay mutation of self until after we've iterated over peeked events. + #[allow(clippy::large_enum_variant)] enum DelayedAction { WakeLa(MachineKey, Box), ProtocolMessage(IncomingProtocolMessage), diff --git a/crates/sdk-core/tests/integ_tests/worker_heartbeat_tests.rs b/crates/sdk-core/tests/integ_tests/worker_heartbeat_tests.rs index 5f6449931..0e6fb7101 100644 --- a/crates/sdk-core/tests/integ_tests/worker_heartbeat_tests.rs +++ b/crates/sdk-core/tests/integ_tests/worker_heartbeat_tests.rs @@ -80,6 +80,7 @@ async fn list_worker_heartbeats(client: &Client, query: impl Into) -> Ve page_size: 200, next_page_token: Vec::new(), query: query.into(), + include_system_workers: false, } .into_request(), ) @@ -231,6 +232,7 @@ async fn docker_worker_heartbeat_basic(#[values("otel", "prom", "no_metrics")] b page_size: 100, next_page_token: Vec::new(), query: String::new(), + include_system_workers: false, } .into_request(), ) @@ -271,6 +273,7 @@ async fn docker_worker_heartbeat_basic(#[values("otel", "prom", "no_metrics")] b page_size: 100, next_page_token: Vec::new(), query: String::new(), + include_system_workers: false, } .into_request(), ) @@ -398,6 +401,7 @@ async fn docker_worker_heartbeat_tuner() { page_size: 100, next_page_token: Vec::new(), query: String::new(), + include_system_workers: false, } .into_request(), ) @@ -1065,6 +1069,7 @@ async fn worker_heartbeat_no_runtime_heartbeat() { page_size: 100, next_page_token: Vec::new(), query: String::new(), + include_system_workers: false, } .into_request(), ) @@ -1135,6 +1140,7 @@ async fn worker_heartbeat_skip_client_worker_set_check() { page_size: 100, next_page_token: Vec::new(), query: String::new(), + include_system_workers: false, } .into_request(), )