Page MenuHomeSoftware Heritage

Better handle aliases in snapshot content
ClosedPublic

Authored by anlambert on Oct 22 2019, 3:47 PM.

Details

Summary

Fix some issues related to aliases in snapshot content spotted after D2078 landing.

Basically, some redirections were missing as such cases were not yet encountered.

Depends on D2167

Diff Detail

Repository
rDWAPPS Web applications
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

olasd added a subscriber: olasd.

There's nothing in the spec that would prevent having to follow a chain of aliases, but I guess a single step resolution is good enough for now.

I suggest that at some point the "branch alias resolution" moves to the swh.storage.algorithms.snapshot module as a generic tool: I think it would make sense to have a "get the target directory for this branch on this snapshot" function, which would return the list of objects traversed up to the directory: branch aliases, releases, revisions.

This will also prepare us for the resolution of T1258.

This revision is now accepted and ready to land.Oct 23 2019, 12:09 PM