don't create try pushes for old phabricator revisions
If reviewbot fails to create a try push for a given phabricator revision in some time (1 hour?), it should give up instead of holding on to it forever.
We're seeing an issue right now where reviewbot is delayed making try pushes by 2 days.
This would be fixed around here: https://github.com/mozilla/libmozevent/blob/a41fad391146bbdc182b3bcc295353c30f76bfbc/libmozevent/mercurial.py#L357.
We should return a failure and post to Phab that we run out of time.
- we should check the age of the build there as there are other stop conditions
- the age is obtainable through
PhabricatorBuild.diff.[some path in JSON]
Side note: we need this patch to test deployment of #2449 (if we need to get some downtime, it will spam with try pushes otherwise)
This is fixed in libmozevent, we just need to upgrade the lib.
The usage of this patch in events gives this Sentry issue
I made a cleaner version of build expiry check, adding a new state on the build, and custom error messages.
These 2 PRs still require some unit tests
@Archaeopteryx could you review https://github.com/mozilla/libmozevent/pull/109 then we need to build a libmozevent release (should just be a tag push) and use it in #2550