Laydas opened a new issue #16344:
URL: https://github.com/apache/airflow/issues/16344


   
   
   
   **Apache Airflow version**: 2.1.0
   
   
   **Kubernetes version (if you are using kubernetes)** (use `kubectl version`):
   
   **Environment**: 
   
   - **Cloud provider or hardware configuration**: AWS EC2 
   - **OS** (e.g. from /etc/os-release): Ubuntu 20.04
   - **Kernel** (e.g. `uname -a`): Linux ip-172-31-73-251 5.8.0-1035-aws 
#37~20.04.1-Ubuntu SMP Tue Jun 1 09:54:15 UTC 2021 x86_64 x86_64 x86_64 
GNU/Linux
   - **Install tools**: pip
   - **Others**:
   
   **What happened**:
   
   Followed the upgrade instructions in documentation and upgraded from airflow 
2.0.1 to 2.1.0
   
   Started webserver service and logged into UI, received the following screen.
   
   Something bad has happened.
   Please consider letting us know by creating a bug report using GitHub.
   
   Python version: 3.8.5
   Airflow version: 2.1.0
   Node: ip-172-31-73-251.ec2.internal
   
-------------------------------------------------------------------------------
   Traceback (most recent call last):
     File 
"/home/ubuntu/.local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", 
line 1276, in _execute_context
       self.dialect.do_execute(
     File 
"/home/ubuntu/.local/lib/python3.8/site-packages/sqlalchemy/engine/default.py", 
line 608, in do_execute
       cursor.execute(statement, parameters)
   psycopg2.errors.UndefinedColumn: column dag.last_parsed_time does not exist
   LINE 1: ...AS dag_is_subdag, dag.is_active AS dag_is_active, dag.last_p...
                                                                ^
   
   
   The above exception was the direct cause of the following exception:
   
   Traceback (most recent call last):
     File "/home/ubuntu/.local/lib/python3.8/site-packages/flask/app.py", line 
2447, in wsgi_app
       response = self.full_dispatch_request()
     File "/home/ubuntu/.local/lib/python3.8/site-packages/flask/app.py", line 
1952, in full_dispatch_request
       rv = self.handle_user_exception(e)
     File "/home/ubuntu/.local/lib/python3.8/site-packages/flask/app.py", line 
1821, in handle_user_exception
       reraise(exc_type, exc_value, tb)
     File "/home/ubuntu/.local/lib/python3.8/site-packages/flask/_compat.py", 
line 39, in reraise
       raise value
     File "/home/ubuntu/.local/lib/python3.8/site-packages/flask/app.py", line 
1950, in full_dispatch_request
       rv = self.dispatch_request()
     File "/home/ubuntu/.local/lib/python3.8/site-packages/flask/app.py", line 
1936, in dispatch_request
       return self.view_functions[rule.endpoint](**req.view_args)
     File 
"/home/ubuntu/.local/lib/python3.8/site-packages/airflow/www/auth.py", line 34, 
in decorated
       return func(*args, **kwargs)
     File 
"/home/ubuntu/.local/lib/python3.8/site-packages/airflow/www/views.py", line 
547, in index
       filter_dag_ids = current_app.appbuilder.sm.get_accessible_dag_ids(g.user)
     File 
"/home/ubuntu/.local/lib/python3.8/site-packages/airflow/www/security.py", line 
298, in get_accessible_dag_ids
       return {dag.dag_id for dag in accessible_dags}
     File 
"/home/ubuntu/.local/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 
3535, in __iter__
       return self._execute_and_instances(context)
     File 
"/home/ubuntu/.local/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 
3560, in _execute_and_instances
       result = conn.execute(querycontext.statement, self._params)
     File 
"/home/ubuntu/.local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", 
line 1011, in execute
       return meth(self, multiparams, params)
     File 
"/home/ubuntu/.local/lib/python3.8/site-packages/sqlalchemy/sql/elements.py", 
line 298, in _execute_on_connection
       return connection._execute_clauseelement(self, multiparams, params)
     File 
"/home/ubuntu/.local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", 
line 1124, in _execute_clauseelement
       ret = self._execute_context(
     File 
"/home/ubuntu/.local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", 
line 1316, in _execute_context
       self._handle_dbapi_exception(
     File 
"/home/ubuntu/.local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", 
line 1510, in _handle_dbapi_exception
       util.raise_(
     File 
"/home/ubuntu/.local/lib/python3.8/site-packages/sqlalchemy/util/compat.py", 
line 182, in raise_
       raise exception
     File 
"/home/ubuntu/.local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", 
line 1276, in _execute_context
       self.dialect.do_execute(
     File 
"/home/ubuntu/.local/lib/python3.8/site-packages/sqlalchemy/engine/default.py", 
line 608, in do_execute
       cursor.execute(statement, parameters)
   sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedColumn) column 
dag.last_parsed_time does not exist
   LINE 1: ...AS dag_is_subdag, dag.is_active AS dag_is_active, dag.last_p...
                                                                ^
   
   [SQL: SELECT dag.dag_id AS dag_dag_id, dag.root_dag_id AS dag_root_dag_id, 
dag.is_paused AS dag_is_paused, dag.is_subdag AS dag_is_subdag, dag.is_active 
AS dag_is_active, dag.last_parsed_time AS dag_last_parsed_time, 
dag.last_pickled AS dag_last_pickled, dag.last_expired AS dag_last_expired, 
dag.scheduler_lock AS dag_scheduler_lock, dag.pickle_id AS dag_pickle_id, 
dag.fileloc AS dag_fileloc, dag.owners AS dag_owners, dag.description AS 
dag_description, dag.default_view AS dag_default_view, dag.schedule_interval AS 
dag_schedule_interval, dag.concurrency AS dag_concurrency, 
dag.has_task_concurrency_limits AS dag_has_task_concurrency_limits, 
dag.next_dagrun AS dag_next_dagrun, dag.next_dagrun_create_after AS 
dag_next_dagrun_create_after 
   FROM dag]
   (Background on this error at: http://sqlalche.me/e/13/f405)
   
   **What you expected to happen**:
   
   Load the UI properly
   
   **How to reproduce it**:
   
   when running Airflow 2.0.1
   wget 
https://raw.githubusercontent.com/apache/airflow/constraints-2.1.0/constraints-3.8.txt
   pip install --upgrade apache-airflow[postgres]==2.1.0 --constraint 
constraints-3.8.txt
   
   **Anything else we need to know**:
   


-- 
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:
[email protected]


Reply via email to