Page MenuHomeSoftware Heritage

Fix crash when using datastore_get_or_add for an existing datastore
ClosedPublic

Authored by vlorentz on May 25 2022, 3:26 PM.

Details

Summary

The case where the datastore already exists was masked by @functools.lru_cache,
which persists for the lifetime of a test, causing the function not to be
actually called twice.

Resolves T4228#85714

Diff Detail

Repository
rDSCRUB Datastore Scrubber
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

ardumont accepted this revision.
This revision is now accepted and ready to land.May 25 2022, 3:29 PM

Build is green

Patch application report for D7896 (id=28479)

Rebasing onto 9ed0df0a5c...

Current branch diff-target is up to date.
Changes applied before test
commit 800b450834aba9342905c5e4dc63861089441835
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Wed May 25 15:25:59 2022 +0200

    Fix crash when using datastore_get_or_add for an existing datastore
    
    The case where the datastore already exists was masked by @functools.lru_cache,
    which persists for the lifetime of a test, causing the function not to be
    actually called twice.

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