HomeSoftware Heritage

Remove dead code from the Python interface

Description

Remove dead code from the Python interface

  • api_client: unused CLI command that just queried a server and printed its statistics
  • maps / swhid.py: was used to translate the mappings of the SWHIDs to node IDs. Now one of the mappings has disappeared (MPH is used instead) and this translation entirely happens in the Java side. This entire code is no longer needed.
  • cachemount: can be trivially replaced by a simple systemd service, already how it currently is set up in production:

    [Service] Type=oneshot RemainAfterExit=yes ExecStart=mkdir -p /dev/shm/swh-graph/default ExecStart=sh -c "ln -s /.../compressed/* /dev/shm/swh-graph/default" ExecStart=sh -c "cp --remove-destination /.../compressed/graph.graph /dev/shm/swh-graph/default" ExecStart=sh -c "cp --remove-destination /.../compressed/graph-transposed.graph /dev/shm/swh-graph/default" ExecStop=rm -rf /dev/shm/swh-graph/default

    Prod should decide what are the correct tradeoffs as to what should be put in ram and what should be symlinked, instead of leaving that responsibility to the cachemount command.

Details

Provenance
seirlAuthored on May 11 2022, 4:05 PM
seirlPushed on May 14 2022, 12:45 AM
Differential Revision
D7814: Remove dead code from the Python interface
Parents
rDGRPH6a7d2ad35e2c: Test dataset: recompress with new pipeline
Branches
Unknown
Tags
Unknown
Build Status
Buildable 29387
Build 45923: test-and-buildJenkins console · Jenkins