Staging instance, all changes can be removed at any time

Skip to content

Drop no longer used validate proxy

The validate proxy was initially an helper to ease the transition from the use of dicts towards model objects in "*_add" production endpoints. It was not removed immediately and grew some behavior it should not have (notably revision conversion so the comparison within those related tests work).

After finally migrated away from dicts within the tests, we can now drop it [1].

Note that this moves the extra revision conversion behavior from the validate proxy to those related tests. This extra step will also disappear when we finally move the "*_get" endpoints to return model objects as well.

Note:

  • This drops many fixture redefinitions in the process (introduced so we could have that validate proxy).

  • Remove the "validate" keyword from the get_storage function (so no longer possible to instantiate one [2])

  • [1] swh-lister#2994 (closed)

  • [2] which practically is the case today, nothing runs on production with it.

Related to #2499 (closed)

Test Plan

tox


coverage increased a bit, with validate proxy (before):

-------------------------------------------------------------------------------------------------------------------------
TOTAL                                                                                    8411    433   2367    164    93%

===================================================================================== 788 passed, 16 skipped, 1 xfailed, 14 warnings in 352.12s (0:05:52) =====================================================================================
___________________________________________________________________________________________________________________ summary ___________________________________________________________________________________________________________________
  black: commands succeeded
  flake8: commands succeeded
  mypy: commands succeeded
  py3: commands succeeded
  congratulations :)

Now:

TOTAL                                                                                    8247    419   2327    157    94%

===================================================================================== 756 passed, 16 skipped, 1 xfailed, 14 warnings in 340.53s (0:05:40) =====================================================================================
___________________________________________________________________________________________________________________ summary ___________________________________________________________________________________________________________________
  black: commands succeeded
  flake8: commands succeeded
  mypy: commands succeeded
  py3: commands succeeded
  congratulations :)

Migrated from D3579 (view on Phabricator)

Merge request reports

Loading