Skip to content

Commit fbcb233

Browse files
authored
Merge branch 'main' into alex/sch-adj
2 parents 1dd7d29 + 424541d commit fbcb233

92 files changed

Lines changed: 7352 additions & 2747 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/CODEOWNERS

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
* @temporalio/sdk
2-
* @temporalio/server
1+
* @temporalio/server @temporalio/sdk

.github/workflows/all-docker-images.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ on:
2222
dotnet-version:
2323
description: Dotnet SDK version to build. Skipped if not specified. Must start with v.
2424
type: string
25+
ruby-version:
26+
description: Ruby SDK version to build. Skipped if not specified. Must start with v.
27+
type: string
2528
do-push:
2629
description: If set, push the built images to Docker Hub.
2730
type: boolean
@@ -49,6 +52,9 @@ on:
4952
dotnet-version:
5053
description: Dotnet SDK version to build. Skipped if not specified. Must start with v.
5154
type: string
55+
ruby-version:
56+
description: Ruby SDK version to build. Skipped if not specified. Must start with v.
57+
type: string
5258
do-push:
5359
description: If set, push the built images to Docker Hub.
5460
type: boolean
@@ -109,6 +115,16 @@ jobs:
109115
do-push: ${{ inputs.do-push }}
110116
as-latest: ${{ inputs.as-latest }}
111117

118+
build-ruby-docker-images:
119+
if: inputs.ruby-version
120+
uses: ./.github/workflows/docker-images.yml
121+
secrets: inherit
122+
with:
123+
lang: ruby
124+
sdk-version: ${{ inputs.ruby-version }}
125+
do-push: ${{ inputs.do-push }}
126+
as-latest: ${{ inputs.as-latest }}
127+
112128
build-cli-docker-images:
113129
uses: ./.github/workflows/docker-images.yml
114130
secrets: inherit

.github/workflows/ci.yml

Lines changed: 32 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ permissions:
66
checks: write
77

88
env:
9-
MISE_VERSION: v2025.8.1
9+
MISE_VERSION: v2025.12.1
10+
MISE_NODE_VERIFY: no
1011

1112
on: # rebuild any PRs and main branch changes
1213
pull_request:
@@ -44,18 +45,22 @@ jobs:
4445
strategy:
4546
fail-fast: false
4647
matrix:
47-
sdk: [go, java, python, typescript, dotnet]
48+
target: [go, java, python, ruby, typescript, dotnet, kitchensink-gen]
4849
include:
49-
- sdk: go
50+
- target: go
5051
tools: go
51-
- sdk: java
52+
- target: java
5253
tools: java go
53-
- sdk: python
54+
- target: python
5455
tools: python go
55-
- sdk: typescript
56+
- target: ruby
57+
tools: ruby go
58+
- target: typescript
5659
tools: rust go node protoc
57-
- sdk: dotnet
60+
- target: dotnet
5861
tools: dotnet go
62+
- target: kitchensink-gen
63+
tools: rust go protoc
5964
steps:
6065
- name: Checkout repo
6166
uses: actions/checkout@v4
@@ -68,25 +73,29 @@ jobs:
6873
- name: Install Tools
6974
run: |
7075
go run ./cmd/dev install ${{ matrix.tools }}
76+
- name: Ensure rustfmt
77+
if: matrix.target == 'kitchensink-gen'
78+
run: |
79+
rustup component add rustfmt || echo "rustup not available, skipping rustfmt component add"
7180
- name: Add Go bin to PATH
7281
run: |
7382
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
74-
- name: Lint and format ${{ matrix.sdk }} worker
83+
- name: Lint and format ${{ matrix.target }} worker
7584
run: |
76-
go run ./cmd/dev lint-and-format ${{ matrix.sdk }}
85+
go run ./cmd/dev lint-and-format ${{ matrix.target }}
7786
- name: Check formatting
7887
run: |
79-
git diff --exit-code || (echo "${{ matrix.sdk }} worker has uncommitted formatting changes" && exit 1)
80-
- name: Test ${{ matrix.sdk }} worker
88+
git diff --exit-code || (echo "${{ matrix.target }} worker has uncommitted formatting changes" && exit 1)
89+
- name: Test ${{ matrix.target }} worker
8190
run: |
82-
go run ./cmd/dev test ${{ matrix.sdk }}
91+
go run ./cmd/dev test ${{ matrix.target }}
8392
8493
build-worker:
8594
runs-on: ubuntu-latest
8695
strategy:
8796
fail-fast: false
8897
matrix:
89-
sdk: [go, java, python, typescript, dotnet]
98+
sdk: [go, java, python, ruby, typescript, dotnet]
9099
steps:
91100
- name: Checkout repo
92101
uses: actions/checkout@v4
@@ -119,21 +128,22 @@ jobs:
119128
--run-id ${{ github.run_id }} \
120129
--connect-timeout 1m \
121130
--iterations 5
122-
123131
124132
test-kitchensink:
125133
runs-on: ubuntu-latest
126134
strategy:
127135
fail-fast: false
128136
matrix:
129-
sdk: [go, java, python, typescript, dotnet]
137+
sdk: [go, java, python, ruby, typescript, dotnet]
130138
include:
131139
- sdk: go
132140
tools: go
133141
- sdk: java
134142
tools: java go
135143
- sdk: python
136144
tools: python go
145+
- sdk: ruby
146+
tools: ruby go
137147
- sdk: typescript
138148
tools: node go
139149
- sdk: dotnet
@@ -150,6 +160,10 @@ jobs:
150160
- name: Install Tools
151161
run: |
152162
go run ./cmd/dev install ${{ matrix.tools }}
163+
- name: Ensure rustfmt
164+
if: matrix.target == 'kitchensink-gen'
165+
run: |
166+
rustup component add rustfmt || echo "rustup not available, skipping rustfmt component add"
153167
- name: Test Kitchensink ${{ matrix.sdk }}
154168
run: |
155169
SDK=${{ matrix.sdk }} go test -v -race ./loadgen -run TestKitchenSink 2>&1 | \
@@ -231,6 +245,7 @@ jobs:
231245
java-sdk-version: ${{ steps.set-output.outputs.java-sdk-version }}
232246
python-sdk-version: ${{ steps.set-output.outputs.python-sdk-version }}
233247
dotnet-sdk-version: ${{ steps.set-output.outputs.dotnet-sdk-version }}
248+
ruby-sdk-version: ${{ steps.set-output.outputs.ruby-sdk-version }}
234249
steps:
235250
- name: Checkout repo
236251
uses: actions/checkout@v2
@@ -246,6 +261,7 @@ jobs:
246261
echo "java-sdk-version=v${{ env.JAVA_SDK_VERSION }}" >> "$GITHUB_OUTPUT"
247262
echo "python-sdk-version=v${{ env.PYTHON_SDK_VERSION }}" >> "$GITHUB_OUTPUT"
248263
echo "dotnet-sdk-version=v${{ env.DOTNET_SDK_VERSION }}" >> "$GITHUB_OUTPUT"
264+
echo "ruby-sdk-version=v${{ env.RUBY_SDK_VERSION }}" >> "$GITHUB_OUTPUT"
249265
push-docker-images:
250266
needs: prepare-for-docker-push
251267
uses: ./.github/workflows/all-docker-images.yml
@@ -260,3 +276,4 @@ jobs:
260276
java-version: ${{ needs.prepare-for-docker-push.outputs.java-sdk-version }}
261277
py-version: ${{ needs.prepare-for-docker-push.outputs.python-sdk-version }}
262278
dotnet-version: ${{ needs.prepare-for-docker-push.outputs.dotnet-sdk-version }}
279+
ruby-version: ${{ needs.prepare-for-docker-push.outputs.ruby-sdk-version }}

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ workers/java/bin
1313
workers/java/build
1414

1515
/loadgen/kitchen-sink-gen/target/
16+
17+
omes.sln
1618
/workers/dotnet/obj/
1719
/workers/dotnet/bin/
1820
/last_fuzz_run.proto
@@ -22,4 +24,6 @@ workers/python/**/__pycache__/
2224
workers/*/omes-temp-*/
2325
workers/*/prepared/
2426

25-
temporal-omes
27+
tsconfig.tsbuildinfo
28+
29+
temporal-omes

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,33 @@ flowchart TD
4949
* **Executor**: produces concurrent executions of workflows and activities requested by the Scenario
5050
* **Workers**: consumes the workflows and activities started by the Executor
5151

52+
### Process Metrics Sidecar
53+
54+
Omes includes a process metrics sidecar - a Go-based HTTP server that monitors CPU and memory usage of the worker process. The sidecar is started by `run-worker` (or `run-scenario-with-worker`) after spawning the worker subprocess.
55+
56+
**Endpoints:**
57+
- `/metrics` - Prometheus-format metrics (`process_cpu_percent`, `process_resident_memory_bytes`)
58+
- `/info` - JSON metadata (`sdk_version`, `build_id`, `language`)
59+
60+
**Configuration flags:**
61+
- `--worker-process-metrics-address` - Address for the sidecar HTTP server (required to enable)
62+
- `--worker-metrics-version-tag` - SDK version to report in `/info` (defaults to `--version`)
63+
64+
**Example:**
65+
```sh
66+
go run ./cmd run-worker --language python --run-id my-run \
67+
--worker-process-metrics-address :9091 \
68+
--worker-metrics-version-tag v1.24.0
69+
```
70+
71+
**Metrics export:**
72+
73+
When using the Prometheus instance (`--prom-instance-addr`), sidecar metrics can be exported to parquet files on shutdown. The export includes SDK version, build ID, and language from the `/info` endpoint.
74+
75+
- `--prom-export-worker-metrics` - Path to export metrics parquet file
76+
- `--prom-export-process-job` - Prometheus job name for process metrics (default: `omes-worker-process`)
77+
- `--prom-export-worker-info-address` - Address to fetch `/info` from during export (e.g., `localhost:9091`)
78+
5279
## Usage
5380

5481
### Define a scenario
@@ -214,6 +241,12 @@ You can run the fuzzer with new random actions like so:
214241
go run ./cmd run-scenario-with-worker --scenario fuzzer --iterations 1 --language cs
215242
```
216243

244+
The fuzzer automatically creates a Nexus endpoint and generates Nexus operations. To use an existing endpoint instead:
245+
246+
```sh
247+
go run ./cmd run-scenario-with-worker --scenario fuzzer --iterations 1 --language go --option nexus-endpoint=my-endpoint
248+
```
249+
217250
By default, the scenario will spit out a `last_fuzz_run.proto` binary file containing the generated
218251
actions. To re-run the same set of actions, you can pass in such a file like so:
219252

cmd/cli/cleanup_scenario.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ func (c *scenarioCleaner) run(ctx context.Context) error {
6363
return fmt.Errorf("run ID not found")
6464
}
6565
metrics := c.metricsOptions.MustCreateMetrics(ctx, c.logger)
66-
defer metrics.Shutdown(ctx, c.logger)
66+
defer metrics.Shutdown(ctx, c.logger, c.scenario.Scenario, c.scenario.RunID, c.scenario.RunFamily)
6767
client := c.clientOptions.MustDial(metrics, c.logger)
6868
defer client.Close()
6969
taskQueue := loadgen.TaskQueueForRun(c.scenario.RunID)

cmd/cli/run_scenario.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ func (r *scenarioRunConfig) addCLIFlags(fs *pflag.FlagSet) {
8080
fs.DurationVar(&r.timeout, "timeout", 0, "If set, the scenario will stop after this amount of"+
8181
" time has elapsed. Any still-running iterations will be cancelled, and omes will exit nonzero.")
8282
fs.IntVar(&r.maxConcurrent, "max-concurrent", 0, "Override max-concurrent for the scenario")
83-
fs.StringSliceVar(&r.scenarioOptions, "option", nil, "Additional options for the scenario, in key=value format")
83+
fs.StringArrayVar(&r.scenarioOptions, "option", nil, "Additional options for the scenario, in key=value format")
8484
fs.BoolVar(&r.doNotRegisterSearchAttributes, "do-not-register-search-attributes", false,
8585
"Do not register the default search attributes used by scenarios. "+
8686
"If the search attributes are not registed by the scenario they must be registered through some other method")
@@ -126,7 +126,7 @@ func (r *scenarioRunner) run(ctx context.Context) error {
126126
}
127127

128128
metrics := r.metricsOptions.MustCreateMetrics(ctx, r.logger)
129-
defer metrics.Shutdown(ctx, r.logger)
129+
defer metrics.Shutdown(ctx, r.logger, r.scenario.Scenario, r.scenario.RunID, r.scenario.RunFamily)
130130
start := time.Now()
131131
var client client.Client
132132
var err error

cmd/cli/run_worker.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func (r *workerRunner) addCLIFlags(fs *pflag.FlagSet) {
5353
fs.IntVar(&r.TaskQueueIndexSuffixEnd, "task-queue-suffix-index-end", 0, "Inclusive end for task queue suffix range")
5454
fs.AddFlagSet(r.ClientOptions.FlagSet())
5555
fs.AddFlagSet(r.MetricsOptions.FlagSet("worker-"))
56-
fs.AddFlagSet(r.WorkerOptions.FlagSet("worker-"))
56+
fs.AddFlagSet(r.WorkerOptions.FlagSet())
5757
}
5858

5959
func (r *workerRunner) preRun() {

cmd/cli/util_nonwindows.go

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

cmd/cli/util_windows.go

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

0 commit comments

Comments
 (0)