-
Notifications
You must be signed in to change notification settings - Fork 26
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
encode return value as integer instead of string #36
Conversation
One open question is, how do we want to handle null values? Right now I have just assigned |
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.
LGTM. I agree with @shibumi that it makes sense to recommend int and null, especially since that's what we expect in the reference implementation.
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.
Maybe @SantiagoTorres wants to make the final call. :)
The in-toto python reference implementation encodes the return-value field of our link files as integer. Our specification specified this field as string value. This commit fixes this inconsistency and assigns the right data type to the return-value field. Furthermore we remove a "return-value" line, outside of of an actual byproducts object. May has been a remainder of the signed part.
28d6157
to
d622c8e
Compare
@SantiagoTorres @lukpueh I have force pushed a new version + I have modified the commit message, that it's clear we have also removed one return-value line that was a remainder. |
re-ping @SantiagoTorres |
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.
I think this change looks good to me, and would represent the present behaviour in in-toto-python and in-toto-golang. Would we need to make any changes to record return-value as null if it isn't recorded?
@lukpueh still need to withdraw his request for changes or click on 'approve', if this should get merged :) |
Good question. in-toto-run always records a return-value in both implementations. in-toto-record (only available in the reference implementation) returns an empty byproducts field. Given that this is only a recommendation, I think we are fine either way. |
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.
Thanks for taking care of this, @shibumi!
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.
Agreed, @lukpueh. LGTM!
The in-toto python reference implementation encodes the return-value
field of our link files as integer. Our specification specified this
field as string value. This commit fixes this inconsistency and
assigns the right data type to the return-value field.
CC: @SantiagoTorres @lukpueh @trishankatdatadog