blob: 74ee6e73770c3c8665d60f48c9fcf7dbcba0c741 [file] [log] [blame]
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="images/favicon.ico">
<title>Apache Unomi Open Source Customer Data Platform | Contribute | Post-commit policies details </title>
<!-- Google Analytics -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-70313240-1', 'auto');
ga('send', 'pageview');
</script>
<!-- End Google Analytics -->
<!-- Bootstrap core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- Fontawesome CSS CDN -->
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" integrity="sha384-DNOHZ68U8hZfKXOrtjWvjxusGo9WQnrNx2sqG0tfsghAvtVlRW3tvkXWZh58N9jp" crossorigin="anonymous">
<!-- Custom styles for this template -->
<link href="css/unomi.css" rel="stylesheet">
</head>
<body>
<header>
<nav class="navbar navbar-expand-md navbar-light bg-white fixed-top border-bottom box-shadow">
<div class="container">
<a class="navbar-brand" href="index.html"><img src="images/unomi-86x20.png"/></a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse justify-content-end" id="navbarCollapse">
<div>
<ul class="navbar-nav mr-auto align-items-center text-uppercase">
<li class="nav-item">
<a class="nav-link" href="get-started.html">Get started</a>
</li>
<li class="nav-item">
<a class="nav-link" href="use-cases.html">Use cases</a>
</li>
<li class="nav-item">
<a class="nav-link" href="download.html">Download</a>
</li>
<li class="nav-item">
<a class="nav-link" href="documentation.html">Documentation</a>
</li>
<li class="nav-item active">
<a class="nav-link" href="contribute.html">Contribute <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="community.html">Community</a>
</li>
<li class="nav-item">
<a class="nav-link disabled" target="_blank" href="https://www.apache.org"><img src="images/apache-feather-tm-new.png"/></a>
</li>
</ul>
<div>
</div>
</div>
</nav>
</header>
<main role="main">
<!-- Marketing messaging and featurettes
================================================== -->
<!-- Wrap the rest of the page in another container to center all the content. -->
<div class="container">
<!-- CONTRIBUTE -->
<div class="row mb-5 mt-5 pt-3">
<div class="col-2 sidenav-menu pt-3">
<div class="pb-3 text-uppercase"><strong>Contribute</strong></div>
<ul class="list-unstyled mb-3">
<li><a href="contribute.html">Get started contributing</a></li>
<li class="sidenav-menu-sub-title">Technical Docs</li>
<li>
<ul class="list-unstyled sidenav-menu-sub-list">
<li><a href="contribute-testing.html">Testing guide</a></li>
<li><a href="contribute-dependencies-guide.html">Dependencies guide</a></li>
</ul>
</li>
<li class="sidenav-menu-sub-title">Policies</li>
<li>
<ul class="list-unstyled sidenav-menu-sub-list">
<li><a href="contribute-pre-commit-test-policies.html">Pre-commit test policies</a></li>
<li><a href="contribute-post-commit-test-policies.html">Post-commit test policies</a></li>
</ul>
</li>
<li class="sidenav-menu-sub-title">Committers</li>
<li>
<ul class="list-unstyled sidenav-menu-sub-list">
<li><a href="contribute-become-a-committer.html">Become a committer</a></li>
<li><a href="contribute-committer-guide.html">Committer guide</a></li>
<li><a href="contribute-release-guide.html">Release guide</a></li>
</ul>
</li>
</ul>
</div>
<div class="col-8 pt-3 offset-4">
<h2>Post-commit policies details</h2>
<p>A post-commit test failure means that there is a bug in the code. The longer the bug exists, the harder it is to fix it due to ongoing code contributions. As a result, we want to fix bugs quickly. The Unomi community's post-commit test policies help keep our code and test results in a good state.</p>
<h3 id="rollback_first">Rollback first</h3>
<p>Unomi uses a "rollback first" approach: the first action to resolve a test failure is to rollback the culprit code change. The two main benefits of this
approach are short implementation time and high reliability. When we rollback first, we quickly return to a previously verified good state.</p>
<p>At a high level, this approach consists of the following steps:</p>
<ol>
<li>Revert the culprit commit.</li>
<li>Re-run the post-commit tests to verify the tests pass.</li>
<li>Push the revert commit.</li>
</ol>
<h3 id="failing_test_is_critical_bug">A failing test is a critical/P1 issue</h3>
<p>It is difficult to properly verify new changes made on top of buggy code. In some cases, adding additional code can make the problem worse. To avoid this situation, fixing failing tests is our highest priority.</p>
<h3 id="flake_is_failing">A flaky test is a critical/P1 issue</h3>
<p>Flaky tests are considered failing tests, and fixing a flaky test is a critical/P1 issue.</p>
<p>Flaky tests are tests that randomly succeed or fail while using the same code version. Flaky test failures are one of the most dangerous types of failures
because they are easy to ignore – another run of the flaky test might pass successfully. However, these failures can hide real bugs and flaky tests often
slowly accumulate. Someone must repeatedly triage the failures, and flaky tests are often the hardest ones to fix.</p>
<p>Flaky tests do not provide a reliable quality signal, so it is important to quickly fix the flakiness. If a fix will take awhile to implement, it is safer
to disable the test until the fix is ready.</p>
<p>Martin Fowler has a good <a target="_blank" href="https://martinfowler.com/articles/nonDeterminism.html">article</a> about non-determinism in tests.</p>
<h3 id="remove_flake">Flaky tests must be fixed or removed</h3>
<p>Flaky tests do not provide a reliable quality signal, which has a harmful effect on all tests and can lead to a loss of trust in our test suite. As a result, contributors might start to ignore test failures.</p>
<p>We want everyone to trust our tests, so it is important to diligently fix all laky tests. If it is not possible to fix a flaky test, we must remove the test.</p>
<h3 id="precommit_for_postcommit">Add new pre-commit tests as part of a post-commit fix</h3>
<p>Post-commit tests are an important fail-safe, but we want to fail fast. Failing fast means that we want to detect bugs in pre-commit tests, and <em>not</em> in post-commit tests.</p>
<p>When you implement a fix for a post-commit test failure, add a new pre-commit test that will detect similar failures in the future. For example, you can
implement a new unit test that covers a problematic code branch.</p>
</div>
</div>
</div>
</main>
<!-- FOOTER -->
<footer class="container-fluid bg-dark pt-5 pb-3 text-white text-center footer">
<div class="container pb-5">
<div class="row">
<div class="col-3 col-md-3">
<h5>Start</h5>
<ul class="list-unstyled text-small">
<li><a href="get-started.html" title="Get started">Get started</a></li>
<li><a href="get-started.html#quickstart" title="Quick start">Quick start</a></li>
<li><a href="download.html" title="Download">Download</a></li>
</ul>
</div>
<div class="col-3 col-md-3">
<h5>Documentation</h5>
<ul class="list-unstyled text-small">
<li><a href="documentation.html" title="Main documentation">Main documentation</a></li>
<li><a href="use-cases.html" title="More use cases">More use cases</a></li>
<li><a href="rest-api-doc/index.html" title="REST API documentation">REST API documentation</a></li>
<li><a href="unomi-api/apidocs/index.html" title="API Javadoc">API Javadoc</a></li>
</ul>
</div>
<div class="col-3 col-md-3">
<h5>Community</h5>
<ul class="list-unstyled text-small">
<li><a href="community.html" title="Mailing lists">Contact Us</a></li>
<li><a href="contribute.html" title="Contribute">Contribute</a></li>
<li><a href="community-team.html" title="Team">Team</a></li>
<li><a href="community-maturity-model-report.html" title="Maturity model report card">Maturity model report card</a></li>
</ul>
</div>
<div class="col-3 col-md-3">
<h5>About</h5>
<ul class="list-unstyled text-small">
<li><a target="_blank" href="https://www.oasis-open.org/committees/cxs/" title="OASIS Context Server Technical Committee">OASIS CXS Committee</a></li>
<li><a href="privacy-policy.html" title="Site policy">Site policy</a></li>
<li><a href="license.html" title="Licenses">Licenses</a></li>
<li><a target="_blank" href="https://www.apache.org/foundation/sponsorship.html" title="Sponsorship">Sponsorship</a></li>
<li><a target="_blank" href="https://www.apache.org/foundation/thanks.html" title="Thanks">Thanks</a></li>
</ul>
</div>
<div class="w-100 pt-md-3"></div>
</div>
</div>
<p class="float-right"><a href="#">Back to top</a></p>
<p>Copyright &copy;2014 - 2018 <a target="_blank" href="https://www.apache.org">Apache Software Foundation</a> - All Rights Reserved - Powered by <a target="_blank" href="https://karaf.apache.org">Apache Karaf</a><br/>
Apache Karaf, Apache Mahout, Apache and the Apache feather logo are either registered trademarks or trademarks of The Apache Software Foundation in the United States and other countries.</p>
</footer>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script>window.jQuery || document.write('<script src="assets/js/vendor/jquery-slim.min.js"><\/script>')</script>
<script src="assets/js/vendor/popper.min.js"></script>
<script src="js/bootstrap.min.js"></script>
</body>
</html>