[ 
https://issues.apache.org/jira/browse/AIRFLOW-4993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16889463#comment-16889463
 ] 

Hoai-Thu Vuong commented on AIRFLOW-4993:
-----------------------------------------

I think this bug is fixed, This doesn't happen on master 

> Invalid parameter of paging on DAG admin page
> ---------------------------------------------
>
>                 Key: AIRFLOW-4993
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-4993
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: ui
>    Affects Versions: 1.10.3
>            Reporter: Hoai-Thu Vuong
>            Priority: Minor
>
> I deployed a airflow system on kubernetes cluster (minikube), everything is 
> empty. when i click to button >> to move the next page (i attach the url, 
> which is requested below)
> {code:java}
> // code placeholder
> http://example.com:8080/admin/?page=-1&search={code}
> an exception is threw, and this is a track log 
>  
> {code:java}
> // code placeholder
> Ooops.
>                           ____/ (  (    )   )  \___
>                          /( (  (  )   _    ))  )   )\
>                        ((     (   )(    )  )   (   )  )
>                      ((/  ( _(   )   (   _) ) (  () )  )
>                     ( (  ( (_)   ((    (   )  .((_ ) .  )_
>                    ( (  )    (      (  )    )   ) . ) (   )
>                   (  (   (  (   ) (  _  ( _) ).  ) . ) ) ( )
>                   ( (  (   ) (  )   (  ))     ) _)(   )  )  )
>                  ( (  ( \ ) (    (_  ( ) ( )  )   ) )  )) ( )
>                   (  (   (  (   (_ ( ) ( _    )  ) (  )  )   )
>                  ( (  ( (  (  )     (_  )  ) )  _)   ) _( ( )
>                   ((  (   )(    (     _    )   _) _(_ (  (_ )
>                    (_((__(_(__(( ( ( |  ) ) ) )_))__))_)___)
>                    ((__)        \\||lll|l||///          \_))
>                             (   /(/ (  )  ) )\   )
>                           (    ( ( ( | | ) ) )\   )
>                            (   /(| / ( )) ) ) )) )
>                          (     ( ((((_(|)_)))))     )
>                           (      ||\(|(|)|/||     )
>                         (        |(||(||)||||        )
>                           (     //|/l|||)|\\ \     )
>                         (/ / //  /|//||||\\  \ \  \ _)
> -------------------------------------------------------------------------------
> Node: airflow-dev-web-7bc4fcd9df-ltgsl
> -------------------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", 
> line 1236, in _execute_context
>     cursor, statement, parameters, context
>   File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/default.py", 
> line 536, in do_execute
>     cursor.execute(statement, parameters)
> psycopg2.DataError: OFFSET must not be negative
> 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 2311, in 
> wsgi_app
>     response = self.full_dispatch_request()
>   File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1834, in 
> full_dispatch_request
>     rv = self.handle_user_exception(e)
>   File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1737, in 
> handle_user_exception
>     reraise(exc_type, exc_value, tb)
>   File "/usr/local/lib/python3.6/site-packages/flask/_compat.py", line 36, in 
> reraise
>     raise value
>   File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1832, in 
> full_dispatch_request
>     rv = self.dispatch_request()
>   File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1818, in 
> dispatch_request
>     return self.view_functions[rule.endpoint](**req.view_args)
>   File "/usr/local/lib/python3.6/site-packages/flask_admin/base.py", line 69, 
> in inner
>     return self._run_view(f, *args, **kwargs)
>   File "/usr/local/lib/python3.6/site-packages/flask_admin/base.py", line 
> 368, in _run_view
>     return fn(self, *args, **kwargs)
>   File "/usr/local/lib/python3.6/site-packages/flask_login/utils.py", line 
> 258, in decorated_view
>     return func(*args, **kwargs)
>   File "/usr/local/lib/python3.6/site-packages/airflow/utils/db.py", line 73, 
> in wrapper
>     return func(*args, **kwargs)
>   File "/usr/local/lib/python3.6/site-packages/airflow/www/views.py", line 
> 2152, in index
>     dags = query.offset(start).limit(dags_per_page).all()
>   File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line 
> 2925, in all
>     return list(self)
>   File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line 
> 3081, in __iter__
>     return self._execute_and_instances(context)
>   File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line 
> 3106, in _execute_and_instances
>     result = conn.execute(querycontext.statement, self._params)
>   File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", 
> line 980, in execute
>     return meth(self, multiparams, params)
>   File "/usr/local/lib/python3.6/site-packages/sqlalchemy/sql/elements.py", 
> line 273, in _execute_on_connection
>     return connection._execute_clauseelement(self, multiparams, params)
>   File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", 
> line 1099, in _execute_clauseelement
>     distilled_params,
>   File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", 
> line 1240, in _execute_context
>     e, statement, parameters, cursor, context
>   File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", 
> line 1458, in _handle_dbapi_exception
>     util.raise_from_cause(sqlalchemy_exception, exc_info)
>   File "/usr/local/lib/python3.6/site-packages/sqlalchemy/util/compat.py", 
> line 296, in raise_from_cause
>     reraise(type(exception), exception, tb=exc_tb, cause=cause)
>   File "/usr/local/lib/python3.6/site-packages/sqlalchemy/util/compat.py", 
> line 276, in reraise
>     raise value.with_traceback(tb)
>   File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/base.py", 
> line 1236, in _execute_context
>     cursor, statement, parameters, context
>   File "/usr/local/lib/python3.6/site-packages/sqlalchemy/engine/default.py", 
> line 536, in do_execute
>     cursor.execute(statement, parameters)
> sqlalchemy.exc.DataError: (psycopg2.DataError) OFFSET must not be negative
>  [SQL: 'SELECT dag.dag_id AS dag_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_scheduler_run AS dag_last_scheduler_run, 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 \nFROM dag \nWHERE NOT dag.is_subdag AND dag.is_active 
> ORDER BY dag.dag_id \n LIMIT %(param_1)s OFFSET %(param_2)s'] [parameters: 
> {'param_1': 100, 'param_2': -100}] (Background on this error at: 
> http://sqlalche.me/e/9h9h)
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to