Summary
pkg/mirror/discover.go:extractManifestImages reads manifests via recipe.GetManifestContentWithContext(ctx, nil, mPath) — the nil falls back to the package-level embedded provider. The sibling call in Discover (for component values) uses the recipe-bound provider via rec.GetValuesForComponentWithContext(gctx, ...).
So today, aicr mirror against a --data overlay reads component values from the overlay but manifests from embedded/global. This is inconsistent.
Context
Flagged by @yuanchen8911 in PR #1121 review. Pre-existing — the prior recipe.GetManifestContent(mPath) (before #1121) was also unconditionally global. Out of scope for #1109's interface-cancellation work, but worth fixing for --data consistency in mirror.
Acceptance
Related
Summary
pkg/mirror/discover.go:extractManifestImagesreads manifests viarecipe.GetManifestContentWithContext(ctx, nil, mPath)— thenilfalls back to the package-level embedded provider. The sibling call inDiscover(for component values) uses the recipe-bound provider viarec.GetValuesForComponentWithContext(gctx, ...).So today,
aicr mirroragainst a--dataoverlay reads component values from the overlay but manifests from embedded/global. This is inconsistent.Context
Flagged by @yuanchen8911 in PR #1121 review. Pre-existing — the prior
recipe.GetManifestContent(mPath)(before #1121) was also unconditionally global. Out of scope for #1109's interface-cancellation work, but worth fixing for--dataconsistency in mirror.Acceptance
extractManifestImagesaccepts the recipe's DataProvider (e.g., fromrec.DataProvider()) and passes it torecipe.GetManifestContentWithContextinstead ofnil.aicr mirror --data <dir>reads overlay-provided manifests when the overlay shadows an embedded manifest path.components/<name>/manifests/is honored byaicr mirror.Related