Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
62 changes: 29 additions & 33 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,6 @@ on: # rebuild any PRs and main branch changes
branches:
- main

env:
DOTNET_SDK_VERSION: "1.7.0"
GO_SDK_VERSION: "1.35.0"
JAVA_SDK_VERSION: "1.30.1"
TYPESCRIPT_SDK_VERSION: "1.12.1"
GO_VERSION: "^1.21"
JAVA_VERSION: "11"
PROTOC_GEN_GO_VERSION: "v1.31.0"
PROTOC_VERSION: "25.1"
PYTHON_SDK_VERSION: "1.14.1"
PYTHON_VERSION: "3.10"
RUST_TOOLCHAIN: "1.74.0"

jobs:
build-lint-test-go:
runs-on: ubuntu-latest
Expand All @@ -27,6 +14,10 @@ jobs:
run: "echo head_ref: ${{ github.head_ref }}, ref: ${{ github.ref }}"
- name: Checkout repo
uses: actions/checkout@v2
- name: Load versions
run: |
set -a && source versions.env && set +a
printenv >> $GITHUB_ENV
- name: Setup Go
uses: actions/setup-go@v2
with:
Expand All @@ -51,6 +42,10 @@ jobs:
run: "echo head_ref: ${{ github.head_ref }}, ref: ${{ github.ref }}"
- name: Checkout repo
uses: actions/checkout@v4
- name: Load versions
run: |
set -a && source versions.env && set +a
printenv >> $GITHUB_ENV
- name: Setup Java
uses: actions/setup-java@v2
with:
Expand Down Expand Up @@ -82,6 +77,10 @@ jobs:
run: "echo head_ref: ${{ github.head_ref }}, ref: ${{ github.ref }}"
- name: Checkout repo
uses: actions/checkout@v2
- name: Load versions
run: |
set -a && source versions.env && set +a
printenv >> $GITHUB_ENV
- name: Setup Python
uses: actions/setup-python@v1
with:
Expand All @@ -97,7 +96,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: "${{ env.GO_VERSION }}"
go-version: "${{ needs.load-versions.outputs.go_version }}"
- name: Build exe
run: go build -o temporal-omes ./cmd
- name: Run local scenario with worker
Expand All @@ -118,6 +117,10 @@ jobs:
uses: actions/checkout@v2
with:
submodules: 'true'
- name: Load versions
run: |
set -a && source versions.env && set +a
printenv >> $GITHUB_ENV
- name: Setup TypeScript
uses: actions/setup-node@v4
- name: Initialize TypeScript worker
Expand Down Expand Up @@ -148,6 +151,10 @@ jobs:
uses: actions/checkout@v2
with:
submodules: 'true'
- name: Load versions
run: |
set -a && source versions.env && set +a
printenv >> $GITHUB_ENV
- name: Setup Dotnet
uses: actions/setup-dotnet@v3
- name: Check formatting
Expand All @@ -174,25 +181,8 @@ jobs:
uses: actions/checkout@v2
with:
submodules: 'true'
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: "${{ env.RUST_TOOLCHAIN }}"
override: true
- name: Install protoc
uses: arduino/setup-protoc@v2
with:
version: "${{ env.PROTOC_VERSION }}"
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: "${{ env.GO_VERSION }}"
- name: Install protoc-gen-go
run: go install google.golang.org/protobuf/cmd/protoc-gen-go@${{ env.PROTOC_GEN_GO_VERSION }}
- name: Build kitchen-sink-gen
working-directory: ./loadgen/kitchen-sink-gen
run: cargo build
- name: Build proto
run: ./scripts/build_proto.sh
- name: Check diff
run: |
git config --global core.safecrlf false
Expand All @@ -217,6 +207,12 @@ jobs:
python-sdk-version: ${{ steps.set-output.outputs.python-sdk-version }}
dotnet-sdk-version: ${{ steps.set-output.outputs.dotnet-sdk-version }}
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Load versions
run: |
set -a && source versions.env && set +a
printenv >> $GITHUB_ENV
- name: Set output variables to pass to docker YML
id: set-output
run: |
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ Omes (pronounced oh-mess) is the Hebrew word for "load" (עומס).
## Prerequisites

