Page MenuHomeSoftware Heritage

replay: fix raw_extrinsic_metadata insertion and type annotation
ClosedPublic

Authored by douardda on Sep 28 2021, 5:18 PM.

Details

Summary

due to missing type annotation of the storage argument of
_insert_objects(), we missed a bug in the processing of
raw_extrinsic_metadata objects, passing set() as arguments of storage
add methods.

Also fix annotation of collision_aware_content_add(),
the callable is expected to return a dict (and now we have an annotated storage,
mypy is not happy any more).

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

vlorentz accepted this revision.
This revision is now accepted and ready to land.Sep 28 2021, 5:23 PM

Build has FAILED

Patch application report for D6370 (id=23146)

Rebasing onto 42bad90816...

Current branch diff-target is up to date.
Changes applied before test
commit 24dc0ee19a9b7dcc3229f7a2a4de565f78508144
Author: David Douard <david.douard@sdfa3.org>
Date:   Tue Sep 28 17:13:26 2021 +0200

    replay: fix raw_extrinsic_metadata insertion and type annotation
    
    due to missing type annotation of the storage argument of
    _insert_objects(), we missed a bug in the processing of
    raw_extrinsic_metadata objects, passing set() as arguments of storage
    add methods.

commit b963639542e8ad8f4deafc14433b79610608ebd9
Author: David Douard <david.douard@sdfa3.org>
Date:   Tue Sep 28 17:04:18 2021 +0200

    replay: fix annotation of collision_aware_content_add()
    
    now the callable is expected to return a dict.

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

Build is green

Patch application report for D6370 (id=23161)

Rebasing onto 8ba232c5ef...

Current branch diff-target is up to date.
Changes applied before test
commit 9a3589f24cae48cdd7cd73e512fcf92c5ec7cfa7
Author: David Douard <david.douard@sdfa3.org>
Date:   Tue Sep 28 17:13:26 2021 +0200

    replay: fix raw_extrinsic_metadata insertion and type annotation
    
    due to missing type annotation of the storage argument of
    _insert_objects(), we missed a bug in the processing of
    raw_extrinsic_metadata objects, passing set() as arguments of storage
    add methods.

commit 21aff2d1cbab92cc157e00cd466528a902c62a0f
Author: David Douard <david.douard@sdfa3.org>
Date:   Tue Sep 28 17:04:18 2021 +0200

    replay: fix annotation of collision_aware_content_add()
    
    now the callable is expected to return a dict.

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

add type annotation for process_replay_objects()

Build is green

Patch application report for D6370 (id=23163)

Rebasing onto 8ba232c5ef...

Current branch diff-target is up to date.
Changes applied before test
commit 113088ab065bcc7a089db92fd5e02ee89b1d0fe4
Author: David Douard <david.douard@sdfa3.org>
Date:   Wed Sep 29 10:59:12 2021 +0200

    replay: add type annotation for process_replay_objects()

commit 9a3589f24cae48cdd7cd73e512fcf92c5ec7cfa7
Author: David Douard <david.douard@sdfa3.org>
Date:   Tue Sep 28 17:13:26 2021 +0200

    replay: fix raw_extrinsic_metadata insertion and type annotation
    
    due to missing type annotation of the storage argument of
    _insert_objects(), we missed a bug in the processing of
    raw_extrinsic_metadata objects, passing set() as arguments of storage
    add methods.

commit 21aff2d1cbab92cc157e00cd466528a902c62a0f
Author: David Douard <david.douard@sdfa3.org>
Date:   Tue Sep 28 17:04:18 2021 +0200

    replay: fix annotation of collision_aware_content_add()
    
    now the callable is expected to return a dict.

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