Page MenuHomeSoftware Heritage

misc/coverage: Add counts for origins listed from maven repositories
ClosedPublic

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

Details

Summary

Listing and loading started on staging so we can add the associated
counters in the archive coverage view.

Those counters will not be displayed in production webapp until
production deployment of maven lister and loader.

Related to T3117

Depends on D7821

Diff Detail

Repository
rDWAPPS Web applications
Branch
coverage-add-maven
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 29349
Build 45864: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 45863: arc lint + arc unit

Event Timeline

ardumont accepted this revision.
This revision is now accepted and ready to land.May 12 2022, 4:38 PM

Build is green

Patch application report for D7822 (id=28243)

Could not rebase; Attempt merge onto d92988fa24...

Updating d92988fa..c328c489
Fast-forward
 static/img/logos/maven.png           | Bin 0 -> 10000 bytes
 swh/web/misc/coverage.py             | 126 ++++++++++++++++++++++++-----------
 swh/web/templates/misc/coverage.html |   4 +-
 swh/web/tests/misc/test_coverage.py  | 107 +++++++++++++++++++++++++++--
 swh/web/tests/utils.py               |  16 ++++-
 5 files changed, 204 insertions(+), 49 deletions(-)
 create mode 100644 static/img/logos/maven.png
Changes applied before test
commit c328c4890c9516fc42d21b8df155b5793d807ac5
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Thu May 12 15:44:21 2022 +0200

    misc/coverage: Add counts for origins listed from maven repositories
    
    Listing and loading started on staging so we can add the associated
    counters in the archive coverage view.
    
    Those counters will not be displayed in production webapp until
    production deployment of maven lister and loader.
    
    Related to T3117

commit 4e1e382a3cfe3ce5ad7945fcabc503d95be7c3c5
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Thu May 12 15:15:28 2022 +0200

    misc/coverage: Update search pattern for sourceforge bzr/cvs origins
    
    The origin URLs for those visit types do not follow the same pattern
    as the git, hg and svn ones.
    
    Related to T3117

commit 0294d986d509826fab7dcc83557ca36cde376201
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Thu May 12 15:01:13 2022 +0200

    misc/coverage: Add count for origins listed from phabricator instances
    
    More origins seem to have been loaded since so let's integrate
    phabricator in the coverage list.
    
    Related to T3117

commit 5005f200826422d4943dcc57fee0e1403c050339
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Thu May 12 14:49:10 2022 +0200

    misc/coverage: Improve display of origin counters in production/staging
    
    If the global counter for an origin type is equal to zero, do not display
    the bootstrap card for that origin type.
    
    If a visit type counter for an origin type is equal to zero, do not
    display it in the counters table for that origin type.
    
    It enables to not take into account origins that have been listed
    but not loaded without having to hardcode that information in
    coverage widget implementation.
    
    Also use origins_enabled field from scheduler metrics instead of
    origins_known one to compute the number of loaded origins per
    visit type.
    
    Related to T3117

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