HomeSoftware Heritage

Make API endpoints take Lists instead of Iterables as arguments

Description

Make API endpoints take Lists instead of Iterables as arguments

  1. clients crash when they call the API with an iterator
  2. some backend implementations violate the contract by assuming the argument is a sequence (eg. by iterating twice on it, and assuming the elements are the same)
  3. no matter what we do, the endpoints will always get a list as argument in practice, because they go through the RPC framework
  4. there is no concrete (ha!) advantage in taking an Iterable rather than a List.

Details

Provenance
vlorentzAuthored on Jul 29 2020, 10:26 AM
vlorentzPushed on Jul 29 2020, 4:24 PM
Parents
rDSTO21b77304a044: storage*: use an enum to explicit the order in origin_visit_get
Branches
Unknown
Tags
Unknown
Build Status
Buildable 14054
Build 21576: test-and-buildJenkins console · Jenkins