Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .config/nextest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ default-filter = '''
| test(/^export_observations::/) | test(/^fabric_deployment::/)
| test(/^multiple_providers::/) | test(/^remote_service::/)
| test(/^inference_discovery::/) | test(/^helm_recovery::/)
| test(/^travel_example::/)
| test(/^travel_example::/) | test(/^cluster_models::/)
| test(/^travel_team_example::/)
))
'''
Expand Down
2 changes: 1 addition & 1 deletion crates/nemoclaw-authoring/tests/deployment_journey.rs
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ fn single_sandbox_examples_offer_existing_sdk_values_without_changing_them() {
);
covered += 1;
}
assert_eq!(covered, 39);
assert_eq!(covered, 41);
}

#[test]
Expand Down
4 changes: 4 additions & 0 deletions crates/nemoclaw-backend/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ pub enum Error {
"Docker model service '{service}' is preserved by updatePolicy: Preserve; replacing a running or incompletely observed container requires explicit updatePolicy: Recreate, which permits downtime if the replacement cannot start; resources retained"
)]
DockerModelUpdateRefused { service: String },
#[error(
"cluster model service '{service}' is preserved by updatePolicy: Preserve; replacing its model Pod requires explicit updatePolicy: Recreate, which permits downtime if the replacement cannot start; resources retained"
)]
ClusterModelUpdateRefused { service: String },
#[error("gateway is incompatible with this configuration: {0}")]
GatewayIncompatible(String),
#[error(
Expand Down
36 changes: 36 additions & 0 deletions crates/nemoclaw-build/src/hashicorp_provider.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

use std::{collections::BTreeMap, fs, path::Path};

/// Install a HashiCorp provider release's binary at `path` and its unchanged
/// upstream license at `license`, both from a checksum-verified archive.
pub(crate) fn install(
root: &Path,
archive: &[u8],
path: &str,
license: &str,
) -> Result<BTreeMap<String, String>, Box<dyn std::error::Error>> {
let name = path.rsplit('/').next().ok_or("missing provider name")?;
let binary = crate::extract_entry(archive, name, 256 << 20)?;
let license_text = crate::extract_entry(archive, "LICENSE.txt", 1 << 20)?;
let mut files = BTreeMap::new();
for (relative, bytes) in [
(path, binary.as_slice()),
(license, license_text.as_slice()),
] {
let destination = root.join(relative);
fs::create_dir_all(destination.parent().ok_or("missing bundle parent")?)?;
fs::write(&destination, bytes)?;
files.insert(
relative.to_owned(),
nemoclaw_sdk::bundle::hash_file(&destination)?,
);
}
#[cfg(unix)]
{
use std::os::unix::fs::PermissionsExt;
fs::set_permissions(root.join(path), fs::Permissions::from_mode(0o755))?;
}
Ok(files)
}
31 changes: 7 additions & 24 deletions crates/nemoclaw-build/src/helm_provider.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

use std::{collections::BTreeMap, fs, path::Path};
use std::{collections::BTreeMap, path::Path};

// Release v3.3.0, source revision 0e0a60f31821ab5d2948daecb882a1ac27a98405.
// On 2026-10-06, versions.json archive pins were verified against the official
Expand All @@ -17,27 +17,10 @@ pub fn install(
if version != nemoclaw_sdk::kubernetes::gateway::PROVIDER_VERSION {
return Err("unsupported Helm provider version".into());
}
let path = nemoclaw_sdk::bundle::helm_provider_path(platform)?;
let name = path.rsplit('/').next().ok_or("missing provider name")?;
let binary = crate::extract_entry(archive, name, 256 << 20)?;
let license = crate::extract_entry(archive, "LICENSE.txt", 1 << 20)?;
let mut files = BTreeMap::new();
for (relative, bytes) in [
(path.as_str(), binary.as_slice()),
("licenses/helm-provider-LICENSE", license.as_slice()),
] {
let destination = root.join(relative);
fs::create_dir_all(destination.parent().ok_or("missing bundle parent")?)?;
fs::write(&destination, bytes)?;
files.insert(
relative.to_owned(),
nemoclaw_sdk::bundle::hash_file(&destination)?,
);
}
#[cfg(unix)]
{
use std::os::unix::fs::PermissionsExt;
fs::set_permissions(root.join(path), fs::Permissions::from_mode(0o755))?;
}
Ok(files)
crate::hashicorp_provider::install(
root,
archive,
&nemoclaw_sdk::bundle::helm_provider_path(platform)?,
"licenses/helm-provider-LICENSE",
)
}
26 changes: 26 additions & 0 deletions crates/nemoclaw-build/src/kubernetes_provider.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

