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

Push images faster #1005

Merged
merged 2 commits into from
Apr 7, 2023
Merged

Push images faster #1005

merged 2 commits into from
Apr 7, 2023

Conversation

jonjohnsonjr
Copy link
Collaborator

This PR contains two changes that should make publishing faster.

The first is bumping ggcr to pull in google/go-containerregistry#1633. This allows us to use the new remote.Pusher API, which better handles deduplication of token handshakes, blob uploads, and manifest uploads concurrently and safely.

The second is bumping cosign to pull in sigstore/cosign#2878. This allows users to set SOURCE_DATE_EPOCH in order to get reproducible SBOMs, which allows us to skip uploading them and also avoids generating a ton of unused SBOMs when re-uploading the same thing (e.g. in a tight development loop).

For a NOP ko build --platform=all (taking advantage of both SOURCE_DATE_EPOCH and KO_CACHE), we finish in ~1/4 the time.

Before:

SOURCE_DATE_EPOCH=$(git log -1 --format='%ct') KO_CACHE=~/tmp/ko = ko build .  21.06s user 12.85s system 163% cpu 20.781 total

After:

SOURCE_DATE_EPOCH=$(git log -1 --format='%ct') KO_CACHE=~/tmp/ko = ko build .  18.65s user 12.37s system 575% cpu 5.391 total

Even in non-NOP cases, the publisher leg should be quite a bit faster, but I am too lazy to measure those.

This should be much better at deduping and go much faster.
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