Page MenuHomeSoftware Heritage

misc/coverage: Improve display of origin counters in production/staging
ClosedPublic

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

Details

Summary

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

Below are the results obtained after applying that diff and a couple
of other ones adding new origin types (maven, phabricator).

Staging:

Production:

Diff Detail

Repository
rDWAPPS Web applications
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build is green

Patch application report for D7819 (id=28240)

Rebasing onto d92988fa24...

Current branch diff-target is up to date.
Changes applied before test
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/1827/ for more details.

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