CLDSRV-805: Fix flaky GCP tests due to rate limit#6111
CLDSRV-805: Fix flaky GCP tests due to rate limit#6111bert-e merged 8 commits intodevelopment/9.3from
Conversation
Hello bourgoismickael,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
| async.mapLimit( | ||
| createdObjects, | ||
| 10, | ||
| async object => gcpClient.send(new PutObjectCommand({ |
There was a problem hiding this comment.
The populateBucket and removeObjects helpers call gcpClient.send() directly without gcpRetry. If a PutObjectCommand or DeleteObjectCommand hits a SlowDown/429 during setup/teardown, the test will still fail. Consider wrapping these calls with gcpRetry to match the PR goal of fixing rate-limit flakiness.
--- Claude Code
There was a problem hiding this comment.
This is a copy of existing code to another file
|
bucket.js populateBucket (line 74) and removeObjects (line 93) call gcpClient.send() directly without gcpRetry. These setup and teardown helpers are still vulnerable to SlowDown and 429 errors. Wrap with gcpRetry inside these helpers. Review by Claude Code |
❌ 2 Tests Failed:
View the full list of 2 ❄️ flaky test(s)
To view more test analytics, go to the Test Analytics Dashboard |
|
LGTM |
af90065 to
d4596ba
Compare
Request integration branchesWaiting for integration branch creation to be requested by the user. To request integration branches, please comment on this pull request with the following command: Alternatively, the |
| Key: badObjectKey, | ||
| }, err => { | ||
| assert(err); | ||
| assert.strictEqual(err.$metadata.httpStatusCode, 404); |
There was a problem hiding this comment.
Missing optional chaining on err.$metadata. If $metadata is undefined this will throw a TypeError. Use err.$metadata?.httpStatusCode like line 123 does.
Same issue on lines 225 and 244.
— Claude Code
There was a problem hiding this comment.
Copied from existing code as is
| Bucket: bucketName, | ||
| Key: this.test.key, | ||
| }, (err, res) => { | ||
| assert.notStrictEqual(res.VersionId, this.test.uploadId); |
There was a problem hiding this comment.
Missing error check. If putObject fails, res will be undefined and res.VersionId will throw a TypeError. Add an assert.equal(err, null) check before accessing res.
— Claude Code
There was a problem hiding this comment.
Copied from existing code as is
| assert.strictEqual(err.$metadata.httpStatusCode, 404); | ||
| resolve(); | ||
| }); | ||
| }); |
There was a problem hiding this comment.
If the assertion fails, the Promise is never settled (no reject call), so the test hangs until timeout instead of reporting the assertion error. Either wrap assertions in try/catch with reject, or use the done callback pattern like the GET Object 404 test at line 116.
— Claude Code
There was a problem hiding this comment.
Copied from existing code as is
Review by Claude Code |
Because default retries can go up to 63s total wait time
Head tests where twice in head and get file. Regroup in 1 file for 1 bucket for both tests kind to reduce GCP quota pressure
Exact same test in 2 different files regrouped. Using 1 bucket on test suite to reduce gcp quota pressure
Regroup copy, delete, get, head, put into an object.js file Using 1 bucket on test suite to reduce gcp quota pressure
Using 1 bucket on test suite to reduce gcp quota pressure
d4596ba to
5f1edfe
Compare
|
LGTM |
|
/approve |
Integration data createdI have created the integration data for the additional destination branches.
The following branches will NOT be impacted:
You can set option The following options are set: approve |
|
I have successfully merged the changeset of this pull request
The following branches have NOT changed:
Please check the status of the associated issue CLDSRV-805. Goodbye bourgoismickael. The following options are set: approve |
Fix GCP bucket rate related issues by:
bucket:head.js, get.js->bucket.jsbucket:getVersioning.js,putVersioning.js->versioning.jsobject:head.js,get.js,put.js,delete.js,copy.js->object.jsobject:putTagging.js,getTagging.js,deleteTagging.js->tagging.jsThis reduces the number of buckets created across a full GCP test run from 21 to 12 (-9 buckets, -43%)