Skip to content

impr(CLDSRV-855): Update rate limit post check#6129

Open
tmacro wants to merge 3 commits intoimprovement/CLDSRV-855/update_helpersfrom
improvement/CLDSRV-855/update_rate_limit_postcheck
Open

impr(CLDSRV-855): Update rate limit post check#6129
tmacro wants to merge 3 commits intoimprovement/CLDSRV-855/update_helpersfrom
improvement/CLDSRV-855/update_rate_limit_postcheck

Conversation

@tmacro
Copy link
Copy Markdown
Contributor

@tmacro tmacro commented Apr 1, 2026

No description provided.

@@ -249,60 +252,61 @@ function validateBucket(bucket, params, log, actionImplicitDenies = {}) {
* @param {function} callback - Callback(err) - err if rate limited, null if allowed
* @returns {undefined}
*/
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

JSDoc is stale — still documents the old (bucket, bucketName, request, log, callback) signature. Should be updated to match the new (request, authInfo, bucketMD, log, callback) params and mention rateLimitBucketAlreadyChecked/rateLimitAccountAlreadyChecked instead of rateLimitAlreadyChecked.

— Claude Code

@claude
Copy link
Copy Markdown

claude bot commented Apr 1, 2026

  • JSDoc for checkRateLimitIfNeeded is stale — still documents the old (bucket, bucketName, request, log, callback) signature and references rateLimitAlreadyChecked. Should be updated for the new params and split flags.

    Review by Claude Code

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 1, 2026

❌ 51 Tests Failed:

Tests completed Failed Passed Skipped
7558 51 7507 0
View the top 3 failed test(s) by shortest run time
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 | 0s run time
connect ECONNREFUSED 127.0.0.1:8000
"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.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 "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.
"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.001s 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.001s 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.001s 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.001s 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.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 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.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 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 allow writes after deleting data with quotas below the current number of inflights::quota evaluation with scuba metrics should allow writes after deleting data with quotas below the current number of inflights
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 allow writes after multi-deleting data with quotas below the current number of inflights::quota evaluation with scuba metrics should allow writes after multi-deleting data with quotas below the current number of inflights
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 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 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.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 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.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 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.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 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.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 reduce inflights when completing MPU with fewer parts than uploaded::quota evaluation with scuba metrics should reduce inflights when completing MPU with fewer parts than uploaded
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 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 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.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.
"after all" hook in "backbeat routes"::backbeat routes "after all" hook in "backbeat routes"
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 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.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 "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.002s run time
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 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 reduce inflights when aborting MPU::quota evaluation with scuba metrics should reduce inflights when aborting MPU
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 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.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.
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 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.067s run time
ifError got unwanted exception: socket hang up
"before all" hook in "backbeat routes"::backbeat routes "before all" hook in "backbeat routes"
Stack Traces | 0.084s run time
read ECONNRESET
should create an encrypted bucket::KMIP backed server-side encryption should create an encrypted bucket
Stack Traces | 0.096s run time
socket hang up
should set metrics for getObject::utapi v2 metrics incoming and outgoing bytes should set metrics for getObject
Stack Traces | 0.189s 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.196s 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::utapi v2 metrics incoming and outgoing bytes should set metrics for multiPartUpload overwrite
Stack Traces | 0.202s 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.231s 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.337s 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.358s 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.398s 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.426s 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.432s 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.459s 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.463s 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.615s 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.

* @param {string} bucketName - Bucket name
* @param {object} request - Request object with rateLimitAlreadyChecked tracker
* @param {object} request - Request object
* @param {string} authInfo - AuthInfo class instance, requester's info
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

JSDoc type is wrong: {string} should be {AuthInfo} since authInfo is used as an object (.getCanonicalID() is called on it).

```suggestion

  • @param {AuthInfo} authInfo - AuthInfo class instance, requester's info

@claude
Copy link
Copy Markdown

claude bot commented Apr 1, 2026

  • JSDoc type mismatch (lib/metadata/metadataUtils.js:249): @param {string} authInfo should be @param {AuthInfo} authInfo
    • authInfo.getCanonicalID() is called on it — it's an object, not a string

Review by Claude Code

@claude
Copy link
Copy Markdown

claude bot commented Apr 3, 2026

LGTM

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.

3 participants