-
Notifications
You must be signed in to change notification settings - Fork 254
Aws sdk v3 migrations #6042
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
Merged
Merged
Aws sdk v3 migrations #6042
Changes from all commits
Commits
Show all changes
129 commits
Select commit
Hold shift + click to select a range
5ecbaaf
utilities adaptation to comply with sdk migration
benzekrimaha fd45184
SUR tests sdk migration
benzekrimaha 532fd7c
UTAPI tests sdk migration
benzekrimaha 5c1fdd2
dependencies install
benzekrimaha 943ba0c
kms tests related code update after sdk migration
benzekrimaha 172e889
dependencies update
benzekrimaha c14d239
delete operation related tests migration
benzekrimaha bfc45c5
get operation related tests migration
benzekrimaha eec0c79
put operation related tests migration
benzekrimaha 6cab547
config adaptation to migration
benzekrimaha d788c64
route related tests migration
benzekrimaha 3324047
complete mpu related tests migration
benzekrimaha 6d7c130
multiple backend related tests migration
benzekrimaha 770e5f3
acl related tests migration
benzekrimaha b5b2dd8
listParts related tests migration
benzekrimaha 71d7c95
objectCopy related tests migration
benzekrimaha af4f95b
objectTagging related tests migration
benzekrimaha c244695
versionning utility migration
benzekrimaha 954f00f
tests utilities migration
benzekrimaha e6a0e37
mpu related tests migration
benzekrimaha 319fafa
cors related tests migration
benzekrimaha 8cae616
get operation related tests migration
benzekrimaha 8dd5a90
copy operation related tests migration
benzekrimaha 0d5f9f1
put operation related tests migration
benzekrimaha d737d0e
delete operation related tests migration
benzekrimaha e3b43ef
website related tests migration
benzekrimaha c1396ac
config migration
benzekrimaha 6f05235
rest of object related tests migration
benzekrimaha 1166011
additional dependencies install
benzekrimaha 3656891
get operation related bucket tests migration
benzekrimaha 966ccdd
delete operation related bucket tests migration
benzekrimaha 67efdd2
put operation related bucket tests migration
benzekrimaha bac5758
other operations related bucket tests migration
benzekrimaha 0f98b4c
quota related bucket tests migration
benzekrimaha 3e2bdfc
dependencies install
benzekrimaha 6862eeb
versionning utilities migration
benzekrimaha 30dc643
object related versionning tests migration
benzekrimaha b8c48cf
bucket related versionning tests migration
benzekrimaha 4b11b09
rest of versionning tests migration
benzekrimaha cd3af77
Search tests adaptation due to aws-sdk migration
benzekrimaha e05e03c
legacy tests adaptation due to aws-sdk migration
benzekrimaha 0fec989
get service functional test service migration
benzekrimaha a1fff68
backbeat functional tests migration
benzekrimaha 91fe932
aws-node-sdk bucket functional tests migration
benzekrimaha 7408990
aws-node-sdk multiple backend tests migration
benzekrimaha 0ff38c1
raw-node gcp object and bucket tests migration
benzekrimaha 1c371b1
routBackbeat migration adaptation
benzekrimaha 03dc295
aws-node-sdk test utils migration
benzekrimaha ac83417
raw-node rest of code migration
benzekrimaha b07e438
rest of code migration
benzekrimaha c2f4c3a
deps install
benzekrimaha 0be0667
add ceph logs in CI for debug purposes in future
benzekrimaha b534e28
commenting out ceph tests from CI
benzekrimaha 3699de7
getlocation functional aws-node-sdk test bucket lint
benzekrimaha b3e16fb
multiple backend aws-node-sdk lint fixup
benzekrimaha 536ef7f
arsenal rebump
benzekrimaha 1af0814
new bucket logging and rate limit tests migration
benzekrimaha 1ce0df8
new bucket logging and rate limit tests migration
benzekrimaha cede1b9
new bucket logging and rate limit tests migration
benzekrimaha 553c156
new bucket logging and rate limit tests migration
benzekrimaha 768b263
latest arsenal bump
benzekrimaha 6c49a49
fixups post reviews
benzekrimaha fc3948c
fixups post reviews
benzekrimaha 5313153
fixups post reviews
benzekrimaha e69198c
post reviews fixups
benzekrimaha eee9699
bump arsenal with latest fixups
benzekrimaha 1d9770c
bump arsenal with latest fixups
benzekrimaha 7e3a81d
bump arsenal with latest fixups
benzekrimaha 4f3c944
bump arsenal with latest fixups
benzekrimaha f9fbace
bump arsenal with latest fixups
benzekrimaha ce181cb
bump arsenal with latest fixups
benzekrimaha 42ed39e
bump arsenal with latest fixups
benzekrimaha 908ba8d
bump arsenal with latest fixups
benzekrimaha e30a7b0
bump arsenal with latest fixups
benzekrimaha c73a9c1
bump arsenal with latest fixups
benzekrimaha 31d137c
bump arsenal with latest fixups
benzekrimaha 80e3e93
fixups post reviews
benzekrimaha 82472d0
fixups post reviews
benzekrimaha 74d7db3
fixups post reviews
benzekrimaha 1783b09
fixups post reviews
benzekrimaha df480a2
fixups post reviews
benzekrimaha 9c8e3d1
fixups post reviews
benzekrimaha 337c4e5
fixups post reviews
benzekrimaha 49c2391
post review fixups
benzekrimaha d69ad15
utilities adaptation to comply with sdk migration
benzekrimaha 35cb779
SUR tests sdk migration
benzekrimaha 9020110
UTAPI tests sdk migration
benzekrimaha 58acf92
dependencies install
benzekrimaha 8e15fd9
kms tests related code update after sdk migration
benzekrimaha ff86e9c
dependencies update
benzekrimaha 66668f5
delete operation related tests migration
benzekrimaha 35e4ba6
get operation related tests migration
benzekrimaha 5c44153
put operation related tests migration
benzekrimaha 888d052
config adaptation to migration
benzekrimaha 8734063
route related tests migration
benzekrimaha e6444a9
complete mpu related tests migration
benzekrimaha 8fd5061
multiple backend related tests migration
benzekrimaha 3c6f0ad
acl related tests migration
benzekrimaha f17060b
listParts related tests migration
benzekrimaha 637dca6
objectCopy related tests migration
benzekrimaha ba804c6
objectTagging related tests migration
benzekrimaha 1bba7d5
versionning utility migration
benzekrimaha b74528b
post reviews fixups
benzekrimaha 409dbc2
tests utilities migration
benzekrimaha 2550830
mpu related tests migration
benzekrimaha 2ce3606
cors related tests migration
benzekrimaha e75adbd
get operation related tests migration
benzekrimaha 630b603
copy operation related tests migration
benzekrimaha 025bff0
put operation related tests migration
benzekrimaha 9eb5777
delete operation related tests migration
benzekrimaha 919334c
website related tests migration
benzekrimaha 34cfeaf
config migration
benzekrimaha c8f535e
rest of object related tests migration
benzekrimaha 6a5ae19
additional dependencies install
benzekrimaha fc23278
fixups post reviews
benzekrimaha 4ce74c1
get operation related bucket tests migration
benzekrimaha f141dbf
delete operation related bucket tests migration
benzekrimaha 3722120
put operation related bucket tests migration
benzekrimaha a133997
other operations related bucket tests migration
benzekrimaha 5015974
quota related bucket tests migration
benzekrimaha fa7eeb2
dependencies install
benzekrimaha 84669aa
fixups post reviews
benzekrimaha 4f2f2f5
Merge remote-tracking branch 'origin/improvement/CLDSRV-724-versionni…
SylvainSenechal fac4ca5
Merge remote-tracking branch 'origin/improvement/CLDSRV-724-mdSearch-…
SylvainSenechal da1ccde
Merge remote-tracking branch 'origin/improvement/CLDSRV-724-legacy-re…
SylvainSenechal b453a76
Merge remote-tracking branch 'origin/improvement/CLDSRV-724-service-g…
SylvainSenechal 7622457
Merge remote-tracking branch 'origin/improvement/CLDSRV-724-backbeat-…
SylvainSenechal 09a2c5f
Aws Sdk V3 migration
SylvainSenechal 21363b6
bump Arsenal to preview 8.3.0-preview.1
SylvainSenechal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,28 +1,46 @@ | ||
| const { S3 } = require('aws-sdk'); | ||
| const { S3Client, ListObjectsCommand } = require('@aws-sdk/client-s3'); | ||
| const { NodeHttpHandler } = require('@smithy/node-http-handler'); | ||
| const http = require('http'); | ||
|
|
||
| const config = { | ||
| sslEnabled: false, | ||
| endpoint: 'http://127.0.0.1:8000', | ||
| signatureCache: false, | ||
| signatureVersion: 'v4', | ||
| region: 'us-east-1', | ||
| s3ForcePathStyle: true, | ||
| accessKeyId: 'accessKey1', | ||
| secretAccessKey: 'verySecretKey1', | ||
| forcePathStyle: true, | ||
| credentials: { | ||
| accessKeyId: 'accessKey1', | ||
| secretAccessKey: 'verySecretKey1', | ||
| }, | ||
| requestHandler: new NodeHttpHandler({ | ||
| httpAgent: new http.Agent({ keepAlive: false }), | ||
| }), | ||
| }; | ||
| const s3Client = new S3(config); | ||
|
|
||
| const encodedSearch = | ||
| encodeURIComponent('x-amz-meta-color="blue"'); | ||
| const req = s3Client.listObjects({ Bucket: 'bucketname' }); | ||
| const s3Client = new S3Client(config); | ||
|
|
||
| const encodedSearch = encodeURIComponent('x-amz-meta-color="blue"'); | ||
|
|
||
| const command = new ListObjectsCommand({ Bucket: 'bucketname' }); | ||
|
|
||
| command.middlewareStack.add( | ||
| next => async args => { | ||
| if (args.request && args.request.path) { | ||
| // eslint-disable-next-line no-param-reassign | ||
| args.request.path = `${args.request.path}?search=${encodedSearch}`; | ||
| } | ||
| return next(args); | ||
| }, | ||
| { | ||
| step: 'build', | ||
| name: 'addSearchParameter', | ||
| priority: 'high' | ||
| } | ||
| ); | ||
|
|
||
| // the build event | ||
| req.on('build', () => { | ||
| req.httpRequest.path = `${req.httpRequest.path}?search=${encodedSearch}`; | ||
| }); | ||
| req.on('success', res => { | ||
| process.stdout.write(`Result ${res.data}`); | ||
| }); | ||
| req.on('error', err => { | ||
| process.stdout.write(`Error ${err}`); | ||
| }); | ||
| req.send(); | ||
| // Send command and handle response | ||
| s3Client.send(command) | ||
| .then(data => { | ||
| process.stdout.write(`Result ${JSON.stringify(data)}`); | ||
| }) | ||
| .catch(err => { | ||
| process.stdout.write(`Error ${err}`); | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This commit :