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

Update bazel io_bazel_rules_python to 0.1.0 #25143

Closed

Conversation

jtattermusch
Copy link
Contributor

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

@jtattermusch jtattermusch added the release notes: no Indicates if PR should not be in release notes label Jan 13, 2021
@@ -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",
Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@gnossen gnossen left a 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",
Copy link
Contributor

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.

@jtattermusch
Copy link
Contributor Author

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
https://source.cloud.google.com/results/invocations/a2f2b053-7e56-4522-b94b-e9c294593187/targets/%2F%2Ftest%2Fcpp%2Fcodegen:copy_compiler_test_mock_grpc_pb_h/log

@stale
Copy link

stale bot commented Jun 2, 2021

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
disposition/never stale release notes: no Indicates if PR should not be in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants