Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix secretsmanager PutSecretValue on empty secret #9077

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 2 commits into from
Sep 6, 2023

Conversation

bentsku
Copy link
Contributor

@bentsku bentsku commented Sep 5, 2023

Motivation

A regression was introduced in moto and part of localstack after #9044 when calling PutSecretValue on a secret with no value.

Changes

This adds a test for the fix in getmoto/moto#6775
Edit: well, apparently this has been fixed with getmoto/moto#6771
I don't know if we already want to do a moto bump, or we keep this fix inside LocalStack for now, this might be faster still.

I've also put the fix in the patch for the moment until the next moto bump where we can remove it and use the one from upstream. This fix is kinda urgent, as the customer is downgrading moto in their LocalStack container in the meantime and it introduces incompatibilities, especially with logs.

@bentsku bentsku added aws:secretsmanager AWS Secrets Manager semver: patch Non-breaking changes which can be included in patch releases labels Sep 5, 2023
@bentsku bentsku self-assigned this Sep 5, 2023
@github-actions
Copy link

github-actions bot commented Sep 5, 2023

LocalStack Community integration with Pro

       2 files         2 suites   1h 23m 7s ⏱️
2 161 tests 1 677 ✔️ 484 💤 0
2 162 runs  1 677 ✔️ 485 💤 0

Results for commit 9904e21.

Copy link
Member

@dominikschubert dominikschubert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment on lines +499 to +500
# FIXME: remove for the next moto bump (above 4.2.post1) and uncomment line above
# remove all old AWSPREVIOUS stages
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Completely unrelated and task for futures us:
Would be great if we can find a way to unify this kind of thing across the code base a bit. In a lot of cases this is just forgotten and then causes issues down the road when upstream changes.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could also imagine adding a unit test that will fail as soon as we update moto, so that we are automatically reminded to fix this 🤔

again: not really something that needs any action right now

@dominikschubert dominikschubert merged commit 5d5acc0 into master Sep 6, 2023
@dominikschubert dominikschubert deleted the fix-secretsmanager-after-moto-bump branch September 6, 2023 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aws:secretsmanager AWS Secrets Manager semver: patch Non-breaking changes which can be included in patch releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants