-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
aws: rds refresh assertion failure #37752
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Nigel Brittain <[email protected]>
Signed-off-by: Nigel Brittain <[email protected]>
Signed-off-by: Nigel Brittain <[email protected]>
Assigning @suniltheta for a first pass review. |
Signed-off-by: Nigel Brittain <[email protected]>
Signed-off-by: Nigel Brittain <[email protected]>
Signed-off-by: Nigel Brittain <[email protected]>
Signed-off-by: Nigel Brittain <[email protected]>
Signed-off-by: Nigel Brittain <[email protected]>
Signed-off-by: Nigel Brittain <[email protected]>
Signed-off-by: Nigel Brittain <[email protected]>
Signed-off-by: Nigel Brittain <[email protected]>
Signed-off-by: Nigel Brittain <[email protected]>
Signed-off-by: Nigel Brittain <[email protected]>
Signed-off-by: Nigel Brittain <[email protected]>
Signed-off-by: Nigel Brittain <[email protected]>
Signed-off-by: Nigel Brittain <[email protected]>
CC @envoyproxy/api-shepherds: Your approval is needed for changes made to |
Signed-off-by: Nigel Brittain <[email protected]>
source/extensions/filters/http/aws_request_signing/aws_request_signing_filter.h
Show resolved
Hide resolved
source/extensions/filters/http/aws_request_signing/aws_request_signing_filter.cc
Outdated
Show resolved
Hide resolved
Signed-off-by: Nigel Brittain <[email protected]>
Signed-off-by: Nigel Brittain <[email protected]>
Signed-off-by: Nigel Brittain <[email protected]>
Signed-off-by: Nigel Brittain <[email protected]>
Signed-off-by: Nigel Brittain <[email protected]>
Signed-off-by: Nigel Brittain <[email protected]>
} | ||
|
||
if (region.empty()) { | ||
auto region_provider = |
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 do we need a shared_ptr
here? From what I see we neither return region_provider
nor store it.
"AWS region is not set in xDS configuration and failed to retrieve from " | ||
"environment variable or AWS profile/config files."); | ||
} | ||
region = regionOpt.value(); |
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.
Here we assign a value to a local variable, and then return from the function, is that intended?
FilterConfigImpl( | ||
Extensions::Common::Aws::SignerPtr&& signer, | ||
Envoy::Extensions::Common::Aws::CredentialsProviderSharedPtr credentials_provider, | ||
const std::string& stats_prefix, Stats::Scope& scope, const std::string& host_rewrite, |
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.
nit: I'd recommend to use std::string_view
instead of const std::string&
for string parameters. This is also applicable to other methods which take strings as arguments.
// Get the Metadata credentials cache duration. | ||
static std::chrono::seconds getCacheDuration(); | ||
|
||
private: | ||
void createCluster(bool new_timer); | ||
void createCluster(bool new_timer, std::string cluster_name, const envoy::config::cluster::v3::Cluster::DiscoveryType cluster_type, std::string uri ); |
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.
nit: owned std::string
s as parameters.
@@ -81,13 +79,14 @@ class SignerBaseImpl : public Signer, public Logger::Loggable<Logger::Id::aws> { | |||
} | |||
} | |||
|
|||
absl::Status sign(Http::RequestMessage& message, bool sign_body = false, | |||
absl::Status sign(Http::RequestMessage& message, const Credentials credentials, |
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.
Here we use a mix of absl::string_view
and std::string
, would that be possible to use similar types (preferably views)?
Commit Message: Fixes assertion failure during rds refresh with route level extension
Additional Description:
Risk Level: Low
Testing: Unit
Docs Changes: N/A
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue] Fixes customer reported bug
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]