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

Handle PropertyConverter if DisableFetchingTableMetadata is used #3304

Conversation

Dreamescaper
Copy link
Contributor

Description

Fixes #3303

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project
  • My change requires a change to the documentation
  • I have updated the documentation accordingly
  • I have read the README document
  • I have added tests to cover my changes
  • All new and existing tests passed

License

  • I confirm that this pull request can be released under the Apache 2 license

@Dreamescaper
Copy link
Contributor Author

I wanted to write an intergation test, but probably I need help here. Is there any way to run them locally, e.g. via DynamoDbLocal?

@dscpinheiro dscpinheiro changed the base branch from main to main-staging April 26, 2024 15:16
@dscpinheiro
Copy link
Contributor

Yes, you can run them locally by opening the service specific solution (sdk\src\Services\DynamoDBv2\DynamoDBv2.sln), but the SDK integration tests always run targeting actual AWS services.

The existing tests for DisableFetchingTableMetadata are in this file: https://github.com/aws/aws-sdk-net/blob/b5b386ac678bd3aeacaf7a11681bf246565dc592/sdk/test/Services/DynamoDBv2/IntegrationTests/DataModelTests.cs

@Dreamescaper
Copy link
Contributor Author

@dscpinheiro
Don't I need some AWS credentials to run them?

@dscpinheiro
Copy link
Contributor

Yes, it's called out in the README (although I see it's not exactly easy to find...): https://github.com/aws/aws-sdk-net?tab=readme-ov-file#tests

Integration tests can be found in the AWSSDK.IntegrationTests project. These test assume that a default profile has been configured for credentials. For information about setting up a default profile read the Developer Guide.

@@ -532,7 +545,7 @@ internal static Table CreateTableFromItemStorageConfig(IAmazonDynamoDB client, T

table.Attributes.Add(new AttributeDefinition { AttributeName = property.AttributeName, AttributeType = PrimitiveToScalar(primitiveType) });
}

Copy link
Contributor

Choose a reason for hiding this comment

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

It would be great if the SDK had editor config support to highlight these // @normj

Copy link
Member

@ashovlin ashovlin left a comment

Choose a reason for hiding this comment

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

Looks good functionally, but one comment on the new test

ashovlin added a commit that referenced this pull request May 1, 2024
@ashovlin
Copy link
Member

ashovlin commented May 1, 2024

This looks good, and passed on our internal build system. I've prepared the versioning metadata in #3310 , and will line up a second reviewer from the team.

@ashovlin ashovlin merged commit 7c30c18 into aws:main-staging May 1, 2024
1 check passed
ashovlin added a commit that referenced this pull request May 1, 2024
@ashovlin
Copy link
Member

ashovlin commented May 1, 2024

Merged to our staging branch. This should go out in today's release, will reply again with the version number once it's finished.

@ashovlin
Copy link
Member

ashovlin commented May 2, 2024

This shipped yesterday in AWSSDK.DynamoDBv2 version 3.7.302.26. Thanks again for your contribution!

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.

DisableFetchingTableMetadata leads to key exception if PropertyConverter is used
4 participants