Package: src:python-molotov Version: 1.6-3 Severity: serious Tags: ftbfs patch
Dear maintainer: I tried to build this package in buster but it failed: -------------------------------------------------------------------------------- [...] debian/rules build-indep dh build-indep --with python3 --buildsystem=pybuild dh_update_autotools_config -i -O--buildsystem=pybuild dh_autoreconf -i -O--buildsystem=pybuild dh_auto_configure -i -O--buildsystem=pybuild I: pybuild base:217: python3.7 setup.py config running config dh_auto_build -i -O--buildsystem=pybuild I: pybuild base:217: /usr/bin/python3 setup.py build running build running build_py creating /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_molotov/build/molotov copying molotov/sharedcounter.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_molotov/build/molotov copying molotov/run.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_molotov/build/molotov copying molotov/api.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_molotov/build/molotov copying molotov/runner.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_molotov/build/molotov copying molotov/sharedconsole.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_molotov/build/molotov copying molotov/session.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_molotov/build/molotov copying molotov/slave.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_molotov/build/molotov copying molotov/__init__.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_molotov/build/molotov copying molotov/util.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_molotov/build/molotov copying molotov/stats.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_molotov/build/molotov copying molotov/listeners.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_molotov/build/molotov copying molotov/worker.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_molotov/build/molotov creating /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_molotov/build/molotov/tests copying molotov/tests/example.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_molotov/build/molotov/tests copying molotov/tests/statsd.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_molotov/build/molotov/tests copying molotov/tests/example7.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_molotov/build/molotov/tests copying molotov/tests/test_session.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_molotov/build/molotov/tests copying molotov/tests/example8.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_molotov/build/molotov/tests copying molotov/tests/test_util.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_molotov/build/molotov/tests copying molotov/tests/test_quickstart.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_molotov/build/molotov/tests copying molotov/tests/example5.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_molotov/build/molotov/tests copying molotov/tests/test_sharedconsole.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_molotov/build/molotov/tests copying molotov/tests/test_sharedcounter.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_molotov/build/molotov/tests copying molotov/tests/example4.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_molotov/build/molotov/tests copying molotov/tests/test_slave.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_molotov/build/molotov/tests copying molotov/tests/test_fmwk.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_molotov/build/molotov/tests copying molotov/tests/support.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_molotov/build/molotov/tests copying molotov/tests/test_api.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_molotov/build/molotov/tests copying molotov/tests/test_run.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_molotov/build/molotov/tests copying molotov/tests/__init__.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_molotov/build/molotov/tests copying molotov/tests/test_listeners.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_molotov/build/molotov/tests copying molotov/tests/example6.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_molotov/build/molotov/tests copying molotov/tests/example2.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_molotov/build/molotov/tests copying molotov/tests/example3.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_molotov/build/molotov/tests creating /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_molotov/build/molotov/quickstart copying molotov/quickstart/loadtest.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_molotov/build/molotov/quickstart copying molotov/quickstart/__init__.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_molotov/build/molotov/quickstart running egg_info writing molotov.egg-info/PKG-INFO writing dependency_links to molotov.egg-info/dependency_links.txt writing entry points to molotov.egg-info/entry_points.txt writing requirements to molotov.egg-info/requires.txt writing top-level names to molotov.egg-info/top_level.txt reading manifest file 'molotov.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no files found matching 'CHANGES.rst' writing manifest file 'molotov.egg-info/SOURCES.txt' copying molotov/tests/molotov.json -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_molotov/build/molotov/tests copying molotov/quickstart/Makefile -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_molotov/build/molotov/quickstart copying molotov/quickstart/molotov.json -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.7_molotov/build/molotov/quickstart debian/rules override_dh_auto_test make[1]: Entering directory '/<<PKGBUILDDIR>>' PYBUILD_SYSTEM=custom PYTHONPATH=. dh_auto_test I: pybuild base:217: python3.7 -m pytest ============================= test session starts ============================== platform linux -- Python 3.7.3rc1, pytest-3.10.1, py-1.7.0, pluggy-0.8.0 rootdir: /<<PKGBUILDDIR>>, inifile: collected 86 items molotov/tests/test_api.py ....... [ 8%] molotov/tests/test_fmwk.py ............s..... [ 29%] molotov/tests/test_listeners.py .. [ 31%] molotov/tests/test_quickstart.py ... [ 34%] molotov/tests/test_run.py .....................F.......s. [ 70%] molotov/tests/test_session.py sssssssssss [ 83%] molotov/tests/test_sharedconsole.py .. [ 86%] molotov/tests/test_sharedcounter.py .... [ 90%] molotov/tests/test_slave.py sss [ 94%] molotov/tests/test_util.py ..... [100%] =================================== FAILURES =================================== _____________________ TestRunner.test_statsd_multiprocess ______________________ self = <molotov.tests.test_run.TestRunner testMethod=test_statsd_multiprocess> @dedicatedloop_noclose def test_statsd_multiprocess(self): test_loop = asyncio.get_event_loop() @scenario() async def staty(session): session.statsd.incr('yopla') server = UDPServer('127.0.0.1', 9999, loop=test_loop) _stop = asyncio.Future() async def stop(): await _stop await server.stop() server_task = asyncio.ensure_future(server.run()) stop_task = asyncio.ensure_future(stop()) args = self._get_args() args.verbose = 2 args.processes = 2 args.max_runs = 5 args.duration = 1000 args.statsd = True args.statsd_address = 'udp://127.0.0.1:9999' args.single_mode = 'staty' args.scenario = 'molotov.tests.test_run' run(args) _stop.set_result(True) test_loop.run_until_complete(asyncio.gather(server_task, stop_task)) udp = server.flush() incrs = 0 for line in udp: for el in line.split(b'\n'): if el.strip() == b'': continue incrs += 1 # two processes making 5 run each > self.assertEqual(incrs, 10) E AssertionError: 6 != 10 molotov/tests/test_run.py:427: AssertionError ----------------------------- Captured stdout call ----------------------------- **** Molotov v1.6. Happy breaking! **** Forking 2 processes [28463] **** RUNNING IN DEBUG MODE == SLOW **** [28463] Preparing 1 worker... [28463] OK SUCCESSES: 1 | FAILURES: 0 | WORKERS: 1 [28464] **** RUNNING IN DEBUG MODE == SLOW **** [28464] Preparing 1 worker... [28464] OK SUCCESSES: 6 | FAILURES: 0 | WORKERS: 1 SUCCESSES: 6 | FAILURES: 0 | WORKERS: 1 SUCCESSES: 7 | FAILURES: 0 | WORKERS: 1 SUCCESSES: 10 | FAILURES: 0 | WORKERS: 1 SUCCESSES: 10 | FAILURES: 0 | WORKERS: 0 SUCCESSES: 10 | FAILURES: 0 | WORKERS: 0 SUCCESSES: 10 | FAILURES: 0 | WORKERS: 0 SUCCESSES: 10 | FAILURES: 0 *** Bye *** None =============================== warnings summary =============================== molotov/session.py:43 /<<PKGBUILDDIR>>/molotov/session.py:43: DeprecationWarning: Inheritance class LoggedClientSession from ClientSession is discouraged class LoggedClientSession(ClientSession): molotov/tests/test_sharedconsole.py:17 /<<PKGBUILDDIR>>/molotov/tests/test_sharedconsole.py:17: DeprecationWarning: invalid escape sequence \( TypeError\("unsupported operand type.*""" molotov/tests/test_run.py::TestRunner::test_redirect /usr/lib/python3/dist-packages/aiomeasures/reporters/statsd_reporter.py:42: DeprecationWarning: 'with (yield from lock)' is deprecated use 'async with lock' instead with (yield from self._connecting): /<<PKGBUILDDIR>>/molotov/listeners.py:73: DeprecationWarning: unread_data() is deprecated and will be removed in future releases (#3260) response.content.unread_data(content) /<<PKGBUILDDIR>>/molotov/listeners.py:73: DeprecationWarning: unread_data() is deprecated and will be removed in future releases (#3260) response.content.unread_data(content) molotov/tests/test_run.py::TestRunner::test_runner /usr/lib/python3/dist-packages/aiomeasures/reporters/statsd_reporter.py:42: DeprecationWarning: 'with (yield from lock)' is deprecated use 'async with lock' instead with (yield from self._connecting): /usr/lib/python3/dist-packages/aiomeasures/reporters/statsd_reporter.py:42: DeprecationWarning: 'with (yield from lock)' is deprecated use 'async with lock' instead with (yield from self._connecting): molotov/tests/test_run.py::TestRunner::test_slow_server_force_shutdown /usr/lib/python3/dist-packages/aiomeasures/reporters/statsd_reporter.py:42: DeprecationWarning: 'with (yield from lock)' is deprecated use 'async with lock' instead with (yield from self._connecting): molotov/tests/test_run.py::TestRunner::test_slow_server_graceful /usr/lib/python3/dist-packages/aiomeasures/reporters/statsd_reporter.py:42: DeprecationWarning: 'with (yield from lock)' is deprecated use 'async with lock' instead with (yield from self._connecting): -- Docs: https://docs.pytest.org/en/latest/warnings.html ========= 1 failed, 69 passed, 16 skipped, 9 warnings in 69.17 seconds ========= E: Build killed with signal TERM after 60 minutes of inactivity -------------------------------------------------------------------------------- This is only one of the two ways it fails. The other one is like this: ratio = float(_RES2['fail']) / float(_RES2['succ']) * 100. > self.assertTrue(ratio < 15. and ratio >= 5., ratio) E AssertionError: False is not true : 4.970357726263238 I've put a bunch of failed build logs here, from my own autobuilders: https://people.debian.org/~sanvila/build-logs/python-molotov/ The random failures also happen here: https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/python-molotov.html If the fact that those two tests fail does not mean that the package is broken, I recommend skipping them, as in the patch below, because packages are not supposed to FTBFS randomly. On the other hand, if the fact that those two tests mean the package is broken and you need a test machine to reproduce it, please contact me privately and I will gladly offer a test machine where this happens. Thanks. --- a/molotov/tests/test_run.py +++ b/molotov/tests/test_run.py @@ -1,6 +1,7 @@ import time import random import os +import pytest import signal import asyncio from unittest.mock import patch @@ -332,6 +333,7 @@ class TestRunner(TestLoop): self.assertTrue(wanted in stdout, stdout) @dedicatedloop + @pytest.mark.skip(reason="This test is not reliable") def test_sizing(self): _RES2['fail'] = 0 _RES2['succ'] = 0 @@ -384,6 +386,7 @@ class TestRunner(TestLoop): self.assertTrue(ratio >= 5., ratio) @dedicatedloop_noclose + @pytest.mark.skip(reason="This test is not reliable") def test_statsd_multiprocess(self): test_loop = asyncio.get_event_loop()