Page MenuHomeSoftware Heritage

replayer: factor out legacy objects fixers
ClosedPublic

Authored by seirl on Mar 23 2020, 6:00 PM.

Details

Summary

This will allow other journal clients to use the fixers, instead of this
being solely a replayer feature.

One could also imagine integrating the fixer directly in the journal so
that the fixes happen transparently for all the users without having to
call the fixer explicitely, and this diff is a first step in this
direction.

Test Plan

tox passes the unit tests and mypy is happy

Diff Detail

Repository
rDJNL Journal infrastructure
Branch
separate_fixer
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 11293
Build 17074: tox-on-jenkinsJenkins
Build 17073: arc lint + arc unit

Event Timeline

olasd added a subscriber: olasd.

Looks good to me, save from one inline comment.

The tests failure is a silly doctest dict key order thing. Even if it's a bit overkill, might I suggest turning the doctests into actual tests that wouldn't exhibit such an issue (in a followup diff)?

swh/journal/replay.py
129

You can switch this to use the object_converter_fn fallthrough now, I guess.

This revision is now accepted and ready to land.Mar 23 2020, 6:11 PM

use fallback for revision

This revision was automatically updated to reflect the committed changes.