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
Branch
known-endpoint-support
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 10237
Build 15187: Cassandra tests for swh-storage diffsJenkins
Build 15186: tox-on-jenkinsJenkins
Build 15185: arc lint + arc unit

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
380

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

2597

same

This revision now requires changes to proceed.Jan 22 2020, 2:39 PM
swh/storage/tests/test_storage.py
380

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

swh/storage/tests/test_storage.py
380

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
380

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