Page MenuHomePhabricator

git-review fails with "The requested URL /changes/ was not found on this server."
Closed, ResolvedPublic


Since the switch to debian git-review on the guest box does not work for me:

vagrant@mediawiki-vagrant:/vagrant/mediawiki$ git review -x 348763
Cannot query patchset information
The following command failed with exit code 104
<title>404 Not Found</title>
<h1>Not Found</h1>
<p>The requested URL /changes/ was not found on this server.</p>

----------------------- does indeed not work; the correct URL seems to be

The git-review on my host machine works from the same directory so it seems like some kind of version incompatibility (cf T158479).

Event Timeline

I have this too, with a virtualbox VM created without vagrant. I'm pinned to "experimental" packages.

git-review version 1.25.0

fwiw, downgrading is a decent workaround:

pip install git-review==1.24

We have since started using polygerrit and this wasn't fixed. Maybe it is some nonstandard configuration used by the WMF gerrit instance?

Hi, which version of git-review are you using? this was fixed in git-review 1.6.

As you can see from the comments, this started happening in 1.25.

Change 435192 had a related patch set uploaded (by Paladox; owner: Paladox):
[mediawiki/vagrant@master] Update git-review to 1.26.0

I have the same problem on stat1006.

@CCicalese_WMF hi, did you update to git-review 1.26.0?

No, I see it is running 1.25. Will see about upgrading. Thanks.

I get the same error with 1.26 and even 1.27 (also without vagrant). The error message is different (ValueError: No JSON object could be decoded and a stack trace) but the issue is the same: request goes to and that just gets redirected to

@Tgr i guess that means a new bug has been introduced as /p/ means projects.

On a closer look this is a problem with Vagrant. git-review (in 1.27 at least) uses git config --get remote.origin.url to get the base URL; admin pages on gerrit currently use<project> but Vagrant uses<project> instead (which is apparently the legacy URL, it does work for git clone but confuses git-review).

Change 473937 had a related patch set uploaded (by Gergő Tisza; owner: Gergő Tisza):
[mediawiki/vagrant@master] Fix git-review

Change 473937 merged by jenkins-bot:
[mediawiki/vagrant@master] Fix git-review

Tgr claimed this task.

I'll call this done. (Thanks for the help @Paladox!)

If you have an older Vagrant, you need to pull and reprovision so you get the newest git-review. More problematically (even if you use git-review on the host machine) you need to manually edit your remote URLs in every repo (edit .git/config, replace /r/p/ with /r/ in all the URLs). Vagrant is not well equipped for applying one-time fixes so I don't think we can do much about that.

Well done @Tgr , indeed git-review forge the Gerrit API url based on the git remote URL. Thank you to have updated git-review in Vagrant!

Change 435192 abandoned by Paladox:
Update git-review to 1.27.0