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

Don't store signatures if there is none of them #2001

Merged
merged 1 commit into from
Jun 15, 2023

Conversation

mike-sul
Copy link
Contributor

Currently, the copy command prints the message 'Storing signatures' and calls the signature storing function, even if there are no signatures present. This can mislead users and make them believe that there are image signatures.

The proposed change modifies the copy function to print the message and invoke the image storing function only if there is at least one signature.

@mike-sul mike-sul force-pushed the dont-store-signatures-if-none branch from c016ed9 to 90699ce Compare June 15, 2023 10:38
Copy link
Collaborator

@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.

If we are improving this, the major user-visible aspect is actually that (typically during a pull) it may be the Commit that takes a long time, and that’s currently being attributed to storing signatures. That’s certainly not ideal; but just dropping that and attributing the delay to the previous layer copies would not be clearly better.

So I think the Commit step should cause a progress log (potentially with a per-transport opt-in to avoid noise?), and we can revisit the signature step afterwards.

copy/single.go Outdated Show resolved Hide resolved
Currently, the copy command prints the message 'Storing signatures' and
calls the signature storing function, even if there are no signatures
present. This can mislead users and make them believe that there are
image signatures.

The proposed change modifies the copy function to print the message and
invoke the image storing function only if there is at least one signature.

Signed-off-by: Mike <mike.sul@foundries.io>
@mike-sul mike-sul force-pushed the dont-store-signatures-if-none branch from 90699ce to 8bbc9c4 Compare June 15, 2023 11:16
@mike-sul
Copy link
Contributor Author

That’s certainly not ideal; but just dropping that and attributing the delay to the previous layer copies would not be clearly better.

The previous step is not layer copy iiuc, rather copyUpdatedConfigAndManifest which prints Writing manifest to image destination. What I observe now is

Copying blob 8f7d2488f433 done  
Copying config 99ae753c80 done  
Writing manifest to image destination
//--> "Storing signatures" used to be here

Do you mean that Writing manifest to image destination is misleading message too?

@mtrmac
Copy link
Collaborator

mtrmac commented Jun 15, 2023

My mistake; it’s the manifest step indeed.

That’s certainly less misleading than a layer copy — a bit: “why does writing a 1KB file take a minute?”.

Copy link
Collaborator

@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.

LGTM.

@mtrmac
Copy link
Collaborator

mtrmac commented Jun 15, 2023

Either way, this is an improvement.

@mtrmac mtrmac merged commit af92e39 into containers:main Jun 15, 2023
Luap99 added a commit to Luap99/libpod that referenced this pull request Jun 27, 2023
After[1] c/image no longer prints "Storing signatures" so we should
not check for it.

[1] containers/image#2001

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
ashley-cui pushed a commit to ashley-cui/podman that referenced this pull request Jul 1, 2023
After[1] c/image no longer prints "Storing signatures" so we should
not check for it.

[1] containers/image#2001

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
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