testdriverai 7.9.34-test → 7.9.36-test
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agent/lib/system.js +14 -7
- package/package.json +1 -1
package/agent/lib/system.js
CHANGED
|
@@ -35,13 +35,20 @@ const createSystem = (emitter, sandbox, config) => {
|
|
|
35
35
|
throw new Error("No downloadUrl in response: " + JSON.stringify(response.data));
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
// Step 2: Download the image from S3
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
38
|
+
// Step 2: Download the image from S3 (with retry)
|
|
39
|
+
// Short timeout + many retries: fail fast on stuck connections,
|
|
40
|
+
// and give Tigris time to replicate the object between attempts
|
|
41
|
+
const imageResponse = await withRetry(
|
|
42
|
+
() => axios({
|
|
43
|
+
method: "get",
|
|
44
|
+
url: downloadUrl,
|
|
45
|
+
responseType: "arraybuffer",
|
|
46
|
+
timeout: 10000,
|
|
47
|
+
}),
|
|
48
|
+
{
|
|
49
|
+
retryConfig: { maxRetries: 5, baseDelayMs: 1000 },
|
|
50
|
+
},
|
|
51
|
+
);
|
|
45
52
|
|
|
46
53
|
return Buffer.from(imageResponse.data).toString("base64");
|
|
47
54
|
};
|