[
https://issues.apache.org/jira/browse/AIRFLOW-2806?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16569314#comment-16569314
]
ASF GitHub Bot commented on AIRFLOW-2806:
-----------------------------------------
tedmiston closed pull request #3646: [WIP][AIRFLOW-2806]
test_mark_success_no_kill test breaks intermittently on CI
URL: https://github.com/apache/incubator-airflow/pull/3646
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/.travis.yml b/.travis.yml
index 81e43fb4b8..3f41d6525d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -54,15 +54,15 @@ env:
# does not work with python 3
- BOTO_CONFIG=/tmp/bogusvalue
matrix:
- - TOX_ENV=py27-backend_mysql
- - TOX_ENV=py27-backend_sqlite
- - TOX_ENV=py27-backend_postgres
- - TOX_ENV=py35-backend_mysql
- - TOX_ENV=py35-backend_sqlite
+ # - TOX_ENV=py27-backend_mysql
+ # - TOX_ENV=py27-backend_sqlite
+ # - TOX_ENV=py27-backend_postgres
+ # - TOX_ENV=py35-backend_mysql
+ # - TOX_ENV=py35-backend_sqlite
- TOX_ENV=py35-backend_postgres
- - TOX_ENV=flake8
- - TOX_ENV=py27-backend_postgres KUBERNETES_VERSION=v1.9.0
- - TOX_ENV=py35-backend_postgres KUBERNETES_VERSION=v1.10.0
+ # - TOX_ENV=flake8
+ # - TOX_ENV=py27-backend_postgres KUBERNETES_VERSION=v1.9.0
+ # - TOX_ENV=py35-backend_postgres KUBERNETES_VERSION=v1.10.0
matrix:
exclude:
- python: "3.5"
diff --git a/scripts/ci/kubernetes/docker/Dockerfile
b/scripts/ci/kubernetes/docker/Dockerfile
index 498c47b21a..ef72a6c08c 100644
--- a/scripts/ci/kubernetes/docker/Dockerfile
+++ b/scripts/ci/kubernetes/docker/Dockerfile
@@ -40,7 +40,7 @@ RUN pip install --upgrade pip
RUN pip install -U setuptools && \
pip install kubernetes && \
pip install cryptography && \
- pip install psycopg2-binary==2.7.4 # I had issues with older versions of
psycopg2, just a warning
+ pip install psycopg2-binary>=2.7.4 # I had issues with older versions of
psycopg2, just a warning
# install airflow
COPY airflow.tar.gz /tmp/airflow.tar.gz
diff --git a/setup.py b/setup.py
index 50af30944e..bf4ce1d1cf 100644
--- a/setup.py
+++ b/setup.py
@@ -299,7 +299,7 @@ def do_setup():
'python-nvd3==0.15.0',
'requests>=2.5.1, <3',
'setproctitle>=1.1.8, <2',
- 'sqlalchemy>=1.1.15, <1.2.0',
+ 'sqlalchemy>=1.1.15, <1.3.0',
'sqlalchemy-utc>=0.9.0',
'tabulate>=0.7.5, <0.8.0',
'tenacity==4.8.0',
diff --git a/tests/jobs.py b/tests/jobs.py
index 93f6574df4..d4184236d8 100644
--- a/tests/jobs.py
+++ b/tests/jobs.py
@@ -1086,10 +1086,10 @@ def test_localtaskjob_heartbeat(self, mock_pid):
mock_pid.return_value = 2
self.assertRaises(AirflowException, job1.heartbeat_callback)
- @unittest.skipIf('mysql' in configuration.conf.get('core',
'sql_alchemy_conn'),
- "flaky when run on mysql")
- @unittest.skipIf('postgresql' in configuration.conf.get('core',
'sql_alchemy_conn'),
- 'flaky when run on postgresql')
+ # @unittest.skipIf('mysql' in configuration.conf.get('core',
'sql_alchemy_conn'),
+ # "flaky when run on mysql")
+ # @unittest.skipIf('postgresql' in configuration.conf.get('core',
'sql_alchemy_conn'),
+ # 'flaky when run on postgresql')
def test_mark_success_no_kill(self):
"""
Test that ensures that mark_success in the UI doesn't cause
----------------------------------------------------------------
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:
[email protected]
> 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)