mirror of
https://github.com/NVIDIA/OpenShell.git
synced 2026-11-12 11:33:51 +08:00
* feat(gateway): add storage-preserving sandbox image updates Add image-only UpdateSandbox with conditional versions, durable replay, fenced pending intent, and Kubernetes storage retention. Enable non-destructive image repair after completed timeout cleanup and exercise both Kubernetes controller API lanes. Closes #4623 Signed-off-by: sjenning <493891+sjenning@users.noreply.github.com> * feat(gateway): add storage-preserving sandbox image updates OpenClaw-Publication: b2036b09-b697-4d65-aba9-5c96a3198f9c Signed-off-by: sjenning <493891+sjenning@users.noreply.github.com> * fix(gateway): preserve image update patch-release compatibility Move image updates to a separate authenticated service and retain the baseline public sandbox status. Persist image intent and revisions independently with atomic baseline-known lifecycle fencing and explicit post-upgrade activation. Preserve concurrent provisioning clocks, fence replaced attempts and delayed callbacks, and verify private-state transactions plus both Kubernetes controller API lanes. Signed-off-by: sjenning <493891+sjenning@users.noreply.github.com> * fix(gateway): preserve optional driver compatibility and repair CI Move image updates to a separate optional compute-driver service, preserving the baseline generated trait and streaming associated type. Add source and TCP/UDS transport regressions, capability negotiation coverage, and a default-unsupported in-process extension. Keep Go compatibility tests outside generated output and update production reflection expectations for the separate sandbox update service. Signed-off-by: sjenning <493891+sjenning@users.noreply.github.com> * fix(gateway): preserve baseline factory and descriptor APIs Restore the original in-process driver trait object and existing instance enum. Register optional image updates through a default factory hook without requiring changes to existing drivers or factories, and require registration plus capability before mutation. Accept OpenShell-only descriptors while retaining strict validation of present update services. Cover baseline registration, missing-updater no-write behavior, descriptor validation, and both live Kubernetes retention lanes. Signed-off-by: sjenning <493891+sjenning@users.noreply.github.com> * chore(ci): use upstream Kubernetes E2E defaults Drop the task-level fallback superseded by main's runner defaults and explicit e2e-conformance-only selector. Preserve current upstream task definitions and recovery waiver unchanged. Signed-off-by: sjenning <493891+sjenning@users.noreply.github.com> * fix(gateway): integrate image updates with backend protocol Adapt non-launch image updates to the upstream remote admission API while retaining resource-policy verification before forwarding. Cover both negotiated extensions and preservation of backend pins and persisted launch identity. Signed-off-by: sjenning <493891+sjenning@users.noreply.github.com> * fix(gateway): remove sandbox image state on deletion Signed-off-by: Gordon Sim <gsim@redhat.com> * feat(gateway): expand UpdateSandbox configuration updates Signed-off-by: Gordon Sim <gsim@redhat.com> * fix(sandbox): recover pending updates and address review feedback Signed-off-by: Gordon Sim <gsim@redhat.com> * perf(server): index pending sandbox updates for recovery Signed-off-by: Gordon Sim <gsim@redhat.com> * docs(sandbox): clarify stop behavior when updates are disabled Signed-off-by: Gordon Sim <gsim@redhat.com> * fix(server): scope deletion bypass to the matching sandbox update Signed-off-by: Gordon Sim <gsim@redhat.com> * fix(server): back off pending sandbox update recovery Signed-off-by: Gordon Sim <gsim@redhat.com> * ci: restore combined-chart Kubernetes e2e coverage Signed-off-by: Gordon Sim <gsim@redhat.com> * test(kubernetes): use uuid for update request IDs Signed-off-by: Gordon Sim <gsim@redhat.com> * fix(kubernetes): reject oversized annotations before accepting sandbox updates Signed-off-by: Gordon Sim <gsim@redhat.com> * docs(skills): correct pending sandbox update recovery guidance Signed-off-by: Gordon Sim <gsim@redhat.com> * fix(sandbox): preserve terminal results when stopping missing compute Signed-off-by: Gordon Sim <gsim@redhat.com> * fix(server): bound sandbox update attempts to unblock recovery and deletion Signed-off-by: Gordon Sim <gsim@redhat.com> * fix(server): remove unintended sandbox label count limit Signed-off-by: Gordon Sim <gsim@redhat.com> * fix(kubernetes): check known pod names during sandbox update preflight Signed-off-by: Gordon Sim <gsim@redhat.com> * docs: clarify sandbox update permissions and driver support Signed-off-by: Gordon Sim <gsim@redhat.com> --------- Signed-off-by: sjenning <493891+sjenning@users.noreply.github.com> Signed-off-by: Gordon Sim <gsim@redhat.com> Co-authored-by: sjenning <493891+sjenning@users.noreply.github.com>
113 lines
3.4 KiB
Rust
113 lines
3.4 KiB
Rust
// SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
//! `OpenShell` Core - shared library for `OpenShell` components.
|
|
//!
|
|
//! This crate provides:
|
|
//! - Protocol buffer definitions and generated code
|
|
//! - Configuration management
|
|
//! - Common error types
|
|
//! - Build version metadata
|
|
|
|
pub mod activity;
|
|
pub mod auth;
|
|
pub mod compute;
|
|
pub mod config;
|
|
pub mod container_paths;
|
|
pub mod denial;
|
|
pub mod driver_mounts;
|
|
pub mod driver_utils;
|
|
pub mod dynamic_credential_key;
|
|
pub mod dynamic_string_allowlist;
|
|
#[cfg(unix)]
|
|
pub mod e2fsprogs;
|
|
pub mod endpoint_failure;
|
|
pub mod endpoint_path;
|
|
pub mod endpoint_status;
|
|
pub mod error;
|
|
pub mod extension_protocol;
|
|
#[cfg(unix)]
|
|
pub mod external_driver_socket;
|
|
pub mod forward;
|
|
pub mod google_cloud;
|
|
pub mod gpu;
|
|
pub mod grpc_client;
|
|
pub mod host_pattern;
|
|
pub mod image;
|
|
pub mod isolation_registration;
|
|
pub mod jwt;
|
|
pub mod local_api_socket;
|
|
pub mod mcp;
|
|
pub mod metadata;
|
|
pub mod middleware;
|
|
pub mod net;
|
|
pub mod network_trust;
|
|
#[cfg(feature = "oauth")]
|
|
pub mod oauth;
|
|
pub mod paths;
|
|
pub mod policy;
|
|
pub use openshell_policy_schema::yaml;
|
|
pub mod policy_identity;
|
|
pub mod progress;
|
|
pub mod proposals;
|
|
pub mod proto;
|
|
pub mod proto_struct;
|
|
pub mod provider_credentials;
|
|
pub mod replica_routing;
|
|
pub mod resource_admission;
|
|
pub mod rpc_error;
|
|
pub mod sandbox_env;
|
|
pub mod sandbox_generation;
|
|
pub mod sandbox_session;
|
|
pub mod sandbox_update;
|
|
pub mod secrets;
|
|
pub mod settings;
|
|
pub mod shell;
|
|
pub mod spiffe;
|
|
pub mod telemetry;
|
|
pub mod time;
|
|
pub mod token_grant_failure;
|
|
pub mod transport_errors;
|
|
pub mod upload;
|
|
|
|
pub use config::{
|
|
AppArmorProfile, Config, ExtensionBindingPolicy, GatewayAuthConfig,
|
|
GatewayInterceptorBindingOverride, GatewayInterceptorBindingPolicy, GatewayInterceptorConfig,
|
|
GatewayInterceptorFailurePolicy, GatewayInterceptorPhaseConfig, GatewayJwtConfig,
|
|
GatewayProviderProfileSourceConfig, ImagePullPolicy, MtlsAuthConfig, OidcConfig,
|
|
PolicyValidationFailureMode, TlsConfig, UpstreamProxyConfig,
|
|
};
|
|
pub use dynamic_string_allowlist::DynamicStringAllowlist;
|
|
pub use error::{ComputeDriverError, Error, Result};
|
|
pub use metadata::{
|
|
GetResourceVersion, ObjectId, ObjectLabels, ObjectName, ObjectWorkspace, SetResourceVersion,
|
|
};
|
|
pub use network_trust::NetworkSupervisorTrustBundle;
|
|
pub use sandbox_session::{SandboxSessionId, SandboxSessionIdError};
|
|
|
|
/// Build version string derived from git metadata.
|
|
///
|
|
/// For local builds this is computed by `build.rs` from the exact release tag
|
|
/// or the latest merged stable tag using the guess-next-dev scheme (e.g.
|
|
/// `0.0.4-dev.6+g2bf9969ab`). In Docker/CI builds where `.git` is absent, it
|
|
/// falls back to `CARGO_PKG_VERSION`, which the build pipeline already stamps.
|
|
pub const VERSION: &str = match option_env!("OPENSHELL_GIT_VERSION") {
|
|
Some(v) => v,
|
|
None => env!("CARGO_PKG_VERSION"),
|
|
};
|
|
|
|
#[cfg(test)]
|
|
#[path = "../build_version.rs"]
|
|
mod build_version;
|
|
|
|
/// Encoded protobuf `FileDescriptorSet` for every proto in `proto/`.
|
|
///
|
|
/// Emitted by `build.rs` via `tonic_build::configure().file_descriptor_set_path(...)`.
|
|
/// Used by tests in `openshell-server` to enumerate every RPC and verify that
|
|
/// each one declares the `openshell.options.v1.authorization` proto option.
|
|
pub const FILE_DESCRIPTOR_SET: &[u8] = include_bytes!(env!("OPENSHELL_DESCRIPTOR_PATH"));
|
|
|
|
#[cfg(test)]
|
|
#[path = "../../../tests/support/environment.rs"]
|
|
mod test_environment;
|