File tree 4 files changed +15
-6
lines changed
4 files changed +15
-6
lines changed Original file line number Diff line number Diff line change 1
1
# Changelog
2
+ ## 0.7.23 - 2025-03-17
3
+ * Add a timeout to Evergreen test stats requests
4
+
2
5
## 0.7.22 - 2025-01-22
3
6
* Avoid a division-by-zero when processing empty suites.
4
7
Original file line number Diff line number Diff line change 2
2
name = " mongo-task-generator"
3
3
description = " Dynamically split evergreen tasks into subtasks for testing the 10gen/mongo project."
4
4
license = " Apache-2.0"
5
- version = " 0.7.22 "
5
+ version = " 0.7.23 "
6
6
repository = " https://github.com/mongodb/mongo-task-generator"
7
7
authors = [" DevProd Correctness Team <devprod-correctness-team@mongodb.com>" ]
8
8
edition = " 2018"
Original file line number Diff line number Diff line change 2
2
3
3
use anyhow:: { bail, Result } ;
4
4
use async_trait:: async_trait;
5
- use reqwest:: { Client , Error } ;
5
+ use reqwest:: Error ;
6
6
use reqwest_middleware:: { ClientBuilder , ClientWithMiddleware } ;
7
7
use reqwest_retry:: policies:: ExponentialBackoff ;
8
8
use reqwest_retry:: RetryTransientMiddleware ;
9
9
use serde:: Deserialize ;
10
10
use std:: collections:: HashMap ;
11
11
use std:: fmt:: { Display , Formatter } ;
12
+ use std:: time:: Duration ;
12
13
13
14
const REQWEST_CLIENT_MAX_RETRY_COUNT : u32 = 3 ;
14
15
const HOOK_DELIMITER : char = ':' ;
@@ -199,9 +200,14 @@ impl TaskHistoryService for TaskHistoryServiceImpl {
199
200
pub fn build_retryable_client ( ) -> ClientWithMiddleware {
200
201
let retry_policy =
201
202
ExponentialBackoff :: builder ( ) . build_with_max_retries ( REQWEST_CLIENT_MAX_RETRY_COUNT ) ;
202
- ClientBuilder :: new ( Client :: new ( ) )
203
- . with ( RetryTransientMiddleware :: new_with_policy ( retry_policy) )
204
- . build ( )
203
+ ClientBuilder :: new (
204
+ reqwest:: Client :: builder ( )
205
+ . timeout ( Duration :: from_secs ( 30 ) )
206
+ . build ( )
207
+ . unwrap ( ) ,
208
+ )
209
+ . with ( RetryTransientMiddleware :: new_with_policy ( retry_policy) )
210
+ . build ( )
205
211
}
206
212
207
213
/// Convert the list of stats into a map of test names to test stats.
You can’t perform that action at this time.
0 commit comments