This PS resolves a recent issue with Deckhand in which missing
substitution sources cause Promenade to fail during genesis,
while using Deckhand to render documents. The fix involves
introducing a new flag called fail_on_missing_sub_src which
if False logs a warning rather than raises an exception
in the event that a substitution source document is missing.
Also adds better exception handling and logging around
Deckhand.
Example error:
Traceback (most recent call last):
File "/usr/local/bin/promenade", line 10, in <module>
sys.exit(promenade())
File "/usr/local/lib/python3.6/site-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.6/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.6/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/opt/promenade/promenade/cli.py", line 55, in genereate_certs
debug=debug, streams=config_files, substitute=True, validate=False)
File "/opt/promenade/promenade/config.py", line 49, in from_streams
return cls(documents=documents, **kwargs)
File "/opt/promenade/promenade/config.py", line 29, in __init__
documents = [dict(d) for d in deckhand_eng.render()]
File "/usr/local/lib/python3.6/site-packages/deckhand/engine/layering.py", line 485, in render
self.secrets_substitution.substitute_all(doc))
File "/usr/local/lib/python3.6/site-packages/deckhand/engine/secrets_manager.py", line 182, in substitute_all
document_name=document.name)
Depends-On: https://review.gerrithub.io/#/c/400880/
Change-Id: I4486535d4555ece54eb4d47bfb56472250f97ab4