bazelbuild / bazelbuild/bazel

`//src/test/shell/integration/focus_test` fails on Bazel 9

Open
#27,532 1 comment 0 reactions 0 assignees View on GitHub
P3 team-Configurability type: bug
Dominant language
Java
Stars
25.8k
Forks
4.6k
Avg merge
2d 20h
Merged PRs (30d)
72

Description

### Description of the bug:

Specifically https://github.com/bazelbuild/bazel/blob/ce6bdd119d0938d1a4e692ea23adf63f3e7fa762/src/test/shell/integration/focus_test.sh#L481

The test can be reduced to the below for a minimal repro:

```sh
bazel build //${pkg}:g || fail "expected to succeed"
bazel info || fail "expected to succeed"
bazel build //${pkg}:g || fail "expected to succeed"
```

@mai93 showed that removing these lines fixes the test:

https://github.com/bazelbuild/bazel/blob/ce6bdd119d0938d1a4e692ea23adf63f3e7fa762/src/main/java/com/google/devtools/build/lib/runtime/BlazeCommandDispatcher.java#L671-L680

Even with those lines removed, reproducing at the command line shows strange behavior:

```sh
$ mkdir testapp
$ cat > testapp/BUILD < testapp/in.sh < g.blazerc <

Contributor guide

Open the contributing guide

Research direction

Start with src/test/shell/integration/focus_test.sh around line 481 and reproduce the three-command sequence on Bazel 9 using the provided minimal workspace and g.blazerc. Then inspect BlazeCommandDispatcher.java around lines 671-680 and compare the clean --expunge and shutdown paths. Done means the integration test and minimal reproduction no longer fail without relying on unexplained behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, shell
Domain
build-system, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.