Page MenuHomeSoftware Heritage

converters: convert extra_headers to an empty list if it is None.
ClosedPublic

Authored by vlorentz on Aug 19 2020, 2:24 PM.

Diff Detail

Repository
rDSTO Storage manager
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 14671
Build 22602: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 22601: arc lint + arc unit

Unit TestsFailed

TimeTest
20,333 msJenkins > .tox.py3.lib.python3.7.site-packages.swh.storage.tests.test_backfill::test_backfiller
swh_storage_backend_config = {'cls': 'local', 'db': 'postgresql://postgres@127.0.0.1:21217/tests', 'journal_writer': {'brokers': ['127.0.0.1:56779'], 'client_id': 'kafka_writer-1', 'cls': 'kafka', 'prefix': 'euqfkagjyj-1'}, 'objstorage': {'args': {}, 'cls': 'memory'}} kafka_prefix = 'euqfkagjyj', kafka_consumer_group = 'test-consumer-euqfkagjyj' kafka_server = '127.0.0.1:56779'
3 msJenkins > .tox.py3.lib.python3.7.site-packages.swh.storage.fixer::swh.storage.fixer._fix_content
1 msJenkins > .tox.py3.lib.python3.7.site-packages.swh.storage.fixer::swh.storage.fixer._fix_origin
2 msJenkins > .tox.py3.lib.python3.7.site-packages.swh.storage.fixer::swh.storage.fixer._fix_origin_visit
2 msJenkins > .tox.py3.lib.python3.7.site-packages.swh.storage.fixer::swh.storage.fixer._fix_revision
View Full Test Results (1 Failed · 686 Passed · 23 Skipped)

Event Timeline

Build has FAILED

Patch application report for D3804 (id=13407)

Could not rebase; Attempt merge onto bd925475d9...

Updating bd925475..7e127989
Fast-forward
 sql/upgrades/160.sql               | 41 ++++++++++++++++++++++++++++++++++++++
 swh/storage/converters.py          | 16 +++++++++++----
 swh/storage/sql/30-swh-schema.sql  |  2 +-
 swh/storage/sql/60-swh-indexes.sql | 22 ++++++++++++++++++++
 4 files changed, 76 insertions(+), 5 deletions(-)
 create mode 100644 sql/upgrades/160.sql
Changes applied before test
commit 7e12798961b815fc20caa5f78a0e9a2428313ae5
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Wed Aug 19 14:23:54 2020 +0200

    converters: convert extra_headers to an empty list if it is None.

commit 6b467dd4c12827a5d1ed347d3edcd079e4c03724
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Wed Aug 19 14:06:21 2020 +0200

    converters: convert neg_utc_offset to False if it is None.

commit 131d156469724e07dd34efc5a47873c1b63097f5
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Wed Aug 19 12:40:01 2020 +0200

    pg: Make date_neg_utc_offset is not null if date is not null.
    
    Fixes a regression in 038a219f84d6b8a4f02b48f9ad3c5d823d097790,
    as it made converters expect a boolean.
    
    We stopped writing this kind of nulls since we started using model
    objects for insertions, but didn't migrate existing data.
    
    This commit migrates these nulls to false, then adds a constraint
    to enforce it in the future.

Link to build: https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/821/
See console output for more information: https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/821/console

Build is green

Patch application report for D3804 (id=13413)

Could not rebase; Attempt merge onto bd925475d9...

Updating bd925475..ca3ee92d
Fast-forward
 sql/upgrades/160.sql               | 41 ++++++++++++++++++++++++++++++++++++++
 swh/storage/backfill.py            |  1 +
 swh/storage/converters.py          | 16 +++++++++++----
 swh/storage/sql/30-swh-schema.sql  |  2 +-
 swh/storage/sql/60-swh-indexes.sql | 22 ++++++++++++++++++++
 5 files changed, 77 insertions(+), 5 deletions(-)
 create mode 100644 sql/upgrades/160.sql
Changes applied before test
commit ca3ee92da47be37c25439a49ef18c4a1d63edd58
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Wed Aug 19 14:23:54 2020 +0200

    converters: convert extra_headers to an empty list if it is None.

commit e2b14948da143925b0421415580df63e48d18a5b
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Wed Aug 19 12:40:01 2020 +0200

    pg: Make date_neg_utc_offset is not null if date is not null.
    
    Fixes a regression in 038a219f84d6b8a4f02b48f9ad3c5d823d097790,
    as it made converters expect a boolean.
    
    We stopped writing this kind of nulls since we started using model
    objects for insertions, but didn't migrate existing data.
    
    This commit migrates these nulls to false, then adds a constraint
    to enforce it in the future.

commit 7dcd5708b0cffdacd0082288262ccc4d78cec2de
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Wed Aug 19 14:06:21 2020 +0200

    converters: convert neg_utc_offset to False if it is None.

commit e2f066549123f069bf0ae34d593038ffd834d9c4
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Wed Aug 19 14:54:45 2020 +0200

    backfiller: Add missing 'extra_header' field.
    
    This field wasn't backfilled; and it wasn't caught by tests, because
    revisions in swh.journal.tests.journal_data.TEST_OBJECTS were had
    an empty extra_header field.
    
    Starting with swh-journal v0.4.3, one of the revisions in TEST_OBJECTS
    has a non-empty extra_header field, so it will become a test failure
    without this commit

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

This revision is now accepted and ready to land.Aug 19 2020, 3:17 PM