Open bdach opened 6 days ago
Bancho allowed lookups this fast in order for this screen to exist. We probably need the osu-web end rate limit adjusted. Paginating would be a bit of a step backwards from people's expectations, I think.
@ppy/team-web would adjusting the rate limit be feasible?
For better context, this is the screen that is triggering this:
the endpoint probably returns way too much data for what's being used there though. There's a /users/lookup-users
but it's not available for api yet. I'd probably rather expose that one with higher limit instead.
@bdach can you check if the data returned is enough? It's mainly missing statistics_rulesets
compared to the /users
one
As far as I can tell the client is using:
id
username
avatar_url
cover.url
country_code
last_visit
is_online
is_supporter
support_level
groups
is also good to have even if the client isn't using it (we really should be).
Looking at the web friends page which doesn't have support level shown, maybe we can do without support_level
though...?
I don't think support level is returned in the other endpoint either. Its value is calculated every time iirc.
Oh you're right actually. The client doesn't show any supporter markers on the currently online display, but it does on the friends display.
Yeah I think we can work with that set of fields then. We'll fix client to display supporter badge even if there is no level (is it even possible for API to return a user with {"is_supporter":1,"support_level":0}
?)
oh yeah the friend and group page do show it for "list mode" o_O
that's weird...
also no, the minimum value is 1 for current supporter.
Originally posted by @bdach in https://github.com/ppy/osu/issues/29968#issuecomment-2371064573
Well that was a bit of misdirection wasn't it, since the original snippet you posted showed the beatmap set request failing, but I'd be willing to bet money on the fact that it's all of these that cause the ratelimit to get exceeded:
To resolve this we'd probably want pagination on that display there, except for the fact that there's a search box in there that allows searching by username, and we can't paginate with username search before these requests, because we only have user IDs to work with at that point....
Would probably need spectator server changes to at least send usernames across the wire. If not more.