Page MenuHomePhabricator

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


e.g. has an update frequency of 2 hours right now, which is pretty slow for our main repository viewer.

According to 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 created this task.Dec 30 2017, 12:11 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 30 2017, 12:11 AM

@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 triaged this task as Normal priority.Jan 2 2018, 11:21 PM
mmodell added a subscriber: demon.

We will need to reinstall the hooks plugin.

CC'ing @demon as he removed the plugin.

demon added a comment.Jan 3 2018, 5:42 AM

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

demon added a comment.Jan 3 2018, 5:42 AM

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

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

mmodell added a comment.EditedJan 4 2018, 5:49 PM

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

demon added a comment.Jan 4 2018, 6:07 PM

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

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

demon added a comment.Jan 4 2018, 11:00 PM

Well, that's the 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.

demon added a comment.EditedJan 4 2018, 11:00 PM

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?

Legoktm closed this task as Declined.Mar 6 2018, 8:54 PM