Page MenuHomeSoftware Heritage

loader: Ensure success is False when entering exception handler
ClosedPublic

Authored by anlambert on May 16 2022, 12:15 PM.

Details

Summary

The post_load method of a loader can raise an exception so we must
ensure to turn back the success variable to False in that case.

For instance, the subversion loader post_load checks that latest
exported revision is consistent with what the official subversion
client produces. If it is not an exception will be raised to set
the visit status to partial.

See https://jenkins.softwareheritage.org/job/DENV/job/tests/2538/artifact/swh-loader-svn.log

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

Build is green

Patch application report for D7833 (id=28292)

Rebasing onto 3874cdfe46...

Current branch diff-target is up to date.
Changes applied before test
commit d9a6ba057707d427e03b07503e60e5ce71df170c
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Mon May 16 12:08:07 2022 +0200

    loader: Ensure success is False when entering exception handler
    
    The post_load method of a loader can raise an exception so we must
    ensure to turn back the success variable to False in that case.
    
    For instance, the subversion loader post_load checks that latest
    exported revision is consistent with what the official subversion
    client produces. If it is not an exception will be raised to set
    the visit status to partial.

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

This revision is now accepted and ready to land.May 16 2022, 2:01 PM