airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AIRFLOW-660) Impossible to record second task failure
Date Thu, 08 Nov 2018 14:22:00 GMT

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

ASF GitHub Bot commented on AIRFLOW-660:
----------------------------------------

ashb closed pull request #1911: [AIRFLOW-660] Add id autoincrement column to task_fail table
URL: https://github.com/apache/incubator-airflow/pull/1911
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/airflow/models.py b/airflow/models.py
index 61ea359a0d..5cdab3aefb 100755
--- a/airflow/models.py
+++ b/airflow/models.py
@@ -1611,6 +1611,7 @@ class TaskFail(Base):
 
     __tablename__ = "task_fail"
 
+    id = Column(Integer, primary_key=True, autoincrement=True)
     task_id = Column(String(ID_LEN), primary_key=True)
     dag_id = Column(String(ID_LEN), primary_key=True)
     execution_date = Column(DateTime, primary_key=True)


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Impossible to record second task failure
> ----------------------------------------
>
>                 Key: AIRFLOW-660
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-660
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: db
>    Affects Versions: 1.8.0
>            Reporter: Alexander Shorin
>            Priority: Blocker
>
> {code}
> /var/log/airflow/airflow_scheduler_err.log.10: [SQL: 'INSERT INTO task_fail (task_id,
dag_id, execution_date, start_date, end_date, duration) VALUES (%(task_id)s, %(dag_id)s, %(execution_date)s,
%(start_date)s, %(end_date)s, %(duration)s)'] [parameters: {'task_id': 'test_task', 'end_date':
datetime.datetime(2016, 11, 30, 14, 38, 39, 197485), 'execution_date': datetime.datetime(2016,
11, 30, 0, 0), 'duration': 331.723087, 'start_date': datetime.datetime(2016, 11, 30, 14, 33,
7, 474398), 'dag_id': 'test_dag'}]
> /var/log/airflow/airflow_scheduler_err.log.10-Process DagFileProcessor314-Process:
> /var/log/airflow/airflow_scheduler_err.log.10-Traceback (most recent call last):
> /var/log/airflow/airflow_scheduler_err.log.10-  File "/usr/local/lib/python2.7/multiprocessing/process.py",
line 258, in _bootstrap
> /var/log/airflow/airflow_scheduler_err.log.10-    self.run()
> /var/log/airflow/airflow_scheduler_err.log.10-  File "/usr/local/lib/python2.7/multiprocessing/process.py",
line 114, in run
> /var/log/airflow/airflow_scheduler_err.log.10-    self._target(*self._args, **self._kwargs)
> /var/log/airflow/airflow_scheduler_err.log.10-  File "/usr/local/lib/python2.7/site-packages/airflow/jobs.py",
line 318, in helper
> /var/log/airflow/airflow_scheduler_err.log.10-    pickle_dags)
> /var/log/airflow/airflow_scheduler_err.log.10-  File "/usr/local/lib/python2.7/site-packages/airflow/utils/db.py",
line 56, in wrapper
> /var/log/airflow/airflow_scheduler_err.log.10-    session.commit()
> /var/log/airflow/airflow_scheduler_err.log.10-  File "/usr/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py",
line 813, in commit
> /var/log/airflow/airflow_scheduler_err.log.10-    self.transaction.commit()
> /var/log/airflow/airflow_scheduler_err.log.10-  File "/usr/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py",
line 390, in commit
> /var/log/airflow/airflow_scheduler_err.log.10-    self._assert_active(prepared_ok=True)
> /var/log/airflow/airflow_scheduler_err.log.10-  File "/usr/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py",
line 214, in _assert_active
> /var/log/airflow/airflow_scheduler_err.log.10-    % self._rollback_exception
> /var/log/airflow/airflow_scheduler_err.log.10:InvalidRequestError: This Session's transaction
has been rolled back due to a previous exception during flush. To begin a new transaction
with this Session, first issue Session.rollback(). Original exception was: (psycopg2.IntegrityError)
duplicate key value violates unique constraint "task_fail_pkey"
> /var/log/airflow/airflow_scheduler_err.log.10-DETAIL:  Key (task_id, dag_id, execution_date)=(test_dag,
test_task, 2016-11-30 00:00:00) already exists.
> {code}



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

Mime
View raw message