Skip to content
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

Merged
merged 2 commits into from
May 29, 2024

Conversation

bdach
Copy link
Contributor

@bdach bdach commented May 29, 2024

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.

…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.
Comment on lines +52 to +53
// can be removed 20241129
if ($apiVersion < 20240529) {
Copy link
Contributor Author

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.

Copy link
Collaborator

@nanaya nanaya May 29, 2024

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

208600c should do it?

peppy
peppy previously approved these changes May 29, 2024
Copy link
Member

@peppy peppy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

conceptually correct

bdach added a commit to bdach/osu that referenced this pull request May 29, 2024
(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.
@nanaya nanaya merged commit 22693d8 into ppy:master May 29, 2024
3 checks passed
@bdach bdach deleted the filter-out-daily-challenge-rooms branch May 29, 2024 12:51
TextAdventurer12 pushed a commit to TextAdventurer12/osu that referenced this pull request Jul 6, 2024
(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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants