-
Notifications
You must be signed in to change notification settings - Fork 2
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 #4] Fail gracefully on bad input #5
[Resolve #4] Fail gracefully on bad input #5
Conversation
Given a call to this filter like: ```jinja policy_document: {{ updated_policy_document | unquote_resolvers(output_indent=4, trim=True) }} ``` If the input does not contain a list of a dict, the filter fails confusingly like: ``` File "/app/sceptre/sceptre/config/reader.py", line 509, in _render raise SceptreException(message) from err sceptre.exceptions.SceptreException: s3-bucket-generic.yaml - unquote_resolvers - ('cannot represent an object', Undefined) Templating vars saved to: /tmp/vars_fdup6pqa ``` The filter should fail gracefully in this scenario.
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 PR seems fine to me however the pre-commit job is failing.
Also this repo is still setup to build and release with CircleCI. Sceptre has migrated away from CircleCi to GH actions therefore unit tests jobs for this project are no longer running either. You might want to enable unit tests in GH actions. For an example on how that's done you can take a look at the sceptre-resolver-template test and release workflows
Not certain, but I think I've done everything I can from my side! |
@alexharv074 i have updated this PR with master, but I think i made a mistake by not changing the |
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.
NVM @alexharv074, i have updated the pyyaml dependency.
Given a call to this filter like:
If the input does not contain a list or a dict, the filter fails confusingly like:
This adds code to fail gracefully in this scenario.
Also updates dependencies to get the tests passing again.