Skip to content
This repository has been archived by the owner on Jun 28, 2022. It is now read-only.

Gapic generator broke nodejs and java last night #3271

Closed
SurferJeffAtGoogle opened this issue Aug 31, 2020 · 6 comments
Closed

Gapic generator broke nodejs and java last night #3271

SurferJeffAtGoogle opened this issue Aug 31, 2020 · 6 comments
Assignees
Labels
priority: p0 Highest priority. Critical issue. P0 implies highest priority.

Comments

@SurferJeffAtGoogle
Copy link

See the many failures here:
https://fusion.corp.google.com/label/268750848

Error messages like this:

DEBUG: Call stack for the definition of repository 'gapic_generator_python' which is a http_archive (rule definition at /home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/bazel_tools/tools/build_defs/repo/http.bzl:296:16):
 - <builtin>
 - /home/kbuilder/.cache/synthtool/googleapis/WORKSPACE:225:1
ERROR: An error occurred during the fetch of repository 'gapic_generator_python_pip_deps':
   pip_import failed: Collecting click==7.1.2 (from -r /home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/gapic_generator_python/requirements.txt (line 1))
  Using cached https://files.pythonhosted.org/packages/d2/3d/fa76db83bf75c4f8d338c2fd15c8d33fdd7ad23a9b5e57eb6c5de26b430e/click-7.1.2-py2.py3-none-any.whl
  Saved ./click-7.1.2-py2.py3-none-any.whl
Collecting google-api-core==1.22.1 (from -r /home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/gapic_generator_python/requirements.txt (line 2))
  Using cached https://files.pythonhosted.org/packages/e0/2d/7c6c75013105e1d2b6eaa1bf18a56995be1dbc673c38885aea31136e9918/google_api_core-1.22.1-py2.py3-none-any.whl
  Saved ./google_api_core-1.22.1-py2.py3-none-any.whl
Collecting googleapis-common-protos==1.52.0 (from -r /home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/gapic_generator_python/requirements.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/03/74/3956721ea1eb4bcf7502a311fdaa60b85bd751de4e57d1943afe9b334141/googleapis_common_protos-1.52.0-py2.py3-none-any.whl
  Saved ./googleapis_common_protos-1.52.0-py2.py3-none-any.whl
Collecting jinja2==2.11.2 (from -r /home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/gapic_generator_python/requirements.txt (line 4))
  Using cached https://files.pythonhosted.org/packages/30/9e/f663a2aa66a09d838042ae1a2c5659828bb9b41ea3a6efa20a20fd92b121/Jinja2-2.11.2-py2.py3-none-any.whl
  Saved ./Jinja2-2.11.2-py2.py3-none-any.whl
Collecting MarkupSafe==1.1.1 (from -r /home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/gapic_generator_python/requirements.txt (line 5))
  Using cached https://files.pythonhosted.org/packages/b2/5f/23e0023be6bb885d00ffbefad2942bc51a620328ee910f64abe5a8d18dd1/MarkupSafe-1.1.1-cp36-cp36m-manylinux1_x86_64.whl
  Saved ./MarkupSafe-1.1.1-cp36-cp36m-manylinux1_x86_64.whl
Collecting protobuf==3.13.0 (from -r /home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/gapic_generator_python/requirements.txt (line 6))
  Using cached https://files.pythonhosted.org/packages/30/79/510974552cebff2ba04038544799450defe75e96ea5f1675dbf72cc8744f/protobuf-3.13.0-cp36-cp36m-manylinux1_x86_64.whl
  Saved ./protobuf-3.13.0-cp36-cp36m-manylinux1_x86_64.whl
Collecting pypandoc==1.5 (from -r /home/kbuilder/.cache/bazel/_bazel_kbuilder/a732f932c2cbeb7e37e1543f189a2a73/external/gapic_generator_python/requirements.txt (line 7))
  Using cached https://files.pythonhosted.org/packages/d6/b7/5050dc1769c8a93d3ec7c4bd55be161991c94b8b235f88bf7c764449e708/pypandoc-1.5.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmpfs/tmp/tmpq0tv3zp3/setuptools-tmp/setuptools/__init__.py", line 6, in <module>
        import distutils.core
      File "/tmpfs/src/github/synthtool/env/lib/python3.6/site-packages/_distutils_hack/__init__.py", line 82, in create_module
        return importlib.import_module('._distutils', 'setuptools')
      File "/home/kbuilder/.pyenv/versions/3.6.9/lib/python3.6/importlib/__init__.py", line 126, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
    ModuleNotFoundError: No module named 'setuptools._distutils' 
@SurferJeffAtGoogle SurferJeffAtGoogle added the priority: p0 Highest priority. Critical issue. P0 implies highest priority. label Aug 31, 2020
@SurferJeffAtGoogle
Copy link
Author

@bcoe
@chingor13

@bcoe
Copy link
Contributor

bcoe commented Sep 1, 2020

cross posting some of the information @chingor13 dug up.

It would appear that version 50 of setuptools is breaking many libraries in the ecosystem:

pypa/setuptools#2353

  • some folks in that thread suggest pinning to an alternate version.
  • some folks suggest setting SETUPTOOLS_USE_DISTUTILS=stdlib, which I assume forces a different version of the library for installation?

@SurferJeffAtGoogle
Copy link
Author

@vam-google and @alexander-fenster
How goes your investigation?

@vam-google
Copy link
Contributor

Hi Jeff,
Working on it, will post an update soon.

@vam-google
Copy link
Contributor

There seems to be some conflict with synthool installation itself.
As a workaround for now (should be easy to do), can you please pin the version of setuptools used by synthtool to 49.6.0 here:
https://github.com/googleapis/synthtool/blob/master/requirements.txt#L2 and check if that works, please?

Currently autosynth must be pulling the 50.0 ("broken") version of setuptools in the python dev environment defined by .pyenv and this looks conflicting with what bazel uses for its build because on kokoro it depends on a custom python toolchain (to overcome the fact that the python available on autosynth is too old from what gapic-generator expects).

busunkim96 added a commit to googleapis/synthtool that referenced this issue Sep 3, 2020
chingor13 pushed a commit to googleapis/synthtool that referenced this issue Sep 3, 2020
* fix: pin setuptools to 49.6.0

Suggested solution for broken autosynth. googleapis/gapic-generator#3271 (comment)

* Update requirements.txt
@SurferJeffAtGoogle
Copy link
Author

Last night's build succeeded. Thanks for the fix!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
priority: p0 Highest priority. Critical issue. P0 implies highest priority.
Projects
None yet
Development

No branches or pull requests

3 participants