-
Notifications
You must be signed in to change notification settings - Fork 390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not return daily challenge rooms in GET /rooms
endpoint if API version too low
#11240
Conversation
…ersion too low Currently old lazer clients die on these due to deserialisation woes (it can't figure out what enum value to deserialise `daily_challenge` to as it doesn't exist yet), which makes deployment of the feature a bit tricky logistically. Since we can't fix old clients (because they're already released, and we would have to push an update either way), hide daily challenge rooms behind an `x-api-version` header check. Note that challenge rooms can still be accessed directly by ID regardless of API version, but that's fine for this case, since the client won't be doing it.
// can be removed 20241129 | ||
if ($apiVersion < 20240529) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if you do this sort of thing around these parts, but I don't foresee this living too long, so I did the standard that we do in client of only keeping this around for ~6 months at which point it can be nuked.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe add note that it's temporary in the docs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
208600c should do it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
conceptually correct
(Or local date, in the case of non-deployed builds). Came up when I was looking at ppy/osu-web#11240 and found that we were still hardcoding this. Thankfully, this *should not* cause issues, since there don't seem to be any (documented or undocumented) API response version checks for versions newer than 20220705 in osu-web master. For clarity and possible debugging needs, the API response version is also logged.
(Or local date, in the case of non-deployed builds). Came up when I was looking at ppy/osu-web#11240 and found that we were still hardcoding this. Thankfully, this *should not* cause issues, since there don't seem to be any (documented or undocumented) API response version checks for versions newer than 20220705 in osu-web master. For clarity and possible debugging needs, the API response version is also logged.
RFC.
Currently old lazer clients die on these due to deserialisation woes (it can't figure out what enum value to deserialise
daily_challenge
to as it doesn't exist yet), which makes deployment of the feature a bit tricky logistically.Since we can't fix old clients (because they're already released, and we would have to push an update either way), hide daily challenge rooms behind an
x-api-version
header check. Note that challenge rooms can still be accessed directly by ID regardless of API version, but that's fine for this case, since the client won't be doing it.