Repository navigation
Conversation
|
🌿 Preview your docs: https://nvidia-preview-pr-6120.docs.buildwithfern.com/openshell |
6528f7b to
e440ca6
Compare
137137137
left a comment
There was a problem hiding this comment.
Tested on macOS arm64 at e440ca6, with the gateway binary run under env -i and an isolated HOME and PATH.
When no candidate is installed, preflight now passes (crates/openshell-server/src/cli.rs:1397). Config with [openshell.drivers.docker] and [openshell.drivers.podman], compute_driver unset, no driver binary on the search path:
$ openshell-gateway config preflight --path gateway.toml
config: merged gateway.toml
note: skipping the docker compute driver in preflight: its driver binary is not installed
note: skipping the podman compute driver in preflight: its driver binary is not installed
exit=0The issue's case is one driver installed and one not. When every candidate is skipped, auto-detection has nothing to select at startup either. Is exit 0 intended here, or should preflight fail, or at least say that no candidate is installed?
A config with only [openshell.drivers.vm], no selection and no VM binary also exits 0, with no note. The vm registration is not an auto-detect candidate, so VmFactory::is_installed (crates/openshell-gateway/src/lib.rs:539) does not appear to be reached from this path.
With compute_driver unset, preflight validated every auto-detectable driver table, so a missing openshell-driver-<name> binary was fatal even though runtime detection skips that driver as unavailable. Resolve the binary with a typed BinaryNotFound error, add a defaulted ComputeDriverFactory::is_installed hook, and skip an uninstalled candidate with a note on stderr. A present binary with an invalid table, and an explicitly selected driver with a missing binary, still fail. Signed-off-by: Evan Lezar <elezar@nvidia.com>
…tail Signed-off-by: Evan Lezar <elezar@nvidia.com>
Signed-off-by: Evan Lezar <elezar@nvidia.com>
e440ca6 to
2d058d6
Compare
PR Review StatusThe initial review found no blocking issues. Config preflight now skips uninstalled auto-detection candidates with a diagnostic while still rejecting an explicitly selected driver whose binary is missing. Required CI, including E2E, passed. Action required: Maintainer approval and any required CODEOWNER review must clear before merge. Blocking findings:
Carried findings:
Non-blocking suggestions:
Gator metadata
|
Signed-off-by: Evan Lezar <elezar@nvidia.com>
|
Thanks for testing this. Addressed in 7b6bbf9:
|
PR Review StatusThanks @elezar. I checked the new diagnostic and its regression test for when every configured auto-detect driver is skipped. Preflight still succeeds in that case, since startup can detect a driver without a configuration table. I also checked that VM stays out of auto-detection and that explicit VM selection still validates the driver binary. The follow-up review found no blocking issues. Required CI, including E2E, passed. Action required: The Maintainer Approval check must pass before merge. Blocking findings:
Carried findings:
Gator metadata
|
Summary
With
compute_driverunset,config preflightfailed for an auto-detect driver table whoseopenshell-driver-<name>binary is not installed, while runtime detection skips that driver. This makes preflight consistent without running detection probes.launcher::resolve_binaryreturns a typedBinaryNotFound(converts to the same config error), so a missing binary is distinguishable from an invalid table.ComputeDriverFactory::is_installed; Docker, Podman and VM override it. Other factories keep working through the default.Closes #6084. Relates to #5200.
Testing
cargo clippy -p openshell-gateway -p openshell-server --all-targets -- -D warningspasses.config_preflight.rstests: uninstalled candidate skipped, explicit selection fails, installed candidate with invalid table fails. Not run locally (z3 missing prevents linking); relying on CI.