fix(parameters): honor auto transform in batched get_parameters_by_name - #8436
Conversation
transform="auto" infers the transform method from the parameter name suffix, but _transform_and_cache_get_parameters_response called transform_value() without key=name. The batched GetParameters path therefore inferred from an empty string and silently fell back to the identity transform, returning raw strings instead of parsed values. Parameters routed to the single GetParameter path (decrypt=True) already pass the key via BaseProvider.get(), so a single get_parameters_by_name call could return a parsed dict for some parameters and a raw string for others.
|
Thanks a lot for your first contribution! Please check out our contributing guidelines and don't hesitate to ask whatever you need. |
|
leandrodamascena
left a comment
There was a problem hiding this comment.
Thanks for working on this @MohammedAlkindi! Approved.
|
Tick the box to add this pull request to the merge queue (same as
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #8436 +/- ##
========================================
Coverage 96.65% 96.65%
========================================
Files 296 296
Lines 14885 14885
Branches 1263 1263
========================================
Hits 14387 14387
Misses 363 363
Partials 135 135 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Awesome work, congrats on your first merged pull request and thank you for helping improve everyone's experience! |
|
Awesome work, congrats on your first merged pull request and thank you for helping improve everyone's experience! |



Issue number: closes #8435
transform="auto"infers the transform from the parameter name suffix, but_transform_and_cache_get_parameters_responsecalledtransform_value()withoutkey=name. The batchedGetParameterspath therefore inferred from an empty string and fell back to the identity transform, returning raw strings with nothing raised. Parameters routed throughBaseProvider.get()(decrypt=True) already pass the key, so a singleget_parameters_by_namecall could return a parsed dict for some names and a raw string for others. #7083 fixed the argument-order bug in this function and coveredtransform="json";autowas not covered by that test. This was the onlytransform_value()call site omitting the key:BaseProvider.get()andsecrets.pypass it, andget_multiple()transforms a dict keyed per item.Fail-before, source reverted and the new test kept: 1 failed, the assertion showing the raw JSON string against the expected dict. Pass-after: 1 passed.
tests/functional/parameters/: 125 passed.ruff format --checkandruff check: clean.Not run here:
make mypy,make ty, and the e2e suite.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.