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

Add "--preserve-digest" option to podman push #15544

Closed
StarpTech opened this issue Aug 30, 2022 · 6 comments
Closed

Add "--preserve-digest" option to podman push #15544

StarpTech opened this issue Aug 30, 2022 · 6 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@StarpTech
Copy link

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

/kind feature

Description

When running podman build and podman push multiple times, layers are modified and pushed to the registry even when the image hasn't changed or in other terms was fully cached. To avoid changing digests containers/storage introduce the --preserve-digest flag. See containers/image#1413 I'd like to add this flag to the podman push command

Describe the results you expected:

See #15538

https://github.com/containers/podman/blob/main/pkg/domain/infra/abi/images.go#L285

@openshift-ci openshift-ci bot added the kind/feature Categorizes issue or PR as related to a new feature. label Aug 30, 2022
@mheon
Copy link
Member

mheon commented Aug 31, 2022

@flouthoc PTAL

@vrothberg
Copy link
Member

AFAICS @mtrmac was not in favor of adding the option (see #15538 (reply in thread)). As outlined in the conversation, the --preserve-digest flag may also push uncompressed data.

I'd also feel more comfortable keeping that in skopeo copy only to avoid users falling into the trap of pushing uncompressed layers.

@mtrmac
Copy link
Collaborator

mtrmac commented Sep 6, 2022

Yes, I’m not at all enthusiastic about podman push --preserve-digests. It’s a trap for inattentive readers.

Overall optimizing this already-pushed case in single seconds to a bit fewer single seconds just seems very low-priority to me.


The directions to investigate from #15538 (reply in thread) would help this case, and other cases:

  • For some historical reason, we disable HTTP keep-alive, perhaps increasing the per-request latency — although I would guess, without data, that to only matter for images with rather more layers, because keep-alives only help if there are idle connections, and we already run 6 sessions in parallel.
  • It might be interesting to discuss looking for a known-compressed variant first, before looking for the original uncompressed one. That could ~halve the number of HEAD requests in this case.

@github-actions
Copy link

github-actions bot commented Oct 7, 2022

A friendly reminder that this issue had no activity for 30 days.

@rhatdan
Copy link
Member

rhatdan commented Jul 30, 2023

Since we are not going to work on this issue, closing.

@rhatdan rhatdan closed this as completed Jul 30, 2023
@mtrmac
Copy link
Collaborator

mtrmac commented Jul 31, 2023

FWIW:

The directions to investigate from #15538 (reply in thread) would help this case, and other cases:

  • For some historical reason, we disable HTTP keep-alive

This is no longer the case.

Also, unfinished containers/image#1968 might reduce the number of necessary round-trips, by up to about a third for images with several but not too many layers.

@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Oct 30, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/feature Categorizes issue or PR as related to a new feature. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

No branches or pull requests

5 participants