Skip to main content

mint_cells

Function mint_cells 

Source
pub fn mint_cells(
    policy: &SnapshotPolicy,
    base_name: &str,
    members: Option<Vec<ExpandedMember>>,
) -> Vec<MintCell>
Expand description

Pure. Cross one policy’s expanded source members with its repository dimension (#368) into the exact set of Snapshots to mint for one slot or one snapshot now invocation. Lives here so the SnapshotSchedule reconciler and kubectl kopiur snapshot now mint byte-identical sets — a divergence would give the same recipe different children depending on who fired it.

  • Single-repo policy: byte-identical to the pre-multi-repo behavior — the bare base_name child (no pins) for a selector-less recipe, or one unpinned per-member child.
  • Multi-repo policy: one child per (member × repository), named via fanout_child_name_for with the repo dimension, spec.repository stamped NORMALIZED; a grouped member’s shared VolumeGroupSnapshot name is re-derived PER REPOSITORY (group_name with the repo key) — each repo’s members are an independent capture wave, so N repos = N groups.

members: Some(vec![]) (a selector that matched nothing) yields no cells — the caller warns, as before.