[MediaWiki-commits] [Gerrit] Zero: Remove per-carrier analytics variance - change (operations/puppet)

2014-12-18 Thread Yurik (Code Review)
Yurik has uploaded a new change for review.

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

Change subject: Zero: Remove per-carrier analytics variance
..

Zero: Remove per-carrier analytics variance

Change-Id: Id5be45a7bd56453ad85cade9b5719e3cdc16b967
---
M templates/varnish/zero.inc.vcl.erb
1 file changed, 1 insertion(+), 141 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/50/180850/1

diff --git a/templates/varnish/zero.inc.vcl.erb 
b/templates/varnish/zero.inc.vcl.erb
index 9f93bf7..9d949d9 100644
--- a/templates/varnish/zero.inc.vcl.erb
+++ b/templates/varnish/zero.inc.vcl.erb
@@ -119,147 +119,7 @@
 // Some of the headers used for X-Analytics are not varied on, so add them 
after the backend processing.
 // Note that vcl_deliver in other files may also modify X-Analytics
 if (req.http.X-CS == ON) {
-// This is where all conditionals from above will be moved to support 
analytics
-// until they finish their migration
-// According to qchris, analytics can handle language and subdomain, 
but not proxy or https
-unset req.http.X-CS;
-
-if (req.http.X-CS2 == 413-02) {
-if (!req.http.X-Forwarded-Proto  !req.http.X-Forwarded-By) {
-if (req.http.host ~ ^((en|si|simple|ta)\.)?zero\.) {
-set req.http.X-CS = req.http.X-CS2;
-}
-}
-// } else if (req.http.X-CS2 == 470-03) {
-// if (!req.http.X-Forwarded-Proto  !req.http.X-Forwarded-By) {
-// if (req.http.host ~ ^((en|bn)\.)?(zero|m)\.) {
-// set req.http.X-CS = req.http.X-CS2;
-// }
-// }
-// } else if (req.http.X-CS2 == 624-02) {
-// if (!req.http.X-Forwarded-Proto  !req.http.X-Forwarded-By) {
-// if (req.http.host ~ 
^((fr|ha|ln|yo|eo|ar|zh|en|es|de)\.)?m\.) {
-// set req.http.X-CS = req.http.X-CS2;
-// }
-// }
-// } else if (req.http.X-CS2 == 605-01) {
-// if (!req.http.X-Forwarded-Proto  !req.http.X-Forwarded-By) {
-// if (req.http.host ~ 
^((fr|ru|ja|zh|it|de|en|es|ar)\.)?m\.) {
-// set req.http.X-CS = req.http.X-CS2;
-// }
-// }
-} else if (req.http.X-CS2 == 641-14) {
-if (!req.http.X-Forwarded-Proto  !req.http.X-Forwarded-By) {
-if (req.http.host ~ 
^((en|zh|ar|hi|fr|sw|rw|de|es|ko)\.)?m\.) {
-set req.http.X-CS = req.http.X-CS2;
-}
-}
-} else if (req.http.X-CS2 == 420-01) {
-if (!req.http.X-Forwarded-Proto  !req.http.X-Forwarded-By) {
-if (req.http.host ~ ^((ar|tl|en|bn|ur)\.)?(zero|m)\.) {
-set req.http.X-CS = req.http.X-CS2;
-}
-}
-// } else if (req.http.X-CS2 == 410-01) {
-// if ((!req.http.X-Forwarded-Proto  !req.http.X-Forwarded-By) 
|| req.http.X-Forwarded-By == Opera) {
-// if (req.http.host ~ ^((en|ur)\.)?(zero|m)\.) {
-// set req.http.X-CS = req.http.X-CS2;
-// }
-// }
-} else if (req.http.X-CS2 == 510-11) {
-if (!req.http.X-Forwarded-Proto  !req.http.X-Forwarded-By) {
-if (req.http.host ~ ^((id|en|zh|ar|hi|ms|jv|su)\.)?zero\.) {
-set req.http.X-CS = req.http.X-CS2;
-}
-}
-} else if (req.http.X-CS2 == 646-02) {
-if (!req.http.X-Forwarded-By) {
-if (req.http.X-Subdomain == M) {
-set req.http.X-CS = req.http.X-CS2;
-}
-}
-} else if (req.http.X-CS2 ~ ^(456-02|502-13)$) {
-if (!req.http.X-Forwarded-Proto  !req.http.X-Forwarded-By) {
-if (req.http.X-Subdomain == ZERO) {
-// ZERO only, direct HTTP only
-set req.http.X-CS = req.http.X-CS2;
-}
-}
-} else if (req.http.X-CS2 ~ ^(614-04|630-86|639-07)$) {
-if (!req.http.X-Forwarded-Proto  !req.http.X-Forwarded-By) {
-if (req.http.X-Subdomain == M) {
-// M only, direct HTTP only
-set req.http.X-CS = req.http.X-CS2;
-}
-}
-} else if (req.http.X-CS2 ~ ^(612-03|652-02)$) {
-if ((!req.http.X-Forwarded-Proto  !req.http.X-Forwarded-By) || 
req.http.X-Forwarded-By == Opera) {
-if (req.http.X-Subdomain == M) {
-// M only, direct HTTP or Opera
-set req.http.X-CS = req.http.X-CS2;
-}
-}
-} else if (req.http.X-CS2 ~ ^(520-18)$) {
-if ((!req.http.X-Forwarded-Proto  !req.http.X-Forwarded-By) || 

[MediaWiki-commits] [Gerrit] Zero: Remove per-carrier analytics variance - change (operations/puppet)

2014-12-18 Thread BBlack (Code Review)
BBlack has submitted this change and it was merged.

Change subject: Zero: Remove per-carrier analytics variance
..


Zero: Remove per-carrier analytics variance

Change-Id: Id5be45a7bd56453ad85cade9b5719e3cdc16b967
---
M templates/varnish/zero.inc.vcl.erb
1 file changed, 1 insertion(+), 141 deletions(-)

Approvals:
  BBlack: Verified; Looks good to me, approved



diff --git a/templates/varnish/zero.inc.vcl.erb 
b/templates/varnish/zero.inc.vcl.erb
index 9f93bf7..9d949d9 100644
--- a/templates/varnish/zero.inc.vcl.erb
+++ b/templates/varnish/zero.inc.vcl.erb
@@ -119,147 +119,7 @@
 // Some of the headers used for X-Analytics are not varied on, so add them 
after the backend processing.
 // Note that vcl_deliver in other files may also modify X-Analytics
 if (req.http.X-CS == ON) {
-// This is where all conditionals from above will be moved to support 
analytics
-// until they finish their migration
-// According to qchris, analytics can handle language and subdomain, 
but not proxy or https
-unset req.http.X-CS;
-
-if (req.http.X-CS2 == 413-02) {
-if (!req.http.X-Forwarded-Proto  !req.http.X-Forwarded-By) {
-if (req.http.host ~ ^((en|si|simple|ta)\.)?zero\.) {
-set req.http.X-CS = req.http.X-CS2;
-}
-}
-// } else if (req.http.X-CS2 == 470-03) {
-// if (!req.http.X-Forwarded-Proto  !req.http.X-Forwarded-By) {
-// if (req.http.host ~ ^((en|bn)\.)?(zero|m)\.) {
-// set req.http.X-CS = req.http.X-CS2;
-// }
-// }
-// } else if (req.http.X-CS2 == 624-02) {
-// if (!req.http.X-Forwarded-Proto  !req.http.X-Forwarded-By) {
-// if (req.http.host ~ 
^((fr|ha|ln|yo|eo|ar|zh|en|es|de)\.)?m\.) {
-// set req.http.X-CS = req.http.X-CS2;
-// }
-// }
-// } else if (req.http.X-CS2 == 605-01) {
-// if (!req.http.X-Forwarded-Proto  !req.http.X-Forwarded-By) {
-// if (req.http.host ~ 
^((fr|ru|ja|zh|it|de|en|es|ar)\.)?m\.) {
-// set req.http.X-CS = req.http.X-CS2;
-// }
-// }
-} else if (req.http.X-CS2 == 641-14) {
-if (!req.http.X-Forwarded-Proto  !req.http.X-Forwarded-By) {
-if (req.http.host ~ 
^((en|zh|ar|hi|fr|sw|rw|de|es|ko)\.)?m\.) {
-set req.http.X-CS = req.http.X-CS2;
-}
-}
-} else if (req.http.X-CS2 == 420-01) {
-if (!req.http.X-Forwarded-Proto  !req.http.X-Forwarded-By) {
-if (req.http.host ~ ^((ar|tl|en|bn|ur)\.)?(zero|m)\.) {
-set req.http.X-CS = req.http.X-CS2;
-}
-}
-// } else if (req.http.X-CS2 == 410-01) {
-// if ((!req.http.X-Forwarded-Proto  !req.http.X-Forwarded-By) 
|| req.http.X-Forwarded-By == Opera) {
-// if (req.http.host ~ ^((en|ur)\.)?(zero|m)\.) {
-// set req.http.X-CS = req.http.X-CS2;
-// }
-// }
-} else if (req.http.X-CS2 == 510-11) {
-if (!req.http.X-Forwarded-Proto  !req.http.X-Forwarded-By) {
-if (req.http.host ~ ^((id|en|zh|ar|hi|ms|jv|su)\.)?zero\.) {
-set req.http.X-CS = req.http.X-CS2;
-}
-}
-} else if (req.http.X-CS2 == 646-02) {
-if (!req.http.X-Forwarded-By) {
-if (req.http.X-Subdomain == M) {
-set req.http.X-CS = req.http.X-CS2;
-}
-}
-} else if (req.http.X-CS2 ~ ^(456-02|502-13)$) {
-if (!req.http.X-Forwarded-Proto  !req.http.X-Forwarded-By) {
-if (req.http.X-Subdomain == ZERO) {
-// ZERO only, direct HTTP only
-set req.http.X-CS = req.http.X-CS2;
-}
-}
-} else if (req.http.X-CS2 ~ ^(614-04|630-86|639-07)$) {
-if (!req.http.X-Forwarded-Proto  !req.http.X-Forwarded-By) {
-if (req.http.X-Subdomain == M) {
-// M only, direct HTTP only
-set req.http.X-CS = req.http.X-CS2;
-}
-}
-} else if (req.http.X-CS2 ~ ^(612-03|652-02)$) {
-if ((!req.http.X-Forwarded-Proto  !req.http.X-Forwarded-By) || 
req.http.X-Forwarded-By == Opera) {
-if (req.http.X-Subdomain == M) {
-// M only, direct HTTP or Opera
-set req.http.X-CS = req.http.X-CS2;
-}
-}
-} else if (req.http.X-CS2 ~ ^(520-18)$) {
-if ((!req.http.X-Forwarded-Proto  !req.http.X-Forwarded-By) || 
req.http.X-Forwarded-By == Opera) {
-if