Skip to content
Analyzing Travis and Azure Pipelines logs to find encountered errors
Rust Dockerfile
Branch: master
Clone or download
Mark-Simulacrum Allow log_url to return None
Azure sometimes just doesn't have logs for builds, perhaps yet, and we
currently panic and shutdown the worker thread in that case. Instead,
just log the failure but don't ignore it.
Latest commit cd63c4b Jul 13, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Allow log_url to return None Jul 13, 2019
.dockerignore add dockerfile Jul 5, 2019
.travis.yml add dockerfile Jul 5, 2019
Cargo.lock Update deps so that openssl builds Jul 4, 2019
Cargo.toml Update deps so that openssl builds Jul 4, 2019
Dockerfile bind inside the dockerfile Jul 5, 2019
LICENSE Initial commit Apr 4, 2018 remove most references of travis in the ci-agnostic code Jun 26, 2019

Rust Log Analyzer

The Rust Log Analyzer (RLA) is a tool that analyzes the CI build logs of the rust-lang/rust repository with the purpose of automatically extracting error messages from failed builds.

This repository contains three components:

  • The rust_log_analyzer library, which contains the analysis logic.
  • The rla-offline binary, a collection of various tools to run the analyzer off-line (see the output of rla-offline --help for available commands).
  • The rla-server binary, a web server which receives GitHub webhooks and automatically posts analysis results to the Rust repository.

Running RLA

RLA uses the log crate to write all output. By default, anything logged at INFO or higher will be printed. You can change this behavior by setting the RLA_LOG environment variable, using the syntax specified by the env_logger crate.


To run commands which access online resources, you have to provide the required authentication information in environment variables:

Bootstrapping an index file

To initialize a new index file, perform the following steps:

  1. Download some successful build logs using the rla-offline dl command.
    • It is recommended that you run in release mode.
    • I'm still gathering data, but you should probably have well over 1000 log files (this does not mean over 1000 builds, since one builds consists of dozens of jobs)
    • Example command: rla-offline dl --ci travis -c 40 --branch auto --passed -o data/training
  2. Train on the downloaded logs using the rla-offline learn command.
    • Example command: rla-offline learn -i demo.idx data/training

Analyzing a specific log

  1. Download the log file you want to analyze using either the rla-offline dl command or manually from
    • All tools will automatically decompress files ending in .brotli, or assume uncompressed data otherwise.
  2. Use the rla-offline extract-one command analyze the log file.
    • Example command: rla-offline extract-one -i demo.idx my-log.txt

Evaluating quality while developing

Note: This process will / should be integrated as regression tests.

  1. Download, or otherwise curate, a set of log files you want to evaluate against.
    • Example command: rla-offline dl --ci travis -c 50 --failed -o data/failed
    • Note: Eventually, a set of test log files will be provided in the repository.
  2. Use the rla-offline extract-dir command to analyze all the log files and write the results to a separate directory.
    • You can (temporarily) check the result directory in to the repository to see diffs.
    • Example command: rla-offline extract-dir -i demo.idx -s data/failed -d data/err
    • Note: Eventually, the expected results for the test log files will be provided in the repository and used as regression tests.
You can’t perform that action at this time.