Skip to content

Add multi-reference push to ImageStore#661

Open
realrajaryan wants to merge 2 commits intoapple:mainfrom
realrajaryan:users/realrajaryan/push-multiple-images
Open

Add multi-reference push to ImageStore#661
realrajaryan wants to merge 2 commits intoapple:mainfrom
realrajaryan:users/realrajaryan/push-multiple-images

Conversation

@realrajaryan
Copy link
Copy Markdown
Contributor

@realrajaryan realrajaryan commented Apr 7, 2026

Adds an overload of ImageStore.push that accepts multiple references and shares a single RegistryClient across all pushes. Will be used for apple/container#1335


// Parse all references upfront: validate hosts and avoid re-parsing inside tasks.
let parsed = try references.map { ref in try Reference.parse(ref) }
let hosts = Set(parsed.compactMap { $0.resolvedDomain })
Copy link
Copy Markdown
Contributor

@jglogan jglogan Apr 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the references canonical; for example, has alpine already been resolved to docker.io/alpine:latest?

If not, this is going to break if I try this with references that are missing hostnames.

This is probably just a documentation matter - the docc for these calls should state what is expected for imageref parameters. But in that case we should probably go first to a hosts List and check that references.count == hosts.count before deduping.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants