Repository navigation
Conversation
tests/fixtures/build-logs is the log tree of eight runs of GNU hello 2.12.1, built with EasyBuild 5.4.2 from EESSI 2025.06 with EESSI-extend, laid out as eb-pipeline lays out its runs: RUN/TARGET/, each easyconfig's output in NAME.stdout.log, its --tmp-logdir in easybuild-logs/NAME, and eb-keep-logs failed run after each failed build. The builds fail as builds do: a checksum of another release (eb exits 42), a patch made for hello 2.10 (44), a dependency nobody packaged (31), a configure that finds no working compiler (15), a compile error and an undefined reference (16), a failing test (1) and a sanity check path that is not there (45). One run holds two failed builds and a second target that builds; the last run builds with both toolchains. eb-keep-logs rotate compressed the first four runs. The builds ran as alice on a host named node1, in a clean environment, so the logs name no real user, host or site. tests/corpus has the easyconfigs and patches, run.sh, which runs a case as eb-pipeline runs a line, and make-fixtures.sh, which trims a tree for the fixtures by dropping lines, never editing one: of each kept session log, EasyBuild's warnings and errors and the records of its messages, steps and shell commands stay, without the output of the commands that succeeded or the middle of a failed command's output longer than 160 lines. EasyBuild's own copies of its logs stay out. The contributing guide says how to make the tree again, and CI runs shellcheck on both scripts.
`eb-keep-logs why [RUN | --latest] [--target TARGET] [--root ROOT] [--json]` reads the logs `failed` kept, plain or compressed by `rotate`, and prints for each failed easyconfig the package and easyconfig, the EasyBuild step it failed in, EasyBuild's message, and the line of the log that shows the error, with three lines either side, its path and its line number. A run's builds are read from its own directory, as `failed` given the run as LOGDIR keeps them, and from its target directories, as eb-pipeline keeps them. The line shown is the first compiler or linker error from the start of the failed step to EasyBuild's own error line, else that line: a GCC, Clang or nvcc error at a source line, or the undefined symbol or missing library GNU ld, lld or mold reports. EasyBuild's own error line is its first "EasyBuild encountered an error" in the session log, and its FAILED entry on the terminal. Steps are EasyBuild 5's, read from its "Starting STEP step" records and its announcements on the terminal. A build that kept no session log is read from its terminal output, with EasyBuild's wrapping at 80 columns undone. The inflater leaves a gzip member's CRC-32 and size unchecked, so why checks them. why gives no failure class; for one, feed the kept log to eb-stack. --json prints one line with schema_version 1, for eb-pipeline's run summary. The shell script refuses why, as COMPAT.md lists. tests/test_why.sh runs it on the real failures in tests/fixtures/build-logs; the untrimmed logs give the same step, message and error line.
`eb-keep-logs history PACKAGE [--target TARGET] [--root ROOT] [--json]` goes through the runs under ROOT, oldest first, and lists the builds whose NAME is PACKAGE or starts with PACKAGE and a dash, with their target, their outcome and the duration EasyBuild printed. The outcome is read from EasyBuild's output as why reads it; session logs are not read, so a long tree stays quick to list. A module name, NAME/VERSION, is taken as NAME-VERSION. --json prints one line with schema_version 1. The shell script refuses history, as COMPAT.md lists; tests/test_why.sh runs it on the same fixtures as why.
A how-to runs why and history on the kept logs of the corpus's real failed builds: the newest run, a named run, more of a log than why shows, a package's builds over the runs, and why --json read with jq for a script's own summary, with what to do when they find nothing. The front page names both commands, and the pipeline how-to points to the new one from its check.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
eb-keep-logs why [RUN | --latest] [--target TARGET] [--root ROOT] [--json]reads the logsfailedkept, plain or compressed byrotate, and prints for each failed easyconfig the package and easyconfig, the EasyBuild step it failed in, EasyBuild's message, and the line of the log that shows the error, with three lines either side, its path and its line number.The line shown is the first compiler or linker error from the start of the failed step to EasyBuild's own error line, else that line: a GCC, Clang or nvcc error at a source line, or the undefined symbol or missing library GNU ld, lld or mold reports. Steps are EasyBuild 5's, read from its
Starting STEP steprecords and its announcements on the terminal. A build that kept only its output is read from that, with EasyBuild's wrapping at 80 columns undone.For a failure class, feed the kept log to eb-stack;
whynames the step and the error line only.eb-keep-logs history PACKAGElists each kept build of that package, run by run, with the target, the outcome and the duration EasyBuild printed.--jsonprints the same as one line withschema_version1. The shell script refuses both commands, as COMPAT.md lists.