[MediaWiki-commits] [Gerrit] operations/puppet[production]: Gerrit: Allow enabling of tls/ssl (keep default of none for ...

2018-01-24 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/406145 )

Change subject: Gerrit: Allow enabling of tls/ssl (keep default of none for now)
..

Gerrit: Allow enabling of tls/ssl (keep default of none for now)

Change-Id: Ib105feca46c7e9602dd595228fb3518e481d7e3b
---
M modules/gerrit/manifests/jetty.pp
M modules/gerrit/templates/gerrit.config.erb
2 files changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/45/406145/1

diff --git a/modules/gerrit/manifests/jetty.pp 
b/modules/gerrit/manifests/jetty.pp
index dc35759..8842aab 100644
--- a/modules/gerrit/manifests/jetty.pp
+++ b/modules/gerrit/manifests/jetty.pp
@@ -18,6 +18,7 @@
 $log_port = '4560',
 $config = 'gerrit.config.erb',
 $git_open_files = 2,
+$smtp_encryption = 'none',
 ) {
 
 group { 'gerrit2':
diff --git a/modules/gerrit/templates/gerrit.config.erb 
b/modules/gerrit/templates/gerrit.config.erb
index d7ab5c6..31ae707 100644
--- a/modules/gerrit/templates/gerrit.config.erb
+++ b/modules/gerrit/templates/gerrit.config.erb
@@ -173,6 +173,7 @@
 includeDiff = true
 connectTimeout = 1 min
 smtpServer = <%= @mail_smarthost[0] %>
+smtpEncryption = <%= @smtp_encryption %>
 [sshd]
 <%- if @slave %>
 listenAddress = off

-- 
To view, visit https://gerrit.wikimedia.org/r/406145
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib105feca46c7e9602dd595228fb3518e481d7e3b
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Gerrit: Remove hardcoding of the smtp port

2018-01-24 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/406144 )

Change subject: Gerrit: Remove hardcoding of the smtp port
..

Gerrit: Remove hardcoding of the smtp port

Gerrit uses sane defaults: 25 if not encrypted, or 465 if
smtpEncryption is 'ssl' or 'tls'

Change-Id: Iee2b6ee5c05be382b420c13e659ac796c0f7e6bf
---
M modules/gerrit/templates/gerrit.config.erb
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/44/406144/1

diff --git a/modules/gerrit/templates/gerrit.config.erb 
b/modules/gerrit/templates/gerrit.config.erb
index ac4b8dc..d7ab5c6 100644
--- a/modules/gerrit/templates/gerrit.config.erb
+++ b/modules/gerrit/templates/gerrit.config.erb
@@ -171,7 +171,6 @@
 ownerGroup = ldap/ops
 [sendemail]
 includeDiff = true
-smtpServerPort = 25
 connectTimeout = 1 min
 smtpServer = <%= @mail_smarthost[0] %>
 [sshd]

-- 
To view, visit https://gerrit.wikimedia.org/r/406144
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iee2b6ee5c05be382b420c13e659ac796c0f7e6bf
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Gerrit: Add ldap.connectTimeout

2018-01-24 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/406143 )

Change subject: Gerrit: Add ldap.connectTimeout
..

Gerrit: Add ldap.connectTimeout

No timeout is kinda insane.

Change-Id: Ieb18d392155068756a707fb057377f4886f127c3
---
M modules/gerrit/templates/gerrit.config.erb
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/43/406143/1

diff --git a/modules/gerrit/templates/gerrit.config.erb 
b/modules/gerrit/templates/gerrit.config.erb
index ac4b8dc..012e7e6 100644
--- a/modules/gerrit/templates/gerrit.config.erb
+++ b/modules/gerrit/templates/gerrit.config.erb
@@ -129,6 +129,7 @@
 groupScope = one
 # Fixes T152640
 localUsernameToLowerCase = true
+connectTimeout = 5 s
 [lfs]
 plugin = lfs
 [mimetype "application/javascript"]

-- 
To view, visit https://gerrit.wikimedia.org/r/406143
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieb18d392155068756a707fb057377f4886f127c3
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Gerrit: Set groups.newGroupsVisibleToAll = true

2018-01-24 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/406140 )

Change subject: Gerrit: Set groups.newGroupsVisibleToAll = true
..

Gerrit: Set groups.newGroupsVisibleToAll = true

Why shouldn't they be? Can always override if needed

Change-Id: I730508125a8ad690fb0153d758fa65caa83cd74e
---
M modules/gerrit/templates/gerrit.config.erb
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/40/406140/1

diff --git a/modules/gerrit/templates/gerrit.config.erb 
b/modules/gerrit/templates/gerrit.config.erb
index ac4b8dc..648c1fd 100644
--- a/modules/gerrit/templates/gerrit.config.erb
+++ b/modules/gerrit/templates/gerrit.config.erb
@@ -99,6 +99,8 @@
 roottree = "/r/p/${project}/;browse/HEAD/;${commit}"
 linkname = diffusion
 urlEncode = false
+[groups]
+newGroupsVisibleToAll = true
 [httpd]
 listenUrl = proxy-https://127.0.0.1:8080/r/
 maxQueued = 500

-- 
To view, visit https://gerrit.wikimedia.org/r/406140
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I730508125a8ad690fb0153d758fa65caa83cd74e
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Gerrit: Set gc.aggressive = true

2018-01-24 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/406139 )

Change subject: Gerrit: Set gc.aggressive = true
..

Gerrit: Set gc.aggressive = true

We're not re-enabling auto-gc just yet, but I want to so let's at
least have the overall config section ready

Change-Id: I51e0d04d9fd7d434f9c23fc105f273b9836ae74c
---
M modules/gerrit/templates/gerrit.config.erb
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/39/406139/1

diff --git a/modules/gerrit/templates/gerrit.config.erb 
b/modules/gerrit/templates/gerrit.config.erb
index ac4b8dc..7087642 100644
--- a/modules/gerrit/templates/gerrit.config.erb
+++ b/modules/gerrit/templates/gerrit.config.erb
@@ -82,6 +82,8 @@
 database = <%= @db_name %>
 username = <%= @db_user %>
 url = jdbc:mysql://<%= @db_host %>/<%= @db_name 
%>?characterSetResults=utf8=utf8=utf8_unicode_ci
+[gc]
+aggressive = true
 [gerrit]
 basePath = <%= @git_dir %>
 canonicalWebUrl = <%= @url %>

-- 
To view, visit https://gerrit.wikimedia.org/r/406139
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I51e0d04d9fd7d434f9c23fc105f273b9836ae74c
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Gerrit: Set changeCleanup.startTime

2018-01-24 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/406138 )

Change subject: Gerrit: Set changeCleanup.startTime
..

Gerrit: Set changeCleanup.startTime

We don't have changeCleanup.abandonChanges set to true, so this
doesn't *do* anything other than silence a stupid warning on startup

Change-Id: I651f002807e18da4c769a1a99fcc7495190b6bba
---
M modules/gerrit/templates/gerrit.config.erb
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/38/406138/1

diff --git a/modules/gerrit/templates/gerrit.config.erb 
b/modules/gerrit/templates/gerrit.config.erb
index ac4b8dc..3981042 100644
--- a/modules/gerrit/templates/gerrit.config.erb
+++ b/modules/gerrit/templates/gerrit.config.erb
@@ -24,6 +24,7 @@
 [changeCleanup]
 # Not actually used, but Gerrit complains if unset
 interval = 1 week
+startTime = Sat 02:59
 [changeMerge]
 test = true
 checkFrequency = 0

-- 
To view, visit https://gerrit.wikimedia.org/r/406138
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I651f002807e18da4c769a1a99fcc7495190b6bba
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Gerrit: Shut up completely useless WARN-level spam from Even...

2018-01-24 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/406137 )

Change subject: Gerrit: Shut up completely useless WARN-level spam from 
EventUtil
..

Gerrit: Shut up completely useless WARN-level spam from EventUtil

Change-Id: Ie617bd013c5834de5f8a24da05b3959b18ac3ed6
---
M modules/gerrit/templates/log4j.xml.erb
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/37/406137/1

diff --git a/modules/gerrit/templates/log4j.xml.erb 
b/modules/gerrit/templates/log4j.xml.erb
index 7e3b32f..e2083eb 100644
--- a/modules/gerrit/templates/log4j.xml.erb
+++ b/modules/gerrit/templates/log4j.xml.erb
@@ -159,6 +159,10 @@
 
 
 
+
+
+  
+
 
 
 

-- 
To view, visit https://gerrit.wikimedia.org/r/406137
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie617bd013c5834de5f8a24da05b3959b18ac3ed6
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Gerrit: Remove arbitrary SSH thread settings

2018-01-24 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/406052 )

Change subject: Gerrit: Remove arbitrary SSH thread settings
..

Gerrit: Remove arbitrary SSH thread settings

They're from a long long time ago and system defaults make more sense.

sshd.batchThreads defaults to 2 on multi-core systems...so why bother?
sshd.threads defaults to 2x cores. Well there's 4 physical cores, plus
HT so 8...that should be 16!!

Bug: T182756
Change-Id: I04a59c8bf94b9ed221bdc7cebe50cc14133070c4
---
M modules/gerrit/templates/gerrit.config.erb
1 file changed, 0 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/52/406052/1

diff --git a/modules/gerrit/templates/gerrit.config.erb 
b/modules/gerrit/templates/gerrit.config.erb
index 13fec20..ac4b8dc 100644
--- a/modules/gerrit/templates/gerrit.config.erb
+++ b/modules/gerrit/templates/gerrit.config.erb
@@ -183,8 +183,6 @@
 listenAddress = [<%= @ipv6 %>]:29418
 <%- end -%>
 <%- end -%>
-threads = 8
-batchThreads = 2
 idleTimeout = 864000
 mac = -hmac-md5
 mac = -hmac-md5-96

-- 
To view, visit https://gerrit.wikimedia.org/r/406052
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I04a59c8bf94b9ed221bdc7cebe50cc14133070c4
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...WikimediaMessages[master]: Default to HTTPS on basically all links

2018-01-19 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405379 )

Change subject: Default to HTTPS on basically all links
..

Default to HTTPS on basically all links

WMF supports them, as does CC. No need for protocol-relative messiness

Change-Id: I0a68029bade6bc047eed85e7cb7f6b259c248b96
---
M i18n/cclicensetexts/en.json
M i18n/wikimedia/en.json
M i18n/wikimediaoverrides/en.json
3 files changed, 203 insertions(+), 203 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaMessages 
refs/changes/79/405379/1

diff --git a/i18n/cclicensetexts/en.json b/i18n/cclicensetexts/en.json
index 895a7f8..03f4ccd 100644
--- a/i18n/cclicensetexts/en.json
+++ b/i18n/cclicensetexts/en.json
@@ -4,202 +4,202 @@
},
"wm-license-cc-wiki-link": "w:en:Creative Commons",
"wm-license-cc-attribution": "Attribution",
-   "wm-license-cc-by-1.0-text": "This file is licensed under the 
[[{{int:wm-license-cc-wiki-link}}|Creative Commons]] 
[//creativecommons.org/licenses/by/1.0/deed.en Attribution 1.0 Generic] 
license.",
-   "wm-license-cc-by-1.0-fi-text": "This file is licensed under the 
[[{{int:wm-license-cc-wiki-link}}|Creative Commons]] 
[//creativecommons.org/licenses/by/1.0/fi/deed.en Attribution 1.0 Finland] 
license.",
-   "wm-license-cc-by-1.0-il-text": "This file is licensed under the 
[[{{int:wm-license-cc-wiki-link}}|Creative Commons]] 
[//creativecommons.org/licenses/by/1.0/il/deed.en Attribution 1.0 Israel] 
license.",
-   "wm-license-cc-by-1.0-nl-text": "This file is licensed under the 
[[{{int:wm-license-cc-wiki-link}}|Creative Commons]] 
[//creativecommons.org/licenses/by/1.0/nl/deed.en Attribution 1.0 Netherlands] 
license.",
-   "wm-license-cc-by-2.0-text": "This file is licensed under the 
[[{{int:wm-license-cc-wiki-link}}|Creative Commons]] 
[//creativecommons.org/licenses/by/2.0/deed.en Attribution 2.0 Generic] 
license.",
-   "wm-license-cc-by-2.0-at-text": "This file is licensed under the 
[[{{int:wm-license-cc-wiki-link}}|Creative Commons]] 
[//creativecommons.org/licenses/by/2.0/at/deed.en Attribution 2.0 Austria] 
license.",
-   "wm-license-cc-by-2.0-au-text": "This file is licensed under the 
[[{{int:wm-license-cc-wiki-link}}|Creative Commons]] 
[//creativecommons.org/licenses/by/2.0/au/deed.en Attribution 2.0 Australia] 
license.",
-   "wm-license-cc-by-2.0-be-text": "This file is licensed under the 
[[{{int:wm-license-cc-wiki-link}}|Creative Commons]] 
[//creativecommons.org/licenses/by/2.0/be/deed.en Attribution 2.0 Belgium] 
license.",
-   "wm-license-cc-by-2.0-br-text": "This file is licensed under the 
[[{{int:wm-license-cc-wiki-link}}|Creative Commons]] 
[//creativecommons.org/licenses/by/2.0/br/deed.en Attribution 2.0 Brazil] 
license.",
-   "wm-license-cc-by-2.0-ca-text": "This file is licensed under the 
[[{{int:wm-license-cc-wiki-link}}|Creative Commons]] 
[//creativecommons.org/licenses/by/2.0/ca/deed.en Attribution 2.0 Canada] 
license.",
-   "wm-license-cc-by-2.0-cl-text": "This file is licensed under the 
[[{{int:wm-license-cc-wiki-link}}|Creative Commons]] 
[//creativecommons.org/licenses/by/2.0/cl/deed.en Attribution 2.0 Chile] 
license.",
-   "wm-license-cc-by-2.0-de-text": "This file is licensed under the 
[[{{int:wm-license-cc-wiki-link}}|Creative Commons]] 
[//creativecommons.org/licenses/by/2.0/de/deed.en Attribution 2.0 Germany] 
license.",
-   "wm-license-cc-by-2.0-es-text": "This file is licensed under the 
[[{{int:wm-license-cc-wiki-link}}|Creative Commons]] 
[//creativecommons.org/licenses/by/2.0/es/deed.en Attribution 2.0 Spain] 
license.",
-   "wm-license-cc-by-2.0-fr-text": "This file is licensed under the 
[[{{int:wm-license-cc-wiki-link}}|Creative Commons]] 
[//creativecommons.org/licenses/by/2.0/fr/deed.en Attribution 2.0 France] 
license.",
-   "wm-license-cc-by-2.0-hr-text": "This file is licensed under the 
[[{{int:wm-license-cc-wiki-link}}|Creative Commons]] 
[//creativecommons.org/licenses/by/2.0/hr/deed.en Attribution 2.0 Croatia] 
license.",
-   "wm-license-cc-by-2.0-it-text": "This file is licensed under the 
[[{{int:wm-license-cc-wiki-link}}|Creative Commons]] 
[//creativecommons.org/licenses/by/2.0/it/deed.en Attribution 2.0 Italy] 
license.",
-   "wm-license-cc-by-2.0-jp-text": "This file is licensed under the 
[[{{int:wm-license-cc-wiki-link}}|Creative Commons]] 
[//creativecommons.org/licenses/by/2.0/jp/deed.en Attribution 2.0 Japan] 
license.",
-   "wm-license-cc-by-2.0-kr-text": "This file is licensed under the 
[[{{int:wm-license-cc-wiki-link}}|Creative Commons]] 
[//creativecommons.org/licenses/by/2.0/kr/deed.en Attribution 2.0 Korea] 
license.",
-   "wm-license-cc-by-2.0-nl-text": "This file is licensed under the 
[[{{int:wm-license-cc-wiki-link}}|Creative Commons]] 
[//creativecommons.org/licenses/by/2.0/nl/deed.en Attribution 2.0 

[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_27]: Move standard tar ignores to .gitattributes so `git archive`...

2018-01-19 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405355 )

Change subject: Move standard tar ignores to .gitattributes so `git archive` 
works
..

Move standard tar ignores to .gitattributes so `git archive` works

Change-Id: Ib12a21827d85f781030309cf400f3207c8bbd8dd
(cherry picked from commit 95e7c545a9d6ab968d9fb2e8bb39053d76680b4f)
---
M .gitattributes
1 file changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/55/405355/1

diff --git a/.gitattributes b/.gitattributes
index 09f86a3..d0db6b5 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,3 +1,10 @@
 *.sh eol=lf
 *.icc binary
 *.webp binary
+*~ export-ignore
+#*# export-ignore
+.* export-ignore
+package.jso export-ignore
+README.mediawik export-ignore
+Gemfile* export-ignore
+vendor/pear/net_smtp/README.rst export-ignore

-- 
To view, visit https://gerrit.wikimedia.org/r/405355
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib12a21827d85f781030309cf400f3207c8bbd8dd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_27
Gerrit-Owner: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_29]: Move standard tar ignores to .gitattributes so `git archive`...

2018-01-19 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405354 )

Change subject: Move standard tar ignores to .gitattributes so `git archive` 
works
..

Move standard tar ignores to .gitattributes so `git archive` works

Change-Id: Ib12a21827d85f781030309cf400f3207c8bbd8dd
(cherry picked from commit 95e7c545a9d6ab968d9fb2e8bb39053d76680b4f)
---
M .gitattributes
1 file changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/54/405354/1

diff --git a/.gitattributes b/.gitattributes
index 09f86a3..d0db6b5 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,3 +1,10 @@
 *.sh eol=lf
 *.icc binary
 *.webp binary
+*~ export-ignore
+#*# export-ignore
+.* export-ignore
+package.jso export-ignore
+README.mediawik export-ignore
+Gemfile* export-ignore
+vendor/pear/net_smtp/README.rst export-ignore

-- 
To view, visit https://gerrit.wikimedia.org/r/405354
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib12a21827d85f781030309cf400f3207c8bbd8dd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_29
Gerrit-Owner: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_30]: Move standard tar ignores to .gitattributes so `git archive`...

2018-01-19 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405353 )

Change subject: Move standard tar ignores to .gitattributes so `git archive` 
works
..

Move standard tar ignores to .gitattributes so `git archive` works

Change-Id: Ib12a21827d85f781030309cf400f3207c8bbd8dd
(cherry picked from commit 95e7c545a9d6ab968d9fb2e8bb39053d76680b4f)
---
M .gitattributes
1 file changed, 9 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/53/405353/1

diff --git a/.gitattributes b/.gitattributes
index f230c60..b306f36 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,4 +1,12 @@
 *.sh eol=lf
 *.icc binary
 *.webp binary
-*.mp3 binary
\ No newline at end of file
+*.mp3 binary
+*~ export-ignore
+#*# export-ignore
+.* export-ignore
+package.jso export-ignore
+README.mediawik export-ignore
+Gemfile* export-ignore
+vendor/pear/net_smtp/README.rst export-ignore
+

-- 
To view, visit https://gerrit.wikimedia.org/r/405353
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib12a21827d85f781030309cf400f3207c8bbd8dd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_30
Gerrit-Owner: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...release[master]: releases: Swap tar/gzip pipe for `git archive`

2018-01-19 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405347 )

Change subject: releases: Swap tar/gzip pipe for `git archive`
..

releases: Swap tar/gzip pipe for `git archive`

By using .gitattributes, we can skip on files we want to exclude.
Then we also don't need to specify a tar command

Change-Id: Iac2d02e98128710b5dbc76fbe8e0202ac8b48fa8
---
M make-release/makerelease.py
1 file changed, 11 insertions(+), 21 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release 
refs/changes/47/405347/1

diff --git a/make-release/makerelease.py b/make-release/makerelease.py
index e2c83ca..acb07f9 100755
--- a/make-release/makerelease.py
+++ b/make-release/makerelease.py
@@ -77,11 +77,6 @@
 help='skip gpg signing'
 )
 parser.add_argument(
-'--tar-command', dest='tar_command',
-default='tar',
-help='path to tar, we are expecting a GNU tar. (defaults to tar)'
-)
-parser.add_argument(
 '--patch-dir', dest='patch_dir', default=None,
 help='Where to source patch files from'
 )
@@ -440,29 +435,24 @@
 logging.info('Done with making patch')
 return diff_status == 1
 
-def make_tar(self, package, input_dir, build_dir, add_args=None):
+def make_tar(self, package, input_dir, build_dir, include_submodules=True):
 """Tar up a directory"""
-tar = self.options.tar_command
-
 # Generate the .tar.gz file
 filename = package + '.tar.gz'
+cwd = os.getcwd()
+os.chdir(input_dir)
 out_file = open(os.path.join(build_dir, filename), "w")
-args = [tar, '--format=gnu', '--exclude-vcs', '-C', build_dir]
-if self.config.get('tar', {}).get('ignore', []):
-for patt in self.config['tar']['ignore']:
-args += ['--exclude', patt]
-if add_args:
-args += add_args
-args += ['-c', input_dir]
+if include_submodules:
+subprocess.check_call(['/usr/bin/git', 'config', 
'submodule.active', 'false'])
 logging.debug("Creating %s", filename)
-tar_proc = subprocess.Popen(args, stdout=subprocess.PIPE)
-gzip_proc = subprocess.Popen(['gzip', '-9'], stdin=tar_proc.stdout,
- stdout=out_file)
+tar_proc = subprocess.Popen(
+['/usr/bin/git', 'archive', '--format', 'tar.gz', '-9', '-o', 
filename, 'HEAD'])
 
-if tar_proc.wait() != 0 or gzip_proc.wait() != 0:
-logging.error("tar/gzip failed, exiting")
+if tar_proc.wait() != 0:
+logging.error("git-archive failed, exiting")
 sys.exit(1)
 out_file.close()
+os.chdir(cwd)
 logging.info('%s written', filename)
 return filename
 
@@ -517,7 +507,7 @@
 package='mediawiki-core-' + version.raw,
 input_dir=package,
 build_dir=build_dir,
-add_args=ext_exclude)
+include_submodules=False)
 ]
 
 # Patch

-- 
To view, visit https://gerrit.wikimedia.org/r/405347
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iac2d02e98128710b5dbc76fbe8e0202ac8b48fa8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Move standard tar ignores to .gitattributes so `git archive`...

2018-01-18 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405214 )

Change subject: Move standard tar ignores to .gitattributes so `git archive` 
works
..

Move standard tar ignores to .gitattributes so `git archive` works

Change-Id: Ib12a21827d85f781030309cf400f3207c8bbd8dd
---
M .gitattributes
1 file changed, 9 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/14/405214/1

diff --git a/.gitattributes b/.gitattributes
index f230c60..b306f36 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,4 +1,12 @@
 *.sh eol=lf
 *.icc binary
 *.webp binary
-*.mp3 binary
\ No newline at end of file
+*.mp3 binary
+*~ export-ignore
+#*# export-ignore
+.* export-ignore
+package.jso export-ignore
+README.mediawik export-ignore
+Gemfile* export-ignore
+vendor/pear/net_smtp/README.rst export-ignore
+

-- 
To view, visit https://gerrit.wikimedia.org/r/405214
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib12a21827d85f781030309cf400f3207c8bbd8dd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...release[master]: make-release: Simplify excludes, just drop all .dotfiles

2018-01-18 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405213 )

Change subject: make-release: Simplify excludes, just drop all .dotfiles
..

make-release: Simplify excludes, just drop all .dotfiles

Change-Id: I76a05618ba3d6ecb58b0ba7dc31ab3b3d3b67734
---
M make-release/settings.yaml
1 file changed, 1 insertion(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release 
refs/changes/13/405213/1

diff --git a/make-release/settings.yaml b/make-release/settings.yaml
index c66da15..ec60839 100644
--- a/make-release/settings.yaml
+++ b/make-release/settings.yaml
@@ -56,14 +56,9 @@
 tar:
 ignore:
 - "*~"
-- ".js*"
-- ".git*"
-- ".rubocop*"
 - "#*#"
-- ".#*"
-- .travis.yml
+- ".*"
 - package.json
 - README.mediawiki
 - "Gemfile*"
-- ".mailmap"
 - "vendor/pear/net_smtp/README.rst"

-- 
To view, visit https://gerrit.wikimedia.org/r/405213
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I76a05618ba3d6ecb58b0ba7dc31ab3b3d3b67734
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...release[master]: branch.py: Fix data payload for REST call, also add .netrc f...

2018-01-18 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405056 )

Change subject: branch.py: Fix data payload for REST call, also add .netrc 
fallback
..

branch.py: Fix data payload for REST call, also add .netrc fallback

Change-Id: Ib1b04ab4eeb8be41bc9fb84c8969a241e991c79a
---
M make-release/branch.py
1 file changed, 8 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release 
refs/changes/56/405056/1

diff --git a/make-release/branch.py b/make-release/branch.py
index 71fab5a..015feb8 100755
--- a/make-release/branch.py
+++ b/make-release/branch.py
@@ -18,6 +18,7 @@
 import yaml
 
 from pygerrit2.rest import GerritRestAPI
+from pygerrit2.rest.auth import HTTPBasicAuthFromNetrc
 
 # Setup config with local overrides
 with open('settings.yaml') as globalconf:
@@ -31,9 +32,12 @@
 
 def _get_client():
 """Get the client for making requests."""
-return GerritRestAPI(
-url=CONFIG['base_url'],
-auth=HTTPBasicAuth(CONFIG['username'], CONFIG['password']))
+try:
+auth = HTTPBasicAuth(CONFIG['username'], CONFIG['password'])
+except KeyError:
+# Username and password weren't provided, try falling back to .netrc
+auth = HTTPBasicAuthFromNetrc(CONFIG['base_url'])
+return GerritRestAPI(url=CONFIG['base_url'], auth=auth)
 
 
 def get_branchpoint(branch, repository, default):
@@ -64,7 +68,7 @@
 '/projects/%s/branches/%s' % (
 repository.replace('/', '%2F'),
 branch.replace('/', '%2F')),
-data='{"revision":"%s"}' % revision
+data={'revision': revision}
 )
 except HTTPError as httpe:
 # Gerrit responds 409 for edit conflicts

-- 
To view, visit https://gerrit.wikimedia.org/r/405056
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib1b04ab4eeb8be41bc9fb84c8969a241e991c79a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Update my dotfiles

2018-01-18 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405025 )

Change subject: Update my dotfiles
..

Update my dotfiles

Change-Id: I40e001b48404a16222614a34b0ebc45e6ee1eca9
---
M modules/admin/files/home/demon/.ackrc
M modules/admin/files/home/demon/.bashrc
M modules/admin/files/home/demon/.gitconfig
A modules/admin/files/home/demon/.pylintrc
4 files changed, 76 insertions(+), 41 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/25/405025/1

diff --git a/modules/admin/files/home/demon/.ackrc 
b/modules/admin/files/home/demon/.ackrc
index 2671ad3..a976e97 100644
--- a/modules/admin/files/home/demon/.ackrc
+++ b/modules/admin/files/home/demon/.ackrc
@@ -1,3 +1,9 @@
---ignore-case
---ignore-file=ext:ser
--s
+--color-filename=white
+--color-lineno=cyan
+--color-match=magenta underline
+--ignore-dir=.idea
+--ignore-dir=build
+--type-add=css=.styl
+--type-add=js=.coffee
+--type-set=md=.markdown,.md
+-i
diff --git a/modules/admin/files/home/demon/.bashrc 
b/modules/admin/files/home/demon/.bashrc
index 51d48d2..a1bd2fc 100644
--- a/modules/admin/files/home/demon/.bashrc
+++ b/modules/admin/files/home/demon/.bashrc
@@ -47,6 +47,7 @@
 if [ -x /usr/bin/dircolors ]; then
 test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval 
"$(dircolors -b)"
 alias ls='ls --color=auto'
+alias ls='ls -GFh'
 #alias dir='dir --color=auto'
 #alias vdir='vdir --color=auto'
 
diff --git a/modules/admin/files/home/demon/.gitconfig 
b/modules/admin/files/home/demon/.gitconfig
index f5aa148..49bc970 100644
--- a/modules/admin/files/home/demon/.gitconfig
+++ b/modules/admin/files/home/demon/.gitconfig
@@ -1,40 +1,63 @@
-[user]
-   name = Chad Horohoe
-   email = ch...@wikimedia.org
 [alias]
-   push-for-review = push origin HEAD:refs/for/master
-   up = pull --ff-only
-   log-graph = log --graph --oneline --branches --all
-   rollback = reset --hard HEAD~1
-   amend = commit -a --amend
-   sub-up = submodule update --init --recursive
-   push-for-review-g = push gerrit HEAD:refs/for/master
-   praise = blame
-   set = reset --hard
-[core]
-   editor = vim
-[color]
-   branch = auto
-   diff = auto
-   status = auto
-[color "branch"]
-   current = yellow reverse
-   local = yellow
-   remote = green
-[color "diff"]
-   meta = yellow bold
-   frag = magenta bold
-   old = red bold
-   new = green bold
-[color "status"]
-   added = yellow
-   changed = green
-   untracked = cyan
-[mergetool]
-   keepBackup = false
-[gitreview]
-   username = demon
-[url "https://gerrit.wikimedia.org/r/p/;]
-   insteadOf = "gerrit:"
+  amend = commit -a --amend
+  fetch-fast = fetch --recurse-submodules --jobs=8 --prune
+  git = !git
+  log-graph = log --graph --oneline --branches --all
+  mergeit = !git push origin HEAD:refs/for/${1:-`git rev-parse --abbrev-ref 
HEAD`}%l=Code-Review+2
+  oneline = log --no-merges --pretty=format:"%h%x09%an%x09%ad%x09%s"
+  praise = blame
+  review = !git push origin HEAD:refs/for/${1:-`git rev-parse --abbrev-ref 
HEAD`}
+  rollback = reset --hard HEAD~1
+  set = reset --hard
+  show-files = show --name-only
+  sub-up = submodule update --init --recursive
+  tyler = !git push origin HEAD:refs/for/${1:-`git rev-parse --abbrev-ref 
HEAD`}%r=thcipriani
+  up = pull --ff-only
 [branch]
-   autosetuprebase = always
+  autosetuprebase = always
+[core]
+  editor = vim
+  excludesfile = ~/.gitignore_global
+[color]
+  branch = auto
+  diff = auto
+  status = auto
+[color "branch"]
+  current = yellow reverse
+  local = yellow
+  remote = green
+[color "diff"]
+  frag = magenta bold
+  meta = yellow bold
+  new = green bold
+  old = red bold
+[color "status"]
+  added = yellow
+  changed = green
+  untracked = cyan
+[filter "lfs"]
+  clean = git-lfs clean -- %f
+  process = git-lfs filter-process
+  required = true
+  smudge = git-lfs smudge -- %f
+[gitreview]
+  username = demon
+[git-change]
+  gerrit-ssh-host = gerrit.wikimedia.org
+[http]
+  cookiefile = ~/.gitcookies
+[merge]
+  keepBackup = false
+  conflictstyle = diff3
+[push]
+  default = simple
+[url "https://gerrit.wikimedia.org/r/p/;]
+  insteadOf = "gerrit:"
+[url "https://github.com/;]
+  insteadOf = "github:"
+[url "https://phabricator.wikimedia.org/source/;]
+  insteadOf = "phab:"
+[user]
+  email = ch...@wikimedia.org
+  name = Chad Horohoe
+  signingkey = 23107F8A
diff --git a/modules/admin/files/home/demon/.pylintrc 
b/modules/admin/files/home/demon/.pylintrc
new file mode 100644
index 000..4b1e421
--- /dev/null
+++ b/modules/admin/files/home/demon/.pylintrc
@@ -0,0 +1,5 @@
+[MASTER]
+jobs=4
+
+[REPORTS]
+reports=yes

-- 
To view, visit https://gerrit.wikimedia.org/r/405025
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: WIP: Sync security patches for MW from deployment to nightli...

2018-01-17 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404892 )

Change subject: WIP: Sync security patches for MW from deployment to nightlies 
server
..

WIP: Sync security patches for MW from deployment to nightlies server

Change-Id: I241438b471c07ca04f9f29b5bb8c131499f291f2
---
A modules/profile/manifests/releases/mediawiki/security.pp
M modules/role/manifests/deployment_server/base.pp
M modules/role/manifests/releases.pp
3 files changed, 16 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/92/404892/1

diff --git a/modules/profile/manifests/releases/mediawiki/security.pp 
b/modules/profile/manifests/releases/mediawiki/security.pp
new file mode 100644
index 000..d3a22f3
--- /dev/null
+++ b/modules/profile/manifests/releases/mediawiki/security.pp
@@ -0,0 +1,14 @@
+# server hosting Mediawiki releases
+# https://releases.wikimedia.org/mediawiki/
+class profile::releases::mediawiki::security (
+$deployment_server = hiera('deployment_server'),
+$releases_server = hiera('releases_server') ) {
+
+rsync::quickdatacopy { 'srv-patches':
+ensure  => present,
+auto_sync   => true,
+source_host => $deployment_server,
+dest_host   => $releases_server,
+module_path => '/srv/patches',
+}
+}
diff --git a/modules/role/manifests/deployment_server/base.pp 
b/modules/role/manifests/deployment_server/base.pp
index 918fc08..5ccb113 100644
--- a/modules/role/manifests/deployment_server/base.pp
+++ b/modules/role/manifests/deployment_server/base.pp
@@ -4,4 +4,5 @@
 include ::base::firewall
 include ::profile::mediawiki::deployment::server
 include ::role::deployment::mediawiki
+include ::profile::releases::mediawiki::security
 }
diff --git a/modules/role/manifests/releases.pp 
b/modules/role/manifests/releases.pp
index 826f26f..f731d43 100644
--- a/modules/role/manifests/releases.pp
+++ b/modules/role/manifests/releases.pp
@@ -12,6 +12,7 @@
 include ::profile::base::firewall
 include ::profile::backup::host
 include ::profile::releases::mediawiki
+include ::profile::releases::mediawiki::security
 include ::profile::releases::reprepro
 
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/404892
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I241438b471c07ca04f9f29b5bb8c131499f291f2
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...release[master]: makerelease: Simplify a few things

2018-01-17 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404883 )

Change subject: makerelease: Simplify a few things
..

makerelease: Simplify a few things

Change-Id: I778521e93eda8fd4e1df6cb25a4b1c30fc81f207
---
M make-release/makerelease.py
1 file changed, 36 insertions(+), 42 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release 
refs/changes/83/404883/1

diff --git a/make-release/makerelease.py b/make-release/makerelease.py
index 8afa331..e2c83ca 100755
--- a/make-release/makerelease.py
+++ b/make-release/makerelease.py
@@ -362,13 +362,12 @@
 
 no_previous = False
 if self.version.prev_version is None:
+no_previous = True
 if not self.ask("No previous release found. Do you want to make a "
 "release with no patch?"):
 logging.error('Please specify the correct previous release ' +
   'on the command line')
 return 1
-else:
-no_previous = True
 if no_previous or self.options.no_previous:
 self.do_release(
 extensions=extensions,
@@ -473,10 +472,7 @@
 patch_dir = self.options.patch_dir
 
 # variables related to the version
-branch = version.branch
-tag = version.tag
 prev_version = version.prev_version
-major_ver = version.major
 
 # If we're operating in the same repo as this script, kindly make it
 # in a subdirectory to avoid polluting things
@@ -492,7 +488,7 @@
 package = 'mediawiki-' + version.raw
 
 # Export the target
-self.export(tag, os.path.join(build_dir, package),
+self.export(version.tag, os.path.join(build_dir, package),
 get_patches_for_repo(patch_dir, 'core', version.branch))
 
 os.chdir(os.path.join(build_dir, package))
@@ -512,26 +508,22 @@
 ext_exclude.append(ext)
 
 # Generate the .tar.gz files
-out_files = []
-out_files.append(
+out_files = [
 self.make_tar(
 package=package,
 input_dir=package,
-build_dir=build_dir)
-)
-out_files.append(
+build_dir=build_dir),
 self.make_tar(
 package='mediawiki-core-' + version.raw,
 input_dir=package,
 build_dir=build_dir,
 add_args=ext_exclude)
-)
+]
 
 # Patch
 if not self.options.no_previous and prev_version is not None:
 prev_dir = 'mediawiki-' + prev_version
-prev_mw_version = MwVersion(prev_version)
-self.export(prev_mw_version.tag,
+self.export(MwVersion(prev_version),
 prev_dir, build_dir)
 os.chdir(os.path.join(build_dir, prev_dir))
 subprocess.check_output(['composer', 'update', '--no-dev'])
@@ -563,37 +555,39 @@
 if proc.wait() != 0:
 logging.error("gpg failed, exiting")
 sys.exit(1)
-
-# Write email template
-print()
-print("Full release notes:")
-url = ('https://phabricator.wikimedia.org/diffusion/MW/browse/' +
-   branch + '/RELEASE-NOTES-' + major_ver)
-
-print(url)
-print('https://www.mediawiki.org/wiki/Release_notes/' + major_ver)
-print()
-print()
-print('*' * 70)
-
-server = 
'https://releases.wikimedia.org/mediawiki/{}/'.format(major_ver)
-print('Download:')
-for file_name in out_files:
-print(server + file_name)
-print()
-
-print('GPG signatures:')
-for file_name in out_files:
-print(server + file_name + '.sig')
-print()
-
-print('Public keys:')
-print('https://www.mediawiki.org/keys/keys.html')
-print()
-
+output(version, out_files)
 return 0
 
 
+def output(version, out_files):
+"""Write email template"""
+print()
+print("Full release notes:")
+url = ('https://phabricator.wikimedia.org/diffusion/MW/browse/' +
+   version.branch + '/RELEASE-NOTES-' + version.major)
+
+print(url)
+print('https://www.mediawiki.org/wiki/Release_notes/' + version.major)
+print()
+print()
+print('*' * 70)
+
+server = 
'https://releases.wikimedia.org/mediawiki/{}/'.format(version.major)
+print('Download:')
+for file_name in out_files:
+print(server + file_name)
+print()
+
+print('GPG signatures:')
+for file_name in out_files:
+print(server + file_name + '.sig')
+print()
+
+print('Public keys:')
+print('https://www.mediawiki.org/keys/keys.html')
+print()
+
+
 if __name__ == '__main__':
 _OPTS = parse_args()
 

-- 
To view, visit 

[MediaWiki-commits] [Gerrit] mediawiki...release[master]: makerelease.py: Simplify file output

2018-01-17 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404876 )

Change subject: makerelease.py: Simplify file output
..

makerelease.py: Simplify file output

Change-Id: I4928f7b063c72eae4808a8c4bb6a9786e06c8b94
---
M make-release/makerelease.py
1 file changed, 9 insertions(+), 20 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release 
refs/changes/76/404876/1

diff --git a/make-release/makerelease.py b/make-release/makerelease.py
index a6e3b80..8afa331 100755
--- a/make-release/makerelease.py
+++ b/make-release/makerelease.py
@@ -31,7 +31,7 @@
 '--conf', dest='conffile',
 default=os.path.join(
 os.path.dirname(os.path.realpath(__file__)),
-'make-release.yaml'),
+'settings.yaml'),
 help='specify the configuration file')
 
 # Positional arguments:
@@ -515,16 +515,16 @@
 out_files = []
 out_files.append(
 self.make_tar(
+package=package,
+input_dir=package,
+build_dir=build_dir)
+)
+out_files.append(
+self.make_tar(
 package='mediawiki-core-' + version.raw,
 input_dir=package,
 build_dir=build_dir,
 add_args=ext_exclude)
-)
-out_files.append(
-self.make_tar(
-package=package,
-input_dir=package,
-build_dir=build_dir)
 )
 
 # Patch
@@ -578,20 +578,9 @@
 
 server = 
'https://releases.wikimedia.org/mediawiki/{}/'.format(major_ver)
 print('Download:')
-print(server + package + '.tar.gz')
+for file_name in out_files:
+print(server + file_name)
 print()
-
-if prev_version is not None:
-if i18n_patch:
-print("Patch to previous version (" + prev_version +
-  "), without interface text:")
-print(server + package + '.patch.gz')
-print("Interface text changes:")
-print(server + i18n_patch)
-else:
-print("Patch to previous version (" + prev_version + "):")
-print(server + package + '.patch.gz')
-print()
 
 print('GPG signatures:')
 for file_name in out_files:

-- 
To view, visit https://gerrit.wikimedia.org/r/404876
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4928f7b063c72eae4808a8c4bb6a9786e06c8b94
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad 
Gerrit-Reviewer: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...release[master]: Make config useful

2018-01-17 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404829 )

Change subject: Make config useful
..

Make config useful

Change-Id: Ia7602043e971401733c688b374e175d33bc84084
---
M make-release/.gitignore
M make-release/branch.py
R make-release/settings.yaml
M make-release/tests/test_makerelease-yaml.py
4 files changed, 10 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release 
refs/changes/29/404829/1

diff --git a/make-release/.gitignore b/make-release/.gitignore
index 41730ff..6b6276c 100644
--- a/make-release/.gitignore
+++ b/make-release/.gitignore
@@ -1,2 +1,3 @@
 *.gz
 /build/
+.settings.yaml
diff --git a/make-release/branch.py b/make-release/branch.py
index 559cdc9..7b4f91e 100755
--- a/make-release/branch.py
+++ b/make-release/branch.py
@@ -19,8 +19,14 @@
 
 from pygerrit2.rest import GerritRestAPI
 
-with open("make-release.yaml") as conf:
-CONFIG = yaml.safe_load(conf)
+# Setup config with local overrides
+with open('settings.yaml') as globalconf:
+CONFIG = yaml.safe_load(globalconf)
+if os.path.exists('.settings.yaml'):
+with open(".settings.yaml") as localconf:
+LOCAL_CONFIG = yaml.safe_load(localconf)
+if LOCAL_CONFIG:
+CONFIG = {**CONFIG, **LOCAL_CONFIG}
 
 
 def _get_client():
diff --git a/make-release/make-release.yaml b/make-release/settings.yaml
similarity index 100%
rename from make-release/make-release.yaml
rename to make-release/settings.yaml
diff --git a/make-release/tests/test_makerelease-yaml.py 
b/make-release/tests/test_makerelease-yaml.py
index f33790d..f7aea4b 100644
--- a/make-release/tests/test_makerelease-yaml.py
+++ b/make-release/tests/test_makerelease-yaml.py
@@ -5,7 +5,7 @@
 def test_valid_syntax():
 fname = os.path.join(
 os.path.dirname(os.path.dirname(__file__)),
-'make-release.yaml'
+'settings.yaml'
 )
 
 with open(fname) as conf:

-- 
To view, visit https://gerrit.wikimedia.org/r/404829
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia7602043e971401733c688b374e175d33bc84084
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...release[master]: Add some docs to shut up pylint

2018-01-17 Thread Chad (Code Review)
Chad has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/404808 )

Change subject: Add some docs to shut up pylint
..


Add some docs to shut up pylint

Change-Id: I09567fce2aab44feb0c6f1f99a101b0495fd0cb9
---
M make-release/branch.py
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/make-release/branch.py b/make-release/branch.py
index 0112714..559cdc9 100755
--- a/make-release/branch.py
+++ b/make-release/branch.py
@@ -31,6 +31,7 @@
 
 
 def get_branchpoint(branch, repository, default):
+"""See if a repo has an overridden branchpoint"""
 try:
 return CONFIG['manual_branch_points'][branch][repository]
 except KeyError:
@@ -87,6 +88,7 @@
 
 @contextmanager
 def clone(repository):
+"""Clone a repository. Basically clone core"""
 url = CONFIG['clone_base'] + '/' + repository
 temp = tempfile.mkdtemp()
 subprocess.check_call(['/usr/bin/git', 'clone', url, temp])

-- 
To view, visit https://gerrit.wikimedia.org/r/404808
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I09567fce2aab44feb0c6f1f99a101b0495fd0cb9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad 
Gerrit-Reviewer: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...release[master]: Add some docs to shut up pylint

2018-01-17 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404808 )

Change subject: Add some docs to shut up pylint
..

Add some docs to shut up pylint

Change-Id: I09567fce2aab44feb0c6f1f99a101b0495fd0cb9
---
M make-release/branch.py
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release 
refs/changes/08/404808/1

diff --git a/make-release/branch.py b/make-release/branch.py
index 0112714..559cdc9 100755
--- a/make-release/branch.py
+++ b/make-release/branch.py
@@ -31,6 +31,7 @@
 
 
 def get_branchpoint(branch, repository, default):
+"""See if a repo has an overridden branchpoint"""
 try:
 return CONFIG['manual_branch_points'][branch][repository]
 except KeyError:
@@ -87,6 +88,7 @@
 
 @contextmanager
 def clone(repository):
+"""Clone a repository. Basically clone core"""
 url = CONFIG['clone_base'] + '/' + repository
 temp = tempfile.mkdtemp()
 subprocess.check_call(['/usr/bin/git', 'clone', url, temp])

-- 
To view, visit https://gerrit.wikimedia.org/r/404808
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I09567fce2aab44feb0c6f1f99a101b0495fd0cb9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...release[master]: branch.py: Fix all kinds of egregious errors

2018-01-17 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404807 )

Change subject: branch.py: Fix all kinds of egregious errors
..

branch.py: Fix all kinds of egregious errors

Change-Id: I8104d170ecc988aff9c752b63a7051aced18885d
---
M make-release/branch.py
M make-release/make-release.yaml
2 files changed, 4 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release 
refs/changes/07/404807/1

diff --git a/make-release/branch.py b/make-release/branch.py
index 53a7733..0112714 100755
--- a/make-release/branch.py
+++ b/make-release/branch.py
@@ -12,7 +12,7 @@
 import sys
 import tempfile
 
-from requests.auth import HTTPDigestAuth
+from requests.auth import HTTPBasicAuth
 from requests.exceptions import HTTPError
 
 import yaml
@@ -27,7 +27,7 @@
 """Get the client for making requests."""
 return GerritRestAPI(
 url=CONFIG['base_url'],
-auth=HTTPDigestAuth(CONFIG['username'], CONFIG['password']))
+auth=HTTPBasicAuth(CONFIG['username'], CONFIG['password']))
 
 
 def get_branchpoint(branch, repository, default):
@@ -41,6 +41,7 @@
 """Create a branch for a given repo."""
 # If we've got a sub-submodule we care about, branch it first so we can
 # do some magic stuff
+repository = 'mediawiki/{}'.format(repository)
 try:
 subrepo = CONFIG['sub_submodules'][repository]
 create_branch(subrepo, branch, revision)
diff --git a/make-release/make-release.yaml b/make-release/make-release.yaml
index 8af0605..c66da15 100644
--- a/make-release/make-release.yaml
+++ b/make-release/make-release.yaml
@@ -1,5 +1,5 @@
 # vim: set et ts=4 sw=4: -*- mode: yaml-mode; yaml-indent-offset: 4 -*-
-clone_base: https://gerrit.wikimedia.org/r/mediawiki
+base_url: https://gerrit.wikimedia.org/r/
 bundles:
 base:
 - extensions/Cite

-- 
To view, visit https://gerrit.wikimedia.org/r/404807
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8104d170ecc988aff9c752b63a7051aced18885d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad 
Gerrit-Reviewer: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...release[master]: branch.py: Use pygerrit2 not pygerrit, also env for py3

2018-01-17 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404804 )

Change subject: branch.py: Use pygerrit2 not pygerrit, also env for py3
..

branch.py: Use pygerrit2 not pygerrit, also env for py3

Change-Id: I8d3cc0a9f521b0b0013f88789d50f4194e139175
---
M make-release/branch.py
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release 
refs/changes/04/404804/1

diff --git a/make-release/branch.py b/make-release/branch.py
index 1cad5da..53a7733 100755
--- a/make-release/branch.py
+++ b/make-release/branch.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python3
+#!/usr/bin/env python3
 # vim:sw=4:ts=4:et:
 """Stuff about making branches and so forth."""
 
@@ -17,7 +17,7 @@
 
 import yaml
 
-from pygerrit.rest import GerritRestAPI
+from pygerrit2.rest import GerritRestAPI
 
 with open("make-release.yaml") as conf:
 CONFIG = yaml.safe_load(conf)

-- 
To view, visit https://gerrit.wikimedia.org/r/404804
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8d3cc0a9f521b0b0013f88789d50f4194e139175
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad 
Gerrit-Reviewer: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki/vendor[refs/meta/config]: Allow vendor to subscribe to mediawiki/core

2018-01-17 Thread Chad (Code Review)
Chad has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/404798 )

Change subject: Allow vendor to subscribe to mediawiki/core
..


Allow vendor to subscribe to mediawiki/core

Change-Id: I27c001e72336199563b4f88572936ebc3d41a0c9
---
M project.config
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/project.config b/project.config
index ed5df45..27e550a 100644
--- a/project.config
+++ b/project.config
@@ -12,4 +12,6 @@
 [project]
description = Composer managed libraries for use with mediawiki/core
 [allowSuperproject "mediawiki/core"]
-   matching = refs/heads/wmf/1.29.0-wmf.5:refs/heads/wmf/1.29.0-wmf.5
+   all = refs/heads/*:refs/heads/*
+[subscribe "mediawiki/core"]
+   refs = refs/heads/*:refs/heads/*

-- 
To view, visit https://gerrit.wikimedia.org/r/404798
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I27c001e72336199563b4f88572936ebc3d41a0c9
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/vendor
Gerrit-Branch: refs/meta/config
Gerrit-Owner: Chad 
Gerrit-Reviewer: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki/vendor[refs/meta/config]: Allow vendor to subscribe to mediawiki/core

2018-01-17 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404798 )

Change subject: Allow vendor to subscribe to mediawiki/core
..

Allow vendor to subscribe to mediawiki/core

Change-Id: I27c001e72336199563b4f88572936ebc3d41a0c9
---
M project.config
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vendor 
refs/changes/98/404798/2

diff --git a/project.config b/project.config
index ed5df45..27e550a 100644
--- a/project.config
+++ b/project.config
@@ -12,4 +12,6 @@
 [project]
description = Composer managed libraries for use with mediawiki/core
 [allowSuperproject "mediawiki/core"]
-   matching = refs/heads/wmf/1.29.0-wmf.5:refs/heads/wmf/1.29.0-wmf.5
+   all = refs/heads/*:refs/heads/*
+[subscribe "mediawiki/core"]
+   refs = refs/heads/*:refs/heads/*

-- 
To view, visit https://gerrit.wikimedia.org/r/404798
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I27c001e72336199563b4f88572936ebc3d41a0c9
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/vendor
Gerrit-Branch: refs/meta/config
Gerrit-Owner: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...release[master]: branch.py: Add $wgVersion fixing in DefaultSettings

2018-01-17 Thread Chad (Code Review)
Hello Thcipriani,

I'd like you to do a code review.  Please visit

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

to review the following change.


Change subject: branch.py: Add $wgVersion fixing in DefaultSettings
..

branch.py: Add $wgVersion fixing in DefaultSettings

Change-Id: I4887a8ba30e98ae0912edd510bbf81fd6a6be246
---
M make-release/branch.py
1 file changed, 14 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release 
refs/changes/87/404787/1

diff --git a/make-release/branch.py b/make-release/branch.py
index 8aff26f..1cad5da 100755
--- a/make-release/branch.py
+++ b/make-release/branch.py
@@ -6,6 +6,7 @@
 from contextlib import contextmanager
 import logging
 import os
+import re
 import shutil
 import subprocess
 import sys
@@ -95,6 +96,11 @@
 shutil.rmtree(temp)
 
 
+WGVERSION_REGEX = re.compile(
+r'^( \$wgVersion \s+ = \s+ )  [^;]*  ( ; \s* ) $',
+re.MULTILINE | re.VERBOSE)
+
+
 def do_core_work(branch, bundle, version):
 """Add submodules, bump $wgVersion, etc"""
 cwd = os.getcwd()
@@ -104,7 +110,14 @@
 subprocess.check_call(['/usr/bin/git', 'submodule', 'add',
'--force', '--branch', branch, url,
submodule])
-# something with defaultsettings
+
+with open('includes/DefaultSettings.php', 'r') as defaultsettings:
+contents = defaultsettings.read()
+
+with open('includes/DefaultSettings.php', 'w') as defaultsettings:
+defaultsettings.write(WGVERSION_REGEX.sub(
+r"\1'" + version + r"'\2", contents))
+
 subprocess.check_call(['/usr/bin/git', 'commit', '-a', '-m',
'Creating new %s branch' % branch])
 subprocess.check_call(['/usr/bin/git', 'push', 'origin',

-- 
To view, visit https://gerrit.wikimedia.org/r/404787
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4887a8ba30e98ae0912edd510bbf81fd6a6be246
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad 
Gerrit-Reviewer: Thcipriani 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] integration/config[master]: WIP: Create docker image for linting refs/meta/config

2018-01-17 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404753 )

Change subject: WIP: Create docker image for linting refs/meta/config
..

WIP: Create docker image for linting refs/meta/config

Starts with a simple gitconfig linter for project.config

Change-Id: I085d4c316bb1abd7e5e9102cb97d39519bd374d6
---
A dockerfiles/npm-test-gitconfig/.dockerignore
A dockerfiles/npm-test-gitconfig/.gitignore
A dockerfiles/npm-test-gitconfig/Dockerfile.template
A dockerfiles/npm-test-gitconfig/changelog
A dockerfiles/npm-test-gitconfig/control
A dockerfiles/npm-test-gitconfig/run.sh
6 files changed, 23 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/53/404753/1

diff --git a/dockerfiles/npm-test-gitconfig/.dockerignore 
b/dockerfiles/npm-test-gitconfig/.dockerignore
new file mode 100644
index 000..139ce78
--- /dev/null
+++ b/dockerfiles/npm-test-gitconfig/.dockerignore
@@ -0,0 +1,3 @@
+/cache
+/log
+/src
diff --git a/dockerfiles/npm-test-gitconfig/.gitignore 
b/dockerfiles/npm-test-gitconfig/.gitignore
new file mode 100644
index 000..139ce78
--- /dev/null
+++ b/dockerfiles/npm-test-gitconfig/.gitignore
@@ -0,0 +1,3 @@
+/cache
+/log
+/src
diff --git a/dockerfiles/npm-test-gitconfig/Dockerfile.template 
b/dockerfiles/npm-test-gitconfig/Dockerfile.template
new file mode 100644
index 000..b321b23
--- /dev/null
+++ b/dockerfiles/npm-test-gitconfig/Dockerfile.template
@@ -0,0 +1,3 @@
+FROM {{ "npm-test" | image_tag }}
+
+USER nobody
diff --git a/dockerfiles/npm-test-gitconfig/changelog 
b/dockerfiles/npm-test-gitconfig/changelog
new file mode 100644
index 000..49fed0e
--- /dev/null
+++ b/dockerfiles/npm-test-gitconfig/changelog
@@ -0,0 +1,5 @@
+npm-test-gitconfig (0.1.0) wikimedia; urgency=medium
+
+  * Initial implementation.
+
+ -- Chad Horohoe   Wed, 17 Jan 2018 18:21:13 +
diff --git a/dockerfiles/npm-test-gitconfig/control 
b/dockerfiles/npm-test-gitconfig/control
new file mode 100644
index 000..ae1d238
--- /dev/null
+++ b/dockerfiles/npm-test-gitconfig/control
@@ -0,0 +1 @@
+Depends: npm-test
diff --git a/dockerfiles/npm-test-gitconfig/run.sh 
b/dockerfiles/npm-test-gitconfig/run.sh
new file mode 100644
index 000..07646b4
--- /dev/null
+++ b/dockerfiles/npm-test-gitconfig/run.sh
@@ -0,0 +1,8 @@
+#!/usr/bin/env bash
+
+umask 002
+
+cd /src
+
+npm install git-lint
+git-lint project.config

-- 
To view, visit https://gerrit.wikimedia.org/r/404753
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I085d4c316bb1abd7e5e9102cb97d39519bd374d6
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] at-ease[refs/meta/config]: Allow mediawiki group to push signed tags

2018-01-17 Thread Chad (Code Review)
Chad has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/404745 )

Change subject: Allow mediawiki group to push signed tags
..


Allow mediawiki group to push signed tags

Change-Id: I9f97024d5ecdbed1073e90c5131ce382fa01d215
---
M groups
M project.config
2 files changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/groups b/groups
index b44c1b2..85413aa 100644
--- a/groups
+++ b/groups
@@ -1,5 +1,6 @@
 # UUID Group Name
 #
 2bc47fcadf4e44ec9a1a73bcfa06232554f47ce2   JenkinsBot
+4cdcb3a1ef2e19d73bc9a97f1d0f109d2e0209cd   mediawiki
 a667323336b66ba1423b73fa979948a8165074d5   at-ease
 global:Registered-UsersRegistered Users
diff --git a/project.config b/project.config
index 7b2b715..5d2b1a2 100644
--- a/project.config
+++ b/project.config
@@ -5,6 +5,7 @@
 [access "refs/*"]
owner = group at-ease
pushSignedTag = group at-ease
+   pushSignedTag = group mediawiki
 [project]
description = wfSuppressWarnings/wfRestoreWarnings library
 [access "refs/heads/*"]

-- 
To view, visit https://gerrit.wikimedia.org/r/404745
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I9f97024d5ecdbed1073e90c5131ce382fa01d215
Gerrit-PatchSet: 1
Gerrit-Project: at-ease
Gerrit-Branch: refs/meta/config
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...release[master]: make-wmf-branch: Stop committing weird sub-submodule branching

2018-01-16 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404600 )

Change subject: make-wmf-branch: Stop committing weird sub-submodule branching
..

make-wmf-branch: Stop committing weird sub-submodule branching

It's ok to keep creating these branches, but the logic for adding
them as auto-tracked submodules is fragile and has broken several
times over the years.

The drawback? SWAT deploys for the sub-submodules require manual
backports. This sucks, but it sucks less than the tech debt and
isn't any worse than how we used to do things before auto-updating
submodules were used.

Change-Id: I00301d8ea2d003b8d0668a8db998d3d1df34e195
---
M make-wmf-branch/MakeWmfBranch.php
1 file changed, 3 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release 
refs/changes/00/404600/1

diff --git a/make-wmf-branch/MakeWmfBranch.php 
b/make-wmf-branch/MakeWmfBranch.php
index b2a1ead..98363fd 100644
--- a/make-wmf-branch/MakeWmfBranch.php
+++ b/make-wmf-branch/MakeWmfBranch.php
@@ -148,12 +148,9 @@
}
}
 
-   function createBranch( $branchName, $doPush=true ) {
+   function createBranch( $branchName ) {
$this->runCmd( 'git', 'checkout', '-q', '-b', $branchName );
-
-   if ( $doPush == true ) {
-   $this->runWriteCmd( 'git', 'push', 'origin', 
$branchName );
-   }
+   $this->runWriteCmd( 'git', 'push', 'origin', $branchName );
}
 
function branchRepo( $path ) {
@@ -169,7 +166,6 @@
$newVersion = $this->branchPrefix . $this->newVersion;
 
if ( isset( $this->branchedSubmodules[$path] ) ) {
-   $this->createBranch( $newVersion, false );
foreach ( (array)$this->branchedSubmodules[$path] as 
$submodule ) {
$this->runCmd( 'git', 'submodule', 'update', 
'--init', $submodule );
$this->chdir( $submodule );
@@ -179,17 +175,9 @@
// may be inside a subdirectory
$this->chdir( $this->buildDir );
$this->chdir( $repo );
-   $this->runCmd( 'git', 'add', $submodule );
}
-   $diffRet = 0;
-   passthru( '/usr/bin/git diff --cached --no-ext-diff 
--quiet', $diffRet );
-   if ( $diffRet > 0 ) {
-   $this->runCmd( 'git', 'commit', '-q', '-m', 
"Creating new {$newVersion} branch" );
-   }
-   $this->runWriteCmd( 'git', 'push', 'origin', 
$newVersion );
-   } else {
-   $this->createBranch( $newVersion, true );
}
+   $this->createBranch( $newVersion );
$this->chdir( $this->buildDir );
}
 

-- 
To view, visit https://gerrit.wikimedia.org/r/404600
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I00301d8ea2d003b8d0668a8db998d3d1df34e195
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...release[master]: make-wmf-branch: Add force to special submodules

2018-01-16 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404532 )

Change subject: make-wmf-branch: Add force to special submodules
..

make-wmf-branch: Add force to special submodules

Change-Id: Ifad703ca0337a767e28187d53470b7a1126ce8c8
---
M make-wmf-branch/MakeWmfBranch.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release 
refs/changes/32/404532/1

diff --git a/make-wmf-branch/MakeWmfBranch.php 
b/make-wmf-branch/MakeWmfBranch.php
index 0c16519..b2a1ead 100644
--- a/make-wmf-branch/MakeWmfBranch.php
+++ b/make-wmf-branch/MakeWmfBranch.php
@@ -218,7 +218,7 @@
 
# Add extension submodules
foreach ( $this->specialExtensions as $name => $specialBranch ) 
{
-   $this->runCmd( 'git', 'submodule', 'add', '-b', 
$specialBranch, '-q',
+   $this->runCmd( 'git', 'submodule', 'add', '-f', '-b', 
$specialBranch, '-q',
"{$this->repoPath}/{$name}", $name );
}
 

-- 
To view, visit https://gerrit.wikimedia.org/r/404532
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifad703ca0337a767e28187d53470b7a1126ce8c8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad 
Gerrit-Reviewer: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...release[master]: make-wmf-branch: Clone submodules with --depth=1

2018-01-16 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404529 )

Change subject: make-wmf-branch: Clone submodules with --depth=1
..

make-wmf-branch: Clone submodules with --depth=1

Change-Id: Id7916e97b76b29c8b9cfbc52af5ee4f031494de2
---
M make-wmf-branch/MakeWmfBranch.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release 
refs/changes/29/404529/1

diff --git a/make-wmf-branch/MakeWmfBranch.php 
b/make-wmf-branch/MakeWmfBranch.php
index 3cce03d..0c16519 100644
--- a/make-wmf-branch/MakeWmfBranch.php
+++ b/make-wmf-branch/MakeWmfBranch.php
@@ -164,7 +164,7 @@
return;
}
 
-   $this->runCmd( 'git', 'clone', '-q', 
"{$this->repoPath}/{$path}", $repo );
+   $this->runCmd( 'git', 'clone', '-q', '--depth', '1', 
"{$this->repoPath}/{$path}", $repo );
$this->chdir( $repo );
$newVersion = $this->branchPrefix . $this->newVersion;
 

-- 
To view, visit https://gerrit.wikimedia.org/r/404529
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id7916e97b76b29c8b9cfbc52af5ee4f031494de2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Simplify/speed up clean plugin submodule handling

2018-01-16 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404527 )

Change subject: Simplify/speed up clean plugin submodule handling
..

Simplify/speed up clean plugin submodule handling

Change-Id: I4f878c0a645d3ce6b556a441b9a139997455ca14
---
M scap/plugins/clean.py
1 file changed, 1 insertion(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config 
refs/changes/27/404527/1

diff --git a/scap/plugins/clean.py b/scap/plugins/clean.py
index 5b9a175..d18145c 100644
--- a/scap/plugins/clean.py
+++ b/scap/plugins/clean.py
@@ -82,16 +82,8 @@
 'wmf/%s' % branch]
 with log.Timer('prune-git-branches', self.get_stats()):
 # Prune all the submodules' remote branches
-for submodule in git.list_submodules(stage_dir):
-submodule_path = submodule.lstrip(' ').split(' ')[1]
-with utils.cd(os.path.join(stage_dir, submodule_path)):
-if subprocess.call(gerrit_prune_cmd) != 0:
-logger.info(
-'Failed to prune submodule branch for %s' %
-submodule)
-
-# Prune core last
 with utils.cd(stage_dir):
+subprocess.check_output('git submodule foreach "git push 
origin --quiet --delete wmf/%s ||:"' % branch, shell=True)
 if subprocess.call(gerrit_prune_cmd) != 0:
 logger.info('Failed to prune core branch')
 with log.Timer('removing-local-copy'):

-- 
To view, visit https://gerrit.wikimedia.org/r/404527
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4f878c0a645d3ce6b556a441b9a139997455ca14
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Chad 
Gerrit-Reviewer: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...release[master]: make-wmf-branch: Follow-up and provide full path for CN

2018-01-16 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404520 )

Change subject: make-wmf-branch: Follow-up and provide full path for CN
..

make-wmf-branch: Follow-up and provide full path for CN

Change-Id: Idf1daa702c9cf47652b54c35285726c0abd305cc
---
M make-wmf-branch/config.json
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release 
refs/changes/20/404520/1

diff --git a/make-wmf-branch/config.json b/make-wmf-branch/config.json
index cabf8c1..bed7257 100644
--- a/make-wmf-branch/config.json
+++ b/make-wmf-branch/config.json
@@ -187,6 +187,6 @@
},
"@": "Set a string for the specific commit, branch, or tag. DO NOT USE 
THIS OR CHAD WILL BE ANGRY",
"special_extensions": {
-   "CentralNotice": "wmf_deploy"
+   "extensions/CentralNotice": "wmf_deploy"
}
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/404520
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idf1daa702c9cf47652b54c35285726c0abd305cc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...release[master]: Remove --list-bundled option, pointless

2018-01-12 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404052 )

Change subject: Remove --list-bundled option, pointless
..

Remove --list-bundled option, pointless

Made sense before we put them as submodules

Change-Id: I802525a497af9e599a34637fff55d0883116dde3
---
M make-release/makerelease.py
1 file changed, 0 insertions(+), 19 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release 
refs/changes/52/404052/1

diff --git a/make-release/makerelease.py b/make-release/makerelease.py
index 13da5c7..a6e3b80 100755
--- a/make-release/makerelease.py
+++ b/make-release/makerelease.py
@@ -82,11 +82,6 @@
 help='path to tar, we are expecting a GNU tar. (defaults to tar)'
 )
 parser.add_argument(
-'--list-bundled', dest='list_bundled',
-action='store_true',
-help='List all bundled extensions for the given version and quit'
-)
-parser.add_argument(
 '--patch-dir', dest='patch_dir', default=None,
 help='Where to source patch files from'
 )
@@ -340,24 +335,10 @@
 base.remove(repo)
 return sorted(extensions + list(base))
 
-def print_bundled(self, extensions):
-"""
-Print all bundled extensions and skins
-
-:param extensions: Extensions that are already being included
-:return: exit code
-"""
-for repo in self.get_extensions_for_version(self.version, extensions):
-print(repo)
-return 0
-
 def main(self):
 """return value should be usable as an exit code"""
 
 extensions = []
-
-if self.options.list_bundled:
-return self.print_bundled(extensions)
 
 logging.info("Doing release for %s", self.version.raw)
 

-- 
To view, visit https://gerrit.wikimedia.org/r/404052
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I802525a497af9e599a34637fff55d0883116dde3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad 
Gerrit-Reviewer: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...release[master]: Remove pointless have_i18n variable, add some missing docstr...

2018-01-12 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404050 )

Change subject: Remove pointless have_i18n variable, add some missing docstrings
..

Remove pointless have_i18n variable, add some missing docstrings

Change-Id: I347891c3323f80a6ea19f63778fa733beb62322a
---
M make-release/makerelease.py
1 file changed, 8 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release 
refs/changes/50/404050/1

diff --git a/make-release/makerelease.py b/make-release/makerelease.py
index 0186724..13da5c7 100755
--- a/make-release/makerelease.py
+++ b/make-release/makerelease.py
@@ -405,6 +405,7 @@
 return 0
 
 def ask(self, question):
+"""What does the user want?"""
 if self.options.yes:
 return True
 
@@ -422,12 +423,14 @@
 return result
 
 def export(self, git_ref, export_dir, patches=None):
+"""Clone core and possibly apply some patches"""
 if patches:
 git_ref = self.version.branch
 get_git(export_dir, git_ref)
 maybe_apply_patches(export_dir, patches)
 
 def make_patch(self, dest_dir, patch_file_name, dir1, dir2, patch_type):
+"""Make a patch file, given two directories"""
 patch_file = open(os.path.join(dest_dir, patch_file_name), 'w')
 args = ['diff', '-Nruw']
 if patch_type == 'i18n':
@@ -458,6 +461,7 @@
 return diff_status == 1
 
 def make_tar(self, package, input_dir, build_dir, add_args=None):
+"""Tar up a directory"""
 tar = self.options.tar_command
 
 # Generate the .tar.gz file
@@ -483,7 +487,7 @@
 return filename
 
 def do_release(self, version, extensions=None):
-
+"""Do all the nasty work of building a release"""
 build_dir = self.options.buildroot
 patch_dir = self.options.patch_dir
 
@@ -543,7 +547,6 @@
 )
 
 # Patch
-have_i18n = False
 if not self.options.no_previous and prev_version is not None:
 prev_dir = 'mediawiki-' + prev_version
 prev_mw_version = MwVersion(prev_version)
@@ -562,7 +565,8 @@
 build_dir, i18n_patch, prev_dir, package, 'i18n')):
 out_files.append(i18n_patch)
 logging.info('%s written', i18n_patch)
-have_i18n = True
+else:
+i18n_patch = None
 
 # Sign
 for file_name in out_files:
@@ -597,7 +601,7 @@
 print()
 
 if prev_version is not None:
-if have_i18n:
+if i18n_patch:
 print("Patch to previous version (" + prev_version +
   "), without interface text:")
 print(server + package + '.patch.gz')

-- 
To view, visit https://gerrit.wikimedia.org/r/404050
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I347891c3323f80a6ea19f63778fa733beb62322a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad 
Gerrit-Reviewer: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...release[master]: makerelease: Fix up return on all code paths, pylint complains

2018-01-12 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/404044 )

Change subject: makerelease: Fix up return on all code paths, pylint complains
..

makerelease: Fix up return on all code paths, pylint complains

Change-Id: I65d743441ee29a4fc05347c9ba3d1092fb0b5eff
---
M make-release/makerelease.py
1 file changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release 
refs/changes/44/404044/1

diff --git a/make-release/makerelease.py b/make-release/makerelease.py
index 3e09433..0186724 100755
--- a/make-release/makerelease.py
+++ b/make-release/makerelease.py
@@ -408,15 +408,18 @@
 if self.options.yes:
 return True
 
+result = False
 while True:
 print(question + ' [y/n] ')
 response = sys.stdin.readline()
 if response:
 if response[0].lower() == 'y':
-return True
+result = True
+break
 elif response[0].lower() == 'n':
-return False
+break
 print('Please type "y" for yes or "n" for no')
+return result
 
 def export(self, git_ref, export_dir, patches=None):
 if patches:

-- 
To view, visit https://gerrit.wikimedia.org/r/404044
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I65d743441ee29a4fc05347c9ba3d1092fb0b5eff
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad 
Gerrit-Reviewer: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...release[master]: releases: make patch_dir configurable (and only configurable)

2018-01-10 Thread Chad (Code Review)
Hello Reedy,

I'd like you to do a code review.  Please visit

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

to review the following change.


Change subject: releases: make patch_dir configurable (and only configurable)
..

releases: make patch_dir configurable (and only configurable)

Change-Id: I4012ae5f6379a88d407d1cf05a6401ec1198047b
---
M make-release/.gitignore
M make-release/makerelease.py
2 files changed, 13 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release 
refs/changes/63/403563/1

diff --git a/make-release/.gitignore b/make-release/.gitignore
index b08d6de..41730ff 100644
--- a/make-release/.gitignore
+++ b/make-release/.gitignore
@@ -1,3 +1,2 @@
 *.gz
 /build/
-/patches/
diff --git a/make-release/makerelease.py b/make-release/makerelease.py
index 173a8b3..e822d19 100755
--- a/make-release/makerelease.py
+++ b/make-release/makerelease.py
@@ -86,6 +86,10 @@
 action='store_true',
 help='List all bundled extensions for the given version and quit'
 )
+parser.add_argument(
+'--patch-dir', dest='patch_dir', default=None,
+help='Where to source patch files from'
+)
 
 return parser.parse_args()
 
@@ -476,6 +480,7 @@
 def do_release(self, version, extensions=None):
 
 root_dir = self.options.buildroot
+patch_dir = self.options.patch_dir
 
 # variables related to the version
 branch = version.branch
@@ -491,7 +496,6 @@
 os.mkdir(root_dir)
 
 build_dir = root_dir + '/build'
-patch_dir = root_dir + '/patches'
 
 if not os.path.exists(build_dir):
 logging.debug('Creating build dir: %s', build_dir)
@@ -507,15 +511,17 @@
 
 os.chdir(os.path.join(build_dir, package))
 subprocess.check_output(['composer', 'update', '--no-dev'])
-maybe_apply_patches(
-os.path.join(package, 'vendor'),
-get_patches_for_repo(patch_dir, 'vendor', version.branch))
+if patch_dir:
+maybe_apply_patches(
+os.path.join(package, 'vendor'),
+get_patches_for_repo(patch_dir, 'vendor', version.branch))
 
 ext_exclude = []
 for ext in self.get_extensions_for_version(version, extensions):
-maybe_apply_patches(
-os.path.join(package, ext),
-get_patches_for_repo(patch_dir, ext, version.branch))
+if patch_dir:
+maybe_apply_patches(
+os.path.join(package, ext),
+get_patches_for_repo(patch_dir, ext, version.branch))
 ext_exclude.append("--exclude")
 ext_exclude.append(ext)
 

-- 
To view, visit https://gerrit.wikimedia.org/r/403563
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4012ae5f6379a88d407d1cf05a6401ec1198047b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad 
Gerrit-Reviewer: Reedy 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...release[master]: release: Remove upload tar, dubiously useful

2018-01-10 Thread Chad (Code Review)
Hello Reedy,

I'd like you to do a code review.  Please visit

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

to review the following change.


Change subject: release: Remove upload tar, dubiously useful
..

release: Remove upload tar, dubiously useful

Change-Id: If023010092751e5c3058805dee706d3aee1127b6
---
M make-release/.gitignore
M make-release/makerelease.py
2 files changed, 0 insertions(+), 18 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release 
refs/changes/61/403561/1

diff --git a/make-release/.gitignore b/make-release/.gitignore
index da8f0f8..b08d6de 100644
--- a/make-release/.gitignore
+++ b/make-release/.gitignore
@@ -1,4 +1,3 @@
 *.gz
-/uploads/
 /build/
 /patches/
diff --git a/make-release/makerelease.py b/make-release/makerelease.py
index 1403a72..e48d5e8 100755
--- a/make-release/makerelease.py
+++ b/make-release/makerelease.py
@@ -481,15 +481,11 @@
 os.mkdir(root_dir)
 
 build_dir = root_dir + '/build'
-upload_dir = root_dir + '/uploads'
 patch_dir = root_dir + '/patches'
 
 if not os.path.exists(build_dir):
 logging.debug('Creating build dir: %s', build_dir)
 os.mkdir(build_dir)
-if not os.path.exists(upload_dir):
-logging.debug('Creating uploads dir: %s', upload_dir)
-os.mkdir(upload_dir)
 
 os.chdir(build_dir)
 
@@ -552,7 +548,6 @@
 have_i18n = True
 
 # Sign
-upload_files = []
 for file_name in out_files:
 if self.options.sign:
 try:
@@ -566,18 +561,6 @@
 if proc.wait() != 0:
 logging.error("gpg failed, exiting")
 sys.exit(1)
-upload_files.append(file_name + '.sig')
-upload_files.append(file_name)
-
-# Generate upload tarball
-tar = self.options.tar_command
-args = [tar, '-C', build_dir,
-'-cf', upload_dir + '/upload-' + version.raw + '.tar']
-args.extend(upload_files)
-proc = subprocess.Popen(args)
-if proc.wait() != 0:
-logging.error("Failed to generate upload.tar")
-return 1
 
 # Write email template
 print()

-- 
To view, visit https://gerrit.wikimedia.org/r/403561
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If023010092751e5c3058805dee706d3aee1127b6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad 
Gerrit-Reviewer: Reedy 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...release[master]: releases: Unify root_dir/build_dir

2018-01-10 Thread Chad (Code Review)
Hello Reedy,

I'd like you to do a code review.  Please visit

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

to review the following change.


Change subject: releases: Unify root_dir/build_dir
..

releases: Unify root_dir/build_dir

Since we don't put ./patches or ./upload into the build directory
anymore, the required ./build subdirectory is kind of silly. Only
do that if we're operating in the same directory as the actual
script cuz that would get ugly/messy

Change-Id: I372a16c9a95eba589fbc21dffbcb7c5362cc
---
M make-release/makerelease.py
1 file changed, 8 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release 
refs/changes/64/403564/1

diff --git a/make-release/makerelease.py b/make-release/makerelease.py
index e822d19..262f524 100755
--- a/make-release/makerelease.py
+++ b/make-release/makerelease.py
@@ -104,6 +104,9 @@
 :param branch: branch we care about patching
 :return: all patches that are appropriate
 """
+# Sometimes patch_dir isn't given!
+if patch_dir is None:
+return []
 patch_path_pattern = os.path.join(patch_dir, branch, repo, '*.patch')
 return sorted(glob.glob(patch_path_pattern))
 
@@ -479,7 +482,7 @@
 
 def do_release(self, version, extensions=None):
 
-root_dir = self.options.buildroot
+build_dir = self.options.buildroot
 patch_dir = self.options.patch_dir
 
 # variables related to the version
@@ -488,14 +491,10 @@
 prev_version = version.prev_version
 major_ver = version.major
 
-if root_dir is None:
-root_dir = os.getcwd()
-
-if not os.path.exists(root_dir):
-logging.debug('Creating %s', root_dir)
-os.mkdir(root_dir)
-
-build_dir = root_dir + '/build'
+# If we're operating in the same repo as this script, kindly make it
+# in a subdirectory to avoid polluting things
+if build_dir == os.path.dirname(os.path.abspath(__file__)):
+build_dir = os.path.join(build_dir, 'build')
 
 if not os.path.exists(build_dir):
 logging.debug('Creating build dir: %s', build_dir)

-- 
To view, visit https://gerrit.wikimedia.org/r/403564
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I372a16c9a95eba589fbc21dffbcb7c5362cc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad 
Gerrit-Reviewer: Reedy 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...release[master]: release: patchfile refactoring

2018-01-10 Thread Chad (Code Review)
Hello Reedy,

I'd like you to do a code review.  Please visit

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

to review the following change.


Change subject: release: patchfile refactoring
..

release: patchfile refactoring

Adopt the standard format we use in production:
  /path/to/patches/{BRANCH}/{REPO}/*.patch

Instead of weird:
  /path/to/patches/{REPO}/*-{BRANCH}-*.patch

This will make it easier for us to share patches between production
and release branches easier for nightly builds. While we're here
move these two functions out of the release class: they don't need
the statefulness and maybe oneday I could write unit tests

Change-Id: I076ed397339cae8fafb6792419d5bf7db183a149
---
M make-release/makerelease.py
1 file changed, 38 insertions(+), 28 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release 
refs/changes/62/403562/1

diff --git a/make-release/makerelease.py b/make-release/makerelease.py
index e48d5e8..173a8b3 100755
--- a/make-release/makerelease.py
+++ b/make-release/makerelease.py
@@ -90,6 +90,37 @@
 return parser.parse_args()
 
 
+def get_patches_for_repo(patch_dir, repo, branch):
+"""
+Given a repository, a branch and a directory to find patches in,
+return all the patches that apply to our repository.
+
+:param patch_dir: where patches are to be found
+:param repo: repository to care about
+:param branch: branch we care about patching
+:return: all patches that are appropriate
+"""
+patch_path_pattern = os.path.join(patch_dir, branch, repo, '*.patch')
+return sorted(glob.glob(patch_path_pattern))
+
+
+def maybe_apply_patches(input_dir, patch_files=None):
+"""If given some patch files, attempt to apply them to given directory"""
+if not patch_files:
+return
+old_dir = os.getcwd()
+os.chdir(input_dir)
+for patch_file in patch_files:
+with open(patch_file) as patch_in:
+patch_proc = subprocess.Popen(['git', 'am', '--3way'],
+  stdin=patch_in)
+status = patch_proc.wait()
+if status != 0:
+raise RuntimeError('Patch failed; git output: %s' % status)
+logging.info("Finished applying patch %s", patch_file)
+os.chdir(old_dir)
+
+
 class MwVersion(object):
 """Abstract out a MediaWiki version"""
 
@@ -109,6 +140,7 @@
 
 @classmethod
 def new_snapshot(cls, branch='master'):
+"""Create a new MwVersion for a snapshot"""
 return cls('snapshot-{}-{}'.format(
 branch, time.strftime('%Y%m%d', time.gmtime(
 
@@ -267,11 +299,6 @@
 base.remove(repo)
 return sorted(extensions + list(base))
 
-def get_patches_for_repo(self, repo, patch_dir):
-patch_file_pattern = '*-%s.patch' % self.version.branch
-return sorted(
-glob.glob(os.path.join(patch_dir, repo, patch_file_pattern)))
-
 def print_bundled(self, extensions):
 """
 Print all bundled extensions and skins
@@ -389,7 +416,7 @@
 if patches:
 git_ref = self.version.branch
 self.get_git('core', os.path.join(export_dir, module), git_ref)
-self.maybe_apply_patches(export_dir, patches)
+maybe_apply_patches(export_dir, patches)
 
 def make_patch(self, dest_dir, patch_file_name, dir1, dir2, patch_type):
 patch_file = open(dest_dir + "/" + patch_file_name, 'w')
@@ -420,23 +447,6 @@
 patch_file.close()
 logging.info('Done with making patch')
 return diff_status == 1
-
-def maybe_apply_patches(self, input_dir, patch_files=None):
-if not patch_files:
-return
-old_dir = os.getcwd()
-os.chdir(input_dir)
-for patch_file in patch_files:
-with open(patch_file) as patch_in:
-patch_proc = subprocess.Popen(['git', 'am', '--3way'],
-  stdin=patch_in)
-status = patch_proc.wait()
-if status != 0:
-logging.error("Patch failed, exiting")
-logging.error("git: %s", status)
-sys.exit(1)
-logging.info("Finished applying patch %s", patch_file)
-os.chdir(old_dir)
 
 def make_tar(self, package, input_dir, build_dir, add_args=None):
 tar = self.options.tar_command
@@ -493,19 +503,19 @@
 
 # Export the target
 self.export(tag, package, build_dir,
-self.get_patches_for_repo('core', patch_dir))
+get_patches_for_repo(patch_dir, 'core', version.branch))
 
 os.chdir(os.path.join(build_dir, package))
 subprocess.check_output(['composer', 'update', '--no-dev'])
-self.maybe_apply_patches(
+maybe_apply_patches(
 os.path.join(package, 'vendor'),
-

[MediaWiki-commits] [Gerrit] mediawiki...release[master]: releases: use os.path.join() in a few places

2018-01-10 Thread Chad (Code Review)
Hello Reedy,

I'd like you to do a code review.  Please visit

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

to review the following change.


Change subject: releases: use os.path.join() in a few places
..

releases: use os.path.join() in a few places

Change-Id: I62da850f7a84184b580b43b41192a0944526e9ec
---
M make-release/makerelease.py
1 file changed, 6 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release 
refs/changes/65/403565/1

diff --git a/make-release/makerelease.py b/make-release/makerelease.py
index 262f524..9b77938 100755
--- a/make-release/makerelease.py
+++ b/make-release/makerelease.py
@@ -426,12 +426,12 @@
 maybe_apply_patches(export_dir, patches)
 
 def make_patch(self, dest_dir, patch_file_name, dir1, dir2, patch_type):
-patch_file = open(dest_dir + "/" + patch_file_name, 'w')
+patch_file = open(os.path.join(dest_dir, patch_file_name), 'w')
 args = ['diff', '-Nruw']
 if patch_type == 'i18n':
 logging.debug("Generating i18n patch file...")
-dir1 += '/languages/messages'
-dir2 += '/languages/messages'
+dir1 = os.path.join(dir1, 'languages', 'messages')
+dir1 = os.path.join(dir2, 'languages', 'messages')
 else:
 logging.debug("Generating normal patch file...")
 for excl in self.config['diff']['ignore']:
@@ -460,7 +460,7 @@
 
 # Generate the .tar.gz file
 filename = package + '.tar.gz'
-out_file = open(build_dir + '/' + filename, "w")
+out_file = open(os.path.join(build_dir, filename), "w")
 args = [tar, '--format=gnu', '--exclude-vcs', '-C', build_dir]
 if self.config.get('tar', {}).get('ignore', []):
 for patt in self.config['tar']['ignore']:
@@ -554,7 +554,7 @@
 build_dir, package + '.patch.gz', prev_dir, package, 'normal')
 out_files.append(package + '.patch.gz')
 logging.debug('%s.patch.gz written', package)
-if os.path.exists(package + '/languages/messages'):
+if os.path.exists(os.path.join(package, 'languages', 'messages')):
 i18n_patch = 'mediawiki-i18n-' + version.raw + '.patch.gz'
 if (self.make_patch(
 build_dir, i18n_patch, prev_dir, package, 'i18n')):
@@ -567,7 +567,7 @@
 if self.options.sign:
 try:
 proc = subprocess.Popen([
-'gpg', '--detach-sign', build_dir + '/' + file_name])
+'gpg', '--detach-sign', os.path.join(build_dir, 
file_name)])
 except OSError as ose:
 logging.error("gpg failed, does it exist? Skip with " +
   "--dont-sign.")

-- 
To view, visit https://gerrit.wikimedia.org/r/403565
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I62da850f7a84184b580b43b41192a0944526e9ec
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad 
Gerrit-Reviewer: Reedy 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...release[master]: release: move get_git() to function, fix up export_dir

2018-01-10 Thread Chad (Code Review)
Hello Reedy,

I'd like you to do a code review.  Please visit

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

to review the following change.


Change subject: release: move get_git() to function, fix up export_dir
..

release: move get_git() to function, fix up export_dir

Change-Id: If2465d382e291c45ba32b1ced771ce753947cee8
---
M make-release/makerelease.py
1 file changed, 37 insertions(+), 38 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release 
refs/changes/66/403566/1

diff --git a/make-release/makerelease.py b/make-release/makerelease.py
index 9b77938..3e09433 100755
--- a/make-release/makerelease.py
+++ b/make-release/makerelease.py
@@ -128,6 +128,40 @@
 os.chdir(old_dir)
 
 
+def get_git(target, git_ref):
+"""Clone core"""
+old_dir = os.getcwd()
+
+if os.path.exists(target):
+logging.info('Updating core in %s...', target)
+proc = subprocess.Popen(
+['sh', '-c', 'cd ' + target + '; git fetch -q --all'])
+else:
+logging.info('Cloning core into %s...', target)
+repo = 'https://gerrit.wikimedia.org/r/p/mediawiki/core'
+proc = subprocess.Popen(['git', 'clone', '--recursive', repo, target])
+
+if proc.wait() != 0:
+raise RuntimeError('git clone failed')
+
+os.chdir(target)
+
+logging.debug("Checking out %s in %s...", git_ref, target)
+proc = subprocess.Popen(['git', 'checkout', git_ref])
+
+if proc.wait() != 0:
+raise RuntimeError('git checkout failed')
+
+logging.debug("Checking out submodules in %s...", target)
+proc = subprocess.Popen(['git', 'submodule', 'update', '--init',
+ '--recursive'])
+
+if proc.wait() != 0:
+raise RuntimeError('git submodule update failed, exiting')
+
+os.chdir(old_dir)
+
+
 class MwVersion(object):
 """Abstract out a MediaWiki version"""
 
@@ -384,45 +418,10 @@
 return False
 print('Please type "y" for yes or "n" for no')
 
-def get_git(self, repo, target, git_ref):
-old_dir = os.getcwd()
-
-if os.path.exists(target):
-logging.info("Updating %s in %s...", repo, target)
-proc = subprocess.Popen(
-['sh', '-c', 'cd ' + target + '; git fetch -q --all'])
-else:
-logging.info("Cloning %s into %s...", repo, target)
-repo = 'https://gerrit.wikimedia.org/r/p/mediawiki/' + repo
-proc = subprocess.Popen(['git', 'clone', '--recursive', repo, 
target])
-
-if proc.wait() != 0:
-logging.error("git clone failed, exiting")
-sys.exit(1)
-
-os.chdir(target)
-
-logging.debug("Checking out %s in %s...", git_ref, target)
-proc = subprocess.Popen(['git', 'checkout', git_ref])
-
-if proc.wait() != 0:
-logging.error("git checkout failed, exiting")
-sys.exit(1)
-
-logging.debug("Checking out submodules in %s...", target)
-proc = subprocess.Popen(['git', 'submodule', 'update', '--init',
- '--recursive'])
-
-if proc.wait() != 0:
-logging.error("git submodule update failed, exiting")
-sys.exit(1)
-
-os.chdir(old_dir)
-
-def export(self, git_ref, module, export_dir, patches=None):
+def export(self, git_ref, export_dir, patches=None):
 if patches:
 git_ref = self.version.branch
-self.get_git('core', os.path.join(export_dir, module), git_ref)
+get_git(export_dir, git_ref)
 maybe_apply_patches(export_dir, patches)
 
 def make_patch(self, dest_dir, patch_file_name, dir1, dir2, patch_type):
@@ -505,7 +504,7 @@
 package = 'mediawiki-' + version.raw
 
 # Export the target
-self.export(tag, package, build_dir,
+self.export(tag, os.path.join(build_dir, package),
 get_patches_for_repo(patch_dir, 'core', version.branch))
 
 os.chdir(os.path.join(build_dir, package))

-- 
To view, visit https://gerrit.wikimedia.org/r/403566
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If2465d382e291c45ba32b1ced771ce753947cee8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad 
Gerrit-Reviewer: Reedy 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...release[master]: grumble grumble submodules

2018-01-09 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/403220 )

Change subject: grumble grumble submodules
..

grumble grumble submodules

Change-Id: I39d2a9196722bf468c574e388a5321a25e923616
---
M make-release/branch.py
1 file changed, 22 insertions(+), 21 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release 
refs/changes/20/403220/1

diff --git a/make-release/branch.py b/make-release/branch.py
index 8aff26f..c27a33b 100755
--- a/make-release/branch.py
+++ b/make-release/branch.py
@@ -18,6 +18,7 @@
 
 from pygerrit.rest import GerritRestAPI
 
+GIT_BIN = '/usr/bin/git'
 with open("make-release.yaml") as conf:
 CONFIG = yaml.safe_load(conf)
 
@@ -29,27 +30,29 @@
 auth=HTTPDigestAuth(CONFIG['username'], CONFIG['password']))
 
 
-def get_branchpoint(branch, repository, default):
-try:
-return CONFIG['manual_branch_points'][branch][repository]
-except KeyError:
-return default
-
-
 def create_branch(repository, branch, revision):
 """Create a branch for a given repo."""
-# If we've got a sub-submodule we care about, branch it first so we can
-# do some magic stuff
+try:
+revision = CONFIG['manual_branch_points'][branch][repository]
+except KeyError:
+pass
+
+# If we're dealing with sub-submodules, branch those and then update
+# our repo as appropriate
 try:
 subrepo = CONFIG['sub_submodules'][repository]
 create_branch(subrepo, branch, revision)
+with clone_then_commit('repository', branch) as repodir:
+subprocess.check_call([GIT_BIN, 'submodule', 'update' '--init', 
subrepo])
+os.chdir(os.path.join(repodir, subrepo))
+subprocess.check_call([GIT_BIN, 'checkout', branch])
+os.chdir(repodir)
+subprocess.check_call([GIT_BIN, 'add', subrepo])
 except KeyError:
 # This is the normal case, actually
 pass
 
 try:
-revision = get_branchpoint(branch, repository, revision)
-
 print('Branching {} to {} from {}'.format(repository, branch, 
revision))
 _get_client().put(
 '/projects/%s/branches/%s' % (
@@ -84,32 +87,30 @@
 
 
 @contextmanager
-def clone(repository):
+def clone_then_commit(repository, branch):
+"""Clone a repository into a temporary directory"""
 url = CONFIG['clone_base'] + '/' + repository
 temp = tempfile.mkdtemp()
-subprocess.check_call(['/usr/bin/git', 'clone', url, temp])
+subprocess.check_call([GIT_BIN, 'clone', '-b', branch, url, temp])
 cwd = os.getcwd()
 os.chdir(temp)
 yield temp
+subprocess.check_call(
+[GIT_BIN, 'commit', '-a', '-m', 'Creating new %s branch' % branch])
 os.chdir(cwd)
-shutil.rmtree(temp)
 
 
 def do_core_work(branch, bundle, version):
 """Add submodules, bump $wgVersion, etc"""
-cwd = os.getcwd()
-with clone('core'):
+with clone_then_commit('core', branch):
 for submodule in bundle:
 url = CONFIG['clone_base'] + '/' + submodule
-subprocess.check_call(['/usr/bin/git', 'submodule', 'add',
+subprocess.check_call([GIT_BIN, 'submodule', 'add',
'--force', '--branch', branch, url,
submodule])
 # something with defaultsettings
-subprocess.check_call(['/usr/bin/git', 'commit', '-a', '-m',
-   'Creating new %s branch' % branch])
-subprocess.check_call(['/usr/bin/git', 'push', 'origin',
+subprocess.check_call([GIT_BIN, 'push', 'origin',
'HEAD:refs/for/%s' % branch])
-os.chdir(cwd)
 
 
 def parse_args():

-- 
To view, visit https://gerrit.wikimedia.org/r/403220
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I39d2a9196722bf468c574e388a5321a25e923616
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...release[master]: branch.py: Cleanup/prep for sub-submodule support

2018-01-09 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/403219 )

Change subject: branch.py: Cleanup/prep for sub-submodule support
..

branch.py: Cleanup/prep for sub-submodule support

Change-Id: Ib75335404a5a2d66aaf7112738ac1a9c38fa5413
---
M make-release/branch.py
M make-release/make-release.yaml
2 files changed, 33 insertions(+), 16 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release 
refs/changes/19/403219/1

diff --git a/make-release/branch.py b/make-release/branch.py
index 3a6e9b9..8aff26f 100755
--- a/make-release/branch.py
+++ b/make-release/branch.py
@@ -3,8 +3,10 @@
 """Stuff about making branches and so forth."""
 
 import argparse
+from contextlib import contextmanager
 import logging
 import os
+import shutil
 import subprocess
 import sys
 import tempfile
@@ -27,13 +29,26 @@
 auth=HTTPDigestAuth(CONFIG['username'], CONFIG['password']))
 
 
+def get_branchpoint(branch, repository, default):
+try:
+return CONFIG['manual_branch_points'][branch][repository]
+except KeyError:
+return default
+
+
 def create_branch(repository, branch, revision):
 """Create a branch for a given repo."""
+# If we've got a sub-submodule we care about, branch it first so we can
+# do some magic stuff
 try:
-try:
-revision = CONFIG['manual_branch_points'][branch][repository]
-except KeyError:
-pass
+subrepo = CONFIG['sub_submodules'][repository]
+create_branch(subrepo, branch, revision)
+except KeyError:
+# This is the normal case, actually
+pass
+
+try:
+revision = get_branchpoint(branch, repository, revision)
 
 print('Branching {} to {} from {}'.format(repository, branch, 
revision))
 _get_client().put(
@@ -49,13 +64,6 @@
 print('Already branched!')
 else:
 raise
-
-# If we've got a sub-submodule we care about, branch it too
-try:
-subrepo = CONFIG['sub_submodules'][repo]
-create_branch(subrepo, branch, revision)
-except KeyError:
-pass
 
 
 def get_bundle(bundle):
@@ -75,13 +83,22 @@
 return []
 
 
+@contextmanager
+def clone(repository):
+url = CONFIG['clone_base'] + '/' + repository
+temp = tempfile.mkdtemp()
+subprocess.check_call(['/usr/bin/git', 'clone', url, temp])
+cwd = os.getcwd()
+os.chdir(temp)
+yield temp
+os.chdir(cwd)
+shutil.rmtree(temp)
+
+
 def do_core_work(branch, bundle, version):
 """Add submodules, bump $wgVersion, etc"""
 cwd = os.getcwd()
-with tempfile.TemporaryDirectory() as temp:
-subprocess.check_call(['/usr/bin/git', 'clone', '-b', branch,
-   CONFIG['clone_base'] + '/core', temp])
-os.chdir(temp)
+with clone('core'):
 for submodule in bundle:
 url = CONFIG['clone_base'] + '/' + submodule
 subprocess.check_call(['/usr/bin/git', 'submodule', 'add',
diff --git a/make-release/make-release.yaml b/make-release/make-release.yaml
index c5a2551..8af0605 100644
--- a/make-release/make-release.yaml
+++ b/make-release/make-release.yaml
@@ -31,7 +31,7 @@
 REL1_30:
 core: 0cd28e19cb0f9385a2a1cc11a4d8c9c21ff0b830
 sub_submodules:
-- extensions/VisualEditor: lib/ve
+extensions/VisualEditor: lib/ve
 diff:
 ignore:
 - "*~"

-- 
To view, visit https://gerrit.wikimedia.org/r/403219
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib75335404a5a2d66aaf7112738ac1a9c38fa5413
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] operations/puppet[production]: deployment-prep: Commit hiera config for etcd

2018-01-09 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/403205 )

Change subject: deployment-prep: Commit hiera config for etcd
..

deployment-prep: Commit hiera config for etcd

Change-Id: I1f6edcbb395f16980d28e8752c582c4bf34c7ff5
---
A files/ssl/etcd.deployment-prep.eqiad.wmflabs.crt
A hieradata/labs/deployment-prep/host/deployment-etcd-01.yaml
2 files changed, 38 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/05/403205/1

diff --git a/files/ssl/etcd.deployment-prep.eqiad.wmflabs.crt 
b/files/ssl/etcd.deployment-prep.eqiad.wmflabs.crt
new file mode 100644
index 000..d558ade
--- /dev/null
+++ b/files/ssl/etcd.deployment-prep.eqiad.wmflabs.crt
@@ -0,0 +1,28 @@
+-BEGIN CERTIFICATE-
+MIIEvDCCAqSgAwIBAgIBWTANBgkqhkiG9w0BAQsFADBNMUswSQYDVQQDDEJQdXBw
+ZXQgQ0E6IGRlcGxveW1lbnQtcHVwcGV0bWFzdGVyMDIuZGVwbG95bWVudC1wcmVw
+LmVxaWFkLndtZmxhYnMwHhcNMTcwNDIwMTUyMDQ0WhcNMjIwNDIwMTUyMDQ0WjCB
+jDErMCkGA1UEAwwiZXRjZC5kZXBsb3ltZW50LXByZXAuZXFpYWQud21mbGFiczEj
+MCEGA1UECgwaV2lraW1lZGlhIEZvdW5kYXRpb24sIEluYy4xCzAJBgNVBAYTAlVT
+MRMwEQYDVQQIDApDYWxpZm9ybmlhMRYwFAYDVQQHDA1TYW4gRnJhbmNpc2NvMFkw
+EwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAESMai98OOrwoib/ixxsSLIokPN3WumQ4g
+l2z6GGhLDI0+IR/uK4naZQLGOLQy0p2EVdhnZlTxx+WYaxmCIxpZ7aOCATAwggEs
+MDUGCWCGSAGG+EIBDQQoUHVwcGV0IFJ1YnkvT3BlblNTTCBJbnRlcm5hbCBDZXJ0
+aWZpY2F0ZTBzBgNVHREEbDBqgjBkZXBsb3ltZW50LWV0Y2QtMDEuZGVwbG95bWVu
+dC1wcmVwLmVxaWFkLndtZmxhYnOCEmRlcGxveW1lbnQtZXRjZC0wMYIiZXRjZC5k
+ZXBsb3ltZW50LXByZXAuZXFpYWQud21mbGFiczAOBgNVHQ8BAf8EBAMCBaAwIAYD
+VR0lAQH/BBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAwGA1UdEwEB/wQCMAAwHQYD
+VR0OBBYEFJjfXWXKPSufFNFaxjl7u/lc0Wj0MB8GA1UdIwQYMBaAFMKJmynijh7E
+eMekzr7qlVTsJpIGMA0GCSqGSIb3DQEBCwUAA4ICAQBFwUzJigomN+sdUtTSfB6K
+Q4Lj1d+igmmgJgaBQpFiYjU/HflnB8/DN4qf/CaV4qkQjsVLS8C+crewyZKBbujK
+fzGyJbNafL5U0dmDWqeR8NXWOMsrJA05xNEoirdHlRp9sP9j44AjP6qH10NZNQ/r
+0OfBcFtb8MF8cX+wGsUCBZPgRQWLFA8TInvkgtzDudGym3QVNC3ydujyiDnwMg9e
+mkmRqsyHd/CudglIyK6GAcHNnieqdcZ/4yKaFNPmElbYK0czkucN0uXalbnMTuy3
+qkxYkRDOkYzItvsKgk24/EqYC3jtGXPf94sIpnsfOW8YKXJP2l2tsypQyZSHutPs
+ug8m4Do4pynGvTofElDj3PaMKi84gvFIr+6SFd6ddLzqrnOi8WmrGnwSt+o/bSTM
+SwbLvpQRqWiK0sw7d34w+F6CTeKc17mu3El1jUlolKkzZWB/lnECvFJnpdP3ixL/
+x2aV0jybf/OlyYRjW1Y7XwaXRcLv2FE4oAFomEyHGUTLBdVe3ZLhQfdAl2n4TtpW
+HrD9iuV825nxvh9rYlfjcrPBUYZhIBKGKRIGBc2w05X57wrA4vt72D7Wv5UbTMce
+if5WVI9Dqh0oQOvRrPrza05prTE25eGmNL1JBX7OfLwC2PsnNrxtKo9uwbCd+5Ea
+WkcNvzOLPtv2FgOFlZNadg==
+-END CERTIFICATE-
diff --git a/hieradata/labs/deployment-prep/host/deployment-etcd-01.yaml 
b/hieradata/labs/deployment-prep/host/deployment-etcd-01.yaml
new file mode 100644
index 000..7a1ce28
--- /dev/null
+++ b/hieradata/labs/deployment-prep/host/deployment-etcd-01.yaml
@@ -0,0 +1,10 @@
+profile::etcd::discovery: 
"deployment-etcd-01=http://deployment-etcd-01.deployment-prep.eqiad.wmflabs:2380;
+profile::etcd::use_client_certs: false
+profile::etcd::cluster_bootstrap: true
+profile::etcd::use_proxy: true
+profile::etcd::do_backup: false
+profile::etcd::allow_from: "$DOMAIN_NETWORKS"
+profile::etcd::tlsproxy::cert_name: "etcd.%{::domain}"
+profile::etcd::tlsproxy::acls: { /: ["root"], /conftool: ["root", "conftool"],}
+profile::etcd::tlsproxy::salt: "A9BwLWh0"
+sslcert::certificate::chain: false

-- 
To view, visit https://gerrit.wikimedia.org/r/403205
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1f6edcbb395f16980d28e8752c582c4bf34c7ff5
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...release[master]: branch.py: First half of sub-submodule support

2018-01-09 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/403173 )

Change subject: branch.py: First half of sub-submodule support
..

branch.py: First half of sub-submodule support

Change-Id: Ie6420a0f47722f380dc476daf164b7d98a0caed0
---
M make-release/branch.py
M make-release/make-release.yaml
2 files changed, 11 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release 
refs/changes/73/403173/1

diff --git a/make-release/branch.py b/make-release/branch.py
index f7051a0..3a6e9b9 100755
--- a/make-release/branch.py
+++ b/make-release/branch.py
@@ -50,6 +50,13 @@
 else:
 raise
 
+# If we've got a sub-submodule we care about, branch it too
+try:
+subrepo = CONFIG['sub_submodules'][repo]
+create_branch(subrepo, branch, revision)
+except KeyError:
+pass
+
 
 def get_bundle(bundle):
 """Return the list of all/some extensions, skins, and vendor."""
@@ -69,10 +76,11 @@
 
 
 def do_core_work(branch, bundle, version):
+"""Add submodules, bump $wgVersion, etc"""
 cwd = os.getcwd()
 with tempfile.TemporaryDirectory() as temp:
 subprocess.check_call(['/usr/bin/git', 'clone', '-b', branch,
-  CONFIG['clone_base'] + '/core', temp])
+   CONFIG['clone_base'] + '/core', temp])
 os.chdir(temp)
 for submodule in bundle:
 url = CONFIG['clone_base'] + '/' + submodule
diff --git a/make-release/make-release.yaml b/make-release/make-release.yaml
index 7b79a3e..c5a2551 100644
--- a/make-release/make-release.yaml
+++ b/make-release/make-release.yaml
@@ -30,6 +30,8 @@
 core: 0cd28e19cb0f9385a2a1cc11a4d8c9c21ff0b830
 REL1_30:
 core: 0cd28e19cb0f9385a2a1cc11a4d8c9c21ff0b830
+sub_submodules:
+- extensions/VisualEditor: lib/ve
 diff:
 ignore:
 - "*~"

-- 
To view, visit https://gerrit.wikimedia.org/r/403173
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie6420a0f47722f380dc476daf164b7d98a0caed0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...release[master]: branch.py: basically make-wmf-branch now

2018-01-09 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/403165 )

Change subject: branch.py: basically make-wmf-branch now
..

branch.py: basically make-wmf-branch now

The only thing it doesn't do is that weird submodule behavior

Change-Id: I400746aff96bce53e0b5ecde70e78c501de3e8c6
---
M make-release/branch.py
1 file changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release 
refs/changes/65/403165/1

diff --git a/make-release/branch.py b/make-release/branch.py
index b895ab9..f7051a0 100755
--- a/make-release/branch.py
+++ b/make-release/branch.py
@@ -79,7 +79,11 @@
 subprocess.check_call(['/usr/bin/git', 'submodule', 'add',
'--force', '--branch', branch, url,
submodule])
-
+# something with defaultsettings
+subprocess.check_call(['/usr/bin/git', 'commit', '-a', '-m',
+   'Creating new %s branch' % branch])
+subprocess.check_call(['/usr/bin/git', 'push', 'origin',
+   'HEAD:refs/for/%s' % branch])
 os.chdir(cwd)
 
 

-- 
To view, visit https://gerrit.wikimedia.org/r/403165
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I400746aff96bce53e0b5ecde70e78c501de3e8c6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...release[master]: branch.py: Simplify

2018-01-09 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/403162 )

Change subject: branch.py: Simplify
..

branch.py: Simplify

Also start work on the "add submodules and futz with DefaultSettings"
bit

See where I'm going here?

Change-Id: Ia1268e14f30b85b73a99dbe69b3a17c93ee07229
---
M make-release/branch.py
1 file changed, 45 insertions(+), 21 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release 
refs/changes/62/403162/1

diff --git a/make-release/branch.py b/make-release/branch.py
index 6e2bf3e..b895ab9 100755
--- a/make-release/branch.py
+++ b/make-release/branch.py
@@ -1,10 +1,13 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
 # vim:sw=4:ts=4:et:
 """Stuff about making branches and so forth."""
 
 import argparse
 import logging
+import os
+import subprocess
 import sys
+import tempfile
 
 from requests.auth import HTTPDigestAuth
 from requests.exceptions import HTTPError
@@ -32,6 +35,7 @@
 except KeyError:
 pass
 
+print('Branching {} to {} from {}'.format(repository, branch, 
revision))
 _get_client().put(
 '/projects/%s/branches/%s' % (
 repository.replace('/', '%2F'),
@@ -41,30 +45,42 @@
 except HTTPError as httpe:
 # Gerrit responds 409 for edit conflicts
 # means we already have a branch
-if httpe.response.status_code != 409:
+if httpe.response.status_code == 409:
+print('Already branched!')
+else:
 raise
 
 
-def branch_everything(branch, branch_point, bundle=None):
-"""Branch stuff."""
+def get_bundle(bundle):
+"""Return the list of all/some extensions, skins, and vendor."""
 if bundle == '*':
-repos_to_branch = get_star_bundle()
-
-for repo in repos_to_branch:
-print('Branching %s to %s from %s' % (
-repo, branch, branch_point))
-create_branch(repo, branch, branch_point)
+things_to_branch = []
+for stuff in ['skins', 'extensions']:
+projects = _get_client().get('/projects/?p=mediawiki/%s' % stuff)
+for proj in projects:
+if projects[proj]['state'] == 'ACTIVE':
+things_to_branch.append(proj)
+return things_to_branch
+else:
+try:
+return CONFIG['bundles'][bundle]
+except KeyError:
+return []
 
 
-def get_star_bundle():
-"""Return the list of all extensions, skins, and vendor."""
-things_to_branch = []
-for stuff in ['skins', 'extensions']:
-projects = _get_client().get('/projects/?p=mediawiki/%s' % stuff)
-for proj in projects:
-if projects[proj]['state'] == 'ACTIVE':
-things_to_branch.append(proj)
-return things_to_branch
+def do_core_work(branch, bundle, version):
+cwd = os.getcwd()
+with tempfile.TemporaryDirectory() as temp:
+subprocess.check_call(['/usr/bin/git', 'clone', '-b', branch,
+  CONFIG['clone_base'] + '/core', temp])
+os.chdir(temp)
+for submodule in bundle:
+url = CONFIG['clone_base'] + '/' + submodule
+subprocess.check_call(['/usr/bin/git', 'submodule', 'add',
+   '--force', '--branch', branch, url,
+   submodule])
+
+os.chdir(cwd)
 
 
 def parse_args():
@@ -82,6 +98,10 @@
 help='If we branch core or not')
 parser.add_argument('--bundle', dest='bundle', default=None,
 help='What bundle of extensions & skins to branch')
+parser.add_argument(
+'--core-version',
+dest='core_version',
+help='If set, core will be given submodules with the bundle, plus this 
version number')
 
 return parser.parse_args()
 
@@ -90,7 +110,11 @@
 OPTIONS = parse_args()
 logging.basicConfig(level=logging.INFO, stream=sys.stderr)
 
+if OPTIONS.bundle:
+for repo in get_bundle(OPTIONS.bundle):
+create_branch(repo, OPTIONS.branch, OPTIONS.branch_point)
+
 if OPTIONS.core:
 create_branch('core', OPTIONS.branch, OPTIONS.branch_point)
-if OPTIONS.bundle:
-branch_everything(OPTIONS.branch, OPTIONS.branch_point, OPTIONS.bundle)
+if OPTIONS.core_version:
+do_core_work(OPTIONS.branch, OPTIONS.bundle, OPTIONS.core_version)

-- 
To view, visit https://gerrit.wikimedia.org/r/403162
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia1268e14f30b85b73a99dbe69b3a17c93ee07229
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...release[master]: Fix branch.py

2018-01-09 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/403155 )

Change subject: Fix branch.py
..

Fix branch.py

- Support bundles other than base
- Protect core branching with a flag
- Require explicit "really branch everything" syntax
- Remove unused options (they'll be back)
- Make manual branch points actually work

Change-Id: I0e0cbfd99e0247d35ee3a3065bf3527313def059
---
M make-release/branch.py
1 file changed, 16 insertions(+), 19 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release 
refs/changes/55/403155/1

diff --git a/make-release/branch.py b/make-release/branch.py
index bc76e74..6e2bf3e 100755
--- a/make-release/branch.py
+++ b/make-release/branch.py
@@ -24,9 +24,14 @@
 auth=HTTPDigestAuth(CONFIG['username'], CONFIG['password']))
 
 
-def create_branch(repository, branch, revision='HEAD'):
+def create_branch(repository, branch, revision):
 """Create a branch for a given repo."""
 try:
+try:
+revision = CONFIG['manual_branch_points'][branch][repository]
+except KeyError:
+pass
+
 _get_client().put(
 '/projects/%s/branches/%s' % (
 repository.replace('/', '%2F'),
@@ -40,22 +45,12 @@
 raise
 
 
-def branch_core(branch, branch_point='HEAD'):
-"""Just branch core."""
-create_branch('core', branch, branch_point)
-
-
-def branch_everything(branch, branch_point='HEAD', bundle=None):
+def branch_everything(branch, branch_point, bundle=None):
 """Branch stuff."""
-if not bundle:
+if bundle == '*':
 repos_to_branch = get_star_bundle()
 
 for repo in repos_to_branch:
-try:
-branch_point = CONFIG['manual_branch_points'][branch][repo]
-except KeyError:
-pass
-
 print('Branching %s to %s from %s' % (
 repo, branch, branch_point))
 create_branch(repo, branch, branch_point)
@@ -83,10 +78,10 @@
 parser.add_argument('branch', nargs='?', help='Branch we want to make')
 parser.add_argument('--branchpoint', dest='branch_point', default='HEAD',
 help='Where to branch from')
-parser.add_argument('--submodules', dest='submodules', action='store_true',
-help='Add the newly branched repos as submodules?')
-parser.add_argument('--set-version', dest='set_version',
-help='Update $wgVersion?')
+parser.add_argument('--core', dest='core', action='store_true',
+help='If we branch core or not')
+parser.add_argument('--bundle', dest='bundle', default=None,
+help='What bundle of extensions & skins to branch')
 
 return parser.parse_args()
 
@@ -95,5 +90,7 @@
 OPTIONS = parse_args()
 logging.basicConfig(level=logging.INFO, stream=sys.stderr)
 
-branch_core(OPTIONS.branch, OPTIONS.branch_point)
-branch_everything(OPTIONS.branch, OPTIONS.branch_point)
+if OPTIONS.core:
+create_branch('core', OPTIONS.branch, OPTIONS.branch_point)
+if OPTIONS.bundle:
+branch_everything(OPTIONS.branch, OPTIONS.branch_point, OPTIONS.bundle)

-- 
To view, visit https://gerrit.wikimedia.org/r/403155
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0e0cbfd99e0247d35ee3a3065bf3527313def059
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...release[master]: releases: server path code duplication

2018-01-09 Thread Chad (Code Review)
Chad has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/403142 )

Change subject: releases: server path code duplication
..


releases: server path code duplication

Change-Id: I5b50c3913da702de612552b02e3684faee422480
---
M make-release/makerelease.py
1 file changed, 6 insertions(+), 6 deletions(-)

Approvals:
  Chad: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/make-release/makerelease.py b/make-release/makerelease.py
index 2d32637..1403a72 100755
--- a/make-release/makerelease.py
+++ b/make-release/makerelease.py
@@ -591,26 +591,26 @@
 print()
 print('*' * 70)
 
-server = 'https://releases.wikimedia.org/mediawiki/'
+server = 
'https://releases.wikimedia.org/mediawiki/{}/'.format(major_ver)
 print('Download:')
-print(server + major_ver + '/' + package + '.tar.gz')
+print(server + package + '.tar.gz')
 print()
 
 if prev_version is not None:
 if have_i18n:
 print("Patch to previous version (" + prev_version +
   "), without interface text:")
-print(server + major_ver + '/' + package + '.patch.gz')
+print(server + package + '.patch.gz')
 print("Interface text changes:")
-print(server + major_ver + '/' + i18n_patch)
+print(server + i18n_patch)
 else:
 print("Patch to previous version (" + prev_version + "):")
-print(server + major_ver + '/' + package + '.patch.gz')
+print(server + package + '.patch.gz')
 print()
 
 print('GPG signatures:')
 for file_name in out_files:
-print(server + major_ver + '/' + file_name + '.sig')
+print(server + file_name + '.sig')
 print()
 
 print('Public keys:')

-- 
To view, visit https://gerrit.wikimedia.org/r/403142
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I5b50c3913da702de612552b02e3684faee422480
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...release[master]: make-wmf-branch: Remove patching support

2018-01-09 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/403154 )

Change subject: make-wmf-branch: Remove patching support
..

make-wmf-branch: Remove patching support

Patching is a post-branching activity. Plus this feature
encourages poor master/release behaviors.

Change-Id: I50dfea77ce86cea4550e7e4fcce39e9cc95bfda1
---
M make-wmf-branch/MakeWmfBranch.php
M make-wmf-branch/default.conf
2 files changed, 1 insertion(+), 18 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release 
refs/changes/54/403154/1

diff --git a/make-wmf-branch/MakeWmfBranch.php 
b/make-wmf-branch/MakeWmfBranch.php
index f1b4f98..ee49c3b 100644
--- a/make-wmf-branch/MakeWmfBranch.php
+++ b/make-wmf-branch/MakeWmfBranch.php
@@ -3,7 +3,7 @@
 class MakeWmfBranch {
public $dryRun;
public $newVersion, $oldVersion, $buildDir;
-   public $specialExtensions, $branchedExtensions, $patches;
+   public $specialExtensions, $branchedExtensions;
public $repoPath;
public $noisy;
 
@@ -32,7 +32,6 @@
$this->specialExtensions = $branchLists['special_extensions'];
$this->alreadyBranched = array();
$this->noisy = $noisy;
-   $this->patches = $patches;
$this->repoPath = $repoPath;
$this->branchPrefix = $branchPrefix;
}
@@ -233,14 +232,6 @@
 
# Do intermediate commit
$this->runCmd( 'git', 'commit', '-a', '-q', '-m', "Creating new 
WMF {$this->newVersion} branch" );
-
-   # Apply patches
-   foreach ( $this->patches as $patch => $subpath ) {
-   // git fetch https://gerrit.wikimedia.org/mediawiki/core
-   // refs/changes/06/7606/1 && git cherry-pick FETCH_HEAD
-   $this->runCmd( 'git', 'fetch', $this->repoPath . '/' . 
$subpath, $patch );
-   $this->runCmd( 'git', 'cherry-pick', 'FETCH_HEAD' );
-   }
 
$this->runWriteCmd(
'git', 'push', 'origin', 'wmf/' . $this->newVersion );
diff --git a/make-wmf-branch/default.conf b/make-wmf-branch/default.conf
index 7b0bb46..4eadc97 100644
--- a/make-wmf-branch/default.conf
+++ b/make-wmf-branch/default.conf
@@ -12,13 +12,5 @@
 
 $branchPrefix = 'wmf/';
 
-# Map of custom patches (refs/*) to gerrit /mediawiki/ relative base paths 
(repos)
-# Example:
-# $patches = array(
-#  'refs/changes/65/274165/3' => 'core' // 
https://gerrit.wikimedia.org/r/#/c/274165/
-# );
-$patches = array(
-);
-
 $dryRun = false; // Don't actually push anything
 $noisy = false; // Output git commands

-- 
To view, visit https://gerrit.wikimedia.org/r/403154
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I50dfea77ce86cea4550e7e4fcce39e9cc95bfda1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...release[master]: make-wmf-branch: Combine skins/vendor to extension logic

2018-01-09 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/403148 )

Change subject: make-wmf-branch: Combine skins/vendor to extension logic
..

make-wmf-branch: Combine skins/vendor to extension logic

Same slowness, but less duplication in logic

Change-Id: I550c8a880273df6fd901d57d56149f654d1d21fa
---
M make-wmf-branch/MakeWmfBranch.php
M make-wmf-branch/config.json
2 files changed, 190 insertions(+), 213 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release 
refs/changes/48/403148/1

diff --git a/make-wmf-branch/MakeWmfBranch.php 
b/make-wmf-branch/MakeWmfBranch.php
index 3a233de..efabfcb 100644
--- a/make-wmf-branch/MakeWmfBranch.php
+++ b/make-wmf-branch/MakeWmfBranch.php
@@ -3,7 +3,7 @@
 class MakeWmfBranch {
public $dryRun;
public $newVersion, $oldVersion, $buildDir;
-   public $specialExtensions, $branchedExtensions, $branchedSkins, 
$patches;
+   public $specialExtensions, $branchedExtensions, $patches;
public $repoPath;
public $noisy;
 
@@ -29,7 +29,6 @@
$this->buildDir = $buildDir;
$this->branchedExtensions = $branchLists['extensions'];
$this->branchedSubmodules = $branchLists['submodules'];
-   $this->branchedSkins = $branchLists['skins'];
$this->specialExtensions = $branchLists['special_extensions'];
$this->alreadyBranched = array();
$this->noisy = $noisy;
@@ -50,11 +49,7 @@
}
 
$foundKey = false;
-   foreach ( array(
-   $this->branchedExtensions,
-   $this->branchedSkins,
-   array( 'vendor' ),
-   ) as $branchedArr ) {
+   foreach ( array( $this->branchedExtensions ) as $branchedArr ) {
$key = array_search( $extName, $branchedArr );
 
if ( $key !== false ) {
@@ -136,10 +131,6 @@
foreach ( $this->branchedExtensions as $ext ) {
$this->branchRepo( "extensions/{$ext}" );
}
-   foreach ( $this->branchedSkins as $skin ) {
-   $this->branchRepo( "skins/{$skin}" );
-   }
-   $this->branchRepo( 'vendor' );
$this->branchWmf( $clonePath );
}
 
@@ -225,30 +216,17 @@
$this->runCmd( 'git', 'rm', '-q', "extensions/README", 
"extensions/.gitignore" );
}
 
+   # Add extensions/skins/vendor
+   foreach( $this->branchedExtensions as $name ) {
+   $this->runCmd( 'git', 'submodule', 'add', '-b', 
$newVersion, '-q',
+   "{$this->repoPath}/{$name}", $name );
+   }
+
# Add extension submodules
-   foreach (
-   array_merge( array_keys( $this->specialExtensions ), 
$this->branchedExtensions )
-   as $name ) {
-
-   $submoduleBranch = $newVersion;
-
-   if ( isset( $this->specialExtensions[$name] ) ) {
-   $submoduleBranch = 
$this->specialExtensions[$name];
-   }
-
-   $this->runCmd( 'git', 'submodule', 'add', '-b', 
$submoduleBranch, '-q',
-   "{$this->repoPath}/extensions/{$name}", 
"extensions/$name" );
+   foreach ( $this->specialExtensions as $name => $specialBranch ) 
{
+   $this->runCmd( 'git', 'submodule', 'add', '-b', 
$specialBranch, '-q',
+   "{$this->repoPath}/{$name}", $name );
}
-
-   # Add skin submodules
-   foreach ( $this->branchedSkins as $name ) {
-   $this->runCmd( 'git', 'submodule', 'add', '-f', '-b', 
$newVersion, '-q',
-   "{$this->repoPath}/skins/{$name}", 
"skins/$name" );
-   }
-
-   # Add vendor submodule
-   $this->runCmd( 'git', 'submodule', 'add', '-f', '-b', 
$newVersion, '-q',
-   "{$this->repoPath}/vendor", 'vendor' );
 
# Fix $wgVersion
$this->fixVersion( "includes/DefaultSettings.php" );
diff --git a/make-wmf-branch/config.json b/make-wmf-branch/config.json
index 9bdb736..cabf8c1 100644
--- a/make-wmf-branch/config.json
+++ b/make-wmf-branch/config.json
@@ -1,185 +1,184 @@
 {
"extensions": [
-   "3D",
-   "AbuseFilter",
-   "ActiveAbstract",
-   "AdvancedSearch",
-   "AntiSpoof",
-   "ApiFeatureUsage",
-   "ArticleCreationWorkflow",
-   "ArticlePlaceholder",
-   "Babel",
-   "BetaFeatures",
-   "BounceHandler",
-  

[MediaWiki-commits] [Gerrit] mediawiki...release[master]: releases: server path code duplication

2018-01-09 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/403142 )

Change subject: releases: server path code duplication
..

releases: server path code duplication

Change-Id: I5b50c3913da702de612552b02e3684faee422480
---
M make-release/makerelease.py
1 file changed, 6 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release 
refs/changes/42/403142/1

diff --git a/make-release/makerelease.py b/make-release/makerelease.py
index 28032df..ada6d91 100755
--- a/make-release/makerelease.py
+++ b/make-release/makerelease.py
@@ -598,26 +598,26 @@
 print()
 print('*' * 70)
 
-server = 'https://releases.wikimedia.org/mediawiki/'
+server = 
'https://releases.wikimedia.org/mediawiki/{}/'.format(major_ver)
 print('Download:')
-print(server + major_ver + '/' + package + '.tar.gz')
+print(server + package + '.tar.gz')
 print()
 
 if prev_version is not None:
 if have_i18n:
 print("Patch to previous version (" + prev_version +
   "), without interface text:")
-print(server + major_ver + '/' + package + '.patch.gz')
+print(server + package + '.patch.gz')
 print("Interface text changes:")
-print(server + major_ver + '/' + i18n_patch)
+print(server + i18n_patch)
 else:
 print("Patch to previous version (" + prev_version + "):")
-print(server + major_ver + '/' + package + '.patch.gz')
+print(server + package + '.patch.gz')
 print()
 
 print('GPG signatures:')
 for file_name in out_files:
-print(server + major_ver + '/' + file_name + '.sig')
+print(server + file_name + '.sig')
 print()
 
 print('Public keys:')

-- 
To view, visit https://gerrit.wikimedia.org/r/403142
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5b50c3913da702de612552b02e3684faee422480
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...release[master]: Drop export_ext() as dumb wrapper around patching

2018-01-09 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/403141 )

Change subject: Drop export_ext() as dumb wrapper around patching
..

Drop export_ext() as dumb wrapper around patching

Just call patch functions directly.

Oh while we're here, provide proper composer support for
prior version diffing, as well as drop useless export_ext()
call that does nothing against an old version.

Change-Id: I6e898f9bb680f483a4ef1cda70808f1beda70d1d
---
M make-release/makerelease.py
1 file changed, 12 insertions(+), 19 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release 
refs/changes/41/403141/1

diff --git a/make-release/makerelease.py b/make-release/makerelease.py
index 28032df..2d32637 100755
--- a/make-release/makerelease.py
+++ b/make-release/makerelease.py
@@ -389,16 +389,7 @@
 if patches:
 git_ref = self.version.branch
 self.get_git('core', os.path.join(export_dir, module), git_ref)
-if patches:
-self.apply_patches(patches, export_dir)
-
-logging.info('Done with exporting core')
-
-def export_ext(self, branch, extension, input_dir, patches=None):
-if patches:
-self.apply_patches(patches, input_dir + '/' + extension)
-
-logging.info('Done with exporting %s', extension)
+self.maybe_apply_patches(export_dir, patches)
 
 def make_patch(self, dest_dir, patch_file_name, dir1, dir2, patch_type):
 patch_file = open(dest_dir + "/" + patch_file_name, 'w')
@@ -430,7 +421,9 @@
 logging.info('Done with making patch')
 return diff_status == 1
 
-def apply_patches(self, patch_files, input_dir):
+def maybe_apply_patches(self, input_dir, patch_files=None):
+if not patch_files:
+return
 old_dir = os.getcwd()
 os.chdir(input_dir)
 for patch_file in patch_files:
@@ -508,13 +501,15 @@
 
 os.chdir(os.path.join(build_dir, package))
 subprocess.check_output(['composer', 'update', '--no-dev'])
-self.export_ext(branch, 'vendor', package,
-self.get_patches_for_repo('vendor', patch_dir))
+self.maybe_apply_patches(
+os.path.join(package, 'vendor'),
+self.get_patches_for_repo('vendor', patch_dir))
 
 ext_exclude = []
 for ext in self.get_extensions_for_version(version, extensions):
-self.export_ext(branch, ext, package,
-self.get_patches_for_repo(ext, patch_dir))
+self.maybe_apply_patches(
+os.path.join(package, ext),
+self.get_patches_for_repo(ext, patch_dir))
 ext_exclude.append("--exclude")
 ext_exclude.append(ext)
 
@@ -541,10 +536,8 @@
 prev_mw_version = MwVersion(prev_version)
 self.export(prev_mw_version.tag,
 prev_dir, build_dir)
-
-for ext in self.get_extensions_for_version(MwVersion(prev_version),
-   extensions):
-self.export_ext(branch, ext, prev_dir)
+os.chdir(os.path.join(build_dir, prev_dir))
+subprocess.check_output(['composer', 'update', '--no-dev'])
 
 self.make_patch(
 build_dir, package + '.patch.gz', prev_dir, package, 'normal')

-- 
To view, visit https://gerrit.wikimedia.org/r/403141
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6e898f9bb680f483a4ef1cda70808f1beda70d1d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] operations/puppet[production]: CI: Add php7.0-zip stretch and beyond

2018-01-09 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/403138 )

Change subject: CI: Add php7.0-zip stretch and beyond
..

CI: Add php7.0-zip stretch and beyond

We already install it for Jessie, no reason not to on
Stetch. Plus composer wants it

Change-Id: I104833d335040b4dc5cb68591e5aa368ac59d704
---
M modules/contint/manifests/packages/php.pp
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/38/403138/1

diff --git a/modules/contint/manifests/packages/php.pp 
b/modules/contint/manifests/packages/php.pp
index e77d5e0..2e90d92 100644
--- a/modules/contint/manifests/packages/php.pp
+++ b/modules/contint/manifests/packages/php.pp
@@ -57,6 +57,7 @@
 'php7.0-tidy',
 'php-xdebug',
 'php7.0-phpdbg',  # php70-phpdbg -qrr ...
+'php7.0-zip', # composer wants it, and we install it for jessie 
below
 # ..and these are part of php5-common,
 # but now are separate packages
 'php7.0-bcmath',

-- 
To view, visit https://gerrit.wikimedia.org/r/403138
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I104833d335040b4dc5cb68591e5aa368ac59d704
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Move BaseDump into includes/export/

2018-01-08 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402936 )

Change subject: Move BaseDump into includes/export/
..

Move BaseDump into includes/export/

There's no reason for this to have to live in Maintenance land. It's
generally useful and lets us avoid some random require/include calls

Change-Id: I60419c7f9fc52313905053bbeb3aa81666c9160c
---
M autoload.php
M maintenance/dumpTextPass.php
M tests/phan/config.php
M tests/phpunit/maintenance/backupPrefetchTest.php
4 files changed, 1 insertion(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/36/402936/1

diff --git a/autoload.php b/autoload.php
index 351136d..058d4f6 100644
--- a/autoload.php
+++ b/autoload.php
@@ -175,7 +175,7 @@
'BadRequestError' => __DIR__ . 
'/includes/exception/BadRequestError.php',
'BadTitleError' => __DIR__ . '/includes/exception/BadTitleError.php',
'BagOStuff' => __DIR__ . '/includes/libs/objectcache/BagOStuff.php',
-   'BaseDump' => __DIR__ . '/maintenance/backupPrefetch.inc',
+   'BaseDump' => __DIR__ . '/includes/export/BaseDump.php',
'BaseTemplate' => __DIR__ . '/includes/skins/BaseTemplate.php',
'BashkirUppercaseCollation' => __DIR__ . 
'/includes/collation/BashkirUppercaseCollation.php',
'BatchRowIterator' => __DIR__ . '/includes/utils/BatchRowIterator.php',
diff --git a/maintenance/dumpTextPass.php b/maintenance/dumpTextPass.php
index 0604f48..f17a3c2 100644
--- a/maintenance/dumpTextPass.php
+++ b/maintenance/dumpTextPass.php
@@ -152,7 +152,6 @@
}
 
if ( $this->hasOption( 'prefetch' ) ) {
-   require_once "$IP/maintenance/backupPrefetch.inc";
$url = $this->processFileOpt( $this->getOption( 
'prefetch' ) );
$this->prefetch = new BaseDump( $url );
}
diff --git a/tests/phan/config.php b/tests/phan/config.php
index 0df8357..52a565c 100644
--- a/tests/phan/config.php
+++ b/tests/phan/config.php
@@ -41,7 +41,6 @@
[
'maintenance/7zip.inc',
'maintenance/backup.inc',
-   'maintenance/backupPrefetch.inc',
'maintenance/cleanupTable.inc',
'maintenance/CodeCleanerGlobalsPass.inc',
'maintenance/commandLine.inc',
diff --git a/tests/phpunit/maintenance/backupPrefetchTest.php 
b/tests/phpunit/maintenance/backupPrefetchTest.php
index 010bb17..0e2e145 100644
--- a/tests/phpunit/maintenance/backupPrefetchTest.php
+++ b/tests/phpunit/maintenance/backupPrefetchTest.php
@@ -1,7 +1,5 @@
 https://gerrit.wikimedia.org/r/402936
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I60419c7f9fc52313905053bbeb3aa81666c9160c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...ActiveAbstract[master]: Properly register noredirect filter

2018-01-08 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402911 )

Change subject: Properly register noredirect filter
..

Properly register noredirect filter

I118b92dd, Ie4b10659 moved classes to their own files, but forgot
to move a registration function to the new NoredirectFilter class
now that it was in its own file.

This restores its registration function, plus uses the ::CLASS
constants to A) protect against future renames and B) hopefully
be better at triggering the autoloader.

Change-Id: If52155dbc9f9db378c161aaa6438e6b9fbfc159e
---
M AbstractFilter.php
M GoogleCoopFilter.php
M NoredirectFilter.php
3 files changed, 12 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ActiveAbstract 
refs/changes/11/402911/1

diff --git a/AbstractFilter.php b/AbstractFilter.php
index 2d00c76..3e623df 100644
--- a/AbstractFilter.php
+++ b/AbstractFilter.php
@@ -41,8 +41,7 @@
 * @param BackupDumper $dumper
 */
static function register( $dumper ) {
-   $dumper->registerFilter( 'abstract', 'AbstractFilter' );
-   $dumper->registerFilter( 'noredirect', 'NoredirectFilter' );
+   $dumper->registerFilter( 'abstract', self::CLASS );
}
 
/**
diff --git a/GoogleCoopFilter.php b/GoogleCoopFilter.php
index 418d355..25c0317 100644
--- a/GoogleCoopFilter.php
+++ b/GoogleCoopFilter.php
@@ -48,8 +48,8 @@
 * @param BackupDumper &$dumper
 * @static
 */
-   static function register( &$dumper ) {
-   $dumper->registerFilter( 'googlecoop', 'GoogleCoopFilter' );
+   static function register( $dumper ) {
+   $dumper->registerFilter( 'googlecoop', self::CLASS );
parent::register( $dumper );
}
 
diff --git a/NoredirectFilter.php b/NoredirectFilter.php
index 8838731..2fad37c 100644
--- a/NoredirectFilter.php
+++ b/NoredirectFilter.php
@@ -8,4 +8,13 @@
function pass( $page ) {
return !$page->page_is_redirect;
}
+
+   /**
+* Register the filter function with the dump manager
+* @param BackupDumper &$dumper
+* @static
+*/
+   static function register( $dumper ) {
+   $dumper->registerFilter( 'noredirect', self::CLASS );
+   }
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/402911
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If52155dbc9f9db378c161aaa6438e6b9fbfc159e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ActiveAbstract
Gerrit-Branch: master
Gerrit-Owner: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Updating interwiki cache

2018-01-07 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402664 )

