BEP issues with SOURCE_INPUT_MISSING errors
- Dominant language
- Java
- Stars
- 25.8k
- Forks
- 4.6k
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 72
Description
### Description of the bug:
I found some issues with BEP for SOURCE_INPUT_MISSING errors.
1. It publishes `target_completed` events after the `build_finished` event, which is contrary to the documentation https://bazel.build/remote/bep#build-event-graph
2. It publishes `target_completed` events twice sometimes - one with `aborted` payload and one with normal
### Which category does this issue belong to?
Core
### What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
First problem is always reproducible. The second one is more tricky, we've just got an error in one of our CI builds, here is the BEP snippet:
```
id {
target_configured {
label: "//oss/victoriametrics/lib/streamaggr:streamaggr_test"
}
}
children {
target_completed {
label: "//oss/victoriametrics/lib/streamaggr:streamaggr_test"
configuration {
id: "864f07f80c1d8ccebff2633a6eae100c57cb83b00fba81d3a67060bf8a85c63e"
}
}
}
configured {
target_kind: "go_test rule"
test_size: MEDIUM
}
id {
target_completed {
label: "//oss/victoriametrics/lib/streamaggr:streamaggr_test"
configuration {
id: "864f07f80c1d8ccebff2633a6eae100c57cb83b00fba81d3a67060bf8a85c63e"
}
}
}
aborted {
}
id {
target_completed {
label: "//oss/victoriametrics/lib/streamaggr:streamaggr_test"
configuration {
id: "864f07f80c1d8ccebff2633a6eae100c57cb83b00fba81d3a67060bf8a85c63e"
}
}
}
children {
unconfigured_label {
label: "//oss/victoriametrics/lib/prompbmarshal:prompbmarshal.go"
}
}
children {
action_completed {
primary_output: "bazel-out/k8-fastbuild/bin/oss/victoriametrics/lib/fs/fs.a"
label: "//oss/victoriametrics/lib/fs:fs"
configuration {
id: "d8240da1690cee9256e1aa4436e3d998f2561f805b15fb3b8a8eafa1b915965c"
}
}
}
children {
unconfigured_label {
label: "//oss/victoriametrics/lib/streamaggr:increase.go"
}
}
completed {
tag: "medium"
tag: "moderate"
tag: "noflaky"
tag: "nolocal"
failure_detail {
message: "missing input file \'//oss/victoriametrics/lib/prompbmarshal:prompbmarshal.go\'"
execution {
code: SOURCE_INPUT_MISSING
}
}
}
```
### Which operating system are you running Bazel on?
ubuntu:22.04
### What is the output of `bazel info release`?
release 7.0.2
### 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` ?
_No response_
### Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.
_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
Research direction
Reproduce the BEP output for a SOURCE_INPUT_MISSING failure on Bazel 7.0.2 using the provided event snippet and the documented build-event graph ordering. Trace how target_completed and build_finished events are emitted, then verify that target_completed is emitted once and before build_finished for this failure case.
Written by the indexing model from the issue text.
Assessment
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100