Skip to content

Add a project scenario#317

Open
THardy98 wants to merge 21 commits intomainfrom
pr/project-scenario
Open

Add a project scenario#317
THardy98 wants to merge 21 commits intomainfrom
pr/project-scenario

Conversation

@THardy98
Copy link
Copy Markdown
Contributor

@THardy98 THardy98 commented Mar 29, 2026

What was changed

Added a new project scenario that allows running load against arbitrary projects.

The idea is to allow developers to write self-contained feature tests (e.g. for Nexus operations) called projects, independently of the kitchen-sink scenario pipeline. Some advantages over the existing scenarios:

  • can specify client and worker configs (no need to plumb flags through to config)
  • can write regular workflow code, no DSL
  • abstracted from the omes framework (don't need to write a scenario)
  • can independently version different projects (i.e. can run one project on an older SDK version than another)

Enabling this is a simple harness comprised of a gRPC API and some hook functions:

  • Init RPC: one-time project initialization, provides connection parameters for the project to create clients
  • Execute RPC: runs at each iteration of the executor, this is where load is driven
  • InitFunc hook: optional hook that allows for one-time, project-specific initialization (i.e. registering Nexus endpoints), triggered during the Init RPC
  • ExecuteFunc hook: required hook, this runs at each Execute RPC call, this determines what load you want to drive
  • RegisterClient hook: registers a client to be used by your project
  • RegisterWorker hook: register a a worker to be used by your project

Currently, harness implementations are limited to Go and .NET.
They include sample tests:

  • Go: HelloWorld
  • .NET: HelloWorld, NexusSimpleWorkflow

There is also docker support via go-project.Dockerfile and dotnet-project.Dockerfile.

Like existing worker builds, builds for projects also support "build-from-source" (i.e. --version <path to local repo>), so you can test against local changes.

See the README.md for details on how to use this scenario.

Note

  • Currently, this is limited to the default generic executor (i.e. named SteadyStateExecutor), but still effectively for throughput testing.

THardy98 and others added 14 commits March 27, 2026 15:27
Register a single "project" scenario in the existing scenario registry.
Project tests are invoked via:
  run-scenario --scenario project --language go --option test=helloworld

Key changes:
- Add ConnectionParams to ScenarioInfo for spawned processes
- Extend workers/build.go with ProjectDir field for project builds
- Create ProjectScenarioExecutor (build, spawn, gRPC init, execute)
- Move harness to workers/go/projectharness/ (package, not separate module)
- Add Go helloworld project test at workers/go/projects/helloworld/
- Harness implements the same gRPC ProjectService pattern as Go
- Proto stubs generated at build time via Grpc.Tools in the csproj
- Helloworld project demonstrates minimal setup

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add --project-dir to prepare-worker for building project test binaries
- Extend Go and .NET Dockerfiles to COPY workers/proto for project builds

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@THardy98 THardy98 marked this pull request as ready for review March 30, 2026 21:47
@THardy98 THardy98 requested review from a team as code owners March 30, 2026 21:47
@THardy98 THardy98 marked this pull request as draft March 31, 2026 17:50
@THardy98
Copy link
Copy Markdown
Contributor Author

Putting in draft to improve the build code & project dockerfiles

… as program.csproj with conditional Project/PackageReference. dotnet/go-project.Dockerfiles map closer to existing non-project dockerfiles, but with different runtime stages
@THardy98 THardy98 marked this pull request as ready for review March 31, 2026 22:38
@THardy98
Copy link
Copy Markdown
Contributor Author

RFR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant