Expand description
Port of internal/config/caproni.go: the top-level config loader
(LoadCaproniConfig), schema compilation, and the variable-expansion /
literal-field guards it orchestrates.
extends: composition supports both local (same-filesystem) and
https:// remote fragments (see merge.rs’s module doc comment for the
RemoteFetcher design), and caproni-project.yaml per-repository
fragment application (applyCaproniProject, in merge.rs) is fully
ported. The one remaining documented gap is compile_schema_lazy_loading
(#[ignore]d below): the Go original’s sync.Once-cached schema
pointer-identity assertion has no equivalent here, since this port
compiles the schema fresh per call rather than caching it — see
validate_schema_v2’s doc comment.
Functions§
- apply_
version_ defaults - Populates runtime fields on the config from CI version variables.
- load_
caproni_ config - Loads and parses the caproni.yaml configuration file. Returns a v2
CaproniConfigregardless of input version. Remote (https://)extends:fragments are fetched with a freshsuper::merge::UreqFetcher; useload_caproni_config_with_fetcherto inject a different one (e.g. awiremock-backed test double — seemerge.rs’s module doc comment). - load_
caproni_ config_ with_ fetcher - Port of the private
loadCaproniConfig(ctx, gc, httpClient, cache): the full loader, parameterized over thesuper::merge::RemoteFetcherused forextends:remote fragments and downloaded deployer files. - load_
from_ context - Gets the global config from the context and loads the config instance
from it using
load_caproni_config. - skip_
variable_ expansion - Reports whether
path(dotted segments from the config root) points at a value whose variable references must survive expansion verbatim (a literal cluster field, or a mirror filesystem regex field).