Skip to content

Incomplete uploads database table after MetaCPAN outages #27

@eserte

Description

@eserte

Looking at https://github.com/cpan-testers/cpantesters-backend/blob/master/lib/CPAN/Testers/Backend/FetchUploads.pm and

cpantesters-backend/Rexfile

Lines 126 to 135 in e8803f4

'fetch-uploads' => {
user => 'cpantesters',
minute => '*/10',
hour => '*',
day_of_month => '*',
month => '*',
day_of_week => '*',
command => 'beam run metacpan fetch_uploads'
. ' --since $( date --date="30 minutes ago" -Iseconds )'
. ' >>$HOME/var/log/fetch_uploads.log 2>&1',
it seems that freshly uploaded CPAN releases are missing permanently in the database if the MetaCPAN API is down or unreachable for about 20 to 30 minutes. Unfortunately this seems to happen now and then, see also metacpan/metacpan-web#2992 for a recent incident.

This in turn means that test reports for these missing CPAN releases are permanently lost, even if coming after the MetaCPAN outage. A prominent example is Net-SSLeay 1.94, which was released about six weeks ago, and still does not have any test reports listed, see http://matrix.cpantesters.org/?dist=Net-SSLeay (the website is currently showing "NOTE: no report for latest version 1.94").

So what can be done? As a quick fix, I think it would be good to fill the missing bits in the database. Probably running beam run metacpan fetch_uploads without the --since option could help. Maybe try first with increasing intervals (I don't know how the MetaCPAN API behaves if everything without filter is fetched). For the period starting from last Friday I would expect that about 70-80 entries would be added.

What to do as a long-term fix? I am not sure. Outages or network problems of all kinds may always happen. Maybe it would help if the --since period would be permanently increased (to one day? more?), but this would add more load to the MetaCPAN API and the local database. Maybe there could be a rarely running "repair" cronjob which uses a longer --since period. Maybe monitoring could be better (currently it seems that failures to connect to MetaCPAN are not logged at all).

It would also be nice if the possibly existing reports in the database could be repaired by reprocessing them after the uploads table was repaired.

FYI @jkeenan (James: this relates to the post "CPANtesters failing to report distribution name for Net-SSLeay" you wrote some weeks ago) and @andk.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions