Most of the time, it's wasteful for EWS bots to keep building or testing once a patch has been obsoleted. It would be much better to drop obsoleted patches quickly, and to move to ones that people are actually waiting for. One exception is landed patches, where it's nice to know what EWS was going to come up with.
<rdar://problem/27768813>
<rdar://problem/55486159>
*** Bug 217964 has been marked as a duplicate of this bug. ***
Note that we added more checks for change being still active in https://bugs.webkit.org/show_bug.cgi?id=160739 and https://bugs.webkit.org/show_bug.cgi?id=203756 However, this bug is about proactively cancelling the ongoing builds. On a PR when a new hash is uploaded, actively go and check for previous hashes on that PR, check for the ongoing builds for those hashes and cancel them (using buildbot API). There might be multiple ways to implement the same. One approach can be to implement it in ews-app (since it already has information of all the hashes for a PR, and all the ongoing builds). In this approach, one of the main task would be to perform authentication to buildbot while calling the api. Another approach can be to implement this in buildbot configuration itself (inside events.py), whenever a new hash information comes, maybe ask ews-app for previous hashes on that PR, and ongoing builds for those PRs and then cancel them.