Skip to content

Commit ef1653f

Browse files
committed
NC | NSFS | Head object on tagged object does not return x-amz-tagging-count header
Signed-off-by: shirady <[email protected]>
1 parent 5a60fca commit ef1653f

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/sdk/namespace_fs.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2315,6 +2315,10 @@ class NamespaceFS {
23152315
return xattr[XATTR_MD5_KEY];
23162316
}
23172317

2318+
_number_of_tags_fs_xttr(xattr) {
2319+
return Object.keys(xattr).filter(xattr_key => xattr_key.includes(XATTR_NOOBAA_CUSTOM_PREFIX)).length;
2320+
}
2321+
23182322
/**
23192323
* @param {string} bucket
23202324
* @param {string} key
@@ -2335,6 +2339,7 @@ class NamespaceFS {
23352339
mime.getType(key) || 'application/octet-stream';
23362340
const storage_class = s3_utils.parse_storage_class(stat.xattr?.[XATTR_STORAGE_CLASS_KEY]);
23372341
const size = Number(stat.xattr?.[XATTR_DIR_CONTENT] || stat.size);
2342+
const tag_count = stat.xattr ? this._number_of_tags_fs_xttr(stat.xattr) : 0;
23382343

23392344
return {
23402345
obj_id: etag,
@@ -2351,9 +2356,9 @@ class NamespaceFS {
23512356
storage_class,
23522357
restore_status: GlacierBackend.get_restore_status(stat.xattr, new Date(), this._get_file_path({key})),
23532358
xattr: to_xattr(stat.xattr),
2359+
tag_count,
23542360

23552361
// temp:
2356-
tag_count: 0,
23572362
lock_settings: undefined,
23582363
md5_b64: undefined,
23592364
num_parts: undefined,

src/test/system_tests/ceph_s3_tests/s3-tests-lists/nsfs_s3_tests_pending_list.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,6 @@ s3tests_boto3/functional/test_s3.py::test_bucketv2_policy
177177
s3tests_boto3/functional/test_s3.py::test_bucket_policy_another_bucket
178178
s3tests_boto3/functional/test_s3.py::test_bucketv2_policy_another_bucket
179179
s3tests_boto3/functional/test_s3.py::test_get_obj_tagging
180-
s3tests_boto3/functional/test_s3.py::test_get_obj_head_tagging
181180
s3tests_boto3/functional/test_s3.py::test_put_max_tags
182181
s3tests_boto3/functional/test_s3.py::test_bucket_policy_put_obj_s3_noenc
183182
s3tests_boto3/functional/test_s3.py::test_copy_object_ifmatch_failed

0 commit comments

Comments
 (0)