Change subject: Updating interwiki cache
..

Updating interwiki cache

Change-Id: Ia06c50cc5fb576f46e393b6578ef09452f69a69a
---
M wmf-config/interwiki.php
1 file changed, 2 insertions(+), 52 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config 
refs/changes/64/402664/1

diff --git a/wmf-config/interwiki.php b/wmf-config/interwiki.php
index f437998..d3e6da2 100644
--- a/wmf-config/interwiki.php
+++ b/wmf-config/interwiki.php
@@ -1,5 +1,5 @@
  '0 https://www.acronymfinder.com/$1.html',
'__global:advisory' => '1 https://advisory.wikimedia.org/wiki/$1',
@@ -3446,33 +3446,6 @@
'alswiki:chapter' => '1 https://als.wikimedia.org/wiki/$1',
'alswiki:v' => '1 https://als.wikiversity.org/wiki/$1',
'alswiki:voy' => '1 https://als.wikivoyage.org/wiki/$1',
-   '__sites:alswikibooks' => 'wikibooks',
-   'alswikibooks:w' => '1 https://als.wikipedia.org/wiki/$1',
-   'alswikibooks:wikt' => '1 https://als.wiktionary.org/wiki/$1',
-   'alswikibooks:q' => '1 https://als.wikiquote.org/wiki/$1',
-   'alswikibooks:n' => '1 https://als.wikinews.org/wiki/$1',
-   'alswikibooks:s' => '1 https://als.wikisource.org/wiki/$1',
-   'alswikibooks:chapter' => '1 https://als.wikimedia.org/wiki/$1',
-   'alswikibooks:v' => '1 https://als.wikiversity.org/wiki/$1',
-   'alswikibooks:voy' => '1 https://als.wikivoyage.org/wiki/$1',
-   '__sites:alswikiquote' => 'wikiquote',
-   'alswikiquote:w' => '1 https://als.wikipedia.org/wiki/$1',
-   'alswikiquote:wikt' => '1 https://als.wiktionary.org/wiki/$1',
-   'alswikiquote:b' => '1 https://als.wikibooks.org/wiki/$1',
-   'alswikiquote:n' => '1 https://als.wikinews.org/wiki/$1',
-   'alswikiquote:s' => '1 https://als.wikisource.org/wiki/$1',
-   'alswikiquote:chapter' => '1 https://als.wikimedia.org/wiki/$1',
-   'alswikiquote:v' => '1 https://als.wikiversity.org/wiki/$1',
-   'alswikiquote:voy' => '1 https://als.wikivoyage.org/wiki/$1',
-   '__sites:alswiktionary' => 'wiktionary',
-   'alswiktionary:w' => '1 https://als.wikipedia.org/wiki/$1',
-   'alswiktionary:q' => '1 https://als.wikiquote.org/wiki/$1',
-   'alswiktionary:b' => '1 https://als.wikibooks.org/wiki/$1',
-   'alswiktionary:n' => '1 https://als.wikinews.org/wiki/$1',
-   'alswiktionary:s' => '1 https://als.wikisource.org/wiki/$1',
-   'alswiktionary:chapter' => '1 https://als.wikimedia.org/wiki/$1',
-   'alswiktionary:v' => '1 https://als.wikiversity.org/wiki/$1',
-   'alswiktionary:voy' => '1 https://als.wikivoyage.org/wiki/$1',
'__sites:amwiki' => 'wiki',
'amwiki:wikt' => '1 https://am.wiktionary.org/wiki/$1',
'amwiki:q' => '1 https://am.wikiquote.org/wiki/$1',
@@ -7993,24 +7966,6 @@
'movementroleswiki:chapter' => '1 https://en.wikimedia.org/wiki/$1',
'movementroleswiki:v' => '1 https://en.wikiversity.org/wiki/$1',
'movementroleswiki:voy' => '1 https://en.wikivoyage.org/wiki/$1',
-   '__sites:mowiki' => 'wiki',
-   'mowiki:wikt' => '1 https://mo.wiktionary.org/wiki/$1',
-   'mowiki:q' => '1 https://mo.wikiquote.org/wiki/$1',
-   'mowiki:b' => '1 https://mo.wikibooks.org/wiki/$1',
-   'mowiki:n' => '1 https://mo.wikinews.org/wiki/$1',
-   'mowiki:s' => '1 https://mo.wikisource.org/wiki/$1',
-   'mowiki:chapter' => '1 https://mo.wikimedia.org/wiki/$1',
-   'mowiki:v' => '1 https://mo.wikiversity.org/wiki/$1',
-   'mowiki:voy' => '1 https://mo.wikivoyage.org/wiki/$1',
-   '__sites:mowiktionary' => 'wiktionary',
-   'mowiktionary:w' => '1 https://mo.wikipedia.org/wiki/$1',
-   'mowiktionary:q' => '1 https://mo.wikiquote.org/wiki/$1',
-   'mowiktionary:b' => '1 https://mo.wikibooks.org/wiki/$1',
-   'mowiktionary:n' => '1 https://mo.wikinews.org/wiki/$1',
-   'mowiktionary:s' => '1 https://mo.wikisource.org/wiki/$1',
-   'mowiktionary:chapter' => '1 https://mo.wikimedia.org/wiki/$1',
-   'mowiktionary:v' => '1 https://mo.wikiversity.org/wiki/$1',
-   'mowiktionary:voy' => '1 https://mo.wikivoyage.org/wiki/$1',
'__sites:mrjwiki' => 'wiki',
'mrjwiki:wikt' => '1 https://mrj.wiktionary.org/wiki/$1',
'mrjwiki:q' => '1 https://mrj.wikiquote.org/wiki/$1',
@@ -11626,7 +11581,7 @@
'__list:_wikimedia' => 'aa ab ace ady af ak als am an ang ar arc arz as 
ast atj av ay az azb ba bar bat-smg bcl be be-x-old bg bh bi bjn bm bn bo bpy 
br bs bug bxr ca cbk-zam cdo ce ceb ch cho chr chy ckb co cr crh cs csb cu cv 
cy da de din diq dsb dty dv dz ee el eml en eo es et eu ext fa ff fi fiu-vro fj 
fo fr frp frr fur fy ga gag gan gd gl glk gn gom got gu gv ha hak haw he hi hif 
ho hr hsb ht hu hy hz ia id ie ig ii ik ilo io is it iu ja jam jbo jv ka kaa 
kab kbd kbp kg ki kj kk kl km kn 

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: updateinterwikicache: check_valid_syntax was moved to lint

2018-01-07 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402663 )

Change subject: updateinterwikicache: check_valid_syntax was moved to lint
..

updateinterwikicache: check_valid_syntax was moved to lint

Change-Id: I4246dac02a27ea72b3e890c9a82b48b6d79ad0d6
---
M scap/plugins/updateinterwikicache.py
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config 
refs/changes/63/402663/1

diff --git a/scap/plugins/updateinterwikicache.py 
b/scap/plugins/updateinterwikicache.py
index 4ba12f9..049cdb1 100644
--- a/scap/plugins/updateinterwikicache.py
+++ b/scap/plugins/updateinterwikicache.py
@@ -4,8 +4,8 @@
 import subprocess
 
 import scap.cli as cli
+import scap.lint as lint
 import scap.main as main
-import scap.tasks as tasks
 import scap.utils as utils
 
 
@@ -31,7 +31,7 @@
 )
 
 # This shouldn't happen, but let's be safe
-tasks.check_valid_syntax(interwikifile)
+lint.check_valid_syntax(interwikifile)
 
 subprocess.check_call(['/usr/bin/git', 'add', interwikifile])
 subprocess.check_call(['/usr/bin/git', 'commit', '-q', '-m',

-- 
To view, visit https://gerrit.wikimedia.org/r/402663
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4246dac02a27ea72b3e890c9a82b48b6d79ad0d6
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Chad 
Gerrit-Reviewer: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki/core[wmf/1.31.0-wmf.15]: Fix Maintenance::output when called very early

2018-01-07 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402662 )

Change subject: Fix Maintenance::output when called very early
..

Fix Maintenance::output when called very early

If a maintenance script is called with --help (or without
required args), this is currently failing, as MediaWikiServices
is only loaded after Maintenance::setup is initially called.
Follows 336454104d1249439e3ff97746de69c5e7b4a5f9.

Change-Id: Ied283d362675b6b98bd3144132a240b432998991
(cherry picked from commit 803a29127ce02734ab2dd83fff2cf716c98eedad)
---
M maintenance/Maintenance.php
1 file changed, 8 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/62/402662/1

diff --git a/maintenance/Maintenance.php b/maintenance/Maintenance.php
index 07f547f..8bfead3 100644
--- a/maintenance/Maintenance.php
+++ b/maintenance/Maintenance.php
@@ -381,11 +381,15 @@
 * @param mixed $channel Unique identifier for the channel. See 
function outputChanneled.
 */
protected function output( $out, $channel = null ) {
-   // Try to periodically flush buffered metrics to avoid OOMs
-   $stats = 
MediaWikiServices::getInstance()->getStatsdDataFactory();
-   if ( $stats->getDataCount() > 1000 ) {
-   MediaWiki::emitBufferedStatsdData( $stats, 
$this->getConfig() );
+   // This is sometimes called very early, before Setup.php is 
included.
+   if ( class_exists( MediaWikiServices::class ) ) {
+   // Try to periodically flush buffered metrics to avoid 
OOMs
+   $stats = 
MediaWikiServices::getInstance()->getStatsdDataFactory();
+   if ( $stats->getDataCount() > 1000 ) {
+   MediaWiki::emitBufferedStatsdData( $stats, 
$this->getConfig() );
+   }
}
+
if ( $this->mQuiet ) {
return;
}

-- 
To view, visit https://gerrit.wikimedia.org/r/402662
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ied283d362675b6b98bd3144132a240b432998991
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.31.0-wmf.15
Gerrit-Owner: Chad 
Gerrit-Reviewer: Hoo man 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Releases: Include all contint PHP packages

2018-01-05 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402430 )

Change subject: Releases: Include all contint PHP packages
..

Releases: Include all contint PHP packages

Right now I'm missing php-mbstring, but continuing to
install these one by one is just a game of whack-a-mole.

Install all of them.

Change-Id: Id777364fa468d8eec73320a539056fe3f834a49f
---
M modules/profile/manifests/releases/mediawiki.pp
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/30/402430/1

diff --git a/modules/profile/manifests/releases/mediawiki.pp 
b/modules/profile/manifests/releases/mediawiki.pp
index 525689a..2c49f70 100644
--- a/modules/profile/manifests/releases/mediawiki.pp
+++ b/modules/profile/manifests/releases/mediawiki.pp
@@ -24,6 +24,7 @@
 }
 
 class { '::contint::composer': }
+class { '::contint::packages::php': }
 
 class { '::apache::mod::rewrite': }
 class { '::apache::mod::headers': }

-- 
To view, visit https://gerrit.wikimedia.org/r/402430
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id777364fa468d8eec73320a539056fe3f834a49f
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...WikibaseQualityConstraints[wmf/1.31.0-wmf.15]: Catch ConstraintParameterException in SparqlHelper

2018-01-05 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402427 )

Change subject: Catch ConstraintParameterException in SparqlHelper
..

Catch ConstraintParameterException in SparqlHelper

When an invalid regex is detected, matchesRegularExpressionWithSparql
throws a ConstraintParameterException. matchesRegularExpression needs to
catch this exception in the caching callback, and store the relevant
part (the message) so we can reconstruct the exception from the cached
value.

Bug: T183992
Change-Id: I1671255279f82acdcdeb42050f0e2332c635718f
(cherry picked from commit a54dbc47fb533bb1f64d9181b87d21b10bf849d5)
---
M src/ConstraintCheck/Helper/SparqlHelper.php
1 file changed, 34 insertions(+), 8 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikibaseQualityConstraints
 refs/changes/27/402427/1

diff --git a/src/ConstraintCheck/Helper/SparqlHelper.php 
b/src/ConstraintCheck/Helper/SparqlHelper.php
index 175318d..4fbd34b 100644
--- a/src/ConstraintCheck/Helper/SparqlHelper.php
+++ b/src/ConstraintCheck/Helper/SparqlHelper.php
@@ -9,6 +9,7 @@
 use InvalidArgumentException;
 use MapCacheLRU;
 use MediaWiki\MediaWikiServices;
+use MWException;
 use MWHttpRequest;
 use WANObjectCache;
 use Wikibase\DataModel\Entity\EntityId;
@@ -361,15 +362,16 @@
// caching wrapper around matchesRegularExpressionWithSparql
 
$textHash = hash( 'sha256', $text );
+   $cacheKey = $this->cache->makeKey(
+   'WikibaseQualityConstraints', // extension
+   'regex', // action
+   'WDQS-Java', // regex flavor
+   hash( 'sha256', $regex )
+   );
$cacheMapSize = $this->config->get( 
'WBQualityConstraintsFormatCacheMapSize' );
 
$cacheMapArray = $this->cache->getWithSetCallback(
-   $this->cache->makeKey(
-   'WikibaseQualityConstraints', // extension
-   'regex', // action
-   'WDQS-Java', // regex flavor
-   hash( 'sha256', $regex )
-   ),
+   $cacheKey,
WANObjectCache::TTL_DAY,
function( $cacheMapArray ) use ( $text, $regex, 
$textHash, $cacheMapSize ) {
// Initialize the cache map if not set
@@ -389,9 +391,20 @@
} else {
$key = 
'wikibase.quality.constraints.regex.cache.refresh.miss';
$this->dataFactory->increment( $key );
+   try {
+   $matches = 
$this->matchesRegularExpressionWithSparql( $text, $regex );
+   } catch ( ConstraintParameterException 
$e ) {
+   $matches = [
+   'type' => 
ConstraintParameterException::class,
+   'message' => 
$e->getMessage(),
+   ];
+   } catch ( SparqlHelperException $e ) {
+   // don’t cache this
+   return $cacheMap->toArray();
+   }
$cacheMap->set(
$textHash,
-   
$this->matchesRegularExpressionWithSparql( $text, $regex ),
+   $matches,
3 / 8
);
}
@@ -412,7 +425,20 @@
if ( isset( $cacheMapArray[$textHash] ) ) {
$key = 'wikibase.quality.constraints.regex.cache.hit';
$this->dataFactory->increment( $key );
-   return $cacheMapArray[$textHash];
+   $matches = $cacheMapArray[$textHash];
+   if ( is_bool( $matches ) ) {
+   return $matches;
+   } elseif ( is_array( $matches ) &&
+   $matches['type'] == 
ConstraintParameterException::class ) {
+   throw new ConstraintParameterException( 
$matches['message'] );
+   } else {
+   throw new MWException(
+   'Value of unknown type in object cache 
(' .
+   'cache key: ' . $cacheKey . ', ' .
+   

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Undeploy EducationProgram from test2wiki

2018-01-04 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402170 )

Change subject: Undeploy EducationProgram from test2wiki
..

Undeploy EducationProgram from test2wiki

Change-Id: Ice08fb61eb83a43a8fb7f5576f0ee9c0982c8004
---
M wmf-config/InitialiseSettings.php
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config 
refs/changes/70/402170/1

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 7aa293d..d42d744 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -17411,7 +17411,6 @@
'ruwiki' => true, // T89588
'srwiki' => true, // T110619
'svwiki' => true, // T51009
-   'test2wiki' => true,
'ukwiki' => true, // T66143
 ],
 

-- 
To view, visit https://gerrit.wikimedia.org/r/402170
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ice08fb61eb83a43a8fb7f5576f0ee9c0982c8004
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Chad 
Gerrit-Reviewer: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Drop unused docroots

2018-01-04 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402091 )

Change subject: Drop unused docroots
..

Drop unused docroots

Bug: T126306
Depends-On: I88989e5a4dc4d1cafd7ec5757e2b2ca3c90fe2b4
Change-Id: I14ef93b56cfd0d0979aa763b53b3af5d8226dd9c
---
D docroot/wikibooks.org
D docroot/wikidata.org
D docroot/wikimediafoundation.org
D docroot/wikinews.org
D docroot/wikiquote.org
D docroot/wikisource.org
D docroot/wikiversity.org
D docroot/wikivoyage.org
D docroot/wiktionary.org
9 files changed, 0 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config 
refs/changes/91/402091/1

diff --git a/docroot/wikibooks.org b/docroot/wikibooks.org
deleted file mode 12
index e970be9..000
--- a/docroot/wikibooks.org
+++ /dev/null
@@ -1 +0,0 @@
-standard-docroot
\ No newline at end of file
diff --git a/docroot/wikidata.org b/docroot/wikidata.org
deleted file mode 12
index e970be9..000
--- a/docroot/wikidata.org
+++ /dev/null
@@ -1 +0,0 @@
-standard-docroot
\ No newline at end of file
diff --git a/docroot/wikimediafoundation.org b/docroot/wikimediafoundation.org
deleted file mode 12
index e970be9..000
--- a/docroot/wikimediafoundation.org
+++ /dev/null
@@ -1 +0,0 @@
-standard-docroot
\ No newline at end of file
diff --git a/docroot/wikinews.org b/docroot/wikinews.org
deleted file mode 12
index e970be9..000
--- a/docroot/wikinews.org
+++ /dev/null
@@ -1 +0,0 @@
-standard-docroot
\ No newline at end of file
diff --git a/docroot/wikiquote.org b/docroot/wikiquote.org
deleted file mode 12
index e970be9..000
--- a/docroot/wikiquote.org
+++ /dev/null
@@ -1 +0,0 @@
-standard-docroot
\ No newline at end of file
diff --git a/docroot/wikisource.org b/docroot/wikisource.org
deleted file mode 12
index e970be9..000
--- a/docroot/wikisource.org
+++ /dev/null
@@ -1 +0,0 @@
-standard-docroot
\ No newline at end of file
diff --git a/docroot/wikiversity.org b/docroot/wikiversity.org
deleted file mode 12
index e970be9..000
--- a/docroot/wikiversity.org
+++ /dev/null
@@ -1 +0,0 @@
-standard-docroot
\ No newline at end of file
diff --git a/docroot/wikivoyage.org b/docroot/wikivoyage.org
deleted file mode 12
index e970be9..000
--- a/docroot/wikivoyage.org
+++ /dev/null
@@ -1 +0,0 @@
-standard-docroot
\ No newline at end of file
diff --git a/docroot/wiktionary.org b/docroot/wiktionary.org
deleted file mode 12
index e970be9..000
--- a/docroot/wiktionary.org
+++ /dev/null
@@ -1 +0,0 @@
-standard-docroot
\ No newline at end of file

-- 
To view, visit https://gerrit.wikimedia.org/r/402091
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I14ef93b56cfd0d0979aa763b53b3af5d8226dd9c
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Moving all docroots to standard-docroot

2018-01-04 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402090 )

Change subject: Moving all docroots to standard-docroot
..

Moving all docroots to standard-docroot

Now that we've unified all the docroots, let's start to actually
use the unified docroots instead of symlinking everywhere

Bug: T126306
Change-Id: I88989e5a4dc4d1cafd7ec5757e2b2ca3c90fe2b4
---
M modules/mediawiki/files/apache/sites/foundation.conf
M modules/mediawiki/files/apache/sites/main.conf
2 files changed, 19 insertions(+), 19 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/90/402090/1

diff --git a/modules/mediawiki/files/apache/sites/foundation.conf 
b/modules/mediawiki/files/apache/sites/foundation.conf
index c6aa928..4d23c9a 100644
--- a/modules/mediawiki/files/apache/sites/foundation.conf
+++ b/modules/mediawiki/files/apache/sites/foundation.conf
@@ -1,5 +1,5 @@
 
-DocumentRoot "/srv/mediawiki/docroot/wikimediafoundation.org"
+DocumentRoot "/srv/mediawiki/docroot/standard-docroot"
 ServerName wikimediafoundation.org
 
 AllowEncodedSlashes On
@@ -19,7 +19,7 @@
 RewriteRule ^/bylaws\.pdf 
%{ENV:RW_PROTO}://%{SERVER_NAME}/wiki/Wikimedia_Foundation_bylaws [R,L]
 
 # Primary wiki redirector:
-Alias /wiki /srv/mediawiki/docroot/wikimediafoundation.org/w/index.php
+Alias /wiki /srv/mediawiki/docroot/standard-docroot/w/index.php
 Include "sites-enabled/public-wiki-rewrites.incl"
 Include "sites-enabled/api-rewrites.incl"
 Include "sites-enabled/wikimedia-legacy.incl"
@@ -28,12 +28,12 @@
 
 RewriteRule ^/wiki/Donate$ https://donate.wikimedia.org/ [R=301,L]
 
-
+
 
 php_admin_flag engine on
 
 
-
+
 
 php_admin_flag engine off
 
diff --git a/modules/mediawiki/files/apache/sites/main.conf 
b/modules/mediawiki/files/apache/sites/main.conf
index 0809264..bd28025 100644
--- a/modules/mediawiki/files/apache/sites/main.conf
+++ b/modules/mediawiki/files/apache/sites/main.conf
@@ -101,7 +101,7 @@
 ServerName wiktionary
 ServerAlias *.wiktionary.org
 UseCanonicalName off
-DocumentRoot "/srv/mediawiki/docroot/wiktionary.org"
+DocumentRoot "/srv/mediawiki/docroot/standard-docroot"
 
 AllowEncodedSlashes On
 
@@ -110,10 +110,10 @@
 RewriteCond %{ENV:RW_PROTO} !=https
 RewriteRule . - [E=RW_PROTO:http]
 
-ProxyPass   /wiki
fcgi://127.0.0.1:9000/srv/mediawiki/docroot/wiktionary.org/w/index.php
-ProxyPass   /w/thumb_handler.php 
fcgi://127.0.0.1:9000/srv/mediawiki/docroot/wiktionary.org/w/thumb_handler.php
+ProxyPass   /wiki
fcgi://127.0.0.1:9000/srv/mediawiki/docroot/standard-docroot/w/index.php
+ProxyPass   /w/thumb_handler.php 
fcgi://127.0.0.1:9000/srv/mediawiki/docroot/standard-docroot/w/thumb_handler.php
 ProxyPass   /w/extensions!
-ProxyPassMatch  ^/w/(.*\.(php|hh))$  
fcgi://127.0.0.1:9000/srv/mediawiki/docroot/wiktionary.org/w/$1
+ProxyPassMatch  ^/w/(.*\.(php|hh))$  
fcgi://127.0.0.1:9000/srv/mediawiki/docroot/standard-docroot/w/$1
 RewriteRule ^/w/wiki\.phtml$ /w/index.php [L,QSA,NE]
 
 # ShortURL redirect T80309
@@ -126,7 +126,7 @@
 RewriteRule ^/upload/(.*)$ 
%{ENV:RW_PROTO}://upload.wikimedia.org/wiktionary/$1 [R=302]
 
 # Primary wiki redirector:
-Alias /wiki /srv/mediawiki/docroot/wiktionary.org/w/index.php
+Alias /wiki /srv/mediawiki/docroot/standard-docroot/w/index.php
 RewriteRule ^/w/$ /w/index.php
 
 # Early phase 2 compatibility URLs
@@ -139,16 +139,16 @@
 Include "sites-enabled/wikimedia-legacy.incl"
 
 # Variant aliases
-Alias /sr /srv/mediawiki/docroot/wiktionary.org/w/index.php
-Alias /sr-ec /srv/mediawiki/docroot/wiktionary.org/w/index.php
-Alias /sr-el /srv/mediawiki/docroot/wiktionary.org/w/index.php
-Alias /zh /srv/mediawiki/docroot/wiktionary.org/w/index.php
-Alias /zh-hans /srv/mediawiki/docroot/wiktionary.org/w/index.php
-Alias /zh-hant /srv/mediawiki/docroot/wiktionary.org/w/index.php
-Alias /zh-cn /srv/mediawiki/docroot/wiktionary.org/w/index.php
-Alias /zh-hk /srv/mediawiki/docroot/wiktionary.org/w/index.php
-Alias /zh-sg /srv/mediawiki/docroot/wiktionary.org/w/index.php
-Alias /zh-tw /srv/mediawiki/docroot/wiktionary.org/w/index.php
+Alias /sr /srv/mediawiki/docroot/standard-docroot/w/index.php
+Alias /sr-ec /srv/mediawiki/docroot/standard-docroot/w/index.php
+Alias /sr-el /srv/mediawiki/docroot/standard-docroot/w/index.php
+Alias /zh /srv/mediawiki/docroot/standard-docroot/w/index.php
+Alias /zh-hans /srv/mediawiki/docroot/standard-docroot/w/index.php
+Alias /zh-hant /srv/mediawiki/docroot/standard-docroot/w/index.php
+Alias /zh-cn /srv/mediawiki/docroot/standard-docroot/w/index.php
+Alias /zh-hk 

[MediaWiki-commits] [Gerrit] operations...gerrit[master]: Add hooks plugin @ 2.13.9

2018-01-04 Thread Chad (Code Review)
Chad has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/401697 )

