Page MenuHomeSoftware Heritage

hypothesis: Fix some issues in snapshots strategy and add tests
ClosedPublic

Authored by anlambert on Apr 1 2020, 11:54 PM.

Details

Summary

A couple of tests in swh-web fail after updating swh-model.

I noticed two issues related to the snapshots hypothesis strategy since this recent update:

  • Keyword parameters transmission to snapshots_d strategy were invalid (copy / paste mistake I guess)
  • A new edge case never encountered since then with the strategy: the max_size constraint could end up not respected if the generated snapshot contains alias branches. I guess recent changes in swh-model makes that case appear now.

I fixed both issues and add new tests.

Diff Detail

Repository
rDMOD Data model
Branch
fix-snapshots-strategy
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 11567
Build 17537: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 17536: arc lint + arc unit

Event Timeline

Build is green

Patch application report for D2942 (id=10468)

Rebasing onto ca0f6a1eb7...

Current branch diff-target is up to date.
Changes applied before test
commit 2d4e9d19e16db365e67e0f0e0d4ef55916cfca99
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Wed Apr 1 23:43:44 2020 +0200

    hypothesis: Fix some issues in snapshots strategy and add tests
    
    Fix keyword parameters transmission to snapshots_d strategy.
    
    Ensure max_size constraint is respected when fixing snapshot aliases.

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

This revision is now accepted and ready to land.Apr 2 2020, 11:44 AM

Update: Use model objects instead of dicts in newly added tests

Build is green

Patch application report for D2942 (id=10475)

Rebasing onto ca0f6a1eb7...

Current branch diff-target is up to date.
Changes applied before test
commit 074c2104a5d35fa43a97ee7ec1d1153ef68271dd
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Wed Apr 1 23:43:44 2020 +0200

    hypothesis: Fix some issues in snapshots strategy and add tests
    
    Fix keyword parameters transmission to snapshots_d strategy.
    
    Ensure max_size constraint is respected when fixing snapshot aliases.

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