use std::{collections::BTreeMap, path::Path};

// Release v3.3.0, source revision a612b9cfce0fd1321cf2d25084b07b8fccd79737.
// On 2026-10-19, versions.json archive pins were verified against the official
// SHA256SUMS signature using HashiCorp's published signing key fingerprint
// C874011F0AB405110D02105534365D9472D7468F. Upstream binary and license are unchanged.
/// Install the binary and unchanged upstream license from a checksum-verified release.
pub fn install(
root: &Path,
archive: &[u8],
version: &str,
platform: &str,
) -> Result<BTreeMap<String, String>, Box<dyn std::error::Error>> {
if version != nemoclaw_sdk::kubernetes::models::PROVIDER_VERSION {
return Err("unsupported Kubernetes provider version".into());
}
crate::hashicorp_provider::install(
root,
archive,
&nemoclaw_sdk::bundle::kubernetes_provider_path(platform)?,
"licenses/kubernetes-provider-LICENSE",
)
}
4 changes: 4 additions & 0 deletions crates/nemoclaw-build/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,13 @@ pub mod docs;
#[cfg(feature = "sdk")]
pub mod fern;
#[cfg(feature = "sdk")]
mod hashicorp_provider;
#[cfg(feature = "sdk")]
pub mod helm_provider;
pub mod images;
#[cfg(feature = "sdk")]
pub mod kubernetes_provider;
#[cfg(feature = "sdk")]
pub mod schema;
mod source;
pub use source::{hex, source_inputs, source_version};
Expand Down
18 changes: 18 additions & 0 deletions crates/nemoclaw-build/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,9 @@ struct Pins {
#[cfg(feature = "sdk")]
#[serde(rename = "helmProvider")]
helm_provider: String,
#[cfg(feature = "sdk")]
#[serde(rename = "kubernetesProvider")]
kubernetes_provider: String,
platforms: std::collections::BTreeMap<String, std::collections::BTreeMap<String, Artifact>>,
/// Pinned OpenShell images; the Docker live tests pull these.
#[serde(default)]
Expand Down Expand Up @@ -366,6 +369,13 @@ async fn bundle(pins: &Pins, platform: &str) -> Result<()> {
.ok_or("missing Helm provider platform pin")?,
)
.await?;
let kubernetes_archive = download(
pins.platforms
.get(platform)
.and_then(|p| p.get("kubernetesProvider"))
.ok_or("missing Kubernetes provider platform pin")?,
)
.await?;
let version = nemoclaw_build::BUILDER_SOURCE_VERSION.to_owned();
nemoclaw_build::verify_source_version(&version, &sources()?)?;
let target = target(platform)?;
Expand Down Expand Up @@ -478,6 +488,14 @@ async fn bundle(pins: &Pins, platform: &str) -> Result<()> {
&pins.helm_provider,
platform,
)?);
manifest
.files
.extend(nemoclaw_build::kubernetes_provider::install(
root,
&kubernetes_archive,
&pins.kubernetes_provider,
platform,
)?);
nemoclaw_build::schema::add_to_bundle(root, &mut manifest)?;
nemoclaw_build::verify_source_version(&version, &sources()?)?;
fs::write(
Expand Down
Loading