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

bazel_external_repository_test: ModuleNotFoundError: No module named 'six' #11663

Closed
ehrtro opened this issue Jun 29, 2020 · 5 comments
Closed
Labels
team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website type: support / not a bug (process) untriaged

Comments

@ehrtro
Copy link

ehrtro commented Jun 29, 2020

Description of the problem / feature request:

When running bazel_external_repository_test we're encountering the following issue:
fastbuild/bin/src/test/py/bazel/bazel_external_repository_test.runfiles/io_bazel/src/test/py/bazel/bazel_external_repository_test.py", line 19, in <module> from six.moves import SimpleHTTPServer ModuleNotFoundError: No module named 'six'

.. where the failing line in the tests looks like this: from six.moves import SimpleHTTPServer

Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

Reproducing this issue is fairly hard since we're not 100% sure about what's causing this issue in our specific environment.

What operating system are you running Bazel on?

Red Hat Enterprise Linux 7 (RHEL7)

Have you found anything relevant by searching the web?

No

Any other information, logs, or outputs that you want to share?

When looking in the relevant BUILD-file we find that the BUILD initially looks like:

py_test( name = "bazel_external_repository_test", size = "medium", srcs = ["bazel_external_repository_test.py"], data = glob(["testdata/bazel_external_repository_test/**"]), tags = [ "requires-network", ], deps = [ ":test_base" ], )

Which results in the issue stated as above.

But by adding: //third_party/py/six in the list of dependencies, resulting in
py_test( name = "bazel_external_repository_test", size = "medium", srcs = ["bazel_external_repository_test.py"], data = glob(["testdata/bazel_external_repository_test/**"]), tags = [ "requires-network", ], deps = [ ":test_base", "//third_party/py/six", ], )

This issue is fixed and no more issues are envoked when running the test.

So now to the question: We do not understand how this test can pass in the orignial Bazel repo without this dependency added to the list. We're still not sure if this might is to be seen as a bug in the system, or if it is something related to our own environment? Thoughts on this?

@gregestren gregestren added team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website untriaged type: support / not a bug (process) labels Jul 1, 2020
@meisterT
Copy link
Member

meisterT commented Jul 2, 2020

cc @brandjon

@ehrtro
Copy link
Author

ehrtro commented Aug 14, 2020

@meisterT , @brandjon

Any further progress on this issue? It seems like #11664 would solve this issue without breaking something else.

@meisterT
Copy link
Member

cc @meteorcloudy
Yun, do you have any idea whether we do anything special with this test on the Bazel CI images?

@meteorcloudy
Copy link
Member

I guess it's because six is pre-installed in the docker we run on CI for bazel test?
https://github.com/bazelbuild/continuous-integration/blob/4d2a7dab6c4767e741683c5e68fc5b737a7b9805/buildkite/docker/ubuntu1804/Dockerfile#L40

Yannic pushed a commit to Yannic/bazel that referenced this issue Oct 5, 2020
…not added as a dependency which caused the test to fail in some environments.

Closes bazelbuild#11664.

Closes bazelbuild#11663.

PiperOrigin-RevId: 333290465
@jtillwickEA
Copy link

Still no fix for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website type: support / not a bug (process) untriaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants