feat(services/cos): Added user metadata support for cos service#5510
Merged
Xuanwo merged 14 commits intoapache:mainfrom Jan 13, 2025
Merged
feat(services/cos): Added user metadata support for cos service#5510Xuanwo merged 14 commits intoapache:mainfrom
Xuanwo merged 14 commits intoapache:mainfrom
Conversation
Contributor
Author
|
@Xuanwo can you plz look into this PR. |
Xuanwo
reviewed
Jan 6, 2025
core/src/services/cos/core.rs
Outdated
| if let Some(user_metadata) = args.user_metadata() { | ||
| for (key, value) in user_metadata { | ||
| // before insert user defined metadata header, add prefix to the header name | ||
| if !self.check_user_metadata_key(key) { |
Member
There was a problem hiding this comment.
Hi, I'm not sure if it's a good idea to check user's metadata key. Let's skip it.
core/src/services/cos/core.rs
Outdated
| /// # Notes | ||
| /// | ||
| /// before return the user defined metadata, we'll strip the user_metadata_prefix from the key | ||
| pub fn parse_metadata(&self, path: &str, headers: &HeaderMap) -> Result<Metadata> { |
Member
There was a problem hiding this comment.
I think this function might be slightly overengineered.
Contributor
Author
There was a problem hiding this comment.
What do you mean by overengineered? What do I need to change in this fn?
Member
There was a problem hiding this comment.
Hi, I would like to remove this function and expand it instead.
17 tasks
Contributor
Author
|
@Xuanwo I have made the changes that you suggested. |
Xuanwo
approved these changes
Jan 13, 2025
Member
Xuanwo
left a comment
There was a problem hiding this comment.
Thank you @geetanshjuneja for working on this!
Signed-off-by: Xuanwo <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Closes cos service task for #4842 .
Rationale for this change
What changes are included in this PR?
Are there any user-facing changes?