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

aws: rds refresh assertion failure #37752

Draft
wants to merge 25 commits into
base: main
Choose a base branch
from
Draft

Conversation

nbaws
Copy link
Contributor

@nbaws nbaws commented Dec 19, 2024

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:]

Signed-off-by: Nigel Brittain <[email protected]>
Signed-off-by: Nigel Brittain <[email protected]>
@nbaws nbaws requested a review from mattklein123 as a code owner December 19, 2024 05:24
Signed-off-by: Nigel Brittain <[email protected]>
@adisuissa
Copy link
Contributor

Assigning @suniltheta for a first pass review.
/assign @suniltheta

Signed-off-by: Nigel Brittain <[email protected]>
@nbaws nbaws marked this pull request as draft December 24, 2024 10:31
nbaws added 12 commits December 28, 2024 00:18
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]>
Copy link

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to (api/envoy/|docs/root/api-docs/).
envoyproxy/api-shepherds assignee is @markdroth
CC @envoyproxy/api-watchers: FYI only for changes made to (api/envoy/|docs/root/api-docs/).

🐱

Caused by: #37752 was synchronize by nbaws.

see: more, trace.

Signed-off-by: Nigel Brittain <[email protected]>
Signed-off-by: Nigel Brittain <[email protected]>
nbaws and others added 7 commits January 2, 2025 00:02
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 =
Copy link

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();
Copy link

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,
Copy link

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 );
Copy link

Choose a reason for hiding this comment

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

nit: owned std::strings 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,
Copy link

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)?

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

Successfully merging this pull request may close these issues.

6 participants