1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-13 16:47:46 +08:00
Commit Graph

3038 Commits

Author SHA1 Message Date
Salman Ahmed
8f97f0503f Move away from Solo namespace 2024-02-29 01:21:17 +03:00
Bartłomiej Dach
eac4c5f69d
Rename {Solo -> User}StatisticsWatcher et al.
The "solo" prefix is a bit unbecoming now. The updates are not only
for solo.
2024-02-22 20:36:24 +01:00
Bartłomiej Dach
57bb0b85a1
Merge pull request #27107 from Joehuu/rank-highest-tooltip
Add highest rank tooltip to global rank display
2024-02-22 09:08:22 +01:00
Dean Herbert
71afb8881a
Merge pull request #27199 from EVAST9919/link-compiler-alloc
Fix `DrawableLinkCompiler` allocations
2024-02-18 04:04:34 +08:00
Andrei Zavatski
b0f334c39e Fix DrawableLinkCompiler allocations 2024-02-17 00:45:30 +03:00
Bartłomiej Dach
1049be7d72
Add extended xmldoc to DisconnectRequested()
Just expounds on what the previous commit message said.
2024-02-16 13:09:36 +01:00
Bartłomiej Dach
b4aa247032
Do not attempt to stop watching user presence when requested to disconnect
First of all, this sort of cleanup isn't really the client's
responsibility, and secondly, at the point the client received this
request to disconnect, *none of its requests will be honored anymore*
(currently the only scenario of this if another client has connected
- the server-side concurrency filter will reject this request).

When disconnection is requested, the only valid thing to do with respect
to talking to the server is to stop doing it.

This will be moved server-side in a follow-up change, although I'm not
even strictly sure that's required - I'd like to think signalr would
know to clean up a disconnecting client from all groups they were in.
2024-02-16 13:08:39 +01:00
Bartłomiej Dach
9fa60b169e
Actually disconnect from metadata hub when requested to
Nothing in this override, on in the base implementation, would actually
attempt to disconnect.
2024-02-16 12:58:50 +01:00
Bartłomiej Dach
171270d99c
Fix missing RPC method mapping
Thanks, signalr.
2024-02-16 12:58:13 +01:00
Dean Herbert
59efd22ba2
Merge branch 'master' into score-statistics-updates-working-2 2024-02-15 02:55:12 +08:00
Bartłomiej Dach
68247fa022
Fix typo in json property name
Would cause the mapper badge to never actually be shown in the real
world.
2024-02-14 13:21:37 +01:00
Salman Ahmed
c4e358044a Add API models for comment page metadata 2024-02-14 04:16:36 +03:00
Bartłomiej Dach
da4ebd0681
Refactor SoloStatisticsWatcher to no longer require explicit subscription callbacks 2024-02-13 13:49:01 +01:00
Dean Herbert
f7a223f328
Merge pull request #27053 from frenzibyte/unranked-pp-placeholder
Add support for displaying "unranked PP" placeholder
2024-02-13 18:59:55 +08:00
Bartłomiej Dach
4a516cbccd
Merge pull request #27077 from peppy/log-fire-and-forget-better
Improve exception logging of unobserved exceptions via `FireAndForget`
2024-02-10 13:43:50 +01:00
Dan Balasescu
bfeb90c1b6
Add additional gameplay metadata to room score request 2024-02-10 17:20:17 +09:00
Joseph Madamba
c9c39ecb2f Add RankHighest to APIUser 2024-02-09 16:06:16 -08:00
Dan Balasescu
7f3646f2d1
Merge pull request #27069 from bdach/populate-legacy-total-score-when-converting
Populate `TotalScoreInfo` when converting `SoloScoreInfo` to `ScoreInfo`
2024-02-08 01:33:31 +09:00
Dean Herbert
0d7e82ab8d
Improve exception logging of unobserved exceptions via FireAndForget
Coming from https://github.com/ppy/osu/issues/27076, where the log
output makes finding where the exception arrived for nigh impossible.
2024-02-08 00:25:11 +08:00
Bartłomiej Dach
9314de640f
Populate TotalScoreInfo when converting SoloScoreInfo to ScoreInfo
For use in https://github.com/ppy/osu-tools/pull/195.
2024-02-06 18:30:48 +01:00
Bartłomiej Dach
6ffe8e1713
Use staggered exponential backoff when retrying in PersistentEndpointClientConnector
There are suspicions that the straight 5s retry could have caused a
situation a few days ago for `osu-server-spectator` wherein it was
getting hammered by constant retry requests. This should make that
a little less likely to happen.

