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

Airflow 2.3.0: can't filter by owner if selected from dropdown #23670

Closed
1 of 2 tasks
ecodina opened this issue May 12, 2022 · 4 comments · Fixed by #23804
Closed
1 of 2 tasks

Airflow 2.3.0: can't filter by owner if selected from dropdown #23670

ecodina opened this issue May 12, 2022 · 4 comments · Fixed by #23804
Assignees
Labels
affected_version:main_branch Issues Reported for main branch affected_version:2.3 Issues Reported for 2.3 area:UI Related to UI/UX. For Frontend Developers. kind:bug This is a clearly a bug
Milestone

Comments

@ecodina
Copy link
Contributor

ecodina commented May 12, 2022

Apache Airflow version

2.3.0 (latest released)

What happened

On a clean install of 2.3.0, whenever I try to filter by owner, if I select it from the dropdown (which correctly detects the owner's name) it returns the following error:

DAG "ecodina" seems to be missing from DagBag.
Webserver's log:

127.0.0.1 - - [12/May/2022:12:27:47 +0000] "GET /dagmodel/autocomplete?query=ecodin&status=all HTTP/1.1" 200 17 "http://localhost/home?search=ecodina" "Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0"
127.0.0.1 - - [12/May/2022:12:27:50 +0000] "GET /dags/ecodina/grid?search=ecodina HTTP/1.1" 302 217 "http://localhost/home?search=ecodina" "Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0"
127.0.0.1 - - [12/May/2022:12:27:50 +0000] "GET /home HTTP/1.1" 200 35774 "http://localhost/home?search=ecodina" "Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0"
127.0.0.1 - - [12/May/2022:12:27:50 +0000] "POST /blocked HTTP/1.1" 200 2 "http://localhost/home" "Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0"
127.0.0.1 - - [12/May/2022:12:27:50 +0000] "POST /last_dagruns HTTP/1.1" 200 402 "http://localhost/home" "Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0"
127.0.0.1 - - [12/May/2022:12:27:50 +0000] "POST /dag_stats HTTP/1.1" 200 333 "http://localhost/home" "Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0"
127.0.0.1 - - [12/May/2022:12:27:50 +0000] "POST /task_stats HTTP/1.1" 200 1194 "http://localhost/home" "Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0"

Instead, if I write the owner's name fully and avoid selecting it from the dropdown, it works as expected since it constructs the correct URL:

my.airflow.com/home?search=ecodina

What you think should happen instead

The DAGs table should only show the selected owner's DAGs.

How to reproduce

  • Start the Airflow Webserver
  • Connect to the Airflow webpage
  • Type an owner name in the Search DAGs textbox and select it from the dropdown

Operating System

CentOS Linux 8

Versions of Apache Airflow Providers

No response

Deployment

Other

Deployment details

Installed on a conda environment, as if it was a virtualenv:

  • conda create -c conda-forge -n airflow python=3.9
  • conda activate airflow
  • pip install "apache-airflow[postgres]==2.3.0" --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.3.0/constraints-3.9.txt"

Database: PostgreSQL 13

Anything else

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@ecodina ecodina added area:core kind:bug This is a clearly a bug labels May 12, 2022
@boring-cyborg
Copy link

boring-cyborg bot commented May 12, 2022

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

@uranusjr uranusjr added area:UI Related to UI/UX. For Frontend Developers. and removed area:core labels May 12, 2022
@eladkal
Copy link
Contributor

eladkal commented May 12, 2022

I can reproduce it on main branch.
I didn't know we can search for owners in "Search DAGs" box? If so then the text in the box needs to be edited.
Choosing owner there indeed doens't work

It raised error:
DAG "airflow" seems to be missing from DagBag.

Screen Shot 2022-05-12 at 19 15 50

Screen Shot 2022-05-12 at 19 15 36

As a workaround you can filter by using the clicking on owner as added in #11121
it uses /home?search=airflow and filter the DAGs by owner as expected.

@eladkal eladkal added affected_version:main_branch Issues Reported for main branch affected_version:2.3 Issues Reported for 2.3 labels May 12, 2022
@eladkal eladkal added this to the Airflow 2.3.1 milestone May 12, 2022
@ecodina
Copy link
Contributor Author

ecodina commented May 13, 2022

I accidentally found we could filter by owner from this textbox on Airflow 2.2.5, where it worked as expected. Thanks for mentioning the workaround!

@norm
Copy link
Contributor

norm commented May 19, 2022

Yes, in 2.2.5 clicking on an autocompletion match would take you to home-with-search and in 2.3.0 it tries to take you to the matching DAG. Except it's not a DAG. Now if I can just track down the code that does that I can fix it. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affected_version:main_branch Issues Reported for main branch affected_version:2.3 Issues Reported for 2.3 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