Page MenuHomePhabricator

Redirect Gitblit urls (git.wikimedia.org) -> Diffusion urls (phabricator.wikimedia.org/diffusion)
Closed, ResolvedPublic

Description

Rewrite rules ready to be deployed

1<VirtualHost *:80>
2 ServerName git.wikimedia.org
3 # DocumentRoot ### TODO - add the path
4
5 ##### https://git.wikimedia.org -> https://phabricator.wikimedia.org/diffusion redirects
6 ##### @author [[meta:User:Danny B.]]
7
8
9 ### Directives
10
11 # don't decode "%2F" in URL to "/"
12 AllowEncodedSlashes NoDecode
13
14 # allow URL rewriting
15 RewriteEngine On
16
17
18 ### Static links
19
20 # home page
21 RewriteRule ^/$ https://phabricator.wikimedia.org/diffusion [L,R=301]
22
23 # searches & lists
24 RewriteRule ^/activity/?$ https://phabricator.wikimedia.org/diffusion/query/active/ [L,R=301]
25 RewriteRule ^/lucene/?$ https://phabricator.wikimedia.org/diffusion/query/advanced/ [L,R=301]
26 RewriteRule ^/(projects|repositories)/?$ https://phabricator.wikimedia.org/diffusion/query/all/ [L,R=301]
27
28
29 ### Preformat
30
31 # ?r=<repo/name> -> /<repo/name>
32 RewriteCond %{QUERY_STRING} ^(.*&)?r=([0-9A-Za-z/_\.-]+).git(&.*)?$
33 RewriteRule ^/(blame|blob|commit|commitdiff|docs|history|log|patch|summary|tree)/$ /$1/%2.git [NE]
34
35 # remove "refs%2Fheads%2F" and "refs%2Fremotes%2Forigin%2F"
36 RewriteRule ^(.*)refs\%2[Ff](heads|remotes\%2[Ff]origin)\%2[Ff](.*)$ $1$3
37
38 # <repo%2Fname> -> <repo/name>
39 RewriteRule ^/(blame|blob|commit|commitdiff|docs|history|log|patch|summary|tree)/([0-9A-Za-z/_\.-]+)\%2[Ff](.*)\.git(.*)$ /$1/$2/$3.git$4 [N]
40
41 # <tag%2Fname> -> <tag%25252Fname>
42 RewriteRule ^/(blame|blob|commit|commitdiff|docs|history|log|patch|summary|tree)/([0-9A-Za-z/_\.-]+)\.git/([0-9A-Za-z_\.-]+)\%2[Ff]([^/]+)(.*)$ /$1/$2.git/$3\%25252F$4$5 [N]
43
44 # <path%2Fto%2Ffile> -> <path/to/file>
45 RewriteRule ^/(blame|blob|commit|commitdiff|docs|history|log|patch|summary|tree)/([0-9A-Za-z/_\.-]+)\.git/([^/]+)/([0-9A-Za-z/_\.-]+)\%2[Ff]([^/]*)$ /$1/$2.git/$3/$4/$5 [N]
46
47
48 ### /commit/
49 ### /commitdiff/
50 ### /patch/
51
52 # https://git.wikimedia.org/<commit(diff)?|patch>/<repo%2Fname>.git/<commithash>
53 # -> https://git.wikimedia.org/<commit(diff)?|patch>/<repo/name>.git/<commithash>
54 # ---> https://phabricator.wikimedia.org/r/<(commit|patch)>/<repo/name>;<commithash>
55 RewriteRule ^/(commit|patch)(diff)?/([0-9A-Za-z/_\.-]+)\.git/([0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f])$ https://phabricator.wikimedia.org/r/$1/$3;$4 [NE,L,R=301]
56
57
58 ### /blame/
59 ### /blob/
60 ### /docs/
61 ### /history/
62 ### /log/
63 ### /summary/
64 ### /tree/
65
66 # translate Gitblit actions to Diffusion actions
67 RewriteRule ^/(blame|blob|docs|tree)/(.*)$ /browse/$2 [NE]
68 RewriteRule ^/log/(.*)$ /history/$1 [NE]
69 RewriteRule ^/summary/(.*)$ /$1 [NE]
70
71 # https://git.wikimedia.org/<(blame|blob|history|log|tree)>/<repo%2Fname>.git/<commithash><(/<path%2Fto%2Ffile>)?>
72 # -> https://git.wikimedia.org/<(blame|blob|history|log|tree)>/<repo/name>.git/<commithash><(/<path/to/file>)?>
73 # ---> https://phabricator.wikimedia.org/r/p/<repo/name>;<(browse|history)>/master/<(<path/to/file>)?>;<commithash>
74 RewriteRule ^/(browse|history)/([0-9A-Za-z/_\.-]+)\.git/([0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f])(/([0-9A-Za-z/_\.-]+))?$ https://phabricator.wikimedia.org/r/p/$2;$1/master/$5;$3 [NE,L,R=301]
75
76 # https://git.wikimedia.org/<(blame|blob|history|log|summary|tree)>/<repo%2Fname>.git<(/<tag%2Fname><(/<path%2Fto%2Ffile>)?>)?>
77 # -> https://git.wikimedia.org/<(blame|blob|history|log|summary|tree)/<repo/name>.git<(/<tag%25252Fname><(/<path/to/file>)?>)?>
78 # ---> https://phabricator.wikimedia.org/r/p/<repo/name>;<(browse|history)?><(/<tag%25252Fname><(/<path/to/file>)?>)?>
79 RewriteRule ^/((browse|history)(/))?([0-9A-Za-z/_\.-]+)\.git((/[^/]+)(/([0-9A-Za-z/_\.-]+))?)?$ https://phabricator.wikimedia.org/r/p/$4;$2$6$3$8 [NE,L,R=301]
80
81
82 ### Unmatched above
83
84 # redirect all remaining requests to the Diffusion main page
85 RewriteRule ^.*$ https://phabricator.wikimedia.org/diffusion [L,R=301]
86</VirtualHost>

