Page MenuHomeSoftware Heritage

deposit: Fix loader deposit inconsistency in revision committer date
Closed, ResolvedPublic

Description

The current deposit loader use the wrong date values for the committer date.
This needs to be fixed to realign with the specification [5]

+-------------------+-----------------------------------------+----------------+----------------+
| SWH revision field| Description                             | CodeMeta term  | Fallback value |
+===================+=========================================+================+================+
| date              | date of software artifact modification  | dateCreated    | reception_date |
+-------------------+-----------------------------------------+----------------+----------------+
| committer_date    | date of the commit in VCS               | datePublished  | reception_date |
+-------------------+-----------------------------------------+----------------+----------------+

Following revisions [1] [2] [3] which exposes or not issues.

In that regard, [1] is faulty because datePublished is provided so the
committer date is wrong. Its author date is ok though.

[2] is faulty because, the committer date should be the reception date.
Its author date is ok though.

[3] is ok though. As its the metadata fields provided are the same
values (but that's plain luck ;)

[1]
https://archive.softwareheritage.org/api/1/revision/86e6c7e3ad0699601f73f343344a65f65b6f76ce/log/?fields=committer_date,date,metadata

[2]
https://archive.softwareheritage.org/api/1/revision/4631aacee153aab13d2c100c6716dfef5ec2a1ba/?fields=committer_date,date,metadata

[3]
https://archive.softwareheritage.org/api/1/revision/04a7cf3445bc390bc8dfaf93341a1f8f2008072c/?fields=committer_date,date,metadata

[4] https://forge.softwareheritage.org/source/swh-loader-core/browse/master/swh/loader/package/deposit/loader.py$93-96

[5] https://forge.softwareheritage.org/source/swh-deposit/browse/master/docs/specs/spec-loading.rst$217-219

Event Timeline

ardumont triaged this task as Normal priority.Apr 21 2020, 10:28 AM
ardumont created this task.
ardumont renamed this task from deposit: Fix loader deposit's inconsistency in revision date to deposit: Fix loader deposit inconsistency in revision committer date.Apr 21 2020, 1:41 PM

Note that only the deposit loader is impacted and [1] fixes it.

The api side of the deposit is already doing the right date computation [1]
described in the specification.

[1] https://forge.softwareheritage.org/D3039

[2] https://forge.softwareheritage.org/source/swh-deposit/browse/master/swh/deposit/api/private/deposit_read.py$0-135

mfw i noticed my typo in the git commit

¯\_(ツ)_/¯

ardumont claimed this task.Apr 21 2020, 4:14 PM

Fixed, landed, tagged and deployed.

ardumont closed this task as Resolved.Apr 21 2020, 4:14 PM