Page MenuHomeSoftware Heritage

storage: Add endpoint to get missing content (by sha1_git) and missing snapshot
ClosedPublic

Authored by DanSeraf on Jan 22 2020, 1:29 PM.

Diff Detail

Repository
rDSTO Storage manager
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Looks good, but this diff is missing tests and matching changes in in_memory.py

This revision now requires changes to proceed.Jan 22 2020, 1:50 PM
  • in memory changes
  • test endpoint: content_missing (sha1_git), snapshot_missing

Two more comments, and it should be good to merge

swh/storage/tests/test_storage.py
381 ↗(On Diff #9173)

Could you use equality instead, to check content_missing_per_sha1_git doesn't return too many results?

2598 ↗(On Diff #9173)

same

This revision now requires changes to proceed.Jan 22 2020, 2:39 PM
swh/storage/tests/test_storage.py
381 ↗(On Diff #9173)

It returns only the missing content sha1_git, one in that case.

swh/storage/tests/test_storage.py
381 ↗(On Diff #9173)

What I mean is that we want the test to check that missing_contents can't be something like [None, None missing_cont['sha1_git'], None]

swh/storage/tests/test_storage.py
381 ↗(On Diff #9173)

Ok, i get it.

  • assert list doesn't have too many values
This revision is now accepted and ready to land.Jan 22 2020, 3:12 PM
  • storage: Add endpoint to get missing content (by sha1_git) and missing snapshot
  • in memory changes
  • test endpoint: content_missing (sha1_git), snapshot_missing
  • assert list doesn't have too many values