We have all been there, we are committing a two character change in a project and send our review all happy and dandy with the review tool full of hope that our change is rock solid :

You now that a two character change cannot fail. This is a tiny change in some arcane part of the Swift code that can never get passed by the tests launched in Jenkins and should just be a straightforward commit.

You are still anxious to see how it goes, so we fire our web browser and go to that beautiful page setup by our infra team and like that guy watching the tiny greeen progress bar hoping, well.. that it’s stay green :

You’d think to don’t have to stress and you that you can just let it go do its job.

But after a couple of minutes (and that’s if you are lucky) you are receiving an email from jenkins stating that the “Build has failed”? And this is where you start to feel like this guy thinking WHAT HAVE I DONE :

There is a handy link near the failure giving you the full log in the console.html file there. But digging into that log is like looking for a needle in a haystack, you are spending at least at most 5 minutes looking for a FAIL until if you are lucky it finally popping up in front of your face :

So now that you went by that effort you need to match the FAILURE to a real bug. Armed with your web browser you get into the recheck page http://status.openstack.org/rechecks/ where you start hitting furiously your ⌘-F or Control-F key shortcut hoping to match to an existing bug report.

To be honest, it doesn’t have to be so tedious. Since I like to save my time for stuff like browsing the internet for OpenStack reactions gifs, I just automate the thing.

I start to curl the console output of the failed job :

and just use my trusty grep to grep the FAIL :

I can just now go to the launchpad bug search page on https://bugs.launchpad.net/ and just type the failed test in the search box to look for that bug :

and just hit the recheck bug bugnumber in the review box :

PS: Go watch Sean Dague excellent summit talk:  Jenkins Failed My Patch, What Do I Do.