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

StatusAssignedTask
Resolved Dzahn
Resolved Dzahn
OpenNone
OpenNone
OpenNone
ResolvedPaladox
OpenNone
OpenNone
OpenNone
StalledNone
OpenNone
OpenPaladox
ResolvedPaladox
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
DeclinedNone
ResolvedPaladox
Resolvedhashar
Resolvedhashar
Resolvedhashar
ResolvedNone
ResolvedJoe
ResolvedJoe
OpenNone
OpenNone
Resolvedhashar
Resolvedhashar
Duplicatehashar
OpenNone

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

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

Paladox moved this task from Bugs & stuff to Local hacks on the Gerrit board.Apr 26 2019, 10:59 PM

Change 507074 had a related patch set uploaded (by Dzahn; owner: Paladox):
[operations/puppet@production] toollabs: Stop cloning over /p/

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

Change 507088 had a related patch set uploaded (by Dzahn; owner: Paladox):
[operations/puppet@production] openldap: Stop cloning over /p/

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

Change 507087 had a related patch set uploaded (by Dzahn; owner: Paladox):
[operations/puppet@production] toolforge: Stop cloning over /p/

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

Change 507084 had a related patch set uploaded (by Dzahn; owner: Paladox):
[operations/puppet@production] phragile: Stop cloning over /p/

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

Change 507079 had a related patch set uploaded (by Dzahn; owner: Paladox):
[operations/puppet@production] puppetmaster: Stop cloning over /p/

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

Change 507077 had a related patch set uploaded (by Dzahn; owner: Paladox):
[operations/puppet@production] statistics: Stop cloning over /p/

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

Change 507076 had a related patch set uploaded (by Dzahn; owner: Paladox):
[operations/puppet@production] authdns: Stop cloning over /p/

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

Change 507075 had a related patch set uploaded (by Dzahn; owner: Paladox):
[operations/puppet@production] analytics: Stop cloning over /p/

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

Change 507087 abandoned by Paladox:
toolforge: Stop cloning over /p/

Reason:
I've merged this into https://gerrit.wikimedia.org/r/#/c/operations/puppet/ /507074/

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

Change 507069 had a related patch set uploaded (by Paladox; owner: Paladox):
[operations/puppet@production] beta: Stop cloning over /p/

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

Change 507070 had a related patch set uploaded (by Paladox; owner: Paladox):
[operations/puppet@production] zuul: Stop cloning over /p/

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

Change 507072 had a related patch set uploaded (by Paladox; owner: Paladox):
[operations/puppet@production] scap: Stop cloning over /p/

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

Change 507223 had a related patch set uploaded (by Zoranzoki21; owner: Zoranzoki21):
[mediawiki/core@master] docs/kss/package.json: Update Gerrit /r/p/ link to /r/

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

Change 507070 merged by Dzahn:
[operations/puppet@production] zuul: Stop cloning over /p/

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

Mentioned in SAL (#wikimedia-operations) [2019-04-30T01:30:00Z] <mutante> contint2001..then contint1001 - deleting /etc/zuul/wikimedia and letting puppet re-clone it (gerrit:507070) (T218844)

Change 507787 had a related patch set uploaded (by Paladox; owner: Paladox):
[operations/puppet@production] Gerrit: Redirect /p/(.+)/info/(.+) to /$1/info/$2

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

Paladox added a comment.EditedMay 2 2019, 7:19 PM

Upstream are deprecating cloning over /p/, see https://bugs.chromium.org/p/gerrit/issues/detail?id=10381#c14

Update: it's now official that /p/ is no longer supported.

Change 507223 merged by jenkins-bot:
[mediawiki/core@master] docs/kss/package.json: Update Gerrit /r/p/ link to /r/

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

Change 507084 merged by Dzahn:
[operations/puppet@production] phragile: Stop cloning over /p/

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

Mentioned in SAL (#wikimedia-cloud) [2019-05-06T19:43:10Z] <mutante> phragile-pro: deleting /var/lib/phragile/composer and contents, deploying gerrit:507084 to reclone it for T218844

Change 507088 merged by Dzahn:
[operations/puppet@production] openldap: Stop cloning over /p/

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

Mentioned in SAL (#wikimedia-operations) [2019-05-07T20:31:29Z] <mutante> gerrit2001 - temp disabling puppet - testing apache rewrites for T218844 on non-prod host

Change 507079 merged by Andrew Bogott:
[operations/puppet@production] puppetmaster: Stop cloning over /p/

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

Andrew added a subscriber: Andrew.May 8 2019, 5:12 PM

After merging the above patch I corrected the urls in /var/lib/git/operations/puppet/.git/config and /var/lib/git/operations/software/.git/config on all prod and cloud hosts.

Change 507074 merged by Andrew Bogott:
[operations/puppet@production] toolforge: update origin URL for integration/composer.git clones

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

Andrew added a comment.May 8 2019, 7:23 PM

Ran sudo cumin --force --timeout 500 -o json "A:all" "sed -i 's%/r/p/%/r/%' /srv/composer/.git/config" for the composer urls

Change 507069 merged by Andrew Bogott:
[operations/puppet@production] beta: Stop cloning over /p/

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

Change 509143 had a related patch set uploaded (by Ottomata; owner: Ottomata):
[operations/puppet@production] Remove unused profile::analytics::refinery::{job::guard,source}

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

Change 509145 had a related patch set uploaded (by Ottomata; owner: Ottomata):
[operations/puppet@production] Remove unused statistics::aggregator

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

Change 507787 merged by Dzahn:
[operations/puppet@production] Gerrit: Redirect /p/(.+)/info/(.+) to /$1/info/$2

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

rewrite rules have been deployed to prod. we tested cloning still works. This removed a blocker for T200739

Change 509145 merged by Ottomata:
[operations/puppet@production] Remove unused statistics::aggregator

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

Change 509143 merged by Ottomata:
[operations/puppet@production] Remove unused profile::analytics::refinery::{job::guard,source}

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

Change 507075 abandoned by Paladox:
analytics: Stop cloning over /p/

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

Change 507077 abandoned by Paladox:
statistics: Stop cloning over /p/

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