Page MenuHomeSoftware Heritage

Store snapshot_ids as hexadecimal strings, not bytes
ClosedPublic

Authored by olasd on Wed, Jul 21, 1:24 PM.

Details

Summary

elasticsearch does not know how to store bytes that aren't valid utf-8
strings, so store a hexadecimal representation instead

Test Plan

tests adjusted

Diff Detail

Repository
rDSEA Archive search
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 D6012 (id=21720)

Could not rebase; Attempt merge onto 32cb812a42...

Updating 32cb812..ffad9b1
Fast-forward
 swh/search/journal_client.py            | 35 +++++++++++++++++++------
 swh/search/tests/test_journal_client.py | 46 +++++++++++++++++++++++++++------
 2 files changed, 65 insertions(+), 16 deletions(-)
Changes applied before test
commit ffad9b1f31d419e09581f79ff0ef8219034f65f1
Author: Nicolas Dandrimont <nicolas@dandrimont.eu>
Date:   Wed Jul 21 13:23:30 2021 +0200

    Store snapshot_ids as hexadecimal strings, not bytes

commit 0fee7bb45f78f137def0525ab82558ef665cc9d5
Author: Nicolas Dandrimont <nicolas@dandrimont.eu>
Date:   Wed Jul 21 12:58:01 2021 +0200

    Add more varied tests for journal_client.fetch_last_revision_release_date

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

olasd requested review of this revision.Wed, Jul 21, 1:29 PM
This revision is now accepted and ready to land.Wed, Jul 21, 2:21 PM