-
Notifications
You must be signed in to change notification settings - Fork 4k
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
fix(core): adding warnings to alert when properties will be overwritten #33507
Conversation
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 review is outdated)
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #33507 +/- ##
==========================================
+ Coverage 82.16% 82.17% +0.01%
==========================================
Files 119 119
Lines 6857 6862 +5
Branches 1157 1158 +1
==========================================
+ Hits 5634 5639 +5
Misses 1120 1120
Partials 103 103
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Exemption Request : No integs need to be changed, this is just adding a warning test during synth. As far as I'm aware this is not something we can test with integs. The actual Synth'ed template should be the same as before. |
Open to any verbiage changes |
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.
A few minor comments on the wording. Thank you for making the change.
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
Pull request has been modified.
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.
LGTM. Thanks!
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Comments on closed issues and PRs are hard for our team to see. |
Issue
Closes #32468
Reason for this change
When using a custom resource, the values for
serviceToken
andserviceTimeout
are added to the construct propproperties
during the synth. Thus passing those values through to the lambda. The issue is that these values can be overwritten if you also include the exact keys in your own properties argument.So if I include
serviceToken
, which is a required arg, then I set propertiesthe value of
serviceToken
is set toServiceToken
, then my property I wrote toServiceToken
takes over and replaces the value with my own.This change is to add a warning to the user so they can understand that what they are doing is overwriting that key, as well as add some more detailed flavor text to the properties and readme to help convey this.
Description of changes
Previously the props like
serviceToken
were being written directly to properties, along with the user provided properties broken out with...
notation.I moved the automatically added props out of this
This allowed for a simple comparison between the 2 dicts, which allows for the warning to be initiated from.
Description of how you validated changes
I added a test to check if this warning is being generated.
I did not change any integs because the actual synth in the end is the exact same as before.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license