buildbuddy-io / buildbuddy

BuildBuddy is an open source Bazel build event viewer, result store, remote cache, and remote build execution platform.

Home Page:https://buildbuddy.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Show analysis phase errors explicitly

evis opened this issue · comments

Is your feature request related to a problem? Please describe.

Case:

  1. Run bazel build --keep-going on CI to see all problems in build
  2. It has only one problem, during analysis phase

What happens:

  1. Buildbuddy doesn't show this problem explicitly
  2. It's quite hard to find this error in log. Log example: https://gist.github.com/evis/791843039e9655975a818182b66940e4 — the failure is
[2024-04-17 16:33:14] ERROR: /place/sandbox-data/tasks/5/8/2283762585/mounted_arcadia/classifieds/verticals-backend/etc-mono/services/anubis/cli/BUILD:55:11: in deps attribute of scala_test rule //etc-mono/services/anubis/cli:tests: rule '//etc-mono/services/anubis/cli:test_java_proto' does not exist. Since this rule was created by the macro 'scala_test', the error might have been caused by the macro implementation
[2024-04-17 16:33:14] ERROR: /place/sandbox-data/tasks/5/8/2283762585/mounted_arcadia/classifieds/verticals-backend/etc-mono/services/anubis/cli/BUILD:55:11: Analysis of target '//etc-mono/services/anubis/cli:tests' failed

It's not at the end of my build, it's somewhere between it's begin and end.

Describe the solution you'd like
Show analysis phase errors in buildbuddy UI explicitly (maybe, on Targets tab).

Describe alternatives you've considered

  1. Run bazel build without --keep-going option. But then, we won't see all failures.
  2. Run bazel build --keep-going --no-build, and then bazel build --keep-going. But then, the build will be slower.

This is great feedback! Sent #6407 to improve how we render errors and make sure we handle this case.

One limitation is that Bazel doesn't send us the line numbers in the build event stream, so the current implementation will show target labels but not line numbers.

Wow, that's amazing! Thank you so much, will be waiting for the new release!