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

fix: ignore errors on duplicate SetHeader calls #11

Merged
merged 1 commit into from
Jun 6, 2022

Conversation

smira
Copy link
Member

@smira smira commented Jun 6, 2022

Updating gRPC library to 1.47 version makes it more picky about the
duplicate calls to SetHeader. Due to the nature of proxying, we might
try to set it multiple times, so simply ignore the error (doing best
effort to set it correctly, but with multiple upstreams setting headers
from all upstreams is not possible).

Signed-off-by: Andrey Smirnov andrey.smirnov@talos-systems.com

Updating gRPC library to 1.47 version makes it more picky about the
duplicate calls to `SetHeader`. Due to the nature of proxying, we might
try to set it multiple times, so simply ignore the error (doing best
effort to set it correctly, but with multiple upstreams setting headers
from all upstreams is not possible).

Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
return fmt.Errorf("error setting headers from client %s: %w", src.backend, err)
}

dst.SetHeader(md) //nolint:errcheck // ignore errors, as we might try to set headers multiple times
Copy link
Member Author

Choose a reason for hiding this comment

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

this is the actual change, everything else is just unrelated Kres updates/linting fixes ❗

@smira
Copy link
Member Author

smira commented Jun 6, 2022

/m

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

Successfully merging this pull request may close these issues.

None yet

3 participants