Page MenuHomeSoftware Heritage

Make metadata translation warnings reference revisions/content ids instead of dumping the content itself.
ClosedPublic

Authored by vlorentz on Jan 24 2019, 4:34 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

vlorentz retitled this revision from Make metadata translation warning reference revisions/content ids instead of dumping the content itself. to Make metadata translation warnings reference revisions/content ids instead of dumping the content itself..
ardumont added a subscriber: ardumont.
ardumont added inline comments.
swh/indexer/metadata.py
67

why does the call change here (reading more carefully the rest of the diff)?
...

ok, it's not the call that changes, it's the initialization of the mapping class.
That instantiation is now done at each index method call.
As the init method allows to pass along a log_suffix now for the edge case failures, you can now log more information.

swh/indexer/tests/test_metadata.py
172

can't you extract that in the test setup (where it makes sense)?

self.npm_mapping = MAPPINGS["NpmMapping"]()
This revision is now accepted and ready to land.Jan 25 2019, 2:52 PM
vlorentz added inline comments.
swh/indexer/tests/test_metadata.py
172

What's the difference?

swh/indexer/tests/test_metadata.py
172

you stop the duplication all over the tests?

vlorentz added inline comments.
swh/indexer/tests/test_metadata.py
172

That's only a small expression

  • Deduplicate mapping instantiation.