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

UNTESTED: Replace sigstore/rekor/pkg/client with a manually-created client #1845

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mtrmac
Copy link
Collaborator

@mtrmac mtrmac commented Feb 11, 2023

This removes 4.728 MB from a macOS Skopeo binary.

The costs are:

  • A few dozen lines of new code
  • A major loss of flexibility. All the removed layers had many options, this code hard-codes the choices we were making. Reintroducing the options could be pretty costly in extra code.
  • We lose the ability to debug Rekor API accesses via environment variables (something I had no idea exists; so there’s that.)
  • The previous code was able to decode responses in many formats, e.g. YAML, based on the Content-Type: header in the response. This one asks for JSON and expects JSON.

Absolutely untested, pretty likely to be broken due to some some fairly trivial but critical typo. Filing early to give more opportunity to review / discuss.

@rhatdan
Copy link
Member

rhatdan commented Feb 11, 2023

@lukehinds PTAL

@rhatdan
Copy link
Member

rhatdan commented Feb 11, 2023

I like the idea of shrinking the executable, hopefully this same shrinkage would apply to Podman.
I don't see the loss of functionality that you describe as been that drastic.

@mtrmac
Copy link
Collaborator Author

mtrmac commented Feb 13, 2023

Note to self: This should probably only be merged after we have integration tests against a Rekor server.

@mtrmac mtrmac mentioned this pull request Feb 13, 2023
16 tasks
@mtrmac mtrmac added the kind/feature A request for, or a PR adding, new functionality label Feb 17, 2023
@rhatdan
Copy link
Member

rhatdan commented Apr 1, 2023

Needs a rebase

…lient

This removes 4.728 MB from a macOS Skopeo binary.

Signed-off-by: Miloslav Trmač <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature A request for, or a PR adding, new functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants