-
Notifications
You must be signed in to change notification settings - Fork 19
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
Add new e2e test case for creating GSI's with already existing attributes #88
Add new e2e test case for creating GSI's with already existing attributes #88
Conversation
Hi @joaquinservetto. Thanks for your PR. I'm waiting for a aws-controllers-k8s member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
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.
Thanks you @joaquinservetto !
/ok-to-test
gsi = { | ||
"indexName": "total-bill", | ||
"keySchema": [ | ||
{ | ||
"attributeName": "Total", | ||
"keyType": "HASH", | ||
}, | ||
{ | ||
"attributeName": "Bill", | ||
"keyType": "RANGE", | ||
} | ||
], | ||
"projection": { | ||
"projectionType": "ALL", | ||
} | ||
} |
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.
the controller is not able to patch this gsi and logs the error ValidationException: One or more parameter values were invalid: Both ReadCapacityUnits and WriteCapacityUnits must be specified for index: total-bill
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.
Weird, since It's n on-demand table It should not require the Read and Write capacity to be set, It's the bug that was solved by Julian here. But let me check.
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.
Can you review again? @a-hilaly
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.
Looks good to me and tests are passing, but still wondering why do we need to use a new table here? /cc @Julian-Chu can you please take a look?
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.
@a-hilaly do you mean table_basic_gsi_same_attr
is not needed or combine the new test case into existing test case?
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.
Thank you guys, I'm not an expert either, should I modify the scope then?
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.
Maybe class
or just function
as the scope make more sense here.
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.
withscope="class"
, pytest will cache the fixture for entire class, so if we want table_basic
to return different table name for different methods in a class, like @joaquinservetto mentioned, I think function
is more suitable.
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.
Could you take a look again? @Julian-Chu @a-hilaly
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.
LGTM, my original idea is to reuse table_basic
with function scope. it can be refactored later.
/test all |
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.
Thank you folks!! @joaquinservetto @Julian-Chu !
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: a-hilaly, joaquinservetto, Julian-Chu The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Issue aws-controllers-k8s/community#1920
Description of changes:
Add e2e test for table GSIs