- [Go](https://golang.org/) 1.24+
- `protoc` and `protoc-gen-go` must be installed
- tip: don't worry about the specific versions here; instead, the GitHub action will make a diff
available for download that you can use with `git apply`
Comment on lines -13 to -15
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be worth changing this to say you either need proto or docker to get kitchen sink going locally

- [Java](https://openjdk.org/) 8+
- TypeScript: [Node](https://nodejs.org) 16+
- Python: [uv](https://docs.astral.sh/uv/)
Expand All @@ -21,6 +18,8 @@ Omes (pronounced oh-mess) is the Hebrew word for "load" (עומס).
And if you're running the fuzzer (see below)
- [Rust](https://rustup.rs/)

SDK and tool versions are defined in `versions.env`.

## Architecture

This (simplified) diagram shows the main components of Omes:
Expand Down Expand Up @@ -242,6 +241,8 @@ The Kitchen Sink workflows accepts a DSL generated by the `kitchen-sink-gen` Rus
to test a wide variety of scenarios without having to imagine all possible edge cases that could
come up in workflows. Input may be saved for regression testing, or hand written for specific cases.

Build by running `scripts/build_proto.sh`.

### Scenario Failure

A scenario can only fail if an `Execute` method returns an error, that means the control is fully in the scenario
Expand Down
37 changes: 37 additions & 0 deletions dockerfiles/proto.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
FROM ubuntu:24.04

RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive \
apt-get install -y \
curl \
unzip \
build-essential \
pkg-config \
libssl-dev \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*

ARG RUST_TOOLCHAIN
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain ${RUST_TOOLCHAIN}
ENV PATH="/root/.cargo/bin:${PATH}"

ARG PROTOC_VERSION
RUN curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip \
&& unzip protoc-${PROTOC_VERSION}-linux-x86_64.zip -d /usr/local \
&& rm protoc-${PROTOC_VERSION}-linux-x86_64.zip

ARG GO_VERSION
RUN curl -OL https://golang.org/dl/go${GO_VERSION}.linux-amd64.tar.gz \
&& tar -C /usr/local -xzf go${GO_VERSION}.linux-amd64.tar.gz \
&& rm go${GO_VERSION}.linux-amd64.tar.gz
ENV PATH="/usr/local/go/bin:${PATH}"

ARG PROTOC_GEN_GO_VERSION
RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@${PROTOC_GEN_GO_VERSION}
ENV PATH="/root/go/bin:${PATH}"

ARG NODE_VERSION
RUN curl -fsSL https://deb.nodesource.com/setup_${NODE_VERSION}.x | bash - \
&& apt-get install -y nodejs

WORKDIR /workspace
29 changes: 29 additions & 0 deletions scripts/build_proto.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash

set -e

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)"
IMAGE_NAME="omes-ks-gen"

# Always load versions from versions.env
set -a && source "${PROJECT_ROOT}/versions.env" && set +a

echo "Building Docker image for kitchen-sink-gen..."
docker build -f "${PROJECT_ROOT}/dockerfiles/proto.Dockerfile" \
--build-arg RUST_TOOLCHAIN="${RUST_TOOLCHAIN}" \
--build-arg GO_VERSION="${GO_VERSION}" \
--build-arg PROTOC_VERSION="${PROTOC_VERSION}" \
--build-arg PROTOC_GEN_GO_VERSION="${PROTOC_GEN_GO_VERSION}" \
--build-arg NODE_VERSION="${NODE_VERSION}" \
-t "${IMAGE_NAME}" "${PROJECT_ROOT}"

echo "Running kitchen-sink-gen build..."
docker run --rm -v "${PROJECT_ROOT}:/workspace" -w /workspace "${IMAGE_NAME}" bash -c "
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a huge fan of mounting the whole project dir into the docker image. This can make for slow loads as it copies everything, and what it writes back out often has weird, incorrect permissions.

That said, this is still easier than before, so I wouldn't block on this, but, if possible might be nice to cleanly copy the result files out.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Good idea!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, I spent almost an hour on this and it's harder than I thought: I don't want to copy all files into the container (node_modules is large) which requires some filtering, I don't want to specify every single output because that's brittle, but copying all files out of the container also defeats the purpose, doing a diff is harder than it seems, ...

I'll merge for now and we can discuss improvements.

cd /workspace/loadgen/kitchen-sink-gen
cargo build
cd /workspace/workers/typescript
npm install && npm run proto-gen
Comment on lines +25 to +26
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Easy to forget ...

"

echo "✅ kitchen-sink-gen build complete!"
15 changes: 15 additions & 0 deletions versions.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Tool versions
GO_VERSION=1.21.0
JAVA_VERSION=11
NODE_VERSION=22
PROTOC_GEN_GO_VERSION=v1.31.0
PROTOC_VERSION=25.1
PYTHON_VERSION=3.10
RUST_TOOLCHAIN=1.74.0

# SDK versions
DOTNET_SDK_VERSION=1.7.0
GO_SDK_VERSION=1.35.0
JAVA_SDK_VERSION=1.30.1
PYTHON_SDK_VERSION=1.14.1
TYPESCRIPT_SDK_VERSION=1.12.1
Loading