Examples of origins and desired targets (please don't edit, only assignee):

Static

Dynamic

https://git.wikimedia.org/blame/mediawiki%2Fcore.git/b3492e41f93f54561a4af8d8127b37e59e157a84/includes%2Fspecials%2FSpecialActiveusers.php<unknown> perhaps https://phabricator.wikimedia.org/r/p/mediawiki/core;browse/master/includes/specials/SpecialActiveusers.php;b3492e41f93f54561a4af8d8127b37e59e157a84commit
https://git.wikimedia.org/blame/mediawiki%2Fcore.git/master/includes%2Fspecials%2FSpecialActiveusers.php<unknown> perhaps https://phabricator.wikimedia.org/r/p/mediawiki/core;browse/master/includes/specials/SpecialActiveusers.phpmaster
https://git.wikimedia.org/blame/mediawiki%2Fcore.git/REL1_27/includes%2Fspecials%2FSpecialActiveusers.php<unknown> perhaps https://phabricator.wikimedia.org/r/p/mediawiki/core;browse/REL1_27/includes/specials/SpecialActiveusers.phptag without slash
https://git.wikimedia.org/blame/mediawiki%2Fcore.git/wmf%2F1.28.0-wmf.4/includes%2Fspecials%2FSpecialActiveusers.php<unknown> perhaps https://phabricator.wikimedia.org/r/p/mediawiki/core;browse/wmf%25252F1.28.0-wmf.4/includes/specials/SpecialActiveusers.phptag with slash
https://git.wikimedia.org/blob/mediawiki%2Fcore.git/b3492e41f93f54561a4af8d8127b37e59e157a84/includes%2Fspecials%2FSpecialActiveusers.phphttps://phabricator.wikimedia.org/r/p/mediawiki/core;browse/master/includes/specials/SpecialActiveusers.php;b3492e41f93f54561a4af8d8127b37e59e157a84commit
https://git.wikimedia.org/blob/mediawiki%2Fcore.git/master/includes%2Fspecials%2FSpecialActiveusers.phphttps://phabricator.wikimedia.org/r/p/mediawiki/core;browse/master/includes/specials/SpecialActiveusers.phpmaster
https://git.wikimedia.org/blob/mediawiki%2Fcore.git/REL1_27/includes%2Fspecials%2FSpecialActiveusers.phphttps://phabricator.wikimedia.org/r/p/mediawiki/core;browse/REL1_27/includes/specials/SpecialActiveusers.phptag without slash
https://git.wikimedia.org/blob/mediawiki%2Fcore.git/wmf%2F1.28.0-wmf.4/includes%2Fspecials%2FSpecialActiveusers.phphttps://phabricator.wikimedia.org/r/p/mediawiki/core;browse/wmf%25252F1.28.0-wmf.4/includes/specials/SpecialActiveusers.phptag with slash
https://git.wikimedia.org/commit/mediawiki%2Fcore.git/4d294bceab9669ee7169248e92fe747a3b5fce7chttps://phabricator.wikimedia.org/r/commit/mediawiki/core;4d294bceab9669ee7169248e92fe747a3b5fce7c
https://git.wikimedia.org/commitdiff/mediawiki%2Fcore.git/4d294bceab9669ee7169248e92fe747a3b5fce7chttps://phabricator.wikimedia.org/r/commit/mediawiki/core;4d294bceab9669ee7169248e92fe747a3b5fce7c
https://git.wikimedia.org/compare/mediawiki%2Fcore.git<unknown> https://phabricator.wikimedia.org/r/p/mediawiki/core ???
https://git.wikimedia.org/docs/mediawiki%2Fcore.git<unknown> perhaps https://phabricator.wikimedia.org/r/p/mediawiki/core
https://git.wikimedia.org/docs/mediawiki%2Fcore.git/master<unknown> perhaps https://phabricator.wikimedia.org/r/p/mediawiki/core;browse/master/master
https://git.wikimedia.org/docs/mediawiki%2Fcore.git/REL1_27<unknown> perhaps https://phabricator.wikimedia.org/r/p/mediawiki/core;browse/REL1_27/tag without slash
https://git.wikimedia.org/docs/mediawiki%2Fcore.git/wmf%2F1.28.0-wmf.4<unknown> perhaps https://phabricator.wikimedia.org/r/p/mediawiki/core;browse/wmf%252F1.28.0-wmf.4/tag with slash
https://git.wikimedia.org/history/mediawiki%2Fcore.git/b3492e41f93f54561a4af8d8127b37e59e157a84/includes%2Fspecials%2FSpecialActiveusers.phphttps://phabricator.wikimedia.org/r/p/mediawiki/core;history/master/includes/specials/SpecialActiveusers.php;b3492e41f93f54561a4af8d8127b37e59e157a84commit
https://git.wikimedia.org/history/mediawiki%2Fcore.git/master/includes%2Fspecials%2FSpecialActiveusers.phphttps://phabricator.wikimedia.org/r/p/mediawiki/core;history/master/includes/specials/SpecialActiveusers.phpmaster
https://git.wikimedia.org/history/mediawiki%2Fcore.git/REL1_27/includes%2Fspecials%2FSpecialActiveusers.phphttps://phabricator.wikimedia.org/r/p/mediawiki/core;history/REL1_27/includes/specials/SpecialActiveusers.phptag without slash
https://git.wikimedia.org/history/mediawiki%2Fcore.git/wmf%2F1.28.0-wmf.4/includes%2Fspecials%2FSpecialActiveusers.phphttps://phabricator.wikimedia.org/r/p/mediawiki/core;history/wmf%25252F1.28.0-wmf.4/includes/specials/SpecialActiveusers.phptag with slash
https://git.wikimedia.org/history/mediawiki%2Fcore.git/refs%2Fheads%2Fmaster/includes%2Fspecials%2FSpecialActiveusers.php<unknown> perhaps https://phabricator.wikimedia.org/r/p/mediawiki/core;history/master/includes/specials/SpecialActiveusers.phpmaster
https://git.wikimedia.org/history/mediawiki%2Fcore.git/refs%2Fheads%2FREL1_27/includes%2Fspecials%2FSpecialActiveusers.php<unknown> perhaps https://phabricator.wikimedia.org/r/p/mediawiki/core;history/REL1_27/includes/specials/SpecialActiveusers.phptag without slash
https://git.wikimedia.org/history/mediawiki%2Fcore.git/refs%2Fheads%2Fwmf%2F1.28.0-wmf.4/includes%2Fspecials%2FSpecialActiveusers.php<unknown> perhaps https://phabricator.wikimedia.org/r/p/mediawiki/core;history/wmf%25252F1.28.0-wmf.4/includes/specials/SpecialActiveusers.phptag with slash
https://git.wikimedia.org/log/mediawiki%2Fcore.git/b3492e41f93f54561a4af8d8127b37e59e157a84<unknown> perhaps https://phabricator.wikimedia.org/r/p/mediawiki/core;history/master;b3492e41f93f54561a4af8d8127b37e59e157a84commit
https://git.wikimedia.org/log/mediawiki%2Fcore.git/masterhttps://phabricator.wikimedia.org/r/p/mediawiki/core;history/master/master
https://git.wikimedia.org/log/mediawiki%2Fcore.git/REL1_27https://phabricator.wikimedia.org/r/p/mediawiki/core;history/REL1_27/tag without slash
https://git.wikimedia.org/log/mediawiki%2Fcore.git/wmf%2F1.28.0-wmf.4https://phabricator.wikimedia.org/r/p/mediawiki/core;history/wmf%25252F1.28.0-wmf.4/tag with slash
https://git.wikimedia.org/log/mediawiki%2Fcore.git/refs%2Fheads%2Fmasterhttps://phabricator.wikimedia.org/r/p/mediawiki/core;history/master/master
https://git.wikimedia.org/log/mediawiki%2Fcore.git/refs%2Fheads%2FREL1_27https://phabricator.wikimedia.org/r/p/mediawiki/core;history/REL1_27/tag without slash
https://git.wikimedia.org/log/mediawiki%2Fcore.git/refs%2Fheads%2Fwmf%2F1.28.0-wmf.4https://phabricator.wikimedia.org/r/p/mediawiki/core;history/wmf%25252F1.28.0-wmf.4/tag with slash
https://git.wikimedia.org/patch/mediawiki%2Fcore.git/4d294bceab9669ee7169248e92fe747a3b5fce7chttps://phabricator.wikimedia.org/r/patch/mediawiki/core;4d294bceab9669ee7169248e92fe747a3b5fce7c
https://git.wikimedia.org/project/<unknown>
https://git.wikimedia.org/project/main<unknown>
https://git.wikimedia.org/project/mediawiki<unknown>
https://git.wikimedia.org/raw/mediawiki/core.git/4d294bceab9669ee7169248e92fe747a3b5fce7c/includes!Status.phphttps://phabricator.wikimedia.org/r/p/mediawiki/core;browse/master/includes/Status.php%3B4d294bceab9669ee7169248e92fe747a3b5fce7c?view=raw
https://git.wikimedia.org/summary/mediawiki%2Fcore.githttps://phabricator.wikimedia.org/r/p/mediawiki/core
https://git.wikimedia.org/tag/mediawiki%2Ftools%2Fcodesniffer.git<unknown>found with spider, nonfunctional though
https://git.wikimedia.org/tree/mediawiki%2Fcore.githttps://phabricator.wikimedia.org/r/p/mediawiki/core;browse/
https://git.wikimedia.org/tree/mediawiki%2Fcore.git/471ab05ea26bd1c844237bc752043536d9d2c284https://phabricator.wikimedia.org/r/p/mediawiki/core;browse/master/;471ab05ea26bd1c844237bc752043536d9d2c284commit
https://git.wikimedia.org/tree/mediawiki%2Fcore.git/masterhttps://phabricator.wikimedia.org/r/p/mediawiki/core;browse/master/master
https://git.wikimedia.org/tree/mediawiki%2Fcore.git/REL1_27https://phabricator.wikimedia.org/r/p/mediawiki/core;browse/REL1_27/tag without slash
https://git.wikimedia.org/tree/mediawiki%2Fcore.git/wmf%2F1.28.0-wmf.4https://phabricator.wikimedia.org/r/p/mediawiki/core;browse/wmf%25252F1.28.0-wmf.4/tag with slash
https://git.wikimedia.org/tree/mediawiki%2Fcore.git/refs%2Fheads%2Fmasterhttps://phabricator.wikimedia.org/r/p/mediawiki/core;browse/master/master

Querystring based

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
mmodell added a comment.EditedJun 17 2016, 5:43 PM

lol?

greg added a comment.Jun 17 2016, 6:07 PM

Yeah, we should announce before it happens.

@greg do you know who would send the email out?

greg added a comment.Jun 17 2016, 10:11 PM

One of me, Mukunda, or Chad, probably.

Ok Thanks for replying.

Paladox updated the task description. (Show Details)Jun 19 2016, 12:27 AM

@greg Hi, I spoke with @Dzahn about this as he will be in the same timezone as me I think he said we can most likely do this on wedsday but I'm not 100% sure but you can send the email out without say the actual date since I'm not sure if we will do it on Wednesday but we can say in the next 2-3 days git.wikimedia.org will be redirected. Then send a follow up email saying that git.wikimedia.org has now been redirected.

please.

Paladox updated the task description. (Show Details)Jun 20 2016, 5:38 PM
Paladox updated the task description. (Show Details)Jun 20 2016, 5:43 PM
Paladox reassigned this task from Danny_B to Dzahn.Jun 20 2016, 5:46 PM
Paladox moved this task from INBOX to In-progress on the Release-Engineering-Team board.

Re assigned the dns bit to @Dzahn

@Danny_B did the apache re write rules.

Danny_B renamed this task from write Apache rewrite rules for gitblit -> diffusion migration to Migrate Gitblit (git.wikimedia.org) -> Diffusion (phabricator.wikimedia.org/diffusion).Jun 20 2016, 5:51 PM
Paladox updated the task description. (Show Details)Jun 20 2016, 5:56 PM
greg added a comment.Jun 20 2016, 5:58 PM

Please coordinate with releng first.

@greg oh, how, what do we say.

greg added a comment.Jun 20 2016, 6:20 PM

I'll write it this afternoon Pacific time.

greg added a comment.Jun 20 2016, 7:41 PM

Just to be clear, an email with one day notice is not enough :) we'll give a week's notice.

