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

Empty Graph view if DAG contains Dynamic Task Mapping #28988

Closed
1 of 2 tasks
Taragolis opened this issue Jan 17, 2023 · 9 comments · Fixed by #28993
Closed
1 of 2 tasks

Empty Graph view if DAG contains Dynamic Task Mapping #28988

Taragolis opened this issue Jan 17, 2023 · 9 comments · Fixed by #28993
Labels
area:UI Related to UI/UX. For Frontend Developers. kind:bug This is a clearly a bug

Comments

@Taragolis
Copy link
Contributor

Apache Airflow version

main (development)

What happened

In current main if DAG contain Dynamic Task Mapping it doesn't show in Graph View, it is not affected Grid View
This problem not exists in 2.5.0

Grid View (work as expected)
image

Graph View (empty)
image

Development Console (F12) Console Logs

DevTools failed to load source map: Could not load content for http://127.0.0.1:28080/static/appbuilder/css/bootstrap.min.css.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE

graph.78011973b3d1b76efe64.js:2 Uncaught TypeError: Cannot read properties of undefined (reading '0')
    at e (graph.78011973b3d1b76efe64.js:2:19908)
    at graph.78011973b3d1b76efe64.js:2:20208
    at Array.map (<anonymous>)
    at e (graph.78011973b3d1b76efe64.js:2:20184)
    at graph.78011973b3d1b76efe64.js:2:29704
    at graph.78011973b3d1b76efe64.js:2:29758
    at graph.78011973b3d1b76efe64.js:2:29764
    at graph.78011973b3d1b76efe64.js:2:222
    at graph.78011973b3d1b76efe64.js:2:227
e @ graph.78011973b3d1b76efe64.js:2
(anonymous) @ graph.78011973b3d1b76efe64.js:2
e @ graph.78011973b3d1b76efe64.js:2
(anonymous) @ graph.78011973b3d1b76efe64.js:2
(anonymous) @ graph.78011973b3d1b76efe64.js:2
(anonymous) @ graph.78011973b3d1b76efe64.js:2
(anonymous) @ graph.78011973b3d1b76efe64.js:2
(anonymous) @ graph.78011973b3d1b76efe64.js:2

moment.197a6f3cab42e240f8bd.js:2 Deprecation warning: value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.
Arguments: 
[0] _isAMomentObject: true, _isUTC: false, _useUTC: false, _l: undefined, _i: 2023-01-17T12:26:22T+00:0017, _f: undefined, _strict: undefined, _locale: [object Object]
Error
    at Function.createFromInputFallback (http://127.0.0.1:28080/static/dist/moment.197a6f3cab42e240f8bd.js:2:10753)
    at vo (http://127.0.0.1:28080/static/dist/moment.197a6f3cab42e240f8bd.js:2:35093)
    at Ko (http://127.0.0.1:28080/static/dist/moment.197a6f3cab42e240f8bd.js:2:38425)
    at Fo (http://127.0.0.1:28080/static/dist/moment.197a6f3cab42e240f8bd.js:2:38292)
    at jo (http://127.0.0.1:28080/static/dist/moment.197a6f3cab42e240f8bd.js:2:38011)
    at Vo (http://127.0.0.1:28080/static/dist/moment.197a6f3cab42e240f8bd.js:2:38783)
    at Qo (http://127.0.0.1:28080/static/dist/moment.197a6f3cab42e240f8bd.js:2:38817)
    at e (http://127.0.0.1:28080/static/dist/moment.197a6f3cab42e240f8bd.js:2:7629)
    at HTMLTimeElement.<anonymous> (http://127.0.0.1:28080/static/dist/graph.78011973b3d1b76efe64.js:2:4108)
    at Function.each (http://127.0.0.1:28080/static/appbuilder/js/jquery-latest.js:2:3003)

What you think should happen instead

Graph view should show DAG if it contain Dynamic Task Mapping.

How to reproduce

Use example example_dynamic_task_mapping DAG and go to Graph View

from __future__ import annotations
from datetime import datetime
from airflow import DAG
from airflow.decorators import task
with DAG(dag_id="example_dynamic_task_mapping", start_date=datetime(2022, 3, 4)) as dag:
@task
def add_one(x: int):
return x + 1
@task
def sum_it(values):
total = sum(values)
print(f"Total was {total}")
added_values = add_one.expand(x=[1, 2, 3])
sum_it(added_values)

Operating System

Linux/macOS

Versions of Apache Airflow Providers

n/a

Deployment

Other Docker-based deployment

Deployment details

breeze

Anything else

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@Taragolis Taragolis added kind:bug This is a clearly a bug area:core area:UI Related to UI/UX. For Frontend Developers. labels Jan 17, 2023
@Taragolis
Copy link
Contributor Author

It is also affects 2.5.1rc1, I'm not familiar with JS but according info from DevTools the error happen here:

const firstChildId = node.children[0].id;

@potiuk
Copy link
Member

potiuk commented Jan 17, 2023

might be a reason to do rc2 @pierrejeambrun @ephraimbuddy

@ephraimbuddy
Copy link
Contributor

Cc @bbovenzi

@pierrejeambrun
Copy link
Member

I can't reproduce the issue.

The screenshot is from main using breeze. (postgres, python 3.8).

@potiuk @ephraimbuddy do you manage to reproduce locally ?

image

@pierrejeambrun
Copy link
Member

pierrejeambrun commented Jan 17, 2023

What db/pythonversion/executor are you using ? Maybe it is tied to a specific configuration ?

I also tried on 2.5.1rc1 but can't reproduce with sqlite

@Taragolis
Copy link
Contributor Author

main: Postgres, Python 3.7, LocalExecutor
2.5.1rc1: Postgres, Python 3.9, LocalExecutor

@Taragolis
Copy link
Contributor Author

@pierrejeambrun problem in Graph not in Grid.

@pierrejeambrun
Copy link
Member

pierrejeambrun commented Jan 17, 2023

🤦‍♂️ can reproduce indeed, thanks

@pierrejeambrun
Copy link
Member

Yep, guess we need rc2

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. kind:bug This is a clearly a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants