fix: resume token hint no longer affected by --query in text formatter - #10513
Open
luciano-veiga wants to merge 1 commit into
Open
fix: resume token hint no longer affected by --query in text formatter#10513luciano-veiga wants to merge 1 commit into
luciano-veiga wants to merge 1 commit into
Conversation
When using --output text with --query on paginated commands, a spurious 'None' line was printed due to the resume token hint being processed through the JMESPath query expression. The resume token hint is pagination metadata, not part of the result set, so it should bypass --query filtering. Fix by calling text.format_text directly instead of _format_response which applies the --query filter. Fixes aws#10449
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
When using --output text\ with --query\ on paginated commands, the resume token hint (NEXTTOKEN) was incorrectly processed through the JMESPath query expression, resulting in a spurious \None\ line being printed.
The resume token hint is pagination metadata, not part of the result set, so it should bypass --query\ filtering.
Fix
Call \ ext.format_text\ directly instead of _format_response\ when rendering the resume token hint, since _format_response\ applies the --query\ filter.
Related
Fixes #10449
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.