Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client::pull returns layers in non-deterministic order #134

Open
aochagavia opened this issue May 30, 2024 · 1 comment
Open

Client::pull returns layers in non-deterministic order #134

aochagavia opened this issue May 30, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@aochagavia
Copy link
Contributor

aochagavia commented May 30, 2024

The code for Client::pull uses buffer_unordered under the hood (see here). Because of this, layers are stored in arbitrary order in ImageData::layers. Unfortunately, this makes it impossible to know which layer from ImageData::layers corresponds to which entry in OciImageManifest::layers, unless you recalculate the hash (which seems like a waste of resources).

IMO we should either store the layers in ImageData::layers in their original order, or provide a mechanism to cheaply correlate them to the layers in OciImageManifest::layers (e.g. including an index number).

@thomastaylor312
Copy link
Contributor

I actually saw this the other day when I was modifying something else and wondered if it would be a problem. Thanks for filing the issue!

@thomastaylor312 thomastaylor312 added the enhancement New feature or request label May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants