-
Notifications
You must be signed in to change notification settings - Fork 254
Improvement/cldsrv 826 #6044
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: development/9.3
Are you sure you want to change the base?
Improvement/cldsrv 826 #6044
Conversation
Hello benzekrimaha,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
|
1ac5fba to
5baf746
Compare
As these functions are only used in GCP tests, we decided to remove them from gcpService. This commit updates the tests accordingly using the new send command directly and enabling us to drop the wrapper functions. Issue: CLDSRV-826
5baf746 to
ea9cb65
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files
@@ Coverage Diff @@
## development/9.3 #6044 +/- ##
===================================================
- Coverage 84.29% 84.26% -0.04%
===================================================
Files 204 204
Lines 12962 12962
===================================================
- Hits 10926 10922 -4
- Misses 2036 2040 +4
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
| return gcpClient.send(command) | ||
| .then(data => callback(null, data)) | ||
| .catch(err => { | ||
| if (err && err.$metadata && err.$metadata.httpStatusCode && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need to check if err exists here. I think err.$metadata.httpstatus code will always be defined.
Probably same for statusCode, gotta call the api once to verify but I feel like we shouldn't have to check if its defined or not
| before(done => { | ||
| config = getRealAwsConfig(credentialOne); | ||
| gcpClient = new GCP(config); | ||
| gcpClient.listObjects = (params, callback) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to understand : this was available in Arsenal GcpService but you just removed it and now you are redefining it in all these files, why not keeping it in Arsenal ? I think the GcpService already has several functions that are used for tests only 🤔
Or is it because you want to reassign the statusCode ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Upon looking : consider updating the gcpClientRetry function : check err.$metadata.statuscode == 429 on top of the existing check err.statusCode == 429.
This way, can keep listObjects in Arsenal. (unless there are other reason I didn't see)
SylvainSenechal
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't forget to use real arsenal version in package json
Just one comment to address about the gcpClient.listObjects, maybe can consider a utility function at least, or even better keep it in Arsenal
Issue: CLDSRV-826