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

rules_proto release build fails with wrong bazel-cache #16

Closed
meteorcloudy opened this issue Jun 17, 2024 · 6 comments · Fixed by bazelbuild/rules_proto#218
Closed

rules_proto release build fails with wrong bazel-cache #16

meteorcloudy opened this issue Jun 17, 2024 · 6 comments · Fixed by bazelbuild/rules_proto#218
Assignees

Comments

@meteorcloudy
Copy link

https://github.com/bazelbuild/rules_proto/actions/runs/9520256013/job/26245280441

ERROR: error loading package under directory '': error loading package '~/.cache/bazel-repo/bazel/_bazel_runner/43914acf8bee29fb1d82f3e3dee22a49/external/bazel_tools/src/java_tools/buildjar/java/com/google/devtools/build/buildjar/jarhelper': Unable to find package for @@[unknown repo 'rules_java' requested from @@]//java:defs.bzl: The repository '@@[unknown repo 'rules_java' requested from @@]' could not be resolved: No repository visible as '@rules_java' from main repository.

This error is not reproducible locally from rules_proto @ bazelbuild/rules_proto@8df2b70

The previous run was with 7.1.1 and this one is with Bazel 7.2.0, therefore I suspect the wrong cache was used in the build.

@meteorcloudy
Copy link
Author

@alexeagle Does my assumption make any sense?

@meteorcloudy
Copy link
Author

/cc @comius

@meteorcloudy
Copy link
Author

Maybe it's related to bazelbuild/bazel#16937 where XDG_CACHE_HOME is now respected by Bazel.

@meteorcloudy
Copy link
Author

# Bazelisk will download bazel to here.
XDG_CACHE_HOME: ~/.cache/bazel-repo

Looks like XDG_CACHE_HOME was only meant for Bazelisk previously.

@alexeagle
Copy link
Contributor

Ah nice! Thanks for tracking that down.

@alexeagle alexeagle self-assigned this Jun 19, 2024
@alexeagle
Copy link
Contributor

https://github.com/bazel-contrib/.github/pull/13/files fixed this by switching this reusable workflow to use https://github.com/bazel-contrib/setup-bazel

rules_proto is still on v5 of this repo, so it missed that upgrade v5...v6

I'll update rules_proto and also check why it isn't getting regular updates from Renovate.

alexeagle added a commit to bazelbuild/rules_proto that referenced this issue Jun 19, 2024
Uses https://github.com/bazel-contrib/setup-bazel which doesn't have a reference to XDG_CACHE_HOME.

Fixes bazel-contrib/.github#16
comius pushed a commit to bazelbuild/rules_proto that referenced this issue Jun 19, 2024
The newer version uses https://github.com/bazel-contrib/setup-bazel
which doesn't have a reference to XDG_CACHE_HOME.

Fixes bazel-contrib/.github#16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants