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

Incorrect parameter posted to last_dagruns, task_stats, blocked etc #18083

Closed
2 tasks done
robinedwards opened this issue Sep 8, 2021 · 1 comment · Fixed by #18085
Closed
2 tasks done

Incorrect parameter posted to last_dagruns, task_stats, blocked etc #18083

robinedwards opened this issue Sep 8, 2021 · 1 comment · Fixed by #18085
Labels
area:core kind:bug This is a clearly a bug

Comments

@robinedwards
Copy link
Contributor

Apache Airflow version

2.1.3 (latest released)

Operating System

Debian GNU/Linux 10 (buster)

Versions of Apache Airflow Providers

apache-airflow-providers-amazon @ file:///root/.cache/pypoetry/artifacts/7f/f7/23/fc7fd3543aa486275ef0385c29063ff0dc391b0fc95dc5aa6cab2cf4e5/apache_airflow_providers_amazon-2.2.0-py3-none-any.whl apache-airflow-providers-celery @ file:///root/.cache/pypoetry/artifacts/14/80/39/0d9d57205da1d24189ac9c18eb3477664ed2c2618c1467c9809b9a2fbf/apache_airflow_providers_celery-2.0.0-py3-none-any.whl apache-airflow-providers-ftp @ file:///root/.cache/pypoetry/artifacts/a5/13/da/bf14abc40193a1ee1b82bbd800e3ac230427d7684b9d40998ac3684bef/apache_airflow_providers_ftp-2.0.1-py3-none-any.whl apache-airflow-providers-http @ file:///root/.cache/pypoetry/artifacts/fc/d7/d2/73c89ef847bbae1704fa403d7e92dba1feead757aae141613980db40ff/apache_airflow_providers_http-2.0.0-py3-none-any.whl apache-airflow-providers-imap @ file:///root/.cache/pypoetry/artifacts/af/5d/de/21c10bfc7ac076a415dcc3fc909317547e77e38c005487552cf40ddd97/apache_airflow_providers_imap-2.0.1-py3-none-any.whl apache-airflow-providers-postgres @ file:///root/.cache/pypoetry/artifacts/77/15/08/a8b670fb068b3135f97d1d343e96d48a43cbf7f6ecd0d3006ba37d90bb/apache_airflow_providers_postgres-2.2.0rc1-py3-none-any.whl apache-airflow-providers-redis @ file:///root/.cache/pypoetry/artifacts/7d/95/03/5d2a65ace88ae9a9ce9134b927b1e9639c8680c13a31e58425deae55d1/apache_airflow_providers_redis-2.0.1-py3-none-any.whl apache-airflow-providers-sqlite @ file:///root/.cache/pypoetry/artifacts/ec/e6/a3/e0d81fef662ccf79609e7d2c4e4440839a464771fd2a002d252c9a401d/apache_airflow_providers_sqlite-2.0.1-py3-none-any.whl

Deployment

Docker-Compose

Deployment details

Issue is agnostic to the deployment as long as you have more dags in your system than will fit on the first page in airflow home

What happened

The blocked, last_dagrun, dag_stats, task_stats endpoints are being sent the incorrect form field.

The field used to be dag_ids and now it seems to be dagIds (on the JS side) https://github.com/apache/airflow/blame/2.1.3/airflow/www/static/js/dags.js#L89 and https://github.com/apache/airflow/blob/2.1.3/airflow/www/views.py#L1659.

This causes the end point to attempt to return all dags which in our case is 13000+.

The fall back behaviour of returning all dags the user has permission for is a bad idea if i am honest. Perhaps it can be removed?

What you expected to happen

The correct form field be posted and only the dags relevant to the page be returned

How to reproduce

  1. Create more dags with task runs than's available on one page (suggest lowering page size)
  2. Enable js debugging
  3. Refresh /home
  4. Inspect response from /blocked /task_stats /last_dagruns and observe it returns dags which aren't on the page

Anything else

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@robinedwards robinedwards added area:core kind:bug This is a clearly a bug labels Sep 8, 2021
@boring-cyborg
Copy link

boring-cyborg bot commented Sep 8, 2021

Thanks for opening your first issue here! Be sure to follow the issue template!

robinedwards added a commit to robinedwards/airflow that referenced this issue Sep 8, 2021
The task_stats, last_dagruns, blocked etc expect dag_ids not dagIds.

This caused the endpoint to return all dags the user had access to by
default
kaxil pushed a commit that referenced this issue Sep 8, 2021
The task_stats, last_dagruns, blocked etc expect dag_ids not dagIds.

This caused the endpoint to return all dags the user had access to by
default

closes: #18083
robinedwards added a commit to robinedwards/airflow that referenced this issue Sep 9, 2021
The task_stats, last_dagruns, blocked etc expect dag_ids not dagIds.

This caused the endpoint to return all dags the user had access to by
default
kaxil pushed a commit that referenced this issue Sep 10, 2021
The task_stats, last_dagruns, blocked etc expect dag_ids not dagIds.

This caused the endpoint to return all dags the user had access to by
default

closes: #18083
(cherry picked from commit d6e48cd)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:core kind:bug This is a clearly a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant