Skip to content

Minor change to clarify that 'custom' is an object #125

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

Merged

Conversation

joshuagl
Copy link
Member

@joshuagl joshuagl commented Oct 6, 2020

Minor tweak of the description of the custom field of TARGETPATH objects to explicitly state that the value is an object which is opaque to the framework.

Fixes #50

@joshuagl joshuagl force-pushed the joshuagl/issue50-custom-object branch 2 times, most recently from 46fb9d2 to b9a066e Compare October 6, 2020 14:25
tuf-spec.md Outdated
Comment on lines 836 to 837
If defined, the elements and values of the CUSTOM object will be made
available to the client application. The format of, and information in,
Copy link
Member

Choose a reason for hiding this comment

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

Minor nit: Do you think that it is clear that the CUSTOM object, if supplied, must be a json object (i.e. deserialize to a Python dictionary), if we say the "format ... is opaque"?

Copy link
Member Author

Choose a reason for hiding this comment

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

That's a good question. I wanted to try and avoid mentioning JSON in the description, because we are trying to make the actual format of the metadata looser in the specification.

I felt like the change here was as clear, from the prose alone, as other places we talk about objects. Though admittedly those other places in the specification where we talk about objects also have an explicit example of the object format and don't refer to it as opaque.

I will try and clarify this some more tomorrow. Either by clarifying the language here, by pointing out in section 4.1 that all objects in the file formats are JSON objects, or perhaps a combination.

Copy link
Member

Choose a reason for hiding this comment

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

I think it is not a very big deal. I guess my association with the word "format" here is biased through securesystemslib.formats, where the format also specifies the datatype. It's quite likely that others don't have that association.

Copy link
Member Author

Choose a reason for hiding this comment

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

I've pushed a fixup commit with some further clarification that the framework only needs to know that the value mapped to the "custom" attribute is an object.

@joshuagl joshuagl force-pushed the joshuagl/issue50-custom-object branch from d55587e to 821942b Compare October 15, 2020 11:08
@joshuagl
Copy link
Member Author

Force pushed an update to merge the fixup and increase the patch number to 11, assuming that this will land after #127

@joshuagl joshuagl force-pushed the joshuagl/issue50-custom-object branch from 821942b to f7ec856 Compare October 30, 2020 12:18
@joshuagl
Copy link
Member Author

In the spirit of #132, could I get a second review/approval @trishankatdatadog or @mnm678 ?

Clarify that the custom field of TARGETPATH objects is itself an opaque
object with format and contents defined by the application.

Fixes: theupdateframework#50

Signed-off-by: Joshua Lock <[email protected]>
@joshuagl joshuagl force-pushed the joshuagl/issue50-custom-object branch from f7ec856 to 48df293 Compare November 25, 2020 09:17
@joshuagl joshuagl merged commit bd2b58f into theupdateframework:master Nov 25, 2020
@joshuagl joshuagl deleted the joshuagl/issue50-custom-object branch November 25, 2020 10:23
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.

Clarify the type of the target "custom" field
3 participants