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
Because documentation generation follows the same code path as
build-time when it comes to instantiating the layer manager, if a layer
refers to an env var when specifying dependencies, unless that var is
set when the documentation is generated, the layer will be skipped
because it can't be found. This is the desired behaviour for build-time
but not for docgen-time.
To combat this, pass a flag down from the top level so we can be more
lenient when generating documentation for layers with dynamic
dependencies.
Also, update the layer jinja template to strip whitespace. Next time we
autogenerate docs there will be removal of blank lines in some cases,
but that's better anyway.
{% if layer.dependencies or layer.reverse_dependencies or layer.layer_info.provides or layer.layer_info.provider_requires %}
139
+
{% if layer.dependencies.static_dep or layer.dependencies.dyn_dep or layer.reverse_dependencies or layer.layer_info.provides or layer.layer_info.provider_requires %}
140
140
<divclass="section">
141
141
<h2>Relationships</h2>
142
-
{% if layer.dependencies %}
142
+
{% if layer.dependencies.static_dep or layer.dependencies.dyn_dep %}
143
143
<p><strong>Depends on:</strong></p>
144
144
<divclass="deps">
145
-
{% for dep in layer.dependencies %}
145
+
{%- for dep in layer.dependencies.static_dep %}
146
146
<ahref="{{ dep }}.html" class="dep-badge">{{ dep }}</a>
147
-
{% endfor %}
147
+
{%- endfor %}
148
+
{%- for dep in layer.dependencies.dyn_dep %}
149
+
<spanclass="dep-badge" style="background: #6c757d; cursor: default;" title="Dynamic dependency (contains environment variables)">{{ dep }}</span>
0 commit comments