envoy: Unable to build/test as root (was: bazel build -c opt envoy not working on mian branch)

it seems bazel build -c opt envoy not working on main branch

bazel build -c opt envoy
Starting local Bazel server and connecting to it...
WARNING: The following configs were expanded more than once: [clang]. For repeatable flags, repeats are counted twice and may lead to unexpected behavior.
INFO: Repository python3_10_x86_64-unknown-linux-gnu instantiated at:
  /root/go/src/istio.io/envoy/WORKSPACE:17:25: in <toplevel>
  /root/go/src/istio.io/envoy/bazel/repositories_extra.bzl:17:31: in envoy_dependencies_extra
  /root/.cache/bazel/_bazel_root/7f7b02015e8f8c68d9ee0e5dc9b62be7/external/rules_python/python/repositories.bzl:366:26: in python_register_toolchains
Repository rule python_repository defined at:
  /root/.cache/bazel/_bazel_root/7f7b02015e8f8c68d9ee0e5dc9b62be7/external/rules_python/python/repositories.bzl:269:36: in <toplevel>
ERROR: An error occurred during the fetch of repository 'python3_10_x86_64-unknown-linux-gnu':
   Traceback (most recent call last):
        File "/root/.cache/bazel/_bazel_root/7f7b02015e8f8c68d9ee0e5dc9b62be7/external/rules_python/python/repositories.bzl", line 153, column 25, in _python_repository_impl
                fail("The current user is root, please run as non-root when using the hermetic Python interpreter. See https://github.com/bazelbuild/rules_python/pull/713.")
Error in fail: The current user is root, please run as non-root when using the hermetic Python interpreter. See https://github.com/bazelbuild/rules_python/pull/713.
ERROR: /root/go/src/istio.io/envoy/WORKSPACE:17:25: fetching python_repository rule //external:python3_10_x86_64-unknown-linux-gnu: Traceback (most recent call last):
        File "/root/.cache/bazel/_bazel_root/7f7b02015e8f8c68d9ee0e5dc9b62be7/external/rules_python/python/repositories.bzl", line 153, column 25, in _python_repository_impl
                fail("The current user is root, please run as non-root when using the hermetic Python interpreter. See https://github.com/bazelbuild/rules_python/pull/713.")
Error in fail: The current user is root, please run as non-root when using the hermetic Python interpreter. See https://github.com/bazelbuild/rules_python/pull/713.
INFO: Reading rc options for 'build' from /root/go/src/istio.io/envoy/.bazelrc:
  'build' options: --color=yes --workspace_status_command=bash bazel/get_workspace_status --incompatible_use_platforms_repo_for_constraints=false --incompatible_strict_action_env --host_force_python=PY3 --java_runtime_version=remotejdk_11 --tool_java_runtime_version=remotejdk_11 --platform_mappings=bazel/platform_mappings --copt=-DABSL_MIN_LOG_LEVEL=4 --action_env=CC --host_action_env=CC --action_env=CXX --host_action_env=CXX --action_env=LLVM_CONFIG --host_action_env=LLVM_CONFIG --action_env=PATH --host_action_env=PATH --enable_platform_specific_config --test_summary=terse --define absl=1 --@com_googlesource_googleurl//build_config:system_icu=0 --test_env=HEAPCHECK=normal --test_env=PPROF_PATH
WARNING: The following configs were expanded more than once: [clang]. For repeatable flags, repeats are counted twice and may lead to unexpected behavior.
ERROR: @com_googlesource_googleurl//build_config:system_icu :: Error loading option @com_googlesource_googleurl//build_config:system_icu: error loading package '': at /root/go/src/istio.io/envoy/bazel/dependency_imports.bzl:10:6: Encountered error while reading extension file 'requirements.bzl': no such package '@base_pip3//': no such package '@python3_10_x86_64-unknown-linux-gnu//': The current user is root, please run as non-root when using the hermetic Python interpreter. See https://github.com/bazelbuild/rules_python/pull/713.

cc @phlax can you take a look?

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 18 (18 by maintainers)

Most upvoted comments

Turns out there’s a bool so we can unblock the update but not yet force the root issue. Updating here https://github.com/envoyproxy/envoy/pull/23231

I think we should revert, then do a blast to all the email lists, slack, etc. and say that we are going to roll forward in a week. This will give people time to pin, schedule work to stop using root, etc.