Page MenuHomeSoftware Heritage

Store snapshot_ids as hexadecimal strings, not bytes
ClosedPublic

Authored by olasd on Jul 21 2021, 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
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 22688
Build 35382: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 35381: arc lint + arc unit

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.Jul 21 2021, 1:29 PM
This revision is now accepted and ready to land.Jul 21 2021, 2:21 PM