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

fix cli airflow show dags for mapped operator #23339

Merged
merged 3 commits into from
Apr 30, 2022
Merged

fix cli airflow show dags for mapped operator #23339

merged 3 commits into from
Apr 30, 2022

Conversation

RNHTTR
Copy link
Contributor

@RNHTTR RNHTTR commented Apr 28, 2022

For mapped operators, airflow show dags <dag_id> is broken (see #23315 )

Task expansion creates a MappedOperator, which ultimately inherits from AbstractOperator and not BaseOperator.

airflow dags show ultimately calls dot_renderer.py to draw the DAG, and it checks that each node is either a TaskGroup or a BaseOperator, thus the error. Adding a check to see if the node is an AbstractOperator fixes this.

closes: #23315

@github-actions github-actions bot added the full tests needed We need to run full set of tests for this PR to merge label Apr 29, 2022
@github-actions
Copy link

The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest main at your convenience, or amend the last commit of the PR, and push it with --force-with-lease.

@jedcunningham jedcunningham merged commit 59e9310 into apache:main Apr 30, 2022
@jedcunningham jedcunningham added the type:bug-fix Changelog: Bug Fixes label Apr 30, 2022
@jedcunningham jedcunningham added this to the Airflow 2.3.1 milestone Apr 30, 2022
ephraimbuddy pushed a commit that referenced this pull request May 8, 2022
ephraimbuddy pushed a commit that referenced this pull request May 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
full tests needed We need to run full set of tests for this PR to merge type:bug-fix Changelog: Bug Fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

airflow dags show Exception: "The node ... should be TaskGroup and is not"
3 participants