<p dir="auto"><strong>Apache Airflow version</strong>:1.10.12</p>
<p dir="auto"><strong>Kubernetes version (if you are using kubernetes)</strong> (use <code class="notranslate">kubectl version</code>): v.1.14.8</p>
<p dir="auto"><strong>Environment</strong>:</p>
<ul dir="auto">
<li><strong>Cloud provider or hardware configuration</strong>:AWS/EKS</li>
<li><strong>OS</strong> (e.g. from /etc/os-release):</li>
<li><strong>Kernel</strong> (e.g. <code class="notranslate">uname -a</code>):</li>
<li><strong>Install tools</strong>:</li>
<li><strong>Others</strong>:</li>
</ul>
<p dir="auto"><strong>What happened</strong>:</p>
<p dir="auto">I upgraded my airflow cluster from 1.10.10 to 1.10.12 and the python version from 3.7 to 3.8. The cluster is deployed on EKS using the K8s executor and syncing logs using s3. I found a repeatable bug on the UI. When I try to get the logs from a dag with just one attempt, it tries to get the logs from the pod, and as we erased the pods by default when they finished using the airflow.cfg options, so as the pod is erased, it cannot fetch logs from the pod, and it raised an error instead of searching the logs from S3.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="
*** Unable to fetch logs from worker pod hermesemaileventshermesemaileventstransationalloadredshift-7ffa ***
(403)
Reason: Forbidden"><pre lang="***" class="notranslate"><code class="notranslate">
*** Unable to fetch logs from worker pod hermesemaileventshermesemaileventstransationalloadredshift-7ffa ***
(403)
Reason: Forbidden
</code></pre></div>
<p dir="auto">When the task has two attempts, I can sync the logs from the UI easily</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="*** Reading remote log from s3://wt-prod-euwest1-zephyr/logs/adsales/adsales-shutterstock-image-report/2020-10-06T08:30:00+00:00/8.log."><pre class="notranslate"><code class="notranslate">*** Reading remote log from s3://wt-prod-euwest1-zephyr/logs/adsales/adsales-shutterstock-image-report/2020-10-06T08:30:00+00:00/8.log.
</code></pre></div>
<p dir="auto">I think this bug is related to this PR. <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="608864811" data-permission-text="Title is private" data-url="https://github.com/apache/airflow/issues/8626" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/8626/hovercard" href="https://github.com/apache/airflow/pull/8626">#8626</a></p>
<p dir="auto"><strong>What you expected to happen</strong>:</p>
<p dir="auto">Be able to sync the logs from s3 after the pod is deleted. If the pod do not exist it should be able to fetch logs from a remote storage</p>
<p dir="auto"><strong>How to reproduce it</strong>:</p>

<p dir="auto"><strong>Anything else we need to know</strong>:</p>
<p dir="auto">Dear Airflow Maintainers,</p>
<p dir="auto">Before I tell you about my issue, let me describe my environment:</p>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>
<p dir="auto">Version of Airflow: 1.7.0</p>
</li>
<li>
<p dir="auto">Airflow components and configuration: running a scheduler with local executor</p>
</li>
<li>
<p dir="auto">Example code to reproduce the bug:<br>
<code class="notranslate">airflow.cfg</code>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[core]
airflow_home = ~/airflow
dags_folder = dags"><pre class="notranslate"><code class="notranslate">[core]
airflow_home = ~/airflow
dags_folder = dags
</code></pre></div>
</li>
<li>
<p dir="auto">Operating System: Linux ubu91 3.13.0-83-generic <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="94613830" data-permission-text="Title is private" data-url="https://github.com/apache/airflow/issues/127" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/127/hovercard" href="https://github.com/apache/airflow/pull/127">#127</a>~precise1-Ubuntu SMP Fri Mar 11 12:53:08 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux</p>
</li>
<li>
<p dir="auto">Python Version: Python 2.7.3</p>
</li>
</ul>
<p dir="auto">Now that you know a little about me, let me tell you about the issue I am having:</p>
<h3 dir="auto">Description of Issue</h3>
<ul dir="auto">
<li>What did you expect to happen?</li>
</ul>
<p dir="auto">When I configure a relative path as <code class="notranslate">dags_folder</code> in <code class="notranslate">airflow.cfg</code>, I expect dags in this folder to be found, scheduled, and executed, as it used to be the case in Airflow 1.6.2.<br>
Or, at the very least, if relative paths are not supposed to be used, this should be documented and an error message given that the configuration is invalid.</p>
<ul dir="auto">
<li>What happened instead?</li>
</ul>
<p dir="auto">The dags where found and scheduled, but the execution failed. The command the scheduler passes to the executor seems to be confused by the relative path and mixes things up, resulting in a wrong path to the dag passed to the executor. I find the following in the scheduler output:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[2016-04-06 14:44:31,680] {sequential_executor.py:27} INFO - Executing command: airflow run notify_wsgi notify_wsgi 2016-02-26T14:56:01.750588 --local -sd DAGS_FOLDER//home/PHI-TPS/amerkel/airflow/dag.py 
[2016-04-06 14:44:32,058] {__init__.py:36} INFO - Using executor SequentialExecutor
Traceback (most recent call last):
File &quot;/home/PHI-TPS/amerkel/venv/airflow/bin/airflow&quot;, line 15, in &lt;module&gt;
    args.func(args)
  File &quot;/home/PHI-TPS/amerkel/venv/airflow/local/lib/python2.7/site-packages/airflow/bin/cli.py&quot;, line 167, in run
    raise AirflowException(msg)
  airflow.utils.AirflowException: DAG [notify_wsgi] could not be found in /home/PHI-TPS/amerkel/airflow/dags/home/PHI-TPS/amerkel/airflow/dag.py"><pre class="notranslate"><code class="notranslate">[2016-04-06 14:44:31,680] {sequential_executor.py:27} INFO - Executing command: airflow run notify_wsgi notify_wsgi 2016-02-26T14:56:01.750588 --local -sd DAGS_FOLDER//home/PHI-TPS/amerkel/airflow/dag.py 
[2016-04-06 14:44:32,058] {__init__.py:36} INFO - Using executor SequentialExecutor
Traceback (most recent call last):
File "/home/PHI-TPS/amerkel/venv/airflow/bin/airflow", line 15, in &lt;module&gt;
    args.func(args)
  File "/home/PHI-TPS/amerkel/venv/airflow/local/lib/python2.7/site-packages/airflow/bin/cli.py", line 167, in run
    raise AirflowException(msg)
  airflow.utils.AirflowException: DAG [notify_wsgi] could not be found in /home/PHI-TPS/amerkel/airflow/dags/home/PHI-TPS/amerkel/airflow/dag.py
</code></pre></div>
<p dir="auto">(please note the duplication of the home directory in the path given in the last line of the traceback)</p>
<ul dir="auto">
<li>Here is how you can reproduce this issue on your machine:</li>
</ul>
<h3 dir="auto">Reproduction Steps</h3>
<ol dir="auto">
<li>configure <code class="notranslate">dags_folder</code> using a relative path</li>
<li>put a DAG in the folder you configured</li>
<li>run <code class="notranslate">airflow scheduler</code></li>
</ol>