Page MenuHomeSoftware Heritage

lookup_content_license: Fix crash with swh.storage.indexer v0.3.0.
ClosedPublic

Authored by vlorentz on Oct 26 2020, 4:40 PM.

Details

Summary

Because it returns attr objects instead of dicts now.

This wasn't caught before, because test_api_content_license only runs if
'nomossa' is installed, and it usually isn't.

Second half of the fix for T2729.

Diff Detail

Repository
rDWAPPS Web applications
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 D4355 (id=15401)

Rebasing onto d1643344e5...

Current branch diff-target is up to date.
Changes applied before test
commit 11061be40e4d5b900be0bc8be646319ded3c15b6
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Mon Oct 26 16:40:22 2020 +0100

    lookup_content_license: Fix crash with swh.storage.indexer v0.3.0.
    
    Because it returns attr objects instead of dicts now.
    
    This wasn't caught before, because test_api_content_license only runs if
    'nomossa' is installed, and it usually isn't.

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

undo changes to the API return format

Build is green

Patch application report for D4355 (id=15415)

Rebasing onto d1643344e5...

Current branch diff-target is up to date.
Changes applied before test
commit 3ffeb396fa10c9cc6b45161cbf520fbf9833c90d
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Mon Oct 26 16:40:22 2020 +0100

    lookup_content_license: Fix crash with swh.storage.indexer v0.3.0.
    
    Because it returns attr objects instead of dicts now.
    
    This wasn't caught before, because test_api_content_license only runs if
    'nomossa' is installed, and it usually isn't.

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

This revision is now accepted and ready to land.Oct 27 2020, 1:18 PM