Issue 1:
Apache Airflow version: 2.0.1

Kubernetes version (if you are using kubernetes) (use kubectl version):

Environment:

Cloud provider or hardware configuration: k8s on bare metal

OS (e.g. from /etc/os-release):

Kernel (e.g. uname -a):

Install tools: pip

Others:

What happened:

Something bad has happened.
Please consider letting us know by creating a bug report using GitHub.

Python version: 3.8.7

Airflow version: 2.0.1

Node: airflow-webserver-57f76df565-ztfb5

Traceback (most recent call last):

File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1276, in _execute_context

self.dialect.do_execute(

File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 608, in do_execute

cursor.execute(statement, parameters)

psycopg2.errors.UndefinedFunction: operator does not exist: bytea ~~* bytea

LINE 4: ...e' AND dag_run.state = 'running' AND dag_run.conf ILIKE '\x8...

^

HINT: No operator matches the given name and argument types. 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.8/site-packages/flask/app.py", line 2447, in wsgi_app

response = self.full_dispatch_request()

File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request

rv = self.handle_user_exception(e)

File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception

reraise(exc_type, exc_value, tb)

File "/usr/local/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise

raise value

File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request

rv = self.dispatch_request()

File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request

return self.view_functionsrule.endpoint

File "/usr/local/lib/python3.8/site-packages/flask_appbuilder/security/decorators.py", line 109, in wraps

return f(self, *args, **kwargs)

File "/usr/local/lib/python3.8/site-packages/flask_appbuilder/views.py", line 551, in list

widgets = self._list()

File "/usr/local/lib/python3.8/site-packages/flask_appbuilder/baseviews.py", line 1122, in _list

widgets = self._get_list_widget(

File "/usr/local/lib/python3.8/site-packages/flask_appbuilder/baseviews.py", line 1021, in _get_list_widget

count, lst = self.datamodel.query(

File "/usr/local/lib/python3.8/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.8/site-packages/flask_appbuilder/models/sqla/interface.py", line 346, in query_count

return self._apply_inner_all(

File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 3803, in count

return self.from_self(col).scalar()

File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 3523, in scalar

ret = self.one()

File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 3490, in one

ret = self.one_or_none()

File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 3459, in one_or_none

ret = list(self)

File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 3535, in iter

return self._execute_and_instances(context)

File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 3560, in _execute_and_instances

result = conn.execute(querycontext.statement, self._params)

File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1011, in execute

return meth(self, multiparams, params)

File "/usr/local/lib/python3.8/site-packages/sqlalchemy/sql/elements.py", line 298, in _execute_on_connection

return connection._execute_clauseelement(self, multiparams, params)

File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1124, in _execute_clauseelement

ret = self._execute_context(

File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1316, in _execute_context

self.handle_dbapi_exception(

File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1510, in handle_dbapi_exception

util.raise(

File "/usr/local/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 182, in raise

raise exception

File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1276, in _execute_context

self.dialect.do_execute(

File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 608, in do_execute

cursor.execute(statement, parameters)

sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedFunction) operator does not exist: bytea ~~* bytea

LINE 4: ...e' AND dag_run.state = 'running' AND dag_run.conf ILIKE '\x8...

^

HINT: No operator matches the given name and argument types. 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.dag_id = %(dag_id_1)s AND dag_run.state = %(state_1)s AND dag_run.conf ILIKE %(conf_1)s) AS anon_1]

[parameters: {'dag_id_1': 'privacy-scrubbing-service', 'state_1': 'running', 'conf_1': <psycopg2.extensions.Binary object at 0x7f2e119d90c0>}]

(Background on this error at: http://sqlalche.me/e/13/f405)

What you expected to happen:

Be able to search dag runs by conf contents

How to reproduce it:

Anything else we need to know:

Issue 2:
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:

Go to "Browse-> DAG Runs"

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_functionsrule.endpoint

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)`

What you expected to happen: Not crashed.

How to reproduce it: See above

Anything else we need to know: