<div style="display: flex; flex-wrap: wrap; white-space: pre-wrap; align-items: center; "><img height="20" width="20" style="border-radius:50%; margin-right: 4px;" decoding="async" src="https://avatars.githubusercontent.com/u/50826859?s=20&v=4" /><strong>hlfan</strong> left a comment <a href="https://github.com/openstreetmap/openstreetmap-website/pull/6151#issuecomment-3065898078">(openstreetmap/openstreetmap-website#6151)</a></div>
<p dir="auto">Let's take a look at the latest test run that didn't fail on "real bugs", <a href="https://github.com/openstreetmap/openstreetmap-website/actions/runs/16122953585">this test run</a> for <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="3204070991" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/6170" data-hovercard-type="pull_request" data-hovercard-url="/openstreetmap/openstreetmap-website/pull/6170/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/pull/6170">#6170</a>:</p>
<p dir="auto">The three executions of <code class="notranslate">rails test:all</code> finished in 297.341805s, 281.573575s, and 298.088535s.<br>
Once this step finishes, the remainder of the workflow usually takes less than 15 seconds.</p>
<p dir="auto">Now, one Ruby run fails:</p>
<ul dir="auto">
<li>Either the other runs can complete, costing about 20 seconds of compute time plus the re-run of one job.</li>
<li>Or this run cancels the other runs, costing the re-run of two jobs.</li>
</ul>
<p dir="auto">Unless you can make the jobs take less than 20 seconds, the current variant takes more time in this example.</p>
<hr>
<p dir="auto">Due to the usually parallel execution of the test runs, unless the error happens within the first two minutes of the workflow during the setup, <code class="notranslate">rails test:all</code> will only report an error after about seven minutes into the run, when the other runs are also almost complete.<br>
Thus, the "wasted [compute] time running tests that need to be rerun" will be bigger <strong>with</strong> <code class="notranslate">fail-fast</code>, <strong>unless</strong> test-caused (not bug-caused) failures occur more often than once in every 21 runs — based on the fact that cancelling other jobs saves only about 20 seconds per job, while letting them finish typically costs around 7 minutes total.</p>
<p dir="auto">And currently, I don't see test failures being even close to the necessary 95.2% bug-caused failure rate.<br>
Therefore, <code class="notranslate">fail-fast</code> currently <strong>increases</strong> total compute time, because most jobs are cancelled <em>just seconds before completion</em>, and have to be re-run anyway. So we end up paying twice.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/6151#issuecomment-3065898078">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLOIBXWQNPKIEDLN7ET3IFA7FAVCNFSM6AAAAACAOKEHD2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTANRVHA4TQMBXHA">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLLYLIHAS6WBGB4DCCD3IFA7FA5CNFSM6AAAAACAOKEHD2WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTVWXXSF4.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/pull/6151/c3065898078</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>

<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/6151#issuecomment-3065898078",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/6151#issuecomment-3065898078",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>