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
Branch
log-ids
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 3691
Build 4817: tox-on-jenkinsJenkins
Build 4816: arc lint + arc unit

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
68

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
180

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
180

What's the difference?

swh/indexer/tests/test_metadata.py
180

you stop the duplication all over the tests?

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

That's only a small expression

  • Deduplicate mapping instantiation.