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

dynamodb.table: implement update for global secondary indexes #937

Merged
merged 3 commits into from
Nov 15, 2021

Conversation

muvaf
Copy link
Member

@muvaf muvaf commented Nov 12, 2021

Description of your changes

The diff and update methods aren't generated for that field since its name and type is different in UpdateTableInput from CreateTableInput. So, we had to manually implement the whole mechanism.

Fixes a few small things like getting rid of cmpopts for isUpToDate and making sure we strip off the request ID from v1 SDK errors.

Fixes #927

Note that it turned out ReplicaUpdates is only for GlobalTable resource and it's already implemented.

I have:

  • Read and followed Crossplane's contribution process.
  • Run make reviewable test to ensure this PR is ready for review.

How has this code been tested

Manually with the example YAML by;

  • Create a normal table without Global Secondary Index (GSI).
  • Add a new GSI.
  • Delete the GSI by making that array zero-length.

sergenyalcin and others added 2 commits November 12, 2021 21:19
Signed-off-by: sergenyalcin <yalcinsergen97@gmail.com>
(cherry picked from commit 4cad963)
Signed-off-by: Muvaffak Onus <me@muvaf.com>
@muvaf muvaf requested a review from haarchri November 12, 2021 22:04
@muvaf
Copy link
Member Author

muvaf commented Nov 12, 2021

@stevendborrelli please take a look

Signed-off-by: Muvaffak Onus <me@muvaf.com>
Copy link
Member

@haarchri haarchri left a comment

Choose a reason for hiding this comment

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

tested the Ressource LGTM
thanks for UnitTests

@stevendborrelli
Copy link
Contributor

LGTM!

I have been able to test successfully the following:

  • Create a Table without Global Secondary Index (GSI).
  • Add a GSI & review in the AWS console
  • Delete the GSI & review in the AWS console
  • Delete the Table & review in AWS console

@muvaf muvaf merged commit 5d20519 into crossplane-contrib:master Nov 15, 2021
@muvaf muvaf deleted the dynamofixes branch November 15, 2021 09:00
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.

Implement ReplicaUpdates and GlobalSecondaryIndexUpdates
4 participants