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
Update bazel io_bazel_rules_python to 0.1.0 #25143
Conversation
@@ -36,8 +36,8 @@ def grpc_python_deps(): | |||
if "io_bazel_rules_python" not in native.existing_rules(): | |||
http_archive( | |||
name = "io_bazel_rules_python", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gnossen what's really puzzling me is why are importing github.com/bazelbuild/rules_python twice - once as io_bazel_rules_python
and another time as rules_python
(a few lines below), but each time at a different commit.
This is something that really should be explained in a comment - I can add an explanatory comment once I understand why this hack is needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is just an oversight. The second one doesn't even seem to be referenced anywhere:
rbellevi@rbell:~/Dev/grpc$ find . -type f -a -not -path './third_party*' -a -not -path '*venv*' -a -not -path '*virtual*' -a -not -path './git*' -exec grep -Hn rules_python {} \;
grep: ./tools/run_tests/python_utils/start_port_server.pyc: Permission denied
./summerofcode/2018/naresh.md:29:[bazelbuild/rules_python](https://github.com/bazelbuild/rules_python/).
./summerofcode/2018/naresh.md:37:[bazelbuild/rules_python](https://github.com/bazelbuild/rules_python/)).
./src/python/grpcio_tests/tests/bazel_namespace_package_hack.py:26:# Analysis in depth: https://github.com/bazelbuild/rules_python/issues/55
./src/python/grpcio_tests/build/lib/tests/bazel_namespace_package_hack.py:26:# Analysis in depth: https://github.com/bazelbuild/rules_python/issues/55
./bazel/grpc_python_deps.bzl:36: if "io_bazel_rules_python" not in native.existing_rules():
./bazel/grpc_python_deps.bzl:38: name = "io_bazel_rules_python",
./bazel/grpc_python_deps.bzl:39: url = "https://github.com/bazelbuild/rules_python/releases/download/0.0.1/rules_python-0.0.1.tar.gz",
./bazel/grpc_python_deps.bzl:43: if "rules_python" not in native.existing_rules():
./bazel/grpc_python_deps.bzl:45: name = "rules_python",
./bazel/grpc_python_deps.bzl:46: url = "https://github.com/bazelbuild/rules_python/archive/9d68f24659e8ce8b736590ba1e4418af06ec2552.zip",
./bazel/grpc_python_deps.bzl:48: strip_prefix = "rules_python-9d68f24659e8ce8b736590ba1e4418af06ec2552",
./WORKSPACE:101:load("@io_bazel_rules_python//python:pip.bzl", "pip_import", "pip_repositories")
Feel free to remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FTR the second copy of "rules_python" was added here: https://github.com/grpc/grpc/pull/20097/files#diff-1921b9ac3138aad26761ba6b33391a45caf8e02e57d98cecafdb663980788676R51
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM assuming tests pass.
@@ -36,8 +36,8 @@ def grpc_python_deps(): | |||
if "io_bazel_rules_python" not in native.existing_rules(): | |||
http_archive( | |||
name = "io_bazel_rules_python", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is just an oversight. The second one doesn't even seem to be referenced anywhere:
rbellevi@rbell:~/Dev/grpc$ find . -type f -a -not -path './third_party*' -a -not -path '*venv*' -a -not -path '*virtual*' -a -not -path './git*' -exec grep -Hn rules_python {} \;
grep: ./tools/run_tests/python_utils/start_port_server.pyc: Permission denied
./summerofcode/2018/naresh.md:29:[bazelbuild/rules_python](https://github.com/bazelbuild/rules_python/).
./summerofcode/2018/naresh.md:37:[bazelbuild/rules_python](https://github.com/bazelbuild/rules_python/)).
./src/python/grpcio_tests/tests/bazel_namespace_package_hack.py:26:# Analysis in depth: https://github.com/bazelbuild/rules_python/issues/55
./src/python/grpcio_tests/build/lib/tests/bazel_namespace_package_hack.py:26:# Analysis in depth: https://github.com/bazelbuild/rules_python/issues/55
./bazel/grpc_python_deps.bzl:36: if "io_bazel_rules_python" not in native.existing_rules():
./bazel/grpc_python_deps.bzl:38: name = "io_bazel_rules_python",
./bazel/grpc_python_deps.bzl:39: url = "https://github.com/bazelbuild/rules_python/releases/download/0.0.1/rules_python-0.0.1.tar.gz",
./bazel/grpc_python_deps.bzl:43: if "rules_python" not in native.existing_rules():
./bazel/grpc_python_deps.bzl:45: name = "rules_python",
./bazel/grpc_python_deps.bzl:46: url = "https://github.com/bazelbuild/rules_python/archive/9d68f24659e8ce8b736590ba1e4418af06ec2552.zip",
./bazel/grpc_python_deps.bzl:48: strip_prefix = "rules_python-9d68f24659e8ce8b736590ba1e4418af06ec2552",
./WORKSPACE:101:load("@io_bazel_rules_python//python:pip.bzl", "pip_import", "pip_repositories")
Feel free to remove it.
Based on the test failures, it seems that something around selecting the right python version (2 vs 3) is not working with the new python rules, so this needs to be investigated before we can merge. https://source.cloud.google.com/results/invocations/0bcc3c86-2d03-4bab-baf3-301a103c889f/log |
This issue/PR has been automatically marked as stale because it has not had any update (including commits, comments, labels, milestones, etc) for 30 days. It will be closed automatically if no further update occurs in 7 day. Thank you for your contributions! |
Looks like this is required for a successful upgrade of third_party/protobuf: #25131 (comment)
More context: #24723 (comment)
Creating a separate PR with this change to ensure that this change is safe.
https://github.com/bazelbuild/rules_python/releases/tag/0.1.0