Page MenuHomeSoftware Heritage

Identify and fix releases that are stored as revisions
Closed, MigratedEdits Locked

Description

Some releases are stored as revision in the graph (maybe due to an old bug in the git loader?)

For example, look at

https://archive.softwareheritage.org/api/1/origin/2695882/visit/12/

you will see that only 1.0-rc7 is correctly stored as a release, all the others are, incorrectly, revisions.

"refs/tags/0.9.1": {
    "target": "45b0039a63c5da3164c6c2c3ff5deabea09ae4ba",
    "target_type": "revision",
    "target_url": "/api/1/revision/45b0039a63c5da3164c6c2c3ff5deabea09ae4ba/"
},
"refs/tags/0.9.8": {
    "target": "bfafe56602af035f59dcb6a9bd1ac3d68f193052",
    "target_type": "revision",
    "target_url": "/api/1/revision/bfafe56602af035f59dcb6a9bd1ac3d68f193052/"
},
"refs/tags/0.9.9": {
    "target": "d56ae79e43ff1b37534370911c8a78ec7f38d437",
    "target_type": "revision",
    "target_url": "/api/1/revision/d56ae79e43ff1b37534370911c8a78ec7f38d437/"
},
"refs/tags/1.0-rc1": {
    "target": "7596fdc31c9aa00aed281ccb026a74cabf2383bb",
    "target_type": "revision",
    "target_url": "/api/1/revision/7596fdc31c9aa00aed281ccb026a74cabf2383bb/"
},
"refs/tags/1.0-rc2": {
    "target": "00e81c89c29ff3e58745fdaf7abb68daa1389e85",
    "target_type": "revision",
    "target_url": "/api/1/revision/00e81c89c29ff3e58745fdaf7abb68daa1389e85/"
},
"refs/tags/1.0-rc4": {
    "target": "9f1f03ad692f3e98e2c3cb447a54de88e8353b0e",
    "target_type": "revision",
    "target_url": "/api/1/revision/9f1f03ad692f3e98e2c3cb447a54de88e8353b0e/"
},
"refs/tags/1.0-rc5": {
    "target": "a7cd1f755cba27f903253c418bdf34bb3962405e",
    "target_type": "revision",
    "target_url": "/api/1/revision/a7cd1f755cba27f903253c418bdf34bb3962405e/"
},
"refs/tags/1.0-rc6": {
    "target": "942f90e4ab18c4308a524176f804a88f5ce63454",
    "target_type": "revision",
    "target_url": "/api/1/revision/942f90e4ab18c4308a524176f804a88f5ce63454/"
},
"refs/tags/1.0-rc7": {
    "target": "3e7076586691d4e363689fbf5374f833289e0b98",
    "target_type": "release",
    "target_url": "/api/1/release/3e7076586691d4e363689fbf5374f833289e0b98/"
},

Event Timeline

zack triaged this task as Normal priority.Mar 2 2018, 5:49 PM
zack edited projects, added Archive content; removed Git loader, Storage manager.

Thanks for the report. I haven't looked into this specific, so it's indeed possible it's a bug, but in the general case this is potentially normal behavior.
Branches can point to either releases or revisions (or, in fact, anything at all).
In the Git case, which looks like your case comes from, if one simply does a "git tag", that would create a ref pointing to a revision; whereas if one does "git tag -a" (annotated tag), that would create a release object (pointing to a revision) and a ref pointing to the release object. So an author that switched from using "git tag" to use "git tag -a" would justify what you have seen.

This example comes from parmap, see https://github.com/rdicosmo/parmap/

It is indeed the case (as you perfectly guessed!) that in the git store
1.0-rc7 is a "tag", while at least 1.0-rc6 is a "ref" only (so I suppose
the others are too).

$ git show cat 1.0-rc7
tag 1.0-rc7
Tagger: Roberto Di Cosmo <github@dicosmo.org>
Date: Thu Sep 17 16:35:00 2015 +0200

Improved autoconf

commit a9f3396f372ed4a51d75e15ca16c1c2df1fc5c97

$ git show cat 1.0-rc6
commit 942f90e4ab18c4308a524176f804a88f5ce63454

The confusion arose from the way GitHub presente all these as "releases",
see

https://github.com/rdicosmo/parmap/releases

Roberto Di Cosmo


Computer Science Professor

(on leave at INRIA from IRIF/University Paris Diderot)

Software Heritage E-mail : roberto@dicosmo.org
INRIA Web : http://www.dicosmo.org
Bureau C123 Twitter : http://twitter.com/rdicosmo
2, Rue Simone Iff Tel : +33 1 80 49 44 42
CS 42112

75589 Paris Cedex 12

GPG fingerprint 2931 20CE 3A5A 5390 98EC 8BFC FCCA C3BE 39CB 12D3

anlambert claimed this task.
anlambert added a subscriber: anlambert.

As this is not a bug, I am closing that task.