Page MenuHomeSoftware Heritage

Don't pass non-sequence iterables to the storage API.
ClosedPublic

Authored by vlorentz on Wed, Jul 29, 10:43 AM.

Details

Summary

The RPC framework can't serialize them.

Resolves sentry issue SWH-LOADER-CORE-DD

Test Plan

Also adding the StorageInterface type annotation, so that this becomes
type-checked with swh.core>v0.1.2 and swh.storage>v0.11.5.

Diff Detail

Repository
rDLDBASE Generic VCS/Package Loader
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

vlorentz created this revision.Wed, Jul 29, 10:43 AM
vlorentz edited the summary of this revision. (Show Details)Wed, Jul 29, 10:43 AM
vlorentz edited the summary of this revision. (Show Details)

I gather this fixes [1] thus the icinga warnings on the check loading deposit failure.

[1] https://sentry.softwareheritage.org/share/issue/1dce997a8f524b93a232c6757a8cd3f7/

Build is green

Patch application report for D3638 (id=12799)

Rebasing onto 04455fbe16...

Current branch diff-target is up to date.
Changes applied before test
commit 7b5ddd8080e13e0fc138feed5f13aa729c41ecae
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Wed Jul 29 10:43:00 2020 +0200

    Don't pass non-sequence iterables to the storage API.
    
    The RPC framework can't serialize them.
    
    Also adding the StorageInterface type annotation, so that this becomes
    type-checked with swh.core>v0.1.2 and swh.storage>v0.11.5.

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

ardumont accepted this revision.Wed, Jul 29, 10:46 AM
This revision is now accepted and ready to land.Wed, Jul 29, 10:46 AM