🎨 Async/Await migration on bucketGet and objectGetLegalHold#6045
🎨 Async/Await migration on bucketGet and objectGetLegalHold#6045DarkIsDude wants to merge 5 commits intofeature/CLDSRV-823/formatting-onlyfrom
Conversation
Hello darkisdude,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
Incorrect fix versionThe
Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:
Please check the |
Codecov Report❌ Patch coverage is
Additional details and impacted files
... and 1 file with indirect coverage changes @@ Coverage Diff @@
## feature/CLDSRV-823/formatting-only #6045 +/- ##
===================================================================
Coverage 84.45% 84.45%
===================================================================
Files 206 206
Lines 13164 13186 +22
===================================================================
+ Hits 11117 11136 +19
- Misses 2047 2050 +3
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
16402cf to
4e7d644
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 |
Incorrect fix versionThe
Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:
Please check the |
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 |
Incorrect fix versionThe
Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:
Please check the |
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 |
bafa722 to
08d8dc0
Compare
Incorrect fix versionThe
Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:
Please check the |
Incorrect fix versionThe
Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:
Please check the |
Branches have divergedThis pull request's source branch To avoid any integration risks, please re-synchronize them using one of the
Note: If you choose to rebase, you may have to ask me to rebuild |
2196def to
250de6f
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 |
474bad8 to
7a14efc
Compare
7a14efc to
c98d577
Compare
c98d577 to
4f6b182
Compare
d6342e9 to
7559941
Compare
7559941 to
99b9108
Compare
872cfa3 to
7bed447
Compare
| standardMetadataValidateBucket(metadataValParams, request.actionImplicitDenies, log, (err, bucket) => { | ||
| const corsHeaders = collectCorsHeaders(request.headers.origin, request.method, bucket); | ||
| let error; | ||
| let bucket; |
There was a problem hiding this comment.
bucket will not be set in case standardMetadataValidateBucketPromised throws:
- is it already the behavior of standardMetadataValidateBucketPromised' continuation callback, or did it always provide the
bucket? In that case promisify does not work... 😢 - does
collectCorsHeaderswork when bucket is not provider?
There was a problem hiding this comment.
That's a good question. I remember encounter an issue with that some weeks (not for this PR).
The answer can be found inside the collectCorsHeaders:
// NOTE: Because collecting CORS headers requires making a call to
// metadata to retrieve the bucket's CORS configuration, we opt not to
// return the CORS headers if the request encounters an error before
// the api method retrieves the bucket from metadata (an example
// being if a request is not properly authenticated). This is a slight
// deviation from AWS compatibility, but has the benefit of avoiding
// additional backend calls for an invalid request. Also, we anticipate
// that the preflight OPTIONS route will serve most client needs regarding
// CORS.
if (!origin || !bucket) {
return {};
}
So the answer is yes, collectCorsHeaders will continue to work but no CORS will be returned. So I'm not sure to understand your first point. The bucket will be defined the same as before (can be, if all goes right), and will not if we have an error. Can you help me to clarify 🙏 ?
Issue: CLDSRV-823
Description
Motivation and context
Opening a first PR to migrate from callback to async/await syntax. A TAD is opened.
https://scality.atlassian.net/wiki/spaces/OS/pages/3523346468/2025-10-30+-+Async+Await+migration
This is a first PR to start the migration. As mention in the TAD, the idea is to migrate to async/await when working on a specific part of our component. Maybe a common goal of one PR per squad per sprint is a good idea.
All idea or remarks are welcome 🙏