Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove explicit six dependency #24432

Closed
damccorm opened this issue Nov 30, 2022 · 8 comments · Fixed by #24434 or #24599
Closed

Remove explicit six dependency #24432

damccorm opened this issue Nov 30, 2022 · 8 comments · Fixed by #24434 or #24599
Assignees
Labels
core done & done Issue has been reviewed after it was closed for verification, followups, etc. P2 python task tests

Comments

@damccorm
Copy link
Contributor

What happened?

Python tests have been failing on master for the last 18 hours - https://github.com/apache/beam/actions/workflows/python_tests.yml?query=branch%3Amaster - usually on the wordcount tests

Example link: https://github.com/apache/beam/actions/runs/3579807043

Looks like the first failure is https://github.com/apache/beam/actions/runs/3578786077

Issue Failure

Failure: Test is continually failing

Issue Priority

Priority: 1

Issue Component

Component: sdk-py-core

@damccorm
Copy link
Contributor Author

Error is:

× python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [18 lines of output]
      org/apache/beam/model/interactive/v1/beam_interactive_api.proto:36:1: warning: Import google/protobuf/timestamp.proto is unused.
      Traceback (most recent call last):
        File "/opt/hostedtoolcache/Python/3.10.8/x64/bin/protoc-gen-mypy", line 5, in <module>
          from mypy_protobuf import main
        File "/opt/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/site-packages/mypy_protobuf.py", line 14, in <module>
          import six
      ModuleNotFoundError: No module named 'six'
      --mypy_out: protoc-gen-mypy: Plugin failed with status code 1.
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line [34](https://github.com/apache/beam/actions/runs/3585105935/jobs/6032653050#step:5:35), in <module>
        File "/home/runner/work/beam/beam/sdks/python/setup.py", line 180, in <module>
          generate_protos_first()
        File "/home/runner/work/beam/beam/sdks/python/setup.py", line 150, in generate_protos_first
          gen_protos.generate_proto_files()
        File "/home/runner/work/beam/beam/sdks/python/gen_protos.py", line 523, in generate_proto_files
          raise RuntimeError(
      RuntimeError: Protoc returned non-zero status (see logs for details): 1
      [end of output]

@damccorm
Copy link
Contributor Author

Looks like its succeeding on mac, but failing on windows/linux

@AnandInguva
Copy link
Contributor

This happens because of pip install -r build-requiremenets.txt.

Comparing passing build vs failing build, six is not getting installed in the failing build during this step. May be one of the dependencies might have removed six as transitive dep? I will dig more.

@AnandInguva
Copy link
Contributor

AnandInguva commented Nov 30, 2022

For the passing build, grpcio was 1.50.0 and for the failing build, it picks up grpcio==1.51.1. The latest version removed six as its transitive dependency.

I will raise a PR to pin the grpcio version to 1.50.0 or better, we could install six without pinning version on grpcio

@github-actions github-actions bot added this to the 2.44.0 Release milestone Nov 30, 2022
@damccorm damccorm reopened this Nov 30, 2022
@damccorm damccorm removed this from the 2.44.0 Release milestone Nov 30, 2022
@damccorm
Copy link
Contributor Author

Reopening since we should eventually remove this dependency entirely when the problem is fixed upstream per @AnandInguva

@damccorm damccorm changed the title [Failing Test]: Python tests GHA failing on master Remove explicit six dependency Nov 30, 2022
@tvalentyn
Copy link
Contributor

was the issue reported upstream?

@AnandInguva
Copy link
Contributor

AnandInguva commented Nov 30, 2022

mypy-protobuf 2.0 removed the dependency on six[1] but in our build we install mypy-protobuf==1.18 which depends on six.

six was installed as a transitive dependency of grpcio-tools==1.37.0 --> grpcio==1.50.0 --> six but yesterday grpcio new version has been released and it doesn't depend on six.

So, for a more concrete fix we should update mypy-protobuf>=2.0.0.

[1] https://github.com/nipunn1313/mypy-protobuf/blob/7692825cfcf7ef82f2428aaa40e78fb0ba449379/CHANGELOG.md?plain=1#L187

@AnandInguva
Copy link
Contributor

This can be picked up during fixit week.

@github-actions github-actions bot added this to the 2.47.0 Release milestone Mar 15, 2023
@tvalentyn tvalentyn added the done & done Issue has been reviewed after it was closed for verification, followups, etc. label Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core done & done Issue has been reviewed after it was closed for verification, followups, etc. P2 python task tests
Projects
None yet
3 participants