You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Ash Berlin-Taylor (JIRA)" <ji...@apache.org> on 2019/03/27 15:44:00 UTC

[jira] [Resolved] (AIRFLOW-618) Fix failing refresh_from_db() query (affects unit tests)

     [ https://issues.apache.org/jira/browse/AIRFLOW-618?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ash Berlin-Taylor resolved AIRFLOW-618.
---------------------------------------
    Resolution: Done

> Fix failing refresh_from_db() query (affects unit tests)
> --------------------------------------------------------
>
>                 Key: AIRFLOW-618
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-618
>             Project: Apache Airflow
>          Issue Type: Bug
>            Reporter: Jeremiah Lowin
>            Priority: Major
>
> Travis runs are failing with sqllite. Commonly, the error is traced to: 
>   File "/home/travis/build/apache/incubator-airflow/airflow/models.py", line 3657, in refresh_from_db
>     ).one()
>   File "/home/travis/build/apache/incubator-airflow/.tox/py34-cdh-airflow_backend_sqlite/lib/python3.4/site-packages/sqlalchemy/orm/query.py", line 2760, in one
>     raise orm_exc.NoResultFound("No row was found for one()")
> nose.proxy.NoResultFound: No row was found for one()
> In other words, the database is finding no rows that match the query filter. Manually inspecting the database, I can see that the filter SHOULD succeed. It appears that manually casting the DateTime parameters as SQL DateTimes fixes the issue in this instance.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)