Repository navigation
refactor(drivers): remove reverse dependencies on the VM and Podman drivers - #6023
Conversation
6650a8d to
4056c25
Compare
…rivers Move Podman socket discovery into a new openshell-container-runtime crate for code used only by the desktop drivers, so the VM driver no longer depends on openshell-driver-podman. Move the counting test allocator into openshell-supervisor-network so it no longer depends on openshell-driver-vm. Nothing outside crates/openshell-driver-* and the container-runtime crate now depends on the Docker, Podman or VM driver crates. Signed-off-by: Evan Lezar <elezar@nvidia.com>
4056c25 to
0926424
Compare
|
Looks good, one fix before merge:
Non-blocking: worth a |
…and exclude the container-runtime crate on Windows Signed-off-by: Evan Lezar <elezar@nvidia.com>
|
Thanks @alangou. The README changes should be addressed in latest. |
shiju-nv
left a comment
There was a problem hiding this comment.
Non-blocking:
-
Scope the unsafe allowance to the allocator implementation. Put
#[allow(unsafe_code)]back onunsafe impl GlobalAllocand remove it from mod alloc. That keeps the crate’s test-widedeny(unsafe_code)active for any other code added to alloc.rs. -
Refresh the PR description. The Docker, Podman, and VM gateway feature flags already select the subprocess launcher. Describe them as launcher feature flags and update the allocator path from test_alloc to test_support::alloc.
…rivers (ai-openshell/openshell#6023) * refactor(drivers): remove reverse dependencies on the VM and Podman drivers Move Podman socket discovery into a new openshell-container-runtime crate for code used only by the desktop drivers, so the VM driver no longer depends on openshell-driver-podman. Move the counting test allocator into openshell-supervisor-network so it no longer depends on openshell-driver-vm. Nothing outside crates/openshell-driver-* and the container-runtime crate now depends on the Docker, Podman or VM driver crates. Signed-off-by: Evan Lezar <elezar@nvidia.com> * docs(supervisor-network): refresh README for the test-only allocator and exclude the container-runtime crate on Windows Signed-off-by: Evan Lezar <elezar@nvidia.com> --------- Signed-off-by: Evan Lezar <elezar@nvidia.com>
Summary
Remove the two reverse dependencies from core crates onto the VM and Podman driver crates, so nothing outside
crates/openshell-driver-*depends on the Docker, Podman or VM drivers and they can later move out as a directory move.Related Issue
Related to #5391 and #5200. This does not close #5391: the gateway-linked driver features remain.
Changes
socket_discovery.rs) fromopenshell-driver-podmaninto a newopenshell-container-runtimecrate for code used only by the desktop drivers.openshell-driver-vmno longer depends onopenshell-driver-podman.openshell-driver-vm(allocation-trackingfeature) intoopenshell-supervisor-networkas a test-onlytest_allocmodule, and drop that crate's dependency onopenshell-driver-vm. Unsafe code stays forbidden outside tests (denyundercfg(test), allowed only in that module).Candidate homes weighed for the socket code:
openshell-driver-sdkwas the first candidate, but it stays in core after the drivers move, so it would keep driver-only code in core. A dedicated crate in the driver set moves with the drivers.openshell-corewould widen a core crate for driver-only logic,openshell-driver-launchis the wrong concern, and duplication would copy the bounded-subprocess handling.Testing
cargo clippy --all-targets -D warningsandcargo fmtclean foropenshell-container-runtime,openshell-driver-sdk,-podman,-vmandopenshell-supervisor-network, re-run after rebasing onto currentorigin/main.openshell-container-runtimeandopenshell-driver-podman;openshell-supervisor-networkpasses in full with--test-threads=1.openshell-supervisor-networkparallel runs intermittently fail a fewproxy::testswith atracing-subscriberregistry panic. This also happens on unmodifiedorigin/main(one of two runs failed the same tests), so it is not introduced here.