1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-29 22:07:29 +08:00
Commit Graph

2617 Commits

Author SHA1 Message Date
Salman Ahmed
045602b27d
Merge branch 'master' into fix-reconnect-new-spectator-session 2022-07-18 09:55:19 +03:00
Salman Ahmed
84c1c26a7f
Merge branch 'master' into fix-user-profile-overlay 2022-07-18 09:45:25 +03:00
Salman Ahmed
1b302910b1
Merge branch 'master' into fix-reconnect-new-spectator-session 2022-07-18 09:30:29 +03:00
Dean Herbert
21bf7ee448 Turn on nullability in ParticipantPanel 2022-07-18 15:27:55 +09:00
Salman Ahmed
018da74fe8 Replace default with CountryCode.Unknown 2022-07-18 08:54:35 +03:00
Salman Ahmed
05d692bd55 Move Country to end of class 2022-07-18 08:43:41 +03:00
Dean Herbert
566bad0b5f Make SoloScoreInfo.EndedAt non-null
Seems to already be the case for databased scores. Will be assured by
https://github.com/ppy/osu-web/issues/9116.

I've updated the `osu-score-statistics-processor` with this
consideration.
2022-07-18 14:42:43 +09:00
Salman Ahmed
ef6e16b1cb UserCountry -> Country 2022-07-18 08:40:43 +03:00
Salman Ahmed
100c53f9ef Country -> CountryCode 2022-07-18 08:40:34 +03:00
Dean Herbert
0533249d11 Update all OnlineSpectatorCalls to InvokeAsync 2022-07-18 14:34:02 +09:00
tsunyoku
5875f53e07 remove unused import 2022-07-17 18:16:30 +01:00
tsunyoku
032cc6c670 use type annotation for nullable BeatmapSet 2022-07-17 18:15:36 +01:00
tsunyoku
8791edf84c set Beatmap.BeatmapSet to BeatmapSet property in SoloScoreInfo 2022-07-17 18:10:33 +01:00
tsunyoku
c73eff7c89 add BeatmapSet to SoloScoreInfo 2022-07-17 14:46:22 +01:00
tsunyoku
c2277031f0 add Beatmap to SoloScoreInfo 2022-07-17 14:21:55 +01:00
tsunyoku
1f288157f4 change GetUserScoresRequest to return SoloScoreInfo instead of APIScore 2022-07-17 14:07:05 +01:00
Dean Herbert
55a8a3563b Change MultiplayerMatchSubScreen to not immediately leave the room on connection loss
Instead, we can rely on `MultiplayerClient.Room` going `null`.
2022-07-17 21:19:10 +09:00
Dean Herbert
da7edd5d49 Perform actions after server reconnection 2022-07-17 21:09:48 +09:00
Dean Herbert
8e7e1e6b51 Fix spectator client not correctly reconnecting after shutdown 2022-07-17 21:07:11 +09:00
Salman Ahmed
9382636da9 Catch and log exceptions from mod setting copy failure 2022-07-17 06:34:50 +03:00
Salman Ahmed
6636e462dc Fix SoloScoreInfo not carrying mod settings in conversion methods 2022-07-17 06:18:59 +03:00
Dean Herbert
5df9f06480
Merge pull request #19136 from frenzibyte/handle-user-request-failure
Fix login overlay not displaying error message for disabled accounts
2022-07-16 14:40:28 +09:00
Salman Ahmed
9c81241f4c Fix potential nullref on APIUser.Country
We need NRT sooner than later...
2022-07-16 06:02:05 +03:00
Salman Ahmed
e62049f4a9 Update various usages of Country inline with new enum 2022-07-16 05:04:24 +03:00
Salman Ahmed
00f4c8052e Update APIUser to provide enum from serialised country code 2022-07-16 05:04:24 +03:00
Salman Ahmed
b42f49aeaa Handle APIException from user request during logging in 2022-07-16 00:38:53 +03:00
Salman Ahmed
8f7b3cf11a Merge branch 'master' into Save-Score-Failed 2022-07-15 22:10:19 +03:00
Dean Herbert
8a48cb701d Tidy up implementation and remove unnecessary enum 2022-07-15 19:02:04 +09:00
Dean Herbert
c8c79d2185 Standardise HasReplay implementation (and remove from persisting to realm) 2022-07-15 16:14:21 +09:00
Dean Herbert
688fcb256f Update score retrieval endpoint to access new storage 2022-07-15 15:47:25 +09:00
Dean Herbert
966882013d Remove classic mod attribution to SoloScoreInfo conversion path 2022-07-15 15:47:05 +09:00
Dean Herbert
0fe3bac173 Store mods to array and update test scenes 2022-07-12 18:00:25 +09:00
Dean Herbert
12a56e36bd Fix ID mapping and move osu-web additions to region to identify them clearly 2022-07-12 18:00:25 +09:00
Dean Herbert
f956955d4d Combine ScoreInfo construction helper methods 2022-07-12 18:00:25 +09:00
Dean Herbert
900e0ace8e Standardise naming and enable NRT 2022-07-12 18:00:25 +09:00
Dean Herbert
1bef2d7b39 Add and consume SoloScoreInfo 2022-07-12 18:00:25 +09:00
Dean Herbert
f500d5ade6 Simplify error output when hub cannot connect
Full call stack is useless in these cases.

