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

Start to sketch internal/oci/remote.SignedImage[Index]. #705

Merged
merged 1 commit into from
Sep 18, 2021

Conversation

mattmoor
Copy link
Member

This follows the pattern GGCR uses for functional remote.Options, and starts to define SignedImage[Index] methods, which build upon the Signatures implementation from a prior change.

This also tries to start adopting this pattern a few places, which drops bits of boilerplate (or changes them to functional options).

As part of this, I'm combining FetchSignaturesForImage[Digest] and tweaking it's signature a bit (no pun intended!), but I think long term we'll just want folks to consume the remote package directly themselves.

Signed-off-by: Matt Moore [email protected]

Ticket Link

Related #666

Release Note

NONE

@mattmoor
Copy link
Member Author

Mostly opening this to run the automated tests, there are still several pieces that I want to add to this, and it needs unit test coverage for some of the new functionality in internal/oci/remote.

Please don't merge this, or scrutinize it too much yet 😅

@mattmoor
Copy link
Member Author

Ok, I think I can explain all of the failures here with a thing I already had on my TODO list, which is nice.

tl;dr using remote.SignedImage on an image index is a bad idea 🤣

I'll fix that after lunch.

@mattmoor mattmoor force-pushed the remote-image-index-options branch 2 times, most recently from 956bf2e to 54e7fe1 Compare September 17, 2021 20:42
internal/oci/remote/remote.go Outdated Show resolved Hide resolved
internal/oci/remote/remote.go Outdated Show resolved Hide resolved
internal/oci/remote/remote.go Outdated Show resolved Hide resolved
@mattmoor mattmoor force-pushed the remote-image-index-options branch 3 times, most recently from c3ef61d to 6c9477a Compare September 17, 2021 23:00
@mattmoor mattmoor changed the title [WIP] Start to sketch internal/oci/remote.SignedImage[Index]. Start to sketch internal/oci/remote.SignedImage[Index]. Sep 17, 2021
This follows the pattern GGCR uses for functional `remote.Options`, and starts to define `SignedImage[Index]` methods, which build upon the `Signatures` implementation from a prior change.

This also tries to start adopting this pattern a few places, which drops bits of boilerplate (or changes them to functional options).

As part of this, I'm combining `FetchSignaturesForImage[Digest]` and tweaking it's signature a bit (no pun intended!), but I think long term we'll just want folks to consume the `remote` package directly themselves.

Signed-off-by: Matt Moore <[email protected]>
@mattmoor mattmoor force-pushed the remote-image-index-options branch from 6c9477a to b80d64c Compare September 17, 2021 23:16
name: "signature option",
opts: []Option{WithSignatureSuffix(".pig")},
want: &options{
SignatureSuffix: ".pig",
Copy link
Member

Choose a reason for hiding this comment

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

ecdsa signatures end up being pretty small, actually

@dekkagaijin dekkagaijin merged commit 210f7ee into sigstore:main Sep 18, 2021
@cpanato cpanato added this to the v1.3.0 milestone Sep 18, 2021
@mattmoor mattmoor deleted the remote-image-index-options branch September 18, 2021 15:38
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.

3 participants