Skip to content

fix(parameters): get_secret correctly return SecretBinary value #1717

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

Merged
merged 3 commits into from
Nov 15, 2022

Conversation

mangoes-git
Copy link
Contributor

@mangoes-git mangoes-git commented Nov 14, 2022

Issue number: #1713

Summary

Changes

parameters.get_secret can now fetch Binary Secrets.

User experience

Before this patch, calling parameters.get_secret to get a Binary Secret will throw a GetParameterError since it would only try to retrieve the SecretString value from the secret value. Ref: #1713

Now, get_secret will correctly fetch Binary Secrets.

Checklist

If your change doesn't seem to apply, please leave them unchecked.

Is this a breaking change?

RFC issue number:

Checklist:

  • Migration process documented
  • Implement warnings (if it can live side by side)

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.

@mangoes-git mangoes-git requested a review from a team as a code owner November 14, 2022 20:58
@mangoes-git mangoes-git requested review from heitorlessa and removed request for a team November 14, 2022 20:58
@pull-request-size pull-request-size bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Nov 14, 2022
@boring-cyborg
Copy link

boring-cyborg bot commented Nov 14, 2022

Thanks a lot for your first contribution! Please check out our contributing guidelines and don't hesitate to ask whatever you need.
In the meantime, check out the #python channel on our AWS Lambda Powertools Discord: Invite link

@github-actions github-actions bot added the bug Something isn't working label Nov 15, 2022
@pull-request-size pull-request-size bot removed the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Nov 15, 2022
@boring-cyborg boring-cyborg bot added the tests label Nov 15, 2022
@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Nov 15, 2022
@heitorlessa heitorlessa changed the title fix(parameters): get_secret can now fetch binary secrets fix(parameters): get_secret correctly return SecretBinary value Nov 15, 2022
@heitorlessa heitorlessa added the parameters Parameters utility label Nov 15, 2022
@heitorlessa heitorlessa linked an issue Nov 15, 2022 that may be closed by this pull request
@codecov-commenter
Copy link

Codecov Report

Base: 99.27% // Head: 99.27% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (c82d6d2) compared to base (8862e69).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1717   +/-   ##
========================================
  Coverage    99.27%   99.27%           
========================================
  Files          129      129           
  Lines         6056     6059    +3     
  Branches       402      403    +1     
========================================
+ Hits          6012     6015    +3     
  Misses          20       20           
  Partials        24       24           
Impacted Files Coverage Δ
..._lambda_powertools/utilities/parameters/secrets.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@heitorlessa
Copy link
Contributor

thank you so much @mangoes-git - I've just added tests and a minor code style (removed else). Merging

@heitorlessa heitorlessa merged commit f9752df into aws-powertools:develop Nov 15, 2022
@boring-cyborg
Copy link

boring-cyborg bot commented Nov 15, 2022

Awesome work, congrats on your first merged pull request and thank you for helping improve everyone's experience!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working parameters Parameters utility size/M Denotes a PR that changes 30-99 lines, ignoring generated files. tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Cannot fetch binary secrets
3 participants