<h3 dir="auto">Apache Airflow version</h3>
<p dir="auto">2.5.1</p>
<h3 dir="auto">What happened</h3>
<p dir="auto">when i run the code i cant see the dags graph</p>
<h3 dir="auto">What you think should happen instead</h3>
<p dir="auto">the dag must appears in the graph view</p>
<h3 dir="auto">How to reproduce</h3>
<p dir="auto">run this code<br>
from airflow.decorators import dag,task<br>
from datetime import datetime</p>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/task/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/task">@task</a><br>
def make_list():<br>
return [1, 2, 3, 4]</p>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/task/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/task">@task</a><br>
def consumer(arg):<br>
print(arg)</p>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/task/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/task">@task</a><br>
def add_one(arg):<br>
if(arg == 3):<br>
raise ValueError("the value is 3 ")<br>
return arg+1</p>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/dag/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/dag">@dag</a>(dag_id="dynamic-task-map",<br>
start_date=datetime(2022, 4, 2),<br>
catchup=False)<br>
def create_dag():<br>
add_one_to_list = add_one.expand(arg=make_list())<br>
consumer.expand(arg=add_one_to_list)</p>
<p dir="auto">dag_instance = create_dag()</p>
<h3 dir="auto">Operating System</h3>
<p dir="auto">windows</p>
<h3 dir="auto">Versions of Apache Airflow Providers</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Deployment</h3>
<p dir="auto">Docker-Compose</p>
<h3 dir="auto">Deployment details</h3>
<p dir="auto">Docker Compose version v2.15.1<br>
yaml file</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# &quot;License&quot;); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.
#

# Basic Airflow cluster configuration for CeleryExecutor with Redis and PostgreSQL.
#
# WARNING: This configuration is for local development. Do not use it in a production deployment.
#
# This configuration supports basic configuration using environment variables or an .env file
# The following variables are supported:
#
# AIRFLOW_IMAGE_NAME           - Docker image name used to run Airflow.
#                                Default: apache/airflow:2.5.1
# AIRFLOW_UID                  - User ID in Airflow containers
#                                Default: 50000
# AIRFLOW_PROJ_DIR             - Base path to which all the files will be volumed.
#                                Default: .
# Those configurations are useful mostly in case of standalone testing/running Airflow in test/try-out mode
#
# _AIRFLOW_WWW_USER_USERNAME   - Username for the administrator account (if requested).
#                                Default: airflow
# _AIRFLOW_WWW_USER_PASSWORD   - Password for the administrator account (if requested).
#                                Default: airflow
# _PIP_ADDITIONAL_REQUIREMENTS - Additional PIP requirements to add when starting all containers.
#                                Default: ''
#
# Feel free to modify this file to suit your needs.
---
version: '3'
x-airflow-common:
  &amp;airflow-common
  # In order to add custom dependencies or upgrade provider packages you can use your extended image.
  # Comment the image line, place your Dockerfile in the directory where you placed the docker-compose.yaml
  # and uncomment the &quot;build&quot; line below, Then run `docker-compose build` to build the images.
  image: ${AIRFLOW_IMAGE_NAME:-apache/airflow:2.5.1}
  # build: .
  environment:
    &amp;airflow-common-env
    # AIRFLOW__CORE__EXECUTOR: CeleryExecutor
    AIRFLOW__CORE__EXECUTOR: LocalExecutor
    AIRFLOW__DATABASE__SQL_ALCHEMY_CONN: postgresql+psycopg2://airflow:airflow@postgres/airflow
    # For backward compatibility, with Airflow &lt;2.3
    AIRFLOW__CORE__SQL_ALCHEMY_CONN: postgresql+psycopg2://airflow:airflow@postgres/airflow
    # AIRFLOW__CELERY__RESULT_BACKEND: db+postgresql://airflow:airflow@postgres/airflow
    # AIRFLOW__CELERY__BROKER_URL: redis://:@redis:6379/0
    AIRFLOW__CORE__FERNET_KEY: ''
    AIRFLOW__CORE__DAGS_ARE_PAUSED_AT_CREATION: 'true'
    AIRFLOW__CORE__LOAD_EXAMPLES: 'true'
    AIRFLOW__API__AUTH_BACKENDS: 'airflow.api.auth.backend.basic_auth,airflow.api.auth.backend.session'
    _PIP_ADDITIONAL_REQUIREMENTS: ${_PIP_ADDITIONAL_REQUIREMENTS:-}
  volumes:
    - ${AIRFLOW_PROJ_DIR:-.}/dags:/opt/airflow/dags
    - ${AIRFLOW_PROJ_DIR:-.}/logs:/opt/airflow/logs
    - ${AIRFLOW_PROJ_DIR:-.}/plugins:/opt/airflow/plugins
    # - ${AIRFLOW_PROJ_DIR:-.}/config/airflow.cfg:/opt/airflow/airflow.cfg
  user: &quot;${AIRFLOW_UID:-50000}:0&quot;
  depends_on:
    &amp;airflow-common-depends-on
    # redis:
    #   condition: service_healthy
    postgres:
      condition: service_healthy

