Skip to content

Commit 3a251c7

Browse files
authored
Merge branch 'main' into codex/activity-options-ui-docs
2 parents 97d1ffb + 2a52d08 commit 3a251c7

21 files changed

Lines changed: 230 additions & 588 deletions

docs/cloud/operation-api.mdx

Lines changed: 53 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,21 @@ The Temporal Cloud Operations API, or the Cloud Ops API, is an open source, publ
2222

2323
## Develop applications with the Cloud Ops API
2424

25-
You can use the HTTP API or the gRPC API depending on how you need to integrate with your platform. The URL to access both the HTTP and gRPC Cloud Ops API is `saas-api.tmprl.cloud`.
25+
You can use the HTTP API or the gRPC API depending on how you need to integrate with your platform.
26+
27+
- HTTP: `https://saas-api.tmprl.cloud`
28+
- gRPC: `saas-api.tmprl.cloud:443`
29+
30+
If you connect to Temporal Cloud over [AWS PrivateLink](/cloud/connectivity/aws-connectivity) or [GCP Private Service Connect](/cloud/connectivity/gcp-connectivity), configure private DNS for `saas-api.tmprl.cloud` so control-plane clients (Cloud Ops API, Terraform, tcld) reach the private endpoint.
2631

2732
### Prerequisites
2833

2934
These prerequisites are required for using either HTTP or gRPC.
3035

31-
- [Temporal Cloud user account](/cloud/get-started)
32-
- [API Key](/cloud/tcld/apikey#create) for authentication
36+
- A Temporal Cloud [User](/cloud/manage-access/users) or [Service Account](/cloud/manage-access/service-accounts)
37+
- An [API Key](/cloud/api-keys#manage-api-keys) for authentication (owned by that User or Service Account)
38+
39+
Required [roles and permissions](/cloud/manage-access/roles-and-permissions) vary by operation. Some account-wide management operations require Account Owner or Global Admin. Others work with Developer, Finance Admin, Namespace Admin, or custom roles.
3340

3441
### Use cases
3542

@@ -68,17 +75,17 @@ To start using the Go SDK with the Cloud Ops API, follow these steps:
6875

6976
1. Install the Go SDK:
7077
```go
71-
go get github.com/temporalio/cloud-sdk-go
78+
go get go.temporal.io/cloud-sdk@latest
7279
```
7380

7481
2. Import and use the SDK:
7582
```go
7683
import (
77-
"github.com/temporalio/cloud-sdk-go/client"
84+
"go.temporal.io/cloud-sdk/cloudclient"
7885
)
7986
```
8087

81-
3. The Go SDK provides pre-built client interfaces that handle authentication and connection setup. Refer to the [Go samples](https://github.com/temporalio/cloud-samples-go) for detailed usage examples.
88+
3. The Go SDK provides pre-built client interfaces that handle authentication and connection setup. Refer to the [Go samples](https://github.com/temporalio/cloud-samples-go) for detailed usage examples, including [Cloud Ops API client setup](https://github.com/temporalio/cloud-samples-go/blob/main/client/api/client.go).
8289

8390
The Go SDK eliminates the need to work directly with generated protobuf files and provides a more idiomatic Go experience.
8491

@@ -88,60 +95,64 @@ For programming languages other than Go, download the gRPC protobufs from the [C
8895

8996
Use [gRPC](https://grpc.io/docs/) to compile and generate code in your preferred [programming language](https://grpc.io/docs/#official-support). The steps below use Python as an example and require [Python's gRPC tools](https://grpc.io/docs/languages/python/quickstart/#grpc-tools) to be installed, but the approach can be adapted for other supported programming languages.
9097

98+
You can also generate clients from the published Buf module at [buf.build/temporalio/cloud-api](https://buf.build/temporalio/cloud-api).
99+
91100
1. Clone the Temporal Cloud API repository:
92101

93102
```command
94103
git clone https://github.com/temporalio/cloud-api.git
95104
cd cloud-api
96105
```
97106

98-
2. Copy Protobuf files:
99-
100-
- Navigate to the `temporal` directory.
101-
- Copy the protobuf files to your project directory.
107+
2. Compile the Protobuf files from the repository root (protos live under `temporal/` and import each other):
102108

103-
3. Compile the Protobuf files:
104-
105-
```python
106-
python -m grpc_tools.protoc -I./ --python_out=./ --grpc_python_out=./ *.proto
109+
```command
110+
python -m grpc_tools.protoc \
111+
-I. \
112+
--python_out=. \
113+
--grpc_python_out=. \
114+
$(find temporal -name '*.proto')
107115
```
108-
- `-I` specifies the directory of the `.proto` files.
109-
- `--python_out=` sets the output directory for generated Python classes.
110-
- `--grpc_python_out=` sets the output directory for generated gRPC service classes.
111-
- `*.proto` processes all `.proto` files.
116+
117+
- `-I.` adds the repository root to the import path.
118+
- `--python_out=` and `--grpc_python_out=` set the output directories for generated classes.
119+
- `find temporal -name '*.proto'` includes all Cloud Ops API protos and their dependencies under `temporal/`.
112120

113121
After compiling the Protobuf files, you will have generated code files in your project directory.
114122
These files enable interaction with the Temporal Cloud API in your chosen programming language.
115123

116-
4. Import the Generated Files:
117-
118-
- Locate the Python files (.py) generated in your project directory.
119-
- Import these files into your Python application where you intend to interact with the Temporal Cloud API.
120-
121-
2. Use the API:
122-
- Use the classes and methods defined in the imported files to communicate with the Temporal Cloud services.
123-
- Ensure to handle any required authentication or configuration as needed for Temporal Cloud.
124+
3. Import the generated files into your application and call the Cloud Ops API. Handle authentication with an API key and set the API version header as described in [Usage guidelines](#usage-guidelines).
124125

125126
This approach can be adapted for other programming languages by following their respective import and usage conventions for the generated code files.
126127

127128
## Usage guidelines
128129

129130
When interacting with the Temporal Cloud Ops API, follow these guidelines:
130131

131-
- API version header:
132-
- Always include the `temporal-cloud-api-version` header in your requests, specifying the API version identifier.
133-
- The current API version can be found [here](https://github.com/temporalio/cloud-api/blob/main/VERSION#L1C1-L1C14).
134-
- Connection URL:
135-
- Connect to the Temporal Cloud using the gRPC URL: `saas-api.tmprl.cloud:443`.
136-
- Engagement steps:
137-
- Generate API key:
138-
- Obtain an [API Key for authentication](/cloud/api-keys#manage-api-keys). Note that many operations may require Admin privileges.
139-
- Set up client:
140-
- Establish a secure connection to the Temporal Cloud. Refer to the example [Client setup in Go](https://github.com/temporalio/cloud-samples-go/blob/main/client/temporal/client.go) for guidance.
141-
- Execute operations:
142-
- For operation specifics, refer to the `cloudservice/v1/request_response.proto` for gRPC messages and `cloudservice/v1/service.proto` for gRPC services.
143-
144-
These steps provide a structured approach to using the Temporal Cloud Ops API effectively, ensuring proper authentication and connection setup.
132+
### API version header
133+
134+
Use the `temporal-cloud-api-version` header to select an API version. The backend uses this version to safely mutate resources. The current API version is in the [`cloud-api` VERSION file](https://github.com/temporalio/cloud-api/blob/main/VERSION).
135+
136+
**gRPC**
137+
138+
gRPC clients must send a `temporal-cloud-api-version` header on every request.
139+
140+
**HTTP**
141+
142+
For HTTP clients, the version header is optional. If omitted, the HTTP gateway defaults it to the latest API version. This supports simple `curl` usage without looking up a version first.
143+
144+
For production HTTP automation, still pin an explicit version so behavior does not change when the gateway’s latest version advances.
145+
146+
### Connection URL
147+
148+
- gRPC: `saas-api.tmprl.cloud:443`
149+
- HTTP: `https://saas-api.tmprl.cloud`
150+
151+
### Engagement steps
152+
153+
1. Generate an [API Key for authentication](/cloud/api-keys#manage-api-keys). Required permissions vary by operation; see [roles and permissions](/cloud/manage-access/roles-and-permissions).
154+
2. Establish a secure connection. For Go, see [Cloud Ops API client setup](https://github.com/temporalio/cloud-samples-go/blob/main/client/api/client.go).
155+
3. Execute operations. For request and response messages, see `cloudservice/v1/request_response.proto`. For services, see `cloudservice/v1/service.proto`.
145156

146157
## Rate limits
147158

@@ -163,9 +174,9 @@ This limit applies to all requests made by each user through any client (tcld, U
163174

164175
This limit applies to all requests made by each service account through any client (tcld, Cloud Ops API).
165176

166-
**Asynchronous Operations: 10 concurrent operations at a time**
177+
**Asynchronous operations: 10 concurrent operations at a time**
167178

168-
This limits the number of concurrent asynchronous operations that can be in-flight at any given time.
179+
By default, each account can have up to 10 long-running (asynchronous) mutating operations in flight at once. This limit applies to a subset of create, update, and delete operations (for example Namespace, User, API Key, Export Sink, and Service Account mutations), not every RPC that returns an async operation.
169180

170181
### Important considerations
171182

docs/develop/worker-performance.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ worker = Temporalio::Worker.new(
344344

345345
### Cache options (Java SDK) {/* #cache-options */}
346346

347-
A Workflow Cache is created and shared between all Workers on a single host.
347+
A [Workflow Cache](/workflow-execution#workflow-cache) is created and shared between all Workers on a single host.
348348
It's designed to limit the resources used by the cache for each host/process.
349349
These options are defined on `WorkerFactoryOptions`:
350350

@@ -371,7 +371,7 @@ These properties should always be true for a Worker's configuration.
371371
Perform this sanity check after the adjustments to Worker settings.
372372

373373
1. `workflowCacheSize` should be ≤ `maxWorkflowThreadCount`. Each Workflow has at least one Workflow thread.
374-
2. `maxConcurrentWorkflowTaskExecutionSize` should be ≤ `maxWorkflowThreadCount`. Having more Worker slots than the Workflow cache size will lead to resource contention/stealing between executors and unpredictable delays. It's recommended that `maxWorkflowThreadCount` be at least 2x of `maxConcurrentWorkflowTaskExecutionSize`.
374+
2. `maxConcurrentWorkflowTaskExecutionSize` should be ≤ `maxWorkflowThreadCount`. It's recommended that `maxWorkflowThreadCount` be at least 2x of `maxConcurrentWorkflowTaskExecutionSize`. This is because having more Worker slots than the Workflow cache size will lead to resource allocation issues between executors and cause unpredictable delays.
375375
3. `maxConcurrentWorkflowTaskPollers` should be significantly ≤ `maxConcurrentWorkflowTaskExecutionSize`. And `maxConcurrentActivityTaskPollers` should be significantly ≤ `maxConcurrentActivityExecutionSize`. The number of pollers should always be lower than the number of executors.
376376

377377
## Worker runtime performance tuning {/* #worker-performance-tuning */}

docs/encyclopedia/workflow/workflow-execution/workflow-execution.mdx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ keywords:
1010
tags:
1111
- Concepts
1212
- Workflows
13-
1413
---
1514

1615
import { CaptionedImage } from '@site/src/components';
@@ -25,6 +24,7 @@ This page provides an overview of Workflow Execution:
2524
- [Workflow Execution Chain](#workflow-execution-chain)
2625
- [Memo](#memo)
2726
- [State Transition](#state-transition)
27+
- [Workflow cache](#workflow-cache)
2828

2929
## What is a Workflow Execution? {/* #workflow-execution */}
3030

@@ -207,3 +207,11 @@ For more information on Workflow Execution, please refer to the following subpag
207207
- [Continue-as-New](/workflow-execution/continue-as-new)
208208
- [Timers and Start Delay](/workflow-execution/timers-delays)
209209
:::
210+
211+
## Workflow cache
212+
213+
A Workflow Cache is an in-memory LRU (least recently used) cache maintained by Workers that stores the state of Workflow Executions they have processed.
214+
215+
When a Worker picks up a Workflow Task, it caches the Workflow's state in memory. This allows the Worker to continue processing subsequent Tasks for that Workflow without having to fetch the full Event History from the server and replay it from scratch.
216+
217+
This caching mechanism is closely tied to [Sticky Execution](/sticky-execution). The Temporal Service directs future Workflow Tasks to the same Worker that cached the Workflow, via a dedicated "Sticky Queue". If the cached Workflow is evicted, to make room for another for example, the Worker must replay the Event History to restore its state before continuing.

docs/glossary.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -805,6 +805,10 @@ are executed with the same Worker without requiring you to manually specify Task
805805
In day-to-day conversations, the term "Workflow" frequently denotes either a Workflow Type, a Workflow Definition, or a
806806
Workflow Execution.
807807

808+
#### [Workflow cache](/workflow-execution#workflow-cache)
809+
810+
An in-memory cache on a Worker that holds the state of Workflow Executions it has processed so later Workflow Tasks can avoid a full Event History replay. Used with [Sticky Execution](/sticky-execution). See also [Workflow Cache Tuning](/develop/worker-performance#workflow-cache-tuning).
811+
808812
<!-- _Tags: [term](/tags/term), [explanation](/tags/explanation)_ -->
809813

810814
#### [Workflow Definition](/workflow-definition)

docusaurus.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ module.exports = async function createConfigAsync() {
250250
'**/clusters/**',
251251
'**/ai-cookbook/**',
252252
], // partials (underscore-prefixed) + context content we don't render
253-
editUrl: 'https://github.com/temporalio/documentation/edit/main/docs/',
253+
editUrl: 'https://github.com/temporalio/documentation/blob/main/',
254254
/**
255255
* Whether to display the author who last updated the doc.
256256
*/

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
"@types/react": "^19.2.17",
7171
"@types/react-dom": "^19.1.0",
7272
"@vercel/functions": "^3.7.5",
73-
"algoliasearch": "^5.54.1",
73+
"algoliasearch": "^5.55.1",
7474
"chart.js": "^4.4.1",
7575
"clsx": "^2.1.1",
7676
"comlink": "^4.4.2",
@@ -83,7 +83,7 @@
8383
"react": "^19.2.7",
8484
"react-dom": "^19.2.7",
8585
"react-icons": "^5.6.0",
86-
"react-instantsearch": "^7.36.0",
86+
"react-instantsearch": "^7.38.0",
8787
"react-markdown": "^10.1.0",
8888
"react-player": "^3.4.0",
8989
"rehype-katex": "7",

src/components/ToolTipTerm/ToolTipText.js

Lines changed: 0 additions & 133 deletions
This file was deleted.

0 commit comments

Comments
 (0)