Page MenuHomeSoftware Heritage

Method `visit_edges` from `NaiveClient` seems to be missing some results
Closed, MigratedEdits Locked

Description

While trying to recreate the history tree of a given revision id it appears that the edges having id as source are not returned by graph.visit_edges when graph is a NaiveClient (used for testing in swh-provenance):

parents = {}
src = CoreSWHID(object_type=ObjectType.REVISION, object_id=id)
request = graph.visit_edges(str(src), edges="rev:rev")
for child, parent in request:
parents.setdefault(
    CoreSWHID.from_string(child).object_id, []
).append(CoreSWHID.from_string(parent).object_id)
assert src.object_id in parents

Event Timeline

aeviso changed the task status from Open to Work in Progress.Mar 30 2022, 11:04 AM
aeviso changed the task status from Work in Progress to Open.
aeviso created this task.
aeviso updated the task description. (Show Details)

Could you provide a full example so I can reproduce the issue?

I've realized the problem is not in graph.visit_edges but on the way I'm using it. I forgot the border case where the revision has no parents

vlorentz changed the task status from Invalid to Resolved.Aug 26 2022, 11:12 AM
vlorentz changed the task status from Resolved to Invalid.
vlorentz moved this task from Backlog to Deployed on the Compressed graph service board.
vlorentz moved this task from Deployed to Wontfix / Invalid on the Compressed graph service board.