Skip to content

Random/flaky "No source for code" errors #2195

Description

@MetRonnie

Describe the bug
When running coverage xml or coverage report in GH Actions, it randomly fails sometimes for no apparent reason, with "No source for code" for code that definitely exists.

To Reproduce
Sorry, no idea how to reproduce as it only happens randomly. See https://github.com/MetRonnie/cylc-uiserver/actions/runs/27684815724/job/81880877487 where I set up 9 identical jobs and it failed in 2 of them.

Answer the questions below:

  1. What version of Python are you using? 3.14.6
  2. What version of coverage.py shows the problem? The output of coverage debug sys is helpful. 7.14.1
  3. What versions of what packages do you have installed? The output of pip freeze is helpful. See additional context
  4. What code shows the problem? Give us a specific commit of a specific repo that we can check out. If you've already worked around the problem, please provide a commit before that fix. https://github.com/MetRonnie/cylc-uiserver/tree/c2780c8ff711a25dcbfc1a85425fbe777794916c
  5. What commands should we run to reproduce the problem? Be specific. Include everything, even git clone, pip install, and so on. Explain like we're five! Rather involved setup to get the tests running, so will only provide if we can't figure out some debugging info directly from the GH Actions runner

Expected behavior
No flaky "No source for code" failure

Additional context

Pip packages

alembic-1.18.4
annotated_types-0.7.0
annotated-doc-0.0.4
ansimarkup-2.2.0
anyio-4.14.0
argon2-cffi-25.1.0
argon2-cffi-bindings-25.1.0
arrow-1.4.0
ast-serialize-0.5.0
asttokens-3.0.1
attrs-26.1.0
beautifulsoup4-4.15.0
bleach-6.4.0
certifi-2026.6.17
certipy-0.2.3
cffi-2.0.0
cfgv-3.5.0
charset_normalizer-3.4.7
cheroot-11.1.2
cherrypy-18.10.0
classify-imports-4.2.0
click-8.4.1
colorama-0.4.6
comm-0.2.3
coverage-7.14.1
cryptography-49.0.0
cylc-flow-8.6.5.dev0
cylc-uiserver-1.9.2.dev0
debugpy-1.8.21
decorator-5.3.1
defusedxml-0.7.1
distlib-0.4.3
executing-2.2.1
fastjsonschema-2.21.2
filelock-3.29.4
flake8-7.3.0
flake8-broken-line-1.0.0
flake8-bugbear-25.11.29
flake8-builtins-3.1.0
flake8-comprehensions-3.17.0
flake8-debugger-4.1.2
flake8-mutable-1.2.0
flake8-simplify-0.30.0
flake8-type-checking-3.2.0
flaky-3.8.1
fqdn-1.5.1
graphene-3.4.3
graphql-core-3.2.11
graphql-relay-3.2.0
greenlet-3.5.1
identify-2.6.19
idna-3.18
iniconfig-2.3.0
ipykernel-7.3.0
ipython-9.14.1
ipython-pygments-lexers-1.1.1
isoduration-20.11.0
jaraco.collections-5.2.1
jaraco.context-6.1.2
jaraco.functools-4.5.0
jaraco.text-4.2.0
jedi-0.20.0
jinja2-3.0.3
jsonpointer-3.1.1
jsonschema-4.26.0
jsonschema-specifications-2025.9.1
jupyter_server-2.19.0
jupyter-client-8.9.1
jupyter-core-5.9.1
jupyter-events-0.12.1
jupyter-server-terminals-0.5.4
jupyterhub-5.5.0
jupyterlab-pygments-0.3.0
lark-1.3.1
librt-0.11.0
Mako-1.3.12
markdown-it-py-4.2.0
MarkupSafe-3.0.3
matplotlib-inline-0.2.2
mccabe-0.7.0
mdurl-0.1.2
metomi-isodatetime-1!3.1.0
mistune-3.2.1
more-itertools-11.1.0
mypy_extensions-1.1.0
mypy-2.1.0
nbclient-0.11.0
nbconvert-7.17.1
nbformat-5.10.4
nest-asyncio2-1.7.2
nodeenv-1.10.0
oauthlib-3.3.1
packaging-26.2
pamela-1.2.0
pandocfilters-1.5.1
parso-0.8.7
pathspec-1.1.1
pexpect-4.9.0
platformdirs-4.10.0
pluggy-1.6.0
portend-3.2.1
pre-commit-4.6.0
prometheus-client-0.25.0
prompt_toolkit-3.0.52
protobuf-7.35.1
psutil-7.2.2
ptyprocess-0.7.0
pure-eval-0.2.3
pycodestyle-2.14.0
pycparser-3.0
pydantic-2.13.4
pydantic-core-2.46.4
pyflakes-3.4.0
pygments-2.20.0
pytest-9.1.0
pytest-console-scripts-1.4.1
pytest-cov-7.1.0
pytest-jupyter-0.11.0
pytest-timeout-2.4.0
pytest-tornasync-0.6.0.post2
python-dateutil-2.9.0.post0
python-discovery-1.4.2
python-json-logger-4.1.0
pyyaml-6.0.3
pyzmq-27.1.0
referencing-0.37.0
requests-2.34.2
rfc3339-validator-0.1.4
rfc3986-validator-0.1.1
rfc3987-syntax-1.1.0
rich-15.0.0
rpds-py-2026.5.1
send2trash-2.1.0
setuptools-82.0.1
shellingham-1.5.4
six-1.17.0
soupsieve-2.8.4
SQLAlchemy-2.0.51
stack_data-0.6.3
tempora-5.9.0
terminado-0.18.1
tinycss2-1.5.1
tornado-6.5.7
towncrier-25.8.0
traitlets-5.15.1
typer-0.26.7
typer-slim-0.24.0
types-requests-2.33.0.20260518
types-setuptools-82.0.0.20260518
typing-extensions-4.15.0
typing-inspection-0.4.2
tzdata-2026.2
uri-template-1.3.0
urllib3-2.7.0
urwid-3.0.5
virtualenv-21.5.1
wcwidth-0.8.1
webcolors-25.10.0
webencodings-0.5.1
websocket-client-1.9.0
zc.lockfile-4.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions