-
Notifications
You must be signed in to change notification settings - Fork 311
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
[Resolve #1468] Cast parameters to strings #1471
[Resolve #1468] Cast parameters to strings #1471
Conversation
This reverts commit 906005d.
In already-resolved and merged issue Sceptre#1443 we implemented parameter validation. Subsequent discussion led to a consensus that it would be better to not only validate parameters, but also cast where applicable to string. This will lead to a cleaner user experience for most Sceptre users where parameters passed as ints, floats and bools in their YAML values files are cast to strings first and then sent to CloudFormation, since CloudFormation's API is unable to handle other types. This PR changes the behaviour of the `_ensure_parameters` method in the Stack class to handle casting to strings where applicable instead of only validating.
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.
In already-resolved and merged issue #1443 we implemented parameter validation.
the PR for that issue was not merged?
Otherwise, in general this PR LGTM but would like the method to be more concise and clear.
It was merged in f3b7e51 but we have never released those changes thus no users will be impacted by this change to the earlier implementation (unless they are consuming the master branch). |
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.
thanks for the clarification
Hey Alex, Good day. I received an error may have something to do with this merge. My
The error:
I reckon that the string 'null' in my
So we can know if there is any bug here? Thank you very much. |
Hey Alex, I fixed the issue already. Need adding "" to the value when passed down like below.
Thanks. |
In already-resolved and merged issue #1443 we implemented parameter validation.
Subsequent discussion led to a consensus that it would be better to not only validate parameters, but also cast where applicable to string. This will lead to a cleaner user experience for most Sceptre users where parameters passed as ints, floats and bools in their YAML values files are cast to strings first and then sent to CloudFormation, since CloudFormation's API is unable to handle other types.
This PR changes the
_ensure_parameters
method to_cast_parameters
in the Stack class to handle casting to strings where applicable instead of only validating.PR Checklist
[Resolve #issue-number]
.poetry run tox
) are passing.poetry run pre-commit run --all-files
).and description in grammatically correct, complete sentences.
Approver/Reviewer Checklist
Other Information
Guide to writing a good commit