-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Sum DynamoDB ConsumedCapacity across paginated pages (CLI-4199) #10656
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
Open
GarrettBeatty
wants to merge
9
commits into
v2
Choose a base branch
from
cli-4199-consumed-capacity-pagination
base: v2
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
6c01d2f
Sum DynamoDB ConsumedCapacity across paginated pages
GarrettBeatty ef6a0d4
Move DynamoDB ConsumedCapacity paginator config to sdk-extras overlay
GarrettBeatty 1d0f6d0
Harden _deep_add_numeric against cross-page type mismatches
GarrettBeatty 96a5cd4
Let aggregate_numeric_keys supersede non_aggregate_keys for a member
GarrettBeatty 40185cb
Address Copilot review: numeric type coverage, list aliasing, validation
GarrettBeatty 3bc5835
Keep aggregate numeric check aligned with existing (int, float) logic
GarrettBeatty 272070d
Make aggregate_numeric_keys an explicit leaf-name allowlist
GarrettBeatty 9a90268
Make aggregate_numeric_keys strict full-path allowlist with wildcard
GarrettBeatty fcfc1ed
Address Copilot review: defensive guards for aggregate_numeric_keys
GarrettBeatty File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "type": "bugfix", | ||
| "category": "dynamodb", | ||
| "description": "``dynamodb scan`` and ``dynamodb query`` now sum ``ConsumedCapacity`` across all pages when auto-pagination is enabled, instead of reporting only the final page. Includes nested table and secondary-index capacity (fixes CLI-4199)." | ||
| } |
38 changes: 38 additions & 0 deletions
38
awscli/botocore/data/dynamodb/2012-08-10/paginators-1.sdk-extras.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| { | ||
| "merge": { | ||
| "pagination": { | ||
| "Query": { | ||
| "aggregate_numeric_keys": [ | ||
| "ConsumedCapacity.CapacityUnits", | ||
| "ConsumedCapacity.ReadCapacityUnits", | ||
| "ConsumedCapacity.WriteCapacityUnits", | ||
| "ConsumedCapacity.Table.CapacityUnits", | ||
| "ConsumedCapacity.Table.ReadCapacityUnits", | ||
| "ConsumedCapacity.Table.WriteCapacityUnits", | ||
| "ConsumedCapacity.GlobalSecondaryIndexes.*.CapacityUnits", | ||
| "ConsumedCapacity.GlobalSecondaryIndexes.*.ReadCapacityUnits", | ||
| "ConsumedCapacity.GlobalSecondaryIndexes.*.WriteCapacityUnits", | ||
| "ConsumedCapacity.LocalSecondaryIndexes.*.CapacityUnits", | ||
| "ConsumedCapacity.LocalSecondaryIndexes.*.ReadCapacityUnits", | ||
| "ConsumedCapacity.LocalSecondaryIndexes.*.WriteCapacityUnits" | ||
| ] | ||
| }, | ||
| "Scan": { | ||
| "aggregate_numeric_keys": [ | ||
| "ConsumedCapacity.CapacityUnits", | ||
| "ConsumedCapacity.ReadCapacityUnits", | ||
| "ConsumedCapacity.WriteCapacityUnits", | ||
| "ConsumedCapacity.Table.CapacityUnits", | ||
| "ConsumedCapacity.Table.ReadCapacityUnits", | ||
| "ConsumedCapacity.Table.WriteCapacityUnits", | ||
| "ConsumedCapacity.GlobalSecondaryIndexes.*.CapacityUnits", | ||
| "ConsumedCapacity.GlobalSecondaryIndexes.*.ReadCapacityUnits", | ||
| "ConsumedCapacity.GlobalSecondaryIndexes.*.WriteCapacityUnits", | ||
| "ConsumedCapacity.LocalSecondaryIndexes.*.CapacityUnits", | ||
| "ConsumedCapacity.LocalSecondaryIndexes.*.ReadCapacityUnits", | ||
| "ConsumedCapacity.LocalSecondaryIndexes.*.WriteCapacityUnits" | ||
| ] | ||
| } | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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 reason for making this new field is because i think the
non_aggregate_keysfield in the regular paginators.json is somehow generated. i did not touch that since it may be overwritten by a new model change.the other reason is since we need engine changes anyway to support the GSI/LSI summation, a new key seemed more safe.
the only "weird" part of this implementation is that we just need to know that
aggregate_numeric_keystakes precedence overnon_aggregate_keysnow