intellij icon indicating copy to clipboard operation
intellij copied to clipboard

[Bazel CI] Pyinfo is not defined error with Bazel@HEAD

Open sgowroji opened this issue 7 months ago • 5 comments

CI: https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/4671#0196c7d2-e4b3-4f46-bd53-bce6a5a8b423

Platform: Ubuntu

Logs:

ERROR: [0m/var/lib/buildkite-agent/builds/bk-docker-nzr0/bazel-org-repo-root/intellij/aspect/python_info.bzl:9:12: name 'PyInfo' is not defined (did you mean 'CcInfo'?)
ERROR: [0m/var/lib/buildkite-agent/builds/bk-docker-nzr0/bazel-org-repo-root/intellij/aspect/python_info.bzl:26:8: name 'PyInfo' is not defined (did you mean 'CcInfo'?)
ERROR: [0m/var/lib/buildkite-agent/builds/bk-docker-nzr0/bazel-org-repo-root/intellij/aspect/python_info.bzl:27:23: name 'PyInfo' is not defined (did you mean 'CcInfo'?)
ERROR: [0merror loading package under directory 'aspect/testing': error loading package 'aspect/testing/tests/src/com/google/idea/blaze/aspect/scala/scalatest': at /var/lib/buildkite-agent/builds/bk-docker-nzr0/bazel-org-repo-root/intellij/aspect/testing/rules/intellij_aspect_test_fixture.bzl:9:5: at /var/lib/buildkite-agent/builds/bk-docker-nzr0/bazel-org-repo-root/intellij/aspect/intellij_info_impl.bzl:23:6: compilation of module 'aspect/python_info.bzl' failed

Error: The command exited with status 1[0m
error: running "plugin docker command" shell hook: The plugin docker command hook exited with status 1

Culprit:

Steps:

git clone https://github.com/bazelbuild/intellij
git reset 3db9b053690dd1bc39533cb163e73ddc040b3ae3  --hard
export USE_BAZEL_VERSION=11c38261667b9976b7bd08f9f05c8a735d65f8e2
bazel test --define=ij_product=intellij-oss-oldest-stable --test_output=errors --notrim_test_configuration //aspect/testing/... 

CC Greenteam @wyverald

sgowroji avatar May 13 '25 10:05 sgowroji

We also see below error https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/4673#0196cd14-af4d-44b1-9ccb-ff31d603ba67

(04:37:46) ERROR: /var/lib/buildkite-agent/builds/bk-docker-hsf1/bazel-org-repo-root/intellij/aspect/build_dependencies_deps.bzl:16:16: name 'JavaInfo' is not defined
--


sgowroji avatar May 14 '25 07:05 sgowroji

@LeFrosch I see that we are already using aspect templates in https://github.com/bazelbuild/intellij/blob/master/aspect/python_info.bzl but maybe it is not working with unreleased bazel version used in this test.

mai93 avatar May 14 '25 16:05 mai93

Templating does not work for aspect tests, only at runtime. There are two options here, I guess:

  1. Update the non templated version to work with the most recent Bazel version
  2. Add support for templating during the tests

CC @ujohnny, @sellophane

LeFrosch avatar May 15 '25 10:05 LeFrosch

Team, Given that the current bug has caused our Downstream CI pipeline to fail for over two weeks, we're temporarily moving it to a disabled pipeline. It will be reinstated in the Downstream CI once it successfully passes its tests in the disabled pipeline.

sgowroji avatar May 30 '25 06:05 sgowroji

@LeFrosch I'd proceed with the 1st option, wdyt?

ujohnny avatar Sep 04 '25 09:09 ujohnny