Skip to content
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

feat(services/cos): Added user metadata support for cos service #5510

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

geetanshjuneja
Copy link
Contributor

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?

@geetanshjuneja
Copy link
Contributor Author

@Xuanwo can you plz look into this PR.

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) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, I'm not sure if it's a good idea to check user's metadata key. Let's skip it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

/// # 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> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this function might be slightly overengineered.

Copy link
Contributor Author

@geetanshjuneja geetanshjuneja Jan 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean by overengineered? What do I need to change in this fn?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, I would like to remove this function and expand it instead.

@geetanshjuneja
Copy link
Contributor Author

@Xuanwo I have made the changes that you suggested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants