airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "sam sen (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (AIRFLOW-1220) Can't clear airflow jobs when using schedule_interval of None
Date Wed, 17 May 2017 14:08:04 GMT

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

sam sen updated AIRFLOW-1220:
-----------------------------
    Description: 
My dag is set to use `schedule_interval=None`. I'm attempting to clear jobs so I can re-run
failed jobs but I'm encountering the following errors. 

{code:txt}
[2017-05-17 14:02:14,718] {models.py:3834} WARNING - Could not update dag stats for s3_dag_test
[2017-05-17 14:02:14,718] {models.py:3835} ERROR - can't compare datetime.datetime to NoneType
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/airflow/models.py", line 3831, in set_dirty
    session.commit()
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/session.py", line 874, in commit
    self.transaction.commit()
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/session.py", line 461, in commit
    self._prepare_impl()
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/session.py", line 441, in _prepare_impl
    self.session.flush()
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/session.py", line 2139, in flush
    self._flush(objects)
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/session.py", line 2259, in _flush
    transaction.rollback(_capture_exception=True)
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/util/langhelpers.py", line 66, in __exit__
    compat.reraise(exc_type, exc_value, exc_tb)
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/session.py", line 2223, in _flush
    flush_context.execute()
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 389, in execute
    rec.execute(self)
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 577, in execute
    uow
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 243, in delete_obj
    uowtransaction))
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 357, in _organize_states_for_delete
    states):
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 1108, in _connections_for_states
    for state in _sort_states(states):
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 1130, in _sort_states
    sorted(persistent, key=lambda q: q.key[1])
TypeError: can't compare datetime.datetime to NoneType
{code}

  was:
My dag is set to use `schedule_interval=None`. I'm attempting to clear jobs so I can re-run
failed jobs but I'm encountering the following errors. 

<code>
[2017-05-17 14:02:14,718] {models.py:3834} WARNING - Could not update dag stats for s3_dag_test
[2017-05-17 14:02:14,718] {models.py:3835} ERROR - can't compare datetime.datetime to NoneType
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/airflow/models.py", line 3831, in set_dirty
    session.commit()
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/session.py", line 874, in commit
    self.transaction.commit()
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/session.py", line 461, in commit
    self._prepare_impl()
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/session.py", line 441, in _prepare_impl
    self.session.flush()
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/session.py", line 2139, in flush
    self._flush(objects)
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/session.py", line 2259, in _flush
    transaction.rollback(_capture_exception=True)
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/util/langhelpers.py", line 66, in __exit__
    compat.reraise(exc_type, exc_value, exc_tb)
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/session.py", line 2223, in _flush
    flush_context.execute()
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 389, in execute
    rec.execute(self)
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 577, in execute
    uow
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 243, in delete_obj
    uowtransaction))
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 357, in _organize_states_for_delete
    states):
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 1108, in _connections_for_states
    for state in _sort_states(states):
  File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 1130, in _sort_states
    sorted(persistent, key=lambda q: q.key[1])
TypeError: can't compare datetime.datetime to NoneType
</code>


> Can't clear airflow jobs when using schedule_interval of None
> -------------------------------------------------------------
>
>                 Key: AIRFLOW-1220
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-1220
>             Project: Apache Airflow
>          Issue Type: Bug
>            Reporter: sam sen
>
> My dag is set to use `schedule_interval=None`. I'm attempting to clear jobs so I can
re-run failed jobs but I'm encountering the following errors. 
> {code:txt}
> [2017-05-17 14:02:14,718] {models.py:3834} WARNING - Could not update dag stats for s3_dag_test
> [2017-05-17 14:02:14,718] {models.py:3835} ERROR - can't compare datetime.datetime to
NoneType
> Traceback (most recent call last):
>   File "/usr/lib/python2.7/site-packages/airflow/models.py", line 3831, in set_dirty
>     session.commit()
>   File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/session.py", line 874, in commit
>     self.transaction.commit()
>   File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/session.py", line 461, in commit
>     self._prepare_impl()
>   File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/session.py", line 441, in _prepare_impl
>     self.session.flush()
>   File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/session.py", line 2139, in
flush
>     self._flush(objects)
>   File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/session.py", line 2259, in
_flush
>     transaction.rollback(_capture_exception=True)
>   File "/usr/lib64/python2.7/site-packages/sqlalchemy/util/langhelpers.py", line 66,
in __exit__
>     compat.reraise(exc_type, exc_value, exc_tb)
>   File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/session.py", line 2223, in
_flush
>     flush_context.execute()
>   File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 389, in
execute
>     rec.execute(self)
>   File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 577, in
execute
>     uow
>   File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 243,
in delete_obj
>     uowtransaction))
>   File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 357,
in _organize_states_for_delete
>     states):
>   File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 1108,
in _connections_for_states
>     for state in _sort_states(states):
>   File "/usr/lib64/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 1130,
in _sort_states
>     sorted(persistent, key=lambda q: q.key[1])
> TypeError: can't compare datetime.datetime to NoneType
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message