Page MenuHomeSoftware Heritage

indexer.storage: Make server load and check explicit configuration
ClosedPublic

Authored by ardumont on Feb 21 2019, 2:19 PM.

Diff Detail

Repository
rDCIDX Metadata indexer
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build has FAILED

In tox.ini, the --doctest-modules force the loading of all modules.
I don't want this behavior for the swh/indexer/storage/api/wsgi.py as this fails (since it's not meant to run in test context).
I need to find a way to exclude it.

  • tests: Ignore wsgi module --doctest-modules forces module load
swh/indexer/storage/api/server.py
44–95

That's almost the same code as in swh.storage. You should move at least the first half it to swh.core.config.

ardumont marked an inline comment as done.

Fix exception type and rebase

ardumont added inline comments.
swh/indexer/storage/api/server.py
44–95

Yes, but as discussed with @douardda, i'm focused on doing it right first and on time.

Also, actually, for basic services, i agree (storage, indexer-storage, objstorage).
for other services, that's no longer true (webapp, deposit), there are way much to check.
So this refactoring will need more thinking first.

ardumont retitled this revision from indexer.storage: Make server load explicit configuration and check to indexer.storage: Make server load and check explicit configuration.Feb 21 2019, 3:51 PM
This revision is now accepted and ready to land.Feb 21 2019, 4:07 PM