Page MenuHomeSoftware Heritage

to_disk: raise an AssertionError if content has an unexpected status.
ClosedPublic

Authored by vlorentz on Sep 4 2020, 10:29 AM.

Details

Summary

Although that will be fixed in the next version of swh-storage (D3874),
the current one returns a None status for skipped content, which
causes surprising behavior from the cooker (as it reuse the content
of the previous file in place of the current one).

Additionally, even though it shouldn't happen, if a content is
missing completely (ie. neither know nor skipped), it's still
possible to have a None status.

Diff Detail

Event Timeline

Build is green

Patch application report for D3882 (id=13688)

Rebasing onto ff8e6c8c14...

Current branch diff-target is up to date.
Changes applied before test
commit d64687d9c948db9d9b59a2858c3f50d1a9936042
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Sep 4 10:26:59 2020 +0200

    to_disk: raise an AssertionError if content has an unexpected status.
    
    Although that will be fixed in the next version of swh-storage,
    the current one returns a None status for skipped content, which
    causes surprising behavior from the cooker (as it reuse the content
    of the previous file in place of the current one).
    
    Additionally, even though it shouldn't happen, if a content is
    missing completely (ie. neither know nor skipped), it's still
    possible to have a None status.

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

fine.

But don't you require to add test alongside usually?

Build is green

Patch application report for D3882 (id=13690)

Rebasing onto ff8e6c8c14...

Current branch diff-target is up to date.
Changes applied before test
commit a14907ccb93944570fb59c841ab3a499ee0faba3
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Sep 4 10:26:59 2020 +0200

    to_disk: raise an AssertionError if content has an unexpected status.
    
    Although that will be fixed in the next version of swh-storage,
    the current one returns a None status for skipped content, which
    causes surprising behavior from the cooker (as it reuse the content
    of the previous file in place of the current one).
    
    Additionally, even though it shouldn't happen, if a content is
    missing completely (ie. neither know nor skipped), it's still
    possible to have a None status.

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

This revision is now accepted and ready to land.Sep 4 2020, 11:32 AM