Skip to main content

Module overrider

Module overrider 

Source
Expand description

Ported from internal/deployer/helm/overrider.go.

Divergence: Go’s DynamicOverrideConfig.ValueMap decodes YAML into map[string]any, so a scalar such as a YAML timestamp decodes into a time.Time – a type assertOverrideValue/assertNoNulls reject as an “unsupported inline value type”. This crate’s DynamicOverrideConfig::value_map is OrderedMap<String, serde_json::Value> (see xianyun_core::config::latest); every serde_json::Value variant (Null/Bool/Number/String/Array/ Object) is one assertOverrideValue already allows, so that rejection path is unreachable here – there is no Rust equivalent of a decoded value that is neither a scalar, a list, nor a map. The Go tests exercising it (TestBuildDynamicOverrides_InlineRejectsNonScalarLeaves, TestBuildDynamicOverrides_InlineUnsupportedType) are ported as #[ignore]d stubs in manager.rs documenting exactly this, rather than silently dropped.