PUGX / badge-poser

The PHP badges, renders some badges for your readme with the packagist information.

Home Page:https://poser.pugx.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Badge shows very old download count

BenMorel opened this issue · comments

Bug Report

Hi, the badge for brick/math shows 8.98M downloads:

image

Even though the library has more than 17M downloads today. I've had this issue for months; IIRC, at some point the badge displayed the correct data, but it always reverts to 8.98M at some point.

Any idea why is that?

Hi @BenMorel, in that repository I can see the correct data, in the last months we have worked on cache problems, so sometimes you may have seen wrong data.
At the moment it seems that it's displayed the correct data.

@AlessandroMinoccheri I does indeed, but when I opened the issue it did show 8.98.
I'll report again here when this happens again.

ok, @BenMorel we are still working to improve cache management.
For now, I close this issue but if you have again this problem please open a new issue and we can take a look at it!
Thanks :)

Hi, it's happening again right now. 8.98M.

@BenMorel Sorry about that, I'm working on a fix on the cache in order to make sure it won't happen again. In the meantime, I've reset the cache so now the stats for https://poser.pugx.org/brick/math/downloads are showing 17.81 M.

Now oscillating between the current value and 8.99M. I understand caching is not always an easy game, but I don't understand how a very old value can still be in the cache?

I need to +1 this unfortunately and I agree with @BenMorel that this can hardly be a caching issue. I noticed it with my php-mqtt/client library which had shown v1.0.0 on sunday after releasing it and has since then switched back to an even older version than the previous one, v0.2.1. There has been v0.3.0 released (and also shown for some time) by 2020-10-22 though. Are you (maintainers) very confident that this is a caching issue and not something else?

What seems odd to me, although I'm not familiar with your internals, is that the Version and Last Stable Version badges are not showing the same version:

Version: Version
Last Stable Version: Latest Stable Version

Or am I missing something?

I think that with this PR we fix the problem! 🤞

@JellyBellyDev Has this PR been deployed yet? I'm still seing 8.98M at the moment!

@BenMorel it is a very weird issue, it seems somehow we get back that value and we store in the cache, so the wrong value is even more evident for longer times. We pushed another fix to make sure the cache is properly invalidated at regular times, we are testing it at the moment.
In the meantime, we'll investigate further about this behaviour.

FYI, it worked fine for a few days, and it's now back to 8.98M.

This value brings us back to ~ September 2020, if that helps.

Happening today on another repo: https://poser.pugx.org/brick/money/downloads

Right now it shows 887.06k or 887.96k, when it should be 1.99M:

Total Downloads

This also brings us back to some time in September 2020. I think we might be onto something 🤔

Hi @BenMorel we did some fixes, have you still encountered problems?

Hi @AlessandroMinoccheri, it works alright at the moment, thank you! I'll come back here in a few days to confirm that I haven't seen any new glitches.

Could you please give us some insights as to what was the issue?

Hi @BenMorel we have updated some packages and packagist API also.
We have changed a little bit our cache management but the problem seems related to packagist API also.
As soon as possible we will add new features to debug better these problems.