[
https://issues.apache.org/jira/browse/AIRFLOW-2806?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16796495#comment-16796495
]
Kaxil Naik commented on AIRFLOW-2806:
-------------------------------------
[~gcuriel] Can you link the issue that resolved this?
> test_mark_success_no_kill test breaks intermittently on CI
> ----------------------------------------------------------
>
> Key: AIRFLOW-2806
> URL: https://issues.apache.org/jira/browse/AIRFLOW-2806
> Project: Apache Airflow
> Issue Type: Bug
> Reporter: Taylor Edmiston
> Assignee: Taylor Edmiston
> Priority: Minor
>
> The test_mark_success_no_kill test is breaking intermittently on the CI for
> some versions of Python and some databases, particularly Python 3.5 for both
> PostgreSQL and MySQL.
> A traceback of the error is
> ([link|https://travis-ci.org/apache/incubator-airflow/jobs/407522994#L5668-L5701]):
> {code:java}
> 10) ERROR: test_mark_success_no_kill (tests.transplant_class.<locals>.C)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> tests/jobs.py line 1116 in test_mark_success_no_kill
> ti.refresh_from_db()
> airflow/utils/db.py line 74 in wrapper
> return func(*args, **kwargs)
> /opt/python/3.5.5/lib/python3.5/contextlib.py line 66 in __exit__
> next(self.gen)
> airflow/utils/db.py line 45 in create_session
> session.commit()
>
> .tox/py35-backend_postgres/lib/python3.5/site-packages/sqlalchemy/orm/session.py
> line 927 in commit
> self.transaction.commit()
>
> .tox/py35-backend_postgres/lib/python3.5/site-packages/sqlalchemy/orm/session.py
> line 471 in commit
> t[1].commit()
>
> .tox/py35-backend_postgres/lib/python3.5/site-packages/sqlalchemy/engine/base.py
> line 1632 in commit
> self._do_commit()
>
> .tox/py35-backend_postgres/lib/python3.5/site-packages/sqlalchemy/engine/base.py
> line 1663 in _do_commit
> self.connection._commit_impl()
>
> .tox/py35-backend_postgres/lib/python3.5/site-packages/sqlalchemy/engine/base.py
> line 723 in _commit_impl
> self._handle_dbapi_exception(e, None, None, None, None)
>
> .tox/py35-backend_postgres/lib/python3.5/site-packages/sqlalchemy/engine/base.py
> line 1402 in _handle_dbapi_exception
> exc_info
>
> .tox/py35-backend_postgres/lib/python3.5/site-packages/sqlalchemy/util/compat.py
> line 203 in raise_from_cause
> reraise(type(exception), exception, tb=exc_tb, cause=cause)
>
> .tox/py35-backend_postgres/lib/python3.5/site-packages/sqlalchemy/util/compat.py
> line 186 in reraise
> raise value.with_traceback(tb)
>
> .tox/py35-backend_postgres/lib/python3.5/site-packages/sqlalchemy/engine/base.py
> line 721 in _commit_impl
> self.engine.dialect.do_commit(self.connection)
>
> .tox/py35-backend_postgres/lib/python3.5/site-packages/sqlalchemy/engine/default.py
> line 443 in do_commit
> dbapi_connection.commit()
> OperationalError: (psycopg2.OperationalError) server closed the connection
> unexpectedly
> This probably means the server terminated abnormally{code}
> It seems to be erroring out on trying to
> [commit|http://initd.org/psycopg/docs/connection.html#connection.commit] the
> pending transaction to the database, possibly because the connection has been
> closed. What's weird is that this line is already in a try-except block
> catching all exceptions, but I think it's somehow not entering the except
> clause.
> [https://github.com/apache/incubator-airflow/blob/f3b6b60c4809afdde916e8982a300f942f26109b/airflow/utils/db.py#L36-L50]
> Note: This is a follow up to AIRFLOW-2801 ([PR
> #3642|https://github.com/apache/incubator-airflow/pull/3642]) which provided
> a short-term solution by skipping the flaky test.
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)