Numbers chosen are arbitrary, but mostly follow stable's bancho retry
intervals because why not. Stable also skips the exponential backoff in
case of errors it considers transient, but I decided not to bother for
now.

Starts off from 3 seconds, then ramps up to up to 2 minutes. Added
stagger factor is 25% of duration, either direction. The stagger factor
helps given that if spectator server is dead, each client has three
separate connections to it which it will retry on (one to each hub).
2024-02-06 15:40:30 +01:00
Salman Ahmed
4be4ed7ab2 Add "ranked" attribute to scores 2024-02-05 23:29:24 +03:00
Dan Balasescu
8e8ba9e77f
Fix more CI inspections 2024-02-02 21:36:41 +09:00
Dan Balasescu
b44f77cee1
Update R# + fix inspections 2024-02-02 21:00:28 +09:00
Dean Herbert
4248593289
Fix menu banner not updating as often as we want it to 2024-01-31 22:44:24 +09:00
Dean Herbert
19fe3a15f3
Merge branch 'master' into 2fa-not-verifying-via-link 2024-01-31 18:32:55 +09:00
Bartłomiej Dach
4126dcbe28
Fix 2FA verification via link not working correctly
Closes https://github.com/ppy/osu/issues/26835.

I must have not re-tested this correctly after all the refactors...

Basically the issue is that the websocket connection would only come
online when the API state changed to full `Online`. In particular
the connector would not attempt to connect when the API state was
`RequiresSecondFactorAuth`, giving the link-based flow no chance to
actually work.

The change in `WebSocketNotificationsClientConnector` is relevant in
that queueing requests does nothing before the API state changes to full
`Online`. It also cleans up things a bit code-wise so... win?

