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

proxy: Add GetLayerInfoPiped #2554

Merged
merged 2 commits into from
Mar 24, 2025
Merged

Conversation

cgwalters
Copy link
Contributor

I was experimenting with images with lots of layers (> 200) and this invocation was incorrectly adding the entire response into what was intended as the metadata plane.

GetManifest and GetConfig (even those are relatively small) still always return their data over a pipe, same as blobs.

Add a new GetLayerInfoPiped that does the same so we can easily get this information for images with a lot of layers.

cgwalters added a commit to cgwalters/containers-image-proxy-rs that referenced this pull request Mar 21, 2025
Depends on containers/skopeo#2554

This ensures we support e.g. images with > 100 layers.

Signed-off-by: Colin Walters <walters@verbum.org>
@cgwalters
Copy link
Contributor Author

Consumer in containers/containers-image-proxy-rs#76

Copy link
Contributor

@mtrmac mtrmac left a comment

Choose a reason for hiding this comment

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

Thanks!

The code is fair enough, but, just to be clear, this changes ~nothing Skopeo-side: the manifest, and the layer info array, all exist in memory. AFAICS this makes a difference only because the caller has a https://github.com/containers/containers-image-proxy-rs/blob/63f5f96d4196ffb31a9167f6421ceb0df07ec111/src/imageproxy.rs#L382 .

That’s a reasonable design — a caller looking for a success/failure indicator has a fair need to get that value without having to read an unbounded value into memory first — I just want to make sure there is no misunderstanding.

@cgwalters
Copy link
Contributor Author

AFAICS this makes a difference only because the caller has a https://github.com/containers/containers-image-proxy-rs/blob/63f5f96d4196ffb31a9167f6421ceb0df07ec111/src/imageproxy.rs#L382

No, that issue is inherently because we use SOCK_SEQPACKET and the kernel doesn't support queuing arbitrary message sizes there.

There's an equivalent constant here

// maxMsgSize is the current limit on a packet size.

@mtrmac
Copy link
Contributor

mtrmac commented Mar 21, 2025

Oh. Good thing I asked :)

@cgwalters cgwalters force-pushed the layer-info-extended branch from ca37b8e to 2103c89 Compare March 21, 2025 19:05
I was experimenting with images with lots of layers (> 200) and
this invocation was incorrectly adding the entire response
into what was intended as the metadata plane.

`GetManifest` and `GetConfig` (even those are relatively small)
still always return their data over a pipe, same as blobs.

Add a new `GetLayerInfoPiped` that does the same so we
can easily get this information for images with a lot of layers.

Signed-off-by: Colin Walters <walters@verbum.org>
@cgwalters cgwalters force-pushed the layer-info-extended branch from 2103c89 to a31470d Compare March 21, 2025 19:06
@cgwalters
Copy link
Contributor Author

Just to recap briefly here the rationale for the protocol as designed is that it clearly splits metadata and data channels, allowing us to pipeline operations.

We previously discussed alternative IPC protocols in e.g. #1844 (comment)

Copy link
Contributor

@mtrmac mtrmac left a comment

Choose a reason for hiding this comment

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

Thanks! LGTM.

@cgwalters cgwalters enabled auto-merge March 21, 2025 19:57
@cgwalters cgwalters disabled auto-merge March 21, 2025 21:21
@cgwalters
Copy link
Contributor Author

Hmm...it looks like the testing farm jobs succeeded, but didn't report that success to GH?
/packit retest

@cgwalters
Copy link
Contributor Author

/packit test

@mtrmac
Copy link
Contributor

mtrmac commented Mar 21, 2025

You’re all good, the “release” jobs don’t run on the main branch, but, sadly, show up in the list.

@lsm5 this is packit/packit-service#2678 , isn’t it?

@cgwalters
Copy link
Contributor Author

Hmm, but all I can do here is "Enable auto-merge" but that I think is waiting for those jobs?

@mtrmac
Copy link
Contributor

mtrmac commented Mar 21, 2025

Not on those. I’m confused about that button as well — my current theory is that it is waiting on the PR to be rebased (in some other PR, “Update Branch / Update with merge commit” didn’t help IIRC), but I didn’t properly test that theory yet.

@cgwalters
Copy link
Contributor Author

Hmm, does this repo have a config enabled that requires each PR to be against current main? That seems to be an unnecessary hit to ergonomics

@cgwalters
Copy link
Contributor Author

cgwalters commented Mar 21, 2025

Ah yes
image
is this intentional?

@mtrmac
Copy link
Contributor

mtrmac commented Mar 21, 2025

I’m not at all sure about the full history. ISTR requiring PRs to be fresh is intentional, but also admins had the option to override it and force-merge — maybe that has been disabled. I don’t know when or by who.

@TomSweeneyRedHat
Copy link
Member

LGTM
I'll leave the merge honors to @mtrmac

@cgwalters cgwalters merged commit 5b0b0d3 into containers:main Mar 24, 2025
33 of 43 checks passed
@lsm5
Copy link
Member

lsm5 commented Mar 25, 2025

@lsm5 this is packit/packit-service#2678 , isn’t it?

yes. Actually I think it's best to remove those additional jobs until I have the right github actions figured out. Will submit a PR.

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.

None yet

4 participants