Page MenuHomeSoftware Heritage

Extract the main cli command in a dedicated cli.py module and make it an entrypoint
AbandonedPublic

Authored by douardda on Feb 14 2019, 2:06 PM.

Details

Reviewers
None
Group Reviewers
Reviewers
Summary

Add a swh.vault.api.wsgi module to instanciate the (singleton) wsgi app object

Typically used by external wsgi server like uwsgi or gunicorn, e.g.

gunicorn swh.vault.api.wsgi:app

Refactor the VaultBackend to use BaseDb and pool-based db access

Make it possible to specify the config file via SWH_CONFIG_FILENAME env var

so that we have a chance to explicitely choose the config file used when
running the wsgi app using a wsgi server like gunicorn.

Normalize the configuration of VaultBackend and cooker

  • Ensure every service for which an (remote or local) access is needed uses the same config structure (dict with 'cls' and 'args' keys).
  • Extract instanciation (thus confguration) of remote/external services (storage, cache, scheduler) from the VaultBackend constructor; these are now passed as init arguments; their instanciation/configuration is thus now handled by swh.vault.api.server and swh.vault.cooker.get_cooker (with some support in swh.vault.get_vault).

Rewrite tests using pytest's fuxture and adapt them to recent refactorings

pifpaf is not needed any more.

Diff Detail

Repository
rDVAU Software Heritage Vault
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 4231
Build 5582: tox-on-jenkinsJenkins
Build 5581: arc lint + arc unit