-
Notifications
You must be signed in to change notification settings - Fork 15
fix: change jmespath single value behavior #407
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
base: 0.15
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #407 +/- ##
=======================================
Coverage 98.21% 98.21%
=======================================
Files 152 152
Lines 5986 5989 +3
=======================================
+ Hits 5879 5882 +3
Misses 107 107
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| return None | ||
| if len(result) == 1: | ||
| return result[0] | ||
| return list(result) |
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.
Conversation with Jon, the code for single value and search should be merged to have direct identification of whether the data is coming in as a list and using that knowledge to determine how to send the data. (directly return the raw_search). Develop something akin of a !pluck provider that takes the first entry when encountering a list as a single value to replace the prior functionality.
|
I would very much like to +1 the need to have the jmespath provider support setting lists to properties instead of just pulling the first value from the array. |
Hey! This inspires me to consider thinking about directing my copious free time to finishing this |
Currently jmespath value providers return only the first item in a list. This causes a lot of confusion, and this PR attempts to address it.