Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
2b9959d
Backbeat functional test adaptation due to aws-sdk migration
benzekrimaha Sep 23, 2025
8332053
fixup lint
benzekrimaha Oct 28, 2025
441bd15
fixup on cleanup issue
benzekrimaha Oct 28, 2025
d7906ae
Back to all tests
benzekrimaha Oct 28, 2025
1322253
fix on final ci
benzekrimaha Oct 28, 2025
825a9df
bump arsenal
benzekrimaha Oct 29, 2025
97c2891
fixup multiple backend failure
benzekrimaha Nov 7, 2025
f3fb68d
fixup s3c-ft-test failure
benzekrimaha Nov 7, 2025
427fe49
fixup s3c-ft-test failure
benzekrimaha Nov 7, 2025
6ad122f
fixup s3c-ft-test failure
benzekrimaha Nov 7, 2025
da08385
fixup s3c-ft-test failure
benzekrimaha Nov 7, 2025
f68299a
fixup s3c-ft-test failure
benzekrimaha Nov 7, 2025
3a8baae
fixup s3c-ft-test failure
benzekrimaha Nov 7, 2025
8ba09a8
fixup s3c-ft-test failure
benzekrimaha Nov 7, 2025
84e43ac
fixup s3c-ft-test failure
benzekrimaha Nov 7, 2025
f928e99
fixup s3c-ft-test failure
benzekrimaha Nov 7, 2025
134fba8
try to log mpu on aws backend
benzekrimaha Nov 12, 2025
7642aef
try to log mpu on aws backend
benzekrimaha Nov 12, 2025
025cb8f
try to log mpu on aws backend
benzekrimaha Nov 12, 2025
748dcd3
[to be removed] debug logs on mpu
benzekrimaha Nov 12, 2025
822969c
[to be removed] debug logs on mpu
benzekrimaha Nov 12, 2025
ba2aeed
[to be removed] debug logs on mpu
benzekrimaha Nov 12, 2025
028a915
[to be removed] debug logs on mpu
benzekrimaha Nov 12, 2025
42353e5
[to be removed] debug logs on mpu
benzekrimaha Nov 12, 2025
e2cea4d
[to be removed] debug logs on mpu
benzekrimaha Nov 12, 2025
5678c66
[to be removed] debug logs on mpu
benzekrimaha Nov 13, 2025
3ab4eae
[to be removed] debug logs on mpu
benzekrimaha Nov 13, 2025
53bd65d
[to be removed] debug logs on mpu
benzekrimaha Nov 13, 2025
410f06e
[to be removed] debug logs on mpu
benzekrimaha Nov 13, 2025
000f2c2
[to be removed] debug logs on mpu
benzekrimaha Nov 13, 2025
bc45925
[to be removed] debug logs on mpu
benzekrimaha Nov 13, 2025
ff30263
[to be removed] debug logs on mpu
benzekrimaha Nov 13, 2025
9870cfd
[to be removed] debug logs on mpu
benzekrimaha Nov 13, 2025
61b132c
[to be removed] debug logs on mpu
benzekrimaha Nov 13, 2025
3e6e017
[to be removed] debug logs on mpu
benzekrimaha Nov 13, 2025
1c2de13
[to be removed] debug logs on mpu
benzekrimaha Nov 13, 2025
59292aa
[to be removed] debug logs on mpu
benzekrimaha Nov 13, 2025
32f5ace
[to be removed] debug logs on mpu
benzekrimaha Nov 13, 2025
614b35a
[to be removed] debug logs on mpu
benzekrimaha Nov 13, 2025
767e1f4
additional files migrated
benzekrimaha Nov 13, 2025
29cdcf5
[to be removed] debug logs on mpu
benzekrimaha Nov 13, 2025
da625b1
[to be removed] debug logs on mpu
benzekrimaha Nov 13, 2025
9e87f03
[to be removed] debug logs on mpu
benzekrimaha Nov 13, 2025
434d705
[to be removed] debug logs on mpu
benzekrimaha Nov 13, 2025
1a1ad15
reenable all multiple backend tests
benzekrimaha Nov 13, 2025
df6cd7c
reenable all multiple backend tests
benzekrimaha Nov 14, 2025
7910ef3
reenable all multiple backend tests
benzekrimaha Nov 14, 2025
deeb0a3
reenable all multiple backend tests
benzekrimaha Nov 14, 2025
0d15c7b
reenable all multiple backend tests
benzekrimaha Nov 14, 2025
9b03b08
lint fixup
benzekrimaha Nov 17, 2025
a610972
test isolation
benzekrimaha Nov 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,8 @@ jobs:
S3_LOCATION_FILE: /usr/src/app/tests/locationConfig/locationConfigTests.json
S3DATA: multiple
S3METADATA: mongodb
AWS_REGION: us-east-1
AWS_DEFAULT_REGION: us-east-1
ENABLE_NULL_VERSION_COMPAT_MODE: true # needed with mongodb backend
JOB_NAME: ${{ github.job }}
steps:
Expand Down
62 changes: 40 additions & 22 deletions examples/node-md-search.js
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}`);
});
1 change: 1 addition & 0 deletions lib/api/listParts.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ function listParts(authInfo, request, log, callback) {
if (maxParts > constants.listingHardLimit) {
maxParts = constants.listingHardLimit;
}

const partNumberMarker =
Number.parseInt(request.query['part-number-marker'], 10) ?
Number.parseInt(request.query['part-number-marker'], 10) : 0;
Expand Down
7 changes: 7 additions & 0 deletions lib/data/wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ if (config.backends.data === 'mem') {
client = new DataFileInterface(config);
implName = 'file';
} else if (config.backends.data === 'multiple') {
Object.keys(config.locationConstraints).filter(k =>
config.locationConstraints[k].type === 'aws_s3'
).map(k => ({
name: k,
region: config.locationConstraints[k].details.region,
https: config.locationConstraints[k].details.https
}));
const clients = parseLC(config, vault);
client = new MultipleBackendGateway(
clients, metadata, locationStorageCheck);
Expand Down
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
},
"homepage": "https://github.com/scality/S3#readme",
"dependencies": {
"@aws-sdk/client-iam": "^3.930.0",
"@aws-sdk/client-s3": "^3.908.0",
"@aws-sdk/client-sts": "^3.930.0",
"@aws-sdk/credential-providers": "^3.864.0",
"@aws-sdk/middleware-retry": "^3.374.0",
"@aws-sdk/protocol-http": "^3.374.0",
Expand All @@ -28,7 +30,7 @@
"@azure/storage-blob": "^12.28.0",
"@hapi/joi": "^17.1.1",
"@smithy/node-http-handler": "^3.0.0",
"arsenal": "git+https://github.com/scality/Arsenal#8.2.35",
"arsenal": "git+https://github.com/scality/Arsenal#cf48ed18c670ce69f14a67beddf31443bf59a628",
"async": "2.6.4",
"bucketclient": "scality/bucketclient#8.2.7",
"bufferutil": "^4.0.8",
Expand Down Expand Up @@ -69,7 +71,7 @@
"istanbul": "^0.4.5",
"istanbul-api": "^3.0.0",
"lolex": "^6.0.0",
"mocha": "^10.8.2",
"mocha": "^11.7.5",
"mocha-junit-reporter": "^2.2.1",
"mocha-multi-reporters": "^1.5.1",
"node-mocks-http": "^1.16.1",
Expand All @@ -89,7 +91,7 @@
"scripts": {
"cloudserver": "S3METADATA=mongodb npm-run-all --parallel start_dataserver start_s3server",
"dev": "nodemon --exec \"yarn run start\"",
"ft_awssdk": "cd tests/functional/aws-node-sdk && mocha --reporter mocha-multi-reporters --reporter-options configFile=$INIT_CWD/tests/reporter-config.json test/ --exit",
"ft_awssdk": "cd tests/functional/aws-node-sdk && mocha --reporter mocha-multi-reporters --reporter-options configFile=$INIT_CWD/tests/reporter-config.json test --exit",
"ft_awssdk_aws": "cd tests/functional/aws-node-sdk && AWS_ON_AIR=true mocha --reporter mocha-multi-reporters --reporter-options configFile=$INIT_CWD/tests/reporter-config.json test/ --exit",
"ft_awssdk_buckets": "cd tests/functional/aws-node-sdk && mocha --reporter mocha-multi-reporters --reporter-options configFile=$INIT_CWD/tests/reporter-config.json test/bucket --exit",
"ft_awssdk_objects_misc": "cd tests/functional/aws-node-sdk && mocha --reporter mocha-multi-reporters --reporter-options configFile=$INIT_CWD/tests/reporter-config.json test/legacy test/object test/service test/support --exit",
Expand Down Expand Up @@ -135,7 +137,7 @@
"test_legacy_location": "CI=true S3QUOTA=scuba S3_LOCATION_FILE=tests/locationConfig/locationConfigLegacy.json S3BACKEND=mem mocha --reporter mocha-multi-reporters --reporter-options configFile=$INIT_CWD/tests/reporter-config.json --recursive tests/unit --exit",
"test_utapi_v2": "mocha --reporter mocha-multi-reporters --reporter-options configFile=$INIT_CWD/tests/reporter-config.json --recursive tests/utapi --exit",
"test_sur": "mocha --reporter mocha-multi-reporters --reporter-options configFile=$INIT_CWD/tests/reporter-config.json --recursive tests/sur --exit",
"multiple_backend_test": "CI=true S3BACKEND=mem S3METADATA=mem S3DATA=multiple mocha --reporter mocha-multi-reporters --reporter-options configFile=$INIT_CWD/tests/reporter-config.json -t 20000 --recursive tests/multipleBackend --exit",
"multiple_backend_test": "CI=true S3BACKEND=mem S3METADATA=mem S3DATA=multiple mocha --reporter mocha-multi-reporters --reporter-options configFile=$INIT_CWD/tests/reporter-config.json -t 20000 --recursive tests/multipleBackend/ --exit",
"cover": "nyc --clean --silent yarn run",
"postcover": "nyc report --report-dir ./coverage/test --reporter=lcov"
}
Expand Down
Loading
Loading