Skip to content

Clarify use case for sorting of changes.csv #1280

@bernhardreiter

Description

@bernhardreiter

For changes.csv files to be useful for implementers, the understanding of its properties must be good.

A corollary from the current_release_data requirement (https://docs.oasis-open.org/csaf/csaf/v2.1/csaf-v2.1.html#document-property-tracking-current-release-date) and the requirement that changes.csv is sorted with newest at the top, is that changes.csv should only grow at the top. New entry will be freshly "published" aka "released" and so they can only be added at the top.

To implement a simple incremental downloader, someone could then start reading and downloading each line of changes.csv from the top, until a line is hit with an entry that I already have or that is elder then the last time I've downloaded things.

The matches a mental model which I have as an implementer: "changes.csv" is like a log and can only grow at the top (and be truncated at some point). (This nicely matches the fact that changes.csv exists at all, because the sorting and the publication date is what makes a difference to the index.txt. What would it be good for, if it is not to make implementation's life easier. )

If entries would be added to the middle of the file, then the above algorithm wouldn't work. I had to parse everything and diff it to the last revision to see if there is a new entry with an elder publication date that has been added. ISDuBA does something like this and the implementation of what do download has become more complicated as a result.

For simplification I suggest to add a note about the above corollary.

(And similar to CSAF ROLIE, but for this I need to check the ROLIE details first, it may already be specified in the standards it is build upon.)
(There is the related question of "recent" means for changes.csv. It is only useful if the timespan is significant, so maybe giving a minimum that implementation can rely on like 3 months or 12 months. Probably worth another issue.)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions