Repository navigation
fix(parameters): clarify errors for missing DynamoDB and AppConfig data - #8618
Conversation
|
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 @kudala-bharani, this is a real improvement. I ran it against a real DynamoDB table and the messages now name the parameter, the table and the misconfigured sort attribute, which is exactly what someone debugging a provider setup needs. On the AppConfig side I could not make the service return an empty configuration on a first call, a profile that was never deployed fails earlier with Deployment not found, so that branch is a safety net rather than a fix. That is on my issue, not on you.
One small ask while you are here: an item that exists but lacks the value_attr still raises the bare 'value'. Same shape of bug as the other two, one more check in _get and a test would close it.
Approving now anyway. This goes out in 3.39.0, so there is time for that tweak before I merge. No rebase needed, and you'll be credited in the release notes.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #8618 +/- ##
========================================
Coverage 96.95% 96.95%
========================================
Files 321 321
Lines 16251 16260 +9
Branches 1453 1456 +3
========================================
+ Hits 15756 15765 +9
Misses 353 353
Partials 142 142 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
7188793
into
aws-powertools:develop
|
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 #8601
Summary
Changes
Add descriptive
GetParameterErrormessages when a DynamoDB item is missing, a query result lacks the configured sort attribute, or AppConfig returns an empty initial configuration with no previous value to reuse.Five regression cases cover these errors, custom sort attributes, recovery after an empty first response, and reuse of the previous AppConfig value on later empty responses.
User experience
Instead of errors like
'Item','sk', or the configuration name alone, callers get the missing parameter/attribute and its table, or the configuration's application and environment. Normal retrieval and caching behavior are unchanged.Testing
test_datadog_write_to_log_with_env_variablefailure also occurs on untoucheddevelopatbdd370b(3,595 passed, 72 skipped, same failure); it passes in isolation.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.