Skip to content

CLDSRV-855: Update helpers#6128

Open
tmacro wants to merge 8 commits intoimprovement/CLDSRV-869/account_limitingfrom
improvement/CLDSRV-855/update_helpers
Open

CLDSRV-855: Update helpers#6128
tmacro wants to merge 8 commits intoimprovement/CLDSRV-869/account_limitingfrom
improvement/CLDSRV-855/update_helpers

Conversation

@tmacro
Copy link
Copy Markdown
Contributor

@tmacro tmacro commented Apr 1, 2026

No description provided.

@claude
Copy link
Copy Markdown

claude bot commented Apr 1, 2026

  • cleanup.js: setTimeout rescheduling in cleanupJob does not call .unref() on the new timer, so after the first cleanup fires, the timer will keep the Node.js process alive (preventing graceful shutdown). The original setInterval pattern only needed one .unref() call.
    • Call .unref() on the timer inside cleanupJob after each setTimeout
  • cleanup.js: The now variable passed to expireCachedConfigs/expireCachedBucketOwners is silently ignored — cacheExpire uses its own Date.now() internally.
    • Remove the unused now variable, or update cacheExpire to accept a timestamp parameter
  • helpers.js:155: Extra space before * in BurstCapacity multiplication.
    • Remove the extra space

Review by Claude Code

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 1, 2026

❌ 105 Tests Failed:

Tests completed Failed Passed Skipped
2695 105 2590 0
View the top 3 failed test(s) by shortest run time
should complete MPU on file with same key as object put to AWS::Multipart Upload API with AWS Backend should complete MPU on file with same key as object put to AWS
Stack Traces | 0s run time
extractAndCacheRateLimitConfig is not a function
should complete a multipart upload on real AWS location with bucketMatch set to false::Multipart Upload API with AWS Backend should complete a multipart upload on real AWS location with bucketMatch set to false
Stack Traces | 0s run time
extractAndCacheRateLimitConfig is not a function
should complete a multipart upload on real AWS::Multipart Upload API with AWS Backend should complete a multipart upload on real AWS
Stack Traces | 0s run time
extractAndCacheRateLimitConfig is not a function
should complete a multipart upload::Multipart Upload API with AWS Backend with mpu initiated on legacy version should complete a multipart upload
Stack Traces | 0s run time
extractAndCacheRateLimitConfig is not a function
should copy part an object on AWS location that has bucketMatch equals false to a mpu with a different AWS location::ObjectCopyPutPart API with multiple backends should copy part an object on AWS location that has bucketMatch equals false to a mpu with a different AWS location
Stack Traces | 0s run time
extractAndCacheRateLimitConfig is not a function
should copy part to AWS based on mpu location::ObjectCopyPutPart API with multiple backends should copy part to AWS based on mpu location
Stack Traces | 0s run time
extractAndCacheRateLimitConfig is not a function
should copy part to file based on mpu location::ObjectCopyPutPart API with multiple backends should copy part to file based on mpu location
Stack Traces | 0s run time
extractAndCacheRateLimitConfig is not a function
should initiate a multipart upload on AWS location with bucketMatch equals false::Multipart Upload API with AWS Backend should initiate a multipart upload on AWS location with bucketMatch equals false
Stack Traces | 0s run time
extractAndCacheRateLimitConfig is not a function
should initiate a multipart upload with tags on AWS::Multipart Upload API with AWS Backend should initiate a multipart upload with tags on AWS
Stack Traces | 0s run time
extractAndCacheRateLimitConfig is not a function
should list all multipart uploads on all backends::Multipart Upload API with AWS Backend should list all multipart uploads on all backends
Stack Traces | 0s run time
extractAndCacheRateLimitConfig is not a function
should list the parts of a multipart upload on real AWS location with bucketMatch set to false::Multipart Upload API with AWS Backend should list the parts of a multipart upload on real AWS location with bucketMatch set to false
Stack Traces | 0s run time
extractAndCacheRateLimitConfig is not a function
should list the parts of a multipart upload on real AWS::Multipart Upload API with AWS Backend should list the parts of a multipart upload on real AWS
Stack Traces | 0s run time
extractAndCacheRateLimitConfig is not a function
should only return number of parts equal to specified maxParts::Multipart Upload API with AWS Backend should only return number of parts equal to specified maxParts
Stack Traces | 0s run time
extractAndCacheRateLimitConfig is not a function
should put a part to AWS based on bucket location with bucketMatch set to false::objectPutPart API with multiple backends should put a part to AWS based on bucket location with bucketMatch set to false
Stack Traces | 0s run time
extractAndCacheRateLimitConfig is not a function
should put a part to AWS based on bucket location with bucketMatch set to true::objectPutPart API with multiple backends should put a part to AWS based on bucket location with bucketMatch set to true
Stack Traces | 0s run time
extractAndCacheRateLimitConfig is not a function
should put a part to AWS based on mpu location::objectPutPart API with multiple backends should put a part to AWS based on mpu location
Stack Traces | 0s run time
extractAndCacheRateLimitConfig is not a function
should put a part to file based on bucket location::objectPutPart API with multiple backends should put a part to file based on bucket location
Stack Traces | 0s run time
extractAndCacheRateLimitConfig is not a function
should put a part to file based on request endpoint::objectPutPart API with multiple backends should put a part to file based on request endpoint
Stack Traces | 0s run time
extractAndCacheRateLimitConfig is not a function
should put a part to mem based on bucket location::objectPutPart API with multiple backends should put a part to mem based on bucket location
Stack Traces | 0s run time
extractAndCacheRateLimitConfig is not a function
should put a part to mem based on mpu location::objectPutPart API with multiple backends should put a part to mem based on mpu location
Stack Traces | 0s run time
extractAndCacheRateLimitConfig is not a function
should put an object to sproxyd::objectPutAPI with multiple backends should put an object to sproxyd
Stack Traces | 0s run time
extractAndCacheRateLimitConfig is not a function
should return ServiceUnavailable if MPU deleted directly from AWS and try to complete from S3::Multipart Upload API with AWS Backend should return ServiceUnavailable if MPU deleted directly from AWS and try to complete from S3
Stack Traces | 0s run time
extractAndCacheRateLimitConfig is not a function
should return entityTooSmall error::Multipart Upload API with AWS Backend should return entityTooSmall error
Stack Traces | 0s run time
extractAndCacheRateLimitConfig is not a function
should return invalidPart error::Multipart Upload API with AWS Backend should return invalidPart error
Stack Traces | 0s run time
extractAndCacheRateLimitConfig is not a function
should return invalidPartOrder error::Multipart Upload API with AWS Backend should return invalidPartOrder error
Stack Traces | 0s run time
extractAndCacheRateLimitConfig is not a function
should store a part even if the MPU was initiated on legacy version::objectPutPart API with multiple backends should store a part even if the MPU was initiated on legacy version
Stack Traces | 0s run time
extractAndCacheRateLimitConfig is not a function
should upload a part to file based on mpu location::objectPutPart API with multiple backends should upload a part to file based on mpu location
Stack Traces | 0s run time
extractAndCacheRateLimitConfig is not a function
"after each" hook for "DELETE .system-d26a9498-cb7c-4a87-a44a-8ae204f5ba6c/system.xml should delete the XML file"::Veeam routes: veeam DELETE routes: "after each" hook for "DELETE .system-d26a9498-cb7c-4a87-a44a-8ae204f5ba6c/system.xml should delete the XML file"
Stack Traces | 0.001s run time
Inaccessible host: `127.0.0.1' at port `8000'. This service may not be available in the `us-east-1' region.
"after each" hook for "GET .system-d26a9498-cb7c-4a87-a44a-8ae204f5ba6c/system.xml should return the expected XML file"::Veeam routes: veeam GET routes: "after each" hook for "GET .system-d26a9498-cb7c-4a87-a44a-8ae204f5ba6c/system.xml should return the expected XML file"
Stack Traces | 0.001s run time
Inaccessible host: `127.0.0.1' at port `8000'. This service may not be available in the `us-east-1' region.
"after each" hook for "HEAD .system-d26a9498-cb7c-4a87-a44a-8ae204f5ba6c/system.xml should return the existing XML file metadata"::Veeam routes: veeam HEAD routes: "after each" hook for "HEAD .system-d26a9498-cb7c-4a87-a44a-8ae204f5ba6c/system.xml should return the existing XML file metadata"
Stack Traces | 0.001s run time
Inaccessible host: `127.0.0.1' at port `8000'. This service may not be available in the `us-east-1' region.
"after each" hook for "should successfully replicate a version"::backbeat routes for replication (cross account) "after each" hook for "should successfully replicate a version"
Stack Traces | 0.001s run time
Inaccessible host: `127.0.0.1' at port `8000'. This service may not be available in the `us-east-1' region.
should abort a multipart upload on real AWS location withbucketMatch set to false::Multipart Upload API with AWS Backend should abort a multipart upload on real AWS location withbucketMatch set to false
Stack Traces | 0.001s run time
extractAndCacheRateLimitConfig is not a function
should abort a multipart upload::Multipart Upload API with AWS Backend with mpu initiated on legacy version should abort a multipart upload
Stack Traces | 0.001s run time
extractAndCacheRateLimitConfig is not a function
should allow creating mpu with SSE header in encrypted bucket::KMIP backed server-side encryption should allow creating mpu with SSE header in encrypted bucket
Stack Traces | 0.001s run time
connect ECONNREFUSED 127.0.0.1:8000
should allow object PUT with SSE header in encrypted bucket::KMIP backed server-side encryption should allow object PUT with SSE header in encrypted bucket
Stack Traces | 0.001s run time
connect ECONNREFUSED 127.0.0.1:8000
should allow object copy with SSE header in encrypted bucket::KMIP backed server-side encryption should allow object copy with SSE header in encrypted bucket
Stack Traces | 0.001s run time
connect ECONNREFUSED 127.0.0.1:8000
should be successful initiating MPU on AWS with Scality S3 versioning enabled::Multipart Upload API with AWS Backend should be successful initiating MPU on AWS with Scality S3 versioning enabled
Stack Traces | 0.001s run time
extractAndCacheRateLimitConfig is not a function
should complete MPU on AWS with same key as object put to file::Multipart Upload API with AWS Backend should complete MPU on AWS with same key as object put to file
Stack Traces | 0.001s run time
extractAndCacheRateLimitConfig is not a function
should copy an object as a part to a multipart upload::Multipart Upload API with AWS Backend with mpu initiated on legacy version should copy an object as a part to a multipart upload
Stack Traces | 0.001s run time
extractAndCacheRateLimitConfig is not a function
should copy part an object on AWS to a mpu with a different AWS location that has bucketMatch equals false::ObjectCopyPutPart API with multiple backends should copy part an object on AWS to a mpu with a different AWS location that has bucketMatch equals false
Stack Traces | 0.001s run time
extractAndCacheRateLimitConfig is not a function
should copy part to AWS based on bucket location::ObjectCopyPutPart API with multiple backends should copy part to AWS based on bucket location
Stack Traces | 0.001s run time
extractAndCacheRateLimitConfig is not a function
should copy part to file based on bucket location::ObjectCopyPutPart API with multiple backends should copy part to file based on bucket location
Stack Traces | 0.001s run time
extractAndCacheRateLimitConfig is not a function
should copy part to file based on request endpoint::ObjectCopyPutPart API with multiple backends should copy part to file based on request endpoint
Stack Traces | 0.001s run time
extractAndCacheRateLimitConfig is not a function
should copy part to mem based on bucket location::ObjectCopyPutPart API with multiple backends should copy part to mem based on bucket location
Stack Traces | 0.001s run time
extractAndCacheRateLimitConfig is not a function
should copy part to mem based on mpu location::ObjectCopyPutPart API with multiple backends should copy part to mem based on mpu location
Stack Traces | 0.001s run time
extractAndCacheRateLimitConfig is not a function
should copy part to mem from AWS based on mpu location::ObjectCopyPutPart API with multiple backends should copy part to mem from AWS based on mpu location
Stack Traces | 0.001s run time
extractAndCacheRateLimitConfig is not a function
should decrease the inflights when performing multi object delete::quota evaluation with scuba metrics should decrease the inflights when performing multi object delete
Stack Traces | 0.001s run time
ifError got unwanted exception: Inaccessible host: `127.0.0.1' at port `8000'. This service may not be available in the `us-east-1' region.
should list multipart upload parts::Multipart Upload API with AWS Backend with mpu initiated on legacy version should list multipart upload parts
Stack Traces | 0.001s run time
extractAndCacheRateLimitConfig is not a function
should only list parts after PartNumberMarker::Multipart Upload API with AWS Backend should only list parts after PartNumberMarker
Stack Traces | 0.001s run time
extractAndCacheRateLimitConfig is not a function
should put a part to AWS based on bucket location::objectPutPart API with multiple backends should put a part to AWS based on bucket location
Stack Traces | 0.001s run time
extractAndCacheRateLimitConfig is not a function
should put an object to AWS based on bucket location::objectPutAPI with multiple backends should put an object to AWS based on bucket location
Stack Traces | 0.001s run time
extractAndCacheRateLimitConfig is not a function
should put an object to AWS::objectPutAPI with multiple backends should put an object to AWS
Stack Traces | 0.001s run time
extractAndCacheRateLimitConfig is not a function
should put an object to Azure based on bucket location::objectPutAPI with multiple backends should put an object to Azure based on bucket location
Stack Traces | 0.001s run time
extractAndCacheRateLimitConfig is not a function
should put an object to file based on bucket location::objectPutAPI with multiple backends should put an object to file based on bucket location
Stack Traces | 0.001s run time
extractAndCacheRateLimitConfig is not a function
should put an object to file::objectPutAPI with multiple backends should put an object to file
Stack Traces | 0.001s run time
extractAndCacheRateLimitConfig is not a function
should put an object to mem based on bucket location::objectPutAPI with multiple backends should put an object to mem based on bucket location
Stack Traces | 0.001s run time
extractAndCacheRateLimitConfig is not a function
should put an object to us-east-1 which is file based on bucket location if no locationConstraint provided::objectPutAPI with multiple backends should put an object to us-east-1 which is file based on bucket location if no locationConstraint provided
Stack Traces | 0.001s run time
extractAndCacheRateLimitConfig is not a function
should replace part if two parts uploaded with same part number to AWS::objectPutPart API with multiple backends should replace part if two parts uploaded with same part number to AWS
Stack Traces | 0.001s run time
extractAndCacheRateLimitConfig is not a function
should return QuotaExceeded when trying to CopyObject in a bucket with quota::quota evaluation with scuba metrics should return QuotaExceeded when trying to CopyObject in a bucket with quota
Stack Traces | 0.001s run time
ifError got unwanted exception: Inaccessible host: `127.0.0.1' at port `8000'. This service may not be available in the `us-east-1' region.
should return an error on listParts of deleted MPU::Multipart Upload API with AWS Backend should return an error on listParts of deleted MPU
Stack Traces | 0.001s run time
extractAndCacheRateLimitConfig is not a function
should return error on abort of MPU that does not exist::Multipart Upload API with AWS Backend should return error on abort of MPU that does not exist
Stack Traces | 0.001s run time
extractAndCacheRateLimitConfig is not a function
should upload part based on mpu location even if part location constraint is specified ::objectPutPart API with multiple backends should upload part based on mpu location even if part location constraint is specified 
Stack Traces | 0.001s run time
extractAndCacheRateLimitConfig is not a function
"after each" hook for "should successfully replicate a version"::backbeat routes for replication (same account) "after each" hook for "should successfully replicate a version"
Stack Traces | 0.002s run time
Inaccessible host: `127.0.0.1' at port `8000'. This service may not be available in the `us-east-1' region.
"before each" hook for "GET .system-d26a9498-cb7c-4a87-a44a-8ae204f5ba6c/system.xml should return the expected XML file"::Veeam routes: veeam GET routes: "before each" hook for "GET .system-d26a9498-cb7c-4a87-a44a-8ae204f5ba6c/system.xml should return the expected XML file"
Stack Traces | 0.002s run time
Inaccessible host: `127.0.0.1' at port `8000'. This service may not be available in the `us-east-1' region.
object metadata for newly stored object should have dataStoreName if copying to mem based on bucket location::ObjectCopy API with multiple backends object metadata for newly stored object should have dataStoreName if copying to mem based on bucket location
Stack Traces | 0.002s run time
extractAndCacheRateLimitConfig is not a function
should abort a multipart upload on real AWS::Multipart Upload API with AWS Backend should abort a multipart upload on real AWS
Stack Traces | 0.002s run time
extractAndCacheRateLimitConfig is not a function
should allow a restore if the quota is full but the objet fits with its reserved storage space::quota evaluation with scuba metrics should allow a restore if the quota is full but the objet fits with its reserved storage space
Stack Traces | 0.002s run time
ifError got unwanted exception: Inaccessible host: `127.0.0.1' at port `8000'. This service may not be available in the `us-east-1' region.
should allow writes after deleting data with quotas::quota evaluation with scuba metrics should allow writes after deleting data with quotas
Stack Traces | 0.002s run time
ifError got unwanted exception: Inaccessible host: `127.0.0.1' at port `8000'. This service may not be available in the `us-east-1' region.
should create an encrypted bucket and upload an object::KMIP backed server-side encryption should create an encrypted bucket and upload an object
Stack Traces | 0.002s run time
connect ECONNREFUSED 127.0.0.1:8000
should initiate a multipart upload on real AWS::Multipart Upload API with AWS Backend should initiate a multipart upload on real AWS
Stack Traces | 0.002s run time
extractAndCacheRateLimitConfig is not a function
should not evaluate quotas if the backend is not available::quota evaluation with scuba metrics should not evaluate quotas if the backend is not available
Stack Traces | 0.002s run time
ifError got unwanted exception: Inaccessible host: `127.0.0.1' at port `8000'. This service may not be available in the `us-east-1' region.
should not increase the inflights when the object is being rewritten with a smaller object::quota evaluation with scuba metrics should not increase the inflights when the object is being rewritten with a smaller object
Stack Traces | 0.002s run time
ifError got unwanted exception: Inaccessible host: `127.0.0.1' at port `8000'. This service may not be available in the `us-east-1' region.
should not return QuotaExceeded if the quota is not exceeded::quota evaluation with scuba metrics should not return QuotaExceeded if the quota is not exceeded
Stack Traces | 0.002s run time
ifError got unwanted exception: Inaccessible host: `127.0.0.1' at port `8000'. This service may not be available in the `us-east-1' region.
should not update the inflights if the API errored after evaluating quotas (deletion)::quota evaluation with scuba metrics should not update the inflights if the API errored after evaluating quotas (deletion)
Stack Traces | 0.002s run time
ifError got unwanted exception: Inaccessible host: `127.0.0.1' at port `8000'. This service may not be available in the `us-east-1' region.
should only evaluate quota and not update inflights for PutObject with the x-scal-s3-version-id header::quota evaluation with scuba metrics should only evaluate quota and not update inflights for PutObject with the x-scal-s3-version-id header
Stack Traces | 0.002s run time
ifError got unwanted exception: Inaccessible host: `127.0.0.1' at port `8000'. This service may not be available in the `us-east-1' region.
should put an object to mem::objectPutAPI with multiple backends should put an object to mem
Stack Traces | 0.002s run time
extractAndCacheRateLimitConfig is not a function
should return QuotaExceeded when trying to complete MPU in a bucket with quota::quota evaluation with scuba metrics should return QuotaExceeded when trying to complete MPU in a bucket with quota
Stack Traces | 0.002s run time
ifError got unwanted exception: Inaccessible host: `127.0.0.1' at port `8000'. This service may not be available in the `us-east-1' region.
should return QuotaExceeded when trying to copy a part in a bucket with quota::quota evaluation with scuba metrics should return QuotaExceeded when trying to copy a part in a bucket with quota
Stack Traces | 0.002s run time
ifError got unwanted exception: Inaccessible host: `127.0.0.1' at port `8000'. This service may not be available in the `us-east-1' region.
should return QuotaExceeded when trying to restore an object in a bucket with quota::quota evaluation with scuba metrics should return QuotaExceeded when trying to restore an object in a bucket with quota
Stack Traces | 0.002s run time
ifError got unwanted exception: Inaccessible host: `127.0.0.1' at port `8000'. This service may not be available in the `us-east-1' region.
"after all" hook for "PUT .system-d26a9498-cb7c-4a87-a44a-8ae204f5ba6c/capacity.xml should fail if invalid credentials are sent"::Veeam routes: veeam PUT routes: "after all" hook for "PUT .system-d26a9498-cb7c-4a87-a44a-8ae204f5ba6c/capacity.xml should fail if invalid credentials are sent"
Stack Traces | 0.003s run time
Inaccessible host: `127.0.0.1' at port `8000'. This service may not be available in the `us-east-1' region.
"before each" hook for "DELETE .system-d26a9498-cb7c-4a87-a44a-8ae204f5ba6c/system.xml should delete the XML file"::Veeam routes: veeam DELETE routes: "before each" hook for "DELETE .system-d26a9498-cb7c-4a87-a44a-8ae204f5ba6c/system.xml should delete the XML file"
Stack Traces | 0.003s run time
Inaccessible host: `127.0.0.1' at port `8000'. This service may not be available in the `us-east-1' region.
"before each" hook for "HEAD .system-d26a9498-cb7c-4a87-a44a-8ae204f5ba6c/system.xml should return the existing XML file metadata"::Veeam routes: veeam HEAD routes: "before each" hook for "HEAD .system-d26a9498-cb7c-4a87-a44a-8ae204f5ba6c/system.xml should return the existing XML file metadata"
Stack Traces | 0.003s run time
Inaccessible host: `127.0.0.1' at port `8000'. This service may not be available in the `us-east-1' region.
"before each" hook for "should successfully replicate a version"::backbeat routes for replication (cross account) "before each" hook for "should successfully replicate a version"
Stack Traces | 0.003s run time
Inaccessible host: `127.0.0.1' at port `8000'. This service may not be available in the `us-east-1' region.
should not update the inflights if the quota check is passing but the object is already restored::quota evaluation with scuba metrics should not update the inflights if the quota check is passing but the object is already restored
Stack Traces | 0.003s run time
ifError got unwanted exception: Inaccessible host: `127.0.0.1' at port `8000'. This service may not be available in the `us-east-1' region.
should return QuotaExceeded when trying to copyObject in a versioned bucket with quota::quota evaluation with scuba metrics should return QuotaExceeded when trying to copyObject in a versioned bucket with quota
Stack Traces | 0.003s run time
ifError got unwanted exception: Inaccessible host: `127.0.0.1' at port `8000'. This service may not be available in the `us-east-1' region.
should put an object to azure::objectPutAPI with multiple backends should put an object to azure
Stack Traces | 0.004s run time
extractAndCacheRateLimitConfig is not a function
"before all" hook for "PUT .system-d26a9498-cb7c-4a87-a44a-8ae204f5ba6c/system.xml"::Veeam routes: veeam PUT routes: "before all" hook for "PUT .system-d26a9498-cb7c-4a87-a44a-8ae204f5ba6c/system.xml"
Stack Traces | 0.005s run time
Inaccessible host: `127.0.0.1' at port `8000'. This service may not be available in the `us-east-1' region.
"before each" hook for "should successfully replicate a version"::backbeat routes for replication (same account) "before each" hook for "should successfully replicate a version"
Stack Traces | 0.005s run time
Inaccessible host: `127.0.0.1' at port `8000'. This service may not be available in the `us-east-1' region.
"after all" hook in "backbeat routes"::backbeat routes "after all" hook in "backbeat routes"
Stack Traces | 0.006s run time
Inaccessible host: `127.0.0.1' at port `8000'. This service may not be available in the `us-east-1' region.
should return MethodNotAllowed for invalid request::Veeam routes: veeam invalid requests: should return MethodNotAllowed for invalid request
Stack Traces | 0.01s run time
Cannot read properties of undefined (reading 'statusCode')
should return QuotaExceeded when trying to PutObject in a bucket with quota::quota evaluation with scuba metrics should return QuotaExceeded when trying to PutObject in a bucket with quota
Stack Traces | 0.076s run time
ifError got unwanted exception: socket hang up
should create an encrypted bucket::KMIP backed server-side encryption should create an encrypted bucket
Stack Traces | 0.1s run time
socket hang up
"before all" hook in "backbeat routes"::backbeat routes "before all" hook in "backbeat routes"
Stack Traces | 0.111s run time
read ECONNRESET
should set metrics for multiPartUpload overwrite::utapi v2 metrics incoming and outgoing bytes should set metrics for multiPartUpload overwrite
Stack Traces | 0.144s run time
ifError got unwanted exception: Inaccessible host: `127.0.0.1' at port `8000'. This service may not be available in the `us-east-1' region.
should set metrics for getObject::utapi v2 metrics incoming and outgoing bytes should set metrics for getObject
Stack Traces | 0.154s run time
ifError got unwanted exception: Inaccessible host: `127.0.0.1' at port `8000'. This service may not be available in the `us-east-1' region.
should set metrics in versioned bucket::utapi v2 metrics incoming and outgoing bytes should set metrics in versioned bucket
Stack Traces | 0.187s run time
ifError got unwanted exception: Inaccessible host: `127.0.0.1' at port `8000'. This service may not be available in the `us-east-1' region.
should set metrics for createBucket and deleteBucket::utapi v2 metrics incoming and outgoing bytes should set metrics for createBucket and deleteBucket
Stack Traces | 0.272s run time
ifError got unwanted exception: Inaccessible host: `127.0.0.1' at port `8000'. This service may not be available in the `us-east-1' region.
should set metrics for multiObjectDelete in a versioned bucket::utapi v2 metrics incoming and outgoing bytes should set metrics for multiObjectDelete in a versioned bucket
Stack Traces | 0.351s run time
ifError got unwanted exception: Inaccessible host: `127.0.0.1' at port `8000'. This service may not be available in the `us-east-1' region.
should set metrics for multiObjectDelete::utapi v2 metrics incoming and outgoing bytes should set metrics for multiObjectDelete
Stack Traces | 0.396s run time
ifError got unwanted exception: Inaccessible host: `127.0.0.1' at port `8000'. This service may not be available in the `us-east-1' region.
should set metrics for multipartUpload in a versioned bucket::utapi v2 metrics incoming and outgoing bytes should set metrics for multipartUpload in a versioned bucket
Stack Traces | 0.445s run time
ifError got unwanted exception: Inaccessible host: `127.0.0.1' at port `8000'. This service may not be available in the `us-east-1' region.
should set metrics for multiPartUpload::utapi v2 metrics incoming and outgoing bytes should set metrics for multiPartUpload
Stack Traces | 0.478s run time
ifError got unwanted exception: Inaccessible host: `127.0.0.1' at port `8000'. This service may not be available in the `us-east-1' region.
should not push a metric for a filtered bucket::utapi v2 metrics incoming and outgoing bytes should not push a metric for a filtered bucket
Stack Traces | 0.491s run time
ifError got unwanted exception: Inaccessible host: `127.0.0.1' at port `8000'. This service may not be available in the `us-east-1' region.
should set metrics for copyObject::utapi v2 metrics incoming and outgoing bytes should set metrics for copyObject
Stack Traces | 0.52s run time
ifError got unwanted exception: Inaccessible host: `127.0.0.1' at port `8000'. This service may not be available in the `us-east-1' region.
should set metrics for multipartUpload overwrite in a versioned bucket::utapi v2 metrics incoming and outgoing bytes should set metrics for multipartUpload overwrite in a versioned bucket
Stack Traces | 0.528s run time
ifError got unwanted exception: Inaccessible host: `127.0.0.1' at port `8000'. This service may not be available in the `us-east-1' region.
should set metrics for putObject and deleteObject::utapi v2 metrics incoming and outgoing bytes should set metrics for putObject and deleteObject
Stack Traces | 0.583s run time
ifError got unwanted exception: Inaccessible host: `127.0.0.1' at port `8000'. This service may not be available in the `us-east-1' region.

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

