Page MenuHomeSoftware Heritage

Normalize the configuration file handling in the `swh storage` CLI command
ClosedPublic

Authored by douardda on Apr 23 2020, 3:30 PM.

Details

Summary

Almost every other swh package handles the loading of the config file
from the main click command group of the package.
So we make storage behaves the same.

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

Build is green

Patch application report for D3055 (id=10859)

Could not rebase; Attempt merge onto fe56005555...

Updating fe56005..cd32cf4
Fast-forward
 mypy.ini                           |   3 +
 swh/storage/backfill.py            | 490 +++++++++++++++++++++++++++++++++++++
 swh/storage/cli.py                 |  75 +++++-
 swh/storage/tests/test_backfill.py | 160 ++++++++++++
 4 files changed, 726 insertions(+), 2 deletions(-)
 create mode 100644 swh/storage/backfill.py
 create mode 100644 swh/storage/tests/test_backfill.py
Changes applied before test
commit cd32cf42538ff256bed718fd747e289c9a311ebf
Author: David Douard <david.douard@sdfa3.org>
Date:   Wed Apr 22 16:57:07 2020 +0200

    Normalize the configuration file handling in the `swh storage` CLI command
    
    Almost every other swh package handles the loading of the config file
    from the main click command group of the package.
    So we make storage behaves the same.

commit 698af8ca0028c5847326cf57f867608e533af9ed
Author: David Douard <david.douard@sdfa3.org>
Date:   Fri Apr 10 11:03:21 2020 +0200

    cli: rename the command 'backfiller' as 'backfill'
    
    for the sake of consistency.

commit b2bba450aaa808406b024800dcd50b4778313903
Author: David Douard <david.douard@sdfa3.org>
Date:   Thu Apr 9 16:56:44 2020 +0200

    Copy the backfiller component from swh-journal
    
    This componant makes more sense in the swh-storage package.

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

Looks about right, i guess some tests are coming in the following diff.

This revision is now accepted and ready to land.Apr 23 2020, 3:37 PM