Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Torvaney/chaoscat
Chaos engineering for Pull Requests - Taking a not-even-good joke a bit too far
https://github.com/Torvaney/chaoscat
Last synced: 30 days ago
JSON representation
Chaos engineering for Pull Requests - Taking a not-even-good joke a bit too far
- Host: GitHub
- URL: https://github.com/Torvaney/chaoscat
- Owner: Torvaney
- License: bsd-3-clause
- Created: 2019-05-08T21:39:32.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-05-18T11:34:25.000Z (over 5 years ago)
- Last Synced: 2024-11-12T12:45:36.037Z (about 1 month ago)
- Language: Haskell
- Homepage:
- Size: 57.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: ChangeLog.md
- License: LICENSE
Awesome Lists containing this project
- awesome-chaos-engineering - ChaosCat - Chaos engineering for Pull Requests - Taking a not-even-good joke a bit too far. (3. Fault Injection / Languages)
README
# ChaosCat
Chaos engineering for Pull Requests. ChaosCat merges open pull requests
at random, subject to configurable parameters.Clone and run with stack:
``` bash
git clone
cd chaoscat# Set environment variables
export CHAOSCAT_OWNER=torvaney
export CHAOSCAT_REPO=example-pr-repo
export CHAOSCAT_AUTH=abcdefghijklmnop # Put your actual GitHub auth token here
export CHAOSCAT_RATE=0.5 # Avg hours (after minimum) before closing a pull request
export CHAOSCAT_MINHOURS=0.15 # Minimum hours before a pull request is closedstack run
```## How does it work?
ChaosCat will merge Pull Requests according to an [exponential
distribution](https://en.wikipedia.org/wiki/Exponential_distribution).
This means that Pull Requests will be merged independently of one
another, and at a constant average rate.This average rate is configured with the `CHAOSCAT_RATE` environment
variable, which sets the average (mean) time before a Pull Request is
closed.You can also set a minimum amount of time before a Pull Request gets
merged, with the `CHAOSCAT_MINHOURS` environment variable.We can see what this distribution looks like in practice when applied to
the
[torvaney/example-pr-repo](https://github.com/torvaney/example-pr-repo)
repo with a minimum time of 0.15 hours (9 mins) and a rate of 0.5 hours
(30 mins):![](README_files/figure-gfm/plot-pr-distribution-1.png)
As you can see, no Pull Requests are merged initially. But once the
minimum time threshold is passed, they are merged at random, following
the exponential curve as expected (pink line).## But… why?
ChaosCat is a response to the question no one has been asking: what if
we applied the principles of [Chaos
Engineering](https://en.wikipedia.org/wiki/Chaos_engineering) to our
development practices themselves?[principlesofchaos.org](http://principlesofchaos.org) states that
> Chaos Engineering is the discipline of experimenting on a system in
> order to build confidence in the system’s capability to withstand
> turbulent conditions in production.In the same way, if we want to ensure that you can ship features to
production frequently, and gracefully handle bugs, what better way than
to ship features… automatically?Chaoscat (named after GitHub’s Octocat and Netflix’s Chaos Monkey)
merges your pull requests at random, forcing you to develop robust
processes around code review and feature releases