Page MenuHomeSoftware Heritage

deposit: Fetch only metadata created after the check started
ClosedPublic

Authored by vlorentz on Mar 4 2022, 6:06 PM.

Details

Summary

Instead of filtering out after fetching, which won't work when there is
more than one page of results.

Diff Detail

Repository
rDICP Icinga plugins
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build is green

Patch application report for D7303 (id=26423)

Could not rebase; Attempt merge onto c12f5202f0...

Updating c12f520..2676ebb
Fast-forward
 swh/icinga_plugins/deposit.py            |  9 ++----
 swh/icinga_plugins/tests/conftest.py     |  6 ++--
 swh/icinga_plugins/tests/test_deposit.py | 28 ++++++++---------
 swh/icinga_plugins/tests/test_vault.py   | 53 ++++++++++++++++++++++++++++----
 swh/icinga_plugins/vault.py              | 20 ++++++++++--
 5 files changed, 84 insertions(+), 32 deletions(-)
Changes applied before test
commit 2676ebba5a4814352752eef021d59799abb8c3b6
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Mar 4 18:06:01 2022 +0100

    deposit: Fetch only metadata created after the check started
    
    Instead of filtering out after fetching, which won't work when there is
    more than one page of results.

commit 0f9eb1a6ba9631dbc077eccf378be1a051948634
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Mar 4 17:51:32 2022 +0100

    vault: Open tarballs in stream mode + add test for empty tar files

commit fad1b2d8140624332ad07e333311961e2c053e3c
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Mar 4 17:49:41 2022 +0100

    Remove useless HTTP header from tests

See https://jenkins.softwareheritage.org/job/DICP/job/tests-on-diff/65/ for more details.

olasd added a subscriber: olasd.

Yeah, that's sensible :-)

This revision is now accepted and ready to land.Mar 4 2022, 6:12 PM