Page MenuHomeSoftware Heritage

api.server: Make the api server use explicit configuration
ClosedPublic

Authored by ardumont on Feb 21 2019, 12:26 PM.

Details

Reviewers
douardda
vlorentz
Group Reviewers
Reviewers
Commits
rDSTOC95b0b42e0e77: api.server: Use the right Exception for the job
rDSTOC247ab97b103a: test_server: Refactor and fix issue for pytest on python3.5
rDSTOCa2db5ef1b5d6: api.server: Remove unused import
rDSTOC2d500d100da2: api.wsgi: Open wsgi entrypoint and check config at startup time
rDSTOCb38ecc05649c: swh.storage.cli: Migrate the api server startup in swh.storage.cli
rDSTOC750e292a2839: api.server: Remove implicit config from
rDSTOC2696b47e3e48: api.server: Make the api server load and check its configuration
R65:95b0b42e0e77: api.server: Use the right Exception for the job
R65:a2db5ef1b5d6: api.server: Remove unused import
R65:247ab97b103a: test_server: Refactor and fix issue for pytest on python3.5
R65:2696b47e3e48: api.server: Make the api server load and check its configuration
R65:750e292a2839: api.server: Remove implicit config from
R65:2d500d100da2: api.wsgi: Open wsgi entrypoint and check config at startup time
R65:b38ecc05649c: swh.storage.cli: Migrate the api server startup in swh.storage.cli
rDSTO95b0b42e0e77: api.server: Use the right Exception for the job
rDSTO247ab97b103a: test_server: Refactor and fix issue for pytest on python3.5
rDSTOb38ecc05649c: swh.storage.cli: Migrate the api server startup in swh.storage.cli
rDSTOa2db5ef1b5d6: api.server: Remove unused import
rDSTO2d500d100da2: api.wsgi: Open wsgi entrypoint and check config at startup time
rDSTO750e292a2839: api.server: Remove implicit config from
rDSTO2696b47e3e48: api.server: Make the api server load and check its configuration
Summary
  • Remove implicit config from
  • Open wsgi entrypoint
  • check config at startup time
  • Open a new swh.storage.cli to start the api server

Related T1533

Test Plan

tox

Diff Detail

Repository
rDSTO Storage manager
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 4367
Build 5775: tox-on-jenkinsJenkins
Build 5774: arc lint + arc unit

Event Timeline

Build has FAILED

/me raises an eyebrow

Apparently some version issue, fine locally, but the ci disagrees with:
TypeError: argument should be string, bytes or integer, not LocalPath

Checking that.
The gist of the diff can still be reviewed.

vlorentz added a subscriber: vlorentz.
vlorentz added inline comments.
swh/storage/api/server.py
386–390

You could use FileNotFoundError.

395

KeyError

401–409

ValueError

swh/storage/tests/test_server.py
72

Should be toplevel

This revision is now accepted and ready to land.Feb 21 2019, 1:15 PM
  • test_server: Refactor and fix issue for pytest on python3.5
  • api.server: Use the right Exception for the job

Thanks for the feedback!

Adapted.

This revision was automatically updated to reflect the committed changes.