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

Error No matching toolchains found for types @@bazel_tools//tools/python:toolchain_type in Downstream CI with 7.1 #21348

Closed
sgowroji opened this issue Feb 14, 2024 · 7 comments

Comments

@sgowroji
Copy link
Member

sgowroji commented Feb 14, 2024

CI: https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/3657#018da594-7593-4e8f-850f-187a1a4cb063

Platform: Windows, MacOS, Ubuntu

Logs:

(03:07:01) ERROR: /var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/dd5f1ab0fb45f70a5ca8f71a165f3850/external/bazel_tools/tools/jdk/BUILD:133:10: While resolving toolchains for target @@bazel_tools//tools/jdk:proguard_whitelister (102280f): No matching toolchains found for types @@bazel_tools//tools/python:toolchain_type.
To debug, rerun with --toolchain_resolution_debug='@@bazel_tools//tools/python:toolchain_type'

CC Greenteam @mai93 @meteorcloudy 

List of Downstream projects failing with above error logs

  1. Stardoc
  2. rules_apple
  3. rules_dotnet
  4. rules_proto
  5. Bazel skylib
@meteorcloudy
Copy link
Member

Can you use bazelisk to bisect those failures?

@sgowroji
Copy link
Member Author

I tried this '''
bazelisk --bisect=f9acae2b1f486c74f7b465b11e18d8d8d1ed410e..3e17028 build //src:bazel //src:bazel_jdk_minimal //src:test_repos //src/main/java/...'''. It was succeeded,And didn't resulted any culprit.

@meteorcloudy
Copy link
Member

meteorcloudy commented Feb 15, 2024

@sgowroji You should bisect the broken downstream project, not building Bazel itself.

pcloudy@pcloudy-macbookpro3:~/workspace/bazel-skylib (main)
$ bazel --bisect=7.0.0..release-7.1.0 build //...

@meteorcloudy
Copy link
Member

And the result is

--- Bisect Result

first bad commit is https:/bazelbuild/bazel/commit/86a5f6b66dac4001c88fa00f938e0b482aede4a7

@meteorcloudy
Copy link
Member

OK, probably we need to backport 9810870

@sgowroji
Copy link
Member Author

Yes

--- Succeeded at 1821a88

--- Bisect Result

first bad commit is 86a5f6b
sgowroji-macbookpro3:bazel-skylib sgowroji$

@meteorcloudy meteorcloudy added this to the 7.1.0 release blockers milestone Feb 15, 2024
github-merge-queue bot pushed a commit that referenced this issue Feb 15, 2024
… toolchain by default (#21369)

A regression from upgrading to rules_python 0.22.0 is that a Python
toolchain is no longer registered by default (the prior 0.4.0 version
registered the "autodetecting" toolchain). Subsequent versions of
rules_python (0.23.0 or later) register a toolchain by default again,
but it's a downloaded runtime, which makes upgrading more involved.

To fix, upgrade to 0.22.1, which registers the autodetecting toolchain.
This restores the rules_python 0.4.0 behavior and should suffice until
bazel_tools is upgraded to 0.23.0 or later.

Fixes #20458

Closes #20514

PiperOrigin-RevId: 592578175
Change-Id: I707a4c96829063536f81cc10e144652102da1e7e

Fixes #21348

Co-authored-by: Richard Levasseur <[email protected]>
@iancha1992
Copy link
Member

Fixed by #21369

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants