Skip to content
Open
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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ jobs:
timeout 30 bash -c 'until nc -z 127.0.0.1 10233; do sleep 1; done' || (echo "Server failed to start" && exit 1)
- name: Start ${{ matrix.sdk }} worker image
run: |
go run ./cmd run-scenario \
go run ./cmd/omes run-scenario \
--scenario workflow_with_single_noop_activity \
--log-level debug \
--server-address 127.0.0.1:10233 \
Expand All @@ -163,7 +163,7 @@ jobs:
- name: Smoke test throughput_stress to confirm build is usable against ${{ matrix.sdk }} worker
timeout-minutes: 10
run: |
go run ./cmd run-scenario \
go run ./cmd/omes run-scenario \
--scenario throughput_stress \
--log-level debug \
--server-address 127.0.0.1:10233 \
Expand Down
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Omes includes a process metrics sidecar - a Go-based HTTP server that monitors C

**Example:**
```sh
go run ./cmd run-worker --language python --run-id my-run \
go run ./cmd/omes run-worker --language python --run-id my-run \
--worker-process-metrics-address :9091 \
--worker-metrics-version-tag v1.24.0
```
Expand Down Expand Up @@ -125,7 +125,7 @@ You can do that like follows. If you want an embedded server rather than one you
pass `--embedded-server`.

```sh
go run ./cmd run-scenario-with-worker --scenario workflow_with_single_noop_activity --language go
go run ./cmd/omes run-scenario-with-worker --scenario workflow_with_single_noop_activity --language go
```

Notes:
Expand All @@ -136,7 +136,7 @@ Notes:
### Run a worker for a specific language SDK

```sh
go run ./cmd run-worker --run-id local-test-run --language go
go run ./cmd/omes run-worker --run-id local-test-run --language go
```

Notes:
Expand All @@ -149,7 +149,7 @@ Notes:
### Run a test scenario

```sh
go run ./cmd run-scenario --scenario workflow_with_single_noop_activity --run-id local-test-run
go run ./cmd/omes run-scenario --scenario workflow_with_single_noop_activity --run-id local-test-run
```

Notes:
Expand All @@ -163,7 +163,7 @@ Notes:
### Cleanup after scenario run

```sh
go run ./cmd cleanup-scenario --scenario workflow_with_single_noop_activity --run-id local-test-run
go run ./cmd/omes cleanup-scenario --scenario workflow_with_single_noop_activity --run-id local-test-run
```

### Running a specific version of the SDK
Expand All @@ -173,7 +173,7 @@ a version number like `v1.24.0` or you can also pass a local path to use a local
This is useful while testing unreleased or in-development versions of the SDK.

```sh
go run ./cmd run-scenario-with-worker --scenario workflow_with_single_noop_activity --language go --version /path/to/go-sdk
go run ./cmd/omes run-scenario-with-worker --scenario workflow_with_single_noop_activity --language go --version /path/to/go-sdk
```

### Building and publishing docker images
Expand Down Expand Up @@ -244,7 +244,7 @@ the harness to drive load. Consequently, it too needs to build your project + ha
To run a project:
1) Run your project worker:
```sh
go run ./cmd run-worker \
go run ./cmd/omes run-worker \
--language python \
--project-name helloworld \
--run-id local-project-test \
Expand All @@ -255,7 +255,7 @@ Make sure to point your `server-address` to a running Temporal server. Alternati

2) Run the project scenario
```sh
go run ./cmd run-scenario \
go run ./cmd/omes run-scenario \
--scenario project \
--iterations 1 \
--server-address <your server address> \
Expand All @@ -268,7 +268,7 @@ go run ./cmd run-scenario \
For local all-in-one development, run the worker and scenario together:

