Open kaos opened 1 year ago
Mypy seemingly is a consistent source of headaches...
Related issue (same root cause?)
Partition #1 - resolve-a, ['CPython==3.8.*']:
Traceback (most recent call last):
File "/tmp/pants-sandbox-7SLpYn/.cache/pex_root/venvs/a02fcb9ba528002810305b[79](https://github.com/.../actions/runs/x/jobs/x?pr=x#step:5:80)x/ddab[80](https://github.com/.../actions/runs/x/jobs/x?pr=x#step:5:81)x/pex", line 284, in <module>
sys.exit(func())
File "/github/home/.cache/pants/named_caches/pex_root/venvs/s/1224b575/venv/lib/python3.8/site-packages/mypy/__main__.py", line 12, in console_entry
main(None, sys.stdout, sys.stderr)
File "mypy/main.py", line 96, in main
File "mypy/main.py", line 173, in run_build
File "mypy/build.py", line 154, in build
File "mypy/build.py", line 213, in _build
File "mypy/build.py", line 608, in __init__
File "mypy/build.py", line 1142, in create_metastore
File "mypy/metastore.py", line 175, in __init__
File "mypy/metastore.py", line 156, in connect_db
sqlite3.DatabaseError: database disk image is malformed
Partition #2 - resolve-b, ['CPython==3.8.*']:
Success: no issues found in 7[95](https://github.com/.../actions/runs/x/jobs/x?pr=x#step:5:96) source files
No, thats different. I split the issue, and will attempt to tackle it
Describe the bug Once every third blue moon I observe mypy crashing with "internal error" for perfectly valid sources.
Pants version 2.16.0a0 (but have observed this since ~2.14 or before)
OS Mac
Additional info
Reading the comment in
__mypyrunner.sh
my suspicion falls on a corrupt mypy cache, as this issue goes away every time I wipe the pants caches and there are some trickery going on with it.The
cache.db
sqlite file seems to not be corrupt though. (as in it is usable, not sure about the state of the contents in the DB itself)Minimal work-around To preserve as much cache as possible, this wipes the mypy caches only: