-
Notifications
You must be signed in to change notification settings - Fork 32
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
Conversation
This will allow further benchmarking for things that need the payload, such as signing. Signed-off-by: Spencer Schrock <[email protected]>
# 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: |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
# 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: |
There was a problem hiding this comment.
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.
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