Page MenuHomeSoftware Heritage

Normalize all Storage.xxx_add() methods to return a summary
ClosedPublic

Authored by douardda on Thu, Apr 29, 12:51 PM.

Details

Summary

but origin_visit_add() which requires more work to do so.

Note that this will change the way 'raw_extrinsinc_metadata_add()'
report statsd metrics: the 'method_name' tag will now remain
'raw_extrinsic_metadata_add' instead of a forged '<type_name>_metadata_add'.

Also properly annotate output of Storage.xxx_add() methods as Dict[str, int]
when applicable.

This is especially needed to be able to help writing consistent proxy storages
(like the buffer of the tenacious one) and have them properly handly all
_add methods the same. For example, the buffer storage is currently only
dealing with "core" object types, and extending id to other object types
is not as straighforward as it should be.

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 D5643 (id=20140)

Rebasing onto 98804f9e12...

Current branch diff-target is up to date.
Changes applied before test
commit 92d551a4a5155b6ef3e0a845e25840514d69b1b9
Author: David Douard <david.douard@sdfa3.org>
Date:   Thu Apr 29 12:00:24 2021 +0200

    Normalize all Storage.xxx_add() methods to return a summary
    
    but origin_visit_add() which requires more work to do so.
    
    Note that this will change the way 'raw_extrinsinc_metadata_add()'
    report statsd metrics: the 'method_name' tag will now remain
    'raw_extrinsic_metadata_add' instead of a forged '<type_name>_metadata_add'.

commit ff7ecb4b8445b45c35868f0111908131aab835e2
Author: David Douard <david.douard@sdfa3.org>
Date:   Wed Apr 28 17:15:25 2021 +0200

    Properly annotate output of Storage.xxx_add() methods as Dict[str, int]
    
    when applicable.

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

This revision is now accepted and ready to land.Thu, Apr 29, 1:00 PM