Page MenuHomeSoftware Heritage

Add support for origin nodes in graph service API
Closed, ResolvedPublic

Description

What needs to be updated:

  • Node.Type enumeration
  • Example graph in unit tests
  • Unit tests themselves

Revisions and Commits

Event Timeline

haltode triaged this task as Normal priority.Jul 14 2019, 7:29 PM
haltode created this task.
haltode created this object in space S1 Public.
zack raised the priority of this task from Normal to High.Jul 25 2019, 4:57 PM
zack added a subscriber: zack.

due to this bug (I suppose), trying to generate the various mapping files for a compressed graph that also includes swh:1:ori:... PIDs fails with:

Pre-computing node id maps...
Exception in thread "main" java.lang.IllegalArgumentException: Unknown SWH ID type in: swh:1:ori:4135fe80baeff9983f73e94b02da92f618cbb6c7
	at org.softwareheritage.graph.SwhId.<init>(SwhId.java:44)
	at org.softwareheritage.graph.backend.Setup.precomputeNodeIdMap(Setup.java:108)
	at org.softwareheritage.graph.backend.Setup.main(Setup.java:47)

Yes this is related, there are safe checks when creating a new SwhId from a string form, and right now the code for the type looks like:

if (!type.matches("cnt|dir|rel|rev|snp"))