<h3 dir="auto">Description</h3>
<p dir="auto">Due to the complexity of our DAG, we only use the Graph view to manage it. It would be great if we could get the task group options (specifically clearing a task group - (see <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1384817143" data-permission-text="Title is private" data-url="https://github.com/apache/airflow/issues/26658" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/26658/hovercard" href="https://github.com/apache/airflow/pull/26658">#26658</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1469317225" data-permission-text="Title is private" data-url="https://github.com/apache/airflow/issues/28003" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/28003/hovercard" href="https://github.com/apache/airflow/pull/28003">#28003</a>).</p>
<h3 dir="auto">Use case/motivation</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Related issues</h3>
<p dir="auto"><em>No response</em></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>: 2.0.0</p>
<p dir="auto"><strong>Kubernetes version (if you are using kubernetes)</strong> (use <code class="notranslate">kubectl version</code>): 1.18.10</p>
<p dir="auto"><strong>Environment</strong>:</p>
<ul dir="auto">
<li><strong>Cloud provider or hardware configuration</strong>: Azure AKS</li>
<li><strong>OS</strong> (e.g. from /etc/os-release): Linux</li>
<li><strong>Kernel</strong> (e.g. <code class="notranslate">uname -a</code>): Linux</li>
<li><strong>Install tools</strong>: All</li>
</ul>
<p dir="auto"><strong>What happened</strong>:</p>
<p dir="auto">While injecting execution date and previous execution date success as environment variables using macros the values are not rendered in the pod</p>
<p dir="auto"><strong>What you expected to happen</strong>:</p>
<p dir="auto">Values are correctly rendered in the pod so that I can use that in my task.</p>
<p dir="auto"><strong>How to reproduce it</strong>:</p>
<ol dir="auto">
<li>Define Kubernetes environment variable like this<br>
<code class="notranslate"> k8s_env_variable = k8s.V1EnvVar( name='execution_date_1', value='{{ ts }}' )</code></li>
<li>Inject it in the operator</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="KubernetesPodOperator(
            namespace='airflow',
            name=name,
            task_id=name,
            image=&quot;Use your dag image id&quot;,
            env_vars=[k8s_env_variable],
            image_pull_policy='Always',
            get_logs=True,
            log_events_on_failure=True,
            resources=resources,
            is_delete_operator_pod=True,
            node_selector={'agentpool': 'airflowtasks'},
            termination_grace_period=60
        )"><pre class="notranslate"><code class="notranslate">KubernetesPodOperator(
            namespace='airflow',
            name=name,
            task_id=name,
            image="Use your dag image id",
            env_vars=[k8s_env_variable],
            image_pull_policy='Always',
            get_logs=True,
            log_events_on_failure=True,
            resources=resources,
            is_delete_operator_pod=True,
            node_selector={'agentpool': 'airflowtasks'},
            termination_grace_period=60
        )
</code></pre></div>
<ol start="3" dir="auto">
<li>Print execution date in your dag</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import os
print(os.getenv('execution_date'))"><pre class="notranslate"><code class="notranslate">import os
print(os.getenv('execution_date'))
</code></pre></div>
<ol start="4" dir="auto">
<li>It should have printed the correct execution date instead of nothing.</li>
</ol>
<p dir="auto">If you are using kubernetes, please attempt to recreate the issue using minikube or kind.</p>
<h2 dir="auto">Install minikube/kind</h2>
<ul dir="auto">
<li>Minikube <a href="https://minikube.sigs.k8s.io/docs/start/" rel="nofollow">https://minikube.sigs.k8s.io/docs/start/</a></li>
<li>Kind <a href="https://kind.sigs.k8s.io/docs/user/quick-start/" rel="nofollow">https://kind.sigs.k8s.io/docs/user/quick-start/</a></li>
</ul>