An organization would like to determine what the most common causes of intermittent build failures/flaky tests are in the a repository so that effort can be prioritized to fix them.
The Dr. CI project entails two distinct user-facing outputs:
The latter has several distinct utilities:
master
failuresSee docs/CODEBASE-OVERVIEW.md.
Dr. CI assumes a linear history of the master
branch.
This can be enforced on GitHub via the following setting under the "Branches" -> "Branch protection rule" section for master
:
This tool obtains a list of CircleCI builds run against a GitHub repository for a master branch, downloads their logs (stripped of ANSI escape codes) from AWS, and scans the logs for a predefined list of labeled patterns (regular expressions).
These patterns are curated by an operator. The frequency of occurrence of each pattern are tracked and presented in a web UI.
The database tracks which builds have been already scanned for a given pattern, so that scanning may be performed incrementally or resumed after abort.
Requiring that failures in the master branch be annotated will facilitate tracking of the frequency of "brokenness" of master over time, and allow measurement of whether this metric is improving.
It is possible for only specific jobs of a commit to be marked as "known broken", e.g. the Travis CI Lint job.
See: docs/development-environment
See: docs/aws
gh-notification-ingest-env
in Elastic Beanstalk, and hosted at domain github-notifications-ingest.pytorch.org
) receives GitHub webhook notifications and stores them (synchronously) in a database.EnqueSQSBuildScansFunction
queries for unprocessed notifications in the database, and enqueues an SQS message for each of them.log-scanning-worker
process the SQS messages as capacity allows.We want a cool-off period during which multiple builds for a given commit can be aggregated into one task for that commit. This is accomplished via an SQS deduplicating queue, where multiple instances of the same commit are consolidated while in the queue.
Aho-Corasick implementation is from here: https://github.com/channable/alfred-margaret