New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/build: add Gerrit plugin to give us REST endpoint for last-modified time of anything globally #24955

Open
bradfitz opened this Issue Apr 19, 2018 · 0 comments

Comments

Projects
None yet
3 participants
@bradfitz
Member

bradfitz commented Apr 19, 2018

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 == git ls-remotes).

In particular, we want to know when the "meta" refs change (refs/changes/98/103398/meta).

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.

@gopherbot gopherbot added this to the Unreleased milestone Apr 19, 2018

@gopherbot gopherbot added the Builders label Apr 19, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment