You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/02/23 05:57:26 UTC

[GitHub] [airflow] kaojunsong opened a new issue #14374: Search in "DAG Runs" crashed with "Conf" filter

kaojunsong opened a new issue #14374:
URL: https://github.com/apache/airflow/issues/14374


   <!--
   
   Welcome to Apache Airflow!  For a smooth issue process, try to answer the following questions.
   Don't worry if they're not all applicable; just try to include what you can :-)
   
   If you need to include code snippets or logs, please put them in fenced code
   blocks.  If they're super-long, please use the details tag like
   <details><summary>super-long log</summary> lots of stuff </details>
   
   Please delete these comment blocks before submitting the issue.
   
   -->
   
   <!--
   
   IMPORTANT!!!
   
   PLEASE CHECK "SIMILAR TO X EXISTING ISSUES" OPTION IF VISIBLE
   NEXT TO "SUBMIT NEW ISSUE" BUTTON!!!
   
   PLEASE CHECK IF THIS ISSUE HAS BEEN REPORTED PREVIOUSLY USING SEARCH!!!
   
   Please complete the next sections or the issue will be closed.
   These questions are the first thing we need to know to understand the context.
   
   -->
   
   **Apache Airflow version**:
   
   
   **Kubernetes version (if you are using kubernetes)** (use `kubectl version`): "v1.14.2"
   
   **Environment**:
   
   - **Cloud provider or hardware configuration**:
   - **OS** (e.g. from /etc/os-release):
   NAME="CentOS Linux"
   VERSION="7 (Core)"
   ID="centos"
   ID_LIKE="rhel fedora"
   VERSION_ID="7"
   PRETTY_NAME="CentOS Linux 7 (Core)"
   ANSI_COLOR="0;31"
   CPE_NAME="cpe:/o:centos:centos:7"
   HOME_URL="https://www.centos.org/"
   BUG_REPORT_URL="https://bugs.centos.org/"
   
   CENTOS_MANTISBT_PROJECT="CentOS-7"
   CENTOS_MANTISBT_PROJECT_VERSION="7"
   REDHAT_SUPPORT_PRODUCT="centos"
   REDHAT_SUPPORT_PRODUCT_VERSION="7"
   
   - **Kernel** (e.g. `uname -a`): 3.10.0-957.21.3.el7.x86_64 #1 SMP Tue Jun 18 16:35:19 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
   - **Install tools**:
   - **Others**:
   
   **What happened**:
   1. Go to "Browse-> DAG Runs"
   2. Add Filter, select "Conf", "Contains", Search
   
   Error messages:
   `
   Python version: 3.6.12
   Airflow version: 2.0.0
   Node: airflow-webserver-6646b76f6d-kp9vr
   -------------------------------------------------------------------------------
   Traceback (most recent call last):
     File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1277, in _execute_context
       cursor, statement, parameters, context
     File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 593, in do_execute
       cursor.execute(statement, parameters)
   psycopg2.errors.UndefinedFunction: operator does not exist: bytea ~~* bytea
   LINE 4: WHERE dag_run.conf ILIKE '\x80049506000000000000008c02252594...
                              ^
   HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.
   
   
   The above exception was the direct cause of the following exception:
   
   Traceback (most recent call last):
     File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 2447, in wsgi_app
       response = self.full_dispatch_request()
     File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1952, in full_dispatch_request
       rv = self.handle_user_exception(e)
     File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1821, in handle_user_exception
       reraise(exc_type, exc_value, tb)
     File "/usr/local/lib/python3.6/site-packages/flask/_compat.py", line 39, in reraise
       raise value
     File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1950, in full_dispatch_request
       rv = self.dispatch_request()
     File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1936, in dispatch_request
       return self.view_functions[rule.endpoint](**req.view_args)
     File "/usr/local/lib/python3.6/site-packages/flask_appbuilder/security/decorators.py", line 109, in wraps
       return f(self, *args, **kwargs)
     File "/usr/local/lib/python3.6/site-packages/flask_appbuilder/views.py", line 551, in list
       widgets = self._list()
     File "/usr/local/lib/python3.6/site-packages/flask_appbuilder/baseviews.py", line 1127, in _list
       page_size=page_size,
     File "/usr/local/lib/python3.6/site-packages/flask_appbuilder/baseviews.py", line 1026, in _get_list_widget
       page_size=page_size,
     File "/usr/local/lib/python3.6/site-packages/flask_appbuilder/models/sqla/interface.py", line 425, in query
       count = self.query_count(query, filters, select_columns)
     File "/usr/local/lib/python3.6/site-packages/flask_appbuilder/models/sqla/interface.py", line 347, in query_count
       query, filters, select_columns=select_columns, aliases_mapping={}
     File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line 3803, in count
       return self.from_self(col).scalar()
     File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line 3523, in scalar
       ret = self.one()
     File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line 3490, in one
       ret = self.one_or_none()
     File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line 3459, in one_or_none
       ret = list(self)
     File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line 3535, in __iter__
       return self._execute_and_instances(context)
     File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line 3560, in _execute_and_instances
       result = conn.execute(querycontext.statement, self._params)
     File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1011, in execute
       return meth(self, multiparams, params)
     File "/usr/local/lib/python3.6/site-packages/sqlalchemy/sql/elements.py", line 298, in _execute_on_connection
       return connection._execute_clauseelement(self, multiparams, params)
     File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1130, in _execute_clauseelement
       distilled_params,
     File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1317, in _execute_context
       e, statement, parameters, cursor, context
     File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1511, in _handle_dbapi_exception
       sqlalchemy_exception, with_traceback=exc_info[2], from_=e
     File "/usr/local/lib/python3.6/site-packages/sqlalchemy/util/compat.py", line 182, in raise_
       raise exception
     File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1277, in _execute_context
       cursor, statement, parameters, context
     File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 593, in do_execute
       cursor.execute(statement, parameters)
   sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedFunction) operator does not exist: bytea ~~* bytea
   LINE 4: WHERE dag_run.conf ILIKE '\x80049506000000000000008c02252594...
                              ^
   HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.
   
   [SQL: SELECT count(*) AS count_1 
   FROM (SELECT dag_run.state AS dag_run_state, dag_run.id AS dag_run_id, dag_run.dag_id AS dag_run_dag_id, dag_run.execution_date AS dag_run_execution_date, dag_run.start_date AS dag_run_start_date, dag_run.end_date AS dag_run_end_date, dag_run.run_id AS dag_run_run_id, dag_run.creating_job_id AS dag_run_creating_job_id, dag_run.external_trigger AS dag_run_external_trigger, dag_run.run_type AS dag_run_run_type, dag_run.conf AS dag_run_conf, dag_run.last_scheduling_decision AS dag_run_last_scheduling_decision, dag_run.dag_hash AS dag_run_dag_hash 
   FROM dag_run 
   WHERE dag_run.conf ILIKE %(conf_1)s) AS anon_1]
   [parameters: {'conf_1': <psycopg2.extensions.Binary object at 0x7f5dad9c2c60>}]
   (Background on this error at: http://sqlalche.me/e/13/f405)`
   
   <!-- (please include exact error messages if you can) -->
   
   **What you expected to happen**: Not crashed.
   
   <!-- What do you think went wrong? -->
   
   **How to reproduce it**: See above 
   <!---
   
   As minimally and precisely as possible. Keep in mind we do not have access to your cluster or dags.
   
   If you are using kubernetes, please attempt to recreate the issue using minikube or kind.
   
   ## Install minikube/kind
   
   - Minikube https://minikube.sigs.k8s.io/docs/start/
   - Kind https://kind.sigs.k8s.io/docs/user/quick-start/
   
   If this is a UI bug, please provide a screenshot of the bug or a link to a youtube video of the bug in action
   
   You can include images using the .md style of
   ![alt text](http://url/to/img.png)
   
   To record a screencast, mac users can use QuickTime and then create an unlisted youtube video with the resulting .mov file.
   
   --->
   
   
   **Anything else we need to know**:
   
   <!--
   
   How often does this problem occur? Once? Every time etc?
   
   Any relevant logs to include? Put them here in side a detail tag:
   <details><summary>x.log</summary> lots of stuff </details>
   
   -->
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] XD-DENG closed issue #14374: Search in "DAG Runs" crashed with "Conf" filter

Posted by GitBox <gi...@apache.org>.
XD-DENG closed issue #14374:
URL: https://github.com/apache/airflow/issues/14374


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] kaxil commented on issue #14374: Search in "DAG Runs" crashed with "Conf" filter

Posted by GitBox <gi...@apache.org>.
kaxil commented on issue #14374:
URL: https://github.com/apache/airflow/issues/14374#issuecomment-810216720


   I think we should exclude `Conf` from filter


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] XD-DENG commented on issue #14374: Search in "DAG Runs" crashed with "Conf" filter

Posted by GitBox <gi...@apache.org>.
XD-DENG commented on issue #14374:
URL: https://github.com/apache/airflow/issues/14374#issuecomment-810215075


   @ryanahamilton @ashb @kaxil @mik-laj @turbaszek may you please help share your inputs on this issue?
   
   I tried to further check this issue. FAB is using `ilike` for the filters under the hood, while Postgres doesn't support `ilike` for `bytea` columns (SQLite neither). Also tried to see if FAB has anything to support this, but seems none.
   
   If we don't have a good solution/idea, maybe makes sense to exclude `Conf` from what's supported by filters in the view.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] boring-cyborg[bot] commented on issue #14374: Search in "DAG Runs" crashed with "Conf" filter

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #14374:
URL: https://github.com/apache/airflow/issues/14374#issuecomment-783930878


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


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] XD-DENG commented on issue #14374: Search in "DAG Runs" crashed with "Conf" filter

Posted by GitBox <gi...@apache.org>.
XD-DENG commented on issue #14374:
URL: https://github.com/apache/airflow/issues/14374#issuecomment-803893158


   Thanks @kaojunsong for reporting the issue. 
   
   - I can reproduce the issue you reported when I use PostgresSQL as backend (Postgres 13.1).
   - I also tried SQLite (SequentialExecutor): the crash doesn't happen anymore, but actually the filtering is not working.
   
   This issue should be relating to the column type (in Postgres it's `bytea`, in SQLite it's `BLOB`).
   
   I'm not sure if we can fix this in a straightforward way, especially given this filtering feature is "out-of-box" from the underlying framework we use, Flask-AppBuilder. Will try to take a look when I have time, any idea from you is also welcome.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org