```sh
go run ./cmd run-scenario-with-worker \
go run ./cmd/omes run-scenario-with-worker \
--scenario project \
--iterations 1 \
--language python \
Expand Down Expand Up @@ -324,7 +324,7 @@ The configuration is done via a JSON file, which is passed to the scenario with

```
echo '{"count":{"type":"fixed","value":5},"groups":{"high":{"weight":2,"sleepDuration":{"type":"uniform","min":"2s","max":"4s"}},"low":{"weight":3,"sleepDuration":{"type":"discrete","weights":{"5s":3,"10s":1}}}}}' > sleep.json
go run ./cmd run-scenario-with-worker --scenario throughput_stress --language go --option sleep-activity-json=@sleep.json --run-id default-run-id
go run ./cmd/omes run-scenario-with-worker --scenario throughput_stress --language go --option sleep-activity-json=@sleep.json --run-id default-run-id
```

This runs 5 sleep activities per iteration, where "high" has a weight of 2 and sleeps for a random duration between 2-4s,
Expand All @@ -346,7 +346,7 @@ The throughput_stress scenario can generate Nexus load if the scenario is starte
1. Start the scenario with the given run-id:

```
go run ./cmd run-scenario-with-worker --scenario throughput_stress --language go --option nexus-endpoint=my-nexus-endpoint --run-id default-run-id
go run ./cmd/omes run-scenario-with-worker --scenario throughput_stress --language go --option nexus-endpoint=my-nexus-endpoint --run-id default-run-id
```

### Fuzzer
Expand All @@ -359,26 +359,26 @@ run by a client inside the scenario executor.
You can run the fuzzer with new random actions like so:

```sh
go run ./cmd run-scenario-with-worker --scenario fuzzer --iterations 1 --language cs
go run ./cmd/omes run-scenario-with-worker --scenario fuzzer --iterations 1 --language cs
```

The fuzzer automatically creates a Nexus endpoint and generates Nexus operations. To use an existing endpoint instead:

```sh
go run ./cmd run-scenario-with-worker --scenario fuzzer --iterations 1 --language go --option nexus-endpoint=my-endpoint
go run ./cmd/omes run-scenario-with-worker --scenario fuzzer --iterations 1 --language go --option nexus-endpoint=my-endpoint
```

By default, the scenario will spit out a `last_fuzz_run.proto` binary file containing the generated
actions. To re-run the same set of actions, you can pass in such a file like so:

```sh
go run ./cmd run-scenario-with-worker --scenario fuzzer --iterations 1 --language cs --option input-file=last_fuzz_run.proto
go run ./cmd/omes run-scenario-with-worker --scenario fuzzer --iterations 1 --language cs --option input-file=last_fuzz_run.proto
```

Or you can run with a specific seed (seeds are printed at the start of the scenario):

```sh
go run ./cmd run-scenario-with-worker --scenario fuzzer --iterations 1 --language cs --option seed=131962944538087455
go run ./cmd/omes run-scenario-with-worker --scenario fuzzer --iterations 1 --language cs --option seed=131962944538087455
```

However, the fuzzer is also sensitive to its configuration, and thus the seed will only produce
Expand Down
2 changes: 1 addition & 1 deletion cmd/dev/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ func runJavaHarnessTests(ctx context.Context, repoDir string) error {

func testWorkerLocally(ctx context.Context, repoDir, language, sdkVersion string) error {
args := []string{
"go", "run", "./cmd", "run-scenario-with-worker",
"go", "run", "./cmd/omes", "run-scenario-with-worker",
"--scenario", testScenario,
"--log-level", "debug",
"--language", language,
Expand Down
9 changes: 0 additions & 9 deletions cmd/main.go

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cli
package main

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion cmd/cli/envfallback.go → cmd/omes/envfallback.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cli
package main

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion cmd/cli/list_scenarios.go → cmd/omes/list_scenarios.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cli
package main

import (
"fmt"
Expand Down
4 changes: 2 additions & 2 deletions cmd/cli/main.go → cmd/omes/main.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cli
package main

import (
"fmt"
Expand All @@ -9,7 +9,7 @@ import (
_ "github.com/temporalio/omes/scenarios/project" // Register project scenario
)

func Main() {
func main() {
var rootCmd = &cobra.Command{
Use: "omes",
Short: "A load generator for Temporal",
Expand Down
2 changes: 1 addition & 1 deletion cmd/cli/prepare_worker.go → cmd/omes/prepare_worker.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cli
package main

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion cmd/cli/run_scenario.go → cmd/omes/run_scenario.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cli
package main

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cli
package main

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion cmd/cli/run_worker.go → cmd/omes/run_worker.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cli
package main

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion cmd/cli/util.go → cmd/omes/util.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cli
package main

import (
"crypto/rand"
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/cli.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ COPY workers ./workers/
COPY go.mod go.sum ./

# Build the CLI
RUN CGO_ENABLED=0 go build -o temporal-omes ./cmd
RUN CGO_ENABLED=0 go build -o temporal-omes ./cmd/omes

# Install protoc-gen-go for kitchen-sink-gen build
RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.31.0
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/dotnet.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ COPY workers/proto/harness ./workers/proto/harness
COPY go.mod go.sum ./

# Build the CLI
RUN CGO_ENABLED=0 /usr/local/go/bin/go build -o temporal-omes ./cmd
RUN CGO_ENABLED=0 /usr/local/go/bin/go build -o temporal-omes ./cmd/omes

ARG SDK_VERSION

Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/go.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ COPY workers/go/harness/api ./workers/go/harness/api
COPY go.mod go.sum ./

# Build the CLI
RUN CGO_ENABLED=0 go build -o temporal-omes ./cmd
RUN CGO_ENABLED=0 go build -o temporal-omes ./cmd/omes

ARG SDK_VERSION

Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/java.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ COPY workers/go/harness/api ./workers/go/harness/api
COPY go.mod go.sum ./

# Build the CLI
RUN CGO_ENABLED=0 /usr/local/go/bin/go build -o temporal-omes ./cmd
RUN CGO_ENABLED=0 /usr/local/go/bin/go build -o temporal-omes ./cmd/omes

ARG SDK_VERSION

Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/python.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ COPY workers/go/harness/api ./workers/go/harness/api
COPY go.mod go.sum ./

# Build the CLI
RUN CGO_ENABLED=0 /usr/local/go/bin/go build -o temporal-omes ./cmd
RUN CGO_ENABLED=0 /usr/local/go/bin/go build -o temporal-omes ./cmd/omes

ARG SDK_VERSION
ARG PROJECT_NAME=""
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/ruby.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ COPY workers/go/harness/api ./workers/go/harness/api
COPY go.mod go.sum ./

# Build the CLI
RUN CGO_ENABLED=0 /usr/local/go/bin/go build -o temporal-omes ./cmd
RUN CGO_ENABLED=0 /usr/local/go/bin/go build -o temporal-omes ./cmd/omes

ARG SDK_VERSION

Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/typescript.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ COPY workers/go/harness/api ./workers/go/harness/api
COPY go.mod go.sum versions.env ./

# Build the CLI
RUN CGO_ENABLED=0 /usr/local/go/bin/go build -o temporal-omes ./cmd
RUN CGO_ENABLED=0 /usr/local/go/bin/go build -o temporal-omes ./cmd/omes

ARG SDK_VERSION

Expand Down
Loading