Change subject: Add hooks plugin @ 2.13.9
..


Add hooks plugin @ 2.13.9

Bug: T183792
Change-Id: I04e249756eca097d931fdba716ebc0977a86a4b0
---
A plugins/hooks.jar
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Paladox: Looks good to me, but someone else must approve
  Chad: Verified; Looks good to me, approved



diff --git a/plugins/hooks.jar b/plugins/hooks.jar
new file mode 100644
index 000..dc7fb87
--- /dev/null
+++ b/plugins/hooks.jar
@@ -0,0 +1 @@
+#$# git-fat 60dec32ba739f0ba3b46228ebbd370fae8702a5041228

-- 
To view, visit https://gerrit.wikimedia.org/r/401697
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I04e249756eca097d931fdba716ebc0977a86a4b0
Gerrit-PatchSet: 1
Gerrit-Project: operations/software/gerrit
Gerrit-Branch: master
Gerrit-Owner: Chad 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Paladox 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...ActiveAbstract[wmf/1.31.0-wmf.15]: Revert "Simplify use of --plugin argument of BackupDumper"

2018-01-04 Thread Chad (Code Review)
Chad has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/402063 )

Change subject: Revert "Simplify use of --plugin argument of BackupDumper"
..


Revert "Simplify use of --plugin argument of BackupDumper"

This reverts commit 44db8fe33d60ffda4d2081b4c2d825d214507540.

Bug: T184177
Change-Id: I4040d8cfc9d87efd72f8c248fa7df6711738e59b
---
M AbstractFilter.php
M GoogleCoopFilter.php
M tests/phpunit/backup_AbstractTest.php
3 files changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/AbstractFilter.php b/AbstractFilter.php
index 4fe3b11..6fb55cf 100644
--- a/AbstractFilter.php
+++ b/AbstractFilter.php
@@ -4,7 +4,7 @@
  * Plugin for dumpBackup.php; call as eg:
  *
  * php dumpBackup.php \
- *   --plugin=AbstractFilter \
+ *   --plugin=AbstractFilter:extensions/ActiveAbstract/AbstractFilter.php \
  *   --current \
  *   --output=gzip:/dumps/abstract.xml.gz \
  * --filter=namespace:NS_MAIN \
diff --git a/GoogleCoopFilter.php b/GoogleCoopFilter.php
index e55a0c1..9fa2ea0 100644
--- a/GoogleCoopFilter.php
+++ b/GoogleCoopFilter.php
@@ -7,7 +7,7 @@
  * Usage:
  *
  * HOSTNAME=kamelopedia.mormo.org php dumpBackup.php \
- *--plugin=GoogleCoopFilter \
+ *--plugin=GoogleCoopFilter:Extension/ActiveAbstract/GoogleCoopFilter.php \
  *--current --output=file:coop3.xml --filter=namespace:NS_MAIN \
  *--filter=noredirect --filter=googlecoop
  *
diff --git a/tests/phpunit/backup_AbstractTest.php 
b/tests/phpunit/backup_AbstractTest.php
index 69f8cc0..4ead490 100644
--- a/tests/phpunit/backup_AbstractTest.php
+++ b/tests/phpunit/backup_AbstractTest.php
@@ -162,7 +162,7 @@
// Setting up the dump
$fname = $this->getNewTempFile();
$dumper = new BackupDumper( [
-   "--plugin=AbstractFilter",
+   
"--plugin=AbstractFilter:$IP/extensions/ActiveAbstract/AbstractFilter.php",
"--output=file:" . $fname, "--filter=abstract" ] );
$dumper->startId = $this->pageId1;
$dumper->endId = $this->pageId4 + 1; // Not including the 
redirect page (db isolation)
@@ -320,7 +320,7 @@
// Setting up the dump
$fname = $this->getNewTempFile();
$dumper = new BackupDumper( [
-   "--plugin=AbstractFilter",
+   
"--plugin=AbstractFilter:$IP/extensions/ActiveAbstract/AbstractFilter.php",
"--current", "--output=file:" . $fname, 
"--filter=namespace:NS_MAIN",
"--filter=noredirect", "--filter=abstract"
] );

-- 
To view, visit https://gerrit.wikimedia.org/r/402063
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I4040d8cfc9d87efd72f8c248fa7df6711738e59b
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ActiveAbstract
Gerrit-Branch: wmf/1.31.0-wmf.15
Gerrit-Owner: Chad 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...ActiveAbstract[wmf/1.31.0-wmf.15]: Revert "Move classes to own files"

2018-01-04 Thread Chad (Code Review)
Chad has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/402062 )

Change subject: Revert "Move classes to own files"
..


Revert "Move classes to own files"

This reverts commit 506e58f5f05571cf2ae6acaf76204a63775fd3c6.

Bug: T184177
Change-Id: I3dd113313c1d1711636693b1b952b49996e4f518
---
M .phpcs.xml
M AbstractFilter.php
M GoogleCoopFilter.php
D NoredirectFilter.php
M extension.json
M tests/phpunit/AbstractFilterTest.php
D tests/phpunit/DroppingReturnValueMap.php
R tests/phpunit/backup_AbstractTest.php
8 files changed, 105 insertions(+), 111 deletions(-)

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



diff --git a/.phpcs.xml b/.phpcs.xml
index e382191..eca824a 100644
--- a/.phpcs.xml
+++ b/.phpcs.xml
@@ -2,6 +2,8 @@
 


+   
+   



diff --git a/AbstractFilter.php b/AbstractFilter.php
index 2d00c76..4fe3b11 100644
--- a/AbstractFilter.php
+++ b/AbstractFilter.php
@@ -297,3 +297,13 @@
$this->revision = $rev;
}
 }
+
+class NoredirectFilter extends DumpFilter {
+   /**
+* @param stdClass $page
+* @return bool
+*/
+   function pass( $page ) {
+   return !$page->page_is_redirect;
+   }
+}
diff --git a/GoogleCoopFilter.php b/GoogleCoopFilter.php
index 418d355..e55a0c1 100644
--- a/GoogleCoopFilter.php
+++ b/GoogleCoopFilter.php
@@ -1,4 +1,5 @@
 page_is_redirect;
-   }
-}
diff --git a/extension.json b/extension.json
index 4383ff3..95861eb 100644
--- a/extension.json
+++ b/extension.json
@@ -15,11 +15,5 @@
"i18n"
]
},
-   "AutoloadClasses": {
-   "AbstractFilter": "AbstractFilter.php",
-   "DroppingReturnValueMap": 
"tests/phpunit/DroppingReturnValueMap.php",
-   "NoredirectFilter": "NoredirectFilter.php",
-   "GoogleCoopFilter": "GoogleCoopFilter.php"
-   },
"manifest_version": 1
 }
diff --git a/tests/phpunit/AbstractFilterTest.php 
b/tests/phpunit/AbstractFilterTest.php
index d9b3f59..3698016 100644
--- a/tests/phpunit/AbstractFilterTest.php
+++ b/tests/phpunit/AbstractFilterTest.php
@@ -1,4 +1,95 @@
 expects( $this->once() )
+ *   ->method( 'methodName' )
+ *   ->parameters( $this->equalTo( param1 ), $this->equalTo( param2 ) )
+ *   ->will( $this->returnValue( ret12 ) );
+ *   mock->expects( $this->once() )
+ *   ->method( 'methodName' )
+ *   ->parameters( $this->equalTo( param3 ), $this->equalTo( param4 ) )
+ *   ->will( $this->returnValue( ret34 ) );
+ *
+ * (the above code ignore the first of the two statements) to do what it is
+ * supposed to do (i.e.: asserting that methodName is called exactly two times.
+ * Once with parameters param1, param2 returning ret12, and once with
+ * parameters param3, param4 returning ret34 (which of the two happens first
+ * does not matter), you can use the following code:
+ *
+ *   $map = array(
+ * array( param1, param2, ret12),
+ * array( param3, param4, ret34)
+ *   );
+ *   mock->expects( $this->exactly( count( $map ) ) )
+ *   ->method( 'methodName' )
+ *   ->will( new DroppingReturnValueMap( $map ) );
+ *
+ * This code asserts that each parameter given in $map is used exactly once,
+ * while each call returns the given return value.
+ *
+ *
+ * The implementation of DroppingReturnValueMap is based off of
+ * PHPUnit_Framework_MockObject_Stub_ReturnValueMap from PHPUnit_MockObject by
+ * Sebastian Bergmann (under the 3-clause-BSD licence).
+ */
+class DroppingReturnValueMap implements PHPUnit_Framework_MockObject_Stub {
+   protected $valueMap;
+
+   public function __construct( array $valueMap ) {
+   $this->valueMap = $valueMap;
+   }
+
+   public function invoke( PHPUnit_Framework_MockObject_Invocation 
$invocation ) {
+   $parameterCount = count( $invocation->parameters );
+
+   foreach ( $this->valueMap as $key => $map ) {
+   if ( !is_array( $map ) || $parameterCount != count( 
$map ) - 1 ) {
+   continue;
+   }
+
+   $return = array_pop( $map );
+   if ( $invocation->parameters === $map ) {
+   unset( $this->valueMap[$key] );
+
+   return $return;
+   }
+   }
+
+   // Could not find the actual parameters in valueMap. We signal 
failure, after
+   // formatting the actual parameters in $actual, to have a nice 
error message
+   $actual = "(";
+   $connective = "";
+   foreach ( $invocation->parameters as $parameter ) {
+   $actual .= $connective . " ";
+   try {
+   $actual 

[MediaWiki-commits] [Gerrit] mediawiki...ActiveAbstract[wmf/1.31.0-wmf.15]: Revert "Simplify use of --plugin argument of BackupDumper"

2018-01-04 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402063 )

Change subject: Revert "Simplify use of --plugin argument of BackupDumper"
..

Revert "Simplify use of --plugin argument of BackupDumper"

This reverts commit 44db8fe33d60ffda4d2081b4c2d825d214507540.

Change-Id: I4040d8cfc9d87efd72f8c248fa7df6711738e59b
---
M AbstractFilter.php
M GoogleCoopFilter.php
M tests/phpunit/backup_AbstractTest.php
3 files changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ActiveAbstract 
refs/changes/63/402063/1

diff --git a/AbstractFilter.php b/AbstractFilter.php
index 4fe3b11..6fb55cf 100644
--- a/AbstractFilter.php
+++ b/AbstractFilter.php
@@ -4,7 +4,7 @@
  * Plugin for dumpBackup.php; call as eg:
  *
  * php dumpBackup.php \
- *   --plugin=AbstractFilter \
+ *   --plugin=AbstractFilter:extensions/ActiveAbstract/AbstractFilter.php \
  *   --current \
  *   --output=gzip:/dumps/abstract.xml.gz \
  * --filter=namespace:NS_MAIN \
diff --git a/GoogleCoopFilter.php b/GoogleCoopFilter.php
index e55a0c1..9fa2ea0 100644
--- a/GoogleCoopFilter.php
+++ b/GoogleCoopFilter.php
@@ -7,7 +7,7 @@
  * Usage:
  *
  * HOSTNAME=kamelopedia.mormo.org php dumpBackup.php \
- *--plugin=GoogleCoopFilter \
+ *--plugin=GoogleCoopFilter:Extension/ActiveAbstract/GoogleCoopFilter.php \
  *--current --output=file:coop3.xml --filter=namespace:NS_MAIN \
  *--filter=noredirect --filter=googlecoop
  *
diff --git a/tests/phpunit/backup_AbstractTest.php 
b/tests/phpunit/backup_AbstractTest.php
index 69f8cc0..4ead490 100644
--- a/tests/phpunit/backup_AbstractTest.php
+++ b/tests/phpunit/backup_AbstractTest.php
@@ -162,7 +162,7 @@
// Setting up the dump
$fname = $this->getNewTempFile();
$dumper = new BackupDumper( [
-   "--plugin=AbstractFilter",
+   
"--plugin=AbstractFilter:$IP/extensions/ActiveAbstract/AbstractFilter.php",
"--output=file:" . $fname, "--filter=abstract" ] );
$dumper->startId = $this->pageId1;
$dumper->endId = $this->pageId4 + 1; // Not including the 
redirect page (db isolation)
@@ -320,7 +320,7 @@
// Setting up the dump
$fname = $this->getNewTempFile();
$dumper = new BackupDumper( [
-   "--plugin=AbstractFilter",
+   
"--plugin=AbstractFilter:$IP/extensions/ActiveAbstract/AbstractFilter.php",
"--current", "--output=file:" . $fname, 
"--filter=namespace:NS_MAIN",
"--filter=noredirect", "--filter=abstract"
] );

-- 
To view, visit https://gerrit.wikimedia.org/r/402063
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4040d8cfc9d87efd72f8c248fa7df6711738e59b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ActiveAbstract
Gerrit-Branch: wmf/1.31.0-wmf.15
Gerrit-Owner: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...ActiveAbstract[wmf/1.31.0-wmf.15]: Revert "Move classes to own files"

2018-01-04 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402062 )

Change subject: Revert "Move classes to own files"
..

Revert "Move classes to own files"

This reverts commit 506e58f5f05571cf2ae6acaf76204a63775fd3c6.

Change-Id: I3dd113313c1d1711636693b1b952b49996e4f518
---
M .phpcs.xml
M AbstractFilter.php
M GoogleCoopFilter.php
D NoredirectFilter.php
M extension.json
M tests/phpunit/AbstractFilterTest.php
D tests/phpunit/DroppingReturnValueMap.php
R tests/phpunit/backup_AbstractTest.php
8 files changed, 105 insertions(+), 111 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ActiveAbstract 
refs/changes/62/402062/1

diff --git a/.phpcs.xml b/.phpcs.xml
index e382191..eca824a 100644
--- a/.phpcs.xml
+++ b/.phpcs.xml
@@ -2,6 +2,8 @@
 


+   
+   



diff --git a/AbstractFilter.php b/AbstractFilter.php
index 2d00c76..4fe3b11 100644
--- a/AbstractFilter.php
+++ b/AbstractFilter.php
@@ -297,3 +297,13 @@
$this->revision = $rev;
}
 }
+
+class NoredirectFilter extends DumpFilter {
+   /**
+* @param stdClass $page
+* @return bool
+*/
+   function pass( $page ) {
+   return !$page->page_is_redirect;
+   }
+}
diff --git a/GoogleCoopFilter.php b/GoogleCoopFilter.php
index 418d355..e55a0c1 100644
--- a/GoogleCoopFilter.php
+++ b/GoogleCoopFilter.php
@@ -1,4 +1,5 @@
 page_is_redirect;
-   }
-}
diff --git a/extension.json b/extension.json
index 4383ff3..95861eb 100644
--- a/extension.json
+++ b/extension.json
@@ -15,11 +15,5 @@
"i18n"
]
},
-   "AutoloadClasses": {
-   "AbstractFilter": "AbstractFilter.php",
-   "DroppingReturnValueMap": 
"tests/phpunit/DroppingReturnValueMap.php",
-   "NoredirectFilter": "NoredirectFilter.php",
-   "GoogleCoopFilter": "GoogleCoopFilter.php"
-   },
"manifest_version": 1
 }
diff --git a/tests/phpunit/AbstractFilterTest.php 
b/tests/phpunit/AbstractFilterTest.php
index d9b3f59..3698016 100644
--- a/tests/phpunit/AbstractFilterTest.php
+++ b/tests/phpunit/AbstractFilterTest.php
@@ -1,4 +1,95 @@
 expects( $this->once() )
+ *   ->method( 'methodName' )
+ *   ->parameters( $this->equalTo( param1 ), $this->equalTo( param2 ) )
+ *   ->will( $this->returnValue( ret12 ) );
+ *   mock->expects( $this->once() )
+ *   ->method( 'methodName' )
+ *   ->parameters( $this->equalTo( param3 ), $this->equalTo( param4 ) )
+ *   ->will( $this->returnValue( ret34 ) );
+ *
+ * (the above code ignore the first of the two statements) to do what it is
+ * supposed to do (i.e.: asserting that methodName is called exactly two times.
+ * Once with parameters param1, param2 returning ret12, and once with
+ * parameters param3, param4 returning ret34 (which of the two happens first
+ * does not matter), you can use the following code:
+ *
+ *   $map = array(
+ * array( param1, param2, ret12),
+ * array( param3, param4, ret34)
+ *   );
+ *   mock->expects( $this->exactly( count( $map ) ) )
+ *   ->method( 'methodName' )
+ *   ->will( new DroppingReturnValueMap( $map ) );
+ *
+ * This code asserts that each parameter given in $map is used exactly once,
+ * while each call returns the given return value.
+ *
+ *
+ * The implementation of DroppingReturnValueMap is based off of
+ * PHPUnit_Framework_MockObject_Stub_ReturnValueMap from PHPUnit_MockObject by
+ * Sebastian Bergmann (under the 3-clause-BSD licence).
+ */
+class DroppingReturnValueMap implements PHPUnit_Framework_MockObject_Stub {
+   protected $valueMap;
+
+   public function __construct( array $valueMap ) {
+   $this->valueMap = $valueMap;
+   }
+
+   public function invoke( PHPUnit_Framework_MockObject_Invocation 
$invocation ) {
+   $parameterCount = count( $invocation->parameters );
+
+   foreach ( $this->valueMap as $key => $map ) {
+   if ( !is_array( $map ) || $parameterCount != count( 
$map ) - 1 ) {
+   continue;
+   }
+
+   $return = array_pop( $map );
+   if ( $invocation->parameters === $map ) {
+   unset( $this->valueMap[$key] );
+
+   return $return;
+   }
+   }
+
+   // Could not find the actual parameters in valueMap. We signal 
failure, after
+   // formatting the actual parameters in $actual, to have a nice 
error message
+   $actual = "(";
+   $connective = "";
+   foreach ( $invocation->parameters as $parameter ) {
+   $actual .= $connective . " ";
+   try {
+   

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Releases: Install composer alongside Jenkins

2018-01-03 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/401804 )

Change subject: Releases: Install composer alongside Jenkins
..

Releases: Install composer alongside Jenkins

Change-Id: Iec8034bc05f44a151c9143d8b0090d2889380241
---
M modules/profile/manifests/releases/mediawiki.pp
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/04/401804/1

diff --git a/modules/profile/manifests/releases/mediawiki.pp 
b/modules/profile/manifests/releases/mediawiki.pp
index 714e3f7..525689a 100644
--- a/modules/profile/manifests/releases/mediawiki.pp
+++ b/modules/profile/manifests/releases/mediawiki.pp
@@ -23,6 +23,8 @@
 prefix   => $prefix,
 }
 
+class { '::contint::composer': }
+
 class { '::apache::mod::rewrite': }
 class { '::apache::mod::headers': }
 class { '::apache::mod::proxy': }

-- 
To view, visit https://gerrit.wikimedia.org/r/401804
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iec8034bc05f44a151c9143d8b0090d2889380241
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Group1 to wmf.15

2018-01-03 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/401763 )

Change subject: Group1 to wmf.15
..

Group1 to wmf.15

Change-Id: Iddfbf3d66eb033243921d26e9efcc39e126d7de5
---
M php
M wikiversions.json
2 files changed, 488 insertions(+), 488 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config 
refs/changes/63/401763/1

diff --git a/php b/php
index 4d3297b..bc11eee 12
--- a/php
+++ b/php
@@ -1 +1 @@
-php-1.31.0-wmf.12
\ No newline at end of file
+php-1.31.0-wmf.15
\ No newline at end of file
diff --git a/wikiversions.json b/wikiversions.json
index 4bfdfec..5099ebb 100644
--- a/wikiversions.json
+++ b/wikiversions.json
@@ -8,9 +8,9 @@
 "advisorywiki": "php-1.31.0-wmf.15",
 "adywiki": "php-1.31.0-wmf.12",
 "afwiki": "php-1.31.0-wmf.12",
-"afwikibooks": "php-1.31.0-wmf.12",
-"afwikiquote": "php-1.31.0-wmf.12",
-"afwiktionary": "php-1.31.0-wmf.12",
+"afwikibooks": "php-1.31.0-wmf.15",
+"afwikiquote": "php-1.31.0-wmf.15",
+"afwiktionary": "php-1.31.0-wmf.15",
 "akwiki": "php-1.31.0-wmf.12",
 "akwikibooks": "php-1.31.0-wmf.15",
 "akwiktionary": "php-1.31.0-wmf.15",
@@ -19,16 +19,16 @@
 "alswikiquote": "php-1.31.0-wmf.15",
 "alswiktionary": "php-1.31.0-wmf.15",
 "amwiki": "php-1.31.0-wmf.12",
-"amwikimedia": "php-1.31.0-wmf.12",
+"amwikimedia": "php-1.31.0-wmf.15",
 "amwikiquote": "php-1.31.0-wmf.15",
-"amwiktionary": "php-1.31.0-wmf.12",
+"amwiktionary": "php-1.31.0-wmf.15",
 "angwiki": "php-1.31.0-wmf.12",
 "angwikibooks": "php-1.31.0-wmf.15",
 "angwikiquote": "php-1.31.0-wmf.15",
 "angwikisource": "php-1.31.0-wmf.15",
-"angwiktionary": "php-1.31.0-wmf.12",
+"angwiktionary": "php-1.31.0-wmf.15",
 "anwiki": "php-1.31.0-wmf.12",
-"anwiktionary": "php-1.31.0-wmf.12",
+"anwiktionary": "php-1.31.0-wmf.15",
 "arbcom_cswiki": "php-1.31.0-wmf.12",
 "arbcom_dewiki": "php-1.31.0-wmf.12",
 "arbcom_enwiki": "php-1.31.0-wmf.12",
@@ -36,55 +36,55 @@
 "arbcom_nlwiki": "php-1.31.0-wmf.12",
 "arcwiki": "php-1.31.0-wmf.12",
 "arwiki": "php-1.31.0-wmf.12",
-"arwikibooks": "php-1.31.0-wmf.12",
-"arwikimedia": "php-1.31.0-wmf.12",
-"arwikinews": "php-1.31.0-wmf.12",
-"arwikiquote": "php-1.31.0-wmf.12",
-"arwikisource": "php-1.31.0-wmf.12",
-"arwikiversity": "php-1.31.0-wmf.12",
-"arwiktionary": "php-1.31.0-wmf.12",
+"arwikibooks": "php-1.31.0-wmf.15",
+"arwikimedia": "php-1.31.0-wmf.15",
+"arwikinews": "php-1.31.0-wmf.15",
+"arwikiquote": "php-1.31.0-wmf.15",
+"arwikisource": "php-1.31.0-wmf.15",
+"arwikiversity": "php-1.31.0-wmf.15",
+"arwiktionary": "php-1.31.0-wmf.15",
 "arzwiki": "php-1.31.0-wmf.12",
 "astwiki": "php-1.31.0-wmf.12",
 "astwikibooks": "php-1.31.0-wmf.15",
 "astwikiquote": "php-1.31.0-wmf.15",
-"astwiktionary": "php-1.31.0-wmf.12",
+"astwiktionary": "php-1.31.0-wmf.15",
 "aswiki": "php-1.31.0-wmf.12",
 "aswikibooks": "php-1.31.0-wmf.15",
-"aswikisource": "php-1.31.0-wmf.12",
+"aswikisource": "php-1.31.0-wmf.15",
 "aswiktionary": "php-1.31.0-wmf.15",
 "atjwiki": "php-1.31.0-wmf.12",
-"auditcomwiki": "php-1.31.0-wmf.12",
+"auditcomwiki": "php-1.31.0-wmf.15",
 "avwiki": "php-1.31.0-wmf.12",
 "avwiktionary": "php-1.31.0-wmf.15",
 "aywiki": "php-1.31.0-wmf.12",
 "aywikibooks": "php-1.31.0-wmf.15",
-"aywiktionary": "php-1.31.0-wmf.12",
+"aywiktionary": "php-1.31.0-wmf.15",
 "azbwiki": "php-1.31.0-wmf.12",
 "azwiki": "php-1.31.0-wmf.12",
-"azwikibooks": "php-1.31.0-wmf.12",
-"azwikiquote": "php-1.31.0-wmf.12",
-"azwikisource": "php-1.31.0-wmf.12",
-"azwiktionary": "php-1.31.0-wmf.12",
+"azwikibooks": "php-1.31.0-wmf.15",
+"azwikiquote": "php-1.31.0-wmf.15",
+"azwikisource": "php-1.31.0-wmf.15",
+"azwiktionary": "php-1.31.0-wmf.15",
 "barwiki": "php-1.31.0-wmf.12",
 "bat_smgwiki": "php-1.31.0-wmf.12",
 "bawiki": "php-1.31.0-wmf.12",
-"bawikibooks": "php-1.31.0-wmf.12",
+"bawikibooks": "php-1.31.0-wmf.15",
 "bclwiki": "php-1.31.0-wmf.12",
-"bdwikimedia": "php-1.31.0-wmf.12",
+"bdwikimedia": "php-1.31.0-wmf.15",
 "be_x_oldwiki": "php-1.31.0-wmf.12",
-"betawikiversity": "php-1.31.0-wmf.12",
+"betawikiversity": "php-1.31.0-wmf.15",
 "bewiki": "php-1.31.0-wmf.12",
-"bewikibooks": "php-1.31.0-wmf.12",
-"bewikimedia": "php-1.31.0-wmf.12",
-"bewikiquote": "php-1.31.0-wmf.12",
-"bewikisource": "php-1.31.0-wmf.12",
-"bewiktionary": "php-1.31.0-wmf.12",
+"bewikibooks": "php-1.31.0-wmf.15",
+"bewikimedia": "php-1.31.0-wmf.15",
+"bewikiquote": "php-1.31.0-wmf.15",
+"bewikisource": "php-1.31.0-wmf.15",
+"bewiktionary": "php-1.31.0-wmf.15",
 "bgwiki": "php-1.31.0-wmf.12",
-"bgwikibooks": 

[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[wmf/1.31.0-wmf.15]: Revert "Do not collapse references on diffs/old revisions"

2018-01-03 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/401753 )

Change subject: Revert "Do not collapse references on diffs/old revisions"
..

Revert "Do not collapse references on diffs/old revisions"

This reverts commit e70e72b3f124a4f8fcd8891bbb0595c7a2eff0e0.
This also reverts related commit
0864349b1db269d765b5689757b1223947b6bd05.

Change-Id: I9da46c36d8152a779ce7ac04a933197615c0cbbf
(cherry picked from commit e21bdc368b5a6e628800d0405d72a90384e75b43)
---
M repo/includes/Content/EntityContent.php
M repo/includes/ParserOutput/EntityParserOutputGenerator.php
M repo/includes/ParserOutput/EntityParserOutputGeneratorFactory.php
M repo/resources/wikibase.ui.entityViewInit.js
M 
repo/tests/phpunit/includes/ParserOutput/EntityParserOutputGeneratorFactoryTest.php
M repo/tests/phpunit/includes/ParserOutput/EntityParserOutputGeneratorTest.php
M view/autoload.php
M view/resources/wikibase/wikibase.less
A view/src/EmptyEditSectionGenerator.php
M view/src/StatementHtmlGenerator.php
A view/tests/phpunit/EmptyEditSectionGeneratorTest.php
M view/tests/phpunit/StatementHtmlGeneratorTest.php
12 files changed, 206 insertions(+), 31 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/53/401753/1

diff --git a/repo/includes/Content/EntityContent.php 
b/repo/includes/Content/EntityContent.php
index bfe1061..e5605ff 100644
--- a/repo/includes/Content/EntityContent.php
+++ b/repo/includes/Content/EntityContent.php
@@ -262,7 +262,8 @@
$entityParserOutputGeneratorFactory = 
WikibaseRepo::getDefaultInstance()->getEntityParserOutputGeneratorFactory();
 
$outputGenerator = 
$entityParserOutputGeneratorFactory->getEntityParserOutputGenerator(
-   $options->getUserLang()
+   $options->getUserLang(),
+   true
);
 
$entityRevision = $this->getEntityRevision( $revisionId );
diff --git a/repo/includes/ParserOutput/EntityParserOutputGenerator.php 
b/repo/includes/ParserOutput/EntityParserOutputGenerator.php
index f779ae5..c7d92ca 100644
--- a/repo/includes/ParserOutput/EntityParserOutputGenerator.php
+++ b/repo/includes/ParserOutput/EntityParserOutputGenerator.php
@@ -24,6 +24,7 @@
 use Wikibase\Repo\MediaWikiLanguageDirectionalityLookup;
 use Wikibase\Repo\MediaWikiLocalizedTextProvider;
 use Wikibase\Repo\View\RepoSpecialPageLinker;
+use Wikibase\View\EmptyEditSectionGenerator;
 use Wikibase\View\LocalizedTextProvider;
 use Wikibase\View\Template\TemplateFactory;
 use Wikibase\View\TermsListView;
@@ -90,6 +91,11 @@
private $languageCode;
 
/**
+* @var bool
+*/
+   private $editable;
+
+   /**
 * @param DispatchingEntityViewFactory $entityViewFactory
 * @param ParserOutputJsConfigBuilder $configBuilder
 * @param EntityTitleLookup $entityTitleLookup
@@ -100,6 +106,7 @@
 * @param EntityDataFormatProvider $entityDataFormatProvider
 * @param ParserOutputDataUpdater[] $dataUpdaters
 * @param string $languageCode
+* @param bool $editable
 */
public function __construct(
DispatchingEntityViewFactory $entityViewFactory,
@@ -111,7 +118,8 @@
LocalizedTextProvider $textProvider,
EntityDataFormatProvider $entityDataFormatProvider,
array $dataUpdaters,
-   $languageCode
+   $languageCode,
+   $editable
) {
$this->entityViewFactory = $entityViewFactory;
$this->configBuilder = $configBuilder;
@@ -123,6 +131,7 @@
$this->entityDataFormatProvider = $entityDataFormatProvider;
$this->dataUpdaters = $dataUpdaters;
$this->languageCode = $languageCode;
+   $this->editable = $editable;
}
 
/**
@@ -284,11 +293,11 @@
$this->languageFallbackChain
);
 
-   $editSectionGenerator = new ToolbarEditSectionGenerator(
+   $editSectionGenerator = $this->editable ? new 
ToolbarEditSectionGenerator(
new RepoSpecialPageLinker(),
$this->templateFactory,
$this->textProvider
-   );
+   ) : new EmptyEditSectionGenerator();
 
$languageDirectionalityLookup = new 
MediaWikiLanguageDirectionalityLookup();
$languageNameLookup = new LanguageNameLookup( 
$this->languageCode );
diff --git a/repo/includes/ParserOutput/EntityParserOutputGeneratorFactory.php 
b/repo/includes/ParserOutput/EntityParserOutputGeneratorFactory.php
index a614fca..481c971 100644
--- a/repo/includes/ParserOutput/EntityParserOutputGeneratorFactory.php
+++ b/repo/includes/ParserOutput/EntityParserOutputGeneratorFactory.php
@@ -131,10 +131,11 

[MediaWiki-commits] [Gerrit] operations...gerrit[master]: Add hooks plugin @ 2.13.9

2018-01-02 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/401697 )

Change subject: Add hooks plugin @ 2.13.9
..

Add hooks plugin @ 2.13.9

Bug: T183792
Change-Id: I04e249756eca097d931fdba716ebc0977a86a4b0
---
A plugins/hooks.jar
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/software/gerrit 
refs/changes/97/401697/1

diff --git a/plugins/hooks.jar b/plugins/hooks.jar
new file mode 100644
index 000..dc7fb87
--- /dev/null
+++ b/plugins/hooks.jar
@@ -0,0 +1 @@
+#$# git-fat 60dec32ba739f0ba3b46228ebbd370fae8702a5041228

-- 
To view, visit https://gerrit.wikimedia.org/r/401697
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I04e249756eca097d931fdba716ebc0977a86a4b0
Gerrit-PatchSet: 1
Gerrit-Project: operations/software/gerrit
Gerrit-Branch: master
Gerrit-Owner: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...release[master]: branch.py: Assume python3

2018-01-02 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/401676 )

Change subject: branch.py: Assume python3
..

branch.py: Assume python3

Change-Id: I496015c676d5ebe06b7b878aa364ca6f266de3f3
---
M make-release/branch.py
1 file changed, 2 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release 
refs/changes/76/401676/1

diff --git a/make-release/branch.py b/make-release/branch.py
index a212e0d..bc76e74 100755
--- a/make-release/branch.py
+++ b/make-release/branch.py
@@ -1,8 +1,6 @@
-#!/usr/bin/python
+#!/usr/bin/env python3
 # vim:sw=4:ts=4:et:
 """Stuff about making branches and so forth."""
-
-from __future__ import print_function
 
 import argparse
 import logging
@@ -16,7 +14,7 @@
 from pygerrit.rest import GerritRestAPI
 
 with open("make-release.yaml") as conf:
-CONFIG = yaml.load(conf)
+CONFIG = yaml.safe_load(conf)
 
 
 def _get_client():

-- 
To view, visit https://gerrit.wikimedia.org/r/401676
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I496015c676d5ebe06b7b878aa364ca6f266de3f3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...release[master]: Remove unused shell scripts

2018-01-02 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/401660 )

Change subject: Remove unused shell scripts
..

Remove unused shell scripts

- runtests.sh isn't useful anymore since we migrated to py.test
- branch_to_ver.sh seems unused anywhere

Change-Id: I41c151ea566f0d31c018c416eaf684d5675f418c
---
D make-release/branch_to_ver.sh
M make-release/make-branches
D make-release/runtests.sh
3 files changed, 1 insertion(+), 40 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release 
refs/changes/60/401660/1

diff --git a/make-release/branch_to_ver.sh b/make-release/branch_to_ver.sh
deleted file mode 100755
index 7adafd9..000
--- a/make-release/branch_to_ver.sh
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/bash
-#
-# Copyright 2017, Antoine "hashar" Musso 
-# Copyright 2017, Wikimedia Foundation Inc.
-#
-# Convert a MediaWiki releaseable branch name to a MediaWiki version
-# to be used with make-release.
-#
-# master is set to 99.99.99
-# semver patch is always 99
-
-set -eu
-
-usage() {
-   echo "Usage: branch_to_ver.sh "
-}
-
-branch_to_ver() {
-   local branch=$1
-   if [[ "$branch" == master ]] ; then
-   echo '99.99.99'
-   elif [[ $branch =~ ^REL([0-9]+)_([0-9]+)$ ]] ; then
-   echo "${BASH_REMATCH[1]}.${BASH_REMATCH[2]}.99"
-   fi
-}
-
-if [ "${#@}" -ne 1 ]; then
-   usage >&2
-   exit 1
-fi
-
-ver=$(branch_to_ver "$1")
-[ -z "$ver" ] && {
-   echo "Can not forge version for '$1'." >&2
-   exit 1
-}
-echo "$ver"
diff --git a/make-release/make-branches b/make-release/make-branches
index 1f65824..03c4f2d 100755
--- a/make-release/make-branches
+++ b/make-release/make-branches
@@ -2,12 +2,11 @@
 # vim:sw=4:ts=4:et:
 """Stuff about making branches and so forth"""
 
-
 from __future__ import print_function
 from requests.auth import HTTPDigestAuth
 from requests.exceptions import HTTPError
-from pygerrit.rest import GerritRestAPI
 import yaml
+from pygerrit.rest import GerritRestAPI
 
 
 def main():
diff --git a/make-release/runtests.sh b/make-release/runtests.sh
deleted file mode 100755
index 1580cac..000
--- a/make-release/runtests.sh
+++ /dev/null
@@ -1 +0,0 @@
-python -m unittest discover --verbose

-- 
To view, visit https://gerrit.wikimedia.org/r/401660
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I41c151ea566f0d31c018c416eaf684d5675f418c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: WIP: Add bundled extensions as submodules of core

2018-01-02 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/401659 )

Change subject: WIP: Add bundled extensions as submodules of core
..

WIP: Add bundled extensions as submodules of core

Couple of reasons:
- This removes the need for add/remove logic from makerelease.py
- Means we get to test core against the bundled release all the time
- Makes "branch MW for new stable release" super duper easy and don't
  need to add submodules after branching

Bug: T172927
Bug: T137564
Change-Id: Ibde3f44c2737c850b1a1455df4beefefd3e46db2
---
A .gitmodules
A extensions/Cite
A extensions/CiteThisPage
A extensions/ConfirmEdit
A extensions/Gadgets
A extensions/ImageMap
A extensions/InputBox
A extensions/Interwiki
A extensions/LocalisationUpdate
A extensions/Nuke
A extensions/ParserFunctions
A extensions/PdfHandler
A extensions/Poem
A extensions/Renameuser
A extensions/SpamBlacklist
A extensions/SyntaxHighlight_GeSHi
A extensions/TitleBlacklist
A extensions/WikiEditor
A skins/CologneBlue
A skins/Modern
A skins/MonoBook
A skins/Vector
22 files changed, 105 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/59/401659/1

diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 000..108cb52
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,84 @@
+[submodule "extensions/Cite"]
+   path = extensions/Cite
+   url = https://gerrit.wikimedia.org/r/extensions/Cite
+   branch = .
+[submodule "extensions/CiteThisPage"]
+   path = extensions/CiteThisPage
+   url = https://gerrit.wikimedia.org/r/extensions/CiteThisPage
+   branch = .
+[submodule "extensions/ConfirmEdit"]
+   path = extensions/ConfirmEdit
+   url = https://gerrit.wikimedia.org/r/extensions/ConfirmEdit
+   branch = .
+[submodule "extensions/Gadgets"]
+   path = extensions/Gadgets
+   url = https://gerrit.wikimedia.org/r/extensions/Gadgets
+   branch = .
+[submodule "extensions/ImageMap"]
+   path = extensions/ImageMap
+   url = https://gerrit.wikimedia.org/r/extensions/ImageMap
+   branch = .
+[submodule "extensions/InputBox"]
+   path = extensions/InputBox
+   url = https://gerrit.wikimedia.org/r/extensions/InputBox
+   branch = .
+[submodule "extensions/Interwiki"]
+   path = extensions/Interwiki
+   url = https://gerrit.wikimedia.org/r/extensions/Interwiki
+   branch = .
+[submodule "extensions/LocalisationUpdate"]
+   path = extensions/LocalisationUpdate
+   url = https://gerrit.wikimedia.org/r/extensions/LocalisationUpdate
+   branch = .
+[submodule "extensions/Nuke"]
+   path = extensions/Nuke
+   url = https://gerrit.wikimedia.org/r/extensions/Nuke
+   branch = .
+[submodule "extensions/ParserFunctions"]
+   path = extensions/ParserFunctions
+   url = https://gerrit.wikimedia.org/r/extensions/ParserFunctions
+   branch = .
+[submodule "extensions/PdfHandler"]
+   path = extensions/PdfHandler
+   url = https://gerrit.wikimedia.org/r/extensions/PdfHandler
+   branch = .
+[submodule "extensions/Poem"]
+   path = extensions/Poem
+   url = https://gerrit.wikimedia.org/r/extensions/Poem
+   branch = .
+[submodule "extensions/Renameuser"]
+   path = extensions/Renameuser
+   url = https://gerrit.wikimedia.org/r/extensions/Renameuser
+   branch = .
+[submodule "extensions/SpamBlacklist"]
+   path = extensions/SpamBlacklist
+   url = https://gerrit.wikimedia.org/r/extensions/SpamBlacklist
+   branch = .
+[submodule "extensions/SyntaxHighlight_GeSHi"]
+   path = extensions/SyntaxHighlight_GeSHi
+   url = https://gerrit.wikimedia.org/r/extensions/SyntaxHighlight_GeSHi
+   branch = .
+[submodule "extensions/TitleBlacklist"]
+   path = extensions/TitleBlacklist
+   url = https://gerrit.wikimedia.org/r/extensions/TitleBlacklist
+   branch = .
+[submodule "extensions/WikiEditor"]
+   path = extensions/WikiEditor
+   url = https://gerrit.wikimedia.org/r/extensions/WikiEditor
+   branch = .
+[submodule "skins/CologneBlue"]
+   path = skins/CologneBlue
+   url = https://gerrit.wikimedia.org/r/skins/CologneBlue
+   branch = .
+[submodule "skins/Modern"]
+   path = skins/Modern
+   url = https://gerrit.wikimedia.org/r/skins/Modern
+   branch = .
+[submodule "skins/MonoBook"]
+   path = skins/MonoBook
+   url = https://gerrit.wikimedia.org/r/skins/MonoBook
+   branch = .
+[submodule "skins/Vector"]
+   path = skins/Vector
+   url = https://gerrit.wikimedia.org/r/skins/Vector
+   branch = .
diff --git a/extensions/Cite b/extensions/Cite
new file mode 16
index 000..e2ebd23
--- /dev/null
+++ b/extensions/Cite
@@ -0,0 +1 @@
+Subproject commit e2ebd2352c6cacd2da19fe34f13f878eda19ad93
diff --git a/extensions/CiteThisPage b/extensions/CiteThisPage
new file mode 16
index 000..48de89b

[MediaWiki-commits] [Gerrit] mediawiki...release[master]: Migrate to pytest, remove some junk old tests

2018-01-02 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/401630 )

Change subject: Migrate to pytest, remove some junk old tests
..

Migrate to pytest, remove some junk old tests

Change-Id: Ibdbfc128704b0e7309956c23ab86ff65988ed32c
---
M .gitignore
D make-release/tests/test_make-release-yaml.py
D make-release/tests/test_make-release.py
A make-release/tests/test_makerelease-yaml.py
M test-requirements.txt
M tox.ini
6 files changed, 15 insertions(+), 57 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release 
refs/changes/30/401630/1

diff --git a/.gitignore b/.gitignore
index 9cfc581..a05a315 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@
 local.conf
 composer.lock
 /vendor
+.cache
diff --git a/make-release/tests/test_make-release-yaml.py 
b/make-release/tests/test_make-release-yaml.py
deleted file mode 100644
index a058784..000
--- a/make-release/tests/test_make-release-yaml.py
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/usr/bin/env python
-
-import os
-import unittest
-import yaml
-
-
-class MakeReleaseYamlTest(unittest.TestCase):
-fname = os.path.join(
-os.path.dirname(os.path.dirname(__file__)),
-'make-release.yaml'
-)
-
-def test_valid_syntax(self):
-with open(self.fname) as f:
-yaml.load(f)
-
-# No exception raised
-self.assertTrue(True)
diff --git a/make-release/tests/test_make-release.py 
b/make-release/tests/test_make-release.py
deleted file mode 100644
index 0867f8f..000
--- a/make-release/tests/test_make-release.py
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/usr/bin/env python2
-
-import unittest
-
-makerelease = __import__('makerelease')
-
-
-class Struct:
-def __init__(self, **entries):
-self.__dict__.update(entries)
-
-
-class MakeReleaseTest(unittest.TestCase):
-def getMakeRelease(self, options):
-if 'conffile' not in options:
-options['conffile'] = '../make-release.yaml'
-return makerelease.MakeRelease(Struct(**options))
-
-def test_get_extensions_for_version(self):
-mr = self.getMakeRelease({'version': '1.25.0'})
-# Added in 1.25
-self.assertIn('extensions/CiteThisPage',
-  mr.get_extensions_for_version(mr.version))
-
-mr = self.getMakeRelease({'version': '1.23.0'})
-# Removed in 1.23
-self.assertNotIn('extensions/SimpleAntiSpam',
- mr.get_extensions_for_version(mr.version))
-# But if explicitly specified, still included
-self.assertIn(
-'extensions/SimpleAntiSpam',
-mr.get_extensions_for_version(
-mr.version,
-['extensions/SimpleAntiSpam']
-)
-)
diff --git a/make-release/tests/test_makerelease-yaml.py 
b/make-release/tests/test_makerelease-yaml.py
new file mode 100644
index 000..f33790d
--- /dev/null
+++ b/make-release/tests/test_makerelease-yaml.py
@@ -0,0 +1,12 @@
+import os
+import yaml
+
+
+def test_valid_syntax():
+fname = os.path.join(
+os.path.dirname(os.path.dirname(__file__)),
+'make-release.yaml'
+)
+
+with open(fname) as conf:
+yaml.load(conf)
diff --git a/test-requirements.txt b/test-requirements.txt
index f3c7e8e..e079f8a 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -1 +1 @@
-nose
+pytest
diff --git a/tox.ini b/tox.ini
index a9c2742..17c0b1b 100644
--- a/tox.ini
+++ b/tox.ini
@@ -7,7 +7,7 @@
 setenv = VIRTUAL_ENV={envdir}
 deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
-commands = nosetests
+commands = py.test
 
 [testenv:flake8]
 commands = flake8

-- 
To view, visit https://gerrit.wikimedia.org/r/401630
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibdbfc128704b0e7309956c23ab86ff65988ed32c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...release[master]: Remove pre-SemVer support

2018-01-02 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/401623 )

Change subject: Remove pre-SemVer support
..

Remove pre-SemVer support

Change-Id: I30aaad71633436e637ba953407ff49c679efeeda
---
M make-release/makerelease.py
1 file changed, 2 insertions(+), 20 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release 
refs/changes/23/401623/1

diff --git a/make-release/makerelease.py b/make-release/makerelease.py
index 483a963..6ac0297 100755
--- a/make-release/makerelease.py
+++ b/make-release/makerelease.py
@@ -179,19 +179,7 @@
 del ret['major2']
 
 try:
-# Special case for when we switched to semantic versioning
-if(ret['major'] <= '1.22' or
-   (ret['major'] == '1.23' and
-ret['minor'] == '0' and
-(ret['phase'] == 'rc' and
- ret['cycle'] == '0'))):
-ret['tag'] = 'tags/%s.%s%s%s' % (
-ret['major'],
-ret['minor'],
-ret.get('phase', ''),
-ret.get('cycle', '')
-)
-elif 'phase' in ret:
+if 'phase' in ret:
 ret['tag'] = 'tags/%s.%s-%s.%s' % (
 ret['major'],
 ret['minor'],
@@ -222,13 +210,7 @@
 
 bits[last] = str(int(bits[last]) - 1)
 
-if(bits[0] <= '1.22' or
-   (bits[0] == '1.23' and
-bits[1] == '0' and
-(bits[2] == 'rc' and
- bits[3] == '0'))):
-ret['prev_version'] = '%s.%s%s%s' % tuple(bits)
-elif 'phase' in ret:
+if 'phase' in ret:
 ret['prev_version'] = '%s.%s-%s.%s' % tuple(bits)
 else:
 ret['prev_version'] = '%s.%s' % (bits[0], bits[1])

-- 
To view, visit https://gerrit.wikimedia.org/r/401623
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I30aaad71633436e637ba953407ff49c679efeeda
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...release[master]: Do composer update after cloning

2018-01-02 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/401624 )

Change subject: Do composer update after cloning
..

Do composer update after cloning

Change-Id: I4d9567d12874b47eeeacacec470812a85b740579
---
M make-release/makerelease.py
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release 
refs/changes/24/401624/1

diff --git a/make-release/makerelease.py b/make-release/makerelease.py
index 6ac0297..a9463a7 100755
--- a/make-release/makerelease.py
+++ b/make-release/makerelease.py
@@ -505,6 +505,8 @@
 self.export(tag, package, build_dir,
 self.get_patches_for_repo('core', patch_dir))
 
+os.chdir(os.path.join(build_dir, package))
+subprocess.check_output(['composer', 'update', '--no-dev'])
 self.export_ext(branch, 'vendor', package,
 self.get_patches_for_repo('vendor', patch_dir))
 

-- 
To view, visit https://gerrit.wikimedia.org/r/401624
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4d9567d12874b47eeeacacec470812a85b740579
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Better grouping for can't-figure-out-what-caused-match error

2018-01-02 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/401613 )

Change subject: Better grouping for can't-figure-out-what-caused-match error
..

Better grouping for can't-figure-out-what-caused-match error

Change-Id: I967aca881c3d47bbeef33d48f0176a4d4af266ba
---
M includes/Search/ResultsType.php
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch 
refs/changes/13/401613/1

diff --git a/includes/Search/ResultsType.php b/includes/Search/ResultsType.php
index b41d531..08fe782 100644
--- a/includes/Search/ResultsType.php
+++ b/includes/Search/ResultsType.php
@@ -272,7 +272,8 @@
// We're not really sure where the match came from so 
lets just pretend it was the title.
LoggerFactory::getInstance( 'CirrusSearch' )
->warning( "Title search result type hit a 
match but we can't " .
-  "figure out what caused the 
match:  $r->namespace:$r->title" );
+   "figure out what caused the match: 
{namespace}:{title}",
+   [ 'namespace' => $r->namespace, 'title' 
=> $r->title ] );
$resultForTitle['titleMatch'] = $title;
}
 

-- 
To view, visit https://gerrit.wikimedia.org/r/401613
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I967aca881c3d47bbeef33d48f0176a4d4af266ba
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...release[master]: Remove support for mediawiki < 1.27

2018-01-02 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/401577 )

Change subject: Remove support for mediawiki < 1.27
..

Remove support for mediawiki < 1.27

Change-Id: I7fc8c5bab96b94e08547e7930ceb61bbe33d66b6
---
M make-release/makerelease.py
1 file changed, 0 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release 
refs/changes/77/401577/1

diff --git a/make-release/makerelease.py b/make-release/makerelease.py
index 9ded8bf..483a963 100755
--- a/make-release/makerelease.py
+++ b/make-release/makerelease.py
@@ -412,10 +412,6 @@
 logging.info('Done with exporting core')
 
 def export_ext(self, branch, extension, input_dir, patches=None):
-# We started doing them as submodules instead
-if self.version.major < '1.29':
-self.get_git(extension, input_dir + '/' + extension, branch)
-
 if patches:
 self.apply_patches(patches, input_dir + '/' + extension)
 

-- 
To view, visit https://gerrit.wikimedia.org/r/401577
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7fc8c5bab96b94e08547e7930ceb61bbe33d66b6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...release[master]: Stop branching vendor

2018-01-02 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/401574 )

Change subject: Stop branching vendor
..

Stop branching vendor

Bug: T172927
Change-Id: I879a9d5578e036f42238f3c587b5b434e6abcffa
---
M make-release/make-branches
1 file changed, 1 insertion(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release 
refs/changes/74/401574/1

diff --git a/make-release/make-branches b/make-release/make-branches
index f7cbe21..1f65824 100755
--- a/make-release/make-branches
+++ b/make-release/make-branches
@@ -18,10 +18,9 @@
 auth = HTTPDigestAuth(config['username'], config['password'])
 rest = GerritRestAPI(url='https://gerrit.wikimedia.org/r/', auth=auth)
 
-things_to_branch = ['mediawiki/core', 'mediawiki/vendor']
+things_to_branch = ['mediawiki/core']
 manual_branch_points = {
 'mediawiki/core': '0cd28e19cb0f9385a2a1cc11a4d8c9c21ff0b830',
-'mediawiki/vendor': '68b54dbcd8d65de64225a4ccc9dceb94429ca42a',
 }
 shit_to_skip = ['mediawiki/extensions/BlueSpiceExtendedStatistics',
 'mediawiki/extensions/BlueSpiceUserManager']

-- 
To view, visit https://gerrit.wikimedia.org/r/401574
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I879a9d5578e036f42238f3c587b5b434e6abcffa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: group0 to wmf.15

2018-01-02 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/401559 )

Change subject: group0 to wmf.15
..

group0 to wmf.15

Change-Id: I3b949d27e6adf522f1f46777ab3e1187818f7b86
---
M wikiversions.json
1 file changed, 136 insertions(+), 136 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config 
refs/changes/59/401559/1

diff --git a/wikiversions.json b/wikiversions.json
index 119dad2..4bfdfec 100644
--- a/wikiversions.json
+++ b/wikiversions.json
@@ -1,31 +1,31 @@
 {
 "aawiki": "php-1.31.0-wmf.12",
-"aawikibooks": "php-1.31.0-wmf.12",
-"aawiktionary": "php-1.31.0-wmf.12",
+"aawikibooks": "php-1.31.0-wmf.15",
+"aawiktionary": "php-1.31.0-wmf.15",
 "abwiki": "php-1.31.0-wmf.12",
-"abwiktionary": "php-1.31.0-wmf.12",
+"abwiktionary": "php-1.31.0-wmf.15",
 "acewiki": "php-1.31.0-wmf.12",
-"advisorywiki": "php-1.31.0-wmf.12",
+"advisorywiki": "php-1.31.0-wmf.15",
 "adywiki": "php-1.31.0-wmf.12",
 "afwiki": "php-1.31.0-wmf.12",
 "afwikibooks": "php-1.31.0-wmf.12",
 "afwikiquote": "php-1.31.0-wmf.12",
 "afwiktionary": "php-1.31.0-wmf.12",
 "akwiki": "php-1.31.0-wmf.12",
-"akwikibooks": "php-1.31.0-wmf.12",
-"akwiktionary": "php-1.31.0-wmf.12",
+"akwikibooks": "php-1.31.0-wmf.15",
+"akwiktionary": "php-1.31.0-wmf.15",
 "alswiki": "php-1.31.0-wmf.12",
-"alswikibooks": "php-1.31.0-wmf.12",
-"alswikiquote": "php-1.31.0-wmf.12",
-"alswiktionary": "php-1.31.0-wmf.12",
+"alswikibooks": "php-1.31.0-wmf.15",
+"alswikiquote": "php-1.31.0-wmf.15",
+"alswiktionary": "php-1.31.0-wmf.15",
 "amwiki": "php-1.31.0-wmf.12",
 "amwikimedia": "php-1.31.0-wmf.12",
-"amwikiquote": "php-1.31.0-wmf.12",
+"amwikiquote": "php-1.31.0-wmf.15",
 "amwiktionary": "php-1.31.0-wmf.12",
 "angwiki": "php-1.31.0-wmf.12",
-"angwikibooks": "php-1.31.0-wmf.12",
-"angwikiquote": "php-1.31.0-wmf.12",
-"angwikisource": "php-1.31.0-wmf.12",
+"angwikibooks": "php-1.31.0-wmf.15",
+"angwikiquote": "php-1.31.0-wmf.15",
+"angwikisource": "php-1.31.0-wmf.15",
 "angwiktionary": "php-1.31.0-wmf.12",
 "anwiki": "php-1.31.0-wmf.12",
 "anwiktionary": "php-1.31.0-wmf.12",
@@ -45,19 +45,19 @@
 "arwiktionary": "php-1.31.0-wmf.12",
 "arzwiki": "php-1.31.0-wmf.12",
 "astwiki": "php-1.31.0-wmf.12",
-"astwikibooks": "php-1.31.0-wmf.12",
-"astwikiquote": "php-1.31.0-wmf.12",
+"astwikibooks": "php-1.31.0-wmf.15",
+"astwikiquote": "php-1.31.0-wmf.15",
 "astwiktionary": "php-1.31.0-wmf.12",
 "aswiki": "php-1.31.0-wmf.12",
-"aswikibooks": "php-1.31.0-wmf.12",
+"aswikibooks": "php-1.31.0-wmf.15",
 "aswikisource": "php-1.31.0-wmf.12",
-"aswiktionary": "php-1.31.0-wmf.12",
+"aswiktionary": "php-1.31.0-wmf.15",
 "atjwiki": "php-1.31.0-wmf.12",
 "auditcomwiki": "php-1.31.0-wmf.12",
 "avwiki": "php-1.31.0-wmf.12",
-"avwiktionary": "php-1.31.0-wmf.12",
+"avwiktionary": "php-1.31.0-wmf.15",
 "aywiki": "php-1.31.0-wmf.12",
-"aywikibooks": "php-1.31.0-wmf.12",
+"aywikibooks": "php-1.31.0-wmf.15",
 "aywiktionary": "php-1.31.0-wmf.12",
 "azbwiki": "php-1.31.0-wmf.12",
 "azwiki": "php-1.31.0-wmf.12",
@@ -86,15 +86,15 @@
 "bgwikisource": "php-1.31.0-wmf.12",
 "bgwiktionary": "php-1.31.0-wmf.12",
 "bhwiki": "php-1.31.0-wmf.12",
-"bhwiktionary": "php-1.31.0-wmf.12",
+"bhwiktionary": "php-1.31.0-wmf.15",
 "biwiki": "php-1.31.0-wmf.12",
-"biwikibooks": "php-1.31.0-wmf.12",
-"biwiktionary": "php-1.31.0-wmf.12",
+"biwikibooks": "php-1.31.0-wmf.15",
+"biwiktionary": "php-1.31.0-wmf.15",
 "bjnwiki": "php-1.31.0-wmf.12",
 "bmwiki": "php-1.31.0-wmf.12",
-"bmwikibooks": "php-1.31.0-wmf.12",
-"bmwikiquote": "php-1.31.0-wmf.12",
-"bmwiktionary": "php-1.31.0-wmf.12",
+"bmwikibooks": "php-1.31.0-wmf.15",
+"bmwikiquote": "php-1.31.0-wmf.15",
+"bmwiktionary": "php-1.31.0-wmf.15",
 "bnwiki": "php-1.31.0-wmf.12",
 "bnwikibooks": "php-1.31.0-wmf.12",
 "bnwikisource": "php-1.31.0-wmf.12",
@@ -102,8 +102,8 @@
 "boardgovcomwiki": "php-1.31.0-wmf.12",
 "boardwiki": "php-1.31.0-wmf.12",
 "bowiki": "php-1.31.0-wmf.12",
-"bowikibooks": "php-1.31.0-wmf.12",
-"bowiktionary": "php-1.31.0-wmf.12",
+"bowikibooks": "php-1.31.0-wmf.15",
+"bowiktionary": "php-1.31.0-wmf.15",
 "bpywiki": "php-1.31.0-wmf.12",
 "brwiki": "php-1.31.0-wmf.12",
 "brwikimedia": "php-1.31.0-wmf.12",
@@ -132,26 +132,26 @@
 "chairwiki": "php-1.31.0-wmf.12",
 "chapcomwiki": "php-1.31.0-wmf.12",
 "checkuserwiki": "php-1.31.0-wmf.12",
-"chowiki": "php-1.31.0-wmf.12",
+"chowiki": "php-1.31.0-wmf.15",
 "chrwiki": "php-1.31.0-wmf.12",
 "chrwiktionary": "php-1.31.0-wmf.12",
 "chwiki": "php-1.31.0-wmf.12",
-

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Remove trailing slash, $prefix already does that

2017-12-22 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/399892 )

Change subject: Remove trailing slash, $prefix already does that
..

Remove trailing slash, $prefix already does that

Change-Id: Ie74d82bfc064e23bad774021c74ac504e9d05d4f
---
M modules/releases/templates/apache-jenkins.conf.erb
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/92/399892/1

diff --git a/modules/releases/templates/apache-jenkins.conf.erb 
b/modules/releases/templates/apache-jenkins.conf.erb
index 8853f3a..628ef48 100644
--- a/modules/releases/templates/apache-jenkins.conf.erb
+++ b/modules/releases/templates/apache-jenkins.conf.erb
@@ -16,7 +16,7 @@
 ProxyRequests Off
 ProxyVia Off
 ProxyPreserveHost On
-ProxyPass <%= @prefix -%> http://127.0.0.1:<%= @http_port -%><%= @prefix 
-%>/ retry=0 nocanon
+ProxyPass <%= @prefix -%> http://127.0.0.1:<%= @http_port -%><%= @prefix 
-%> retry=0 nocanon
 ProxyPassReverse <%= @prefix -%> http://localhost:<%= @http_port -%><%= 
@prefix -%>
 
 ErrorLog /var/log/apache2/<%= @sitename_jenkins %>.error.log

-- 
To view, visit https://gerrit.wikimedia.org/r/399892
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie74d82bfc064e23bad774021c74ac504e9d05d4f
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...release[master]: make-release: Actually make snapshot names sensible

2017-12-22 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/399889 )

Change subject: make-release: Actually make snapshot names sensible
..

make-release: Actually make snapshot names sensible

Change-Id: I26f292839d5144b09e4b9b1f2a5d9a0f733ef9bc
---
M make-release/makerelease.py
1 file changed, 5 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release 
refs/changes/89/399889/1

diff --git a/make-release/makerelease.py b/make-release/makerelease.py
index 9ded8bf..0d01660 100755
--- a/make-release/makerelease.py
+++ b/make-release/makerelease.py
@@ -108,8 +108,9 @@
 self.cycle = decomposed.get('cycle', None)
 
 @classmethod
-def new_snapshot(cls):
-return cls('snapshot-' + time.strftime('%Y%m%d', time.gmtime()))
+def new_snapshot(cls, branch='master'):
+return cls('snapshot-{}-{}'.format(
+branch, time.strftime('%Y%m%d', time.gmtime(
 
 def __repr__(self):
 if self.raw is None:
@@ -242,7 +243,7 @@
 """Surprisingly: do a MediaWiki release"""
 def __init__(self, ops):
 if ops.version is None:
-self.version = MwVersion.new_snapshot()
+self.version = MwVersion.new_snapshot(ops.branch)
 else:
 self.version = MwVersion(ops.version)
 self.options = ops
@@ -318,7 +319,7 @@
 # No version specified, assuming a snapshot release
 if self.options.version is None:
 self.do_release(
-version=MwVersion.new_snapshot())
+version=MwVersion.new_snapshot(self.options.branch))
 return 0
 
 if self.options.previousversion:

-- 
To view, visit https://gerrit.wikimedia.org/r/399889
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I26f292839d5144b09e4b9b1f2a5d9a0f733ef9bc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...SemanticPageSeries[master]: Remove unused $wgCommandLineMode

2017-12-22 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/399859 )

Change subject: Remove unused $wgCommandLineMode
..

Remove unused $wgCommandLineMode

Change-Id: Ie304644ea790d3d8437b0c4ba8be01ca44d278ea
---
M includes/SPSPageCreationJob.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticPageSeries 
refs/changes/59/399859/1

diff --git a/includes/SPSPageCreationJob.php b/includes/SPSPageCreationJob.php
index 9d3e647..526775f 100644
--- a/includes/SPSPageCreationJob.php
+++ b/includes/SPSPageCreationJob.php
@@ -28,7 +28,7 @@
 */
function run() {
 
-   global $wgUser, $wgCommandLineMode;
+   global $wgUser;
 
$oldUser = $wgUser;
$wgUser = User::newFromId( $this->params['user'] );

-- 
To view, visit https://gerrit.wikimedia.org/r/399859
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie304644ea790d3d8437b0c4ba8be01ca44d278ea
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticPageSeries
Gerrit-Branch: master
Gerrit-Owner: Chad 
Gerrit-Reviewer: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_30]: Drop vendor from MW release branch

2017-12-22 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/399852 )

Change subject: Drop vendor from MW release branch
..

Drop vendor from MW release branch

Bug:T172927
Change-Id: I3b52cdf9ea105a257955b8b7e7989de5f6374602
---
M .gitmodules
D vendor
2 files changed, 0 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/52/399852/1

diff --git a/.gitmodules b/.gitmodules
index 4550dca..cc6d4c0 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -82,7 +82,3 @@
path = skins/Vector
url = https://gerrit.wikimedia.org/r/mediawiki/skins/Vector
branch = REL1_30
-[submodule "vendor"]
-   path = vendor
-   url = https://gerrit.wikimedia.org/r/mediawiki/vendor
-   branch = REL1_30
diff --git a/vendor b/vendor
deleted file mode 16
index 68b54db..000
--- a/vendor
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 68b54dbcd8d65de64225a4ccc9dceb94429ca42a

-- 
To view, visit https://gerrit.wikimedia.org/r/399852
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3b52cdf9ea105a257955b8b7e7989de5f6374602
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_30
Gerrit-Owner: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_29]: Drop vendor from MW release branch

2017-12-22 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/399849 )

Change subject: Drop vendor from MW release branch
..

Drop vendor from MW release branch

Bug:T172927
Change-Id: I3b52cdf9ea105a257955b8b7e7989de5f6374602
---
M .gitmodules
D vendor
2 files changed, 0 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/49/399849/1

diff --git a/.gitmodules b/.gitmodules
index 67d8c92..2f00250 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -74,10 +74,6 @@
path = extensions/CiteThisPage
url = https://gerrit.wikimedia.org/r/mediawiki/extensions/CiteThisPage
branch = REL1_29
-[submodule "vendor"]
-   path = vendor
-   url = https://gerrit.wikimedia.org/r/mediawiki/vendor
-   branch = REL1_29
 [submodule "extensions/PdfHandler"]
path = extensions/PdfHandler
url = https://gerrit.wikimedia.org/r/mediawiki/extensions/PdfHandler
diff --git a/vendor b/vendor
deleted file mode 16
index d26cdc9..000
--- a/vendor
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit d26cdc97eaeeded24e85bccbd39555720aa9738b

-- 
To view, visit https://gerrit.wikimedia.org/r/399849
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3b52cdf9ea105a257955b8b7e7989de5f6374602
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_29
Gerrit-Owner: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...release[master]: Don't pin a specific python3 version in tox

2017-12-22 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/399846 )

Change subject: Don't pin a specific python3 version in tox
..

Don't pin a specific python3 version in tox

Change-Id: I1fdb6e194de3a23c82e75f394dc5b6200bc82036
---
M tox.ini
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release 
refs/changes/46/399846/1

diff --git a/tox.ini b/tox.ini
index 5219642..a9c2742 100644
--- a/tox.ini
+++ b/tox.ini
@@ -23,4 +23,4 @@
 [testenv:flake83]
 commands = flake8
 deps = flake8
-basepython = python3.4
+basepython = python3

-- 
To view, visit https://gerrit.wikimedia.org/r/399846
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1fdb6e194de3a23c82e75f394dc5b6200bc82036
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...release[master]: Remove emacs file from make-release. We don't commit editor ...

2017-12-22 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/399845 )

Change subject: Remove emacs file from make-release. We don't commit editor 
files
..

Remove emacs file from make-release. We don't commit editor files

Change-Id: I54ce8010a6a24c851460483f3f9fbe60e61bdd00
---
D make-release/.dir-locals.el
1 file changed, 0 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release 
refs/changes/45/399845/1

diff --git a/make-release/.dir-locals.el b/make-release/.dir-locals.el
deleted file mode 100644
index d0cabb9..000
--- a/make-release/.dir-locals.el
+++ /dev/null
@@ -1,5 +0,0 @@
-;;; Directory Local Variables
-;;; See Info node `(emacs) Directory Variables' for more information.
-
-((yaml-mode
-  (yaml-indent-offset . 4)))

-- 
To view, visit https://gerrit.wikimedia.org/r/399845
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I54ce8010a6a24c851460483f3f9fbe60e61bdd00
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Chad 
Gerrit-Reviewer: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Scap clean: simplify logic and actually delete thigns again

2017-12-22 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/399814 )

Change subject: Scap clean: simplify logic and actually delete thigns again
..

Scap clean: simplify logic and actually delete thigns again

That find command was so complex and its regex escaping so fragile
that it rarely worked. Instead, just do things using rmtree() and
such rather than a ton of shell commands.

Change-Id: Ic9ad337e9dbb4f0445e35d9d633579e9ecd059f1
---
M scap/plugins/clean.py
1 file changed, 36 insertions(+), 77 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config 
refs/changes/14/399814/1

diff --git a/scap/plugins/clean.py b/scap/plugins/clean.py
index fd4b59e..2e8f4f4 100644
--- a/scap/plugins/clean.py
+++ b/scap/plugins/clean.py
@@ -1,45 +1,26 @@
 # -*- coding: utf-8 -*-
 """For cleaning up old MediaWiki."""
 import os
+import shutil
 import subprocess
 
-import scap.cli as cli
-import scap.git as git
-import scap.log as log
-import scap.main as main
-import scap.utils as utils
+from scap import cli
+from scap import git
+from scap import log
+from scap import main
+from scap import utils
 
-DELETABLE_TYPES = [
-'arcconfig',
-'arclint',
-'cdb',
-'COPYING',
-'CREDITS',
-'FAQ',
-'Gemfile',
-'HISTORY',
-'ini',
-'inc',
-'jshintignore',
-'jscsrc',
-'jshintrc',
-'lock',
-'md',
-'md5',
-'mailmap',
-'Makefile'
-'ml',
-'mli',
-'php',
-'py',
-'rb',
-'README',
-'sample',
-'sh',
-'sql',
-'stylelintrc',
-'txt',
-'xsd',
+# basically everything except extensions, languages, resources and skins
+DELETABLE_DIRS = [
+'cache',
+'docs',
+'images',
+'includes',
+'maintenance',
+'mw-config',
+'serialized',
+'tests',
+'vendor',
 ]
 
 
@@ -79,23 +60,19 @@
 if not os.path.isdir(stage_dir):
 raise ValueError('No such branch exists, aborting')
 
-command_list = []
+with log.Timer('clean-l10nupdate-cache', self.get_stats()):
+utils.sudo_check_call(
+'www-data',
+'rm -fR /var/lib/l10nupdate/caches/cache-%s' % branch
+)
 
-command_list.append([
-'clean-l10nupdate-cache',
-['sudo', '-u', 'www-data', 'rm', '-fR',
- '/var/lib/l10nupdate/caches/cache-%s' % branch]
-])
-command_list.append([
-'clean-l10nupdate-owned-files',
-['sudo', '-u', 'l10nupdate', 'find', stage_dir,
- '-user', 'l10nupdate', '-delete']
-])
-command_list.append([
-'clean-l10n-bootstrap',
-['rm', '-fR', os.path.join(self.config['stage_dir'], 'wmf-config',
-   'ExtensionMessages-%s.php' % branch)]
-])
+with log.Timer('clean-l10nupdate-owned-files', self.get_stats()):
+utils.sudo_check_call(
+'l10nupdate', 'find %s -user l10nupdate -delete' % stage_dir)
+
+with log.Timer('clean-ExtensionMessages'):
+os.remove(os.path.join(self.config['stage_dir'], 'wmf-config',
+   'ExtensionMessages-%s.php' % branch))
 
 logger = self.get_logger()
 
@@ -116,32 +93,14 @@
 with utils.cd(stage_dir):
 if subprocess.call(gerrit_prune_cmd) != 0:
 logger.info('Failed to prune core branch')
-command_list.append([
-'cleaning-branch',
-['rm', '-fR', stage_dir]
-])
-command_list.append([
-'cleaning-patches',
-['rm', '-fR', os.path.join('/srv/patches', branch)]
-])
+with log.Timer('removing-local-copy'):
+shutil.rmtree(stage_dir)
+with log.Timer('cleaning-unused-patches', self.get_stats()):
+shutil.rmtree(os.path.join('/srv/patches', branch))
 else:
-regex = r'".*\.?({0})$"'.format('|'.join(DELETABLE_TYPES))
-command_list.append([
-'cleaning-branch',
-['find', stage_dir, '-type', 'f',
- '-regextype', 'posix-extended',
- '-regex', regex, '-delete']
-])
-
-for command_signature in command_list:
-name = command_signature[0]
-command = command_signature[1]
-with log.Timer(name + '-' + branch, self.get_stats()):
-try:
-subprocess.check_call(command)
-except (subprocess.CalledProcessError, OSError):
-logger.warning('Command failed [%s]: %s' % (
-name, ' '.join(command)))
+with log.Timer('cleaning-unused-files', self.get_stats()):
+for rmdir in DELETABLE_DIRS:
+

[MediaWiki-commits] [Gerrit] mediawiki...release[master]: make-release: Pylint basically everything

2017-12-20 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/399550 )

Change subject: make-release: Pylint basically everything
..

make-release: Pylint basically everything

Change-Id: I0b3c7302b63f9b66e6bfab46fbce9fc50b3bb26c
---
R make-release/makerelease
1 file changed, 188 insertions(+), 201 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release 
refs/changes/50/399550/1

diff --git a/make-release/make-release.py b/make-release/makerelease
similarity index 61%
rename from make-release/make-release.py
rename to make-release/makerelease
index 89ce180..9ded8bf 100755
--- a/make-release/make-release.py
+++ b/make-release/makerelease
@@ -1,6 +1,5 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
 # vim:sw=4:ts=4:et:
-from __future__ import print_function
 """
 Helper to generate a MediaWiki tarball.
 
@@ -9,7 +8,7 @@
 
 If no arguments are given, a snapshot is created.
 """
-
+from __future__ import print_function
 import argparse
 import glob
 import logging
@@ -44,7 +43,6 @@
 help='version that came before')
 
 # Optional arguments:
-
 log_options = parser.add_mutually_exclusive_group()
 log_options.add_argument(
 '--debug', dest='log_level',
@@ -96,13 +94,13 @@
 """Abstract out a MediaWiki version"""
 
 def __init__(self, version):
-decomposed = self.decomposeVersion(version)
+decomposed = self.decompose(version)
 
 self.raw = version
 self.major = decomposed.get('major', None)
 self.branch = decomposed.get('branch', None)
 self.tag = decomposed.get('tag', None)
-self.prev_version = decomposed.get('prevVersion', None)
+self.prev_version = decomposed.get('prev_version', None)
 self.prev_tag = decomposed.get('prevTag', None)
 
 # alpha / beta / rc ..
@@ -126,7 +124,7 @@
 self.branch
 )
 
-def decomposeVersion(self, version):
+def decompose(self, version):
 """Split a version number to branch / major
 
 Whenever a version is recognized, a dict is returned with keys:
@@ -134,7 +132,7 @@
 - minor
 - branch
 - tag
-- prevVersion
+- prev_version
 - prevTag
 
 When one or more letters are found after the minor version we consider
@@ -156,7 +154,7 @@
 'tag': 'master',
 }
 
-m = re.compile(r"""
+matches = re.compile(r"""
 (?P(?P\d+)\.(?P\d+))
 \.
 (?P\d+)
@@ -166,11 +164,11 @@
 )?
 """, re.X).match(version)
 
-if m is None:
+if matches is None:
 raise ValueError('%s is in the wrong format' % version)
 
 # Clear out unneed phase/cycle
-ret = dict((k, v) for k, v in m.groupdict().iteritems()
+ret = dict((k, v) for k, v in matches.groupdict().iteritems()
if v is not None)
 
 ret['branch'] = 'REL%s_%s' % (
@@ -193,7 +191,7 @@
 ret.get('phase', ''),
 ret.get('cycle', '')
 )
-elif('phase' in ret):
+elif 'phase' in ret:
 ret['tag'] = 'tags/%s.%s-%s.%s' % (
 ret['major'],
 ret['minor'],
@@ -211,14 +209,14 @@
 ret['minor']
 )
 
-last = m.group(m.lastindex)
+last = matches.group(matches.lastindex)
 if last != '' and int(last) == 0:
-ret['prevVersion'] = None
+ret['prev_version'] = None
 ret['prevTag'] = None
 return ret
 
-bits = [d for d in m.groups('')]
-last = m.lastindex - 3
+bits = [d for d in matches.groups('')]
+last = matches.lastindex - 3
 del bits[1]
 del bits[1]
 
@@ -229,38 +227,34 @@
 bits[1] == '0' and
 (bits[2] == 'rc' and
  bits[3] == '0'))):
-ret['prevVersion'] = '%s.%s%s%s' % tuple(bits)
+ret['prev_version'] = '%s.%s%s%s' % tuple(bits)
 elif 'phase' in ret:
-ret['prevVersion'] = '%s.%s-%s.%s' % tuple(bits)
+ret['prev_version'] = '%s.%s-%s.%s' % tuple(bits)
 else:
-ret['prevVersion'] = '%s.%s' % (bits[0], bits[1])
+ret['prev_version'] = '%s.%s' % (bits[0], bits[1])
 
-ret['prevTag'] = 'tags/' + ret['prevVersion']
+ret['prevTag'] = 'tags/' + ret['prev_version']
 
 return ret
 
 
 class MakeRelease(object):
 """Surprisingly: do a MediaWiki release"""
-
-options = None
-version = None  # MwVersion object
-config = None
-
-def __init__(self, options):
-if options.version is None:
+def __init__(self, ops):
+if ops.version is None:
 self.version = MwVersion.new_snapshot()
 else:
-self.version = 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: gerrit replication: don't bother trying to create repos on g...

2017-12-20 Thread Chad (Code Review)
Hello Hashar,

I'd like you to do a code review.  Please visit

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

to review the following change.


Change subject: gerrit replication: don't bother trying to create repos on 
github
..

gerrit replication: don't bother trying to create repos on github

A) You can't, and B) the logs are confusing and make it look like
you can.

While we're here, remove silly thread allocations that don't make
sense

Change-Id: I7fc17468dd5dfd8d49143c3c8a679b9c6ea72db1
---
M hieradata/role/common/gerrit.yaml
1 file changed, 1 insertion(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/33/399533/1

diff --git a/hieradata/role/common/gerrit.yaml 
b/hieradata/role/common/gerrit.yaml
index 0242cc1..7f9abdf 100644
--- a/hieradata/role/common/gerrit.yaml
+++ b/hieradata/role/common/gerrit.yaml
@@ -20,16 +20,15 @@
 gerrit::jetty::replication:
 github:
 url: 'g...@github.com:wikimedia/${name}'
-threads: '4'
 authGroup: 'mediawiki-replication'
 remoteNameStyle: 'dash'
 mirror: true
 push:
 - '+refs/heads/*:refs/heads/*'
 - '+refs/tags/*:refs/tags/*'
+createMissingRepositories: false
 slaves:
 url: 'gerr...@gerrit2001.wikimedia.org:/srv/gerrit/git/${name}.git'
-threads: '4'
 mirror: true
 replicateProjectDeletions: true
 replicateHiddenProjects: true

-- 
To view, visit https://gerrit.wikimedia.org/r/399533
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7fc17468dd5dfd8d49143c3c8a679b9c6ea72db1
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Chad 
Gerrit-Reviewer: Hashar 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Remove MoodBar from multiversion/submodules.json

2017-12-20 Thread Chad (Code Review)
Chad has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/396475 )

Change subject: Remove MoodBar from multiversion/submodules.json
..


Remove MoodBar from multiversion/submodules.json

See T131340

Change-Id: Id69ef9791e56a549d5044694c268c8fe2f8a955d
---
M multiversion/submodules.json
1 file changed, 0 insertions(+), 4 deletions(-)

Approvals:
  Chad: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/multiversion/submodules.json b/multiversion/submodules.json
index d1b26ab..9f47bb5 100644
--- a/multiversion/submodules.json
+++ b/multiversion/submodules.json
@@ -311,10 +311,6 @@
 "action": "branch",
 "ref": "."
 },
-"extensions/MoodBar": {
-"action": "branch",
-"ref": "."
-},
 "extensions/MultimediaViewer": {
 "action": "branch",
 "ref": "."

-- 
To view, visit https://gerrit.wikimedia.org/r/396475
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Id69ef9791e56a549d5044694c268c8fe2f8a955d
Gerrit-PatchSet: 3
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: Urbanecm 
Gerrit-Reviewer: Zoranzoki21 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Nightly server: let MW releasers manage Jenkins

2017-12-18 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/399123 )

Change subject: Nightly server: let MW releasers manage Jenkins
..

Nightly server: let MW releasers manage Jenkins

Change-Id: Ibb01d135b131e976f6f18437fe38f92f10a2afd1
---
M modules/admin/data/data.yaml
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/23/399123/1

diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index ba638a1..1de6812 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -97,6 +97,8 @@
 gid: 711
 description: people who upload mediawiki releases
 members: [catrope, demon, hashar, legoktm, reedy, thcipriani]
+priviledges: ['ALL = (jenkins) NOPASSWD: ALL',
+  'ALL = NOPASSWD: /usr/bin/service jenkins *']
   releasers-mobile:
 gid: 712
 description: people who upload mobile app releases

-- 
To view, visit https://gerrit.wikimedia.org/r/399123
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibb01d135b131e976f6f18437fe38f92f10a2afd1
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: All kinds of pylint and other style fixes

2017-12-18 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/399117 )

Change subject: All kinds of pylint and other style fixes
..

All kinds of pylint and other style fixes

Change-Id: If368d6a1cff9b282ad9059569708935bfd384aab
---
M scap/plugins/clean.py
M scap/plugins/prep.py
M scap/plugins/updateinterwikicache.py
M scap/plugins/updatewikiversions.py
D scap/plugins/wmf-beta-autoupdate.py
5 files changed, 23 insertions(+), 78 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config 
refs/changes/17/399117/1

diff --git a/scap/plugins/clean.py b/scap/plugins/clean.py
index 520814a..fd4b59e 100644
--- a/scap/plugins/clean.py
+++ b/scap/plugins/clean.py
@@ -1,9 +1,5 @@
 # -*- coding: utf-8 -*-
-"""
-scap.plugins.clean
-~~
-For cleaning up old MediaWiki
-"""
+"""For cleaning up old MediaWiki."""
 import os
 import subprocess
 
@@ -49,13 +45,13 @@
 
 @cli.command('clean')
 class Clean(main.AbstractSync):
-""" Scap sub-command to clean old branches """
+"""Scap sub-command to clean old branches."""
 
 @cli.argument('branch', help='The name of the branch to clean.')
 @cli.argument('--delete', action='store_true',
   help='Delete everything (not just static assets).')
 def main(self, *extra_args):
-""" Clean old branches from the cluster for space savings! """
+"""Clean old branches from the cluster for space savings."""
 self.arguments.message = 'Pruned MediaWiki: %s' % self.arguments.branch
 if not self.arguments.delete:
 self.arguments.message += ' [keeping static files]'
@@ -70,7 +66,7 @@
 
 def cleanup_branch(self, branch, delete):
 """
-Given a branch, go through the cleanup proccess on the master:
+Given a branch, go through the cleanup proccess on the master.
 
 (1) Prune git branches [if deletion]
 (2) Remove l10nupdate cache
diff --git a/scap/plugins/prep.py b/scap/plugins/prep.py
index 513b3e4..043a7ae 100644
--- a/scap/plugins/prep.py
+++ b/scap/plugins/prep.py
@@ -1,9 +1,5 @@
 # -*- coding: utf-8 -*-
-"""
-scap.plugins.prep
-~
-Scap plugin for setting up a new version of MediaWiki for deployment
-"""
+"""Scap plugin for setting up a new version of MediaWiki for deployment."""
 import argparse
 import multiprocessing
 import os
@@ -19,16 +15,16 @@
 
 
 def version_parser(ver):
-"""Validation our version number formats"""
+"""Validate our version number formats."""
 try:
-return re.match("(\d+\.\d+(\.\d+-)?wmf\.?\d+|master)", ver).group(0)
-except:
+return re.match(r"(1\.\d\d\.\d+-wmf\.\d+|master)", ver).group(0)
+except re.error:
 raise argparse.ArgumentTypeError(
 "Branch '%s' does not match required format" % ver)
 
 
 def update_update_strategy(path):
-"""For all submodules, update the merge strategy"""
+"""For all submodules, update the merge strategy."""
 with utils.cd(path):
 base_cmd = '/usr/bin/git -C %s config ' % path
 base_cmd += 'submodule.$name.update rebase'
@@ -37,7 +33,7 @@
 
 
 def write_settings_stub(dest, include):
-"""Write a silly little PHP file that includes another"""
+"""Write a silly little PHP file that includes another."""
 file_stub = (
 'https://gerrit.wikimedia.org/r/399117
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If368d6a1cff9b282ad9059569708935bfd384aab
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Chad 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Remove unfinished/broken branch plugin

2017-12-18 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/399116 )

Change subject: Remove unfinished/broken branch plugin
..

Remove unfinished/broken branch plugin

Change-Id: I9e9f638cae0e9b216e943f7278103da02a2d586e
---
D scap/plugins/branch.notpy
D scap/plugins/iter.py
2 files changed, 0 insertions(+), 164 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config 
refs/changes/16/399116/1

diff --git a/scap/plugins/branch.notpy b/scap/plugins/branch.notpy
deleted file mode 100644
index 300e1db..000
--- a/scap/plugins/branch.notpy
+++ /dev/null
@@ -1,95 +0,0 @@
-import json
-import sh
-
-import scap.cli as cli
-import scap.terminal as terminal
-import scap.utils as utils
-import scap.plugins.gerrit as gerrit
-
-from scap.plugins.iter import SubdirectoryIterator
-
-
-git = sh.git
-
-with open('./multiversion/submodules.json') as f:
-submodules = json.load(f)
-
-
-@cli.command('branch', subcommands=True)
-class WmfBranch(cli.Application):
-"""
-Manage wmf/ branches
-"""
-
-def project_branches(self, project, pattern='wmf/.*'):
-"""
-get a mapping of { branch: sha1 } for all branches matching the regex
-`pattern` in a given gerrit `project`
-"""
-branches = gerrit.ProjectBranches(project)
-return {branch.ref[11:]: branch.revision for (branch) in
-branches.get(params={'r': pattern})}
-
-@cli.argument('project', help='Gerrit project name')
-@cli.subcommand('list')
-def list(self, extra_args):
-""" List wmf branches in project, sorted by version """
-project_branches = self.project_branches(self.arguments.project)
-sorted_branches = sorted(project_branches)
-sorted_branches = [{key: project_branches[key]} for key in
-   sorted_branches]
-gerrit.dump_json(sorted_branches)
-
-@cli.argument('-o', '--old', default='master')
-@cli.argument('-n', '--new', required=True)
-@cli.subcommand('foreach')
-def foreach(self, extra_args):
-term = terminal.term
-# paths = [m for m in git.list_submodules()]
-paths = sorted(submodules.items())
-
-old = self.arguments.old
-branch = self.arguments.new
-branch_dir = "php-" + branch
-
-def checkout_submodule(path, data):
-action = data.get('action')
-ref = data.get('ref', '.')
-if (ref == '.'):
-ref = old
-
-repo = '../' + path
-project = "mediawiki/" + path
-
-if action == "checkout-latest":
-# get /projects/$path/branches/?m=$ref
-branches = self.project_branches(project, pattern=ref)
-branches = sorted(branches)
-ref = branches[-1]
-try:
-git('submodule', 'add', '--branch', ref, repo, path)
-except:
-utils.mkdir_p(path)
-elif action == 'branch':
-oldbranch = gerrit.ProjectBranch(project, ref)
-rev = oldbranch.get()
-branch_api = gerrit.ProjectBranches(project)
-branch_api.create(branch, rev.revision)
-return git('submodule', 'add', '--branch', branch, repo, path)
-elif action == 'checkout':
-return git('submodule', 'add', '--branch', ref, repo, path)
-
-with utils.cd(branch_dir):
-dlist = SubdirectoryIterator(paths, on_missing=checkout_submodule)
-
-term.nl()
-
-for progress in dlist:
-term.writeln(repr(progress))
-# res = gitcmd.run('describe', '--all', '--always')
-# res = gitcmd.run('log', '--oneline', '-2')
-res = git.log('--oneline', '-1')
-term.write(res)
-
-
-# print('Completed: %s' % self.completed)
diff --git a/scap/plugins/iter.py b/scap/plugins/iter.py
deleted file mode 100644
index d085f31..000
--- a/scap/plugins/iter.py
+++ /dev/null
@@ -1,69 +0,0 @@
-# Coding: utf-8
-""" Iterators / Generators """
-
-from os import getcwd, path, chdir
-import scap.log as log
-
-
-class ProgressIterator(log.ProgressReporter):
-
-def __iter__(self):
-raise NotImplementedError('Subclass should override __iter__')
-
-
-class SubdirectoryIterator(ProgressIterator):
-"""
-Wraps a list of (relative) paths to filesystem directories, providing a
-generator which will visit each directory in turn when you iterate over
-the list.
-"""
-
-def __init__(self, paths=[], on_missing=None, ignore_invalid=False):
-self.paths_completed = []
-self.paths_failed = []
-self.paths = paths
-self._on_missing = on_missing
-self.ignore_invalid = ignore_invalid
-super(SubdirectoryIterator, 

  1   2   3   4   5   6   7   8   9   10   >