Parallel sign with fixed tests#1485
Merged
woodruffw merged 5 commits intosigstore:mainfrom Jul 29, 2025
Merged
Conversation
* Sign multiple artifacts in threads
This is (especially) useful with rekor 2 where the service only
responds after log inclusion: We would prefer to get all signatures
in the same inclusion batch.
The change still affects both rekor v1 and rekor v2.
This commit is a rebase of a bunch of Ramons commits.
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
* rekor: Make create_entry() conservative WRT session use
* Session thread safety is ambiguous: it may now be safe but situation
is unclear
* Use a single Session per create_entry() call: This may have a little
more overhead but seems like the safest option
* Note that RekorLog (v1) other methods may not be thread safe: I only
reviewed the create_entry() flow
Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
* timestamp: Dont reuse session
It's a little unclear if Session is now thread safe or not: avoid reuse
just in case
Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
* CLI: Refactor terminal output
* Separate the thread method so it's easier to see potential safety issues
* Using print() with the same file object is generally not thread safe: Avoid
it from the threaded method
The output remains effectively the same except:
* The b64 encoded signature is no longer printed to terminal
* Some print()s are now logger.info(): e.g.
Transparency log entry created at index: 5562
* Other print()s happen in a batch now, after he signing has finished
Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
* tests: Test signing multiple artifacts
Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
* Add test that signs multiple artifacts with rekor2
Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
* tests: lint fixes
Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
* rekor: Refactor Session handling in RekorClient
Make every RekorLog have a Session of their own by default.
This means RekorClient no longer needs to manage that.
Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
* cli: Let Python pick number of signing threads
This number does affect the number of concurrent rekor POST requests
we have in flight, but we are unlikely to hit rate limits as
they are defined in "requests from same host per minute".
Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
---------
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
Co-authored-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
This is just good hygiene but it should also stop the windows tests outright failing. Fixes sigstore#1477 Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
Member
Author
|
There's a few annoying details in testing this:
I suggest we merge #1484 first, then I run the tests on my fork to ensure the fix is correct |
Member
|
Yeah, this testing setup is continuing to show signs of unnecessary stress. I think we're at the point now where we should consider dropping our first-party OIDC usage entirely, and switch just to the public OIDC beacon for tests -- that would eliminate all of the PR test limitations and would also make local runs much easier. |
Member
Author
|
still seeing one more failure, will look into it |
* set output path to temp dir * don't unlink anything Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
Member
Author
|
Okay, this looks good on my fork: https://github.com/jku/sigstore-python/actions/runs/16601017811 |
woodruffw
approved these changes
Jul 29, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is attempt number 2 for #1468 (that was reverted because windows tests started failing), now with fixed tests.
The second commit contains the new changes -- only write to test specific temp directory in tests.