Skip to content

[Bazel CI] ERROR : @@rules_python+//python/runtime_env_toolchains:_runtime_env_py3_runtime: Visibility error: need to check if dependency is legitimate #28096

@bharadwaj08-one

Description

@bharadwaj08-one

CI: https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/5161#019b4e84-1f6d-4d91-a16a-2c9ece4a2dfd
Platform: Rocky Linux ,Ubuntu,Fedora,macOS

Logs:


(04:02:08) ERROR: /var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/ffb2a7a213e48ae6592f558a828e2414/external/rules_python+/python/runtime_env_toolchains/BUILD.bazel:19:29: in py_runtime rule @@rules_python+//python/runtime_env_toolchains:_runtime_env_py3_runtime: Visibility error:
--
target '@@rules_python+//python/private:runtime_env_toolchain_interpreter.sh' is not visible from
target '@@rules_python+//python/runtime_env_toolchains:_runtime_env_py3_runtime'
Recommendation: modify the visibility declaration if you think the dependency is legitimate. For more info see https://bazel.build/concepts/visibility. To set the visibility of that source file target, use the exports_files() function
(04:02:08) ERROR: /var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/ffb2a7a213e48ae6592f558a828e2414/external/rules_python+/python/runtime_env_toolchains/BUILD.bazel:19:29: Analysis of target '@@rules_python+//python/runtime_env_toolchains:_runtime_env_py3_runtime' (config: 9377a04) failed
Target //src/main/java/com/google/devtools/build/lib/runtime/commands/license:license up-to-date:
bazel-bin/src/main/java/com/google/devtools/build/lib/runtime/commands/license/LICENSE
(04:02:09) ERROR: Analysis of target '//src/main/java/com/google/devtools/build/lib:gen_reference_docs' failed; build aborted: Analysis failed
(04:02:09) INFO: Elapsed time: 3.545s, Critical Path: 0.33s
(04:02:09) INFO: 2 processes: 1 remote cache hit, 1 internal.
(04:02:09) ERROR: Build did NOT complete successfully

Culprit:

Steps:

git clone https://github.com/bazelbuild/bazel
git reset d6dc63124242e697b6896777db0ca83c103643b5 --hard
export USE_BAZEL_VERSION=257e440eae8a28b7452903ee12f2c64556d5e2fe
bazel build --config=my-rbe //src:bazel //src:bazel_jdk_minimal //src:test_repos //src/main/java/...

CC Greenteam @Wyverald

Metadata

Metadata

Assignees

No one assigned

    Labels

    team-OSSIssues for the Bazel OSS team: installation, release processBazel packaging, websiteteam-Rules-PythonNative rules for Pythontype: buguntriaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions