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
Using fengine to render a template folder is always returning zero as exit code regardless of whether or not render was successful.
For instance:
I have a ci/cd job in gitlab that builds the template and stores it as an artifact. It uses directly the fengine package to render files and inspecting the fengine logs during the process we can clearly notice it failed:
2023-06-21 08:51:13 [error ] initialization failed: ...
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/foxops/engine/__main__.py", line 120, in cmd_initialize
asyncio.run(
File "/usr/local/lib/python3.11/asyncio/runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/foxops/engine/initialization.py", line 38, in initialize_incarnation
return await _initialize_incarnation(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/foxops/engine/initialization.py", line 88, in _initialize_incarnation
await render_template(
File "/usr/local/lib/python3.11/site-packages/foxops/engine/rendering.py", line 106, in render_template
await _render_template_file(
File "/usr/local/lib/python3.11/site-packages/foxops/engine/rendering.py", line 85, in _render_template_file
return await render_template_file(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/foxops/engine/rendering.py", line 130, in render_template_file
rendered_content = await content_template.render_async(**template_data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/jinja2/environment.py", line [132]()4, in render_async
return self.environment.handle_exception()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/jinja2/environment.py", line 936, in handle_exception
raise rewrite_traceback_stack(source=source)
File "/usr/local/lib/python3.11/site-packages/jinja2/environment.py", line 1321, in <listcomp>
[n async for n in self.root_render_func(ctx)] # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/builds/template/xxxx/regenerate_cronjob.yaml", line 19, in top-level template code
{{ someop()|indent(8) }}
File "/usr/local/lib/python3.11/site-packages/jinja2/async_utils.py", line 65, in auto_await
return await t.cast("t.Awaitable[V]", value)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/jinja2/runtime.py", line 766, in _async_invoke
rv = await self._func(*arguments) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/builds/templates/xxxx/regenerate_cronjob.yaml", line 18, in template
{%- macro someop() %}{% include "/base/job_template.yaml.j2" %}{% endmacro %}
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/jinja2/loaders.py", line 218, in get_source
raise TemplateNotFound(template)
jinja2.exceptions.TemplateNotFound: /base/job_template.yaml.j2
However, the process is returning exit code 0, so job reports as success.
The text was updated successfully, but these errors were encountered:
Using fengine to render a template folder is always returning zero as exit code regardless of whether or not render was successful.
For instance:
I have a ci/cd job in gitlab that builds the template and stores it as an artifact. It uses directly the fengine package to render files and inspecting the fengine logs during the process we can clearly notice it failed:
However, the process is returning exit code 0, so job reports as success.
The text was updated successfully, but these errors were encountered: