Skip to content

Commit 4fee7ef

Browse files
authored
cleanup(dev): remove remnants of old bazel_integration_test code (bazel-contrib#1668)
The tests have been deleted, so the supporting code is now unused. Moves the update_deleted_packages script to tools, since it isn't specific to the bazel_integration_test code.
1 parent 0f5ee46 commit 4fee7ef

8 files changed

+4
-264
lines changed

.bazelrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Trick bazel into treating BUILD files under examples/* as being regular files
33
# This lets us glob() up all the files inside the examples to make them inputs to tests
44
# (Note, we cannot use `common --deleted_packages` because the bazel version command doesn't support it)
5-
# To update these lines, run tools/bazel_integration_test/update_deleted_packages.sh
5+
# To update these lines, run tools/update_deleted_packages.sh
66
build --deleted_packages=examples/build_file_generation,examples/build_file_generation/random_number_generator,examples/bzlmod,examples/bzlmod_build_file_generation,examples/bzlmod_build_file_generation/other_module/other_module/pkg,examples/bzlmod_build_file_generation/runfiles,examples/bzlmod/entry_points,examples/bzlmod/entry_points/tests,examples/bzlmod/libs/my_lib,examples/bzlmod/other_module,examples/bzlmod/other_module/other_module/pkg,examples/bzlmod/patches,examples/bzlmod/py_proto_library,examples/bzlmod/py_proto_library/example.com/another_proto,examples/bzlmod/py_proto_library/example.com/proto,examples/bzlmod/runfiles,examples/bzlmod/tests,examples/bzlmod/tests/dupe_requirements,examples/bzlmod/tests/other_module,examples/bzlmod/whl_mods,examples/multi_python_versions/libs/my_lib,examples/multi_python_versions/requirements,examples/multi_python_versions/tests,examples/pip_parse,examples/pip_parse_vendored,examples/pip_repository_annotations,examples/py_proto_library,examples/py_proto_library/example.com/another_proto,examples/py_proto_library/example.com/proto,tests/integration/compile_pip_requirements,tests/integration/compile_pip_requirements_test_from_external_repo,tests/integration/ignore_root_user_error,tests/integration/pip_repository_entry_points
77
query --deleted_packages=examples/build_file_generation,examples/build_file_generation/random_number_generator,examples/bzlmod,examples/bzlmod_build_file_generation,examples/bzlmod_build_file_generation/other_module/other_module/pkg,examples/bzlmod_build_file_generation/runfiles,examples/bzlmod/entry_points,examples/bzlmod/entry_points/tests,examples/bzlmod/libs/my_lib,examples/bzlmod/other_module,examples/bzlmod/other_module/other_module/pkg,examples/bzlmod/patches,examples/bzlmod/py_proto_library,examples/bzlmod/py_proto_library/example.com/another_proto,examples/bzlmod/py_proto_library/example.com/proto,examples/bzlmod/runfiles,examples/bzlmod/tests,examples/bzlmod/tests/dupe_requirements,examples/bzlmod/tests/other_module,examples/bzlmod/whl_mods,examples/multi_python_versions/libs/my_lib,examples/multi_python_versions/requirements,examples/multi_python_versions/tests,examples/pip_parse,examples/pip_parse_vendored,examples/pip_repository_annotations,examples/py_proto_library,examples/py_proto_library/example.com/another_proto,examples/py_proto_library/example.com/proto,tests/integration/compile_pip_requirements,tests/integration/compile_pip_requirements_test_from_external_repo,tests/integration/ignore_root_user_error,tests/integration/pip_repository_entry_points
88

.pre-commit-config.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@ repos:
4242
- id: update-deleted-packages
4343
name: Update deleted packages
4444
language: script
45-
entry: ./tools/bazel_integration_test/update_deleted_packages.sh
46-
files: ^((examples|tests)/*/(MODULE.bazel|WORKSPACE|WORKSPACE.bzlmod|BUILD.bazel)|.bazelrc|tools/bazel_integration_test/update_deleted_packages.sh)$
45+
entry: ./tools/update_deleted_packages.sh
46+
files: ^((examples|tests)/*/(MODULE.bazel|WORKSPACE|WORKSPACE.bzlmod|BUILD.bazel)|.bazelrc|tools/update_deleted_packages.sh)$
4747
pass_filenames: false

internal_deps.bzl

-9
Original file line numberDiff line numberDiff line change
@@ -156,15 +156,6 @@ def rules_python_internal_deps():
156156
],
157157
)
158158

159-
http_archive(
160-
name = "build_bazel_integration_testing",
161-
urls = [
162-
"https://github.com/bazelbuild/bazel-integration-testing/archive/165440b2dbda885f8d1ccb8d0f417e6cf8c54f17.zip",
163-
],
164-
strip_prefix = "bazel-integration-testing-165440b2dbda885f8d1ccb8d0f417e6cf8c54f17",
165-
sha256 = "2401b1369ef44cc42f91dc94443ef491208dbd06da1e1e10b702d8c189f098e3",
166-
)
167-
168159
http_archive(
169160
name = "rules_proto",
170161
sha256 = "dc3fb206a2cb3441b485eb1e423165b231235a1ea9b031b4433cf7bc1fa460dd",

internal_setup.bzl

-5
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,8 @@
1515
"""Setup for rules_python tests and tools."""
1616

1717
load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
18-
load("@build_bazel_integration_testing//tools:repositories.bzl", "bazel_binaries")
1918
load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
2019
load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains")
21-
load("//:version.bzl", "SUPPORTED_BAZEL_VERSIONS")
2220
load("//python/pip_install:repositories.bzl", "pip_install_dependencies")
2321
load("//python/private:internal_config_repo.bzl", "internal_config_repo") # buildifier: disable=bzl-visibility
2422

@@ -30,9 +28,6 @@ def rules_python_internal_setup():
3028
# Because we don't use the pip_install rule, we have to call this to fetch its deps
3129
pip_install_dependencies()
3230

33-
# Depend on the Bazel binaries for running bazel-in-bazel tests
34-
bazel_binaries(versions = SUPPORTED_BAZEL_VERSIONS)
35-
3631
bazel_skylib_workspace()
3732

3833
rules_proto_dependencies()

tools/bazel_integration_test/BUILD.bazel

-1
This file was deleted.

tools/bazel_integration_test/bazel_integration_test.bzl

-134
This file was deleted.

tools/bazel_integration_test/test_runner.py

-111
This file was deleted.

tools/bazel_integration_test/update_deleted_packages.sh tools/update_deleted_packages.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
set -euxo pipefail
2727

28-
DIR="$(dirname $0)/../.."
28+
DIR="$(dirname $0)/.."
2929
cd $DIR
3030

3131
# The sed -i.bak pattern is compatible between macos and linux

0 commit comments

Comments
 (0)