<h3 dir="auto">Description</h3>
<p dir="auto">In <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="992703329" data-permission-text="Title is private" data-url="https://github.com/apache/airflow/issues/18127" data-hovercard-type="issue" data-hovercard-url="/apache/airflow/issues/18127/hovercard" href="https://github.com/apache/airflow/issues/18127">#18127</a> Apache Superset noticed the potential of using a test framework created on the basis of Pytest to verify the Helm Chart. I believe that a synergistic effect is possible in this respect.</p>
<p dir="auto">I am aware that Apache Airflow is going to introduce some optimizations to its framework. However, they - for the Apache Superset - are not blocking to the naturally low number of tests at the beginning of the adaptation and the planned strategy to make them fast enough.</p>
<p dir="auto">A more important issue is how to share this code between projects, so as not to have duplicate it (which is necessary for a synergistic effect) and copyright requirements (despite the Apache license, it is necessary to exercise moral rights).</p>
<p dir="auto">What actions are required on the Apache Airflow side to be able to share this code and make it available e.g. as a shared library?</p>
<h3 dir="auto">Use case/motivation</h3>
<p dir="auto">Apache Superset would like perform off-line Helm Charts tests to verify that generated manifests have valid format.</p>
<p dir="auto">Apache Airflow had already a few iterations of Helm Chart testing, including generated manifest format. Currently, the solution based on the pytest is satisfying Apache Airflow developers, hence I am looking to adapt it to Apache Superset.</p>
<h3 dir="auto">Related issues</h3>
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1110323599" data-permission-text="Title is private" data-url="https://github.com/apache/superset/issues/18127" data-hovercard-type="issue" data-hovercard-url="/apache/superset/issues/18127/hovercard" href="https://github.com/apache/superset/issues/18127">apache/superset#18127</a> (discussed by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/kaxil/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/kaxil">@kaxil</a>, <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/mik-laj/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/mik-laj">@mik-laj</a>, <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/potiuk/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/potiuk">@potiuk</a> )</p>
<h3 dir="auto">Are you willing to submit a PR?</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Yes I am willing to submit a PR!</li>
</ul>
<h3 dir="auto">Code of Conduct</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow this project's <a href="https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md">Code of Conduct</a></li>
</ul>
<p dir="auto"><strong>Apache Airflow version</strong>:</p>
<p dir="auto"><strong>Kubernetes version (if you are using kubernetes)</strong> (use <code class="notranslate">kubectl version</code>):</p>
<p dir="auto"><strong>Environment</strong>:</p>
<ul dir="auto">
<li><strong>Cloud provider or hardware configuration</strong>: Aliyun</li>
<li><strong>OS</strong> (e.g. from /etc/os-release): CentOS Linux" VERSION="7 (Core)</li>
<li><strong>Kernel</strong> (e.g. <code class="notranslate">uname -a</code>): Linux 3.10.0-514.21.1.el7.x86_64</li>
<li><strong>Install tools</strong>: celery  4.4.7    rabbitmq 3.8.17</li>
<li><strong>Others</strong>:</li>
</ul>
<p dir="auto"><strong>What happened</strong>:<br>
Task log can't be shown on Web-Server when the task runs failed, while log can be shown normally when the task success</p>
<pre class="notranslate">*** Log file does not exist: /home/airflow/airflow/logs/dag_id/task_id/2021-06-28T00:00:00+08:00/28.log
*** Fetching from: http://:8793/log/dag_id/task_id/2021-06-28T00:00:00+08:00/28.log
*** Failed to fetch log file from worker. Unsupported URL protocol 
</pre>

<p dir="auto"><strong>What you expected to happen</strong>:<br>
The task log should be shown normally when the task runs failed.</p>

<p dir="auto">The Hostname info doesn't be written into the task instance table, so the webserver can't get the corresponding hostname.</p>
<p dir="auto"><strong>How to reproduce it</strong>:<br>
Just run a dag and make its task fail to reproduce the bug.</p>

<p dir="auto"><strong>Anything else we need to know</strong>:<br>
I have fixed it in my env and will commit a PR to fix it.</p>