Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions crates/protos/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ const SERDE_DERIVE_PREFIXES: &[&str] = &[
".temporal.api.replication",
".temporal.api.rules",
".temporal.api.schedule",
".temporal.api.session",
".temporal.api.taskqueue",
".temporal.api.testservice",
".temporal.api.update",
Expand Down
20 changes: 0 additions & 20 deletions crates/protos/protos/api_upstream/buf.gen.yaml

This file was deleted.

12 changes: 12 additions & 0 deletions crates/protos/protos/api_upstream/openapi/openapiv2.json
Original file line number Diff line number Diff line change
Expand Up @@ -12917,6 +12917,10 @@
"propagatedNexusSerializationContext": {
"$ref": "#/definitions/v1PropagatedSerializationContext",
"description": "Serialization context propagated from the Nexus caller that started this workflow."
},
"timeSkippingStatePropagation": {
"$ref": "#/definitions/v1TimeSkippingStatePropagation",
"description": "Time-skipping state propagated by the execution that started this workflow.\nThis field is intended for use by the Temporal server, for example when a schedule\nstarts a workflow, and is not intended to be set by external clients."
}
}
},
Expand Down Expand Up @@ -19591,6 +19595,10 @@
"type": "string",
"format": "int64",
"description": "Size of the schedule's internal state (including payloads) in bytes."
},
"timeSkippingInfo": {
"$ref": "#/definitions/v1TimeSkippingInfo",
"description": "Information about time skipping for this schedule.\nIf the schedule has never enabled time skipping, this will be unset."
}
}
},
Expand Down Expand Up @@ -19688,6 +19696,10 @@
},
"unpause": {
"type": "string"
},
"timeSkippingConfig": {
"$ref": "#/definitions/v1TimeSkippingConfig",
"description": "If set, applies the specified time-skipping configuration to this schedule,\nreplacing any existing time-skipping configuration."
}
}
},
Expand Down
19 changes: 19 additions & 0 deletions crates/protos/protos/api_upstream/openapi/openapiv3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16446,6 +16446,12 @@ components:
stateSizeBytes:
type: string
description: Size of the schedule's internal state (including payloads) in bytes.
timeSkippingInfo:
allOf:
- $ref: '#/components/schemas/TimeSkippingInfo'
description: |-
Information about time skipping for this schedule.
If the schedule has never enabled time skipping, this will be unset.
ScheduleListEntry:
type: object
properties:
Expand Down Expand Up @@ -16517,6 +16523,12 @@ components:
notes field to the value of the string.
unpause:
type: string
timeSkippingConfig:
allOf:
- $ref: '#/components/schemas/TimeSkippingConfig'
description: |-
If set, applies the specified time-skipping configuration to this schedule,
replacing any existing time-skipping configuration.
SchedulePolicies:
type: object
properties:
Expand Down Expand Up @@ -17846,6 +17858,13 @@ components:
allOf:
- $ref: '#/components/schemas/PropagatedSerializationContext'
description: Serialization context propagated from the Nexus caller that started this workflow.
timeSkippingStatePropagation:
allOf:
- $ref: '#/components/schemas/TimeSkippingStatePropagation'
description: |-
Time-skipping state propagated by the execution that started this workflow.
This field is intended for use by the Temporal server, for example when a schedule
starts a workflow, and is not intended to be set by external clients.
StartWorkflowExecutionResponse:
type: object
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import "temporal/api/enums/v1/command_type.proto";
import "temporal/api/common/v1/message.proto";
import "temporal/api/failure/v1/message.proto";
import "temporal/api/taskqueue/v1/message.proto";
import "temporal/api/session/v1/message.proto";
import "temporal/api/workflow/v1/message.proto";
import "temporal/api/sdk/v1/user_metadata.proto";
import "temporal/api/sdk/v1/event_group_marker.proto";
Expand Down Expand Up @@ -68,6 +69,8 @@ message ScheduleActivityTaskCommandAttributes {
// Priority metadata. If this message is not present, or any fields are not
// present, they inherit the values from the workflow.
temporal.api.common.v1.Priority priority = 14;

temporal.api.session.v1.ActivitySessionOptions session_options = 15;
}

message RequestCancelActivityTaskCommandAttributes {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,10 @@ message SchedulePatch {
// notes field to the value of the string.
string pause = 3;
string unpause = 4;

// If set, applies the specified time-skipping configuration to this schedule,
// replacing any existing time-skipping configuration.
temporal.api.common.v1.TimeSkippingConfig time_skipping_config = 5;
}

message ScheduleInfo {
Expand Down Expand Up @@ -352,6 +356,10 @@ message ScheduleInfo {

// Size of the schedule's internal state (including payloads) in bytes.
int64 state_size_bytes = 12;

// Information about time skipping for this schedule.
// If the schedule has never enabled time skipping, this will be unset.
temporal.api.common.v1.TimeSkippingInfo time_skipping_info = 13;
}

message Schedule {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
syntax = "proto3";

package temporal.api.session.v1;

option go_package = "go.temporal.io/api/session/v1;session";
option java_package = "io.temporal.api.session.v1";
option java_multiple_files = true;
option java_outer_classname = "MessageProto";
option ruby_package = "Temporalio::Api::Session::V1";
option csharp_namespace = "Temporalio.Api.Session.V1";

message ActivitySessionOptions {
oneof session {
bool workflow_sticky_session = 1;

// later session_id, etc
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,14 @@ message StartWorkflowExecutionRequest {

// Time-skipping configuration. If not set, time skipping is disabled.
temporal.api.common.v1.TimeSkippingConfig time_skipping_config = 29;

// Serialization context propagated from the Nexus caller that started this workflow.
temporal.api.nexus.v1.PropagatedSerializationContext propagated_nexus_serialization_context = 30;

// Time-skipping state propagated by the execution that started this workflow.
// This field is intended for use by the Temporal server, for example when a schedule
// starts a workflow, and is not intended to be set by external clients.
temporal.api.common.v1.TimeSkippingStatePropagation time_skipping_state_propagation = 31;
}

message StartWorkflowExecutionResponse {
Expand Down Expand Up @@ -317,6 +323,17 @@ message PollWorkflowTaskQueueRequest {
// Removed in 1.55.0; was temporal.api.worker.v1.WorkerHeartbeat worker_heartbeat
reserved 7;
reserved "worker_heartbeat";

// EXPERIMENTAL. Subject to removal in the future.
// This flag is only applicable to sticky polls. In this mode, server will forward the workflow task sticky polls
// to the normal queue only once. The forwarding to normal queue will stop once a single task is dispatched from the
// normal queue to pollers of this particular sticky queue.
// Server persists the workflow ID of the first matched task in the sticky task queue's metadata. This will allow
// system to enforce single-workflow mode even when the server crashes, or a worker with stable identity restarts
// (when worker's sticky queue name remains the same after restart.)
// For activity sticky polls, this mode will disable forwarding to normal queue completely.
// (-- api-linter: core::0140::prepositions=disabled
bool single_workflow_mode = 11;
}

message PollWorkflowTaskQueueResponse {
Expand Down Expand Up @@ -547,6 +564,17 @@ message PollActivityTaskQueueRequest {
// Removed in 1.55.0; was temporal.api.worker.v1.WorkerHeartbeat worker_heartbeat
reserved 7;
reserved "worker_heartbeat";

// EXPERIMENTAL. Subject to removal in the future.
// This flag is only applicable to sticky polls. In this mode, server will forward the workflow task sticky polls
// to the normal queue only once. The forwarding to normal queue will stop once a single task is dispatched from the
// normal queue to pollers of this particular sticky queue.
// Server persists the workflow ID of the first matched task in the sticky task queue's metadata. This will allow
// system to enforce single-workflow mode even when the server crashes, or a worker with stable identity restarts
// (when worker's sticky queue name remains the same after restart.)
// For activity sticky polls, this mode will disable forwarding to normal queue completely.
// (-- api-linter: core::0140::prepositions=disabled
bool single_workflow_mode = 11;
}

message PollActivityTaskQueueResponse {
Expand Down
6 changes: 6 additions & 0 deletions crates/protos/src/protos/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1910,6 +1910,7 @@ pub mod temporal {
request_eager_execution: !s.do_not_eagerly_execute,
use_workflow_build_id,
priority: s.priority,
session_options: None,
},
)
}
Expand Down Expand Up @@ -2614,6 +2615,11 @@ pub mod temporal {
include_proto_with_serde!("temporal.api.sdk.v1");
}
}
pub mod session {
pub mod v1 {
tonic::include_proto!("temporal.api.session.v1");
}
}
pub mod taskqueue {
pub mod v1 {
tonic::include_proto!("temporal.api.taskqueue.v1");
Expand Down
2 changes: 2 additions & 0 deletions crates/sdk-core/src/worker/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,7 @@ impl WorkerClient for WorkerClientBag {
worker_instance_key: self.worker_instance_key.to_string(),
worker_control_task_queue: self.worker_control_task_queue(),
poller_group_id: Default::default(),
single_workflow_mode: false,
}
.into_request();
request.extensions_mut().insert(IsWorkerTaskLongPoll);
Expand Down Expand Up @@ -536,6 +537,7 @@ impl WorkerClient for WorkerClientBag {
worker_instance_key: self.worker_instance_key.to_string(),
worker_control_task_queue: self.worker_control_task_queue(),
poller_group_id: Default::default(),
single_workflow_mode: false,
}
.into_request();
request.extensions_mut().insert(IsWorkerTaskLongPoll);
Expand Down
Loading