Description
Describe the bug
As the title said, this bug appears in my project's action.
To Reproduce
This problem has been seen in python 3.8 once (in the previous attempt of the link above), and in python 3.9 in the latest attempt.
There are many manual forks and pipes in my code, so I guess it may have something to do with these (in fact, I haven't seen such errors in other projects, and I use version 6.2 coverage). It can not be stably reproduced, and only seen in the github action. I have never seen this error in my local environment. The error message is like this
test/utils/test_units.py::TestUtilsUnits::test_time_to_delta_str PASSED
test/utils/test_value.py::TestUtilsValue::test_value_proxy_init PASSED
test/utils/test_value.py::TestUtilsValue::test_value_proxy_set PASSED
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR> File "/usr/local/lib/python3.9/site-packages/coverage/sqldata.py", line 1100, in execute
INTERNALERROR> return self.con.execute(sql, parameters)
INTERNALERROR> sqlite3.OperationalError: no such table: file
INTERNALERROR>
INTERNALERROR> During handling of the above exception, another exception occurred:
INTERNALERROR>
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR> File "/usr/local/lib/python3.9/site-packages/coverage/sqldata.py", line 1105, in execute
INTERNALERROR> return self.con.execute(sql, parameters)
INTERNALERROR> sqlite3.OperationalError: no such table: file
INTERNALERROR>
INTERNALERROR> The above exception was the direct cause of the following exception:
INTERNALERROR>
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR> File "/usr/local/lib/python3.9/site-packages/_pytest/main.py", line 269, in wrap_session
INTERNALERROR> session.exitstatus = doit(config, session) or 0
INTERNALERROR> File "/usr/local/lib/python3.9/site-packages/_pytest/main.py", line 323, in _main
INTERNALERROR> config.hook.pytest_runtestloop(session=session)
INTERNALERROR> File "/usr/local/lib/python3.9/site-packages/pluggy/_hooks.py", line 265, in __call__
INTERNALERROR> return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
INTERNALERROR> File "/usr/local/lib/python3.9/site-packages/pluggy/_manager.py", line 80, in _hookexec
INTERNALERROR> return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR> File "/usr/local/lib/python3.9/site-packages/pluggy/_callers.py", line 55, in _multicall
INTERNALERROR> gen.send(outcome)
INTERNALERROR> File "/usr/local/lib/python3.9/site-packages/pytest_cov/plugin.py", line 294, in pytest_runtestloop
INTERNALERROR> self.cov_controller.finish()
INTERNALERROR> File "/usr/local/lib/python3.9/site-packages/pytest_cov/engine.py", line 44, in ensure_topdir_wrapper
INTERNALERROR> return meth(self, *args, **kwargs)
INTERNALERROR> File "/usr/local/lib/python3.9/site-packages/pytest_cov/engine.py", line 230, in finish
INTERNALERROR> self.cov.stop()
INTERNALERROR> File "/usr/local/lib/python3.9/site-packages/coverage/control.py", line 722, in combine
INTERNALERROR> combine_parallel_data(
INTERNALERROR> File "/usr/local/lib/python3.9/site-packages/coverage/data.py", line 131, in combine_parallel_data
INTERNALERROR> data.update(new_data, aliases=aliases)
INTERNALERROR> File "/usr/local/lib/python3.9/site-packages/coverage/sqldata.py", line 659, in update
INTERNALERROR> this_tracers = {path: "" for path, in conn.execute("select path from file")}
INTERNALERROR> File "/usr/local/lib/python3.9/site-packages/coverage/sqldata.py", line 1122, in execute
INTERNALERROR> raise DataError(f"Couldn't use data file {self.filename!r}: {msg}") from exc
INTERNALERROR> coverage.exceptions.DataError: Couldn't use data file '/__w/pji/pji/.coverage': no such table: file
======================= 319 passed, 1 warning in 45.06s ========================
make: *** [Makefile:17: unittest] Error 3
Error: Process completed with exit code 2.
Expected behavior
Well I think it should be ended up properly like the other jobs.
Additional context
How to run my project.
After clone it, you may run
make run_dev
to enter a docker-based system (This step is necessary because this project need root permission). And then install the python dependencies
pip install -r requirements.txt
pip install -r requirements-test.txt
Finally, perform unit tests
make unittest