gapic-generator-python icon indicating copy to clipboard operation
gapic-generator-python copied to clipboard

auto-gen snippets exceeds Python recursion limit in some cases

Open vchudnov-g opened this issue 1 year ago • 1 comments

Generating the GAPIC for compute alpha (using the disco-to-proto3 converter to create proto3s from the Discovery file) results in a RecursionError: maximum recursion depth exceeded while calling a Python object.

I even tried increasing the limit by inserting a sys.setrecursionlimit(3000) at the top of generator.py and it didn't work. This seems to be a bug in the auto-gen snippet code. Adding an item "autogen-snippets=False" to the opt_args field of the py_gapic_library BUILD rule bypasses this problem.

It's not clear what triggers this bug, but it could show up for other APIs.

vchudnov-g avatar Dec 16 '24 17:12 vchudnov-g