Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
x/build: add Gerrit plugin to give us REST endpoint for last-modified time of anything globally #24955
Gerrit doesn't have pubsub, so we instead have a dummy Google account that subscribes to all possible email spam from Gerrit. That dummy Google account has an email address with a domain name whose MX record goes to an SMTP server we run (see https://pubsubhelper.golang.org/).
That lets us get realtime updates from Gerrit so gopherbot can react in realtime to changes in Gerrit.
But it only works for actions for which Gerrit generates an email.
Some actions on Gerrit, notably modifying hashtags on a CL, do NOT generate an email. This is good, because such email would be spammy. It is bad, though, in that gopherbot cannot react quickly.
It would be nice if maintner (https://maintner.golang.org/) could have a cheap way to poll Gerrit for changes. Currently no methods are cheap enough, which is why we do the SMTP server thing.
We resort to polling every 5 minutes or so. (whereby polling ==
In particular, we want to know when the "meta" refs change (
I know of no Gerrit REST API to get that information cheaply. (and definitely no git API)
I don't mind whether this works at the project level or the server level. Project might be better, as we want to monitor all of go.googlesource.com/* but only part of code.googlesource.com.