greg renamed this task from Migrate Gitblit (git.wikimedia.org) -> Diffusion (phabricator.wikimedia.org/diffusion) to Redirect Gitblit urls (git.wikimedia.org) -> Diffusion urls (phabricator.wikimedia.org/diffusion).Jun 20 2016, 9:22 PM
greg updated the task description. (Show Details)Jun 20 2016, 9:24 PM
greg added a comment.Jun 20 2016, 9:33 PM

(I hope I cleared up the task ordering confusion with the title/description edits.)

greg added a comment.Jun 20 2016, 10:18 PM

@Dzahn Can you commit to a window next week to do this (merge all the needed puppet changes to redirect git.wikimedia.org urls to Phabricator)? This should happen at a pre-determined time. One of us (RelEng) will be around if needed of course.

Proposed date/time: Wednesday June 29th at 9am Pacific (after morning SWAT). Good? (I think you'll be back from Wikimania and working normal-ish hours then...)

Thanks!

greg awarded a token.Jun 20 2016, 11:14 PM
Dzahn added a comment.Jun 21 2016, 3:02 AM

@greg i was just going to do it during Wikimania.. Honestly it seems almost overkill to me what we are doing on this task, given the historic stableness of gitblit that this actually improves. of course up to you though. if you want to wait then June 29th it is

greg added a comment.Jun 21 2016, 6:27 AM

Thanks @Dzahn. Just trying to set a good example :)

Paladox added a comment.EditedJun 21 2016, 6:27 AM

@Dzahn we can create the patch's then merge them on a date that the releng team decides on which they like the date 29 june 2016.

Paladox added a comment.EditedJun 21 2016, 6:41 AM

@greg I think we can do it on the date you like which is the 29 june 2016, you can now add the date to the mock email please. :)

greg added a comment.Jun 21 2016, 6:46 AM

@greg I think we can do it on the date you like which is the 29 june 2016, you can now add the date to the mock email please. :)

Of course, that was the obvious next thing based on Daniel's response. No need to repeat :)

greg added a comment.Jun 21 2016, 6:51 AM

Scheduled: https://wikitech.wikimedia.org/wiki/Deployments#deploycal-item-20160629T1600

I'll send the email tomorrow morning, it's almost midnight here.

@greg thanks and sorry.

greg added a comment.Jun 21 2016, 9:16 PM

email sent. The countdown begins :)

Change 294867 merged by Dzahn:
Rewrite rules for git.wikimedia.org

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

Change 293747 abandoned by Dzahn:
switch git.wikimedia.org from misc to text cluster

Reason:
we are putting the rules on the phabricator host instead

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

Dzahn removed Dzahn as the assignee of this task.Jun 26 2016, 12:21 PM

