Fix currently online display hitting rate limits #30146
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
RFC. Closes #29982.
Uses the endpoint exposed in ppy/osu-web#11506. The nitty-gritty here is that
GET /users?ids=[]
andGET /users/lookup?ids=[]
return different sets of data, namely - the former returnsrulesets_statistics
. Therefore, all places that use that field must continue to use the former endpoint, and the rest can switch.As it turns out all consumers of
UserLookupCache
but one - multiplayer - can be switched seemingly seamlessly, but multiplayer must continue to use the former request becauserulesets_statistics
is required for displaying the user ranks in the participants display.As I understand the difference in behaviour of the two endpoints here is not negotiable on the web side because
rulesets_statistics
is expensive and most of the reason why the old endpoint is rate-limited this harshly, although I could be wrong about that (@ppy/team-web confirmation would be appreciated).I tested this somewhat well, but it's still a bit of a squeaky bum change because
APIUser
is an awful grab-bag class that contains probably like a hundred properties, half of which could be empty in any given context, so it's not easy to cross-check that some place is using a field that will now be missing after switching the endpoints.