`--test_output=streamed` does not stream the logs when executing remotely
- Dominant language
- Java
- Stars
- 25.8k
- Forks
- 4.6k
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 72
Description
### Description of the bug:
If running a test with a remote executor
```
bazel test --remote_executor=grpcs://remotebuildexecution.googleapis.com --test_output=streamed //path/to:test
```
No logs are actually streamed to the terminal:
```
INFO: Analyzed target //incode/experimental/users/alexanderfaxa:sleep_forever_test (0 packages loaded, 0 targets configured).
[4 / 5] Testing //experimental/users/faximan:sleep_forever_test; 28s
# nothing
```
Eventually, the test times out and then dumps the whole log to my terminal. If I ctrl-c abort the process _while the test is running_, the logs are as far as I know lost forever.
### Which category does this issue belong to?
Remote Execution
### What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
_No response_
### Which operating system are you running Bazel on?
Linux
### What is the output of `bazel info release`?
release 8.4.0
### 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 HEAD` ?
```text
Private repo
```
### If this is a regression, please try to identify the Bazel commit where the bug was introduced with bazelisk --bisect.
_No response_
### Have you found anything relevant by searching the web?
There is https://github.com/bazelbuild/bazel/issues/19428 which is somewhat related.
Some people there are wondering whether `--test_output=streamed` will force local execution. In my experience it does not.
### Any other information, logs, or outputs that you want to share?
_No response_
Contributor guide
Research direction
Start by reproducing the supplied bazel test command with the remote executor and --test_output=streamed, then compare the behavior with issue #19428. Done means test logs appear in the terminal while the remote test is still running, including before an abort or timeout.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux
- Domain
- build-system, distributed-systems, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100