Before:

```csharp

[network] 2022-07-07 16:05:31 [verbose]: OnlineMetadataClient connection error: System.Net.Http.HttpRequestException: Response status code does not indicate success: 403 (Forbidden).
[network] 2022-07-07 16:05:31 [verbose]: at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
[network] 2022-07-07 16:05:31 [verbose]: at Microsoft.AspNetCore.Http.Connections.Client.HttpConnection.NegotiateAsync(Uri url, HttpClient httpClient, ILogger logger, CancellationToken cancellationToken)
[network] 2022-07-07 16:05:31 [verbose]: at Microsoft.AspNetCore.Http.Connections.Client.HttpConnection.GetNegotiationResponseAsync(Uri uri, CancellationToken cancellationToken)
[network] 2022-07-07 16:05:31 [verbose]: at Microsoft.AspNetCore.Http.Connections.Client.HttpConnection.SelectAndStartTransport(TransferFormat transferFormat, CancellationToken cancellationToken)
[network] 2022-07-07 16:05:31 [verbose]: at Microsoft.AspNetCore.Http.Connections.Client.HttpConnection.StartAsyncCore(TransferFormat transferFormat, CancellationToken cancellationToken)
[network] 2022-07-07 16:05:31 [verbose]: at Microsoft.AspNetCore.Http.Connections.Client.HttpConnection.StartAsync(TransferFormat transferFormat, CancellationToken cancellationToken)
[network] 2022-07-07 16:05:31 [verbose]: at Microsoft.AspNetCore.Http.Connections.Client.HttpConnectionFactory.ConnectAsync(EndPoint endPoint, CancellationToken cancellationToken)
[network] 2022-07-07 16:05:31 [verbose]: at Microsoft.AspNetCore.Http.Connections.Client.HttpConnectionFactory.ConnectAsync(EndPoint endPoint, CancellationToken cancellationToken)
[network] 2022-07-07 16:05:31 [verbose]: at Microsoft.AspNetCore.SignalR.Client.HubConnection.StartAsyncCore(CancellationToken cancellationToken)
[network] 2022-07-07 16:05:31 [verbose]: at Microsoft.AspNetCore.SignalR.Client.HubConnection.StartAsyncInner(CancellationToken cancellationToken)
[network] 2022-07-07 16:05:31 [verbose]: at Microsoft.AspNetCore.SignalR.Client.HubConnection.StartAsync(CancellationToken cancellationToken)
[network] 2022-07-07 16:05:31 [verbose]: at osu.Game.Online.HubClientConnector.connect() in /Users/dean/Projects/osu/osu.Game/Online/HubClientConnector.cs:line 119

```

After:

```csharp

[network] 2022-07-07 16:06:59 [verbose]: OnlineMetadataClient connecting...
[network] 2022-07-07 16:06:59 [verbose]: OnlineMetadataClient connect attempt failed: Response status code does not indicate success: 403 (Forbidden).

```
2022-07-08 01:06:40 +09:00
Dean Herbert
79bed0abdf Merge branch 'realm-nested-writes' into metadata-client 2022-07-07 17:37:06 +09:00
Dean Herbert
99afbc7b73 Add missing endpoint URLs 2022-07-05 22:15:52 +09:00
Dean Herbert
bdd1bf4da0 Save last processed id to config for now 2022-07-05 21:42:35 +09:00
Dean Herbert
59d0bac728 Hook up update flow to metadata stream 2022-07-05 21:32:00 +09:00
Dean Herbert
b0d4f7aff6 Add recovery logic after disconnection 2022-07-05 21:32:00 +09:00
Dean Herbert
d217d66852 Add OnlineMetadataClient 2022-07-05 21:32:00 +09:00
Joseph Madamba
df152421a8 Fix personal best score showing delete option on context menu 2022-07-03 10:23:17 -07:00
Dan Balasescu
ccc322e100
Merge pull request #18985 from andy840119/remove-nullable-disable-in-the-replays
Remove nullable disable annotation in replays namespace
2022-07-03 21:19:36 +09:00
andy840119
8c2f4b48fc Use debug.assert for better readable. 2022-07-03 19:27:56 +08:00
Dan Balasescu
1ccfd69690
Merge pull request #18978 from peppy/send-beatmap-hash-to-server
Send beatmap hash to server on solo score request
2022-07-03 13:18:17 +09:00
andy840119
0a1543c6e8 Use AsNonNull() instead. 2022-07-02 19:48:32 +08:00
andy840119
c6d0f0f81b pretend that the beatmap property will not be null.
Not really throw exception will be the better way?
2022-07-02 13:20:46 +08:00
Dean Herbert
634b6cdbbe Send beatmap has to server on solo score request
Right now, the client does nothing to ensure a beatmap is in a valid
state before requesting to submit a score. There is further work to be
done client-side so it is more aware of this state (already handled for
playlists, but not for the solo gameplay loop), but the solution I have
in mind for that is a bit more involved.

This is not used server-side yet, but I want to get this sending so we
can start using it for some very basic validation.

Will resolve the basic portion of #11922 after implemented server-side.
2022-07-02 12:16:17 +09:00
Dan Balasescu
b64c0d011c Isolate client's Room from TestMultiplayerClient 2022-07-01 19:23:25 +09:00
andy840119
48047f2e58 Move the null check in the outside.
AddCursor() should not accept the null value.
2022-06-30 23:29:49 +08:00
Dan Balasescu
c6520de749 Ensure PlaylistItem beatmap is not null 2022-06-30 14:24:49 +09:00
Dan Balasescu
8e4a6c43b5
Merge pull request #18914 from peppy/spectator-playback-test-leniences
Increase leniences on `TestSceneSpectatorPlayback.TestWithSendFailure`
2022-06-28 16:15:51 +09:00
Dean Herbert
22b254e5c5 Handle task exception outside of schedule to avoid unobserved exceptions 2022-06-28 15:09:28 +09:00
Dean Herbert
c1075d113f Add logging around current channel changes and join requests
Tracking down a flaky test
(https://teamcity.ppy.sh/buildConfiguration/Osu_Build/553?hideProblemsFromDependencies=false&expandBuildTestsSection=true&hideTestsFromDependencies=false):

```csharp
TearDown : System.TimeoutException : "PM Channel 1 displayed" timed out
--TearDown
   at osu.Framework.Testing.Drawables.Steps.UntilStepButton.<>c__DisplayClass11_0.<.ctor>b__0()
   at osu.Framework.Testing.Drawables.Steps.StepButton.PerformStep(Boolean userTriggered)
   at osu.Framework.Testing.TestScene.runNextStep(Action onCompletion, Action`1 onError, Func`2 stopCondition)
--- End of stack trace from previous location ---
   at osu.Framework.Testing.TestSceneTestRunner.TestRunner.RunTestBlocking(TestScene test)
   at osu.Game.Tests.Visual.OsuTestScene.OsuTestSceneTestRunner.RunTestBlocking(TestScene test) in /opt/buildagent/work/ecd860037212ac52/osu.Game/Tests/Visual/OsuTestScene.cs:line 503
   at osu.Framework.Testing.TestScene.RunTestsFromNUnit()
------- Stdout: -------
[runtime] 2022-06-27 23:18:55 [verbose]: 💨 Class: TestSceneChatOverlay
[runtime] 2022-06-27 23:18:55 [verbose]: 🔶 Test:  TestKeyboardNextChannel
[runtime] 2022-06-27 23:18:55 [verbose]: Chat is now polling every 60000 ms
[runtime] 2022-06-27 23:18:55 [verbose]: 🔸 Step #1 Setup request handler
[runtime] 2022-06-27 23:18:55 [verbose]: 🔸 Step #2 Add test channels
[runtime] 2022-06-27 23:18:55 [verbose]: 🔸 Step #3 Show overlay with channels
[runtime] 2022-06-27 23:18:55 [verbose]: Unhandled Request Type: osu.Game.Online.API.Requests.CreateChannelRequest
[network] 2022-06-27 23:18:55 [verbose]: Failing request osu.Game.Online.API.Requests.CreateChannelRequest (System.InvalidOperationException: DummyAPIAccess cannot process this request.)
[runtime] 2022-06-27 23:18:55 [verbose]: Unhandled Request Type: osu.Game.Online.API.Requests.CreateChannelRequest
[network] 2022-06-27 23:18:55 [verbose]: Failing request osu.Game.Online.API.Requests.CreateChannelRequest (System.InvalidOperationException: DummyAPIAccess cannot process this request.)
[runtime] 2022-06-27 23:18:55 [verbose]: 🔸 Step #4 Select channel 1
[runtime] 2022-06-27 23:18:55 [verbose]: 🔸 Step #5 Channel 1 is visible
[runtime] 2022-06-27 23:18:55 [verbose]: 🔸 Step #6 Press document next keys
[runtime] 2022-06-27 23:18:55 [verbose]: 🔸 Step #7 Channel 2 is visible
[runtime] 2022-06-27 23:18:55 [verbose]: 🔸 Step #8 Press document next keys
[runtime] 2022-06-27 23:18:55 [verbose]: 🔸 Step #9 PM Channel 1 displayed
[network] 2022-06-27 23:18:55 [verbose]: Request to https://a.ppy.sh/587 failed with System.Net.WebException: NotFound.
[network] 2022-06-27 23:18:55 [verbose]: Request to https://a.ppy.sh/503 failed with System.Net.WebException: NotFound.
[runtime] 2022-06-27 23:19:05 [verbose]: 💥 Failed (on attempt 5,550)
[runtime] 2022-06-27 23:19:05 [verbose]:  Currently loading components (0)
[runtime] 2022-06-27 23:19:05 [verbose]: 🧵 Task schedulers
[runtime] 2022-06-27 23:19:05 [verbose]: LoadComponentsAsync (standard) concurrency:4 running:0 pending:0
[runtime] 2022-06-27 23:19:05 [verbose]: LoadComponentsAsync (long load) concurrency:4 running:0 pending:0
[runtime] 2022-06-27 23:19:05 [verbose]: 🎱 Thread pool
[runtime] 2022-06-27 23:19:05 [verbose]: worker:          min 1      max 32,767 available 32,766
[runtime] 2022-06-27 23:19:05 [verbose]: completion:      min 1      max 1,000  available 1,000
[runtime] 2022-06-27 23:19:05 [debug]: Focus on "ChatTextBox" no longer valid as a result of unfocusIfNoLongerValid.
[runtime] 2022-06-27 23:19:05 [debug]: Focus changed from ChatTextBox to nothing.
```

This kind of logging should be helpful:

```csharp
[runtime] 2022-06-28 04:59:57 [verbose]: 🔸 Step #5 Channel 1 is visible
[runtime] 2022-06-28 04:59:57 [verbose]: 🔸 Step #6 Press document next keys
[runtime] 2022-06-28 04:59:57 [verbose]: Current channel changed to #channel-2
[runtime] 2022-06-28 04:59:57 [debug]: Pressed (DocumentNext) handled by TestSceneChatOverlay+TestChatOverlay.
[runtime] 2022-06-28 04:59:57 [debug]: KeyDownEvent(PageDown, False) handled by ManualInputManager+LocalPlatformActionContainer.
[runtime] 2022-06-28 04:59:57 [verbose]: 🔸 Step #7 Channel 2 is visible
[runtime] 2022-06-28 04:59:57 [verbose]: 🔸 Step #8 Press document next keys
[runtime] 2022-06-28 04:59:57 [verbose]: Current channel changed to test user 685
[runtime] 2022-06-28 04:59:57 [debug]: Pressed (DocumentNext) handled by TestSceneChatOverlay+TestChatOverlay.
[runtime] 2022-06-28 04:59:57 [debug]: KeyDownEvent(PageDown, False) handled by ManualInputManager+LocalPlatformActionContainer.
[runtime] 2022-06-28 04:59:57 [verbose]: 🔸 Step #9 PM Channel 1 displayed
[runtime] 2022-06-28 04:59:57 [verbose]: 🔸 Step #10 Press document next keys
[runtime] 2022-06-28 04:59:57 [verbose]: Current channel changed to test user 218
```
2022-06-28 14:00:30 +09:00
Dean Herbert
569fde4b47 Add messages to all InvalidOperationExceptions
Without this, they can be very non-descript and hard to track down
2022-06-28 01:34:25 +09:00
Dan Balasescu
b13fa924fd
Merge pull request #18865 from peppy/fix-flaky-chat-test
Fix chat tests failing 1/10000 runs
2022-06-27 18:06:00 +09:00
Dean Herbert
13dcaf82ad Fix chat tests failing 1/10000 runs
31a447fda0/osu.Game/Online/Chat/ChannelManager.cs (L412-L414)

Sigh.
2022-06-27 16:50:10 +09:00
Dan Balasescu
f6a6538e96 Add more properties to IBeatmapOnlineInfo 2022-06-27 16:07:15 +09:00
Dean Herbert
31a447fda0 Update parameter discards 2022-06-24 21:26:19 +09:00
Bartłomiej Dach
26c5b59f6d
Replace usages of string.To{Lower,Upper}() 2022-06-24 11:57:45 +02:00
Bartłomiej Dach
34f1c80b7c
Add and use ILinkHandler interface 2022-06-20 20:04:21 +02:00
Dan Balasescu
f8830c6850 Automated #nullable processing 2022-06-17 16:37:17 +09:00
Bartłomiej Dach
f88c568c8d
Update flag sizes after switch to twemoji assets
The old flags used a size of 150x100, while the new assets based on
twemoji use a size of 150x108. Update existing usages to match this new
aspect ratio better.
2022-06-15 21:45:47 +02:00
Dean Herbert
52c8cea27d Update spectator/multiplayer endpoint in line with new deployment 2022-06-11 22:31:01 +09:00
Dean Herbert
c661f2b059 Ensure ChannelManager has access to API from point of construction
Closes https://github.com/ppy/osu/issues/18451.
2022-06-08 19:15:23 +09:00
Dean Herbert
3b46787e06
Merge pull request #18496 from smoogipoo/multiplayer-leaderboard-user-mods-2
Support mod/ruleset combinations in multiplayer gameplay leaderboard
2022-06-08 14:58:13 +09:00
Dean Herbert
eee79c9531
Merge pull request #18610 from jai-x/refactor-chat-line
Refactor `ChatLine` and fix `DrawableChannel` flow padding
2022-06-08 13:54:53 +09:00
Dean Herbert
cd649f7d97
Merge branch 'master' into multiplayer-leaderboard-user-mods-2 2022-06-08 13:39:42 +09:00
Salman Ahmed
830ff66688 Fix message notifier not handling unresolved PM channels 2022-06-08 04:31:31 +03:00
Jai Sharma
2f635fa854 Refactor ChatLine and fix DrawableChannel flow padding
Refactors `ChatLine` component to use more sensible override properties
and layout using grid container. Moves creation of username component
into its own method to simplify BDL.

Updates padding of base `DrawableChannel` flow padding.

Removes usage of `ChatOverlayDrawableChannel` since it's overrides are
no longer needed.

Updates usage of `StandAloneChatDisplay` to use new override properties
of `DrawableChannel`.
2022-06-07 22:35:45 +01:00
Dean Herbert
734636299e
Merge pull request #18567 from jai-x/update-dayseparator
Update `DaySeparator` to use new design throughout
2022-06-06 19:15:43 +09:00
Dean Herbert
7facbc9b28
Merge branch 'master' into multiplayer-test-clone-room 2022-06-06 13:47:16 +09:00
Jai Sharma
c0aaeff2b3 Update DaySeparator to use new design throughout
Moves `DaySeparator` chat component to it's own file and update it to
match new chat design. Makes use of several virtual attributes that can
be overridden to update spacing and layout in other usage contexts.

Remove redundant usage of `ChatOverlayDaySeparator`, since the new
design is now part of the base class.

Create `StandAloneDaySeparator` to use in `StandAloneChatDisplay` which
overrides attributes to match correct spacing and layout for its design.

Ensure that `DrawableChannel.CreateDaySeparator` returns type of
`DaySeparator` instead of `Drawable`.
2022-06-04 18:02:14 +01:00
Jamie Taylor
365819865e
Remove 'submit' sample usages 2022-06-03 22:31:35 +09:00
Dean Herbert
f68df1518f
Merge branch 'master' into multiplayer-test-clone-room 2022-06-03 22:29:39 +09:00
Dan Balasescu
06ac3c1ad3 Make MultiplayerClient update CurrentPlaylistItem 2022-06-03 21:17:23 +09:00
Dan Balasescu
77289c7224 Fix inability to serialise-then-deserialise playlist items 2022-06-03 20:36:12 +09:00
Dan Balasescu
5245995689 Use IsNotNull() helper 2022-06-03 19:50:21 +09:00
Dan Balasescu
646f5f0f33 Isolate "server-side" multiplayer rooms in testing 2022-06-03 19:17:34 +09:00
Dean Herbert
eb2d822530 Fix web requests potentially being performed after cancelled
Closes https://github.com/ppy/osu/issues/18524.
2022-06-03 16:04:52 +09:00
Bartłomiej Dach
59ffc8b08e
Merge branch 'master' into multiplayer-leaderboard-user-mods-2 2022-06-02 20:45:10 +02:00
Dan Balasescu
4d9a77bdc0 Stop using Drawable.Clock altogether 2022-06-02 15:02:50 +09:00
Dan Balasescu
6fb1fe06a0 Remove unnecessary ApplyBeatmap call 2022-06-02 14:47:04 +09:00
Dan Balasescu
13d85b8cc7 Merge branch 'scoreprocessor-cleanup' into multiplayer-leaderboard-user-mods-2 2022-05-31 19:53:37 +09:00
Dan Balasescu
22d998dc2a Use new score processor in MultiplayerGameplayLeaderboard 2022-05-30 19:26:26 +09:00
Dan Balasescu
75b50de269 Implement score processor for spectator states 2022-05-30 19:26:26 +09:00
Dan Balasescu
a052e09ac3 Send ScoreProcessor statistics in SpectatorState 2022-05-30 19:26:26 +09:00
Dean Herbert
dcc53fbd47 Merge branch 'rename-chat-overlay' into fix-dummmy-api-request-firing-2 2022-05-30 17:56:12 +09:00
Dean Herbert
f65d2db77f Remove "V2" suffix from ChatOverlay components 2022-05-30 17:54:09 +09:00
Dean Herbert
c18dd8c8fb Ensure Queue operations on DummyAPIAccess are performed on the update thread 2022-05-30 16:32:44 +09:00
Dean Herbert
a2a057440e Fail requests taretting the fake API with a more deliberate exception
I think this feels better than relying on some other method to throw an
exception.
2022-05-30 16:31:54 +09:00
Jai Sharma
8f596520f3 Remove old chat overlay components 2022-05-29 20:08:43 +01:00
Dean Herbert
ca9b2648a3
Merge pull request #18421 from peppy/reconnect-on-server-shutdown-exception
Handle server shutdown messages in room creation and spectator initialisation
2022-05-28 03:52:24 +09:00
Dean Herbert
ef47b380c6 Add featured artist playlist category 2022-05-27 20:18:46 +09:00
Dean Herbert
b2607196b8 Merge branch 'master' into new-chat-integrate 2022-05-26 18:38:26 +09:00
Dean Herbert
abb69a49b0 Handle server shutdown messages in room creation and spectator initialisation 2022-05-26 18:03:41 +09:00
Dean Herbert
63dd9bd493 Expose Reconnect logic in HubClientConnector 2022-05-26 18:02:50 +09:00
Dean Herbert
87959a59d9 Add missing "announce" channel type
Of note, this doesn't mean the channels will display, but it does fix
parsing errors which cause the whole chat display to fail.
2022-05-25 18:28:33 +09:00