I merged the change that puts the rewrite rules on iridium (WITHOUT also switching varnish over, which was of course still waiting until the 29th). But they did NOT work. Actually they broke all the old Bugzilla redirects, everything got redirected to diffusion home page. The logging part in it adds an access log called "git.wikimedia.org" but has bugzilla.wm.org hits in it. Apparently this was not tested on something that is actually setup like the Phabricator instance. We need a real test on labs on one of the phab-0x instances where Apache is really like in production. I had to revert the production change.

Change 296138 had a related patch set uploaded (by Paladox):
Rewrite rules for git.wikimedia.org

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

The announced date should be put on hold until we had a real test in labs.

I merged the change that puts the rewrite rules on iridium (WITHOUT also switching varnish over, which was of course still waiting until the 29th). But they did NOT work. Actually they broke all the old Bugzilla redirects, everything got redirected to diffusion home page. The logging part in it adds an access log called "git.wikimedia.org" but has bugzilla.wm.org hits in it. Apparently this was not tested on something that is actually setup like the Phabricator instance. We need a real test on labs on one of the phab-0x instances where Apache is really like in production. I had to revert the production change.

The Gitblit -> Diffusion rules themselves did not break anything IMHO. They have been thoroughly tested and work perfectly. The issue will be somewhere else.

Idea: If the Bugzilla redirects handler (most likely not just rules, since something needs to add 2000 to the task number) are on the same machine, they may collide due incorrect settings / spearation of Bugzilla and Gitblit redirectings (ie. Bugzilla requests are now handled by the newly added file with rules instead ofthe original one). Just guessing the cause, but definitely not rules themselves standalone.

If I knew where the old Bugzilla -> Phabricator redirector handler is located, I could take a look on it...

Feel free to assign me again, should you need some more rewrite rules...

I guess the cause may be the asterisk in <VirtualHost> - https://httpd.apache.org/docs/current/vhosts/examples.html because then depends on order and if everything is on the same machine...

Dzahn added a comment.Jun 28 2016, 6:37 PM

Yes, the problem appears when these rules are added to the existing Apache config in production, as you say they conflict with other rules for Bugzilla that are already on it. That is why things need to be tested on something that is actually like production and a test on a laptop is not sufficient. phab-01 or one of the other phab-0x instances should be used. And these should use the same roles that are used in production. Maybe they use a separate "labs" role though which is not ideal because it means we never have something that is really 100% like in prod.

Yes, the problem appears when these rules are added to the existing Apache config in production, as you say they conflict with other rules for Bugzilla that are already on it. That is why things need to be tested on something that is actually like production and a test on a laptop is not sufficient. phab-01 or one of the other phab-0x instances should be used. And these should use the same roles that are used in production. Maybe they use a separate "labs" role though which is not ideal because it means we never have something that is really 100% like in prod.

I'm probably missing something...
If there is <virtualhost> for Bugzilla redirs using the ServerName directive to match bugzilla.wikimedia.org and bugs.wikimedia.org and we add the <virtualhost> with ServerName git.wikimedia.org and its redirects to Diffusion after it, it should work properly.
Another thing is, I can't really imagine, how Bugzilla->Phabricator rules can interact with Gitblit->Phabricator as a) they come from different domain, b) have different patterns, c) redirect to different places.
Can anybody please point me to what I missed? Thanks.

Those server aliases where missing, I amended the patch to add them.

Change 293221 abandoned by Dzahn:
git.wikimedia.org -> Diffusion redirects

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

Change 296138 merged by Dzahn:
Rewrite rules for git.wikimedia.org

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

Dzahn added a comment.Jun 29 2016, 5:49 PM

URLs tested: P3315

tested with apache-fast-test from tin on iridium

redirects before merging 296138: P3317

redirects after merging 296138: P3318

Dzahn added a comment.EditedJun 29 2016, 5:56 PM

@Danny_B It was because the Bugzilla redirects are in templates/redirect_config.json.erb directly in Phabricator while the git.wm and phabricator.wm URLs are setup as Apache virtual hosts using apache::site. /etc/apache2/sites-available/ only has git.wm and phab.wm but not bugzilla.wm

now:

[iridium:/etc/apache2/sites-enabled] $ apache2ctl -S | grep alias

alias phab.wmfusercontent.org
alias bugzilla.wikimedia.org
alias bugs.wikimedia.org

Thanks to @JanZerebecki for the fix!

Change 293789 merged by Dzahn:
varnish: git.wm.org to iridium, remove related config/tests/monitoring

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

Mentioned in SAL [2016-06-29T18:06:09Z] <mutante> we stopped using gitblit. git.wikimedia.org URLs P3318 T137224

Dzahn closed this task as Resolved.Jun 29 2016, 6:15 PM
Dzahn claimed this task.
greg added a comment.Jun 29 2016, 6:28 PM

\o/ Thanks all for the work here. Lovely working with you all :)

Dzahn updated the task description. (Show Details)Jun 29 2016, 8:05 PM
Dzahn removed a project: Patch-For-Review.
Danny_B moved this task from In Progress to Done on the Gitblit-Deprecate board.Jun 29 2016, 8:55 PM

Not sure if this has been notified by Developer-Advocacy / Community-Relations-Support teams or whoever is responsible for Developer-notice / Notice
Same with T123718: Phase out antimony.wikimedia.org (git.wikimedia.org / gitblit)
@Quiddity Could you please check (and possibly assure about the notice)? Thanks!

Qgil awarded a token.
Johan added a subscriber: Johan.Jun 30 2016, 12:53 PM

It has (though referring to the email rather than the Phab ticket).