Skip to content

feat(examples): add fake-driver-rs scriptable compute driver#2181

Draft
elezar wants to merge 1 commit into
mainfrom
1950-fake-driver-rs/el
Draft

feat(examples): add fake-driver-rs scriptable compute driver#2181
elezar wants to merge 1 commit into
mainfrom
1950-fake-driver-rs/el

Conversation

@elezar

@elezar elezar commented Jul 8, 2026

Copy link
Copy Markdown
Member

Summary

Adds examples/fake-driver-rs, a scriptable out-of-process gRPC compute driver for testing gateway integration and developing conformance tests against the external driver path.

Related Issue

Closes #1950

Changes

  • New fake-driver-rs binary in examples/fake-driver-rs/ (added to workspace)
  • Implements the full ComputeDriver gRPC service over a Unix socket
  • Each RPC is driven by an ordered sequence of scripted responses defined in a TOML config file
  • When a sequence is exhausted, the last entry repeats with a warning logged
  • WatchSandboxes emits scripted events with a configurable delay between each
  • Responds to both SIGTERM and SIGINT for clean shutdown
  • Includes a scenarios/happy-path.toml example scenario covering all RPCs

Testing

  • mise run pre-commit passes
  • Unit tests added/updated
  • E2E tests added/updated (if applicable)

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)

Adds a fake out-of-process compute driver to examples/fake-driver-rs
for testing gateway integration and developing conformance tests.

The driver implements the full ComputeDriver gRPC service over a Unix
socket, with each RPC driven by an ordered sequence of scripted
responses defined in a TOML config file. When a sequence is exhausted
the last entry repeats with a warning logged. Responds to both SIGTERM
and SIGINT for clean shutdown.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
@copy-pr-bot

copy-pr-bot Bot commented Jul 8, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

path = "src/main.rs"

[dependencies]
openshell-core = { path = "../../crates/openshell-core", default-features = false }

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

As @krishicks points out, this may be "breaking/bending" the external driver contract a bit. Is there a way to depend on the crate the same way that an external driver would instead?

Comment thread Cargo.toml
[workspace]
resolver = "2"
members = ["crates/*"]
members = ["crates/*", "examples/fake-driver-rs"]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

ideally examples wouldn't need to be considered in our main cargo fie.

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.

test: add e2e coverage for external compute driver endpoints

2 participants