And yes, this means that the _other_ `PersistentEndpointClientConnector`
implementations (i.e. SignalR connectors) will also come online earlier
after this. Based on previous discussions
(https://github.com/ppy/osu/pull/25480#discussion_r1395566545) I think
this is fine, but if it is _not_ fine, then it can be fixed by exposing
a virtual that lets a connector to decide when to come alive, I guess.
2024-01-30 21:49:06 +01:00
Bartłomiej Dach
000ddc14ac
Fix broken locking in OAuth
Closes https://github.com/ppy/osu/issues/26824... I think?

Can be reproduced via something like

diff --git a/osu.Game/Online/API/OAuth.cs b/osu.Game/Online/API/OAuth.cs
index 485274f349..e6e93ab4c7 100644
--- a/osu.Game/Online/API/OAuth.cs
+++ b/osu.Game/Online/API/OAuth.cs
@@ -151,6 +151,11 @@ internal string RequestAccessToken()
         {
             if (!ensureAccessToken()) return null;

+            for (int i = 0; i < 10000; ++i)
+            {
+                _ = Token.Value.AccessToken;
+            }
+
             return Token.Value.AccessToken;
         }

The cause is `SecondFactorAuthForm` calling `Logout()`, which calls
`OAuth.Clear()`, _while_ the `APIAccess` connect loop is checking if
`authentication.HasValidAccessToken` is true, which happens to
internally check `Token.Value.AccessToken`, which the clearing of
tokens can brutally interrupt.
2024-01-30 21:05:23 +01:00
Dean Herbert
d895a91cd5
Update endpoints to final production endpoints 2024-01-30 18:40:17 +09:00
Bartłomiej Dach
996ae0ecc1
Fix incorrect handling of StartChatRequest in websocket chat client
Fixes this happening on staging:

	[network] 2024-01-29 17:48:24 [verbose]: WebSocketNotificationsClientConnector connected!
	[network] 2024-01-29 17:48:24 [verbose]: WebSocketNotificationsClientConnector connect attempt failed: Can't use WaitSafely from inside an async operation.

I'm not sure how I ever allowed that `.WaitSafely()` to be there. It
did feel rather dangerous but then I must have forgotten and never
noticed it failing. Which is weird because you'd think that would be
caught by testing that chat isn't working but I'm pretty sure that I
tested that chat *was* indeed working.

Anyway now that entire flow is replaced by something that should
hopefully be somewhat more sane? It has a whole retry flow with logging
now which should be more robust than what was there previously (failing
to start to listen to chat events killing the entire websocket
connection for very little good reason).
2024-01-29 19:22:40 +01:00
Dean Herbert
6a469f2cb6
Use switch instead of if-else 2024-01-29 17:18:17 +09:00
Bartłomiej Dach
96811a8874
Fix APIAccess spamming requests while waiting for second factor 2024-01-29 09:14:30 +01:00
Bartłomiej Dach
363fd1d54f
Remove no longer relevant changes 2024-01-29 09:05:03 +01:00
Dean Herbert
4a2602a775
Merge branch 'master' into 2fa 2024-01-29 16:57:29 +09:00
Dean Herbert
ef94eff574
Rename PollingChatClientConnector to better describe usage 2024-01-29 16:56:28 +09:00
Bartłomiej Dach
a2e69d37e8
Add basic testing of failure flow 2024-01-26 11:17:32 +01:00
Bartłomiej Dach
04cae874b0
Handle forced logouts due to password change too 2024-01-26 10:53:27 +01:00
Bartłomiej Dach
3d3506b906
Merge branch 'decouple-notification-websocket-from-chat' into 2fa 2024-01-25 14:51:42 +01:00
Bartłomiej Dach
c463aa5ba1
xmldoc everything 2024-01-25 14:47:29 +01:00
Bartłomiej Dach
de52f0a80c
Decouple notifications websocket handling from chat operations
This is a prerequisite for https://github.com/ppy/osu/pull/25480.

The `WebSocketNotificationsClient` was tightly coupled to chat specifics
making it difficult to use in the second factor verification flow.
This commit's goal is to separate the websocket connection and message
handling concerns from specific chat logic concerns.
2024-01-25 14:47:29 +01:00
Bartłomiej Dach
e3eb7a8b42
Support verification via clicking link from e-mail 2024-01-24 21:35:58 +01:00
Bartłomiej Dach
62a0c236bc
Split out raw websocket logic from conjoined notifications client contrivance 2024-01-24 21:35:30 +01:00
Bartłomiej Dach
445a7450e0
Implement verification from within client 2024-01-24 21:35:20 +01:00
Bartłomiej Dach
ddc2bbeb9b
Add session_verified attribute to /me response 2024-01-24 14:24:33 +01:00
Bartłomiej Dach
7b47215657
Split /me request from /users requests
Them being together always bothered me and led to the abject failure
that is `APIUser` and its sprawl. Now that I'm about to add a flag that
is unique to `/me` for verification purposes, I'm not repeating the
errors of the past by adding yet another flag to `APIUser` that is never
present outside of a single usage context.
2024-01-24 14:22:57 +01:00
Bartłomiej Dach
7c140408ea
Add request structures for verification endpoints 2024-01-24 13:53:40 +01:00
Bartłomiej Dach
2cfaa1c103
Merge branch 'master' into 2fa 2024-01-23 16:51:23 +01:00
Dean Herbert
069af13aaf
Reduce enumerator overhead in GameplayLeaderboard 2024-01-23 05:31:53 +09:00
Joseph Madamba
3eeefd5b7e Fix changelog stream user count only accounting for latest build 2024-01-18 16:15:52 -08:00
Andrei Zavatski
dfdf700560 Don't use glowing text in ScoreComponentLabel 2024-01-16 17:43:17 +03:00