services:
  postgres:
    image: postgres:13
    environment:
      POSTGRES_USER: airflow
      POSTGRES_PASSWORD: airflow
      POSTGRES_DB: airflow
    ports:
      - 5432:5432
    volumes:
      - postgres-db-volume:/var/lib/postgresql/data
    healthcheck:
      test: [&quot;CMD&quot;, &quot;pg_isready&quot;, &quot;-U&quot;, &quot;airflow&quot;]
      interval: 5s
      retries: 5
    restart: always

  # redis:
  #   image: redis:latest
  #   expose:
  #     - 6379
  #   healthcheck:
  #     test: [&quot;CMD&quot;, &quot;redis-cli&quot;, &quot;ping&quot;]
  #     interval: 5s
  #     timeout: 30s
  #     retries: 50
  #   restart: always

  airflow-webserver:
    &lt;&lt;: *airflow-common
    command: webserver
    ports:
      - 8080:8080
    healthcheck:
      test: [&quot;CMD&quot;, &quot;curl&quot;, &quot;--fail&quot;, &quot;http://localhost:8080/health&quot;]
      interval: 10s
      timeout: 10s
      retries: 5
    restart: always
    depends_on:
      &lt;&lt;: *airflow-common-depends-on
      airflow-init:
        condition: service_completed_successfully

  airflow-scheduler:
    &lt;&lt;: *airflow-common
    command: scheduler
    healthcheck:
      test: [&quot;CMD-SHELL&quot;, 'airflow jobs check --job-type SchedulerJob --hostname &quot;$${HOSTNAME}&quot;']
      interval: 10s
      timeout: 10s
      retries: 5
    restart: always
    depends_on:
      &lt;&lt;: *airflow-common-depends-on
      airflow-init:
        condition: service_completed_successfully

  # airflow-worker:
  #   &lt;&lt;: *airflow-common
  #   command: celery worker
  #   healthcheck:
  #     test:
  #       - &quot;CMD-SHELL&quot;
  #       - 'celery --app airflow.executors.celery_executor.app inspect ping -d &quot;celery@$${HOSTNAME}&quot;'
  #     interval: 10s
  #     timeout: 10s
  #     retries: 5
  #   environment:
  #     &lt;&lt;: *airflow-common-env
  #     # Required to handle warm shutdown of the celery workers properly
  #     # See https://airflow.apache.org/docs/docker-stack/entrypoint.html#signal-propagation
  #     DUMB_INIT_SETSID: &quot;0&quot;
  #   restart: always
  #   depends_on:
  #     &lt;&lt;: *airflow-common-depends-on
  #     airflow-init:
  #       condition: service_completed_successfully

  # airflow-triggerer:
  #   &lt;&lt;: *airflow-common
  #   command: triggerer
  #   healthcheck:
  #     test: [&quot;CMD-SHELL&quot;, 'airflow jobs check --job-type TriggererJob --hostname &quot;$${HOSTNAME}&quot;']
  #     interval: 10s
  #     timeout: 10s
  #     retries: 5
  #   restart: always
  #   depends_on:
  #     &lt;&lt;: *airflow-common-depends-on
  #     airflow-init:
  #       condition: service_completed_successfully

  airflow-init:
    &lt;&lt;: *airflow-common
    entrypoint: /bin/bash
    # yamllint disable rule:line-length
    command:
      - -c
      - |
        function ver() {
          printf &quot;%04d%04d%04d%04d&quot; $${1//./ }
        }
        airflow_version=$$(AIRFLOW__LOGGING__LOGGING_LEVEL=INFO &amp;&amp; gosu airflow airflow version)
        airflow_version_comparable=$$(ver $${airflow_version})
        min_airflow_version=2.2.0
        min_airflow_version_comparable=$$(ver $${min_airflow_version})
        if (( airflow_version_comparable &lt; min_airflow_version_comparable )); then
          echo
          echo -e &quot;\033[1;31mERROR!!!: Too old Airflow version $${airflow_version}!\e[0m&quot;
          echo &quot;The minimum Airflow version supported: $${min_airflow_version}. Only use this or higher!&quot;
          echo
          exit 1
        fi
        if [[ -z &quot;${AIRFLOW_UID}&quot; ]]; then
          echo
          echo -e &quot;\033[1;33mWARNING!!!: AIRFLOW_UID not set!\e[0m&quot;
          echo &quot;If you are on Linux, you SHOULD follow the instructions below to set &quot;
          echo &quot;AIRFLOW_UID environment variable, otherwise files will be owned by root.&quot;
          echo &quot;For other operating systems you can get rid of the warning with manually created .env file:&quot;
          echo &quot;    See: https://airflow.apache.org/docs/apache-airflow/stable/howto/docker-compose/index.html#setting-the-right-airflow-user&quot;
          echo
        fi
        one_meg=1048576
        mem_available=$$(($$(getconf _PHYS_PAGES) * $$(getconf PAGE_SIZE) / one_meg))
        cpus_available=$$(grep -cE 'cpu[0-9]+' /proc/stat)
        disk_available=$$(df / | tail -1 | awk '{print $$4}')
        warning_resources=&quot;false&quot;
        if (( mem_available &lt; 4000 )) ; then
          echo
          echo -e &quot;\033[1;33mWARNING!!!: Not enough memory available for Docker.\e[0m&quot;
          echo &quot;At least 4GB of memory required. You have $$(numfmt --to iec $$((mem_available * one_meg)))&quot;
          echo
          warning_resources=&quot;true&quot;
        fi
        if (( cpus_available &lt; 2 )); then
          echo
          echo -e &quot;\033[1;33mWARNING!!!: Not enough CPUS available for Docker.\e[0m&quot;
          echo &quot;At least 2 CPUs recommended. You have $${cpus_available}&quot;
          echo
          warning_resources=&quot;true&quot;
        fi
        if (( disk_available &lt; one_meg * 10 )); then
          echo
          echo -e &quot;\033[1;33mWARNING!!!: Not enough Disk space available for Docker.\e[0m&quot;
          echo &quot;At least 10 GBs recommended. You have $$(numfmt --to iec $$((disk_available * 1024 )))&quot;
          echo
          warning_resources=&quot;true&quot;
        fi
        if [[ $${warning_resources} == &quot;true&quot; ]]; then
          echo
          echo -e &quot;\033[1;33mWARNING!!!: You have not enough resources to run Airflow (see above)!\e[0m&quot;
          echo &quot;Please follow the instructions to increase amount of resources available:&quot;
          echo &quot;   https://airflow.apache.org/docs/apache-airflow/stable/howto/docker-compose/index.html#before-you-begin&quot;
          echo
        fi
        mkdir -p /sources/logs /sources/dags /sources/plugins
        chown -R &quot;${AIRFLOW_UID}:0&quot; /sources/{logs,dags,plugins}
        exec /entrypoint airflow version
    # yamllint enable rule:line-length
    environment:
      &lt;&lt;: *airflow-common-env
      _AIRFLOW_DB_UPGRADE: 'true'
      _AIRFLOW_WWW_USER_CREATE: 'true'
      _AIRFLOW_WWW_USER_USERNAME: ${_AIRFLOW_WWW_USER_USERNAME:-airflow}
      _AIRFLOW_WWW_USER_PASSWORD: ${_AIRFLOW_WWW_USER_PASSWORD:-airflow}
      _PIP_ADDITIONAL_REQUIREMENTS: ''
    user: &quot;0:0&quot;
    volumes:
      - ${AIRFLOW_PROJ_DIR:-.}:/sources

  airflow-cli:
    &lt;&lt;: *airflow-common
    profiles:
      - debug
    environment:
      &lt;&lt;: *airflow-common-env
      CONNECTION_CHECK_MAX_COUNT: &quot;0&quot;
    # Workaround for entrypoint issue. See: https://github.com/apache/airflow/issues/16252
    command:
      - bash
      - -c
      - airflow

  # You can enable flower by adding &quot;--profile flower&quot; option e.g. docker-compose --profile flower up
  # or by explicitly targeted on the command line e.g. docker-compose up flower.
  # See: https://docs.docker.com/compose/profiles/
  # flower:
  #   &lt;&lt;: *airflow-common
  #   command: celery flower
  #   profiles:
  #     - flower
  #   ports:
  #     - 5555:5555
  #   healthcheck:
  #     test: [&quot;CMD&quot;, &quot;curl&quot;, &quot;--fail&quot;, &quot;http://localhost:5555/&quot;]
  #     interval: 10s
  #     timeout: 10s
  #     retries: 5
  #   restart: always
  #   depends_on:
  #     &lt;&lt;: *airflow-common-depends-on
  #     airflow-init:
  #       condition: service_completed_successfully

volumes:
  postgres-db-volume:"><pre class="notranslate"><span class="pl-c"><span class="pl-c">#</span> Licensed to the Apache Software Foundation (ASF) under one</span>
<span class="pl-c"><span class="pl-c">#</span> or more contributor license agreements.  See the NOTICE file</span>
<span class="pl-c"><span class="pl-c">#</span> distributed with this work for additional information</span>
<span class="pl-c"><span class="pl-c">#</span> regarding copyright ownership.  The ASF licenses this file</span>
<span class="pl-c"><span class="pl-c">#</span> to you under the Apache License, Version 2.0 (the</span>
<span class="pl-c"><span class="pl-c">#</span> "License"); you may not use this file except in compliance</span>
<span class="pl-c"><span class="pl-c">#</span> with the License.  You may obtain a copy of the License at</span>
<span class="pl-c"><span class="pl-c">#</span></span>
<span class="pl-c"><span class="pl-c">#</span>   http://www.apache.org/licenses/LICENSE-2.0</span>
<span class="pl-c"><span class="pl-c">#</span></span>
<span class="pl-c"><span class="pl-c">#</span> Unless required by applicable law or agreed to in writing,</span>
<span class="pl-c"><span class="pl-c">#</span> software distributed under the License is distributed on an</span>
<span class="pl-c"><span class="pl-c">#</span> "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY</span>
<span class="pl-c"><span class="pl-c">#</span> KIND, either express or implied.  See the License for the</span>
<span class="pl-c"><span class="pl-c">#</span> specific language governing permissions and limitations</span>
<span class="pl-c"><span class="pl-c">#</span> under the License.</span>
<span class="pl-c"><span class="pl-c">#</span></span>

<span class="pl-c"><span class="pl-c">#</span> Basic Airflow cluster configuration for CeleryExecutor with Redis and PostgreSQL.</span>
<span class="pl-c"><span class="pl-c">#</span></span>
<span class="pl-c"><span class="pl-c">#</span> WARNING: This configuration is for local development. Do not use it in a production deployment.</span>
<span class="pl-c"><span class="pl-c">#</span></span>
<span class="pl-c"><span class="pl-c">#</span> This configuration supports basic configuration using environment variables or an .env file</span>
<span class="pl-c"><span class="pl-c">#</span> The following variables are supported:</span>
<span class="pl-c"><span class="pl-c">#</span></span>
<span class="pl-c"><span class="pl-c">#</span> AIRFLOW_IMAGE_NAME           - Docker image name used to run Airflow.</span>
<span class="pl-c"><span class="pl-c">#</span>                                Default: apache/airflow:2.5.1</span>
<span class="pl-c"><span class="pl-c">#</span> AIRFLOW_UID                  - User ID in Airflow containers</span>
<span class="pl-c"><span class="pl-c">#</span>                                Default: 50000</span>
<span class="pl-c"><span class="pl-c">#</span> AIRFLOW_PROJ_DIR             - Base path to which all the files will be volumed.</span>
<span class="pl-c"><span class="pl-c">#</span>                                Default: .</span>
<span class="pl-c"><span class="pl-c">#</span> Those configurations are useful mostly in case of standalone testing/running Airflow in test/try-out mode</span>
<span class="pl-c"><span class="pl-c">#</span></span>
<span class="pl-c"><span class="pl-c">#</span> _AIRFLOW_WWW_USER_USERNAME   - Username for the administrator account (if requested).</span>
<span class="pl-c"><span class="pl-c">#</span>                                Default: airflow</span>
<span class="pl-c"><span class="pl-c">#</span> _AIRFLOW_WWW_USER_PASSWORD   - Password for the administrator account (if requested).</span>
<span class="pl-c"><span class="pl-c">#</span>                                Default: airflow</span>
<span class="pl-c"><span class="pl-c">#</span> _PIP_ADDITIONAL_REQUIREMENTS - Additional PIP requirements to add when starting all containers.</span>
<span class="pl-c"><span class="pl-c">#</span>                                Default: ''</span>
<span class="pl-c"><span class="pl-c">#</span></span>
<span class="pl-c"><span class="pl-c">#</span> Feel free to modify this file to suit your needs.</span>
---
<span class="pl-ent">version</span>: <span class="pl-s"><span class="pl-pds">'</span>3<span class="pl-pds">'</span></span>
<span class="pl-ent">x-airflow-common</span>:
  <span class="pl-s">&amp;airflow-common</span>
  <span class="pl-c"><span class="pl-c">#</span> In order to add custom dependencies or upgrade provider packages you can use your extended image.</span>
  <span class="pl-c"><span class="pl-c">#</span> Comment the image line, place your Dockerfile in the directory where you placed the docker-compose.yaml</span>
  <span class="pl-c"><span class="pl-c">#</span> and uncomment the "build" line below, Then run `docker-compose build` to build the images.</span>
  <span class="pl-ent">image</span>: <span class="pl-s">${AIRFLOW_IMAGE_NAME:-apache/airflow:2.5.1}</span>
  <span class="pl-c"><span class="pl-c">#</span> build: .</span>
  <span class="pl-ent">environment</span>:
    <span class="pl-s">&amp;airflow-common-env</span>
    <span class="pl-c"><span class="pl-c">#</span> AIRFLOW__CORE__EXECUTOR: CeleryExecutor</span>
    <span class="pl-ent">AIRFLOW__CORE__EXECUTOR</span>: <span class="pl-s">LocalExecutor</span>
    <span class="pl-ent">AIRFLOW__DATABASE__SQL_ALCHEMY_CONN</span>: <span class="pl-s">postgresql+psycopg2://airflow:airflow@postgres/airflow</span>
    <span class="pl-c"><span class="pl-c">#</span> For backward compatibility, with Airflow &lt;2.3</span>
    <span class="pl-ent">AIRFLOW__CORE__SQL_ALCHEMY_CONN</span>: <span class="pl-s">postgresql+psycopg2://airflow:airflow@postgres/airflow</span>
    <span class="pl-c"><span class="pl-c">#</span> AIRFLOW__CELERY__RESULT_BACKEND: db+postgresql://airflow:airflow@postgres/airflow</span>
    <span class="pl-c"><span class="pl-c">#</span> AIRFLOW__CELERY__BROKER_URL: redis://:@redis:6379/0</span>
    <span class="pl-ent">AIRFLOW__CORE__FERNET_KEY</span>: <span class="pl-s"><span class="pl-pds">'</span><span class="pl-pds">'</span></span>
    <span class="pl-ent">AIRFLOW__CORE__DAGS_ARE_PAUSED_AT_CREATION</span>: <span class="pl-s"><span class="pl-pds">'</span>true<span class="pl-pds">'</span></span>
    <span class="pl-ent">AIRFLOW__CORE__LOAD_EXAMPLES</span>: <span class="pl-s"><span class="pl-pds">'</span>true<span class="pl-pds">'</span></span>
    <span class="pl-ent">AIRFLOW__API__AUTH_BACKENDS</span>: <span class="pl-s"><span class="pl-pds">'</span>airflow.api.auth.backend.basic_auth,airflow.api.auth.backend.session<span class="pl-pds">'</span></span>
    <span class="pl-ent">_PIP_ADDITIONAL_REQUIREMENTS</span>: <span class="pl-s">${_PIP_ADDITIONAL_REQUIREMENTS:-}</span>
  <span class="pl-ent">volumes</span>:
    - <span class="pl-s">${AIRFLOW_PROJ_DIR:-.}/dags:/opt/airflow/dags</span>
    - <span class="pl-s">${AIRFLOW_PROJ_DIR:-.}/logs:/opt/airflow/logs</span>
    - <span class="pl-s">${AIRFLOW_PROJ_DIR:-.}/plugins:/opt/airflow/plugins</span>
    <span class="pl-c"><span class="pl-c">#</span> - ${AIRFLOW_PROJ_DIR:-.}/config/airflow.cfg:/opt/airflow/airflow.cfg</span>
  <span class="pl-ent">user</span>: <span class="pl-s"><span class="pl-pds">"</span>${AIRFLOW_UID:-50000}:0<span class="pl-pds">"</span></span>
  <span class="pl-ent">depends_on</span>:
    <span class="pl-s">&amp;airflow-common-depends-on</span>
    <span class="pl-c"><span class="pl-c">#</span> redis:</span>
    <span class="pl-c"><span class="pl-c">#</span>   condition: service_healthy</span>
    <span class="pl-ent">postgres</span>:
      <span class="pl-ent">condition</span>: <span class="pl-s">service_healthy</span>

<span class="pl-ent">services</span>:
  <span class="pl-ent">postgres</span>:
    <span class="pl-ent">image</span>: <span class="pl-s">postgres:13</span>
    <span class="pl-ent">environment</span>:
      <span class="pl-ent">POSTGRES_USER</span>: <span class="pl-s">airflow</span>
      <span class="pl-ent">POSTGRES_PASSWORD</span>: <span class="pl-s">airflow</span>
      <span class="pl-ent">POSTGRES_DB</span>: <span class="pl-s">airflow</span>
    <span class="pl-ent">ports</span>:
      - <span class="pl-c1">5432:5432</span>
    <span class="pl-ent">volumes</span>:
      - <span class="pl-s">postgres-db-volume:/var/lib/postgresql/data</span>
    <span class="pl-ent">healthcheck</span>:
      <span class="pl-ent">test</span>: <span class="pl-s">["CMD", "pg_isready", "-U", "airflow"]</span>
      <span class="pl-ent">interval</span>: <span class="pl-c1">5s</span>
      <span class="pl-ent">retries</span>: <span class="pl-c1">5</span>
    <span class="pl-ent">restart</span>: <span class="pl-s">always</span>

  <span class="pl-c"><span class="pl-c">#</span> redis:</span>
  <span class="pl-c"><span class="pl-c">#</span>   image: redis:latest</span>
  <span class="pl-c"><span class="pl-c">#</span>   expose:</span>
  <span class="pl-c"><span class="pl-c">#</span>     - 6379</span>
  <span class="pl-c"><span class="pl-c">#</span>   healthcheck:</span>
  <span class="pl-c"><span class="pl-c">#</span>     test: ["CMD", "redis-cli", "ping"]</span>
  <span class="pl-c"><span class="pl-c">#</span>     interval: 5s</span>
  <span class="pl-c"><span class="pl-c">#</span>     timeout: 30s</span>
  <span class="pl-c"><span class="pl-c">#</span>     retries: 50</span>
  <span class="pl-c"><span class="pl-c">#</span>   restart: always</span>

  <span class="pl-ent">airflow-webserver</span>:
    <span class="pl-ent">&lt;&lt;</span>: <span class="pl-s">*airflow-common</span>
    <span class="pl-ent">command</span>: <span class="pl-s">webserver</span>
    <span class="pl-ent">ports</span>:
      - <span class="pl-c1">8080:8080</span>
    <span class="pl-ent">healthcheck</span>:
      <span class="pl-ent">test</span>: <span class="pl-s">["CMD", "curl", "--fail", "http://localhost:8080/health"]</span>
      <span class="pl-ent">interval</span>: <span class="pl-c1">10s</span>
      <span class="pl-ent">timeout</span>: <span class="pl-c1">10s</span>
      <span class="pl-ent">retries</span>: <span class="pl-c1">5</span>
    <span class="pl-ent">restart</span>: <span class="pl-s">always</span>
    <span class="pl-ent">depends_on</span>:
      <span class="pl-ent">&lt;&lt;</span>: <span class="pl-s">*airflow-common-depends-on</span>
      <span class="pl-ent">airflow-init</span>:
        <span class="pl-ent">condition</span>: <span class="pl-s">service_completed_successfully</span>

  <span class="pl-ent">airflow-scheduler</span>:
    <span class="pl-ent">&lt;&lt;</span>: <span class="pl-s">*airflow-common</span>
    <span class="pl-ent">command</span>: <span class="pl-s">scheduler</span>
    <span class="pl-ent">healthcheck</span>:
      <span class="pl-ent">test</span>: <span class="pl-s">["CMD-SHELL", 'airflow jobs check --job-type SchedulerJob --hostname "$${HOSTNAME}"']</span>
      <span class="pl-ent">interval</span>: <span class="pl-c1">10s</span>
      <span class="pl-ent">timeout</span>: <span class="pl-c1">10s</span>
      <span class="pl-ent">retries</span>: <span class="pl-c1">5</span>
    <span class="pl-ent">restart</span>: <span class="pl-s">always</span>
    <span class="pl-ent">depends_on</span>:
      <span class="pl-ent">&lt;&lt;</span>: <span class="pl-s">*airflow-common-depends-on</span>
      <span class="pl-ent">airflow-init</span>:
        <span class="pl-ent">condition</span>: <span class="pl-s">service_completed_successfully</span>

  <span class="pl-c"><span class="pl-c">#</span> airflow-worker:</span>
  <span class="pl-c"><span class="pl-c">#</span>   &lt;&lt;: *airflow-common</span>
  <span class="pl-c"><span class="pl-c">#</span>   command: celery worker</span>
  <span class="pl-c"><span class="pl-c">#</span>   healthcheck:</span>
  <span class="pl-c"><span class="pl-c">#</span>     test:</span>
  <span class="pl-c"><span class="pl-c">#</span>       - "CMD-SHELL"</span>
  <span class="pl-c"><span class="pl-c">#</span>       - 'celery --app airflow.executors.celery_executor.app inspect ping -d "celery@$${HOSTNAME}"'</span>
  <span class="pl-c"><span class="pl-c">#</span>     interval: 10s</span>
  <span class="pl-c"><span class="pl-c">#</span>     timeout: 10s</span>
  <span class="pl-c"><span class="pl-c">#</span>     retries: 5</span>
  <span class="pl-c"><span class="pl-c">#</span>   environment:</span>
  <span class="pl-c"><span class="pl-c">#</span>     &lt;&lt;: *airflow-common-env</span>
  <span class="pl-c"><span class="pl-c">#</span>     # Required to handle warm shutdown of the celery workers properly</span>
  <span class="pl-c"><span class="pl-c">#</span>     # See https://airflow.apache.org/docs/docker-stack/entrypoint.html#signal-propagation</span>
  <span class="pl-c"><span class="pl-c">#</span>     DUMB_INIT_SETSID: "0"</span>
  <span class="pl-c"><span class="pl-c">#</span>   restart: always</span>
  <span class="pl-c"><span class="pl-c">#</span>   depends_on:</span>
  <span class="pl-c"><span class="pl-c">#</span>     &lt;&lt;: *airflow-common-depends-on</span>
  <span class="pl-c"><span class="pl-c">#</span>     airflow-init:</span>
  <span class="pl-c"><span class="pl-c">#</span>       condition: service_completed_successfully</span>

  <span class="pl-c"><span class="pl-c">#</span> airflow-triggerer:</span>
  <span class="pl-c"><span class="pl-c">#</span>   &lt;&lt;: *airflow-common</span>
  <span class="pl-c"><span class="pl-c">#</span>   command: triggerer</span>
  <span class="pl-c"><span class="pl-c">#</span>   healthcheck:</span>
  <span class="pl-c"><span class="pl-c">#</span>     test: ["CMD-SHELL", 'airflow jobs check --job-type TriggererJob --hostname "$${HOSTNAME}"']</span>
  <span class="pl-c"><span class="pl-c">#</span>     interval: 10s</span>
  <span class="pl-c"><span class="pl-c">#</span>     timeout: 10s</span>
  <span class="pl-c"><span class="pl-c">#</span>     retries: 5</span>
  <span class="pl-c"><span class="pl-c">#</span>   restart: always</span>
  <span class="pl-c"><span class="pl-c">#</span>   depends_on:</span>
  <span class="pl-c"><span class="pl-c">#</span>     &lt;&lt;: *airflow-common-depends-on</span>
  <span class="pl-c"><span class="pl-c">#</span>     airflow-init:</span>
  <span class="pl-c"><span class="pl-c">#</span>       condition: service_completed_successfully</span>

  <span class="pl-ent">airflow-init</span>:
    <span class="pl-ent">&lt;&lt;</span>: <span class="pl-s">*airflow-common</span>
    <span class="pl-ent">entrypoint</span>: <span class="pl-s">/bin/bash</span>
    <span class="pl-c"><span class="pl-c">#</span> yamllint disable rule:line-length</span>
    <span class="pl-ent">command</span>:
      - <span class="pl-s">-c</span>
      - <span class="pl-s">|</span>
<span class="pl-s">        function ver() {</span>
<span class="pl-s">          printf "%04d%04d%04d%04d" $${1//./ }</span>
<span class="pl-s">        }</span>
<span class="pl-s">        airflow_version=$$(AIRFLOW__LOGGING__LOGGING_LEVEL=INFO &amp;&amp; gosu airflow airflow version)</span>
<span class="pl-s">        airflow_version_comparable=$$(ver $${airflow_version})</span>
<span class="pl-s">        min_airflow_version=2.2.0</span>
<span class="pl-s">        min_airflow_version_comparable=$$(ver $${min_airflow_version})</span>
<span class="pl-s">        if (( airflow_version_comparable &lt; min_airflow_version_comparable )); then</span>
<span class="pl-s">          echo</span>
<span class="pl-s">          echo -e "\033[1;31mERROR!!!: Too old Airflow version $${airflow_version}!\e[0m"</span>
<span class="pl-s">          echo "The minimum Airflow version supported: $${min_airflow_version}. Only use this or higher!"</span>
<span class="pl-s">          echo</span>
<span class="pl-s">          exit 1</span>
<span class="pl-s">        fi</span>
<span class="pl-s">        if [[ -z "${AIRFLOW_UID}" ]]; then</span>
<span class="pl-s">          echo</span>
<span class="pl-s">          echo -e "\033[1;33mWARNING!!!: AIRFLOW_UID not set!\e[0m"</span>
<span class="pl-s">          echo "If you are on Linux, you SHOULD follow the instructions below to set "</span>
<span class="pl-s">          echo "AIRFLOW_UID environment variable, otherwise files will be owned by root."</span>
<span class="pl-s">          echo "For other operating systems you can get rid of the warning with manually created .env file:"</span>
<span class="pl-s">          echo "    See: https://airflow.apache.org/docs/apache-airflow/stable/howto/docker-compose/index.html#setting-the-right-airflow-user"</span>
<span class="pl-s">          echo</span>
<span class="pl-s">        fi</span>
<span class="pl-s">        one_meg=1048576</span>
<span class="pl-s">        mem_available=$$(($$(getconf _PHYS_PAGES) * $$(getconf PAGE_SIZE) / one_meg))</span>
<span class="pl-s">        cpus_available=$$(grep -cE 'cpu[0-9]+' /proc/stat)</span>
<span class="pl-s">        disk_available=$$(df / | tail -1 | awk '{print $$4}')</span>
<span class="pl-s">        warning_resources="false"</span>
<span class="pl-s">        if (( mem_available &lt; 4000 )) ; then</span>
<span class="pl-s">          echo</span>
<span class="pl-s">          echo -e "\033[1;33mWARNING!!!: Not enough memory available for Docker.\e[0m"</span>
<span class="pl-s">          echo "At least 4GB of memory required. You have $$(numfmt --to iec $$((mem_available * one_meg)))"</span>
<span class="pl-s">          echo</span>
<span class="pl-s">          warning_resources="true"</span>
<span class="pl-s">        fi</span>
<span class="pl-s">        if (( cpus_available &lt; 2 )); then</span>
<span class="pl-s">          echo</span>
<span class="pl-s">          echo -e "\033[1;33mWARNING!!!: Not enough CPUS available for Docker.\e[0m"</span>
<span class="pl-s">          echo "At least 2 CPUs recommended. You have $${cpus_available}"</span>
<span class="pl-s">          echo</span>
<span class="pl-s">          warning_resources="true"</span>
<span class="pl-s">        fi</span>
<span class="pl-s">        if (( disk_available &lt; one_meg * 10 )); then</span>
<span class="pl-s">          echo</span>
<span class="pl-s">          echo -e "\033[1;33mWARNING!!!: Not enough Disk space available for Docker.\e[0m"</span>
<span class="pl-s">          echo "At least 10 GBs recommended. You have $$(numfmt --to iec $$((disk_available * 1024 )))"</span>
<span class="pl-s">          echo</span>
<span class="pl-s">          warning_resources="true"</span>
<span class="pl-s">        fi</span>
<span class="pl-s">        if [[ $${warning_resources} == "true" ]]; then</span>
<span class="pl-s">          echo</span>
<span class="pl-s">          echo -e "\033[1;33mWARNING!!!: You have not enough resources to run Airflow (see above)!\e[0m"</span>
<span class="pl-s">          echo "Please follow the instructions to increase amount of resources available:"</span>
<span class="pl-s">          echo "   https://airflow.apache.org/docs/apache-airflow/stable/howto/docker-compose/index.html#before-you-begin"</span>
<span class="pl-s">          echo</span>
<span class="pl-s">        fi</span>
<span class="pl-s">        mkdir -p /sources/logs /sources/dags /sources/plugins</span>
<span class="pl-s">        chown -R "${AIRFLOW_UID}:0" /sources/{logs,dags,plugins}</span>
<span class="pl-s">        exec /entrypoint airflow version</span>
<span class="pl-s"></span>    <span class="pl-c"><span class="pl-c">#</span> yamllint enable rule:line-length</span>
    <span class="pl-ent">environment</span>:
      <span class="pl-ent">&lt;&lt;</span>: <span class="pl-s">*airflow-common-env</span>
      <span class="pl-ent">_AIRFLOW_DB_UPGRADE</span>: <span class="pl-s"><span class="pl-pds">'</span>true<span class="pl-pds">'</span></span>
      <span class="pl-ent">_AIRFLOW_WWW_USER_CREATE</span>: <span class="pl-s"><span class="pl-pds">'</span>true<span class="pl-pds">'</span></span>
      <span class="pl-ent">_AIRFLOW_WWW_USER_USERNAME</span>: <span class="pl-s">${_AIRFLOW_WWW_USER_USERNAME:-airflow}</span>
      <span class="pl-ent">_AIRFLOW_WWW_USER_PASSWORD</span>: <span class="pl-s">${_AIRFLOW_WWW_USER_PASSWORD:-airflow}</span>
      <span class="pl-ent">_PIP_ADDITIONAL_REQUIREMENTS</span>: <span class="pl-s"><span class="pl-pds">'</span><span class="pl-pds">'</span></span>
    <span class="pl-ent">user</span>: <span class="pl-s"><span class="pl-pds">"</span>0:0<span class="pl-pds">"</span></span>
    <span class="pl-ent">volumes</span>:
      - <span class="pl-s">${AIRFLOW_PROJ_DIR:-.}:/sources</span>

  <span class="pl-ent">airflow-cli</span>:
    <span class="pl-ent">&lt;&lt;</span>: <span class="pl-s">*airflow-common</span>
    <span class="pl-ent">profiles</span>:
      - <span class="pl-s">debug</span>
    <span class="pl-ent">environment</span>:
      <span class="pl-ent">&lt;&lt;</span>: <span class="pl-s">*airflow-common-env</span>
      <span class="pl-ent">CONNECTION_CHECK_MAX_COUNT</span>: <span class="pl-s"><span class="pl-pds">"</span>0<span class="pl-pds">"</span></span>
    <span class="pl-c"><span class="pl-c">#</span> Workaround for entrypoint issue. See: https://github.com/apache/airflow/issues/16252</span>
    <span class="pl-ent">command</span>:
      - <span class="pl-s">bash</span>
      - <span class="pl-s">-c</span>
      - <span class="pl-s">airflow</span>

  <span class="pl-c"><span class="pl-c">#</span> You can enable flower by adding "--profile flower" option e.g. docker-compose --profile flower up</span>
  <span class="pl-c"><span class="pl-c">#</span> or by explicitly targeted on the command line e.g. docker-compose up flower.</span>
  <span class="pl-c"><span class="pl-c">#</span> See: https://docs.docker.com/compose/profiles/</span>
  <span class="pl-c"><span class="pl-c">#</span> flower:</span>
  <span class="pl-c"><span class="pl-c">#</span>   &lt;&lt;: *airflow-common</span>
  <span class="pl-c"><span class="pl-c">#</span>   command: celery flower</span>
  <span class="pl-c"><span class="pl-c">#</span>   profiles:</span>
  <span class="pl-c"><span class="pl-c">#</span>     - flower</span>
  <span class="pl-c"><span class="pl-c">#</span>   ports:</span>
  <span class="pl-c"><span class="pl-c">#</span>     - 5555:5555</span>
  <span class="pl-c"><span class="pl-c">#</span>   healthcheck:</span>
  <span class="pl-c"><span class="pl-c">#</span>     test: ["CMD", "curl", "--fail", "http://localhost:5555/"]</span>
  <span class="pl-c"><span class="pl-c">#</span>     interval: 10s</span>
  <span class="pl-c"><span class="pl-c">#</span>     timeout: 10s</span>
  <span class="pl-c"><span class="pl-c">#</span>     retries: 5</span>
  <span class="pl-c"><span class="pl-c">#</span>   restart: always</span>
  <span class="pl-c"><span class="pl-c">#</span>   depends_on:</span>
  <span class="pl-c"><span class="pl-c">#</span>     &lt;&lt;: *airflow-common-depends-on</span>
  <span class="pl-c"><span class="pl-c">#</span>     airflow-init:</span>
  <span class="pl-c"><span class="pl-c">#</span>       condition: service_completed_successfully</span>

<span class="pl-ent">volumes</span>:
  <span class="pl-ent">postgres-db-volume</span>:</pre></div>
<h3 dir="auto">Anything else</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Are you willing to submit PR?</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> 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>
<h3 dir="auto">Apache Airflow version</h3>
<p dir="auto">2.5.1</p>
<h3 dir="auto">What happened</h3>
<p dir="auto">when using a dynamically generated task that gets the expand data from xcom after a branch_task the graph doesn't render.<br>
It reappears once the dag run is finished.<br>
tried with BashOperator and a KubernetesPodOperator.</p>
<p dir="auto">the developer console in the browser shows the error:<br>
<code class="notranslate">Uncaught TypeError: Cannot read properties of undefined (reading 'length') at z (graph.1c0596dfced26c638bfe.js:2:17499) at graph.1c0596dfced26c638bfe.js:2:17654 at Array.map (&lt;anonymous&gt;) at z (graph.1c0596dfced26c638bfe.js:2:17646) at graph.1c0596dfced26c638bfe.js:2:26602 at graph.1c0596dfced26c638bfe.js:2:26655 at graph.1c0596dfced26c638bfe.js:2:26661 at graph.1c0596dfced26c638bfe.js:2:222 at graph.1c0596dfced26c638bfe.js:2:227 z @ graph.1c0596dfced26c638bfe.js:2 (anonymous) @ graph.1c0596dfced26c638bfe.js:2 z @ graph.1c0596dfced26c638bfe.js:2 (anonymous) @ graph.1c0596dfced26c638bfe.js:2 (anonymous) @ graph.1c0596dfced26c638bfe.js:2 (anonymous) @ graph.1c0596dfced26c638bfe.js:2 (anonymous) @ graph.1c0596dfced26c638bfe.js:2 (anonymous) @ graph.1c0596dfced26c638bfe.js:2 </code></p>
<p dir="auto">grid view renders fine.</p>
<h3 dir="auto">What you think should happen instead</h3>
<p dir="auto">graph should be rendered.</p>
<h3 dir="auto">How to reproduce</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="def branch_dynamic_flow():
    @branch_task
    def choose_path():
        return 'b'


    @task
    def a():
        print('a')

    @task
    def get_args():
        return ['echo 1', 'echo 2']

    b = BashOperator.partial(task_id=&quot;b&quot;).expand(bash_command=get_args())
    path = choose_path()
    path &gt;&gt; a()
    path &gt;&gt; b
"><pre lang="@dag('branch_dynamic'," class="notranslate"><code class="notranslate">def branch_dynamic_flow():
    @branch_task
    def choose_path():
        return 'b'


    @task
    def a():
        print('a')

    @task
    def get_args():
        return ['echo 1', 'echo 2']

    b = BashOperator.partial(task_id="b").expand(bash_command=get_args())
    path = choose_path()
    path &gt;&gt; a()
    path &gt;&gt; b

</code></pre></div>
<h3 dir="auto">Operating System</h3>
<p dir="auto">red hat</p>
<h3 dir="auto">Versions of Apache Airflow Providers</h3>
<p dir="auto">apache-airflow-providers-cncf-kubernetes | 5.1.1 | Kubernetes</p>
<h3 dir="auto">Deployment</h3>
<p dir="auto">Official Apache Airflow Helm Chart</p>
<h3 dir="auto">Deployment details</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Anything else</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Are you willing to submit PR?</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> 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>