Skip to content

feat(mirror): thread recipe-bound DataProvider through extractManifestImages #1122

Description

@mchmarny

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

  • extractManifestImages accepts the recipe's DataProvider (e.g., from rec.DataProvider()) and passes it to recipe.GetManifestContentWithContext instead of nil.
  • aicr mirror --data <dir> reads overlay-provided manifests when the overlay shadows an embedded manifest path.
  • Test: an overlay with a custom manifest file under components/<name>/manifests/ is honored by aicr mirror.

Related

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions