Commit Graph

83 Commits

Author SHA1 Message Date
rob perren
1934f630d7 Add support to IHttpRequest to specify a Unix Socket to allow intra host http requests through this mechanism
#rb Lorry.Li

[CL 36185944 by rob perren in 5.5 branch]
2024-09-11 05:00:46 -04:00
lorry li
018408281a Extract the user agent header populating code from implementions into FHttpRequestCommon.
#jira UE-222396
[REVIEW] [at]michael.kirzinger [at]michael.atchison [at]rob.cannaday [at]rafa.lecina [at]ryan.hairyes
#rb Rob.Cannaday
#tests Reproduced with new test case in WebTests and passed the test with the changelist.

[CL 35784008 by lorry li in ue5-main branch]
2024-08-23 17:51:09 -04:00
stephen ma
e753ee34e0 Disable aftersteps in WebTests due to Horde.
[CL 34904749 by stephen ma in ue5-main branch]
2024-07-18 13:00:13 -04:00
lorry li
d2c3cb4820 On specific platform, cache maximum concurrent http requests when init thread, instead of increase the value at runtime, we can't really increase it by hotfix at runtime when it also requires memory pool re-initialization.
[REVIEW] [at]michael.kirzinger [at]rob.cannaday [at]michael.atchison
#rb michael.atchison, Rob.Cannaday

[CL 34883585 by lorry li in ue5-main branch]
2024-07-17 16:08:23 -04:00
olivier carrere
750c41834b Do not restrict handling of Retry-After during HTTP retries.
#rb lorry.li

[CL 34650067 by olivier carrere in ue5-main branch]
2024-06-25 14:23:27 -04:00
lorry li
916e3e9536 Extract http response code from http impls into FHttpRequestCommon;
Change CVarHttpUrlPatternsToLogResponse to use space instead of comma to separate url patterns;
Add CVarHttpUrlPatternsToMockFailure to mock http connect error or response failures through url patterns.

[REVIEW] [at]michael.kirzinger [at]michael.atchison [at]rafa.lecina [at]rob.cannaday
#tests Tried in game client also passed all the tests including new added test cases in WebTests
#rb Rafa.Lecina

[CL 34648656 by lorry li in ue5-main branch]
2024-06-25 14:09:55 -04:00
lorry li
5b52420184 Make sure http request on platforms can cancel request with proper reason;
Add test case for canceling request without calling ProcessRequest, make sure complete delegate will be invoked;
Add test case for canceling request which called ProcessRequest, but still in the queue, the complete delegate will be invoked immediately(Make sure canceled queued requests will complete immediately instead of waiting until they are popped from the queue).

[REVIEW] [at]michael.atchison [at]michael.kirzinger [at]rob.cannaday [at]rafa.lecina
#rb michael.atchison, Rafa.Lecina, Rob.Cannaday

[CL 34082567 by lorry li in ue5-main branch]
2024-06-03 20:21:58 -04:00
lorry li
21d7545a7d Add ResetTimeoutStatus method to clear bTimedOut flag for http request to be reused when the total timeout was set.
[REVIEW] [at]michael.kirzinger [at]michael.atchison [at]rafa.lecina [at]rob.cannaday
#rb michael.atchison
#tests Tested through new test case in WebTests project.

[CL 34073981 by lorry li in ue5-main branch]
2024-06-03 15:24:38 -04:00
lorry li
f9357f3ad0 Resubmit: Use safer call ExecuteIfBound for http response stream delegate, to avoid potential thread data race issue.
[REVIEW] [at]michael.kirzinger [at]michael.atchison [at]rafa.lecina [at]jan.orlowski
#rb michael.atchison, Rafa.Lecina

[CL 34021778 by lorry li in ue5-main branch]
2024-05-30 20:00:59 -04:00
grant medine
61726544db [Backout] - CL34003329
[FYI] lorry.li
Original CL Desc
-----------------------------------------------------------------
Use safer call ExecuteIfBound for http response stream delegate, to avoid potential thread data race issue.

[REVIEW] [at]michael.kirzinger [at]michael.atchison [at]rafa.lecina [at]jan.orlowski
#rb michael.atchison, Rafa.Lecina

[CL 34013724 by grant medine in ue5-main branch]
2024-05-30 17:16:16 -04:00
lorry li
87247738b0 Use safer call ExecuteIfBound for http response stream delegate, to avoid potential thread data race issue.
[REVIEW] [at]michael.kirzinger [at]michael.atchison [at]rafa.lecina [at]jan.orlowski
#rb michael.atchison, Rafa.Lecina

[CL 34011909 by lorry li in ue5-main branch]
2024-05-30 16:24:36 -04:00
chris constantinescu
84bb87d719 Rrestrict test metadata to test mode
Step verified job 66390cb0242b321d4c9d98a6
#jira UE-214088

[CL 33461215 by chris constantinescu in ue5-main branch]
2024-05-06 13:09:50 -04:00
chris constantinescu
5d2d569cb1 Use optional arguments and Extend/Expand pattern for Macros to reduce LLT xml metadata file footprint
.xml metadata files are generated exclusively using TestMode, from values of TestMetadata set from the module class
RunUBT -Mode=Test -GenerateMetadata
To support additional NDA platforms, build modules must be created.
Cleanup unused metadata files from the previous generation system.
#jira UE-195038
#rb Jerome.Delattre

[CL 33373724 by chris constantinescu in ue5-main branch]
2024-05-01 11:35:44 -04:00
lorry li
076a9f64d5 Fix the potential http crash when shared ptr bound to data receiving delegate got destroyed.
[REVIEW] [at]michael.kirzinger [at]michael.atchison [at]rafa.lecina
#rb michael.atchison, Michael.Kirzinger, Rafa.Lecina
#tests Validated through test cases in WebTests project

[CL 33200296 by lorry li in ue5-main branch]
2024-04-24 11:09:32 -04:00
lorry li
3273aa98e7 Fix the test case crash "Shutdown http module without issue when there are ongoing download http requests" in WebTests.
Reason: UserStreamingInstance instance got deleted before http module shutdown, the data received delegates only unbind when http module shutdown.

[REVIEW] [at]michael.kirzinger [at]michael.atchison [at]rafa.lecina
#rb michael.atchison, Michael.Kirzinger

[CL 32946476 by lorry li in ue5-main branch]
2024-04-12 17:41:58 -04:00
lorry li
c29cce2d5a Fix the test case "Http request connect timeout" for xCurl by increasing UE_HTTP_CONNECTION_TIMEOUT_MAX_DEVIATION;
Filter out the test case "Cancel http request connect before timeout" for platforms which doesn't support connect timeout retry with precise timeout value.

[REVIEW] [at]michael.kirzinger [at]michael.atchison [at]rafa.lecina
#rb michael.atchison

[CL 32840155 by lorry li in ue5-main branch]
2024-04-09 17:22:33 -04:00
lorry li
219ee093c2 Refactor function FHttpRetrySystem::FManager::ShouldRetry to use early returns.
[REVIEW] [at]michael.kirzinger [at]michael.atchison [at]rafa.lecina
#rb Rafa.Lecina
#tests Covered by test case in WebTests.

[CL 32735428 by lorry li in ue5-main branch]
2024-04-04 14:01:11 -04:00
lorry li
e8f537554e Make sure when cancel http request from retry system, it can still trigger complete delegate when non-game thread support enabled.
[REVIEW] [at]michael.kirzinger [at]michael.atchison [at]rafa.lecina
#rb michael.atchison, Rafa.Lecina

[CL 32673430 by lorry li in ue5-main branch]
2024-04-02 13:51:50 -04:00
lorry li
94234107c7 Add the interface to set activity timeout per request.
[REVIEW] [at]michael.kirzinger [at]michael.atchison [at]rafa.lecina [at]jon.cook
#rb jon.cook, michael.atchison
#tests Passed WebTests test case

[CL 32409091 by lorry li in ue5-main branch]
2024-03-21 15:03:46 -04:00
lorry li
1e0719ce28 Make sure to re-open the file when retry http request with streaming upload request.
[REVIEW] [at]michael.kirzinger [at]michael.atchison [at]rafa.lecina [at]justin.marcus
#rb Justin.Marcus, michael.atchison

[CL 32371902 by lorry li in ue5-main branch]
2024-03-20 13:04:21 -04:00
lorry li
acbaf16fb7 Fix a random dead lock when shut down http manager.
Reason: Currently when shutdown and flush in http manager, it gives up and cancels remaining requests after waiting a short period. When cancel, it holds the RequestLock, and in FHttpRequestCommon::CancelRequest, it tries to access HttpTaskTimerHandleCriticalSection to stop activity timer. In the mean time, the request itself could be in activity or total timeout callback, which is holding the HttpTaskTimerHandleCriticalSection, and trying to AbortRequest which will try to access RequstLock in HttpManager.IsValidRequest.

[REVIEW] [at]michael.kirzinger [at]michael.atchison [at]rafa.lecina
#rb michael.atchison, Michael.Kirzinger, Rafa.Lecina
#tests Reproduced with test case in WebTests and fixed it. Tried launch and quit game on Win64.

[CL 32281657 by lorry li in ue5-main branch]
2024-03-15 15:12:05 -04:00
chris constantinescu
56b2fd5e18 Move UE component cleanup logic from TestRunner into proper place (introduced at CL 32031322) and fix refactoring (CL 32031169) on Sony platforms to re-allow unpackaged builds
#jira UE-209196
#rb sebastian.lewicki

[CL 32221092 by chris constantinescu in ue5-main branch]
2024-03-13 14:18:48 -04:00
lorry li
9f7b96d4f7 When http request total timeout during lockout, make sure it can trigger complete delegate by http delegate thread policy;
Use FTSTicker in http manager instead to manage game thread tasks.

#jira UE-163631
[REVIEW] [at]michael.kirzinger [at]michael.atchison [at]rafa.lecina
#rb Rafa.Lecina
#tests Passed all tests in WebTests project

[CL 32052075 by lorry li in ue5-main branch]
2024-03-06 09:41:35 -05:00
lorry li
efdbf20e85 Make sure to stop activity timeout timer when total timeout triggered;
Only output log if request had completed when activity timeout, it can continue to run even if that happened.

[REVIEW] [at]michael.atchison [at]michael.kirzinger [at]rafa.lecina
#rb Rafa.Lecina

[CL 31948912 by lorry li in ue5-main branch]
2024-03-01 13:19:35 -05:00
lorry li
1d79a2d847 Fix the test case "Optionally retry limit can be set differently for connection error" by using latest expected back off value;
Make the test case "Test platform request requests limits" covers the cancelling using CompleteOnHttpThread as delegate thread policy.

[REVIEW] [at]michael.atchison [at]michael.kirzinger [at]rafa.lecina [at]stephen.ma
#rb Rafa.Lecina
#tests Passed the WebTests.

[CL 31879765 by lorry li in ue5-main branch]
2024-02-28 14:33:34 -05:00