bazelbuild / bazelbuild/bazel

BES uploads slow down IDE interaction

Open
#17,907 2 comments 0 reactions 0 assignees View on GitHub
team-Core type: bug untriaged
Dominant language
Java
Stars
25.8k
Forks
4.6k
Avg merge
2d 20h
Merged PRs (30d)
72

Description

### Description of the bug:

If Bazel is configured to upload to the BES via `--bes_backend` and `--bes_upload_mode=fully_async`, all errors related to the BES communication should be hidden from the user. We did a lot of work years ago to ensure that this was the case.

Unfortunately, things break apart when `--build_event_binary_file` is *also* at play with the flags above -- which is a flag that IntelliJ uses during project syncing. When this flag is in use, Bazel will fail a build like below and report exit code 38, which then prevents IntelliJ from finalizing the sync step:

```
INFO: Build completed successfully, 1 total action
ERROR: The Build Event Protocol upload timed out. com.google.common.util.concurrent.TimeoutFuture$TimeoutFutureException: Timed out: NonCancellationPropagatingFuture@2a0889a1[status=PENDING, info=[delegate=[SettableFuture@24cf7290[status=PENDING]]]]
```

I'm not sure what the best solution here is, but IntelliJ syncing should *not* break even if there are problems talking to the remote BES service.

### What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

1. Set `--bes_backend=grpc://localhost:12345` (to a non-serving local port).
2. Set `--bes_upload_mode=fully_async`.
3. Set `--bes_timeout=10s`.
4. Run a build and see how the build succeeds and that errors talking to the BES are swallowed.
5. Now run a build specifying `--build_event_binary_file=/tmp/some-file` and see how the build fails with error code.
6. Or try the previous step via an IntelliJ project sync and notice how the sync does not complete.

### Which operating system are you running Bazel on?

Linux, but irrelevant

### What is the output of `bazel info release`?

release 6.1.1

### If `bazel info release` returns `development version` or `(@non-git)`, tell us how you built Bazel.

_No response_

### What's the output of `git remote get-url origin; git rev-parse master; git rev-parse HEAD` ?

_No response_

### Have you found anything relevant by searching the web?

_No response_

### Any other information, logs, or outputs that you want to share?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.