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

bench: return the intoto payload if requested #349

Merged
merged 1 commit into from
Jan 25, 2025

Conversation

spencerschrock
Copy link
Contributor

Summary

Instead of throwing the payload away, this will allow further benchmarking for things that need the payload, such as signing.

Release Note

NONE

Documentation

NONE

This will allow further benchmarking for things that need the payload,
such as signing.

Signed-off-by: Spencer Schrock <[email protected]>
@spencerschrock spencerschrock requested review from a team as code owners January 24, 2025 22:04
Comment on lines 149 to 152
# 3. Signing layer
if args.skip_manifest:
in_toto_builder = id # Do nothing, just evaluate the argument
if args.single_digest:
in_toto_builder = in_toto.SingleDigestIntotoPayload
else:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

the diff looks a little weird, but this is just removing this block and moving the indents over:

-if args.skip_manifest:
-        in_toto_builder = id  # Do nothing, just evaluate the argument
-else:

I'm not sure the call to id was needed and it messed with type checking

Copy link
Collaborator

Choose a reason for hiding this comment

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

That was to not transform the manifest into an in-toto statement. I wanted a function like lambda x: x and accidentally used id (which is that in Haskell but not in Python). In Python it just returns a number for every objects, related to its memory location, etc., a single identifier.

But it looks like skip_manifest is no longer used, so this is good.

Comment on lines 149 to 152
# 3. Signing layer
if args.skip_manifest:
in_toto_builder = id # Do nothing, just evaluate the argument
if args.single_digest:
in_toto_builder = in_toto.SingleDigestIntotoPayload
else:
Copy link
Collaborator

Choose a reason for hiding this comment

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

That was to not transform the manifest into an in-toto statement. I wanted a function like lambda x: x and accidentally used id (which is that in Haskell but not in Python). In Python it just returns a number for every objects, related to its memory location, etc., a single identifier.

But it looks like skip_manifest is no longer used, so this is good.

@mihaimaruseac mihaimaruseac merged commit d1cc550 into sigstore:main Jan 25, 2025
33 checks passed
@spencerschrock spencerschrock deleted the return-payload branch January 26, 2025 16:59
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