Skip to content

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

Merged
mtrmac merged 1 commit intocontainers:mainfrom
mike-sul:dont-store-signatures-if-none
Jun 15, 2023
Merged

Don't store signatures if there is none of them#2001
mtrmac merged 1 commit intocontainers:mainfrom
mike-sul:dont-store-signatures-if-none

Conversation

@mike-sul
Copy link
Copy Markdown
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
Copy Markdown
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.

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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>
lsm5 pushed a commit to lsm5/podman that referenced this pull request Jan 9, 2026
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>
lsm5 pushed a commit to lsm5/podman that referenced this pull request Jan 12, 2026
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>
lsm5 pushed a commit to lsm5/podman that referenced this pull request Jan 12, 2026
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>
lsm5 pushed a commit to lsm5/podman that referenced this pull request Jan 14, 2026
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>
lsm5 pushed a commit to lsm5/podman that referenced this pull request Jan 19, 2026
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>
lsm5 pushed a commit to TomSweeneyRedHat/podman that referenced this pull request Jan 19, 2026
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>
lsm5 pushed a commit to TomSweeneyRedHat/podman that referenced this pull request Jan 19, 2026
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>
cevich pushed a commit to cevich/podman that referenced this pull request Jan 21, 2026
(cherry picked from commit 2c0cd36)

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>
cevich pushed a commit to cevich/podman that referenced this pull request Jan 22, 2026
(cherry picked from commit 2c0cd36)

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>
cevich pushed a commit to cevich/podman that referenced this pull request Jan 28, 2026
(cherry picked from commit 2c0cd36)

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>
lsm5 pushed a commit to lsm5/podman that referenced this pull request Jan 29, 2026
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>
(cherry picked from commit 6eaf8a2)
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
lsm5 added a commit to lsm5/podman that referenced this pull request Jan 29, 2026
After[1] c/image no longer prints "Storing signatures" so we should
not check for it.

[1] containers/image#2001

(partial cherry-pick from commit 6eaf8a2)
Signed-off-by: Lokesh Mandvekar <lsm5@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