-
Notifications
You must be signed in to change notification settings - Fork 814
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
Docstore/awsdynamodb: Supporting the AWS V2 SDK #3519
base: master
Are you sure you want to change the base?
Conversation
…erences to aws sdk v2
…zation and changed error type
…es, returning that concrete type to avoid unnecessary type assertion
…eatable outside of CI
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
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.
We appreciate the effort you put into this. However, there is a lot of changed code here, including at least two breaking changes. How does the docstore user benefit from the switch to the new API?
Note that the breaking changes are unlikely to be approved, because they would require a v2 of the main module.
@@ -36,6 +37,7 @@ aws dynamodb create-table \ | |||
# The docstore-test-2 table has both a partition and a sort key, and two indexes. | |||
|
|||
aws dynamodb create-table \ | |||
--region us-east-2 \ |
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 is this line different?
@@ -75,8 +69,6 @@ const Scheme = "dynamodb" | |||
// See https://godoc.org/gocloud.dev/aws#ConfigFromURLParams for supported query | |||
// parameters for overriding the aws.Session from the URL. | |||
type URLOpener struct { | |||
// ConfigProvider must be set to a non-nil 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.
This is a breaking change.
if err != nil { | ||
return nil, "", "", "", nil, fmt.Errorf("open collection %s: %v", u, err) | ||
} | ||
return db, tableName, partitionKey, sortKey, opts, nil | ||
} | ||
|
||
// Dial gets an AWS DynamoDB service client. | ||
func Dial(p client.ConfigProvider) (*dyn.DynamoDB, error) { | ||
if p == nil { | ||
func Dial(p aws.Config) (*dyn.Client, error) { |
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.
This is a breaking change.
Resolved #3458
A somewhat quick and dirty conversion to using the AWS V2 SDK rather than the deprecated V1.
Due to the delays in my finding time to work on this I prioritised getting the functionality migrated to mitigate any risk from API drift form the deprecated V1 SDK.
The main sections that warrant further discussion:
V2ConfigFromURLParams
, but is worth review