testflows / TestFlows-GitHub-Hetzner-Runners

Autoscaling Self-Hosted GitHub Actions Runners on Hetzner Cloud.
https://testflows.com
Other
37 stars 3 forks source link

RecursionError: maximum recursion depth exceeded #21

Closed oerp-odoo closed 3 months ago

oerp-odoo commented 3 months ago

I did installation like this:

mkdir hetzner-runners
cd hetzner-runners
~/.pyenv/versions/3.10.8/bin/python -m venv .venv
source .venv/bin/activate
pip3 install testflows.github.hetzner.runners

Install run successfully, but if I do:

github-hetzner-runners --help or github-hetzner-runners -v, I get:

Traceback (most recent call last):
  File "/home/oerp/hetzner-runners/.venv/bin/github-hetzner-runners", line 38, in <module>
    from testflows.github.hetzner.runners.scale_up import scale_up
  File "/home/oerp/hetzner-runners/.venv/lib/python3.10/site-packages/testflows/github/hetzner/runners/scale_up.py", line 27, in <module>
    from .config import Config, check_image, check_startup_script, check_setup_script
  File "/home/oerp/hetzner-runners/.venv/lib/python3.10/site-packages/testflows/github/hetzner/runners/config/__init__.py", line 15, in <module>
    from .config import Config
  File "/home/oerp/hetzner-runners/.venv/lib/python3.10/site-packages/testflows/github/hetzner/runners/config/config.py", line 97, in <module>
    class cloud:
  File "/home/oerp/.pyenv/versions/3.10.8/lib/python3.10/dataclasses.py", line 1185, in dataclass
    return wrap(cls)
  File "/home/oerp/.pyenv/versions/3.10.8/lib/python3.10/dataclasses.py", line 1176, in wrap
    return _process_class(cls, init, repr, eq, order, unsafe_hash,
  File "/home/oerp/.pyenv/versions/3.10.8/lib/python3.10/dataclasses.py", line 1094, in _process_class
    str(inspect.signature(cls)).replace(' -> None', ''))
  File "/home/oerp/.pyenv/versions/3.10.8/lib/python3.10/inspect.py", line 3207, in __str__
    formatted = str(param)
  File "/home/oerp/.pyenv/versions/3.10.8/lib/python3.10/inspect.py", line 2724, in __str__
    formatannotation(self._annotation))
  File "/home/oerp/.pyenv/versions/3.10.8/lib/python3.10/inspect.py", line 1369, in formatannotation
    return repr(annotation)
  File "/home/oerp/.pyenv/versions/3.10.8/lib/python3.10/dataclasses.py", line 283, in __repr__
    return ('Field('
  File "/home/oerp/.pyenv/versions/3.10.8/lib/python3.10/dataclasses.py", line 283, in __repr__
    return ('Field('
  File "/home/oerp/.pyenv/versions/3.10.8/lib/python3.10/dataclasses.py", line 283, in __repr__
    return ('Field('
  [Previous line repeated 480 more times]
RecursionError: maximum recursion depth exceeded

pyright automatically detects that wrong typing is used: the type of "deploy" could not be determined because it refers to itself.

vzakaznikov commented 2 months ago

Fixed in https://pypi.org/project/testflows.github.hetzner.runners/1.7.240908.1140002/