-
Notifications
You must be signed in to change notification settings - Fork 443
fix(parameters): fix _transform_and_cache_get_parameters_response #7083
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
fix(parameters): fix _transform_and_cache_get_parameters_response #7083
Conversation
7272999
to
aaf9707
Compare
was passing positional arguments to transform_value in the wrong order, making the latter fail miserably with TransformParameterError: Unable to transform value using "the value" because value was being passed as the expected transform argument. Use keyword arguments instead and cover this with a test.
aaf9707
to
81f598e
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #7083 +/- ##
===========================================
+ Coverage 96.34% 96.35% +0.01%
===========================================
Files 275 275
Lines 12980 12980
Branches 965 965
===========================================
+ Hits 12505 12507 +2
+ Misses 367 366 -1
+ Partials 108 107 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Oi @leandrodamascena. Sempre um prazer quando surge uma oportunidade pra contribuir mais um pouco de volta! I've commented on #7084. Let me know if you need more context there. |
|
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.
Hey @ericbn! OBRIGADO!
APPROVED! ❤️
Issue number: #7084
Summary
Changes
_transform_and_cache_get_parameters_response
was passing positional arguments totransform_value
in the wrong order, making the latter fail miserably withbecause
value
was being passed as the expectedtransform
argument. Use keyword arguments instead and cover this with a test.User experience
get_parameters_by_name
fails when used withtransform
. It's surprising that I might the first one trying to use this. 😅Example:
Fails with:
aws_lambda_powertools.utilities.parameters.exceptions.TransformParameterError: Unable to transform value using '"value of /dev/param2"' transform: 'NoneType' object is not callable
Checklist
If your change doesn't seem to apply, please leave them unchecked.
Is this a breaking change?
RFC issue number:
Checklist:
Acknowledgment
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.