Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
benzekrimaha committed Jun 26, 2024
1 parent ab5d999 commit 8e56989
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 13 deletions.
7 changes: 5 additions & 2 deletions lib/api/apiUtils/object/createAndStoreObject.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,11 @@ function createAndStoreObject(bucketName, bucketMD, objectKey, objMD, authInfo,
metadataStoreParams.oldReplayId = objMD.uploadId;
}

if (objMD?.['content-length'] && !bucket.isVersioningEnabled()) {

Check failure on line 196 in lib/api/apiUtils/object/createAndStoreObject.js

View workflow job for this annotation

GitHub Actions / linting-coverage

'bucket' is not defined
metadataStoreParams.doesNeedOplogUpdate = true;
log.info('WE ARE IN THE ISPUTVERSION TRUE', metadataStoreParams.doesNeedOplogUpdate);
}

/* eslint-disable camelcase */
const dontSkipBackend = externalBackends;
/* eslint-enable camelcase */
Expand Down Expand Up @@ -266,8 +271,6 @@ function createAndStoreObject(bucketName, bucketMD, objectKey, objMD, authInfo,
function getVersioningInfo(infoArr, next) {
// if x-scal-s3-version-id header is specified, we overwrite the object/version metadata.
if (isPutVersion) {
metadataStoreParams.doesNotNeedOpogUpdate = true;
log.info('WE ARE IN THE ISPUTVERSION TRUE', metadataStoreParams.doesNotNeedOpogUpdate);
const options = overwritingVersioning(objMD, metadataStoreParams);
return process.nextTick(() => next(null, options, infoArr));
}
Expand Down
8 changes: 0 additions & 8 deletions lib/api/objectPut.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,7 @@ function objectPut(authInfo, request, streamingV4Params, log, callback) {
return callback(errors.NoSuchBucket);
}

log.trace('object metadata', objMD?.['content-length']);
log.trace('bucket is versionned', bucket.isVersioningEnabled());

if (objMD?.['content-length'] && !bucket.isVersioningEnabled()) {
log.info('WE ARE IN THE OBJMD CONTENT LENGTH');
}

if (isPutVersion) {
log.info('WE ARE IN THE ISPUTVERSION TRUE');
const error = validatePutVersionId(objMD, putVersionId, log);
if (error) {
return callback(error);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"dependencies": {
"@azure/storage-blob": "^12.12.0",
"@hapi/joi": "^17.1.0",
"arsenal": "git+https://github.com/scality/arsenal#0071bd3663002dd6ff0072728acc196e7fdedf50",
"arsenal": "git+https://github.com/scality/arsenal#79a31b15c856856ca29c36049b643551c681d168",
"async": "~2.5.0",
"aws-sdk": "2.905.0",
"bucketclient": "scality/bucketclient#8.1.9",
Expand Down
4 changes: 2 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1040,9 +1040,9 @@ arraybuffer.slice@~0.0.7:
optionalDependencies:
ioctl "^2.0.2"

"arsenal@git+https://github.com/scality/arsenal#0071bd3663002dd6ff0072728acc196e7fdedf50":
"arsenal@git+https://github.com/scality/arsenal#79a31b15c856856ca29c36049b643551c681d168":
version "8.1.131"
resolved "git+https://github.com/scality/arsenal#0071bd3663002dd6ff0072728acc196e7fdedf50"
resolved "git+https://github.com/scality/arsenal#79a31b15c856856ca29c36049b643551c681d168"
dependencies:
"@azure/identity" "^3.1.1"
"@azure/storage-blob" "^12.12.0"
Expand Down

0 comments on commit 8e56989

Please sign in to comment.