Add an execution log differ that reports why spawns differ between two builds
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- java
- Ambito
- build-system, devtools
Direzione di ricerca
Start by reading src/tools/execlog:parser and the documented execution log comparison procedure linked in the issue. The proposal describes matching spawns and tracing changed inputs through the spawn graph, but the implementation is not included in the issue, and the author says it is about 1,000 lines of Java plus unit tests. Done means a tool in src/tools/execlog that compares compact logs and reports root causes with affected spawn counts.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Description of the feature request:
Add a tool next to //src/tools/execlog:parser that compares two compact execution logs of the same build and reports why spawns differ, grouped by root cause.
One changed env var or source file makes every downstream spawn differ. The tool reports only the differences that aren't a consequence of another spawn, with the number of spawns each one affects. Output for two builds of a six-genrule workspace, where I edited a.txt between the builds and one genrule writes $RANDOM:
Spawns: 6 before, 6 after
Matched: 1 identical, 5 different
Unmatched: 0 only before, 0 only after
Causes, by the number of matched spawns that differ because of them:
1. file: a.txt
3 spawns taking 0.056s, first: Genrule bazel-out/darwin_arm64-fastbuild/bin/a.out [//:a]
2. nondeterministic spawn: Genrule bazel-out/darwin_arm64-fastbuild/bin/stamp.out [//:stamp]
2 spawns taking 0.037s, first: Genrule bazel-out/darwin_arm64-fastbuild/bin/stamp.out [//:stamp]
It detects changed arguments, env vars, platform properties and timeouts, added or removed inputs, changed files that no spawn in the log produces, and spawns that produce different outputs from the same command and inputs.
I have an implementation with unit tests and can send a PR if this is welcome in the tree.
Which category does this issue belong to?
Remote Execution
What underlying problem are you trying to solve with this feature?
Debugging cache misses between two builds.
The documented procedure is to build the parser from source, convert both logs to text and diff them. On a large build that diff is mostly consequences: the one difference that matters is repeated in every spawn downstream of it, and a nondeterministic action looks the same as one whose inputs changed.
--verbose_explanations became a no-op in ec10da4e3fad, whose description points to the execution log as the better way to pinpoint why an action was re-run. I couldn't find tooling on top of the log that does this.
Which operating system are you running Bazel on?
macOS
What is the output of bazel info release?
release 9.3.3
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 ?
Have you found anything relevant by searching the web?
scripts/aquery_differcompares command lines and input lists from twoaqueryoutputs. It has no digests or outputs, so it can't see changed file contents or nondeterminism.- #24071 is about noise in the textual diff of two parsed logs.
- #7962 and #32027 hash targets to tell that something changed, not why.
Any other information, logs, or outputs that you want to share?
Implementation notes:
- It reads the compact format directly and keeps input sets nested. Sets are compared by a hash computed while reading and only flattened for spawns whose set of input paths changed.
- Spawns are matched by mnemonic and first output.
- A changed input is attributed to the spawn that produced it, through symlink actions and output directories, so causes propagate along the spawn graph.
Limits: compact format only, text output only, and builds with different output directories don't match up.
Is src/tools/execlog the right place for this? I could follow up with JSON output and a non-zero exit code on nondeterminism for use in CI.
The implementation is about 1,000 lines of Java plus unit tests, all under src/tools/execlog with no changes to Bazel itself; comparing two logs of a 966-spawn build of //src/tools/execlog:parser takes 0.7 s and peaks at 250 MB.
- Lingua principale
- Java
- Stelle
- 26.2k
- Fork
- 4.7k
- Merge medio
- 3g 11h
- PR unite (30g)
- 125
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di bazelbuild/bazel
-
team-Rules-Java type: bug untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
bazelbuild/bazel#33068 ·
I maintainer di solito rispondono entro 2 giorni
-
Remote repo contents cache rejects repos with a backslash in a file name on UnixForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertateam-Remote-Exec type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
bazelbuild/bazel#32601 · 3 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
bazelbuild/bazel#32132 ·
I maintainer di solito rispondono entro 2 giorni
-
team-Local-Exec type: documentation (cleanup)
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
bazelbuild/bazel#31318 ·
I maintainer di solito rispondono entro 2 giorni
-
Docs: run/build.mdx describes a sandboxing warning removed in 2017 and a flag deleted in 9.0.0Forse già presa @lavishdev l’ha presa 70 giorni fa. Apertahelp wanted P2 team-Documentation team-OSS type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
bazelbuild/bazel#31316 ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di bazelbuild/bazel
Issue simili
-
[P2] 生产环境下启动门闩的失败明细不进容器标准输出Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
Lincoln-cn/JAiRouter#1473 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
exercism/java-analyzer#379 ·
-
area: ui bug priority: low
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
tetsuji16/microProject#1893 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
liberation-data/fornax4j#325 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: FE and Kinesis extraction pipes render flow starting at the centre and scroll the source arm backwardsForse già presa @chonkzillaofficial l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
BCCE-team/BuildCraft#85 ·