Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"@azure/storage-blob": "^12.28.0",
"@hapi/joi": "^17.1.1",
"@smithy/node-http-handler": "^3.0.0",
"arsenal": "git+https://github.com/scality/Arsenal#8.4.4",
"arsenal": "git+https://github.com/scality/Arsenal#77ae4021c8b294b07e3f34818cecbe6ae7d9d1cb",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Arsenal is pinned to a commit hash instead of a tag. Git-based dependencies should be pinned to a released tag. Tags 8.4.5 and 8.4.6 already exist — if the ARSN-594 fix is included in one of them, pin to that tag instead.

— Claude Code

"async": "2.6.4",
"bucketclient": "scality/bucketclient#8.2.7",
"bufferutil": "^4.0.8",
Expand Down
22 changes: 13 additions & 9 deletions tests/functional/aws-node-sdk/test/support/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,23 @@ const DEFAULT_GLOBAL_OPTIONS = {
httpOptions,
};

// The SDK v2 config set no timeout, so tests ran with the v2 default of
// 120s; the v3 migration introduced a 5s timeout that heavy server-side
// operations (multi-megabyte UploadPartCopy, 1000-key batch deletes) exceed
// under CI load, as the server sends no response bytes until they complete.
// 30s stays below mocha's 40s global timeout so a genuine hang still
// surfaces as the SDK TimeoutError rather than a generic mocha timeout.
Comment on lines +25 to +30

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would argue that when we read this comment in the future, we will not care about the history (migration changed it to 5s), but only about why we chose 30s as the value.

const REQUEST_TIMEOUT = 30000;

const DEFAULT_MEM_OPTIONS = {
endpoint: `${transport}://127.0.0.1:8000`,
port: 8000,
forcePathStyle: true,
region: 'us-east-1',
region: 'us-east-1',
maxAttempts: 3,
requestHandler: new NodeHttpHandler({
connectionTimeout: 5000,
requestTimeout: 5000,
requestTimeout: REQUEST_TIMEOUT,
httpAgent: new (ssl ? https : http).Agent({
maxSockets: 200,
keepAlive: true,
Expand All @@ -44,7 +52,7 @@ const DEFAULT_AWS_OPTIONS = {
maxAttempts: 3,
requestHandler: new NodeHttpHandler({
connectionTimeout: 5000,
socketTimeout: 5000,
requestTimeout: REQUEST_TIMEOUT,
httpAgent: new https.Agent({
maxSockets: 200,
keepAlive: true,
Expand All @@ -64,9 +72,7 @@ function _getMemCredentials(profile) {
function _getMemConfig(profile, config) {
const credentials = _getMemCredentials(profile);

const memConfig = Object.assign({}
, DEFAULT_GLOBAL_OPTIONS, DEFAULT_MEM_OPTIONS
, { credentials }, config);
const memConfig = Object.assign({}, DEFAULT_GLOBAL_OPTIONS, DEFAULT_MEM_OPTIONS, { credentials }, config);

if (process.env.IP) {
memConfig.endpoint = `${transport}://${process.env.IP}:8000`;
Expand All @@ -78,9 +84,7 @@ function _getMemConfig(profile, config) {
function _getAwsConfig(profile, config) {
const credentials = getAwsCredentials(profile);

const awsConfig = Object.assign({}
, DEFAULT_GLOBAL_OPTIONS, DEFAULT_AWS_OPTIONS
, { credentials }, config);
const awsConfig = Object.assign({}, DEFAULT_GLOBAL_OPTIONS, DEFAULT_AWS_OPTIONS, { credentials }, config);

return awsConfig;
}
Expand Down
Loading
Loading