-
Notifications
You must be signed in to change notification settings - Fork 254
Support the new API GetObjectAttributes #6060
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
base: development/9.2
Are you sure you want to change the base?
Support the new API GetObjectAttributes #6060
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 |
❌ 1 Tests Failed:
View the full list of 1 ❄️ flaky test(s)
To view more test analytics, go to the Test Analytics Dashboard |
a7ad5b2 to
023e610
Compare
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.
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", |
Copilot
AI
Jan 26, 2026
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.
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
| rateLimitDefaultBurstCapacity: 1, | ||
| rateLimitCleanupInterval: 10000, // 10 seconds | ||
| // Metadata allowed to be returned by getObjectAttributes API | ||
| allowedObjectAttributes: new Set([ |
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.
Should we handle our custom metadata ?
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.
yes, with the same additional permission @DarkIsDude added for ListObjectv2
→ should be done in a separate PR I guess
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.
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.
As we said, we will not process RestoreStatus but we will add user metadata in another ticket.
| const { errorInstances } = require('arsenal'); | ||
| const { allowedObjectAttributes } = require('../../../../constants'); | ||
|
|
||
| function parseAttributesHeaders(headers) { |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will be updated in another PR (process user metadata in GetObjectAttributes).
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.
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...
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
3b7dddd to
5a3c013
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 |
| rateLimitDefaultBurstCapacity: 1, | ||
| rateLimitCleanupInterval: 10000, // 10 seconds | ||
| // Metadata allowed to be returned by getObjectAttributes API | ||
| allowedObjectAttributes: new Set([ |
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.
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
838227a to
15d2f81
Compare
Issue: CLDSRV-817