You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have had a Jinja error inside my stack_config.yaml and sceptre just printed the message from the exception without notifying it's an error or any other problem so the result looked like correct program exit.
example:
env/stack.yaml
{% set %}
template_path: path/to/template.py
sceptre launch-stack env stack
Actual result:
Expected an expression, got 'end of statement block'
Expected result:
Jinja2 exception trace back which also contains very important information where the error is:
File "env/stack.yaml", line 1, in template
{% set %}
... here the traceback continues ...
#and the last line is
jinja2.exceptions.TemplateSyntaxError: Expected an expression, got 'end of statement block'
It would be nice to either throw entire exception or give user refined information such as: path/stack.yaml, line number, error
Additional info:
I got lucky and caught entire exception during hook development for sceptre v1, but I cannot replicate it for v2 as the concept of environments is gone.
I used this code to run the hook inside interpreter.
if __name__ == '__main__':
from sceptre.environment import Environment
# change current directory
import os
# os.chdir('..')
SCEPTRE_DIR = os.path.join(os.getcwd())
env = Environment(SCEPTRE_DIR, "env")
# print(env)
stack = env.stacks["stack"]
# print(stack)
hook = EsCognitoOptions(environment_config=stack.environment_config,
stack_config=stack.config, connection_manager=stack.connection_manager)
hook.run()
The text was updated successfully, but these errors were encountered:
I have had a Jinja error inside my
stack_config.yaml
and sceptre just printed the message from the exception without notifying it's an error or any other problem so the result looked like correct program exit.example:
env/stack.yaml
sceptre launch-stack env stack
Actual result:
Expected an expression, got 'end of statement block'
Expected result:
Jinja2 exception trace back which also contains very important information where the error is:
It would be nice to either throw entire exception or give user refined information such as:
path/stack.yaml, line number, error
Additional info:
I got lucky and caught entire exception during hook development for sceptre v1, but I cannot replicate it for v2 as the concept of
environments
is gone.I used this code to run the hook inside interpreter.
The text was updated successfully, but these errors were encountered: