Skip to content

storage*: Align origin-visit-add to take iterable of OriginVisit objects as input

This makes its api consistent with other add endpoints (see origin-visit-status-add as one example).

This is preparatory work towards removing origin-visit-upsert.

It's similar to origin-visit-upsert now but it does slighly more:

  1. it checks for origin existence (raise if unknown)
  2. it's able to either deal with visit with id (replayer case) and visit with no id (the existing use case)

It does also less by delegating the validation to the model instantiation (prior to the call of the endpoint) which is a good thing.

This also drops the dateutil.parser we want to phase out.

Related to T2310

Test Plan

tox


Migrated from D3262 (view on Phabricator)

Merge request reports

Loading