Remove --noenable_bzlmod from .bazelrc

Enables bzlmod for most CI tests, except python (and thus upb) since infra for system python headers for python dist are not bzlmod compatible and require further work.

#test-continuous

PiperOrigin-RevId: 721946253
pull/20090/head
Sandy Zhang 2 months ago committed by Copybara-Service
parent 9a033327c6
commit e7260fd5cc
  1. 4
      .bazelrc
  2. 5
      .github/workflows/staleness_check.yml
  3. 2
      .github/workflows/test_bazel.yml
  4. 17
      .github/workflows/test_cpp.yml
  5. 12
      .github/workflows/test_java.yml
  6. 21
      .github/workflows/test_python.yml
  7. 13
      .github/workflows/test_upb.yml
  8. 18
      MODULE.bazel
  9. 11
      WORKSPACE
  10. 38
      WORKSPACE.bzlmod
  11. 10
      build_defs/BUILD.bazel
  12. 4
      ci/common.bazelrc
  13. 3
      ci/macOS.bazelrc
  14. 3
      cmake/dependencies_generator.py
  15. 6
      examples/MODULE.bazel
  16. 4
      python/python_version_test.py

@ -31,10 +31,6 @@ build:ubsan --copt=-fno-sanitize=function --copt=-fno-sanitize=vptr
# Abseil passes nullptr to memcmp with 0 size
build:ubsan --copt=-fno-sanitize=nonnull-attribute
# TODO: migrate all dependencies from WORKSPACE to MODULE.bazel
# https://github.com/protocolbuffers/protobuf/issues/14313
common --noenable_bzlmod
# Important: this flag ensures that we remain compliant with the C++ layering
# check.
build --features=layering_check

@ -53,11 +53,12 @@ jobs:
version: 7.1.2 # Bazel version
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
bazel-cache: staleness
# TODO: Enable bzlmod once //python/dist is buildable.
bash: >
set -ex;
echo "Please run ./regenerate_stale_files.sh to regenerate stale files";
if [[ -z $COMMIT_TRIGGERED_RUN || -z $MAIN_RUN ]]; then
bazel query 'attr(tags, "staleness_test", //...)' | xargs bazel test $BAZEL_FLAGS;
bazel query 'attr(tags, "staleness_test", //...)' --noenable_bzlmod | xargs bazel test $BAZEL_FLAGS;
else
bazel query 'attr(tags, "staleness_test", //...)';
bazel query 'attr(tags, "staleness_test", //...)' --noenable_bzlmod;
fi

@ -58,4 +58,4 @@ jobs:
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
bazel-cache: examples
version: ${{ matrix.bazelversion }}
bash: cd examples && bazel build //... $BAZEL_FLAGS --verbose_failures --enable_bzlmod=${{ matrix.bzlmod }} --enable_workspace=${{ !matrix.bzlmod }} ${{ matrix.toolchain_resolution }}
bash: cd examples && bazel build //... $BAZEL_FLAGS --enable_bzlmod=${{ matrix.bzlmod }} --enable_workspace=${{ !matrix.bzlmod }} ${{ matrix.toolchain_resolution }}

@ -38,15 +38,14 @@ jobs:
include:
# Set defaults
- image: us-docker.pkg.dev/protobuf-build/containers/test/linux/sanitize:7.1.2-2c05f44c25a209933743ddf0296ef0c1e583d2c3
- targets: //pkg/... //src/... @com_google_protobuf_examples//... //third_party/utf8_range/... //conformance:conformance_framework_tests
- targets: //pkg/... //src/... //third_party/utf8_range/... //conformance:conformance_framework_tests
# Override cases with custom images
- config: { name: "Bazel7", flags: --noenable_bzlmod }
cache_key: Bazel7
- config: { name: "Bazel7", flags: --cxxopt="-Wno-self-assign-overloaded" }
cache_key: Bazel7bzlmod
image: "us-docker.pkg.dev/protobuf-build/containers/common/linux/bazel:7.1.2-27cf7b86212020d7e552bc13b1e084abb971da75"
targets: "//src/... //third_party/utf8_range/..."
- config: { name: "Bazel7 with Bzlmod", flags: --enable_bzlmod --enable_workspace --cxxopt="-Wno-self-assign-overloaded" }
cache_key: Bazel7bzlmod
- config: { name: "Bazel7 Workspace", flags: --noenable_bzlmod }
cache_key: Bazel7nobzlmod
image: "us-docker.pkg.dev/protobuf-build/containers/common/linux/bazel:7.1.2-27cf7b86212020d7e552bc13b1e084abb971da75"
targets: "//src/... //third_party/utf8_range/..."
- config: { name: "TCMalloc" }
@ -89,7 +88,7 @@ jobs:
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/gcc:7.1.2-${{ matrix.version }}-d9624f2aa83cba3eaf906f751d75b36aacb9aa82
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
bazel-cache: cpp_linux/gcc-${{ matrix.version }}
bazel: test //pkg/... //src/... @com_google_protobuf_examples//... //third_party/utf8_range/... //conformance:conformance_framework_tests
bazel: test //pkg/... //src/... //third_party/utf8_range/... //conformance:conformance_framework_tests
linux-release:
strategy:
@ -413,11 +412,11 @@ jobs:
- name: Windows Bazel
os: windows-2022
cache_key: windows-2022-msvc-cl
bazel: test //src/... @com_google_protobuf_examples//... --config=msvc-cl --test_tag_filters=-conformance --build_tag_filters=-conformance --define=protobuf_allow_msvc=true
bazel: test //src/... --config=msvc-cl --test_tag_filters=-conformance --build_tag_filters=-conformance --define=protobuf_allow_msvc=true
- name: Windows Bazel clang-cl
os: windows-2022
cache_key: windows-2022-clang-cl
bazel: test //src/... @com_google_protobuf_examples//... --test_tag_filters=-conformance --build_tag_filters=-conformance
bazel: test //src/... --test_tag_filters=-conformance --build_tag_filters=-conformance
name: ${{ matrix.continuous-only && inputs.continuous-prefix || '' }} ${{ matrix.name }}
runs-on: ${{ matrix.os }}
steps:

@ -34,7 +34,8 @@ jobs:
# TODO: b/318555165 - enable the layering check. Currently it does
# not work correctly with the toolchain in this Docker image.
targets: //java/... //java/internal:java_version //compatibility/... --features=-layering_check
flags: --java_language_version=8
# TODO: b/393604460 - enable bzlmod once coursier error is fixed.
flags: --java_language_version=8 --noenable_bzlmod
- name: OpenJDK 11
cache_key: '11'
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/java:7.1.2-11-d9624f2aa83cba3eaf906f751d75b36aacb9aa82
@ -45,15 +46,14 @@ jobs:
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/java:7.1.2-17-641278a52587c01f44525819b76499db35c2804d
targets: //java/... //java/internal:java_version //compatibility/...
- name: Bazel7
cache_key: 'bazel7nobzlmod'
cache_key: 'bazel7bzlmod'
image: us-docker.pkg.dev/protobuf-build/containers/common/linux/bazel:7.1.2-27cf7b86212020d7e552bc13b1e084abb971da75
targets: //java/... //java/internal:java_version //compatibility/...
flags: --noenable_bzlmod
- name: Bazel7 with Bzlmod
cache_key: 'bazel7bzlmod'
- name: Bazel7 Workspace
cache_key: 'bazel7nobzlmod'
image: us-docker.pkg.dev/protobuf-build/containers/common/linux/bazel:7.1.2-27cf7b86212020d7e552bc13b1e084abb971da75
targets: //java/... //java/internal:java_version //compatibility/...
flags: --enable_bzlmod --enable_workspace
flags: --noenable_bzlmod
- name: aarch64
cache_key: 'aarch64'
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/emulation:7.1.2-aarch64-2920199ab0090ed427413a8e422e62695c8392a8

@ -29,6 +29,8 @@ jobs:
matrix:
type: [ Pure, C++]
version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
# TODO: Enable bzlmod once python headers are supported for python dist.
bzlmod: [--noenable_bzlmod]
include:
- type: Pure
targets: //python/... //python:python_version_test
@ -36,12 +38,6 @@ jobs:
- type: C++
targets: //python/... //python:python_version_test
flags: --define=use_fast_cpp_protos=true
- type: C++
version: aarch64
targets: //python/... //python:aarch64_test
# TODO Enable this once conformance tests are fixed.
flags: --define=use_fast_cpp_protos=true --test_tag_filters=-conformance
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/emulation:7.1.2-aarch64-2920199ab0090ed427413a8e422e62695c8392a8
- version: "3.9"
- version: "3.10"
continuous-only: true
@ -50,6 +46,13 @@ jobs:
- version: "3.12"
continuous-only: true
- version: "3.13"
- type: C++
version: aarch64
targets: //python/... //python:aarch64_test
# TODO Enable this once conformance tests are fixed.
flags: --define=use_fast_cpp_protos=true --test_tag_filters=-conformance
bzlmod: --noenable_bzlmod
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/emulation:7.1.2-aarch64-2920199ab0090ed427413a8e422e62695c8392a8
name: ${{ matrix.continuous-only && inputs.continuous-prefix || '' }} Linux ${{ matrix.type }} ${{ matrix.version }}
runs-on: ubuntu-latest
@ -66,7 +69,7 @@ jobs:
image: ${{ matrix.image || format('us-docker.pkg.dev/protobuf-build/containers/test/linux/python:7.1.2-{0}-d9624f2aa83cba3eaf906f751d75b36aacb9aa82', matrix.version) }}
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
bazel-cache: python_linux/${{ matrix.type }}_${{ matrix.version }}
bazel: test ${{ matrix.targets }} ${{ matrix.flags }} --test_env=KOKORO_PYTHON_VERSION
bazel: test ${{ matrix.targets }} ${{ matrix.flags }} ${{ matrix.bzlmod }} --test_env=KOKORO_PYTHON_VERSION
macos:
@ -75,6 +78,8 @@ jobs:
matrix:
type: [ Pure, C++]
version: [ "3.12", "3.13" ]
# TODO: Enable bzlmod once python headers are supported for python dist.
bzlmod: [--noenable_bzlmod]
include:
- type: Pure
targets: //python/... //python:python_version_test
@ -116,6 +121,6 @@ jobs:
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
bazel-cache: python_macos/${{ matrix.type }}_${{ matrix.version }}
bazel: >-
test ${{ matrix.targets }} ${{ matrix.flags }}
test ${{ matrix.targets }} ${{ matrix.flags }} ${{ matrix.bzlmod }}
--test_env=KOKORO_PYTHON_VERSION=${{ matrix.version }}
--macos_minimum_os=11.0

@ -52,7 +52,8 @@ jobs:
image: us-docker.pkg.dev/protobuf-build/containers/test/linux/sanitize:${{ matrix.config.bazel_version || '7.1.2' }}-2c05f44c25a209933743ddf0296ef0c1e583d2c3
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
bazel-cache: upb-bazel
bazel: test --cxxopt=-std=c++17 --host_cxxopt=-std=c++17 //bazel/... //benchmarks/... //lua/... //python/... //upb/... //upb_generator/... ${{ matrix.config.flags }}
# TODO: Enable bzlmod once python headers are supported for python dist.
bazel: test --noenable_bzlmod --cxxopt=-std=c++17 --host_cxxopt=-std=c++17 //bazel/... //benchmarks/... //lua/... //python/... //upb/... //upb_generator/... ${{ matrix.config.flags }}
exclude-targets: ${{ matrix.config.exclude-targets }}
linux-gcc:
@ -72,7 +73,7 @@ jobs:
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
bazel-cache: "upb-bazel-gcc"
bazel: >-
test --cxxopt=-std=c++17 --host_cxxopt=-std=c++17 -c opt
test --noenable_bzlmod --cxxopt=-std=c++17 --host_cxxopt=-std=c++17 -c opt
--copt="-Wno-error=maybe-uninitialized" --copt="-Wno-error=attributes"
//bazel/... //benchmarks/... //lua/... //python/... //upb/... //upb_generator/...
@ -91,7 +92,7 @@ jobs:
with:
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
bazel-cache: "upb-bazel-windows"
bazel: test --cxxopt=/std:c++17 --host_cxxopt=/std:c++17 //upb/... //upb_generator/... //python/...
bazel: test --noenable_bzlmod --cxxopt=/std:c++17 --host_cxxopt=/std:c++17 //upb/... //upb_generator/... //python/...
version: 7.1.2
exclude-targets: -//python:conformance_test -//upb/reflection:def_builder_test
@ -120,7 +121,7 @@ jobs:
with:
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
bazel-cache: "upb-bazel-macos"
bazel: ${{ matrix.config.bazel-command }} --cxxopt=-std=c++17 --host_cxxopt=-std=c++17 ${{ matrix.config.flags }} //bazel/... //benchmarks/... //lua/... //python/... //upb/... //upb_generator/...
bazel: ${{ matrix.config.bazel-command }} --noenable_bzlmod --cxxopt=-std=c++17 --host_cxxopt=-std=c++17 ${{ matrix.config.flags }} //bazel/... //benchmarks/... //lua/... //python/... //upb/... //upb_generator/...
version: 7.1.2
no-python:
@ -143,7 +144,7 @@ jobs:
which python3 &&
mv `which python3` /tmp &&
! which python3 &&
bazel test $BAZEL_FLAGS --cxxopt=-std=c++17 --host_cxxopt=-std=c++17 //python/... -- -//python/dist:source_wheel -//python:aarch64_test -//python:x86_64_test -//python:google/protobuf/pyext/_message.so -//python:proto_api
bazel test $BAZEL_FLAGS --noenable_bzlmod --cxxopt=-std=c++17 --host_cxxopt=-std=c++17 //python/... -- -//python/dist:source_wheel -//python:aarch64_test -//python:x86_64_test -//python:google/protobuf/pyext/_message.so -//python:proto_api
build_wheels:
name: Build Wheels
@ -160,7 +161,7 @@ jobs:
image: us-docker.pkg.dev/protobuf-build/release-containers/linux/apple:7.1.2-d9624f2aa83cba3eaf906f751d75b36aacb9aa82
credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }}
bazel-cache: upb-bazel-python
bazel: build --crosstool_top=//toolchain:clang_suite --//toolchain:release=true --symlink_prefix=/ -c dbg --incompatible_enable_cc_toolchain_resolution=false //python/dist //python/dist:test_wheel //python/dist:source_wheel
bazel: build --noenable_bzlmod --crosstool_top=//toolchain:clang_suite --//toolchain:release=true --symlink_prefix=/ -c dbg --incompatible_enable_cc_toolchain_resolution=false //python/dist //python/dist:test_wheel //python/dist:source_wheel
- name: Move Wheels
run: mkdir wheels && find _build/out \( -name 'protobuf*.whl' -o -name 'protobuf-*.tar.gz' \) -exec mv '{}' wheels ';'
- uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0

@ -15,6 +15,7 @@ module(
bazel_dep(name = "abseil-cpp", version = "20240722.0", repo_name = "com_google_absl")
bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "jsoncpp", version = "1.9.6")
bazel_dep(name = "rules_apple", version = "3.13.0", repo_name = "build_bazel_rules_apple")
bazel_dep(name = "apple_support", version = "1.15.1", repo_name = "build_bazel_apple_support")
bazel_dep(name = "rules_cc", version = "0.0.17")
bazel_dep(name = "rules_fuzzing", version = "0.5.2")
@ -25,8 +26,8 @@ bazel_dep(name = "rules_license", version = "1.0.0")
bazel_dep(name = "rules_pkg", version = "1.0.1")
bazel_dep(name = "rules_python", version = "1.0.0")
bazel_dep(name = "rules_rust", version = "0.51.0")
bazel_dep(name = "platforms", version = "0.0.8")
bazel_dep(name = "zlib", version = "1.3.1")
bazel_dep(name = "platforms", version = "0.0.10")
bazel_dep(name = "zlib", version = "1.3.1.bcr.4")
bazel_dep(name = "bazel_features", version = "1.23.0", repo_name = "proto_bazel_features")
bazel_dep(
name = "rules_shell",
@ -43,21 +44,20 @@ SUPPORTED_PYTHON_VERSIONS = [
"3.12",
]
# TODO: Support hermetic / system python in bzlmod.
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
[
python.toolchain(
# Disable root warning for .pyc cache misses since CI runs as root.
# See https://github.com/bazelbuild/rules_python/pull/713
ignore_root_user_error = True,
is_default = python_version == SUPPORTED_PYTHON_VERSIONS[-1],
python_version = python_version,
)
for python_version in SUPPORTED_PYTHON_VERSIONS
]
use_repo(
python,
system_python = "python_{}".format(SUPPORTED_PYTHON_VERSIONS[-1].replace(".", "_")),
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip", dev_dependency = True)
[
@ -119,5 +119,9 @@ bazel_dep(
repo_name = "com_google_absl_py",
)
# For clang-cl configuration
cc_configure = use_extension("@rules_cc//cc:extensions.bzl", "cc_configure_extension")
use_repo(cc_configure, "local_config_cc")
# rules_proto are needed for @com_google_protobuf_v25.0 used in //compatibility/... tests
bazel_dep(name = "rules_proto", version = "4.0.0", dev_dependency = True)

@ -10,11 +10,6 @@ local_repository(
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
local_repository(
name = "com_google_protobuf_examples",
path = "examples",
)
# Load common dependencies first to ensure we use the correct version
load("//:protobuf_deps.bzl", "PROTOBUF_MAVEN_ARTIFACTS", "protobuf_deps")
@ -39,10 +34,10 @@ py_repositories()
# Bazel platform rules.
http_archive(
name = "platforms",
sha256 = "3a561c99e7bdbe9173aa653fd579fe849f1d8d67395780ab4770b1f381431d51",
sha256 = "218efe8ee736d26a3572663b374a253c012b716d8af0c07e842e82f238a0a7ee",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/platforms/releases/download/0.0.7/platforms-0.0.7.tar.gz",
"https://github.com/bazelbuild/platforms/releases/download/0.0.7/platforms-0.0.7.tar.gz",
"https://mirror.bazel.build/github.com/bazelbuild/platforms/releases/download/0.0.10/platforms-0.0.10.tar.gz",
"https://github.com/bazelbuild/platforms/releases/download/0.0.10/platforms-0.0.10.tar.gz",
],
)

@ -21,6 +21,43 @@ ruby_runtime("system_ruby")
register_toolchains("@system_ruby//:toolchain")
load("@system_ruby//:bundle.bzl", "ruby_bundle")
ruby_bundle(
name = "protobuf_bundle",
srcs = ["//ruby:google-protobuf.gemspec"],
bundler_version = "2.4.22",
gemfile = "//ruby:Gemfile",
)
# For testing UPB.
http_archive(
name = "lua",
build_file = "//python/dist:lua.BUILD",
sha256 = "b9e2e4aad6789b3b63a056d442f7b39f0ecfca3ae0f1fc0ae4e9614401b69f4b",
strip_prefix = "lua-5.2.4",
urls = [
"https://mirror.bazel.build/www.lua.org/ftp/lua-5.2.4.tar.gz",
"https://www.lua.org/ftp/lua-5.2.4.tar.gz",
],
)
http_archive(
name = "com_github_google_benchmark",
sha256 = "62e2f2e6d8a744d67e4bbc212fcfd06647080de4253c97ad5c6749e09faf2cb0",
strip_prefix = "benchmark-0baacde3618ca617da95375e0af13ce1baadea47",
urls = ["https://github.com/google/benchmark/archive/0baacde3618ca617da95375e0af13ce1baadea47.zip"],
)
http_archive(
name = "com_google_googleapis",
build_file = "//benchmarks:BUILD.googleapis",
patch_cmds = ["find google -type f -name BUILD.bazel -delete"],
sha256 = "d986023c3d8d2e1b161e9361366669cac9fb97c2a07e656c2548aca389248bb4",
strip_prefix = "googleapis-d81d0b9e6993d6ab425dff4d7c3d05fb2e59fa57",
urls = ["https://github.com/googleapis/googleapis/archive/d81d0b9e6993d6ab425dff4d7c3d05fb2e59fa57.zip"],
)
# Following are just needed to run conformance tests, not really needed to support them via MODULE.bazel
# For testing runtime against old gencode from a previous major version.
@ -35,7 +72,6 @@ http_archive(
load("@com_google_protobuf_v25.0//:protobuf_deps.bzl", protobuf_v25_deps="protobuf_deps")
protobuf_v25_deps()
# Needed for checking breaking changes from the previous release version.
load("//:protobuf_version.bzl", "PROTOBUF_PREVIOUS_RELEASE")

@ -29,6 +29,11 @@ platform(
"@platforms//cpu:x86_64",
"@platforms//os:windows",
"@bazel_tools//tools/cpp:clang-cl",
# This is necessary for Bazel 7 compatibility with a MODULE.bazel file that still works in
# Bazel 8. Using cc_configure_extension from rules_cc produces a @local_config_cc
# repository that's not compatible with @bazel_tools//tools/cpp:clang-cl from before
# Bazel 8. See https://github.com/bazelbuild/rules_cc/issues/330.
"@rules_cc//cc/private/toolchain:clang-cl",
],
)
@ -38,6 +43,11 @@ platform(
"@platforms//cpu:x86_64",
"@platforms//os:windows",
"@bazel_tools//tools/cpp:msvc",
# This may be necessary in case cc_configure_extension from rules_cc produces a
# @local_config_cc repository that's not compatible with @bazel_tools//tools/cpp:msvc from
# before Bazel 8, as with clang-cl above, to avoid silently falling back to clang-cl.
# See https://github.com/bazelbuild/rules_cc/issues/330.
"@rules_cc//cc/private/toolchain:msvc",
],
)

@ -77,10 +77,6 @@ build --incompatible_use_host_features
# --incompatible_fail_on_unknown_attributes
# --incompatible_merge_fixed_and_default_shell_env
# TODO: migrate all dependencies from WORKSPACE to MODULE.bazel
# https://github.com/protocolbuffers/protobuf/issues/14313
common --noenable_bzlmod
# For easier debugging of build failures.
common --announce_rc
build --verbose_failures

@ -3,7 +3,8 @@ import common.bazelrc
build --cxxopt=-std=c++17 --host_cxxopt=-std=c++17
build --cxxopt="-Woverloaded-virtual"
build --copt="-Wpointer-arith"
build --copt="-Werror" --copt="-Wno-sign-compare" --copt="-Wno-sign-conversion" --copt="-Wno-error=sign-conversion" --copt="-Wno-deprecated-declarations"
# TODO: Remove -Wno-unknown-warning-option once BCR zlib has @platform//os:macos condition.
build --copt="-Werror" --copt="-Wno-sign-compare" --copt="-Wno-sign-conversion" --copt="-Wno-error=sign-conversion" --copt="-Wno-deprecated-declarations" --copt="-Wno-unknown-warning-option"
common --xcode_version_config=@com_google_protobuf//.github:host_xcodes
build --apple_crosstool_top=@local_config_apple_cc//:toolchain

@ -93,6 +93,9 @@ class ModuleFileFunctions(object):
def use_extension(self, *args, **kwargs):
return ExtensionFunctions()
def local_path_override(self, *args, **kwargs):
pass
class Converter(object):

@ -1,5 +1,11 @@
"""Bazel module dependencies"""
module(
name = "com_google_protobuf_examples",
version = "0.0.0",
compatibility_level = 1,
)
bazel_dep(name = "protobuf", version = "0.0.0", repo_name = "com_google_protobuf")
local_path_override(
module_name = "protobuf",

@ -4,7 +4,7 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file or at
# https://developers.google.com/open-source/licenses/bsd
"""Test that Kokoro is using the expected version of python."""
"""Test that test runner is using the expected version of python."""
import os
import sys
@ -18,7 +18,7 @@ class PythonVersionTest(unittest.TestCase):
exp = os.getenv('KOKORO_PYTHON_VERSION', '')
if not exp:
print('No kokoro python version found, skipping check', file=sys.stderr)
print('No system python version found, skipping check', file=sys.stderr)
return
self.assertTrue(
sys.version.startswith(exp),

Loading…
Cancel
Save