Copy link
Copy Markdown
Contributor

@tcarmet tcarmet left a comment

Choose a reason for hiding this comment

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

LGTM

lib/Config.js Outdated

// Rate limiting uses the same localCache config defined for S3 to avoid config duplication.
// If rate limiting is enabled check to make sure it is also configured.
if (config.rateLimiting?.enabled) {
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.

Any reason why we don't do something like this now?

Suggested change
if (config.rateLimiting?.enabled) {
if (this.rateLimiting.enabled) {

@claude
Copy link
Copy Markdown

claude bot commented Apr 1, 2026

LGTM

Clean refactoring of the rate limiting helpers. The changes to defer interval/bucketSize calculation, unify config format around RequestsPerSecond with Limit/BurstCapacity, add account-level rate limiting support, and switch cleanup from setInterval to recursive setTimeout all look correct. Test coverage is thorough.

Review by Claude Code

code: errors.SlowDown.message,
message: errors.SlowDown.description,
}),
}).default({
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.

The serviceUserArn is required but doesn't appear in the global default value, is it wanted?

Comment on lines -64 to -66
const applyRateLimit = config.rateLimiting?.enabled
&& !rateLimitApiActions.includes(request.apiMethod) // Don't limit any rate limit admin actions
&& !request.isInternalServiceRequest; // Don't limit any calls from internal services
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.

This seems to be done by requestNeedsRateCheck now, but extractAccountRateLimitConfig doesn't call this function, is it expected?


function buildRateChecksFromConfig(resourceClass, resourceId, limitConfig) {
const checks = [];
if (limitConfig?.RequestsPerSecond?.Limit !== undefined && limitConfig.RequestsPerSecond?.Limit > 0) {
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.

Suggested change
if (limitConfig?.RequestsPerSecond?.Limit !== undefined && limitConfig.RequestsPerSecond?.Limit > 0) {
if (limitConfig?.RequestsPerSecond?.Limit > 0) {

@@ -1860,23 +1860,15 @@ class Config extends EventEmitter {
this.enableVeeamRoute = config.enableVeeamRoute;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

parseRateLimitConfig is now called unconditionally, but serviceUserArn is Joi.string().required() in the schema. If a user has { rateLimiting: { enabled: false } } without serviceUserArn, this will now throw. Previously it worked because parseRateLimitConfig was only called when enabled: true.

Fix: in config.js line 178, make serviceUserArn conditionally required:
serviceUserArn: Joi.string().when('enabled', { is: true, then: Joi.required() })

— Claude Code

log.debug('Rate limit cleanup completed', { expiredConfigs, expiredBucketOwners });
}

cleanupTimer = setTimeout(() => cleanupJob(log), rateLimitCleanupInterval);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

cleanupJob recursively calls itself without passing options, so skipUnref is lost after the first run. In production this is harmless (options is always empty), but in tests with skipUnref: true the second and subsequent timeouts will call unref() unexpectedly.

Pass options through: setTimeout(() => cleanupJob(log, options), rateLimitCleanupInterval)

— Claude Code

@claude
Copy link
Copy Markdown

claude bot commented Apr 3, 2026

  • Breaking config change: parseRateLimitConfig is now called unconditionally, but serviceUserArn is Joi.string().required(). Configs with rateLimiting: { enabled: false } and no serviceUserArn will now throw on startup. Previously this worked because parsing was guarded by if (enabled).
    • Make serviceUserArn conditionally required: Joi.string().when('enabled', { is: true, then: Joi.required() })
  • Lost options in recursive cleanup: cleanupJob calls itself without forwarding options, so skipUnref is lost after the first timeout fires.
    • Pass options through: setTimeout(() => cleanupJob(log, options), ...)

Review by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants