Page MenuHomePhabricator

Commits merged in Gerrit should appear near-instantly in Phabricator
Closed, DeclinedPublic

Description

e.g. https://phabricator.wikimedia.org/diffusion/EABL/manage/basics/ has an update frequency of 2 hours right now, which is pretty slow for our main repository viewer.

According to https://secure.phabricator.com/book/phabricator/article/diffusion_updates/ we can ping the diffusion.looksoon API to tell it to queue an update once a commit is merged in Gerrit. Is this possible to have a gerrit hook or something do it post-merge? Or some external daemon that does this by listening to the Gerrit stream-changes feed...?

Event Timeline

@Legoktm hi, if the repo is not frequently updated, the time it takes for it to check for updates gets increased. This is to prevent the phabricator host from having a big increase in load due to it checking the updates.

I wouldn't be apposed to integrating something in gerrit to trigger the updates. Phabricator tries to scale it's update frequency based on the commit frequency of a given repository. The biggest problem with update lag right now is that we have 1000s of repositories to poll so even when you prioritize an update it'll still take somewhere between 30 seconds and 5 minutes to get updated.

5 minutes is significantly better than 2 hours. The delayed polling thing makes sense I suppose, except we do have a push mechanism available to us and don't need to rely on polling.

It looks like the most straightforward way to do this would be to use the hooks plugin for gerrit which provides a change-merged hook.

Relevant Documentation:

mmodell added a subscriber: demon.

We will need to reinstall the hooks plugin.

CC'ing @demon as he removed the plugin.

Tbh, I'd rather stop using Phabricator for our repo viewer. It kinda sucks :\

But I guess we can enable this plugin, barring that :(

Change 401697 had a related patch set uploaded (by Chad; owner: Chad):
[operations/software/gerrit@master] Add hooks plugin @ 2.13.9

https://gerrit.wikimedia.org/r/401697

Change 401697 merged by Chad:
[operations/software/gerrit@master] Add hooks plugin @ 2.13.9

https://gerrit.wikimedia.org/r/401697

@demon: why does phabricator suck as a code browser? And what do you think would be better?

Pagination of repos, poor search usability cross repo....

I agree about search, however, codesearch helps with that situation

Well, that's the point....as nice as the tool is, it's annoying that we need an external tool....

Plus, my main point is regarding git-viewer links from within Gerrit. We've always hated having to mirror refs/changes/* to Phab for this. Using Gitiles avoids that.

I don't really care what repo viewer people use generally, but for the links within Gerrit, Phab is a pretty annoying context switch.

I filed this task originally since it was causing problems for libraryupgrader, but that has now switched to gitiles (T187150) so this is no longer a problem for me (assuming gitiles updates instantly).

@Legoktm: So although I think we should still do some things to make phabricator update faster, given that the original need is now met, should we close this?