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

Swap dynamo client to use a smithy base class #3091

Merged
merged 1 commit into from
Sep 18, 2024
Merged

Conversation

sbiscigl
Copy link
Contributor

@sbiscigl sbiscigl commented Aug 27, 2024

Description of changes:

Per the work to move to a more common architecture between different AWS SDKs. This moves the Dynamo DBClient to use the smithy identity based flow instead of the legacy workflow,

Examples other SDKs updating their flow:

Check all that applies:

  • Did a review by yourself.
  • Added proper tests to cover this PR. (If tests are not applicable, explain.)
  • Checked if this PR is a breaking (APIs have been changed) change.
  • Checked if this PR will not introduce cross-platform inconsistent behavior.
  • Checked if this PR would require a ReadMe/Wiki update.

Check which platforms you have built SDK on to verify the correctness of this PR.

  • Linux
  • Windows
  • Android
  • MacOS
  • IOS
  • Other Platforms

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@sbiscigl sbiscigl force-pushed the dynamo-smithy-client branch 14 times, most recently from 48f610e to fa6e55e Compare September 10, 2024 14:56
@sbiscigl sbiscigl force-pushed the dynamo-smithy-client branch 2 times, most recently from 5e6aea9 to e43541c Compare September 16, 2024 19:40
@sbiscigl sbiscigl marked this pull request as ready for review September 17, 2024 15:50

namespace Aws
{
namespace DynamoDB
{
AWS_DYNAMODB_API extern const char SERVICE_NAME[];
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: do we do it in other places? should we hide this behind a helper returning a ref to this?

Copy link
Contributor

Choose a reason for hiding this comment

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

i see its used below?
something like constexpr char str[] = "foo"; wouldnt work here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good call

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this actually leads to gcc errors about odr

aws-sdk-cpp/generated/src/aws-cpp-sdk-dynamodb/include/aws/dynamodb/DynamoDBClient.h:39:26: error: 'Aws::DynamoDB::DynamoDBClient' has a field 'Aws::DynamoDB::DynamoDBClient::' whose type uses the anonymous namespace [-Werror=subobject-linkage]
--
1223 | class AWS_DYNAMODB_API DynamoDBClient : smithy::client::AwsSmithyClientT<Aws::DynamoDB::SERVICE_NAME,
1224 | ^~~~~~~~~~~~~~
1225 | aws-sdk-cpp/generated/src/aws-cpp-sdk-dynamodb/include/aws/dynamodb/DynamoDBClient.h:39:26: error: 'Aws::DynamoDB::DynamoDBClient' has a base 'smithy::client::AwsSmithyClientT<(& Aws::DynamoDB::SERVICE_NAME), Aws::DynamoDB::DynamoDBClientConfiguration, smithy::SigV4AuthSchemeResolver<>, Aws::Crt::Variantsmithy::SigV4AuthScheme, Aws::Endpoint::EndpointProviderBase<Aws::DynamoDB::DynamoDBClientConfiguration, Aws::DynamoDB::Endpoint::DynamoDBBuiltInParameters, Aws::Endpoint::ClientContextParameters>, smithy::client::JsonOutcomeSerializer, Aws::Utils::Outcome<Aws::AmazonWebServiceResultAws::Utils::Json::JsonValue, Aws::Client::AWSErrorAws::Client::CoreErrors > >' whose type uses the anonymous namespace [-Werror=subobject-linkage]
1226 | cc1plus: all warnings being treated as errors
1227 | [618/2688] Building CXX object generated/src/a

we ran into other things like this, and just looking around, i think it boils down to "we cant have the deifnition in a header"

@sbiscigl sbiscigl merged commit 732c1fc into main Sep 18, 2024
4 checks passed
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.

3 participants