blob: c5f37395d9592a4505eea3094afbf4fdd0641ff9 [file] [log] [blame]
---
title: Contribute | Pre-commit test policies
layout: default
---
<!-- 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 id="definitions">Pre-commit test policies</h2>
<h3>Definition</h3>
<ul>
<li>Pre-commit test - Any single test in a pre-commit test suite.</li>
<li>Pre-commit test suite - A collection of pre-commit tests that have a common denominator. A test suite runs in a single Jenkins job.</li>
</ul>
<h3>Policies</h3>
<h4>Pull Requests</h4>
<ul>
<li>A PR must pass pre-commit tests before being committed to the main Unomi repo.
<ul>
<li>The relevant pre-commit test suites are automatically launched according to PR contents.</li>
</ul>
</li>
</ul>
<h4>Problems</h4>
<h5>Breakage</h5>
<p>Breakage is when one or more tests in a pre-commit test suite fails or is flaky (occasionally fails).</p>
<ul>
<li>Breakages should be fixed within 8 hours.</li>
</ul>
<h5>Slowness</h5>
<p>Slowness is when the total time to run a pre-commit suite exceeds 30 minutes*, including the time the job spends in the Jenkins queue.</p>
<ul>
<li>Slowness should be fixed within 24 hours.</li>
</ul>
<h4>Problem Resolution</h4>
<p>For any problem, the options are, one of:</p>
<ul>
<li>Roll back the culprit PR.</li>
<li>Roll out a fix within 24 hours.</li>
<li>Disable the slow test or feature temporarily (make sure there is a tracking issue to re-enable it).</li>
</ul>
</div>
</div>
</div>