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 some bug in web ui dags list page (auto-refresh & jump search null state) #27141

Merged
merged 4 commits into from Oct 21, 2022

Conversation

BobDu
Copy link
Contributor

@BobDu BobDu commented Oct 19, 2022

Signed-off-by: BobDu i@bobdu.cc

This is a fix for multiple smiles bug in web ui dags page, but need to modify the same file, so I create a PR.

related: #22900

  1. after auto-refresh, none state task-run circle attr title lost.

Before fix,
dg9ixv2z0f
After fix,
image

  1. after auto-refresh, dag-run and task-run circle mouse over event lost.

Before fix,
vUGfYj2rrE
After fix,
7c296e91-f400-43a5-8de1-bb478337140e

related: #26584

  1. jump to right task-instance search url when click none state task-run circle

Before fix,
http://localhost:8080/taskinstance/list/?_flt_3_dag_id=tutorial&_flt_3_state=null

After fix,
http://localhost:8080/taskinstance/list/?_flt_3_dag_id=tutorial&_flt_8_state=


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

Signed-off-by: BobDu <i@bobdu.cc>
Signed-off-by: BobDu <i@bobdu.cc>
Copy link
Contributor

@bbovenzi bbovenzi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Just left a few minor comments.

@eladkal eladkal added this to the Airflow 2.4.3 milestone Oct 20, 2022
Signed-off-by: BobDu <i@bobdu.cc>
Signed-off-by: BobDu <i@bobdu.cc>
@BobDu BobDu requested review from bbovenzi and removed request for ryanahamilton and ashb October 21, 2022 04:33
Copy link
Contributor

@bbovenzi bbovenzi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

@bbovenzi bbovenzi merged commit ebd34cb into apache:main Oct 21, 2022
ephraimbuddy pushed a commit that referenced this pull request Nov 9, 2022
…l state) (#27141)

* Fix some bug in web ui dags list page

Signed-off-by: BobDu <i@bobdu.cc>

* use switch case & fix remove loading dot

Signed-off-by: BobDu <i@bobdu.cc>

* rename drawDagStats & selectors constants

Signed-off-by: BobDu <i@bobdu.cc>

* Further clean up of duplicate code

Signed-off-by: BobDu <i@bobdu.cc>

Signed-off-by: BobDu <i@bobdu.cc>
(cherry picked from commit ebd34cb)
@ephraimbuddy ephraimbuddy added the type:bug-fix Changelog: Bug Fixes label Nov 9, 2022
ephraimbuddy pushed a commit that referenced this pull request Nov 9, 2022
…l state) (#27141)

* Fix some bug in web ui dags list page

Signed-off-by: BobDu <i@bobdu.cc>

* use switch case & fix remove loading dot

Signed-off-by: BobDu <i@bobdu.cc>

* rename drawDagStats & selectors constants

Signed-off-by: BobDu <i@bobdu.cc>

* Further clean up of duplicate code

Signed-off-by: BobDu <i@bobdu.cc>

Signed-off-by: BobDu <i@bobdu.cc>
(cherry picked from commit ebd34cb)
@jyotsa09
Copy link

jyotsa09 commented Nov 11, 2022

Hi @BobDu When I'm trying to click on none task instance state circle it's throwing below error -

Something bad has happened.

Airflow is used by many users, and it is very likely that others had similar problems and you can easily find
a solution to your problem.

Consider following these steps:

  * gather the relevant information (detailed logs with errors, reproduction steps, details of your deployment)

  * find similar issues using:
     * [GitHub Discussions](https://github.com/apache/airflow/discussions)
     * [GitHub Issues](https://github.com/apache/airflow/issues)
     * [Stack Overflow](https://stackoverflow.com/questions/tagged/airflow)
     * the usual search engine you use on a daily basis

  * if you run Airflow on a Managed Service, consider opening an issue using the service support channels

  * if you tried and have difficulty with diagnosing and fixing the problem yourself, consider creating a [bug report](https://github.com/apache/airflow/issues/new/choose).
    Make sure however, to include all relevant details and results of your investigation so far.

Python version: 3.9.15
Airflow version: 2.4.3.dev1837+astro.1
Node: d23645e727e9
-------------------------------------------------------------------------------
Error! Please contact server admin.

2022-11-11 23 56 23

Traceback-

 [2022-11-14 10:37:43,538] {app.py:1741} ERROR - Exception on /taskinstance/list/ [GET]
 Traceback (most recent call last):
   File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 2525, in wsgi_app
     response = self.full_dispatch_request()
   File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1822, in full_dispatch_request
     rv = self.handle_user_exception(e)
   File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1820, in full_dispatch_request
     rv = self.dispatch_request()
   File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1796, in dispatch_request
     return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
   File "/usr/local/lib/python3.9/site-packages/flask_appbuilder/security/decorators.py", line 133, in wraps
     return f(self, *args, **kwargs)
   File "/usr/local/lib/python3.9/site-packages/flask_appbuilder/views.py", line 554, in list
     widgets = self._list()
   File "/usr/local/lib/python3.9/site-packages/flask_appbuilder/baseviews.py", line 1163, in _list
     get_filter_args(self._filters)
   File "/usr/local/lib/python3.9/site-packages/flask_appbuilder/urltools.py", line 121, in get_filter_args
     filters.add_filter_index(filter_column, filter_index, request.args.getlist(arg))
   File "/usr/local/lib/python3.9/site-packages/flask_appbuilder/models/filters.py", line 180, in add_filter_index
     self._all_filters[column_name][filter_instance_index], value
 IndexError: list index out of range

@BobDu
Copy link
Contributor Author

BobDu commented Nov 26, 2022

@jyotsa09

Oh, this error is beacuse of support search none task in PR #26584 . But only charry-pick this PR in 2.4.3
I think, the only thing we can do now is probably wait 2.5.0 release.

@potiuk
Copy link
Member

potiuk commented Dec 4, 2022

@jyotsa09

Oh, this error is beacuse of support search none task in PR #26584 . But only charry-pick this PR in 2.4.3 I think, the only thing we can do now is probably wait 2.5.0 release.

Which is out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug-fix Changelog: Bug Fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants