-
Notifications
You must be signed in to change notification settings - Fork 524
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
pubsys: fix bug preventing multiple ssm promotions #3137
Conversation
3069d94
to
945a00a
Compare
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.
Looks good; great simplification! 🎆
Provided the manual testing goes well, I'm happy.
"test3-parameter-value".to_string(), | ||
), | ||
( | ||
SsmKey::new( |
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.
This is just an additional key yeah? I'm not missing 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.
Correct! The idea was that this key isn't involved in the promotion.
This test would fail on the previous commit.
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.
Just some lint issues to resolve.
^ fixes clippy warnings. |
Issue number:
Closes #3103
Description of changes:
The goal of this feature is to keep a file of all published SSM parameters for the current Bottlerocket build.
During promotions, we parse the existing SSM file then add any newly created SSM parameter.
Prior to this change, the code which combines prior state with the newly-created parameters falsely assumed that all constructed promoted parameters would have a 1:1 mapping with a parameter that already exists in the file. This fails in some cases, e.g. when performing tiered promotions where the first tier is largely irrelevant when performing a promotion from the second to the third tier.
The change modifies the code to simply concatenate the existing data with any newly-created parameter, overwriting if the key exists.
Testing done:
Terms of contribution:
By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.