From ff8f7234389d49341d68efeb7d2a0568b6206ad3 Mon Sep 17 00:00:00 2001 From: Drew Newberry Date: Wed, 15 Jul 2026 07:57:42 -0700 Subject: [PATCH] fix(sdk): initialize sandbox annotations The SDK merged after CreateSandboxRequest and ObjectMeta gained annotations on main, leaving stale struct initializers that prevented the crate and its tests from compiling. Initialize the curated request and mock metadata with empty annotation maps. Signed-off-by: Drew Newberry --- crates/openshell-sdk/src/client.rs | 2 ++ crates/openshell-sdk/tests/client_mock.rs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/crates/openshell-sdk/src/client.rs b/crates/openshell-sdk/src/client.rs index 20c84d4654..67c1bf227e 100644 --- a/crates/openshell-sdk/src/client.rs +++ b/crates/openshell-sdk/src/client.rs @@ -19,6 +19,7 @@ use crate::types::{ }; use futures::StreamExt; use openshell_core::proto; +use std::collections::HashMap; use std::future::Future; use std::sync::Arc; use std::time::{Duration, Instant}; @@ -468,6 +469,7 @@ fn create_sandbox_request(spec: SandboxSpec) -> proto::CreateSandboxRequest { }), name: name.unwrap_or_default(), labels, + annotations: HashMap::new(), } } diff --git a/crates/openshell-sdk/tests/client_mock.rs b/crates/openshell-sdk/tests/client_mock.rs index 4a5c59dca8..d53873f825 100644 --- a/crates/openshell-sdk/tests/client_mock.rs +++ b/crates/openshell-sdk/tests/client_mock.rs @@ -55,6 +55,7 @@ fn sandbox_with_phase(name: &str, phase: proto::SandboxPhase) -> proto::Sandbox created_at_ms: 0, labels: HashMap::new(), resource_version: 1, + annotations: HashMap::new(), }), spec: None, status: Some(proto::SandboxStatus { @@ -623,6 +624,7 @@ async fn create_sandbox_passes_spec_through() { let observed = state.last_create.lock().await.clone().unwrap(); assert_eq!(observed.name, "my-box"); assert_eq!(observed.labels, labels); + assert!(observed.annotations.is_empty()); let observed_spec = observed.spec.unwrap(); assert!( observed_spec