Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TaskGroup tooltip missing actual tooltip and default_args issue #19078

Closed
1 of 2 tasks
cb149 opened this issue Oct 19, 2021 · 0 comments · Fixed by #19083
Closed
1 of 2 tasks

TaskGroup tooltip missing actual tooltip and default_args issue #19078

cb149 opened this issue Oct 19, 2021 · 0 comments · Fixed by #19083
Labels
area:UI Related to UI/UX. For Frontend Developers. area:webserver Webserver related Issues kind:bug This is a clearly a bug

Comments

@cb149
Copy link

cb149 commented Oct 19, 2021

Apache Airflow version

2.2.0 (latest released)

Operating System

Ubuntu

Versions of Apache Airflow Providers

No response

Deployment

Other

Deployment details

Just used airflow standalone

What happened

First:

TaskGroup does not show the tooltip that is defined for that group on hover
2021-10-19_17h00_18

Second:

Providing an Operator with task_group= instead of TaskGroup as context manager ignores that TaskGroup's default_args. Using the code I provided below, the task "end" in section_3 has the wrong owner.

What you expected to happen

First:

If a TaskGroup is used and the tooltip is defined like so:

with TaskGroup("section_1", tooltip="Tasks for section_1") as section_1:

the information provided withtooltip="..." should show on hover, as shown in the official documentation at https://airflow.apache.org/docs/apache-airflow/stable/concepts/dags.html#taskgroups

Second:

Defining a TaskGroup with default_args like

section_3 = TaskGroup("section_3", tooltip="Tasks for section_2", default_args={"owner": "bug"})

should result in those default_args being used by tasks defined like so:

end = DummyOperator(task_id="end", task_group=section_3)

How to reproduce

I have tested this with the below code

from datetime import datetime

from airflow.models.dag import DAG
from airflow.operators.bash import BashOperator
from airflow.operators.dummy import DummyOperator
from airflow.utils.task_group import TaskGroup

with DAG(
    dag_id="task_group_test",
    start_date=datetime(2021, 1, 1),
    catchup=False,
    tags=["example"],
    default_args={"owner": "test"},
) as dag:
    start = DummyOperator(task_id="start")

    with TaskGroup("section_1", tooltip="Tasks for section_1") as section_1:
        task_1 = DummyOperator(task_id="task_1")
        task_2 = BashOperator(task_id="task_2", bash_command="echo 1")
        task_3 = DummyOperator(task_id="task_3")

        task_1 >> [task_2, task_3]

    with TaskGroup(
        "section_2", tooltip="Tasks for section_2", default_args={"owner": "overwrite"}
    ) as section_2:
        task_1 = DummyOperator(task_id="task_1")

    section_3 = TaskGroup("section_3", tooltip="Tasks for section_3", default_args={"owner": "bug"})

    end = DummyOperator(task_id="end", task_group=section_3)

    start >> section_1 >> section_2 >> section_3

Anything else

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@cb149 cb149 added area:core kind:bug This is a clearly a bug labels Oct 19, 2021
@bbovenzi bbovenzi added area:UI Related to UI/UX. For Frontend Developers. area:webserver Webserver related Issues and removed area:core labels Oct 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:UI Related to UI/UX. For Frontend Developers. area:webserver Webserver related Issues kind:bug This is a clearly a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants