Page MenuHomePhabricator

Update Gerrit /r/p/ links to /r/
Open, HighPublic

Description

At some point Gerrit changed its URL schema from starting with /r/p to just /r/. The old URL works for the web interface (for now) but not for the REST API and various git commands. We'll have to update URLs in all kinds of places (configuration, submodules, scripts, CI, vagrant, documentation...)

Related Objects

Event Timeline

Tgr created this task.Mar 21 2019, 2:51 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 21 2019, 2:51 AM
Tgr updated the task description. (Show Details)

Hello

If the task is available, can I work on this?

Thank you!

Hi Eisheeta, no need to ask - this task will take many patches before getting resolved and is open (see upper left corner) so it is available.

Change 498057 had a related patch set uploaded (by MarcoAurelio; owner: MarcoAurelio):
[operations/puppet@production] contint: change /r/p/ to /r/ for gerrit links

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

Dzahn added a subscriber: Dzahn.Mar 21 2019, 12:37 PM
Dzahn removed a subscriber: Dzahn.
Dzahn added a subscriber: Dzahn.

@Eisheeta You could create a Gerrit user and review https://gerrit.wikimedia.org/r/c/operations/puppet/+/498057 if you like. Then there will be more similar patches needed.

I am working on Code search patch(s).

Change 498087 had a related patch set uploaded (by Nikitrain; owner: Nikitrain):
[mediawiki/extensions/Wikibase@master] Change /r/p/ to /r/ for gerrit links

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

Change 498100 had a related patch set uploaded (by Nikitrain; owner: Nikitrain):
[mediawiki/extensions/AdvancedSearch@master] Change /r/p/ to /r/ for gerrit links

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

May I ask why all the patches uploaded so far actually break URLs that worked before?

May I ask why all the patches uploaded so far actually break URLs that worked before?

What are the exact steps to see that breakage? (Picking a random example, both git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Scribunto.git and git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/Scribunto.git work for me and do clone that repo.)

/p/ is completely optional. Cloning over /r/ and /r/p/ work.

What are the exact steps to see that breakage? […]

I don't know. Just try following the link?

In https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/AdvancedSearch/+/498100/1/docs/settings.md links in a readme have been broken.

That specific link changes a Phab link and not a Gerrit link, so the patch needs improvement.

Change 498100 abandoned by Nikitrain:
Change /r/p/ to /r/ for gerrit links

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

Change 498100 restored by Nikitrain:
Change /r/p/ to /r/ for gerrit links

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

Nikitrain added a comment.EditedMar 21 2019, 3:53 PM

That specific link changes a Phab link and not a Gerrit link, so the patch needs improvement.

Does it mean the link didn't need any change?

and what about https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Wikibase/+/498087 patch it only changes Gerrit links

As far as I understand this ticket here, it is

  1. exclusively about Gerrit links.
  2. exclusively about links that are used to clone a repository.

Neither was the case in patch set 1 of https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/AdvancedSearch/+/498100/1/docs/settings.md. That was unrelated. However, the patch still makes sense after it was updated with a second patch set.

Note that there are many other Gerrit links that might contain the /r/p/ you are looking for but are not about cloning, but to link to a patch set, a file in a patch set, a dashboard, or something else.

I suggest to not blindly remove p/ wherever it can be found, but make sure you are really touching a clone link and copy-paste the new clone link from the Gerrit UI. For example, it is provided here (click "anonymous http" at the top): https://gerrit.wikimedia.org/r/#/admin/projects/mediawiki/extensions/Wikibase

got it! Thanks! I will take care :)

Change 498087 abandoned by Nikitrain:
Change /r/p/ to /r/ for gerrit links

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

Tgr added a comment.Mar 21 2019, 4:54 PM

Yeah. this is about links which will end up in somebody's git config as a git remote URL (so URL used for git clone, git remote add, .gitmodules and such). Sorry, I should have been clearer.

The context is (there's a related task but I'm unable to find it, /r/p/ does not make a great search query) that the Gerrit REST API does not work with /p/, more recent versions of git-review use REST API URLs calculated from the git remote URL when that is a HTTPS URL, and that results in confusing breakage for git-review commands.

Change 498163 had a related patch set uploaded (by Nikitrain; owner: Nikitrain):
[mediawiki/extensions/BoilerPlate@master] Change /r/p/ to /r/ for gerrit links

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

Change 498174 had a related patch set uploaded (by Nikitrain; owner: Nikitrain):
[mediawiki/extensions/BaseHooks@master] Change /r/p/ to /r/ for gerrit links

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

Change 498183 had a related patch set uploaded (by Nikitrain; owner: Nikitrain):
[mediawiki/extensions/EducationProgram@master] Change /r/p/ gerrit links to /r/

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

Change 498190 had a related patch set uploaded (by Nikitrain; owner: Nikitrain):
[mediawiki/extensions/examples@master] Change /r/p/ to /r/ for gerrit links

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

Change 498197 had a related patch set uploaded (by Nikitrain; owner: Nikitrain):
[mediawiki/extensions/Gitweb@master] Change /r/p/ to /r/ for gerrit links

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

Change 498206 had a related patch set uploaded (by Legoktm; owner: Legoktm):
[integration/quibble@master] Drop /p from Gerrit clone URL

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

Change 498206 merged by jenkins-bot:
[integration/quibble@master] Drop /p from Gerrit clone URL

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

Change 498190 merged by jenkins-bot:
[mediawiki/extensions/examples@master] Change /r/p/ to /r/ for gerrit links

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

Change 498183 merged by jenkins-bot:
[mediawiki/extensions/EducationProgram@master] Change /r/p/ gerrit links to /r/

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

Change 498163 merged by jenkins-bot:
[mediawiki/extensions/BoilerPlate@master] Change /r/p/ to /r/ for gerrit links

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

Change 498197 merged by jenkins-bot:
[mediawiki/extensions/Gitweb@master] Change /r/p/ to /r/ for gerrit links

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

Paladox triaged this task as High priority.Mar 21 2019, 7:53 PM

Change 498174 merged by jenkins-bot:
[mediawiki/extensions/BaseHooks@master] Change /r/p/ to /r/ for gerrit links

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

Change 498458 had a related patch set uploaded (by Nikitrain; owner: Nikitrain):
[mediawiki/extensions/Shibboleth@master] Change /r/p/ to /r/ for gerrit links

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

Change 498463 had a related patch set uploaded (by Nikitrain; owner: Nikitrain):
[mediawiki/extensions/SemanticImageInput@master] Change /r/p/ to /r/ for gerrit links

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

Change 498465 had a related patch set uploaded (by Nikitrain; owner: Nikitrain):
[mediawiki/extensions/SemanticTasks@master] Change /r/p/ to /r/ for gerrit links

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

Change 498458 merged by Krinkle:
[mediawiki/extensions/Shibboleth@master] Change /r/p/ to /r/ for gerrit links

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

Change 498465 merged by Umherirrender:
[mediawiki/extensions/SemanticTasks@master] Change /r/p/ to /r/ for gerrit links

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

Change 498463 merged by Umherirrender:
[mediawiki/extensions/SemanticImageInput@master] Change /r/p/ to /r/ for gerrit links

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

Change 498057 merged by Dzahn:
[operations/puppet@production] contint: change /r/p/ to /r/ for gerrit links

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