PUGX / badge-poser

The PHP badges, renders some badges for your readme with the packagist information.
https://poser.pugx.org
MIT License
476 stars 93 forks source link

Version badge shows incorrect version #410

Open MarcinOrlowski opened 3 years ago

MarcinOrlowski commented 3 years ago

I recently noticed that version badge reports incorrect version. The package is https://github.com/MarcinOrlowski/laravel-api-response-builder and recent version is 9.0.1, but badge says 8.0.1. Also dev badge is choosen oddly. There's dev branch, so why it picks 7.x (not to mention there's 8.x as well)?

v

p

JellyBellyDev commented 3 years ago

Hi @MarcinOrlowski , thanks to reporting! We have a layer of cache to show the version, for this you did not notice the updated version! 9.0.1 is now shown correctly! For the unstable version we wait a little longer and you should see the correct one for him too! ;)

MarcinOrlowski commented 3 years ago

We have a layer of cache to show the version

I still there's something more than cache. IIRC version badge used to show version 9.0.0 already correctly, but now it shows 8.0.1 so it's not cached version. It's a wrong one.

For the unstable version we wait a little longer and you should see the correct one for him too! ;)

This was never correctly shown. I never saw dev or dev-dev - always some other branches.

JellyBellyDev commented 3 years ago

We have a layer of cache to show the version

I still there's something more than cache. IIRC version badge used to show version 9.0.0 already correctly, but now it shows 8.0.1 so it's not cached version. It's a wrong one.

I don't understand i see the correct version:

Schermata 2020-10-23 alle 13 59 29

For the unstable version we wait a little longer and you should see the correct one for him too! ;)

This was never correctly shown. I never saw dev or dev-dev - always some other branches.

@AlessandroMinoccheri please can you check this? Thanks!

AlessandroMinoccheri commented 3 years ago

I can see the correct version. Could it be a cache problem somewhere?

MarcinOrlowski commented 3 years ago

Not sure. I see correct version for now too. If you see no possibility to be an backend issue, I am closing this ticket now as I cannot provide any additional information. Would reopen if issue reoccured.

rob006 commented 3 years ago

There is something wrong with this cache. For https://packagist.org/packages/rob006/flarum-lang-polish I have v0.3.14 on https://poser.pugx.org/rob006/flarum-lang-polish/v/stable, while v0.3.15 was released 3 months ago. So if it is cache, it is outdated by 3 months. Curiously https://poser.pugx.org/rob006/flarum-lang-polish/v/stable?1 displays correct version.

Same with downloads counter: 767 on https://poser.pugx.org/rob006/flarum-lang-polish/downloads 873 on https://poser.pugx.org/rob006/flarum-lang-polish/downloads?1

rob006 commented 3 years ago

BTW: Examples above for version and downloads count works fine already, but monthly downloads are still outdated:

24 - https://poser.pugx.org/rob006/flarum-lang-polish/d/monthly 59 - https://poser.pugx.org/rob006/flarum-lang-polish/d/monthly?1

JellyBellyDev commented 3 years ago

Linked to this issue: https://github.com/PUGX/badge-poser/issues/478

a-menshchikov commented 3 years ago

I have the same problem with https://github.com/hslavich/OneloginSamlBundle Actual latest stable version is 2.3.0, but "bager" detect it as 2.2.2 (that was released half an hour earlier).

JellyBellyDev commented 3 years ago

Schermata 2021-06-01 alle 10 51 07

sure? :)

a-menshchikov commented 3 years ago

@JellyBellyDev it was exactly an half-hour ago. It seems like a cache bug, but I have no idea where to look for it.

a-menshchikov commented 3 years ago

image I see some less downloads count. =\

a-menshchikov commented 3 years ago

@JellyBellyDev the bug with cache came back for https://github.com/hslavich/OneloginSamlBundle =(

JellyBellyDev commented 3 years ago

Now i can see this:

Schermata 2021-07-15 alle 09 51 45

Where was the problem?

a-menshchikov commented 3 years ago

@JellyBellyDev Maybe I'm missing something: how long does pugx cache invalidate? I have released v2.4.2 at the morning yesterday, but after 15 hours the badge had still shown v2.4.1.

JellyBellyDev commented 3 years ago

two hours, but consider that also the packagist api use a cache and I don't know what its TTL!

Bilge commented 1 year ago

Now the version badges all show "No Release", for all packages.

JellyBellyDev commented 1 year ago

Thanks for reporting @Bilge! We have fix the regression! ;)

jcubic commented 8 months ago

Is there a way to purge the cache? GitHub images are cached by GitHub and those images are also cached by the browser. To clear the cache for images on GitHub you can use curl from GitHub action. And then clear the browser cache. But still, it would be nice to be able to clear the badge on the PUGX side before clearing the GitHub cache. Otherwise, it doesn't make sense.