feat(server): add auto-detection of compute driver at startup#1088
Merged
TaylorMutch merged 1 commit intoNVIDIA:mainfrom May 1, 2026
Merged
feat(server): add auto-detection of compute driver at startup#1088TaylorMutch merged 1 commit intoNVIDIA:mainfrom
TaylorMutch merged 1 commit intoNVIDIA:mainfrom
Conversation
TaylorMutch
reviewed
Apr 30, 2026
8518427 to
4782f22
Compare
TaylorMutch
previously approved these changes
Apr 30, 2026
|
Label |
Collaborator
|
/ok to test 4782f22 |
TaylorMutch
reviewed
Apr 30, 2026
When no drivers are explicitly configured, the server now automatically detects the appropriate compute driver by checking the runtime environment: - Kubernetes: detected via KUBERNETES_SERVICE_HOST env var (set inside pods) - Podman: detected by checking if podman binary is available on PATH - Docker: detected by checking if docker binary is available on PATH Priority order: Kubernetes → Podman → Docker. VM is never auto-detected and must be selected explicitly via --drivers vm. The Auto variant is internal-only and does not serialize to config files. The default --drivers value is now empty, triggering auto-detection.
4782f22 to
f7c3dd3
Compare
Collaborator
|
/ok to test f7c3dd3 |
TaylorMutch
approved these changes
May 1, 2026
5 tasks
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add automatic detection of the appropriate compute driver when no drivers are explicitly configured. The server now checks the runtime environment and selects Kubernetes, Podman, or Docker in priority order — eliminating the need for manual
--driversconfiguration in most deployments.Related Issue
None filed.
Changes
Autovariant toComputeDriverKindenum (internal-only, skips serialization)detect_driver()function with priority: Kubernetes → Podman → Dockeris_binary_available()helper usingCommand::new(name).arg("--version").output()default_compute_drivers()to return empty vec, triggering auto-detectionconfigured_compute_driver()to calldetect_driver()when config is emptydefault_value = "kubernetes"from--driversCLI flag--drivers vm)Testing
mise run rust:lintpasses (clippy + format + license headers)mise run rust:checkpasses (cargo check)cargo test -p openshell-core config::(7/7)cargo test -p openshell-server(10/10)Note: One pre-existing flaky integration test (
sandbox_create_keeps_sandbox_with_forwarding) fails due to port 8080 being occupied on this system — unrelated to these changes.Checklist