Page MenuHomeSoftware Heritage

Set the value_sanitizer argument of get_journal_writer.
ClosedPublic

Authored by vlorentz on Nov 5 2020, 3:29 PM.

Details

Summary

The next version of swh-journal will remove the default value.

Diff Detail

Repository
rDSTO Storage manager
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

Patch application report for D4420 (id=15660)

Rebasing onto 84984a600c...

Current branch diff-target is up to date.
Changes applied before test
commit 9d1237b4eae1d64ca784e3ebb7f0f390e551b3a6
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Thu Nov 5 15:28:49 2020 +0100

    Set the value_sanitizer argument of get_journal_writer.
    
    The next version of swh-journal will remove the default value.

See https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/1051/ for more details.

ardumont requested changes to this revision.Nov 9 2020, 9:33 AM
ardumont added a subscriber: ardumont.

lgtm but there seems to be more changes than needed, see my question and comment inlined..

swh/storage/backfill.py
529

why moving move away from the factory call?

swh/storage/writer.py
55

My understanding of the diff's perimeter is this change and the adding the model-object-dict-sanitizer funtion.

The refactoring part (so the rest of the diff?) should go in another commit.

This revision now requires changes to proceed.Nov 9 2020, 9:33 AM
swh/storage/backfill.py
529

I don't remember...

swh/storage/writer.py
55

nope, I already did the former, and this is the refactoring part.

swh/storage/backfill.py
529

oh actually, it's not. this is swh.storage.writer.JournalWriter, which calls swh.journal.writer.get_journal_writer, which creates a swh.journal.writer.kafka.KafkaJournalWriter

The reason is 1. consistency with the result of swh-storage 2. swh.storage.writer.JournalWriter sets value_sanitizer

Build is green

Patch application report for D4420 (id=15752)

Rebasing onto 24cdc85c15...

Current branch diff-target is up to date.
Changes applied before test
commit 2e7d489eb245d4c3b684360d6f70f061804f77a9
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Thu Nov 5 15:28:49 2020 +0100

    Set the value_sanitizer argument of get_journal_writer.
    
    The next version of swh-journal will remove the default value.

See https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/1059/ for more details.

This revision is now accepted and ready to land.Nov 10 2020, 9:10 AM