Details
- Reviewers
vlorentz - Group Reviewers
Reviewers - Commits
- rDJNLcad510ebe6e3: journal: Use swh-model objects instead of dicts in replay and writer
tox
Diff Detail
- Repository
- rDJNL Journal infrastructure
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
Build is green
See https://jenkins.softwareheritage.org/job/DJNL/job/tox/389/ for more details.
swh/journal/replay.py | ||
---|---|---|
124 | Working on this. |
Bad commit message; you're describing a consequence of the config instead of what the change is about.
I suggest "Use swh-model objects instead of dicts in replay and writer".
And if it's not too much trouble, you should split this into one diff for the replayer, and one for the writer.
swh/journal/__init__.py | ||
---|---|---|
17–25 ↗ | (On Diff #10003) | why is this not in replay.py? |
swh/journal/replay.py | ||
120–121 | If you merge D2813 first, you don't need to return List[Dict]. And instead of Tuple[List[SkippedContent], List[Content]], you can return List[BaseContent] call isinstance when iterating the list. | |
310 | I don't understand this comment |
swh/journal/__init__.py | ||
---|---|---|
17–25 ↗ | (On Diff #10003) | most possibly because i thought it'd be shared and in the end it was not. |
swh/journal/replay.py | ||
120–121 | I don't want to iterate again on the list... | |
310 | upserts accepts dict for now, it's D2813 again. |
swh/journal/replay.py | ||
---|---|---|
120–121 | Instead of giving fix_and_convert_objects three completely different behavior according to object types, you should split it into three different functions, one for each of the behaviors. |
Build has FAILED
Link to build: https://jenkins.softwareheritage.org/job/DJNL/job/tox/390/
See console output for more information: https://jenkins.softwareheritage.org/job/DJNL/job/tox/390/console
swh/journal/replay.py | ||
---|---|---|
120–121 | In that regard, i was tempted to:
and i did. |
Build is green
See https://jenkins.softwareheritage.org/job/DJNL/job/tox/391/ for more details.
Nice!
Next step is replacing fix_* functions returning dicts with read_* (or similar name) returning swh-model objects, right?
Build is green
See https://jenkins.softwareheritage.org/job/DJNL/job/tox/394/ for more details.
Next step is replacing fix_* functions returning dicts with read_* (or similar name) returning swh-model objects, right?
I'm unsure of what you mean. Read model object from the kafka topics?
For sure first, i'd like we manipulate model objects here and not a mix of dict and model objects.