Support the new API GetObjectAttributes#6060
Support the new API GetObjectAttributes#6060maeldonn wants to merge 7 commits intofeature/CLDSRV-813/optional-attributes-responsefrom
Conversation
Hello maeldonn,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
@@ Coverage Diff @@
## feature/CLDSRV-813/optional-attributes-response #6060 +/- ##
===================================================================================
+ Coverage 83.79% 83.87% +0.07%
===================================================================================
Files 191 193 +2
Lines 12350 12429 +79
===================================================================================
+ Hits 10349 10425 +76
- Misses 2001 2004 +3
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
a7ad5b2 to
023e610
Compare
There was a problem hiding this comment.
Pull request overview
This pull request adds support for the AWS S3 GetObjectAttributes API, which allows clients to retrieve object metadata without downloading the object itself. The implementation includes comprehensive unit and functional tests, a new API endpoint, header parsing utilities, and updates the Arsenal dependency to include the required support for this feature.
Changes:
- Implements the GetObjectAttributes API endpoint with support for retrieving ETag, StorageClass, ObjectSize, ObjectParts, and Checksum attributes
- Adds header parsing utility to validate and parse the x-amz-object-attributes header
- Includes comprehensive unit and functional tests covering success cases, error conditions, and versioning scenarios
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Updates Arsenal dependency to feature branch and increments version to 9.2.22 |
| yarn.lock | Updates Arsenal lockfile entry to match feature branch reference |
| lib/api/objectGetAttributes.js | New API implementation for GetObjectAttributes with versioning and delete marker support |
| lib/api/apiUtils/object/parseAttributesHeader.js | New utility to parse and validate x-amz-object-attributes header |
| lib/api/api.js | Registers the new objectGetAttributes API method |
| constants.js | Adds allowedObjectAttributes Set defining valid attribute names |
| tests/unit/api/objectGetAttributes.js | Unit tests covering API functionality, error cases, and versioning |
| tests/unit/api/apiUtils/object/parseAttributesHeader.js | Unit tests for header parsing utility |
| tests/functional/aws-node-sdk/test/object/objectGetAttributes.js | Functional tests using AWS SDK |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "@azure/storage-blob": "^12.28.0", | ||
| "@hapi/joi": "^17.1.1", | ||
| "arsenal": "git+https://github.com/scality/Arsenal#8.2.43", | ||
| "arsenal": "git+https://github.com/scality/Arsenal#feature/ARSN-549/get-object-attributes", |
There was a problem hiding this comment.
Arsenal dependency points to a feature branch instead of a released version. The package.json and yarn.lock reference 'git+https://github.com/scality/Arsenal#feature/ARSN-549/get-object-attributes' rather than a stable release tag. Before merging this PR, the Arsenal dependency should be updated to point to a proper release version to avoid dependency management issues and ensure stability in production environments.
| "arsenal": "git+https://github.com/scality/Arsenal#feature/ARSN-549/get-object-attributes", | |
| "arsenal": "git+https://github.com/scality/Arsenal#8.2.0", |
tests/functional/aws-node-sdk/test/object/objectGetAttributes.js
Outdated
Show resolved
Hide resolved
| const { errorInstances } = require('arsenal'); | ||
| const { allowedObjectAttributes } = require('../../../../constants'); | ||
|
|
||
| function parseAttributesHeaders(headers) { |
There was a problem hiding this comment.
there is already a very similar function in @DarkIsDude PR, which efficiently handles validation & parsing: should we not "merge" both code (i.e. typically make your code extend his) ?
There was a problem hiding this comment.
Will be updated in another PR (process user metadata in GetObjectAttributes).
There was a problem hiding this comment.
why? it means we are duplicating the code now instead of just rebasing this PR on top of the other and handling it just once...
There was a problem hiding this comment.
Because user metadata is already handled in the listObjectV2 API. That's not the case here. That would take me to an intermediate step where I should add unnecessary complexity....
Edit: Done here
tests/functional/aws-node-sdk/test/object/objectGetAttributes.js
Outdated
Show resolved
Hide resolved
tests/functional/aws-node-sdk/test/object/objectGetAttributes.js
Outdated
Show resolved
Hide resolved
tests/functional/aws-node-sdk/test/object/objectGetAttributes.js
Outdated
Show resolved
Hide resolved
d9b4211 to
3b7dddd
Compare
5a3c013 to
23f1c1c
Compare
Incorrect fix versionThe
Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:
Please check the |
tests/functional/aws-node-sdk/test/object/objectGetAttributes.js
Outdated
Show resolved
Hide resolved
tests/functional/aws-node-sdk/test/object/objectGetAttributes.js
Outdated
Show resolved
Hide resolved
tests/functional/aws-node-sdk/test/versioning/objectGetAttributes.js
Outdated
Show resolved
Hide resolved
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 |
c45c894 to
838227a
Compare
15d2f81 to
4f53e68
Compare
0a62a7f to
5d7b2d5
Compare
62c1ce8 to
66a8264
Compare
64cd8a1 to
4a72a6d
Compare
4a72a6d to
92bd9be
Compare
Issue: CLDSRV-817