Page MenuHomeSoftware Heritage

common/origin_save: Improve test for finding a visit date
ClosedPublic

Authored by anlambert on Sep 15 2020, 1:16 PM.

Details

Summary

When trying to associate a visit date to an origin save request, only consider
visits with partial or full statuses as no snapshots will be present for other
ones (e.g. created, ongoing).

Diff Detail

Repository
rDWAPPS Web applications
Branch
origin-save-find-visit-date-improvement
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 15129
Build 23323: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 23322: arc lint + arc unit

Event Timeline

Build is green

Patch application report for D3952 (id=13903)

Rebasing onto 16ab03ab45...

Current branch diff-target is up to date.
Changes applied before test
commit 8660390ac95daf876594bd8bacf1d4abcb167391
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Tue Sep 15 11:44:07 2020 +0200

    common/origin_save: Improve test for finding a visit date
    
    When trying to associate a visit date to an origin save request, only consider
    visits with partial or full statuses as no snapshots will be present for other
    ones (e.g. created, ongoing).

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

Build is green

Patch application report for D3952 (id=13905)

Rebasing onto 37cd0a8bce...

Current branch diff-target is up to date.
Changes applied before test
commit 24950a876c4482da59b9477317341f41a4a49dfc
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Tue Sep 15 11:44:07 2020 +0200

    common/origin_save: Improve test for finding a visit date
    
    When trying to associate a visit date to an origin save request, only consider
    visits with partial or full statuses as no snapshots will be present for other
    ones (e.g. created, ongoing).

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

ardumont added a subscriber: ardumont.
ardumont added inline comments.
swh/web/common/origin_save.py
167

Can't you do this directly when calling the storage?

This revision is now accepted and ready to land.Sep 15 2020, 5:43 PM
swh/web/common/origin_save.py
167

Right it should be possible to filter visit statuses through the storage API. I will see what I can do before landing this.

swh/web/common/origin_save.py
167

I am landing this in order to fix the bad reported save status in production and I will try to improve the code using storage API later.

swh/web/common/origin_save.py
167

sure ;)