Re: Popcon stats not updated
On Tue, Jun 25, 2024 at 03:35:52PM +0200, Bill Allombert wrote:
> On Tue, Jun 25, 2024 at 10:34:15AM +0200, Fab Stz wrote:
> > Hello,
> >
> > Not sure that you are in charge of this, so please forward to whom it may concern.
> > I noticed that the popcon stats haven't been updated for approximately a month now.
>
> Hello Fab,
>
> I have just checked the server, the archive is complete, there is no holes:
>
> So I assume the issue is within
> https://qa.debian.org/popcon.php
> itself, so this should be reported to qa.debian.org.
> When I go to
> https://qa.debian.org/popcon.php?package=freefilesync
> and click on "Raw data for the graph" I am lead to the following URL:
> https://qa.debian.org/cgi-bin/popcon-data?packages=freefilesync;from_date=2010-07-10;to_date=2024-05-22
> So I only get data up to the 2024-05-22 which is about one month ago, indeed.
I suspect that there is a cronjob or something that is running to update
the database. Looking at the code for this page [1], if the to_date is not
set explicitly then it will try to find the latest date for a given
package.
```
$to_date = $dbh->selectrow_array('SELECT max(p.day) FROM popcon_package pp JOIN popcon p ON (pp.id = p.package_id) JOIN popcon_day pd ON (pd.day = p.day) WHERE package = ANY(?) AND in_debian AND (p.vote > 0 OR p.old > 0 OR p.recent > 0 or p.no_files > 0)', undef, \@packages) if !$to_date;
```
There is a perl script called popcon-import [2] that runs somewhere, can
someone who has access to these logs [3] take a look?
[1] https://salsa.debian.org/qa/qa/-/blob/master/cgi-bin/popcon-data?ref_type=heads#L45
[2] https://salsa.debian.org/qa/qa/-/blob/master/popcon-graphs/popcon-import?ref_type=heads#L55
[3] my $logfile = "/srv/qa.debian.org/log/popcon.log";
--
Best,
Lev
https://levlaz.org
Reply to: