Commit 917e969
committed
M3.14: wire ComputeDriverKind::Substrate dispatch into gateway compute runtime
The M3 scaffold (commit 0390bcd) added the `Substrate` enum variant and
the driver crate, but parked the gateway-side instantiation behind a
placeholder error: "openshell-driver-substrate is a scaffold; runtime
wiring lands in M3." M3.1 through M3.13 then built out the driver crate
(client, RPCs, kube-rs materialization, JWT, TLS, live tests, ActorTemplate
synthesis). This change replaces the placeholder with the real wiring so
`compute_drivers = ["substrate"]` in `gateway.toml` actually instantiates
`SubstrateComputeDriver` and routes every `ComputeDriver` RPC through it.
Three pieces:
- `openshell-server/Cargo.toml`: depend on `openshell-driver-substrate`
(one line; mirrors the docker/kubernetes/podman pattern).
- `openshell-server/src/compute/mod.rs`: add `ComputeRuntime::new_substrate`.
The substrate driver implements `ComputeDriver` directly with the same
`WatchStream` type `SharedComputeDriver` expects, so no
`ComputeDriverService`-style adapter is needed (kubernetes wraps because
its internal API surface differs from the gRPC trait).
- `openshell-server/src/lib.rs`: replace the placeholder `Substrate => Err(...)`
arm with a real `ComputeRuntime::new_substrate(...)` call, and add
`substrate_config_from_file()` mirroring `kubernetes_config_from_file()`
to parse `[openshell.drivers.substrate]` via the driver's `Deserialize`
impl.
Test plan:
- `cargo check --release -p openshell-server --bin openshell-gateway`
completes in 2m 03s without warnings.
- End-to-end validation lands in the helpdesk demo
(`dims/openshell-driver-substrate/examples/helpdesk/`), which switches
from `kubectl apply` + atenet curl to driving every sandbox lifecycle
call through `gateway.create_sandbox` / `stop_sandbox` /
`delete_sandbox` / `list_sandboxes`. That work is filed separately.
Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com>1 parent 10fdc9b commit 917e969
4 files changed
Lines changed: 93 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
| |||
347 | 349 | | |
348 | 350 | | |
349 | 351 | | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
350 | 380 | | |
351 | 381 | | |
352 | 382 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
| |||
757 | 758 | | |
758 | 759 | | |
759 | 760 | | |
760 | | - | |
761 | | - | |
762 | | - | |
763 | | - | |
764 | | - | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
765 | 774 | | |
766 | 775 | | |
767 | 776 | | |
| |||
785 | 794 | | |
786 | 795 | | |
787 | 796 | | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
788 | 817 | | |
789 | 818 | | |
790 | 819 | | |
| |||
857 | 886 | | |
858 | 887 | | |
859 | 888 | | |
860 | | - | |
| 889 | + | |
| 890 | + | |
861 | 891 | | |
862 | 892 | | |
863 | 893 | | |
| |||
0 commit comments