thunderstore-io / Thunderstore

Thunderstore is a mod database and API for downloading mods. Thunderstore Discord: https://discord.thunderstore.io/
https://thunderstore.io/
GNU Affero General Public License v3.0
138 stars 28 forks source link

Package metrics API endpoint doesn't work #964

Closed hedgehog1029 closed 11 months ago

hedgehog1029 commented 11 months ago

As far as I can tell the /api/v1/package-metrics endpoints don't work: they just return a 404.

e.g. https://thunderstore.io/api/v1/package-metrics/tristanmcpherson/R2API/ is just giving me a 404.

I've even tried using the Swagger UI to make the request, to make sure I'm not messing up the URL, but it has the same result:

image

MythicManiac commented 11 months ago

Hey, thanks for the report! This is already being looked into and should be getting fixed shortly. The gist of the problem is that the production server configuration has a dedicated routing rule for /api/v1/package (sub)routes which unintentionally also grabs this endpoint.

I'll update this issue once this has been resolved

MythicManiac commented 11 months ago

This should be fixed now, root cause was this piece of k8s documentation not being accurate: image

(it did in fact greedily match the substring)

But that might have been an issue with our specific k8s cluster setup not conforming to the spec more than with the documentation