MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / warn_on_singleton_overwrite

Function warn_on_singleton_overwrite

crates/openshell-driver-vm/src/lifecycle.rs:689–710  ·  view source on GitHub ↗
(
    extension_name: &str,
    field: &str,
    prev: Option<T>,
    next: Option<T>,
)

Source from the content-addressed store, hash-verified

687}
688
689fn warn_on_singleton_overwrite<T>(
690 extension_name: &str,
691 field: &str,
692 prev: Option<T>,
693 next: Option<T>,
694) where
695 T: AsRef<str> + std::fmt::Display + PartialEq,
696{
697 let (Some(prev), Some(next)) = (prev, next) else {
698 return;
699 };
700 if prev == next {
701 return;
702 }
703 tracing::warn!(
704 extension = extension_name,
705 field,
706 previous = %prev,
707 next = %next,
708 "vm driver: lifecycle extension overwrote a singleton launch-plan field set by an earlier extension"
709 );
710}
711
712pub fn extension_state_dir(
713 sandbox_state_dir: &Path,

Callers 1

configure_launchMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected