[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: db-eqiad.php: Depool db1110
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/403604 ) Change subject: db-eqiad.php: Depool db1110 .. db-eqiad.php: Depool db1110 Needs alter table Bug: T174569 Change-Id: I23466dea71ae8523a374fe0ab6553f91722dd4be --- M wmf-config/db-eqiad.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Marostegui: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php index 6c58622..49267d2 100644 --- a/wmf-config/db-eqiad.php +++ b/wmf-config/db-eqiad.php @@ -147,7 +147,7 @@ 'db1097:3315' => 1, # D1 3.6TB 512GB, # rc, log: s4 and s5 'db1100' => 50, # C2 3.6TB 512GB, old master #api 'db1106' => 500, # D3 3.6TB 512GB - 'db1110' => 500, # C3 3.6TB 512GB + # 'db1110' => 500, # C3 3.6TB 512GB # T174569 ], 's6' => [ 'db1061' => 0, # C3 2.8TB 128GB, master -- To view, visit https://gerrit.wikimedia.org/r/403604 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I23466dea71ae8523a374fe0ab6553f91722dd4be Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Marostegui Gerrit-Reviewer: Jcrespo Gerrit-Reviewer: Marostegui 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/mediawiki-config[master]: db-eqiad.php: Depool db1110
Marostegui has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/403604 ) Change subject: db-eqiad.php: Depool db1110 .. db-eqiad.php: Depool db1110 Needs alter table Bug: T174569 Change-Id: I23466dea71ae8523a374fe0ab6553f91722dd4be --- M wmf-config/db-eqiad.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/04/403604/1 diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php index 6c58622..49267d2 100644 --- a/wmf-config/db-eqiad.php +++ b/wmf-config/db-eqiad.php @@ -147,7 +147,7 @@ 'db1097:3315' => 1, # D1 3.6TB 512GB, # rc, log: s4 and s5 'db1100' => 50, # C2 3.6TB 512GB, old master #api 'db1106' => 500, # D3 3.6TB 512GB - 'db1110' => 500, # C3 3.6TB 512GB + # 'db1110' => 500, # C3 3.6TB 512GB # T174569 ], 's6' => [ 'db1061' => 0, # C3 2.8TB 128GB, master -- To view, visit https://gerrit.wikimedia.org/r/403604 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I23466dea71ae8523a374fe0ab6553f91722dd4be Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Marostegui ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Scribunto[master]: Localize into inh
Urbanecm has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/403603 ) Change subject: Localize into inh .. Localize into inh Bug: T184512 Change-Id: Ifc6c92ce730d82082be5094db9a58667d20f7c14 --- M Scribunto.namespaces.php 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Scribunto refs/changes/03/403603/1 diff --git a/Scribunto.namespaces.php b/Scribunto.namespaces.php index 57dd935..00762bd 100644 --- a/Scribunto.namespaces.php +++ b/Scribunto.namespaces.php @@ -228,6 +228,11 @@ 829 => 'Մոդուլի_քննարկում', ]; +$namespaceNames['inh'] = [ + 828 => 'Модуль', + 829 => 'Модуль_ювцар', +]; + $namespaceNames['id'] = [ 828 => 'Modul', 829 => 'Pembicaraan_Modul', -- To view, visit https://gerrit.wikimedia.org/r/403603 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifc6c92ce730d82082be5094db9a58667d20f7c14 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Scribunto Gerrit-Branch: master Gerrit-Owner: Urbanecm ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Revert "db-eqiad.php: Depool db1082"
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/403601 ) Change subject: Revert "db-eqiad.php: Depool db1082" .. Revert "db-eqiad.php: Depool db1082" This reverts commit 261b1c80ecb593366efcf99eff6f6d6f81a5b977. Change-Id: I99d958a0a9b076eac5e3b39cf58c032dc2b5e1be --- M wmf-config/db-eqiad.php 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Marostegui: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php index 1d8b300..6c58622 100644 --- a/wmf-config/db-eqiad.php +++ b/wmf-config/db-eqiad.php @@ -142,7 +142,7 @@ 's5' => [ 'db1070' => 0, # D1 2.8TB 160GB, master 'db1051' => 0, # B3 2.8TB 96GB, vslow, dump in s5 - # 'db1082' => 300, # A2 3.6TB 512GB, api # db1095 master # T174569 + 'db1082' => 300, # A2 3.6TB 512GB, api # db1095 master 'db1096:3315' => 1, # A6 3.6TB 512GB, # rc, log: s5 and s6 'db1097:3315' => 1, # D1 3.6TB 512GB, # rc, log: s4 and s5 'db1100' => 50, # C2 3.6TB 512GB, old master #api @@ -386,7 +386,7 @@ 'db1051' => 1, ], 'api' => [ - # 'db1082' => 1, + 'db1082' => 1, 'db1100' => 3, ], 'watchlist' => [ -- To view, visit https://gerrit.wikimedia.org/r/403601 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I99d958a0a9b076eac5e3b39cf58c032dc2b5e1be Gerrit-PatchSet: 2 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Marostegui Gerrit-Reviewer: Jcrespo Gerrit-Reviewer: Marostegui 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] mediawiki/core[master]: Localize namespaces to inh
Urbanecm has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/403602 ) Change subject: Localize namespaces to inh .. Localize namespaces to inh Bug: T184511 Change-Id: Ia5f6add2ae4342f4916cb611c711f031c8f40575 --- M languages/messages/MessagesInh.php 1 file changed, 21 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/02/403602/1 diff --git a/languages/messages/MessagesInh.php b/languages/messages/MessagesInh.php index dc33b65..e265342 100644 --- a/languages/messages/MessagesInh.php +++ b/languages/messages/MessagesInh.php @@ -9,3 +9,24 @@ */ $fallback = 'ru'; + + +$namespaceNames = [ +NS_MEDIA=> 'Медиа', +NS_SPECIAL => 'Гӏулакха', +NS_MAIN => '', +NS_TALK => 'Ювцар', +NS_USER => 'Доакъашхо', +NS_USER_TALK=> 'Доакъашхочун_дувцар', +NS_PROJECT_TALK => '$1_ювцар', +NS_FILE => 'Файл', +NS_FILE_TALK=> 'Файл_ювцар', +NS_MEDIAWIKI=> 'MediaWiki', +NS_MEDIAWIKI_TALK => 'MediaWiki_ювцар', +NS_TEMPLATE => 'Ло', +NS_TEMPLATE_TALK=> 'Ло_бувцар', +NS_HELP => 'Новкъостал', +NS_HELP_TALK=> 'Новкъостал_дувцар', +NS_CATEGORY => 'ОагӀат', +NS_CATEGORY_TALK=> 'ОагӀат_ювцар', +]; -- To view, visit https://gerrit.wikimedia.org/r/403602 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia5f6add2ae4342f4916cb611c711f031c8f40575 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Urbanecm ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Revert "db-eqiad.php: Depool db1082"
Hello Urbanecm, jenkins-bot, Jcrespo, Zoranzoki21, I'd like you to do a code review. Please visit https://gerrit.wikimedia.org/r/403601 to review the following change. Change subject: Revert "db-eqiad.php: Depool db1082" .. Revert "db-eqiad.php: Depool db1082" This reverts commit 261b1c80ecb593366efcf99eff6f6d6f81a5b977. Change-Id: I99d958a0a9b076eac5e3b39cf58c032dc2b5e1be --- M wmf-config/db-eqiad.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/01/403601/1 diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php index b096d73..71ec656 100644 --- a/wmf-config/db-eqiad.php +++ b/wmf-config/db-eqiad.php @@ -142,7 +142,7 @@ 's5' => [ 'db1070' => 0, # D1 2.8TB 160GB, master 'db1051' => 0, # B3 2.8TB 96GB, vslow, dump in s5 - # 'db1082' => 300, # A2 3.6TB 512GB, api # db1095 master # T174569 + 'db1082' => 300, # A2 3.6TB 512GB, api # db1095 master 'db1096:3315' => 1, # A6 3.6TB 512GB, # rc, log: s5 and s6 'db1097:3315' => 1, # D1 3.6TB 512GB, # rc, log: s4 and s5 'db1100' => 50, # C2 3.6TB 512GB, old master #api @@ -386,7 +386,7 @@ 'db1051' => 1, ], 'api' => [ - # 'db1082' => 1, + 'db1082' => 1, 'db1100' => 3, ], 'watchlist' => [ -- To view, visit https://gerrit.wikimedia.org/r/403601 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I99d958a0a9b076eac5e3b39cf58c032dc2b5e1be Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Marostegui Gerrit-Reviewer: Jcrespo 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] pywikibot/core[master]: [cleanup] Remove __version__ string from scripts
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/403599 ) Change subject: [cleanup] Remove __version__ string from scripts .. [cleanup] Remove __version__ string from scripts Bug: T87409 Change-Id: Iecf90b816d7b151955f8676f3dfb070422500f9b --- M scripts/archive/featured.py M scripts/ndashredir.py 2 files changed, 0 insertions(+), 6 deletions(-) Approvals: Dalba: Looks good to me, approved jenkins-bot: Verified diff --git a/scripts/archive/featured.py b/scripts/archive/featured.py index 5ae04e1..1702ec8 100755 --- a/scripts/archive/featured.py +++ b/scripts/archive/featured.py @@ -63,9 +63,6 @@ # from __future__ import absolute_import, unicode_literals -__version__ = '$Id$' -# - import pickle import re import sys diff --git a/scripts/ndashredir.py b/scripts/ndashredir.py index 70696e4..3937188 100644 --- a/scripts/ndashredir.py +++ b/scripts/ndashredir.py @@ -33,9 +33,6 @@ # from __future__ import absolute_import, unicode_literals -__version__ = '$Id$' -# - import pywikibot from pywikibot import i18n, pagegenerators -- To view, visit https://gerrit.wikimedia.org/r/403599 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iecf90b816d7b151955f8676f3dfb070422500f9b Gerrit-PatchSet: 2 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Xqt Gerrit-Reviewer: Dalba Gerrit-Reviewer: John Vandenberg 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]: puppetdb: fix hiera key
Giuseppe Lavagetto has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/403600 ) Change subject: puppetdb: fix hiera key .. puppetdb: fix hiera key Change-Id: I0a0ebcf2d31b4a71ab3b676b6334f8f3da96868a --- M hieradata/role/common/puppetmaster/puppetdb.yaml 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Giuseppe Lavagetto: Looks good to me, approved jenkins-bot: Verified diff --git a/hieradata/role/common/puppetmaster/puppetdb.yaml b/hieradata/role/common/puppetmaster/puppetdb.yaml index b3be4d0..0340f0c 100644 --- a/hieradata/role/common/puppetmaster/puppetdb.yaml +++ b/hieradata/role/common/puppetmaster/puppetdb.yaml @@ -10,4 +10,4 @@ cidr: 10.192.16.184/32 profile::puppetdb::master: nitrogen.eqiad.wmnet profile::puppetdb::slaves: [nihal.codfw.wmnet] -puppetmaster::puppetdb::jvm_opts: '-Xmx6g' +profile::puppetdb::jvm_opts: '-Xmx6g' -- To view, visit https://gerrit.wikimedia.org/r/403600 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0a0ebcf2d31b4a71ab3b676b6334f8f3da96868a Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Giuseppe Lavagetto Gerrit-Reviewer: Giuseppe Lavagetto 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]: puppetdb: fix hiera key
Giuseppe Lavagetto has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/403600 ) Change subject: puppetdb: fix hiera key .. puppetdb: fix hiera key Change-Id: I0a0ebcf2d31b4a71ab3b676b6334f8f3da96868a --- M hieradata/role/common/puppetmaster/puppetdb.yaml 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/00/403600/1 diff --git a/hieradata/role/common/puppetmaster/puppetdb.yaml b/hieradata/role/common/puppetmaster/puppetdb.yaml index b3be4d0..0340f0c 100644 --- a/hieradata/role/common/puppetmaster/puppetdb.yaml +++ b/hieradata/role/common/puppetmaster/puppetdb.yaml @@ -10,4 +10,4 @@ cidr: 10.192.16.184/32 profile::puppetdb::master: nitrogen.eqiad.wmnet profile::puppetdb::slaves: [nihal.codfw.wmnet] -puppetmaster::puppetdb::jvm_opts: '-Xmx6g' +profile::puppetdb::jvm_opts: '-Xmx6g' -- To view, visit https://gerrit.wikimedia.org/r/403600 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0a0ebcf2d31b4a71ab3b676b6334f8f3da96868a Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Giuseppe Lavagetto ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [cleanup] Remove __version__ string from scripts/archive/fea...
Xqt has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/403599 ) Change subject: [cleanup] Remove __version__ string from scripts/archive/featured.py .. [cleanup] Remove __version__ string from scripts/archive/featured.py Bug: T87409 Change-Id: Iecf90b816d7b151955f8676f3dfb070422500f9b --- M scripts/archive/featured.py M scripts/ndashredir.py 2 files changed, 0 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/99/403599/1 diff --git a/scripts/archive/featured.py b/scripts/archive/featured.py index 5ae04e1..1702ec8 100755 --- a/scripts/archive/featured.py +++ b/scripts/archive/featured.py @@ -63,9 +63,6 @@ # from __future__ import absolute_import, unicode_literals -__version__ = '$Id$' -# - import pickle import re import sys diff --git a/scripts/ndashredir.py b/scripts/ndashredir.py index 70696e4..3937188 100644 --- a/scripts/ndashredir.py +++ b/scripts/ndashredir.py @@ -33,9 +33,6 @@ # from __future__ import absolute_import, unicode_literals -__version__ = '$Id$' -# - import pywikibot from pywikibot import i18n, pagegenerators -- To view, visit https://gerrit.wikimedia.org/r/403599 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iecf90b816d7b151955f8676f3dfb070422500f9b Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Xqt ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: role::puppetmaster::puppetdb: add Prometheus monitoring for ...
Giuseppe Lavagetto has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/394966 ) Change subject: role::puppetmaster::puppetdb: add Prometheus monitoring for puppetdb .. role::puppetmaster::puppetdb: add Prometheus monitoring for puppetdb This change adds only a subset of the Mbeans available since using the JMX agent's whitelist turned out to be more perfomant. The puppetdb's jvm options are now configurable via hiera to allow a more friendly labs deployment. Change-Id: I58f036e85edb98ef4170580d093c42f0bc8ef786 --- M hieradata/role/common/puppetmaster/puppetdb.yaml A modules/profile/files/puppetmaster/puppetdb/jvm_prometheus_puppetdb_jmx_exporter.yaml M modules/profile/manifests/puppetdb.pp M modules/puppetdb/manifests/app.pp M modules/puppetdb/templates/puppetdb.service.erb M modules/puppetmaster/manifests/puppetdb.pp M modules/role/manifests/puppetmaster/puppetdb.pp 7 files changed, 36 insertions(+), 10 deletions(-) Approvals: Giuseppe Lavagetto: Looks good to me, approved jenkins-bot: Verified diff --git a/hieradata/role/common/puppetmaster/puppetdb.yaml b/hieradata/role/common/puppetmaster/puppetdb.yaml index fd8c9a8..b3be4d0 100644 --- a/hieradata/role/common/puppetmaster/puppetdb.yaml +++ b/hieradata/role/common/puppetmaster/puppetdb.yaml @@ -10,3 +10,4 @@ cidr: 10.192.16.184/32 profile::puppetdb::master: nitrogen.eqiad.wmnet profile::puppetdb::slaves: [nihal.codfw.wmnet] +puppetmaster::puppetdb::jvm_opts: '-Xmx6g' diff --git a/modules/profile/files/puppetmaster/puppetdb/jvm_prometheus_puppetdb_jmx_exporter.yaml b/modules/profile/files/puppetmaster/puppetdb/jvm_prometheus_puppetdb_jmx_exporter.yaml new file mode 100644 index 000..6ea2bc3 --- /dev/null +++ b/modules/profile/files/puppetmaster/puppetdb/jvm_prometheus_puppetdb_jmx_exporter.yaml @@ -0,0 +1,8 @@ +--- +lowercaseOutputLabelNames: true +lowercaseOutputName: false +whitelistObjectNames: + - 'com.puppetlabs.puppetdb.command:type=global,name=*' + - 'com.puppetlabs.puppetdb.command:type=replace facts.3,name=*' + - 'com.puppetlabs.puppetdb.http.server:type=/v3/commands,name=*' + - 'com.puppetlabs.puppetdb.http.server:type=/v3/nodes,name=*' \ No newline at end of file diff --git a/modules/profile/manifests/puppetdb.pp b/modules/profile/manifests/puppetdb.pp index b8717af..7c9bea8 100644 --- a/modules/profile/manifests/puppetdb.pp +++ b/modules/profile/manifests/puppetdb.pp @@ -1,13 +1,32 @@ class profile::puppetdb( $master = hiera('profile::puppetdb::master'), -$puppetmasters = hiera('puppetmaster::servers') +$puppetmasters = hiera('puppetmaster::servers'), +$jvm_opts = hiera('profile::puppetdb::jvm_opts', '-Xmx4G'), +$prometheus_nodes = hiera('prometheus_nodes'), ) { +# Prometheus JMX agent for the Puppetdb's JVM +$jmx_exporter_config_file = '/etc/puppetdb/jvm_prometheus_puppetdb_jmx_exporter.yaml' +$prometheus_jmx_exporter_port = 9400 +$prometheus_java_opts = "-javaagent:/usr/share/java/prometheus/jmx_prometheus_javaagent.jar=${::ipaddress}:${prometheus_jmx_exporter_port}:${jmx_exporter_config_file}" # The JVM heap size has been raised to 6G for T170740 class { '::puppetmaster::puppetdb': -master=> $master, -heap_size => '6G', +master => $master, +jvm_opts => "${jvm_opts} ${prometheus_java_opts}", } + +# Export JMX metrics to prometheus +profile::prometheus::jmx_exporter { "puppetdb_${::hostname}": +hostname => $::hostname, +port => $prometheus_jmx_exporter_port, +prometheus_nodes => $prometheus_nodes, +config_file => $jmx_exporter_config_file, +source => 'puppet:///modules/profile/puppetmaster/puppetdb/jvm_prometheus_puppetdb_jmx_exporter.yaml', +} + + +# Firewall rules + # Only the TLS-terminating nginx proxy will be exposed $puppetmasters_ferm = inline_template('<%= @puppetmasters.values.flatten(1).map { |p| p[\'worker\'] }.sort.join(\' \')%>') diff --git a/modules/puppetdb/manifests/app.pp b/modules/puppetdb/manifests/app.pp index a012ee1..1b64d57 100644 --- a/modules/puppetdb/manifests/app.pp +++ b/modules/puppetdb/manifests/app.pp @@ -11,7 +11,7 @@ $db_user='puppetdb', $db_password=undef, $perform_gc=false, -$heap_size='4G', +$jvm_opts='-Xmx4G', $bind_ip=undef, $ssldir=puppet_ssldir(), $command_processing_threads=16, diff --git a/modules/puppetdb/templates/puppetdb.service.erb b/modules/puppetdb/templates/puppetdb.service.erb index cef26bd..3bcd7ba 100644 --- a/modules/puppetdb/templates/puppetdb.service.erb +++ b/modules/puppetdb/templates/puppetdb.service.erb @@ -6,8 +6,8 @@ Group=puppetdb Environment=CONFIG=/etc/puppetdb/conf.d ExecStartPre=/bin/bash -c "test -e /var/log/puppetdb/puppetdb-oom.hprof && mv /var/log/puppetdb/puppetdb-oom.hprof /var/log/puppetdb/puppetdb-
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: db-eqiad.php: Depool db1099 s1 and s8
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/403591 ) Change subject: db-eqiad.php: Depool db1099 s1 and s8 .. db-eqiad.php: Depool db1099 s1 and s8 Going to fix data drifts on enwiki.archive, also taking the opportunity to upgrade kernel+mariadb on this host Bug: T162807 Change-Id: I0dee8e46dc703a3f37f6bb3b30191e87f7cc2979 --- M wmf-config/db-eqiad.php 1 file changed, 12 insertions(+), 12 deletions(-) Approvals: Marostegui: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php index b096d73..1d8b300 100644 --- a/wmf-config/db-eqiad.php +++ b/wmf-config/db-eqiad.php @@ -111,7 +111,7 @@ 'db1080' => 300, # A2 3.6TB 512GB, api 'db1083' => 500, # B1 3.6TB 512GB # 'db1089' => 500, # C3 3.6TB 512GB # T162807 - 'db1099:3311' => 1, # B2 3.6TB 512GB # rc, log: s1 and s8 + # 'db1099:3311' => 1, # B2 3.6TB 512GB # rc, log: s1 and s8 # T162807 'db1105:3311' => 1, # C3 3.6TB 512GB # rc, log: s1 and s2 ], 's2' => [ @@ -172,7 +172,7 @@ 'db1063' => 0, # C5 2.8TB 128GB, vslow, dump 'db1087' => 500, # C2 3.6TB 512GB, # db1095 master 'db1092' => 300, # D2 3.6TB 512GB, api - 'db1099:3318' => 1, # B2 3.6TB 512GB # rc, log: s1 and s8 + # 'db1099:3318' => 1, # B2 3.6TB 512GB # rc, log: s1 and s8 'db1101:3318' => 1, # C2 3.6TB 512GB # rc, log: s7 and s8 'db1104' => 300, # B3 3.6TB 512GB, api 'db1109' => 500, # D8 3.6TB 512GB @@ -260,23 +260,23 @@ 'groupLoadsBySection' => [ 's1' => [ 'watchlist' => [ - 'db1099:3311' => 1, + # 'db1099:3311' => 1, 'db1105:3311' => 1, ], 'recentchanges' => [ - 'db1099:3311' => 1, + # 'db1099:3311' => 1, 'db1105:3311' => 1, ], 'recentchangeslinked' => [ - 'db1099:3311' => 1, + # 'db1099:3311' => 1, 'db1105:3311' => 1, ], 'contributions' => [ - 'db1099:3311' => 1, + # 'db1099:3311' => 1, 'db1105:3311' => 1, ], 'logpager' => [ - 'db1099:3311' => 1, + # 'db1099:3311' => 1, 'db1105:3311' => 1, ], 'dump' => [ @@ -485,23 +485,23 @@ 'db1104' => 1, ], 'watchlist' => [ - 'db1099:3318' => 1, + # 'db1099:3318' => 1, 'db1101:3318' => 1, ], 'recentchanges' => [ - 'db1099:3318' => 1, + # 'db1099:3318' => 1, 'db1101:3318' => 1, ], 'recentchangeslinked' => [ - 'db1099:3318' => 1, + # 'db1099:3318' => 1, 'db1101:3318' => 1, ], 'contributions' => [ - 'db1099:3318' => 1, + # 'db1099:3318' => 1, 'db1101:3318' => 1, ], 'logpager' => [ - 'db1099:3318' => 1, + # 'db1099:3318' => 1, 'db1101:3318' => 1, ], ], -- To view, visit https://gerrit.wikimedia.org/r/403591 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0dee8e46dc703a3f37f6bb3b30191e87f7cc2979 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Marostegui Gerrit-Reviewer: Jcrespo Gerrit-Reviewer: Marostegui 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/mediawiki-config[master]: db-eqiad.php: Depool db1099 s1 and s8
Marostegui has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/403591 ) Change subject: db-eqiad.php: Depool db1099 s1 and s8 .. db-eqiad.php: Depool db1099 s1 and s8 Going to fix data drifts on enwiki.archive, also taking the opportunity to upgrade kernel+mariadb on this host Bug: T162807 Change-Id: I0dee8e46dc703a3f37f6bb3b30191e87f7cc2979 --- M wmf-config/db-eqiad.php 1 file changed, 12 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/91/403591/1 diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php index b096d73..1d8b300 100644 --- a/wmf-config/db-eqiad.php +++ b/wmf-config/db-eqiad.php @@ -111,7 +111,7 @@ 'db1080' => 300, # A2 3.6TB 512GB, api 'db1083' => 500, # B1 3.6TB 512GB # 'db1089' => 500, # C3 3.6TB 512GB # T162807 - 'db1099:3311' => 1, # B2 3.6TB 512GB # rc, log: s1 and s8 + # 'db1099:3311' => 1, # B2 3.6TB 512GB # rc, log: s1 and s8 # T162807 'db1105:3311' => 1, # C3 3.6TB 512GB # rc, log: s1 and s2 ], 's2' => [ @@ -172,7 +172,7 @@ 'db1063' => 0, # C5 2.8TB 128GB, vslow, dump 'db1087' => 500, # C2 3.6TB 512GB, # db1095 master 'db1092' => 300, # D2 3.6TB 512GB, api - 'db1099:3318' => 1, # B2 3.6TB 512GB # rc, log: s1 and s8 + # 'db1099:3318' => 1, # B2 3.6TB 512GB # rc, log: s1 and s8 'db1101:3318' => 1, # C2 3.6TB 512GB # rc, log: s7 and s8 'db1104' => 300, # B3 3.6TB 512GB, api 'db1109' => 500, # D8 3.6TB 512GB @@ -260,23 +260,23 @@ 'groupLoadsBySection' => [ 's1' => [ 'watchlist' => [ - 'db1099:3311' => 1, + # 'db1099:3311' => 1, 'db1105:3311' => 1, ], 'recentchanges' => [ - 'db1099:3311' => 1, + # 'db1099:3311' => 1, 'db1105:3311' => 1, ], 'recentchangeslinked' => [ - 'db1099:3311' => 1, + # 'db1099:3311' => 1, 'db1105:3311' => 1, ], 'contributions' => [ - 'db1099:3311' => 1, + # 'db1099:3311' => 1, 'db1105:3311' => 1, ], 'logpager' => [ - 'db1099:3311' => 1, + # 'db1099:3311' => 1, 'db1105:3311' => 1, ], 'dump' => [ @@ -485,23 +485,23 @@ 'db1104' => 1, ], 'watchlist' => [ - 'db1099:3318' => 1, + # 'db1099:3318' => 1, 'db1101:3318' => 1, ], 'recentchanges' => [ - 'db1099:3318' => 1, + # 'db1099:3318' => 1, 'db1101:3318' => 1, ], 'recentchangeslinked' => [ - 'db1099:3318' => 1, + # 'db1099:3318' => 1, 'db1101:3318' => 1, ], 'contributions' => [ - 'db1099:3318' => 1, + # 'db1099:3318' => 1, 'db1101:3318' => 1, ], 'logpager' => [ - 'db1099:3318' => 1, + # 'db1099:3318' => 1, 'db1101:3318' => 1, ], ], -- To view, visit https://gerrit.wikimedia.org/r/403591 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0dee8e46dc703a3f37f6bb3b30191e87f7cc2979 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Marostegui ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: cumin: stop cross-referencing the puppetdb master
Giuseppe Lavagetto has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/403590 ) Change subject: cumin: stop cross-referencing the puppetdb master .. cumin: stop cross-referencing the puppetdb master Also, it might make sense to use something different in the future. Change-Id: I770e6f6793ee379538f35750dea284b9f005e1a1 --- M hieradata/role/common/cluster/management.yaml M modules/profile/manifests/cumin/master.pp 2 files changed, 3 insertions(+), 1 deletion(-) Approvals: Giuseppe Lavagetto: Looks good to me, approved jenkins-bot: Verified diff --git a/hieradata/role/common/cluster/management.yaml b/hieradata/role/common/cluster/management.yaml index c9f0069..71632dd 100644 --- a/hieradata/role/common/cluster/management.yaml +++ b/hieradata/role/common/cluster/management.yaml @@ -1,3 +1,5 @@ admin::groups: - datacenter-ops monitor_screens: false +# TODO: use nihal in codfw? +profile::cumin::master::puppetdb_host: nitrogen.eqiad.wmnet diff --git a/modules/profile/manifests/cumin/master.pp b/modules/profile/manifests/cumin/master.pp index 1f0502d..dcf11aa 100644 --- a/modules/profile/manifests/cumin/master.pp +++ b/modules/profile/manifests/cumin/master.pp @@ -1,5 +1,5 @@ class profile::cumin::master ( -$puppetdb_host = hiera('puppetmaster::puppetdb::master'), +$puppetdb_host = hiera('profile::cumin::master::puppetdb_host'), $datacenters= hiera('datacenters'), ) { include passwords::phabricator -- To view, visit https://gerrit.wikimedia.org/r/403590 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I770e6f6793ee379538f35750dea284b9f005e1a1 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Giuseppe Lavagetto Gerrit-Reviewer: Giuseppe Lavagetto Gerrit-Reviewer: Volans 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]: cumin: stop cross-referencing the puppetdb master
Giuseppe Lavagetto has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/403590 ) Change subject: cumin: stop cross-referencing the puppetdb master .. cumin: stop cross-referencing the puppetdb master Also, it might make sense to use something different in the future. Change-Id: I770e6f6793ee379538f35750dea284b9f005e1a1 --- M hieradata/role/common/cluster/management.yaml M modules/profile/manifests/cumin/master.pp 2 files changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/90/403590/1 diff --git a/hieradata/role/common/cluster/management.yaml b/hieradata/role/common/cluster/management.yaml index c9f0069..71632dd 100644 --- a/hieradata/role/common/cluster/management.yaml +++ b/hieradata/role/common/cluster/management.yaml @@ -1,3 +1,5 @@ admin::groups: - datacenter-ops monitor_screens: false +# TODO: use nihal in codfw? +profile::cumin::master::puppetdb_host: nitrogen.eqiad.wmnet diff --git a/modules/profile/manifests/cumin/master.pp b/modules/profile/manifests/cumin/master.pp index 1f0502d..dcf11aa 100644 --- a/modules/profile/manifests/cumin/master.pp +++ b/modules/profile/manifests/cumin/master.pp @@ -1,5 +1,5 @@ class profile::cumin::master ( -$puppetdb_host = hiera('puppetmaster::puppetdb::master'), +$puppetdb_host = hiera('profile::cumin::master::puppetdb_host'), $datacenters= hiera('datacenters'), ) { include passwords::phabricator -- To view, visit https://gerrit.wikimedia.org/r/403590 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I770e6f6793ee379538f35750dea284b9f005e1a1 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Giuseppe Lavagetto ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: db-eqiad.php: Depool db1082
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/403588 ) Change subject: db-eqiad.php: Depool db1082 .. db-eqiad.php: Depool db1082 Needs alter table Bug: T174569 Change-Id: Ic840b5a9ec09ded5d3ba0d75d16f8ab6cbdfff84 --- M wmf-config/db-eqiad.php 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Marostegui: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php index 71ec656..b096d73 100644 --- a/wmf-config/db-eqiad.php +++ b/wmf-config/db-eqiad.php @@ -142,7 +142,7 @@ 's5' => [ 'db1070' => 0, # D1 2.8TB 160GB, master 'db1051' => 0, # B3 2.8TB 96GB, vslow, dump in s5 - 'db1082' => 300, # A2 3.6TB 512GB, api # db1095 master + # 'db1082' => 300, # A2 3.6TB 512GB, api # db1095 master # T174569 'db1096:3315' => 1, # A6 3.6TB 512GB, # rc, log: s5 and s6 'db1097:3315' => 1, # D1 3.6TB 512GB, # rc, log: s4 and s5 'db1100' => 50, # C2 3.6TB 512GB, old master #api @@ -386,7 +386,7 @@ 'db1051' => 1, ], 'api' => [ - 'db1082' => 1, + # 'db1082' => 1, 'db1100' => 3, ], 'watchlist' => [ -- To view, visit https://gerrit.wikimedia.org/r/403588 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic840b5a9ec09ded5d3ba0d75d16f8ab6cbdfff84 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Marostegui Gerrit-Reviewer: Jcrespo Gerrit-Reviewer: Marostegui 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/mediawiki-config[master]: db-eqiad.php: Depool db1082
Marostegui has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/403588 ) Change subject: db-eqiad.php: Depool db1082 .. db-eqiad.php: Depool db1082 Needs alter table Bug: T174569 Change-Id: Ic840b5a9ec09ded5d3ba0d75d16f8ab6cbdfff84 --- M wmf-config/db-eqiad.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/88/403588/1 diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php index 71ec656..b096d73 100644 --- a/wmf-config/db-eqiad.php +++ b/wmf-config/db-eqiad.php @@ -142,7 +142,7 @@ 's5' => [ 'db1070' => 0, # D1 2.8TB 160GB, master 'db1051' => 0, # B3 2.8TB 96GB, vslow, dump in s5 - 'db1082' => 300, # A2 3.6TB 512GB, api # db1095 master + # 'db1082' => 300, # A2 3.6TB 512GB, api # db1095 master # T174569 'db1096:3315' => 1, # A6 3.6TB 512GB, # rc, log: s5 and s6 'db1097:3315' => 1, # D1 3.6TB 512GB, # rc, log: s4 and s5 'db1100' => 50, # C2 3.6TB 512GB, old master #api @@ -386,7 +386,7 @@ 'db1051' => 1, ], 'api' => [ - 'db1082' => 1, + # 'db1082' => 1, 'db1100' => 3, ], 'watchlist' => [ -- To view, visit https://gerrit.wikimedia.org/r/403588 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic840b5a9ec09ded5d3ba0d75d16f8ab6cbdfff84 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Marostegui ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Revert "db-eqiad.php: Depool db1096:3315"
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/403587 ) Change subject: Revert "db-eqiad.php: Depool db1096:3315" .. Revert "db-eqiad.php: Depool db1096:3315" This reverts commit aca897ce340dc9a98ce3567d1df4cb4328243914. Change-Id: I913aebd59767db0ffcccfe75cf123564ce14d988 --- M wmf-config/db-eqiad.php 1 file changed, 6 insertions(+), 6 deletions(-) Approvals: Marostegui: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php index f3dd1cd..71ec656 100644 --- a/wmf-config/db-eqiad.php +++ b/wmf-config/db-eqiad.php @@ -143,7 +143,7 @@ 'db1070' => 0, # D1 2.8TB 160GB, master 'db1051' => 0, # B3 2.8TB 96GB, vslow, dump in s5 'db1082' => 300, # A2 3.6TB 512GB, api # db1095 master - # 'db1096:3315' => 1, # A6 3.6TB 512GB, # rc, log: s5 and s6 # T174569 + 'db1096:3315' => 1, # A6 3.6TB 512GB, # rc, log: s5 and s6 'db1097:3315' => 1, # D1 3.6TB 512GB, # rc, log: s4 and s5 'db1100' => 50, # C2 3.6TB 512GB, old master #api 'db1106' => 500, # D3 3.6TB 512GB @@ -390,23 +390,23 @@ 'db1100' => 3, ], 'watchlist' => [ - # 'db1096:3315' => 1, + 'db1096:3315' => 1, 'db1097:3315' => 1, ], 'recentchanges' => [ - # 'db1096:3315' => 1, + 'db1096:3315' => 1, 'db1097:3315' => 1, ], 'recentchangeslinked' => [ - # 'db1096:3315' => 1, + 'db1096:3315' => 1, 'db1097:3315' => 1, ], 'contributions' => [ - # 'db1096:3315' => 1, + 'db1096:3315' => 1, 'db1097:3315' => 1, ], 'logpager' => [ - # 'db1096:3315' => 1, + 'db1096:3315' => 1, 'db1097:3315' => 1, ], ], -- To view, visit https://gerrit.wikimedia.org/r/403587 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I913aebd59767db0ffcccfe75cf123564ce14d988 Gerrit-PatchSet: 2 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Marostegui Gerrit-Reviewer: Jcrespo Gerrit-Reviewer: Marostegui 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/mediawiki-config[master]: Revert "db-eqiad.php: Depool db1096:3315"
Hello Urbanecm, jenkins-bot, Jcrespo, Zoranzoki21, I'd like you to do a code review. Please visit https://gerrit.wikimedia.org/r/403587 to review the following change. Change subject: Revert "db-eqiad.php: Depool db1096:3315" .. Revert "db-eqiad.php: Depool db1096:3315" This reverts commit aca897ce340dc9a98ce3567d1df4cb4328243914. Change-Id: I913aebd59767db0ffcccfe75cf123564ce14d988 --- M wmf-config/db-eqiad.php 1 file changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/87/403587/1 diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php index f3dd1cd..71ec656 100644 --- a/wmf-config/db-eqiad.php +++ b/wmf-config/db-eqiad.php @@ -143,7 +143,7 @@ 'db1070' => 0, # D1 2.8TB 160GB, master 'db1051' => 0, # B3 2.8TB 96GB, vslow, dump in s5 'db1082' => 300, # A2 3.6TB 512GB, api # db1095 master - # 'db1096:3315' => 1, # A6 3.6TB 512GB, # rc, log: s5 and s6 # T174569 + 'db1096:3315' => 1, # A6 3.6TB 512GB, # rc, log: s5 and s6 'db1097:3315' => 1, # D1 3.6TB 512GB, # rc, log: s4 and s5 'db1100' => 50, # C2 3.6TB 512GB, old master #api 'db1106' => 500, # D3 3.6TB 512GB @@ -390,23 +390,23 @@ 'db1100' => 3, ], 'watchlist' => [ - # 'db1096:3315' => 1, + 'db1096:3315' => 1, 'db1097:3315' => 1, ], 'recentchanges' => [ - # 'db1096:3315' => 1, + 'db1096:3315' => 1, 'db1097:3315' => 1, ], 'recentchangeslinked' => [ - # 'db1096:3315' => 1, + 'db1096:3315' => 1, 'db1097:3315' => 1, ], 'contributions' => [ - # 'db1096:3315' => 1, + 'db1096:3315' => 1, 'db1097:3315' => 1, ], 'logpager' => [ - # 'db1096:3315' => 1, + 'db1096:3315' => 1, 'db1097:3315' => 1, ], ], -- To view, visit https://gerrit.wikimedia.org/r/403587 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I913aebd59767db0ffcccfe75cf123564ce14d988 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Marostegui Gerrit-Reviewer: Jcrespo 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] mediawiki...Timeless[master]: Empty space in Special Pages removed
Himanshuc3 has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/403586 ) Change subject: Empty space in Special Pages removed .. Empty space in Special Pages removed Change-Id: I75e2d32dbdb3da10b71e476c6f31ccb6ca05b806 --- M resources/screen-common.less 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Timeless refs/changes/86/403586/1 diff --git a/resources/screen-common.less b/resources/screen-common.less index 8a7cac9..b4dd004 100644 --- a/resources/screen-common.less +++ b/resources/screen-common.less @@ -197,6 +197,8 @@ border-bottom: solid 4px @green; } #mw-page-header-links { + display: none; + div, ul, li { @@ -206,7 +208,6 @@ padding: 0; } li { - margin: 0.25em 0 1em; border-bottom: solid 3px transparent; &:hover { -- To view, visit https://gerrit.wikimedia.org/r/403586 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I75e2d32dbdb3da10b71e476c6f31ccb6ca05b806 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/Timeless Gerrit-Branch: master Gerrit-Owner: Himanshuc3 ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: puppetdb: refactor to role/profile
Giuseppe Lavagetto has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/403388 ) Change subject: puppetdb: refactor to role/profile .. puppetdb: refactor to role/profile * Split the content of the puppetdb role in two profiles: one for the puppetdb application, one for the corresponding postgresql database, that can be used separately * Rework puppetmaster::puppetdb::database, that was a mess. * Move monitoring to the profile for the database, move db tuning to the module class itself * Added type checking to the parameters of puppetmaster::puppetdb::database Change-Id: I93b02c19398e4fe16818910dfd3ed6f0653aa3a6 --- D hieradata/common/puppetmaster/puppetdb.yaml A hieradata/role/common/puppetmaster/puppetdb.yaml A modules/profile/manifests/puppetdb.pp A modules/profile/manifests/puppetdb/database.pp M modules/puppetmaster/manifests/puppetdb/database.pp R modules/puppetmaster/templates/puppetdb/tuning.conf.erb M modules/role/manifests/puppetmaster/puppetdb.pp 7 files changed, 152 insertions(+), 114 deletions(-) Approvals: Giuseppe Lavagetto: Looks good to me, approved jenkins-bot: Verified diff --git a/hieradata/common/puppetmaster/puppetdb.yaml b/hieradata/common/puppetmaster/puppetdb.yaml deleted file mode 100644 index 4de1c15..000 --- a/hieradata/common/puppetmaster/puppetdb.yaml +++ /dev/null @@ -1,14 +0,0 @@ -puppetmaster::puppetdb::postgres_users: - replication@nihal-v4: -user: replication -database: all -password: "%{::puppetmaster::puppetdb::database::replication_pass}" -cidr: 10.192.16.184/32 -attrs: REPLICATION - puppetdb@nihal-v4: -user: puppetdb -database: puppetdb -password: "%{::puppetmaster::puppetdb::database::puppetdb_pass}" -cidr: 10.192.16.184/32 -puppetmaster::puppetdb::master: nitrogen.eqiad.wmnet -puppetmaster::puppetdb::slaves: [nihal.codfw.wmnet] diff --git a/hieradata/role/common/puppetmaster/puppetdb.yaml b/hieradata/role/common/puppetmaster/puppetdb.yaml new file mode 100644 index 000..fd8c9a8 --- /dev/null +++ b/hieradata/role/common/puppetmaster/puppetdb.yaml @@ -0,0 +1,12 @@ +profile::puppetdb::database::users: + replication@nihal-v4: +user: replication +database: all +cidr: 10.192.16.184/32 +attrs: REPLICATION + puppetdb@nihal-v4: +user: puppetdb +database: puppetdb +cidr: 10.192.16.184/32 +profile::puppetdb::master: nitrogen.eqiad.wmnet +profile::puppetdb::slaves: [nihal.codfw.wmnet] diff --git a/modules/profile/manifests/puppetdb.pp b/modules/profile/manifests/puppetdb.pp new file mode 100644 index 000..b8717af --- /dev/null +++ b/modules/profile/manifests/puppetdb.pp @@ -0,0 +1,26 @@ +class profile::puppetdb( +$master = hiera('profile::puppetdb::master'), +$puppetmasters = hiera('puppetmaster::servers') +) { +# The JVM heap size has been raised to 6G for T170740 +class { '::puppetmaster::puppetdb': +master=> $master, +heap_size => '6G', +} + +# Only the TLS-terminating nginx proxy will be exposed +$puppetmasters_ferm = inline_template('<%= @puppetmasters.values.flatten(1).map { |p| p[\'worker\'] }.sort.join(\' \')%>') + +ferm::service { 'puppetdb': +proto => 'tcp', +port=> 443, +notrack => true, +srange => "@resolve((${puppetmasters_ferm}))", +} + +ferm::service { 'puppetdb-cumin': +proto => 'tcp', +port => 443, +srange => '$CUMIN_MASTERS', +} +} diff --git a/modules/profile/manifests/puppetdb/database.pp b/modules/profile/manifests/puppetdb/database.pp new file mode 100644 index 000..81e3af7 --- /dev/null +++ b/modules/profile/manifests/puppetdb/database.pp @@ -0,0 +1,53 @@ +# == Class profile::puppetdb::database +# +# Sets up a puppetdb postgresql database. +# +class profile::puppetdb::database( +$master = hiera('profile::puppetdb::master'), +$slaves = hiera('profile::puppetdb::slaves'), +$shared_buffers = hiera('profile::puppetdb::database::shared_buffers', '7680MB'), +$replication_password = hiera('puppetdb::password::replication'), +$puppetdb_password = hiera('puppetdb::password::rw'), +$users = hiera('profile::puppetdb::database::users', {}), +) { +include ::passwords::postgres + +$pgversion = $::lsbdistcodename ? { +'stretch' => '9.6', +'jessie' => '9.4', +} +$slave_range = join($slaves, ' ') + +$role = $master ? { +$::fqdn => 'master', +default => 'slave', +} + +class { '::puppetmaster::puppetdb::database': +master => $master, +pgversion=> $pgversion, +shared_buffers => $shared_buffers, +replication_pass => $replication_password, +puppetdb_pass=> $puppetdb_password, +puppetdb_users => $users, +} + +# Monitoring +class { '::prometheus::postgres_exporter': } + +if $role
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Create extendedconfirmed for kowiki
Revi has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/403584 ) Change subject: Create extendedconfirmed for kowiki .. Create extendedconfirmed for kowiki * Create user-right extendeconfirmed * Create protection level extendedconfirmed * Granted/revoked by sysops * Granted to sysop and bot in their user-rights * Autopromote after 500 edits and 30 days of registration. Bug: T184675 Change-Id: I33c7a5f91e8af99c06396b3933a7a31847872132 Signed-off-by: Yongmin Hong --- M wmf-config/InitialiseSettings.php 1 file changed, 20 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/84/403584/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index ad61725..dede87d 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -5008,6 +5008,7 @@ 'frwiki' => [ '', 'autoconfirmed', 'editextendedsemiprotected', 'sysop' ], // T131109 'hewiki' => [ '', 'autoconfirmed', 'autopatrol', 'templateeditor' /* T102466 */, 'sysop' ], // T60207 'huwiki' => [ '', 'autoconfirmed', 'templateeditor', 'sysop' ], // T74055 + 'kowiki' => [ '', 'autoconfirmed', 'extendedconfirmed', 'sysop' ], // T184675 'lvwiki' => [ '', 'autoconfirmed', 'autopatrol', 'sysop' ], // T92645 'plwiki' => [ '', 'autoconfirmed', 'editor', 'sysop' ], // T48990 'ptwiki' => [ '', 'autoconfirmed', 'autoreviewer', 'sysop' ], // T41652 @@ -5026,6 +5027,7 @@ '+enwiki' => [ 'extendedconfirmed' ], // T126607 '+fawiki' => [ 'extendedconfirmed' ], // T140839 '+frwiki' => [ 'editextendedsemiprotected' ], // T132248 + '+kowiki' => [ 'extendedconfirmed' ], // T184675 ], 'wgSiteNotice' => [ @@ -8930,6 +8932,15 @@ ], 'user' => [ 'reupload-own' => false ], // T85621 'autopatrolled' => [ 'autopatrol' => true ], // T130808 + 'bot' => [ + 'extendedconfirmed' => true, + ], // T184675 + 'extendedconfirmed' => [ + 'extendedconfirmed' => true, + ], // T184675 + 'sysop' => [ + 'extendedconfirmed' => true, + ], // T184675 ], 'ladwiki' => [ 'flood' => [ 'bot' => true ], // T131527 @@ -10206,7 +10217,7 @@ 'sysop' => [ 'rollbacker' ], // T130215 ], '+kowiki' => [ - 'sysop' => [ 'rollbacker', 'confirmed', 'uploader', 'autopatrolled' ], // T85621, T130808 + 'sysop' => [ 'rollbacker', 'confirmed', 'uploader', 'autopatrolled', 'extendedconfirmed' ], // T85621, T130808, T184675 ], '+ladwiki' => [ 'sysop' => [ 'flood' ], // T131527 @@ -10951,7 +10962,7 @@ 'sysop' => [ 'rollbacker' ], // T130215 ], '+kowiki' => [ - 'sysop' => [ 'rollbacker', 'confirmed', 'uploader', 'autopatrolled' ], // T85621, T130808 + 'sysop' => [ 'rollbacker', 'confirmed', 'uploader', 'autopatrolled', 'extendedconfirmed' ], // T85621, T130808, T184675 ], '+ladwiki' => [ 'sysop' => [ 'flood' ], // T131527 @@ -12535,6 +12546,13 @@ [ '!', [ APCOND_INGROUPS, 'eliminator' ] ], ], // T140839 ], + 'kowiki' => [ + 'extendedconfirmed' => [ '&', + [ APCOND_EDITCOUNT, 500 ], + [ APCOND_AGE, 30 * 86400 ], // 30 days * seconds in a day + [ '!', [ APCOND_INGROUPS, 'sysop' ] ], + [ '!', [ APCOND_INGROUPS, 'bot' ] ], + ], // T184675 'trwiki' => [ 'autoreview' => [ '&', // AND -- To view, visit https://gerrit.wikimedia.org/r/403584 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I33c7a5f91e8af99c06396b3933a7a31847872132 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Revi ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...BetaFeatures[master]: Make preference fields infusable
Samwilson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/403583 ) Change subject: Make preference fields infusable .. Make preference fields infusable Bug: T178267 Change-Id: Ib04701464e4869c0b89387b7291d2eb6326e3fc0 --- M includes/NewHTMLCheckField.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BetaFeatures refs/changes/83/403583/1 diff --git a/includes/NewHTMLCheckField.php b/includes/NewHTMLCheckField.php index 17a59fb..d607371 100644 --- a/includes/NewHTMLCheckField.php +++ b/includes/NewHTMLCheckField.php @@ -52,6 +52,7 @@ return Html::openElement( 'div', [ 'class' => 'mw-ui-feature-checkbox' ] ) . new OOUI\FieldLayout( new OOUI\CheckboxInputWidget( [ + 'infusable' => true, 'name' => $this->mName, 'selected' => $value, 'value' => 1, -- To view, visit https://gerrit.wikimedia.org/r/403583 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib04701464e4869c0b89387b7291d2eb6326e3fc0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BetaFeatures Gerrit-Branch: master Gerrit-Owner: Samwilson ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...GlobalPreferences[master]: Enable/disable related preference field with local exception...
Samwilson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/403582 ) Change subject: Enable/disable related preference field with local exception checkbox. .. Enable/disable related preference field with local exception checkbox. When the local-exception checkbox is changed, enable or disable the related preference field. Also takes into account OOUI fields such as is used by BetaFeatures. Bug: T178267 Change-Id: I3dcd540a29635614aaa9404b8482d1493fda0c3c --- M resources/ext.GlobalPreferences.local.js 1 file changed, 26 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GlobalPreferences refs/changes/82/403582/1 diff --git a/resources/ext.GlobalPreferences.local.js b/resources/ext.GlobalPreferences.local.js index 5f68fbe..e36b1b3 100644 --- a/resources/ext.GlobalPreferences.local.js +++ b/resources/ext.GlobalPreferences.local.js @@ -1 +1,26 @@ -// @TODO re-enable global preferences. T178267 +( function ( mw, $ ) { + 'use strict'; + + /** +* Enable and disable the related preference field when selecting the local exception checkbox. +*/ + $( ':input.mw-globalprefs-local-exception' ).on( 'change', function () { + var localExName, prefName, enabled, $prefInput, oouiWidget; + // Figure out what the preference name is by stripping the local exception suffix. + localExName = $( this ).attr( 'name' ); + prefName = localExName.substr( 0, localExName.length - '-local-exception'.length ); + enabled = $( this ).prop( 'checked' ); + $prefInput = $( ':input[name="' + prefName + '"]' ); + + if ( $prefInput.parent( '.oo-ui-widget' ).length > 0 ) { + // First see if this is a OOUI field. + oouiWidget = OO.ui.infuse( $prefInput.parent( '.oo-ui-widget' ) ); + oouiWidget.setDisabled( !enabled ); + + } else { + // Otherwise treat it as a normal form input. + $prefInput.prop( 'disabled', !enabled ); + } + } ); + +}( mediaWiki, jQuery ) ); -- To view, visit https://gerrit.wikimedia.org/r/403582 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3dcd540a29635614aaa9404b8482d1493fda0c3c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/GlobalPreferences Gerrit-Branch: master Gerrit-Owner: Samwilson ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Linter[master]: WIP: Suppress low-priority categories for commons for now
Subramanya Sastry has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/403581 ) Change subject: WIP: Suppress low-priority categories for commons for now .. WIP: Suppress low-priority categories for commons for now * Don't process any low priority lint error updates * Don't display low priority lint error categories Change-Id: If0037f6d3cb30050a1c6a2c551284d650fa77828 --- M includes/ApiRecordLint.php M includes/CategoryManager.php M includes/RecordLintJob.php M includes/SpecialLintErrors.php 4 files changed, 33 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Linter refs/changes/81/403581/1 diff --git a/includes/ApiRecordLint.php b/includes/ApiRecordLint.php index 26f2853..56fc598 100644 --- a/includes/ApiRecordLint.php +++ b/includes/ApiRecordLint.php @@ -78,7 +78,7 @@ $errors[] = $info; } - $job = new RecordLintJob( $title, [ + $job = new RecordLintJob( $catgoryMgr, $title, [ 'errors' => $errors, 'revision' => $params['revision'], ] ); diff --git a/includes/CategoryManager.php b/includes/CategoryManager.php index d08b887..44d06d6 100644 --- a/includes/CategoryManager.php +++ b/includes/CategoryManager.php @@ -175,4 +175,20 @@ throw new MissingCategoryException( "Cannot find id for '$name'" ); } + + /** +* Check if a category id is a low priority category +* +* @param int $id +* @return bool +*/ + public function isLowPriorityCategory( $id ) { + foreach ( $this->categories[self::LOW] as $name ) { + if ( $id == $this->getCategoryId( $name ) ) { + return true; + } + } + + return false; + } } diff --git a/includes/RecordLintJob.php b/includes/RecordLintJob.php index 7063169..2e0a005 100644 --- a/includes/RecordLintJob.php +++ b/includes/RecordLintJob.php @@ -25,13 +25,16 @@ use Title; class RecordLintJob extends Job { + private $catMgr; + /** * RecordLintJob constructor. * @param Title $title * @param array $params */ - public function __construct( Title $title, array $params ) { + public function __construct( CategoryManager $catMgr, Title $title, array $params ) { parent::__construct( 'RecordLintJob', $title, $params ); + $this->catMgr = $catMgr; } public function run() { @@ -39,6 +42,9 @@ // Outdated now, let a later job handle it return true; } + + // T184280: Drop low priority categories from commons for now + $dropLowPriority = wfWikiID() == "commonswiki" ? true : false; // [ 'category' => [ 'id' => LintError ] ] $errors = []; @@ -55,6 +61,9 @@ $lintDb = new Database( $this->title->getArticleID() ); $toSet = []; foreach ( $errors as $category => $catErrors ) { + if ( $dropLowPriority && $catMgr->isLowPriorityCategory( $category ) ) { + $catErrors = []; + } // If there are too many errors for a category, trim some of them. if ( count( $catErrors ) > $lintDb::MAX_PER_CAT ) { $catErrors = array_slice( $catErrors, 0, $lintDb::MAX_PER_CAT ); diff --git a/includes/SpecialLintErrors.php b/includes/SpecialLintErrors.php index 2f33fab..0a62f28 100644 --- a/includes/SpecialLintErrors.php +++ b/includes/SpecialLintErrors.php @@ -28,9 +28,12 @@ class SpecialLintErrors extends SpecialPage { private $category; + private $suppressLowPriority; public function __construct() { parent::__construct( 'LintErrors' ); + // T184280: Suppress low priority categories from commons for now + $suppressLowPriority = wfWikiID() == "commonswiki" ? true : false; } protected function showNamespaceFilterForm( $ns ) { @@ -104,7 +107,9 @@ // Display lint issues by priority $this->displayList( 'high', $totals, $catManager->getHighPriority() ); $this->displayList( 'medium', $totals, $catManager->getMediumPriority() ); - $this->displayList( 'low', $totals, $catManager->getLowPriority() ); + if ( !$this->suppressLowPriority ) { + $this->displayList( 'low', $totals, $catManager->getLowPriority() ); + } } /** -- To view, visit https://gerrit.wikimedia.org/r/403581 To unsubscribe, visit https://gerrit.wikimedia.org/r/
[MediaWiki-commits] [Gerrit] mediawiki...Popups[master]: Fix: preview page URL for 404 RESTBase responses
Niedzielski has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/403580 ) Change subject: Fix: preview page URL for 404 RESTBase responses .. Fix: preview page URL for 404 RESTBase responses Functional changes: - Require page URL when constructing a PreviewModel null object. These models have valid titles and are used to display a preview when an extract is unobtainable. When presented with an empty URL, their linkage incorrectly pointed to the browser's current URL. Additional tests were added to verify the fix. - Check missing title in addition to falsy response in RESTBase gateway and update the test assertion to check title. It isn't clear if this can happen in the wild. - Forbid state mutation in the conclusion of MediaWikiGateway.getPageSummary() with a call to Deferred.promise(). This is consistent with the rest of repo including RESTBaseGateway. http://api.jquery.com/deferred.promise/ Nonfunctional changes: - Collapse two RESTBase gateway 404 tests into one as the scenarios and expectations were very similar. - Add failure HTTP status to 'MediaWiki API gateway handles API failure' test stub HTTP response for consistency with other cases. - Add nullity expectations to JSDocs touched and fix a couple typos throughout. - Make the gateway tests a little more consistent by collapsing Deferred variable usage where appropriate. This change is necessary to the completion of T183151 which uses the PreviewModel null objects for additional error cases. Bug: T183151 Change-Id: Ib77627fb9c80d8e806208bbafcfc615b130e3278 --- M resources/dist/index.js M resources/dist/index.js.json M src/gateway/mediawiki.js M src/gateway/rest.js M src/preview/model.js M src/ui/renderer.js M tests/node-qunit/gateway/mediawiki.test.js M tests/node-qunit/gateway/rest.test.js M tests/node-qunit/stubs.js M tests/node-qunit/ui/renderer.test.js 10 files changed, 77 insertions(+), 52 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Popups refs/changes/80/403580/1 -- To view, visit https://gerrit.wikimedia.org/r/403580 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib77627fb9c80d8e806208bbafcfc615b130e3278 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Popups Gerrit-Branch: master Gerrit-Owner: Niedzielski Gerrit-Reviewer: Sniedzielski ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ReadingLists[master]: Replace deprecated Maintenance::error(..., 1) calls
Gergő Tisza has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/403579 ) Change subject: Replace deprecated Maintenance::error(..., 1) calls .. Replace deprecated Maintenance::error(..., 1) calls Bug: T184612 Change-Id: I2d4f65202534fed0d351afb5a100618c3677fdf0 --- M maintenance/populateWithTestData.php M maintenance/purge.php 2 files changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ReadingLists refs/changes/79/403579/1 diff --git a/maintenance/populateWithTestData.php b/maintenance/populateWithTestData.php index 8af4f32..ca20e8d 100644 --- a/maintenance/populateWithTestData.php +++ b/maintenance/populateWithTestData.php @@ -36,7 +36,7 @@ $this->addOption( 'entries', 'Entries per list (number or stats distribution)', false, true ); $this->addOption( 'cleanup', 'Delete lists which look like test data' ); if ( !extension_loaded( 'stats' ) ) { - $this->error( 'Requires the stats PHP extension', 1 ); + $this->fatalError( 'Requires the stats PHP extension' ); } } @@ -61,7 +61,7 @@ $projects = $this->dbw->selectFieldValues( 'reading_list_project', 'rlp_id' ); if ( !$projects ) { - $this->error( 'No projects! Please set up some', 1 ); + $this->fatalError( 'No projects! Please set up some' ); } $totalLists = $totalEntries = 0; stats_rand_setall( mt_rand(), mt_rand() ); @@ -176,7 +176,7 @@ || $this->hasOption( 'lists' ) || $this->hasOption( 'entries' ) ) { - $this->error( "'cleanup' cannot be used together with other options", 1 ); + $this->fatalError( "'cleanup' cannot be used together with other options" ); } } else { if ( @@ -184,7 +184,7 @@ || !$this->hasOption( 'lists' ) || !$this->hasOption( 'entries' ) ) { - $this->error( "'users', 'lists' and 'entries' are required in non-cleanup mode", 1 ); + $this->fatalError( "'users', 'lists' and 'entries' are required in non-cleanup mode" ); } } } diff --git a/maintenance/purge.php b/maintenance/purge.php index 85e571b..6ca8785 100644 --- a/maintenance/purge.php +++ b/maintenance/purge.php @@ -38,7 +38,7 @@ $before = wfTimestamp( TS_MW, $this->getOption( 'before' ) ); if ( !$before || $now <= $before ) { // Let's not delete all rows if the user entered an invalid timestamp. - $this->error( 'Invalid timestamp', 1 ); + $this->fatalError( 'Invalid timestamp' ); } } else { $before = Utils::getDeletedExpiry(); -- To view, visit https://gerrit.wikimedia.org/r/403579 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2d4f65202534fed0d351afb5a100618c3677fdf0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ReadingLists Gerrit-Branch: master Gerrit-Owner: Gergő Tisza ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Fix lint issues
BearND has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/403578 ) Change subject: Fix lint issues .. Fix lint issues Change-Id: I5dbf10b3479856a9e35d2fa32895373f63b577f4 --- M test/lib/mobile-util/mobile-util-test.js 1 file changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps refs/changes/78/403578/1 diff --git a/test/lib/mobile-util/mobile-util-test.js b/test/lib/mobile-util/mobile-util-test.js index bbc000b..0665cf1 100644 --- a/test/lib/mobile-util/mobile-util-test.js +++ b/test/lib/mobile-util/mobile-util-test.js @@ -31,8 +31,9 @@ }); it('getSummaryType identifies main and disambig pages, defaults to \'standard\'', () => { -assert.deepEqual(mUtil.getSummaryType({"mainpage":true}), 'mainpage'); - assert.deepEqual(mUtil.getSummaryType({"pageprops":{"disambiguation":""}}), 'disambiguation'); +assert.deepEqual(mUtil.getSummaryType({ "mainpage": true }), 'mainpage'); +assert.deepEqual(mUtil.getSummaryType({ "pageprops": { "disambiguation": "" } }), +'disambiguation'); assert.deepEqual(mUtil.getSummaryType({}), 'standard'); }); }); -- To view, visit https://gerrit.wikimedia.org/r/403578 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5dbf10b3479856a9e35d2fa32895373f63b577f4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/mobileapps Gerrit-Branch: master Gerrit-Owner: BearND ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Re-introduce CSSMin: Improve encoding of quotes in embedded ...
VolkerE has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/403577 ) Change subject: Re-introduce CSSMin: Improve encoding of quotes in embedded SVGs .. Re-introduce CSSMin: Improve encoding of quotes in embedded SVGs When a URL (data: or otherwise) contains quotes, wrap it in double quotes ("). This then allows us to encode double quotes (") as single quotes (') in the data URI embedding of SVGs. This time in the right way only with valid URL characters, working with IE 11 and Edge. Bug: T175318 Change-Id: I1d2a36f28e736fb624c298cf64c1e36f2283a32c --- M includes/libs/CSSMin.php M tests/phpunit/includes/libs/CSSMinTest.php 2 files changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/77/403577/1 diff --git a/includes/libs/CSSMin.php b/includes/libs/CSSMin.php index 20f52f8..1cd243f 100644 --- a/includes/libs/CSSMin.php +++ b/includes/libs/CSSMin.php @@ -149,6 +149,7 @@ '%0A' => ' ', // Change newlines to spaces '%0D' => ' ', // Change carriage returns to spaces '%09' => ' ', // Change tabs to spaces + '%22' => "'", // Unencode double quotes ] ); // Consolidate runs of multiple spaces in a row $encoded = preg_replace( '/ {2,}/', ' ', $encoded ); diff --git a/tests/phpunit/includes/libs/CSSMinTest.php b/tests/phpunit/includes/libs/CSSMinTest.php index a1b9393..821fbfb 100644 --- a/tests/phpunit/includes/libs/CSSMinTest.php +++ b/tests/phpunit/includes/libs/CSSMinTest.php @@ -271,8 +271,8 @@ // data: URIs for red.gif, green.gif, circle.svg $red = 'data:image/gif;base64,R0lGODlhAQABAIAAAP8AADAAACwAAQABAAACAkQBADs='; $green = 'data:image/gif;base64,R0lGODlhAQABAICAADAAACwAAQABAAACAkQBADs='; - $svg = 'data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%228' - . '%22 height=%228%22%3E %3Ccircle cx=%224%22 cy=%224%22 r=%222%22/%3E %3C/svg%3E'; + $svg = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8'" + . "height='8'%3E %3Ccircle cx='4' cy='4' r='2'/%3E %3C/svg%3E"; // phpcs:disable Generic.Files.LineLength return [ -- To view, visit https://gerrit.wikimedia.org/r/403577 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1d2a36f28e736fb624c298cf64c1e36f2283a32c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: VolkerE ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Hygiene: Split getSummaryType into standalone method and add...
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/403553 ) Change subject: Hygiene: Split getSummaryType into standalone method and add unit tests .. Hygiene: Split getSummaryType into standalone method and add unit tests Change-Id: Ibd73ce5363719769d921957d8358c68fecf493e6 --- M lib/mobile-util.js M test/lib/mobile-util/mobile-util-test.js 2 files changed, 23 insertions(+), 14 deletions(-) Approvals: BearND: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/mobile-util.js b/lib/mobile-util.js index 6856795..52ba34b 100644 --- a/lib/mobile-util.js +++ b/lib/mobile-util.js @@ -159,6 +159,23 @@ }; }; +/** + * Get the page summary type. + * @param {!Object} meta page metadata from MW API + * return {!String} the summary type (one of 'standard', 'disambiguation', or 'mainpage') + */ +mUtil.getSummaryType = function(meta) { +const isDisambiguationPage = meta.pageprops + && {}.hasOwnProperty.call(meta.pageprops, 'disambiguation'); +if (meta.mainpage) { +return 'mainpage'; +} +if (isDisambiguationPage) { +return 'disambiguation'; +} +return 'standard'; +}; + /* * Build a page summary * @param {!String} domain the request domain @@ -169,22 +186,9 @@ mUtil.buildSummary = function(domain, title, pageData) { const page = pageData.page; const meta = pageData.meta; -const pageProps = meta && meta.pageprops; -const isDisambiguationPage = pageProps && {}.hasOwnProperty.call(pageProps, 'disambiguation'); -const isMainPage = meta.mainpage; const isContentModelWikitext = meta.contentmodel === 'wikitext'; const isWhiteListedNamespace = mUtil.SUMMARY_NS_WHITELIST.includes(meta.ns); const isRedirect = meta.redirect; - -function getType() { -if (isMainPage) { -return 'mainpage'; -} -if (isDisambiguationPage) { -return 'disambiguation'; -} -return 'standard'; -} if (!isContentModelWikitext) { return { code: 204 }; @@ -204,7 +208,7 @@ return Object.assign({ code: 200, -type : getType(), +type : mUtil.getSummaryType(meta), title: meta.normalizedtitle, displaytitle: meta.displaytitle, namespace: { id: meta.ns, text: meta.nsText }, diff --git a/test/lib/mobile-util/mobile-util-test.js b/test/lib/mobile-util/mobile-util-test.js index a063737..bbc000b 100644 --- a/test/lib/mobile-util/mobile-util-test.js +++ b/test/lib/mobile-util/mobile-util-test.js @@ -30,4 +30,9 @@ assert.deepEqual(mUtil.extractDbTitleFromAnchor(link), 'My_db_title'); }); +it('getSummaryType identifies main and disambig pages, defaults to \'standard\'', () => { +assert.deepEqual(mUtil.getSummaryType({"mainpage":true}), 'mainpage'); + assert.deepEqual(mUtil.getSummaryType({"pageprops":{"disambiguation":""}}), 'disambiguation'); +assert.deepEqual(mUtil.getSummaryType({}), 'standard'); +}); }); -- To view, visit https://gerrit.wikimedia.org/r/403553 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibd73ce5363719769d921957d8358c68fecf493e6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/mobileapps Gerrit-Branch: master Gerrit-Owner: Mholloway Gerrit-Reviewer: BearND Gerrit-Reviewer: Fjalapeno Gerrit-Reviewer: Jdlrobson Gerrit-Reviewer: Mhurd Gerrit-Reviewer: Ppchelko 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...Newsletter[master]: Unit test NewsletterDb::getNewsletterFromName
Ryan10145 has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/403576 ) Change subject: Unit test NewsletterDb::getNewsletterFromName .. Unit test NewsletterDb::getNewsletterFromName Bug: T183811 Change-Id: Ic4fad58dc18f1916bb910c2eeb20690c53a1f4d4 --- M tests/NewsletterDbTest.php 1 file changed, 33 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Newsletter refs/changes/76/403576/1 diff --git a/tests/NewsletterDbTest.php b/tests/NewsletterDbTest.php index dcd4a27..e7b1a34 100644 --- a/tests/NewsletterDbTest.php +++ b/tests/NewsletterDbTest.php @@ -24,6 +24,9 @@ $mock->expects( $this->any() ) ->method( 'getConnection' ) ->will( $this->returnValue( $db ) ); + $mock->expects( $this->any() ) + ->method( 'getConnectionRef' ) + ->will( $this->returnValue( $db ) ); return $mock; } @@ -326,4 +329,34 @@ $this->assertTrue( $result ); } + /** +* @covers NewsletterDb::getNewsletterFromName +*/ + public function testGetNewsletterFromName() { + $mockWriteDb = $this->getMockIDatabase(); + $newsletter = $this->getTestNewsletter(); + + $mockWriteDb + ->expects( $this->once() ) + ->method( 'selectRow' ) + ->with( + 'nl_newsletters', + [ 'nl_id', 'nl_name', 'nl_desc', 'nl_main_page_id' ], + [ 'nl_name' => $newsletter->getName(), 'nl_active' => 1 ] + ) + ->will( $this->returnValue( + (Object)[ + 'nl_id' => $newsletter->getId(), + 'nl_name' => $newsletter->getName(), + 'nl_desc' => $newsletter->getDescription(), + 'nl_main_page_id' => $newsletter->getPageId(), + ] + ) ); + + $table = new NewsletterDb( $this->getMockLoadBalancer( $mockWriteDb ) ); + + $result = $table->getNewsletterFromName( $newsletter->getName() ); + $this->assertEquals( $newsletter, $result ); + } + } -- To view, visit https://gerrit.wikimedia.org/r/403576 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic4fad58dc18f1916bb910c2eeb20690c53a1f4d4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Newsletter Gerrit-Branch: master Gerrit-Owner: Ryan10145 ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Streamline mw.wikibase.entity:getAllStatements
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/403177 ) Change subject: Streamline mw.wikibase.entity:getAllStatements .. Streamline mw.wikibase.entity:getAllStatements This patch fixes one issue: resolving a label might fail and return nil. An array access with nil does work just fine, but it's still cleaner and more obvious if this case is checked before. This patch also streamlines the code and tries to make it as easy to follow as possible. Bug: T166056 Change-Id: Ieed8cedadec4bde0f9a35bac8ebf035ad90c72d0 --- M client/includes/DataAccess/Scribunto/mw.wikibase.entity.lua M client/includes/DataAccess/Scribunto/mw.wikibase.lua 2 files changed, 18 insertions(+), 17 deletions(-) Approvals: Hoo man: Looks good to me, approved jenkins-bot: Verified diff --git a/client/includes/DataAccess/Scribunto/mw.wikibase.entity.lua b/client/includes/DataAccess/Scribunto/mw.wikibase.entity.lua index cd7fbb4..a543990 100644 --- a/client/includes/DataAccess/Scribunto/mw.wikibase.entity.lua +++ b/client/includes/DataAccess/Scribunto/mw.wikibase.entity.lua @@ -226,31 +226,33 @@ return sitelink.title end --- Get claims by property id or label from entity --- -- @param {table} entity -- @param {string} propertyLabelOrId -local resolvePropertyClaims = function( entity, propertyLabelOrId ) - local propertyId - if isValidPropertyId( propertyLabelOrId ) then - propertyId = propertyLabelOrId - else - propertyId = mw.wikibase.resolvePropertyId( propertyLabelOrId ) - end +-- @param {string} funcName for error logging +local getEntityStatements = function( entity, propertyLabelOrId, funcName ) + checkType( funcName, 1, propertyLabelOrId, 'string' ) - if entity.claims == nil or not entity.claims[propertyId] then + if not entity.claims then return {} end - return entity.claims[propertyId] + + local propertyId = propertyLabelOrId + if not isValidPropertyId( propertyId ) then + propertyId = mw.wikibase.resolvePropertyId( propertyId ) + end + + if propertyId and entity.claims[propertyId] then + return entity.claims[propertyId] + end + + return {} end -- Get the best statements with the given property id or label -- -- @param {string} propertyLabelOrId methodtable.getBestStatements = function( entity, propertyLabelOrId ) - checkType( 'getBestStatements', 1, propertyLabelOrId, 'string' ) - - local entityStatements = resolvePropertyClaims( entity, propertyLabelOrId ) + local entityStatements = getEntityStatements( entity, propertyLabelOrId, 'getBestStatements' ) local statements = {} local bestRank = 'normal' @@ -270,9 +272,7 @@ -- -- @param {string} propertyLabelOrId methodtable.getAllStatements = function( entity, propertyLabelOrId ) - checkType( 'getAllStatements', 1, propertyLabelOrId, 'string' ) - - return resolvePropertyClaims( entity, propertyLabelOrId ) + return getEntityStatements( entity, propertyLabelOrId, 'getAllStatements' ) end -- Get a table with all property ids attached to the entity. diff --git a/client/includes/DataAccess/Scribunto/mw.wikibase.lua b/client/includes/DataAccess/Scribunto/mw.wikibase.lua index 2199bc9..e46fc36 100644 --- a/client/includes/DataAccess/Scribunto/mw.wikibase.lua +++ b/client/includes/DataAccess/Scribunto/mw.wikibase.lua @@ -137,6 +137,7 @@ -- @param {string} entityId -- @param {string} propertyId + -- @param {string} funcName for error logging -- @param {string} rank Which statements to include. Either "best" or "all". local getEntityStatements = function( entityId, propertyId, funcName, rank ) if not php.getSetting( 'allowArbitraryDataAccess' ) and entityId ~= wikibase.getEntityIdForCurrentPage() then -- To view, visit https://gerrit.wikimedia.org/r/403177 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ieed8cedadec4bde0f9a35bac8ebf035ad90c72d0 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Thiemo Kreuz (WMDE) Gerrit-Reviewer: Eranroz Gerrit-Reviewer: Hoo man Gerrit-Reviewer: Jackmcbarn Gerrit-Reviewer: Matěj Suchánek Gerrit-Reviewer: Thiemo Kreuz (WMDE) Gerrit-Reviewer: WMDE-leszek 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...mobileapps[master]: Escape text node content in extractLeadIntroduction.js
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/403538 ) Change subject: Escape text node content in extractLeadIntroduction.js .. Escape text node content in extractLeadIntroduction.js Bug: T184558 Change-Id: I27ece6ae485520a631aaba9f6f34c40e9bf3e5f4 --- M lib/transformations/extractLeadIntroduction.js M test/lib/transformations/extractLeadIntroduction.js 2 files changed, 26 insertions(+), 1 deletion(-) Approvals: BearND: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/transformations/extractLeadIntroduction.js b/lib/transformations/extractLeadIntroduction.js index 0b4e934..f586951 100644 --- a/lib/transformations/extractLeadIntroduction.js +++ b/lib/transformations/extractLeadIntroduction.js @@ -12,6 +12,24 @@ } /* + * HTML escape a string. + * @param {!String} s + * @return {!String} + */ +function escape(s) { +return s.replace(/[&<>"']/g, (c) => { +switch (c) { +case '&': return '&'; +case '<': return '<'; +case '>': return '>'; +case '"': return '"'; +default: return; +} +}); +} + + +/* * Extracts the first non-empty paragraph from an article and any * nodes that follow it that are not themselves paragraphs. * @param {!Document} doc representing article @@ -38,7 +56,7 @@ // Deal with text nodes if (nextSibling.nodeType === NodeType.TEXT_NODE) { if (!isEmpty(nextSibling)) { -p += nextSibling.textContent; +p += escape(nextSibling.textContent); } } else { p += nextSibling.outerHTML; diff --git a/test/lib/transformations/extractLeadIntroduction.js b/test/lib/transformations/extractLeadIntroduction.js index 2118354..231ed9b 100644 --- a/test/lib/transformations/extractLeadIntroduction.js +++ b/test/lib/transformations/extractLeadIntroduction.js @@ -46,4 +46,11 @@ assert.equal(lead, test[1]); }); }); + +it('Trailing text content is escaped', () => { +const html = 'foo'; +const doc = domino.createDocument(html); +const lead = extractLeadIntroduction(doc); +assert.deepEqual(lead, html); +}); }); -- To view, visit https://gerrit.wikimedia.org/r/403538 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I27ece6ae485520a631aaba9f6f34c40e9bf3e5f4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/mobileapps Gerrit-Branch: master Gerrit-Owner: Mholloway Gerrit-Reviewer: BearND Gerrit-Reviewer: Brian Wolff Gerrit-Reviewer: Fjalapeno Gerrit-Reviewer: Gergő Tisza Gerrit-Reviewer: Jdlrobson Gerrit-Reviewer: Mhurd Gerrit-Reviewer: Ppchelko 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...mobileapps[master]: Fix diff tests
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/403537 ) Change subject: Fix diff tests .. Fix diff tests Change-Id: Ibdee81784add939f1179b5ee08a1868f8801b882 --- M test/diff/results/page_formatted-enwiki-User%3ABSitzmann_(WMF)_MCS_Test_Frankenstein.json M test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_(WMF)_MCS_Test_Frankenstein.json 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: BearND: Looks good to me, approved jenkins-bot: Verified Mholloway: Looks good to me, approved diff --git "a/test/diff/results/page_formatted-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json" "b/test/diff/results/page_formatted-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json" index fbf..35f0b31 100644 --- "a/test/diff/results/page_formatted-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json" +++ "b/test/diff/results/page_formatted-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json" @@ -75,7 +75,7 @@ }, { "id": 8, -"text": "\n\n\n\nMultiple images:\nCautionEjectionTwo cards used by football referees\n\nImagemap:\n\nhttp://projects.vassar.edu/1896/democrats.html\"; class=\"plainlinks\" rel=\"nofollow\" title=\"1896 Democrats\">\n\n\n\n\n\n\nPanoramas:\n\nHelsinki has many buildings.\n\n\n", +"text": "\n\n\n\nMultiple images:\nCautionEjectionTwo cards used by football referees\n\nImagemap:\n\nhttp://projects.vassar.edu/1896/democrats.html\"; class=\"plainlinks\" rel=\"nofollow\" title=\"1896 Democrats\">\n\n\n\n\n\n\nPanoramas:\n\nHelsinki has many buildings.\n\n\n", "toclevel": 1, "line": "Images", "anchor": "Images" diff --git "a/test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json" "b/test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json" index f484eb6..c01ada5 100644 --- "a/test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json" +++ "b/test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json" @@ -229,7 +229,7 @@ }, { "id": 8, -"text": "\n\n\n\nMultiple images:\nCautionEjectionTwo cards used by football referees\n\nImagemap:\n\nhttp://projects.vassar.edu/1896/democrats.html\"; class=\"plainlinks\" rel=\"nofollow\" title=\"1896 Democrats\">\n\n\n\n\n\n\nPanoramas:\n\nHelsinki has many buildings.\n\n\n", +"text": "\n\n\n\nMultiple images:\nCautionEjectionTwo cards used by football referees\n\nImagemap:\n\nhttp://projects.vassar.edu/1896/democrats.html\"; class=\"plainlinks\" rel=\"nofollow\" title=\"1896 Democrats\">\n\n\n\n\n\n\nPanoramas:\n\nHelsinki has many buildings.\n\n\n", "toclevel": 1, "line": "Images", "anchor": "Images" -- To view, visit https://gerrit.wikimedia.org/r/403537 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibdee81784add939f1179b5ee08a1868f8801b882 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/mobileapps Gerrit-Branch: master Gerrit-Owner: Mholloway Gerrit-Reviewer: BearND Gerrit-Reviewer: Fjalapeno Gerrit-Reviewer: Jdlrobson Gerrit-Reviewer: Mholloway Gerrit-Reviewer: Mhurd Gerrit-Reviewer: Ppchelko Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Setup VCR for dry tests
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/402355 ) Change subject: Setup VCR for dry tests .. Setup VCR for dry tests vcrpy allows to convert tests to dry by mocking requests, which are recorded and saved in tests/cassettes This enables VCR for TestOwnClient, TestCachedRequest and TestParaminfoModules Bug: T184081 Change-Id: Ia588bcacce850e3fa9307ea65793a33eebc669ff --- M dev-requirements.txt M tests/README.rst M tests/api_tests.py M tests/aspects.py A tests/cassettes/wikidata.test/TestOwnClient.test_own_client_wikidatatest.yaml A tests/cassettes/wikidata.wikidata/TestOwnClient.test_own_client_wikidata.yaml A tests/cassettes/wikipedia.en/TestCachedRequest.test_normal_use.yaml A tests/cassettes/wikipedia.en/TestParaminfoModules.test_action_modules.yaml A tests/cassettes/wikipedia.en/TestParaminfoModules.test_query_modules.yaml M tests/wikibase_tests.py M tox.ini 11 files changed, 2,519 insertions(+), 1 deletion(-) Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified -- To view, visit https://gerrit.wikimedia.org/r/402355 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia588bcacce850e3fa9307ea65793a33eebc669ff Gerrit-PatchSet: 29 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Phantom42 Gerrit-Reviewer: John Vandenberg Gerrit-Reviewer: Phantom42 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...mobileapps[master]: Guard against unexpected ImageDescription extmetadata values
Mholloway has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/403575 ) Change subject: Guard against unexpected ImageDescription extmetadata values .. Guard against unexpected ImageDescription extmetadata values ImageDescription, like all extmetadata fields, can contain anything. It's a mistake to assume that it will take the form of a key-value object. This guards against unexpected input. Bug: T184669 Change-Id: I502a2b03109686d6a23c124b814eff92b75bb8c1 --- M lib/feed/featured-image.js M test/features/featured-image/pagecontent.js 2 files changed, 26 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps refs/changes/75/403575/1 diff --git a/lib/feed/featured-image.js b/lib/feed/featured-image.js index fd04030..79ee550 100644 --- a/lib/feed/featured-image.js +++ b/lib/feed/featured-image.js @@ -87,6 +87,18 @@ return Object.keys(descriptions)[0]; } +/** + * Resolved description language from the extmetadata ImageDescription field, if + * available. Requires that the input be an object of the form {"en":"foo","de":"bar"}. + * If not, will return undefined or false. + * @param {?Object} input extmetadata ImageDescription value (may be undefined) + * @param {!String} lang the request language + * @return {?String|Boolean} the description language to use + */ +function resolvedLangFromImageDescription(input, lang) { +return input && (typeof (input) === 'object' || undefined) && pickDescriptionLang(input, lang); +} + function buildPayload(page, lang) { if (!page || page.notfound) { return undefined; @@ -118,7 +130,7 @@ } const descriptions = imageinfo.extmetadata.ImageDescription.value; -const resolvedLang = descriptions && pickDescriptionLang(descriptions, lang); +const resolvedLang = resolvedLangFromImageDescription(descriptions, lang); if (resolvedLang) { payload.description = new Description(resolvedLang, descriptions[resolvedLang]); } @@ -210,5 +222,8 @@ } module.exports = { -promise +promise, +testing: { +resolvedLangFromImageDescription +} }; diff --git a/test/features/featured-image/pagecontent.js b/test/features/featured-image/pagecontent.js index 4b7cfdd..a77e832 100644 --- a/test/features/featured-image/pagecontent.js +++ b/test/features/featured-image/pagecontent.js @@ -83,6 +83,15 @@ }); }); +it('should return english description where ImageDescription value is unexpected type', () => { +const uri = `${server.config.uri}zh.wikipedia.org/v1/media/image/featured/2018/01/10`; +return preq.get({uri}) +.then((res) => { +assert.contains(res.body.description.text, 'Motosacoche'); +assert.deepEqual(res.body.description.lang, 'en'); +}); +}); + it('featured image of an old date should return 404', () => { const uri = `${server.config.uri}en.wikipedia.org/v1/media/image/featured/1970/12/31`; return preq.get({ uri }) -- To view, visit https://gerrit.wikimedia.org/r/403575 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I502a2b03109686d6a23c124b814eff92b75bb8c1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/mobileapps Gerrit-Branch: master Gerrit-Owner: Mholloway ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Use findItem(s)FromData instead getItem(s)FromData
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/398224 ) Change subject: Use findItem(s)FromData instead getItem(s)FromData .. Use findItem(s)FromData instead getItem(s)FromData Depends-on: Ia2110f71d1642f61451cb8acc7e8a930d0feb31f Bug: T76630 Change-Id: Iddd1d3f5abaa233adbf030114343a8ed248de28b --- M modules/ui/mw.echo.ui.CrossWikiUnreadFilterWidget.js M modules/ui/mw.echo.ui.NotificationsInboxWidget.js M modules/ui/mw.echo.ui.PaginationWidget.js M modules/ui/mw.echo.ui.SortedListWidget.js 4 files changed, 6 insertions(+), 6 deletions(-) Approvals: jenkins-bot: Verified Jforrester: Looks good to me, but someone else must approve Mooeypoo: Looks good to me, approved diff --git a/modules/ui/mw.echo.ui.CrossWikiUnreadFilterWidget.js b/modules/ui/mw.echo.ui.CrossWikiUnreadFilterWidget.js index fe6d13f..5b5134c 100644 --- a/modules/ui/mw.echo.ui.CrossWikiUnreadFilterWidget.js +++ b/modules/ui/mw.echo.ui.CrossWikiUnreadFilterWidget.js @@ -159,10 +159,10 @@ this.addItems( widgets ); // Select the current source - selectedWidget = this.getItemFromData( selectedSource ); + selectedWidget = this.findItemFromData( selectedSource ); if ( selectedPage ) { // Select a specific page - item = selectedWidget.getItemFromData( selectedPage ); + item = selectedWidget.findItemFromData( selectedPage ); } else { // The wiki title is selected item = selectedWidget.getTitleItem(); diff --git a/modules/ui/mw.echo.ui.NotificationsInboxWidget.js b/modules/ui/mw.echo.ui.NotificationsInboxWidget.js index 6791ffe..e826361 100644 --- a/modules/ui/mw.echo.ui.NotificationsInboxWidget.js +++ b/modules/ui/mw.echo.ui.NotificationsInboxWidget.js @@ -168,7 +168,7 @@ */ mw.echo.ui.NotificationsInboxWidget.prototype.updateReadStateSelectWidget = function () { this.readStateSelectWidget - .getItemFromData( this.manager.getFiltersModel().getReadState() ) + .findItemFromData( this.manager.getFiltersModel().getReadState() ) .setSelected( true ); }; diff --git a/modules/ui/mw.echo.ui.PaginationWidget.js b/modules/ui/mw.echo.ui.PaginationWidget.js index 0a3208e..2a435dc 100644 --- a/modules/ui/mw.echo.ui.PaginationWidget.js +++ b/modules/ui/mw.echo.ui.PaginationWidget.js @@ -109,9 +109,9 @@ * Update the state - disabled and visibility - of the sub widgets. */ mw.echo.ui.PaginationWidget.prototype.updateWidgetState = function () { - this.dirSelectWidget.getItemFromData( 'prev' ) + this.dirSelectWidget.findItemFromData( 'prev' ) .setDisabled( this.isDisabled() || !this.model.hasPrevPage() ); - this.dirSelectWidget.getItemFromData( 'next' ) + this.dirSelectWidget.findItemFromData( 'next' ) .setDisabled( this.isDisabled() || !this.model.hasNextPage() ); this.startButton.toggle( diff --git a/modules/ui/mw.echo.ui.SortedListWidget.js b/modules/ui/mw.echo.ui.SortedListWidget.js index 591c0ad..1ae941e 100644 --- a/modules/ui/mw.echo.ui.SortedListWidget.js +++ b/modules/ui/mw.echo.ui.SortedListWidget.js @@ -136,7 +136,7 @@ * @param {string} data Item data to search for * @return {OO.ui.Element|null} Item with equivalent data, `null` if none exists */ - mw.echo.ui.SortedListWidget.prototype.getItemFromData = function ( data ) { + mw.echo.ui.SortedListWidget.prototype.findItemFromData = function ( data ) { var i, len, item, hash = OO.getHash( data ); -- To view, visit https://gerrit.wikimedia.org/r/398224 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iddd1d3f5abaa233adbf030114343a8ed248de28b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: Prtksxna Gerrit-Reviewer: Jforrester Gerrit-Reviewer: Mooeypoo Gerrit-Reviewer: Prtksxna 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...EducationProgram[master]: Fix typo in private method's name in hooks
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/403570 ) Change subject: Fix typo in private method's name in hooks .. Fix typo in private method's name in hooks Change-Id: I2d67e8f16e01076612c127567f6f78e4dda2c704 --- M EducationProgram.hooks.php 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: jenkins-bot: Verified VolkerE: Looks good to me, approved diff --git a/EducationProgram.hooks.php b/EducationProgram.hooks.php index 0d5acb4..30ad6cd 100644 --- a/EducationProgram.hooks.php +++ b/EducationProgram.hooks.php @@ -366,7 +366,7 @@ * @param bool|null &$isKnown */ public static function onTitleIsAlwaysKnown( Title $title, &$isKnown ) { - self::doesOrgOrCourseExists( $title, $isKnown ); + self::doesOrgOrCourseExist( $title, $isKnown ); } public static function onMovePageIsValidMove( @@ -707,7 +707,7 @@ * @param bool &$exists */ public static function onTitleExists( Title $title, &$exists ) { - self::doesOrgOrCourseExists( $title, $exists ); + self::doesOrgOrCourseExist( $title, $exists ); } /** @@ -717,7 +717,7 @@ * @param Title $title * @param boolean $exists */ - private static function doesOrgOrCourseExists( Title $title, &$exists ) { + private static function doesOrgOrCourseExist( Title $title, &$exists ) { if ( $title->getNamespace() == EP_NS ) { if ( Utils::isCourse( $title ) ) { $class = Courses::class; -- To view, visit https://gerrit.wikimedia.org/r/403570 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2d67e8f16e01076612c127567f6f78e4dda2c704 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/EducationProgram Gerrit-Branch: master Gerrit-Owner: Albert221 Gerrit-Reviewer: AndyRussG Gerrit-Reviewer: VolkerE Gerrit-Reviewer: Zppix 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]: Scap canary: cache last good deploy time
Thcipriani has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/403574 ) Change subject: Scap canary: cache last good deploy time .. Scap canary: cache last good deploy time Currently, if during the course of a series of deployments the canary checker fails a deploy due to a high error rate then the baseline of comparison for subsequent deployments is invalid because we have no way of rolling back MediaWiki canaries automatically. In practical terms that means that the canary will stop one bad deployment from hitting all of production, but if the patch deployed next doesn't fix the error-rate spike then the canary check will allow it to go to production anyway because of this shifting baseline. To fix this, after a bad deployment to the canary, we cache the timestamp of that deployment. If that timestamp exists on disk then we use that timestamp during subsequen deployments to calculate the baseline mean error rate rather than using the mean error rate for the past hour (less 20 seconds) as we do now. Cached timestamps will expire after 1 hour. Bug: T183999 Change-Id: Ifc7db81d2b08381743e5807d6b982a09d87275ac --- M modules/service/files/logstash_checker.py 1 file changed, 103 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/74/403574/1 diff --git a/modules/service/files/logstash_checker.py b/modules/service/files/logstash_checker.py index f24bd07..b362307 100755 --- a/modules/service/files/logstash_checker.py +++ b/modules/service/files/logstash_checker.py @@ -12,6 +12,7 @@ import argparse +import datetime import getpass import json import logging @@ -91,8 +92,7 @@ """Shell class for checking services.""" def __init__(self, host, service_name, logstash_host, user='', password='', - verbose=False, delay=120, fail_threshold=2.0, - absolute_threshold=1.0): + delay=120, fail_threshold=2.0, absolute_threshold=1.0): """Initialize the checker.""" self.host = host self.service_name = service_name @@ -101,10 +101,51 @@ self.fail_threshold = fail_threshold self.absolute_threshold = absolute_threshold self.auth = None +self._cache_dir = None +self._cached_timestamp = None self.logger = logging.getLogger(__name__) if user: self.auth = '{}:{}'.format(user, password) + +@property +def cache_dir(self): +""" +Where we can stash persistent information for logstash_checker +""" +if self._cache_dir: +return self._cache_dir + +base_path = '/tmp' +cache_name = 'logstash-checker-cache' + +if self.service_name == 'mwdeploy': +with open('/etc/profile.d/mediawiki.sh') as f: +profile = f.readlines() +mw_lines = [l for l in profile if l.startswith('MEDIAWIKI')] +mw_profile = {} +for mw_line in mw_lines: +k, v = mw_line.split('=') +mw_profile[k] = v.strip('"\n ') + +base_path = os.path.join( +mw_profile['MEDIAWIKI_STAGING_DIR'], '.git') + +self._cache_dir = os.path.join(base_path, cache_name) + +self.logger.debug('Using cache directory "{}"'.format(self._cache_dir)) +return self._cache_dir + +@property +def cached_timestamp_path(self): +if self._cached_timestamp: +return self._cached_timestamp + +self._cached_timestamp = os.path.join( +self.cache_dir, +'{}.timestamp'.format(self.host)) + +return self._cached_timestamp def _logstash_query(self): if self.service_name == 'mwdeploy': @@ -221,6 +262,59 @@ } } +def _save_cached_ts(self, ts): +""" +Saves a cached timestamp to disk +""" +if not os.path.isdir(self.cache_dir): +os.makedirs(self.cache_dir, 02770) + +data = {'timestamp': ts} +data_json = json.dumps(data) + +self.logger.debug('Saving cached timestamp {}'.format(data_json)) +with open(self.cached_timestamp_path, 'w') as f: +f.write(data_json) + +def _rm_cached_ts(self): +""" +Remove cached ts file +""" +if os.path.exists(self.cached_timestamp_path): +os.unlink(self.cached_timestamp_path) + +def _get_cached_ts(self, ts): +""" +Returns a cached timestamp if one is available +""" +if not os.path.exists(self.cached_timestamp_path): +return ts + +with open(self.cached_timestamp_path) as f: +cached_data = json.load(f) + +cached_ts = cached_data.get('timestamp') + +if not cached_ts: +self._rm_cached_ts() +return ts + +try: +ts_da
[MediaWiki-commits] [Gerrit] operations/puppet[production]: site/logging/kafkatee: move includes from site to role
Dzahn has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/399702 ) Change subject: site/logging/kafkatee: move includes from site to role .. site/logging/kafkatee: move includes from site to role Change-Id: Ib70d493d00e2844237173c68873e9e76c56c1e03 --- M manifests/site.pp M modules/role/manifests/logging/kafkatee/webrequest/ops.pp 2 files changed, 6 insertions(+), 5 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/manifests/site.pp b/manifests/site.pp index 7b5cf80..ea86f06 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -1751,9 +1751,6 @@ node 'oxygen.eqiad.wmnet' { role(logging::kafkatee::webrequest::ops) - -include ::base::firewall -include ::standard } # parser cache databases diff --git a/modules/role/manifests/logging/kafkatee/webrequest/ops.pp b/modules/role/manifests/logging/kafkatee/webrequest/ops.pp index 14393dd..a2c907e 100644 --- a/modules/role/manifests/logging/kafkatee/webrequest/ops.pp +++ b/modules/role/manifests/logging/kafkatee/webrequest/ops.pp @@ -2,10 +2,14 @@ # Includes output filters useful for operational debugging. # class role::logging::kafkatee::webrequest::ops { -require_package('socat') + +include ::standard +include ::profile::base::firewall +include ::geoip # lint:ignore:wmf_styleguide include role::logging::kafkatee::webrequest::base -include ::geoip # lint:ignore:wmf_styleguide + +require_package('socat') $webrequest_log_directory = $::role::logging::kafkatee::webrequest::base::webrequest_log_directory $logstash_host = hiera('logstash_host') -- To view, visit https://gerrit.wikimedia.org/r/399702 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib70d493d00e2844237173c68873e9e76c56c1e03 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn Gerrit-Reviewer: Dzahn Gerrit-Reviewer: Giuseppe Lavagetto Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Integrate with Reading List service.
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/391048 ) Change subject: Integrate with Reading List service. .. Integrate with Reading List service. Bug: T180189 Bug: T183610 Change-Id: Ia82c4c5288c28ae83f7a2d56d603cae14e86adb2 --- M app/build.gradle M app/src/main/AndroidManifest.xml M app/src/main/java/org/wikipedia/auth/WikimediaAuthenticator.java A app/src/main/java/org/wikipedia/database/ReadingListsContentProvider.java M app/src/main/java/org/wikipedia/dataclient/restbase/page/RbPageSummary.java M app/src/main/java/org/wikipedia/feed/FeedFragment.java M app/src/main/java/org/wikipedia/login/LoginActivity.java M app/src/main/java/org/wikipedia/readinglist/AddToReadingListDialog.java M app/src/main/java/org/wikipedia/readinglist/ReadingListFragment.java M app/src/main/java/org/wikipedia/readinglist/ReadingListItemView.java M app/src/main/java/org/wikipedia/readinglist/ReadingListsFragment.java M app/src/main/java/org/wikipedia/readinglist/RemoveFromReadingListsDialog.java M app/src/main/java/org/wikipedia/readinglist/database/ReadingListDbHelper.java M app/src/main/java/org/wikipedia/readinglist/database/ReadingListPageTable.java A app/src/main/java/org/wikipedia/readinglist/sync/ReadingListClient.java A app/src/main/java/org/wikipedia/readinglist/sync/ReadingListSyncAdapter.java A app/src/main/java/org/wikipedia/readinglist/sync/ReadingListSyncService.java A app/src/main/java/org/wikipedia/readinglist/sync/SyncedReadingLists.java M app/src/main/java/org/wikipedia/savedpages/SavedPageSyncService.java M app/src/main/java/org/wikipedia/settings/DeveloperSettingsPreferenceLoader.java M app/src/main/java/org/wikipedia/settings/Prefs.java M app/src/main/java/org/wikipedia/settings/SettingsPreferenceLoader.java M app/src/main/res/layout/fragment_reading_lists.xml M app/src/main/res/values/preference_keys.xml A app/src/main/res/xml/reading_list_sync_adapter.xml 25 files changed, 1,322 insertions(+), 134 deletions(-) Approvals: Dbrant: Looks good to me, approved jenkins-bot: Verified diff --git a/app/build.gradle b/app/build.gradle index 9ad7927..c720594 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -259,6 +259,8 @@ return props } +addSyncContentProviderAuthority 'readinglists', 'reading_lists' + private void addSyncContentProviderAuthority(String path, String name) { android.productFlavors.all { ProductFlavor flavor -> String authority = "${appId(flavor)}.sync.${path}" diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index bdb2173..c4979b4 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -248,6 +248,13 @@ android:exported="false" /> + + + + + + + + + + + + diff --git a/app/src/main/java/org/wikipedia/auth/WikimediaAuthenticator.java b/app/src/main/java/org/wikipedia/auth/WikimediaAuthenticator.java index ed29aaf..e02e0fd 100644 --- a/app/src/main/java/org/wikipedia/auth/WikimediaAuthenticator.java +++ b/app/src/main/java/org/wikipedia/auth/WikimediaAuthenticator.java @@ -12,12 +12,13 @@ import android.support.annotation.NonNull; import android.support.annotation.Nullable; +import org.wikipedia.BuildConfig; import org.wikipedia.R; import org.wikipedia.analytics.LoginFunnel; import org.wikipedia.login.LoginActivity; public class WikimediaAuthenticator extends AbstractAccountAuthenticator { -private static final String[] SYNC_AUTHORITIES = {}; +private static final String[] SYNC_AUTHORITIES = {BuildConfig.READING_LISTS_AUTHORITY}; @NonNull private final Context context; diff --git a/app/src/main/java/org/wikipedia/database/ReadingListsContentProvider.java b/app/src/main/java/org/wikipedia/database/ReadingListsContentProvider.java new file mode 100644 index 000..74817a6 --- /dev/null +++ b/app/src/main/java/org/wikipedia/database/ReadingListsContentProvider.java @@ -0,0 +1,4 @@ +package org.wikipedia.database; + +public class ReadingListsContentProvider extends AppContentProvider { +} diff --git a/app/src/main/java/org/wikipedia/dataclient/restbase/page/RbPageSummary.java b/app/src/main/java/org/wikipedia/dataclient/restbase/page/RbPageSummary.java index c048db1..21667c2 100644 --- a/app/src/main/java/org/wikipedia/dataclient/restbase/page/RbPageSummary.java +++ b/app/src/main/java/org/wikipedia/dataclient/restbase/page/RbPageSummary.java @@ -3,6 +3,8 @@ import android.support.annotation.NonNull; import android.support.annotation.Nullable; +import com.google.gson.annotations.SerializedName; + import org.wikipedia.dataclient.page.PageSummary; import org.wikipedia.dataclient.restbase.RbServiceError; import org.wikipedia.json.annotations.Required; @@ -22,6 +24,7 @@ @SuppressWarnings("unused") @Nullable private String extract;
[MediaWiki-commits] [Gerrit] mediawiki...release[master]: make-wmf-branch: Combine skins/vendor to extension logic
jenkins-bot has submitted this change and it was merged. ( 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. Also removes the weird part where we dropped .gitignore but override it elsewhere Change-Id: I550c8a880273df6fd901d57d56149f654d1d21fa --- M make-wmf-branch/MakeWmfBranch.php M make-wmf-branch/config.json 2 files changed, 189 insertions(+), 217 deletions(-) Approvals: Chad: Looks good to me, approved jenkins-bot: Verified diff --git a/make-wmf-branch/MakeWmfBranch.php b/make-wmf-branch/MakeWmfBranch.php index 3a233de..ab8761d 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 ) { @@ -134,12 +129,8 @@ function execute( $clonePath ) { $this->setupBuildDirectory(); foreach ( $this->branchedExtensions as $ext ) { - $this->branchRepo( "extensions/{$ext}" ); + $this->branchRepo( $ext ); } - foreach ( $this->branchedSkins as $skin ) { - $this->branchRepo( "skins/{$skin}" ); - } - $this->branchRepo( 'vendor' ); $this->branchWmf( $clonePath ); } @@ -220,35 +211,17 @@ $newVersion = $this->branchPrefix . $this->newVersion; $this->runCmd( 'git', 'checkout', '-q', '-b', $newVersion ); - # Delete extensions/README and extensions/.gitignore if we branched master - if ( $this->oldVersion == 'master' ) { - $this->runCmd( 'git', 'rm', '-q', "extensions/README", "extensions/.gitignore" ); + # Add extensions/skins/vendor + foreach ( $this->branchedExtensions as $name ) { + $this->runCmd( 'git', 'submodule', 'add', '-f', '-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..
[MediaWiki-commits] [Gerrit] mediawiki...release[master]: release: Remove upload tar, dubiously useful
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/403561 ) 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(-) Approvals: Chad: Looks good to me, approved jenkins-bot: Verified 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: merged Gerrit-Change-Id: If023010092751e5c3058805dee706d3aee1127b6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/tools/release Gerrit-Branch: master Gerrit-Owner: Chad Gerrit-Reviewer: Chad Gerrit-Reviewer: Reedy Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Hygiene: Remove unused methods and class
Cooltey has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/403573 ) Change subject: Hygiene: Remove unused methods and class .. Hygiene: Remove unused methods and class Change-Id: I08b4df08627d3894cfbb5de905b7048ac93b346e --- M app/src/main/java/org/wikipedia/util/DimenUtil.java M app/src/main/java/org/wikipedia/util/L10nUtil.java M app/src/main/java/org/wikipedia/util/ThrowableUtil.java D app/src/main/java/org/wikipedia/util/ValidateUtil.java 4 files changed, 4 insertions(+), 22 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/73/403573/1 diff --git a/app/src/main/java/org/wikipedia/util/DimenUtil.java b/app/src/main/java/org/wikipedia/util/DimenUtil.java index 815d44f..4e93b68 100644 --- a/app/src/main/java/org/wikipedia/util/DimenUtil.java +++ b/app/src/main/java/org/wikipedia/util/DimenUtil.java @@ -131,14 +131,6 @@ return (int) (getDisplayHeightPx() * articleHeaderViewScreenHeightRatio()); } -public static int newsFeatureImageHeightForDevice() { -return (int) (getDisplayHeightPx() * newsFeatureImageScreenHeightRatio()); -} - -private static float newsFeatureImageScreenHeightRatio() { -return DimenUtil.getFloat(R.dimen.newsFeatureImageScreenHeightRatio); -} - private static float articleHeaderViewScreenHeightRatio() { return DimenUtil.getFloat(R.dimen.articleHeaderViewScreenHeightRatio); } diff --git a/app/src/main/java/org/wikipedia/util/L10nUtil.java b/app/src/main/java/org/wikipedia/util/L10nUtil.java index a4b015b..48baf4c 100644 --- a/app/src/main/java/org/wikipedia/util/L10nUtil.java +++ b/app/src/main/java/org/wikipedia/util/L10nUtil.java @@ -225,6 +225,7 @@ } } +// TODO: remove this if we can get correct language counts from server public static int getUpdatedLanguageCountIfNeeded(String getLanguageCode, int originalLanguageCount) { int updatedLanguageCount = originalLanguageCount; diff --git a/app/src/main/java/org/wikipedia/util/ThrowableUtil.java b/app/src/main/java/org/wikipedia/util/ThrowableUtil.java index e78cb01..4c6d6b6 100644 --- a/app/src/main/java/org/wikipedia/util/ThrowableUtil.java +++ b/app/src/main/java/org/wikipedia/util/ThrowableUtil.java @@ -22,7 +22,7 @@ // TODO: replace with Apache Commons Lang ExceptionUtils. @NonNull -public static Throwable getInnermostThrowable(@NonNull Throwable e) { +private static Throwable getInnermostThrowable(@NonNull Throwable e) { Throwable t = e; while (t.getCause() != null) { t = t.getCause(); @@ -31,7 +31,7 @@ } // TODO: replace with Apache Commons Lang ExceptionUtils. -public static boolean throwableContainsException(@NonNull Throwable e, Class exClass) { +private static boolean throwableContainsException(@NonNull Throwable e, Class exClass) { Throwable t = e; while (t != null) { if (t.getClass().equals(exClass)) { @@ -96,7 +96,7 @@ @Deprecated public static class AppError { private String error; private String detail; -public AppError(@NonNull String error, @Nullable String detail) { +private AppError(@NonNull String error, @Nullable String detail) { this.error = error; this.detail = detail; } diff --git a/app/src/main/java/org/wikipedia/util/ValidateUtil.java b/app/src/main/java/org/wikipedia/util/ValidateUtil.java deleted file mode 100644 index d00271e..000 --- a/app/src/main/java/org/wikipedia/util/ValidateUtil.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.wikipedia.util; - -import org.apache.commons.lang3.Validate; - -public final class ValidateUtil { -public static void noNullElements(Object... objs) { -Validate.noNullElements(objs); -} - -private ValidateUtil() { } -} -- To view, visit https://gerrit.wikimedia.org/r/403573 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I08b4df08627d3894cfbb5de905b7048ac93b346e Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Cooltey ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: confluent:kafka:jmxtrans: remove Ganglia support
Dzahn has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/399686 ) Change subject: confluent:kafka:jmxtrans: remove Ganglia support .. confluent:kafka:jmxtrans: remove Ganglia support Since Ganglia has been removed, also drop the support from Confluent module. Bug: T177225 Change-Id: I9c4346a6162d09fb7dbb11cc41a62f20c45ee34c --- M modules/confluent/manifests/kafka/broker/jmxtrans.pp M modules/confluent/manifests/kafka/mirror/jmxtrans.pp 2 files changed, 3 insertions(+), 16 deletions(-) Approvals: Ottomata: Looks good to me, but someone else must approve jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/modules/confluent/manifests/kafka/broker/jmxtrans.pp b/modules/confluent/manifests/kafka/broker/jmxtrans.pp index 292bc29..254f9e6 100644 --- a/modules/confluent/manifests/kafka/broker/jmxtrans.pp +++ b/modules/confluent/manifests/kafka/broker/jmxtrans.pp @@ -5,9 +5,6 @@ # https://github.com/wikimedia/puppet-jmxtrans. # # == Parameters -# [*ganglia*] -# Ganglia host:port. Default: under -# # [*graphite*] # Graphite host:port. Default: under # @@ -32,12 +29,12 @@ # Level at which jmxtrans should log. Default: info # # == Usage -# class { 'confluent::kafka::broker::jmxtrans': -# ganglia => 'ganglia.example.org:8649' +# class { '::confluent::kafka::broker::jmxtrans': +# group_prefix => 'kafka.cluster.example', +# statsd => hiera('statsd', undef), # } # class confluent::kafka::broker::jmxtrans( -$ganglia= undef, $graphite = undef, $statsd = undef, $outfile= undef, @@ -70,7 +67,6 @@ # query for metrics from Kafka's JVM jmxtrans::metrics::jvm { $jmx: -ganglia => $ganglia, graphite => $graphite, statsd => $statsd, outfile => $outfile, @@ -335,8 +331,6 @@ jmxtrans::metrics { "kafka-${::hostname}-${jmx_port}": jmx => $jmx, outfile => $outfile, -ganglia => $ganglia, -ganglia_group_name => "${group_prefix}kafka", graphite => $graphite, graphite_root_prefix => "${group_prefix}kafka", statsd => $statsd, diff --git a/modules/confluent/manifests/kafka/mirror/jmxtrans.pp b/modules/confluent/manifests/kafka/mirror/jmxtrans.pp index b608d3e..0bfbb7b 100644 --- a/modules/confluent/manifests/kafka/mirror/jmxtrans.pp +++ b/modules/confluent/manifests/kafka/mirror/jmxtrans.pp @@ -13,9 +13,6 @@ # [*jmx_port*] # Kafka MirrorMaker JMX port # -# [*ganglia*] -# Ganglia host:port -# # [*graphite*] # Graphite host:port # @@ -45,7 +42,6 @@ # define confluent::kafka::mirror::jmxtrans( $jmx_port = 9997, -$ganglia= undef, $graphite = undef, $statsd = undef, $outfile= undef, @@ -59,7 +55,6 @@ # query for metrics from Kafka's JVM jmxtrans::metrics::jvm { $jmx: -ganglia => $ganglia, graphite => $graphite, statsd => $statsd, outfile => $outfile, @@ -317,8 +312,6 @@ jmxtrans::metrics { "kafka-mirror-${title}-${jmx_port}": jmx => $jmx, outfile => $outfile, -ganglia => $ganglia, -ganglia_group_name => "${group_prefix}kafka-mirror", graphite => $graphite, graphite_root_prefix => "${group_prefix}kafka-mirror", statsd => $statsd, -- To view, visit https://gerrit.wikimedia.org/r/399686 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9c4346a6162d09fb7dbb11cc41a62f20c45ee34c Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn Gerrit-Reviewer: Dzahn Gerrit-Reviewer: Ottomata 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]: wikilabels: fix profile class name in role
Dzahn has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/403572 ) Change subject: wikilabels: fix profile class name in role .. wikilabels: fix profile class name in role Currently the wikilabels cloud VPS instances fail to run puppet because they profile class can't be found. Change-Id: I28ed2ff20f102321e483e37ee212d97bc595 --- M modules/role/manifests/wikilabels/server.pp M modules/role/manifests/wikilabels/staging.pp 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/modules/role/manifests/wikilabels/server.pp b/modules/role/manifests/wikilabels/server.pp index 444daab..6c782fe 100644 --- a/modules/role/manifests/wikilabels/server.pp +++ b/modules/role/manifests/wikilabels/server.pp @@ -5,7 +5,7 @@ include ::wikilabels::session -class { '::profile::wikilabels::server': +class { '::profile::wikilabels': branch => 'deploy', } } diff --git a/modules/role/manifests/wikilabels/staging.pp b/modules/role/manifests/wikilabels/staging.pp index 2e54b40..774ef43 100644 --- a/modules/role/manifests/wikilabels/staging.pp +++ b/modules/role/manifests/wikilabels/staging.pp @@ -5,7 +5,7 @@ include ::wikilabels::session -class { '::profile::wikilabels::server': +class { '::profile::wikilabels': branch => 'master', } } -- To view, visit https://gerrit.wikimedia.org/r/403572 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I28ed2ff20f102321e483e37ee212d97bc595 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn Gerrit-Reviewer: Dzahn 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]: wikilabels: fix profile class name in role
Dzahn has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/403572 ) Change subject: wikilabels: fix profile class name in role .. wikilabels: fix profile class name in role Currently the wikilabels cloud VPS instances fail to run puppet because they profile class can't be found. Change-Id: I28ed2ff20f102321e483e37ee212d97bc595 --- M modules/role/manifests/wikilabels/server.pp M modules/role/manifests/wikilabels/staging.pp 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/72/403572/1 diff --git a/modules/role/manifests/wikilabels/server.pp b/modules/role/manifests/wikilabels/server.pp index 444daab..6c782fe 100644 --- a/modules/role/manifests/wikilabels/server.pp +++ b/modules/role/manifests/wikilabels/server.pp @@ -5,7 +5,7 @@ include ::wikilabels::session -class { '::profile::wikilabels::server': +class { '::profile::wikilabels': branch => 'deploy', } } diff --git a/modules/role/manifests/wikilabels/staging.pp b/modules/role/manifests/wikilabels/staging.pp index 2e54b40..774ef43 100644 --- a/modules/role/manifests/wikilabels/staging.pp +++ b/modules/role/manifests/wikilabels/staging.pp @@ -5,7 +5,7 @@ include ::wikilabels::session -class { '::profile::wikilabels::server': +class { '::profile::wikilabels': branch => 'master', } } -- To view, visit https://gerrit.wikimedia.org/r/403572 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I28ed2ff20f102321e483e37ee212d97bc595 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Revert "Restrict sending mails to new users"
Hello Urbanecm, Niharika29, EddieGP, TerraCodes, jenkins-bot, Zoranzoki21, I'd like you to do a code review. Please visit https://gerrit.wikimedia.org/r/403571 to review the following change. Change subject: Revert "Restrict sending mails to new users" .. Revert "Restrict sending mails to new users" This reverts commit c29cb66cbc2b32a8e000d042df50da145fea93a7. Bug: T184470 Change-Id: Ib11dbd457fc6ddaad73ab7c3cc99a7790bacc5d4 --- M wmf-config/InitialiseSettings.php 1 file changed, 0 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/71/403571/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 4eb8ce0..b140c67 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -8993,7 +8993,6 @@ 'global-renamer' => [ // T142123, T71651 'autopatrol' => true, 'centralauth-rename' => true, - 'sendemail-new-users' => true, ], 'massmessage-sender' => [ // T59611, T142123 'autopatrol' => true, @@ -9037,7 +9036,6 @@ 'massmessage' => true, 'userrights' => true, 'userrights-interwiki' => true, - 'sendemail-new-users' => true, ], ], 'mkwiki' => [ @@ -9755,11 +9753,9 @@ ], 'bureaucrat' => [ 'noratelimit' => true, - 'sendemail-new-users' => true, ], 'steward' => [ 'noratelimit' => true, - 'sendemail-new-users' => true, ], // 'rollback' => array( 'rollback' => true, ), 'import' => [ 'importupload' => true, 'import' => true ], @@ -9773,7 +9769,6 @@ 'move-subpages' => false, // for now... 'movefile' => false, // r93871 CR 'editcontentmodel' => false, // temp, pending T85847 - 'sendemail-new-users' => false, ], 'autoconfirmed' => [ 'reupload' => true, -- To view, visit https://gerrit.wikimedia.org/r/403571 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib11dbd457fc6ddaad73ab7c3cc99a7790bacc5d4 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Dmaza Gerrit-Reviewer: EddieGP Gerrit-Reviewer: Niharika29 Gerrit-Reviewer: TerraCodes 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] mediawiki...EducationProgram[master]: Fix typo in private method's name in hooks
Albert221 has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/403570 ) Change subject: Fix typo in private method's name in hooks .. Fix typo in private method's name in hooks Change-Id: I2d67e8f16e01076612c127567f6f78e4dda2c704 --- M EducationProgram.hooks.php 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/EducationProgram refs/changes/70/403570/1 diff --git a/EducationProgram.hooks.php b/EducationProgram.hooks.php index 0d5acb4..30ad6cd 100644 --- a/EducationProgram.hooks.php +++ b/EducationProgram.hooks.php @@ -366,7 +366,7 @@ * @param bool|null &$isKnown */ public static function onTitleIsAlwaysKnown( Title $title, &$isKnown ) { - self::doesOrgOrCourseExists( $title, $isKnown ); + self::doesOrgOrCourseExist( $title, $isKnown ); } public static function onMovePageIsValidMove( @@ -707,7 +707,7 @@ * @param bool &$exists */ public static function onTitleExists( Title $title, &$exists ) { - self::doesOrgOrCourseExists( $title, $exists ); + self::doesOrgOrCourseExist( $title, $exists ); } /** @@ -717,7 +717,7 @@ * @param Title $title * @param boolean $exists */ - private static function doesOrgOrCourseExists( Title $title, &$exists ) { + private static function doesOrgOrCourseExist( Title $title, &$exists ) { if ( $title->getNamespace() == EP_NS ) { if ( Utils::isCourse( $title ) ) { $class = Courses::class; -- To view, visit https://gerrit.wikimedia.org/r/403570 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2d67e8f16e01076612c127567f6f78e4dda2c704 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/EducationProgram Gerrit-Branch: master Gerrit-Owner: Albert221 ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: wikilabels: convert roles to a profile and 2 roles
Dzahn has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/400252 ) Change subject: wikilabels: convert roles to a profile and 2 roles .. wikilabels: convert roles to a profile and 2 roles Change-Id: I2eb225c3d2aa678c54e8b0884113813c683d196f --- A modules/profile/manifests/wikilabels.pp M modules/role/manifests/wikilabels/server.pp M modules/role/manifests/wikilabels/staging.pp 3 files changed, 20 insertions(+), 10 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/modules/profile/manifests/wikilabels.pp b/modules/profile/manifests/wikilabels.pp new file mode 100644 index 000..fdbf2f9 --- /dev/null +++ b/modules/profile/manifests/wikilabels.pp @@ -0,0 +1,12 @@ +class profile::wikilabels ( +$branch = undefined, +){ + +class { 'wikilabels::web': +branch => $branch, +} + +class { '::wikilabels::db_proxy': +server => 'pgsql.eqiad.wmnet', +} +} diff --git a/modules/role/manifests/wikilabels/server.pp b/modules/role/manifests/wikilabels/server.pp index 6805405..444daab 100644 --- a/modules/role/manifests/wikilabels/server.pp +++ b/modules/role/manifests/wikilabels/server.pp @@ -1,12 +1,11 @@ # filtertags: labs-project-wikilabels class role::wikilabels::server { -class { 'wikilabels::web': -branch => 'deploy', -} + +system::role { $name: } include ::wikilabels::session -class { '::wikilabels::db_proxy': -server => 'pgsql.eqiad.wmnet', +class { '::profile::wikilabels::server': +branch => 'deploy', } } diff --git a/modules/role/manifests/wikilabels/staging.pp b/modules/role/manifests/wikilabels/staging.pp index 7e7107c..2e54b40 100644 --- a/modules/role/manifests/wikilabels/staging.pp +++ b/modules/role/manifests/wikilabels/staging.pp @@ -1,12 +1,11 @@ # filtertags: labs-project-wikilabels class role::wikilabels::staging { -class { 'wikilabels::web': -branch => 'master', -} + +system::role { $name: } include ::wikilabels::session -class { '::wikilabels::db_proxy': -server => 'pgsql.eqiad.wmnet', +class { '::profile::wikilabels::server': +branch => 'master', } } -- To view, visit https://gerrit.wikimedia.org/r/400252 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2eb225c3d2aa678c54e8b0884113813c683d196f Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn Gerrit-Reviewer: Dzahn Gerrit-Reviewer: Giuseppe Lavagetto 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...SocialProfile[master]: Split UploadAvatar class into its own file
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/403330 ) Change subject: Split UploadAvatar class into its own file .. Split UploadAvatar class into its own file Change-Id: Idf8be2ec65b73140e43e2482bd5b237f9b6fc064 --- M SocialProfile.php M UserProfile/SpecialUploadAvatar.php A UserProfile/UploadAvatar.php 3 files changed, 229 insertions(+), 228 deletions(-) Approvals: Jack Phoenix: Looks good to me, approved jenkins-bot: Verified diff --git a/SocialProfile.php b/SocialProfile.php index 5046af6..7bd5de6 100644 --- a/SocialProfile.php +++ b/SocialProfile.php @@ -38,7 +38,7 @@ $wgAutoloadClasses['SpecialToggleUserPage'] = __DIR__ . '/UserProfile/SpecialToggleUserPageType.php'; $wgAutoloadClasses['SpecialUpdateProfile'] = __DIR__ . '/UserProfile/SpecialUpdateProfile.php'; $wgAutoloadClasses['SpecialUploadAvatar'] = __DIR__ . '/UserProfile/SpecialUploadAvatar.php'; -$wgAutoloadClasses['UploadAvatar'] = __DIR__ . '/UserProfile/SpecialUploadAvatar.php'; +$wgAutoloadClasses['UploadAvatar'] = __DIR__ . '/UserProfile/UploadAvatar.php'; $wgAutoloadClasses['RemoveAvatar'] = __DIR__ . '/UserProfile/SpecialRemoveAvatar.php'; $wgAutoloadClasses['UserProfile'] = __DIR__ . '/UserProfile/UserProfileClass.php'; $wgAutoloadClasses['UserProfileHooks'] = __DIR__ . '/UserProfile/UserProfileHooks.php'; diff --git a/UserProfile/SpecialUploadAvatar.php b/UserProfile/SpecialUploadAvatar.php index 74a39b8..1041446 100644 --- a/UserProfile/SpecialUploadAvatar.php +++ b/UserProfile/SpecialUploadAvatar.php @@ -251,230 +251,4 @@ } } -} - -class UploadAvatar extends UploadFromFile { - public $mExtension; - - function createThumbnail( $imageSrc, $imageInfo, $imgDest, $thumbWidth ) { - global $wgUseImageMagick, $wgImageMagickConvertCommand; - - if ( $wgUseImageMagick ) { // ImageMagick is enabled - list( $origWidth, $origHeight, $typeCode ) = $imageInfo; - - if ( $origWidth < $thumbWidth ) { - $thumbWidth = $origWidth; - } - $thumbHeight = ( $thumbWidth * $origHeight / $origWidth ); - $border = ' -bordercolor white -border 0x'; - if ( $thumbHeight < $thumbWidth ) { - $border = ' -bordercolor white -border 0x' . ( ( $thumbWidth - $thumbHeight ) / 2 ); - } - if ( $typeCode == 2 ) { - exec( - $wgImageMagickConvertCommand . ' -size ' . $thumbWidth . 'x' . $thumbWidth . - ' -resize ' . $thumbWidth . ' -crop ' . $thumbWidth . 'x' . - $thumbWidth . '+0+0 -quality 100 ' . $border . ' ' . - $imageSrc . ' ' . $this->avatarUploadDirectory . '/' . $imgDest . '.jpg' - ); - } - if ( $typeCode == 1 ) { - exec( - $wgImageMagickConvertCommand . ' -size ' . $thumbWidth . 'x' . $thumbWidth . - ' -resize ' . $thumbWidth . ' -crop ' . $thumbWidth . 'x' . - $thumbWidth . '+0+0 ' . $imageSrc . ' ' . $border . ' ' . - $this->avatarUploadDirectory . '/' . $imgDest . '.gif' - ); - } - if ( $typeCode == 3 ) { - exec( - $wgImageMagickConvertCommand . ' -size ' . $thumbWidth . 'x' . $thumbWidth . - ' -resize ' . $thumbWidth . ' -crop ' . $thumbWidth . 'x' . - $thumbWidth . '+0+0 ' . $imageSrc . ' ' . - $this->avatarUploadDirectory . '/' . $imgDest . '.png' - ); - } - } else { // ImageMagick is not enabled, so fall back to PHP's GD library - // Get the image size, used in calculations later. - list( $origWidth, $origHeight, $typeCode ) = getimagesize( $imageSrc ); - - switch( $typeCode ) { - case '1': - $fullImage = imagecreatefromgif( $imageSrc ); - $ext = 'gif'; - break; - case '2': - $fullImage = imagecreatefromjpeg( $imageSrc ); - $ext = 'jpg'; -
[MediaWiki-commits] [Gerrit] mediawiki...SocialProfile[master]: Avoid $wgRequest & $wgOut globals in ArticleFromTitle hook s...
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/403337 ) Change subject: Avoid $wgRequest & $wgOut globals in ArticleFromTitle hook subscriber .. Avoid $wgRequest & $wgOut globals in ArticleFromTitle hook subscriber Change-Id: I3501ebb7a562b87c12f3ad5c4a87883ed6c04701 --- M UserProfile/UserProfileHooks.php 1 file changed, 9 insertions(+), 5 deletions(-) Approvals: Jack Phoenix: Looks good to me, approved jenkins-bot: Verified diff --git a/UserProfile/UserProfileHooks.php b/UserProfile/UserProfileHooks.php index 5c2d458..173983b 100644 --- a/UserProfile/UserProfileHooks.php +++ b/UserProfile/UserProfileHooks.php @@ -44,7 +44,11 @@ * @return bool */ public static function onArticleFromTitle( &$title, &$article ) { - global $wgRequest, $wgOut, $wgHooks, $wgUserPageChoice; + global $wgHooks, $wgUserPageChoice; + + $context = $article->getContext(); + $out = $context->getOutput(); + $request = $context->getRequest(); if ( !$title->isSubpage() && @@ -63,15 +67,15 @@ if ( !$show_user_page ) { // Prevents editing of userpage - if ( $wgRequest->getVal( 'action' ) == 'edit' ) { - $wgOut->redirect( $title->getFullURL() ); + if ( $request->getVal( 'action' ) == 'edit' ) { + $out->redirect( $title->getFullURL() ); } } else { - $wgOut->enableClientCache( false ); + $out->enableClientCache( false ); $wgHooks['ParserLimitReportPrepare'][] = 'UserProfileHooks::onParserLimitReportPrepare'; } - $wgOut->addModuleStyles( [ + $out->addModuleStyles( [ 'ext.socialprofile.clearfix', 'ext.socialprofile.userprofile.css' ] ); -- To view, visit https://gerrit.wikimedia.org/r/403337 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3501ebb7a562b87c12f3ad5c4a87883ed6c04701 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SocialProfile Gerrit-Branch: master Gerrit-Owner: SamanthaNguyen Gerrit-Reviewer: Jack Phoenix Gerrit-Reviewer: Lewis Cawte 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]: rename phabricator_server to just phabricator
Dzahn has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/393709 ) Change subject: rename phabricator_server to just phabricator .. rename phabricator_server to just phabricator Similar to gerrit we can also rename "phabricator_server" to just "phabricator". There were just historic reasons for that. Change-Id: I1293ef9eb9a779d80fbfb43df127677112d89d06 --- R hieradata/role/codfw/phabricator.yaml R hieradata/role/common/phabricator.yaml R hieradata/role/eqiad/phabricator.yaml M manifests/site.pp M modules/profile/templates/cumin/aliases.yaml.erb R modules/role/manifests/phabricator.pp 6 files changed, 4 insertions(+), 4 deletions(-) Approvals: 20after4: Looks good to me, but someone else must approve jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/hieradata/role/codfw/phabricator_server.yaml b/hieradata/role/codfw/phabricator.yaml similarity index 100% rename from hieradata/role/codfw/phabricator_server.yaml rename to hieradata/role/codfw/phabricator.yaml diff --git a/hieradata/role/common/phabricator_server.yaml b/hieradata/role/common/phabricator.yaml similarity index 100% rename from hieradata/role/common/phabricator_server.yaml rename to hieradata/role/common/phabricator.yaml diff --git a/hieradata/role/eqiad/phabricator_server.yaml b/hieradata/role/eqiad/phabricator.yaml similarity index 100% rename from hieradata/role/eqiad/phabricator_server.yaml rename to hieradata/role/eqiad/phabricator.yaml diff --git a/manifests/site.pp b/manifests/site.pp index 0469cca..7b5cf80 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -1046,7 +1046,7 @@ # Phabricator node /^(phab1001\.eqiad|phab2001\.codfw)\.wmnet$/ { -role(phabricator_server) +role(phabricator) interface::add_ip6_mapped { 'main': } } diff --git a/modules/profile/templates/cumin/aliases.yaml.erb b/modules/profile/templates/cumin/aliases.yaml.erb index 0f6323b..b6a9820 100644 --- a/modules/profile/templates/cumin/aliases.yaml.erb +++ b/modules/profile/templates/cumin/aliases.yaml.erb @@ -198,5 +198,5 @@ misc-nonprod: P{O:spare::system or O:test or O:pybaltest or O:restbase::test_cluster or O:authdns::testns or O:cache::canary} misc-ops: A:installserver or A:cumin or A:url-downloader or A:icinga or P{O:logging::kafkatee::webrequest::ops or O:builder or O:syslog::centralserver or O:pmacct or O:backup::offsite or O:backup} or A:netmon misc-others: P{O:mw_rc_irc or O:etherpad or O:tor_relay or O:lists} -misc-releng: P{O:labs::openstack::nodepool or O:phabricator_server} or A:contint or A:gerrit +misc-releng: P{O:labs::openstack::nodepool or O:phabricator} or A:contint or A:gerrit misc-wmcs: A:labnet or A:labcontrol or A:labservices or A:labweb diff --git a/modules/role/manifests/phabricator_server.pp b/modules/role/manifests/phabricator.pp similarity index 84% rename from modules/role/manifests/phabricator_server.pp rename to modules/role/manifests/phabricator.pp index 6f15a33..6fc8e91 100644 --- a/modules/role/manifests/phabricator_server.pp +++ b/modules/role/manifests/phabricator.pp @@ -1,9 +1,9 @@ # phabricator instance # # filtertags: labs-project-deployment-prep labs-project-phabricator -class role::phabricator_server { +class role::phabricator { -system::role { 'phabricator_server': +system::role { 'phabricator': description => 'Phabricator (Main) Server' } -- To view, visit https://gerrit.wikimedia.org/r/393709 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1293ef9eb9a779d80fbfb43df127677112d89d06 Gerrit-PatchSet: 4 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn Gerrit-Reviewer: 20after4 Gerrit-Reviewer: Chad Gerrit-Reviewer: Dzahn Gerrit-Reviewer: Giuseppe Lavagetto Gerrit-Reviewer: Volans 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...Flow[wmf/1.31.0-wmf.16]: Unbreak CSS selector for fallback input widget
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/403567 ) Change subject: Unbreak CSS selector for fallback input widget .. Unbreak CSS selector for fallback input widget Bug: T184631 Change-Id: I52bf0d5137e4c04fd71cb0058fad14aa70d2860d (cherry picked from commit bb668ee3211a491f331d8472d92210fc195ec4b0) --- M modules/styles/flow/widgets/editor/mw.flow.ui.EditorWidget.less 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/styles/flow/widgets/editor/mw.flow.ui.EditorWidget.less b/modules/styles/flow/widgets/editor/mw.flow.ui.EditorWidget.less index 7e17b47..958e8d7 100644 --- a/modules/styles/flow/widgets/editor/mw.flow.ui.EditorWidget.less +++ b/modules/styles/flow/widgets/editor/mw.flow.ui.EditorWidget.less @@ -31,7 +31,7 @@ bottom: @editorToolbarHeight; } - > .oo-ui-textInputWidget { + &-editor > .oo-ui-textInputWidget { max-width: none; textarea { -- To view, visit https://gerrit.wikimedia.org/r/403567 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I52bf0d5137e4c04fd71cb0058fad14aa70d2860d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: wmf/1.31.0-wmf.16 Gerrit-Owner: Catrope Gerrit-Reviewer: Catrope Gerrit-Reviewer: Esanders 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/mediawiki-config[master]: keys: Simplify and update keys.html styling to match other s...
Krinkle has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/403569 ) Change subject: keys: Simplify and update keys.html styling to match other simple pages .. keys: Simplify and update keys.html styling to match other simple pages Loosely based on https://noc.wikimedia.org/css/base.css and the various simple (error) pages we have for 404, 503, docroot/default etc. Considered loading https://noc.wikimedia.org/css/base.css, but figured it would be preferable for this page not to load styles cross-domain. Change-Id: I8cfe38fe7ad266701497f83d66ebca79c2e62f9c --- M docroot/mediawiki/keys/keys.html M docroot/mediawiki/static 2 files changed, 27 insertions(+), 119 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/69/403569/1 diff --git a/docroot/mediawiki/keys/keys.html b/docroot/mediawiki/keys/keys.html index 6005044..82da4c1 100644 --- a/docroot/mediawiki/keys/keys.html +++ b/docroot/mediawiki/keys/keys.html @@ -1,120 +1,29 @@ -http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> -http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en" dir="ltr"> - - - Wikimedia public key list - /*https://svn.wikimedia.org/skins/custom/images/page-base.png) 0 0 no-repeat; - color: black; - margin: 0; - padding: 0; -} -/* scale back up to a sane default */ -#globalWrapper { - font-size: 127%; - width: 100%; - margin: 0; - padding: 0; -} -#content { - margin: 2em 2em 0 2em; - padding: 0 1em 1.5em 1em; - background: white; - color: black; - border: 1px solid #aaa; - line-height: 1.5em; - position: relative; - z-index: 2; -} -h1, h2, h3, h4, h5, h6 { - color: black; - background: none; - font-weight: normal; - margin: 0; - padding-top: .5em; - padding-bottom: .17em; - border-bottom: 1px solid #aaa; -} -h1 { - font-size: 188%; - margin-bottom: .6em; -} -h2 { - font-size: 150%; - margin-bottom: .6em; -} -h3, h4, h5, h6 { - border-bottom: none; - font-weight: bold; - margin-bottom: .3em; -} - -ul { - line-height: 1.5em; - list-style-type: square; - margin: .3em 0 0 1.5em; - padding: 0; - list-style-image: url(bullet.gif); -} -ol { - line-height: 1.5em; - margin: .3em 0 0 3.2em; - padding: 0; - list-style-image: none; -} -li { - margin-bottom: .1em; -} -dt { - font-weight: bold; - margin-bottom: .05em; -} -dl { - margin-top: .2em; - margin-bottom: .5em; -} -dd { - line-height: 1.5em; - margin-left: 2em; - margin-bottom: .5em; -} -a { - text-decoration: none; - color: #002bb8; - background: none; -} -a:visited { - color: #5a3696; -} -a:active { - color: #faa700; -} -a:hover { - text-decoration: underline; -} - -.visualClear { - clear: both; -} - -/*]]>*/ - + + + + +Wikimedia public key list + +html, body { margin: 0; padding: 0; } +body { background: #fff; font: 15px/1.6 sans-serif; color: #333; } +.content { margin: 7% auto 0; padding: 2em 1em 1em; max-width: 640px; overflow: hidden; } +.clear { clear: both; } +img { float: left; margin: 0 2em 2em 0; } +a img { border: 0; } +a { color: #0645AD; text-decoration: none; } +a:hover { text-decoration: underline; } + - - - Wikimedia public key list - - - A plain text bundle is also available. You can use the following to - automatically import it: - - gpg --fetch-keys "https://www.mediawiki.org/keys/keys.txt"; - - - Tim Starling + + https://www.wikimedia.org";> + Wikimedia public key list + A plain text bundle is also available. + You can use the following to automatically import it: + gpg --fetch-keys "https://www.mediawiki.org/keys/keys.txt"; + + +Tim Starling -BEGIN PGP PUBLIC KEY BLOCK- Version: GnuPG v1.4.9 (GNU/Linux) @@ -894,7 +803,6 @@ =vhcr -END PGP PUBLIC KEY BLOCK- - - - + + diff --git a/docroot/mediawiki/static b/docroot/mediawiki/static index de3aae3..8e9b74c 12 --- a/docroot/mediawiki/static +++ b/docroot/mediawiki/static @@ -1 +1 @@ -/srv/mediawiki/static \ No newline at end of file +../../static \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add Special:Stats as an alias for Special:Statistics
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/403089 ) Change subject: Add Special:Stats as an alias for Special:Statistics .. Add Special:Stats as an alias for Special:Statistics Change-Id: Ib3dd0498f6ae77b522ddee786655994b24f63350 --- M languages/messages/MessagesEn.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: jenkins-bot: Verified VolkerE: Looks good to me, but someone else must approve Kaldari: Looks good to me, approved diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index a3173d4..16a12de 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -488,7 +488,7 @@ 'Search'=> [ 'Search' ], 'Shortpages'=> [ 'ShortPages' ], 'Specialpages' => [ 'SpecialPages' ], - 'Statistics'=> [ 'Statistics' ], + 'Statistics'=> [ 'Statistics', 'Stats' ], 'Tags' => [ 'Tags' ], 'TrackingCategories'=> [ 'TrackingCategories' ], 'Unblock' => [ 'Unblock' ], -- To view, visit https://gerrit.wikimedia.org/r/403089 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib3dd0498f6ae77b522ddee786655994b24f63350 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Kaldari Gerrit-Reviewer: Kaldari Gerrit-Reviewer: Siebrand Gerrit-Reviewer: VolkerE 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...mobileapps[master]: Remove unwanted nodes and attributes from summary
BearND has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/403568 ) Change subject: Remove unwanted nodes and attributes from summary .. Remove unwanted nodes and attributes from summary Bug: T184557 Change-Id: Ib4f21f5f68913fa10b9005d10de23b94616dcc94 --- M lib/transformations/summarize.js M test/lib/transformations/summarize.js 2 files changed, 88 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps refs/changes/68/403568/1 diff --git a/lib/transformations/summarize.js b/lib/transformations/summarize.js index e0becc8..f558d86 100644 --- a/lib/transformations/summarize.js +++ b/lib/transformations/summarize.js @@ -4,6 +4,77 @@ const flattenElements = require('./flattenElements'); const rmElementsWithSelector = require('./rmElementsWithSelector'); const removeAttributes = require('./removeAttributes'); +const NodeType = require('../nodeType'); + +const ALLOWED_ATTRIBUTES = ['class', 'style']; +const DISALLOWED_ELEMENTS = ['object', 'script', 'style']; + +/** + * Removes blacklisted elements. + * @param {!Node} node the node to visit + */ +function rmDisallowedElements(node) { +if (DISALLOWED_ELEMENTS.includes(node.tagName)) { +node.remove(); +} +} + +/** + * Removes attributes except white-listed ones. + * @param {!Node} node the node to visit + */ +function rmUnwantedAttributes(node) { +if (node.tagName !== 'IMG') { +const attrs = node.attributes; +for (let i = attrs.length - 1; i >= 0; i--) { +const attribute = attrs.item(i); +if (attribute && attribute.localName +&& !ALLOWED_ATTRIBUTES.includes(attribute.localName)) { +node.removeAttribute(attribute.localName); +} +} +} +} + +/** + * Visits one DOM node. Do the stuff that needs to be done when a single DOM node is handled. + * In this case, remove DOM nodes and their children we don't want to keep. + * @param {!Node} node the node to visit + */ +function visitor(node) { +if (node.nodeType === NodeType.TEXT_NODE) { +// keep as is for now +} else if (node.nodeType === NodeType.ELEMENT_NODE) { +rmDisallowedElements(node); +rmUnwantedAttributes(node); +} else { +node.remove(); +} +} + +/** + * Traverses DOM tree iteratively (depth first). + * @param {!Element} rootElement the root of the DOM tree which needs to be traversed + */ +function traverseDF(rootElement) { +let nodesToVisit = [ rootElement ]; +while (nodesToVisit.length > 0) { +const currentNode = nodesToVisit.shift(); +visitor(currentNode); +nodesToVisit = [ +...(currentNode.childNodes || []), // depth first +...nodesToVisit, +]; +} +} + +/** + * Removes unwanted nodes and element attributes. + * @param {!Document} document the DOM document + */ +function removeUnwantedNodes(document) { +traverseDF(document.body); +} /** * Recursively discard any parentheticals that themselves are inside parentheticals @@ -36,6 +107,7 @@ rmElementsWithSelector(doc, '.noprint'); rmElementsWithSelector(doc, 'math'); rmElementsWithSelector(doc, 'span:empty,b:empty,i:empty,p:empty'); +removeUnwantedNodes(doc); html = doc.body.innerHTML; html = removeNestedParentheticals(html); diff --git a/test/lib/transformations/summarize.js b/test/lib/transformations/summarize.js index 6c9f3cf..7031bf4 100644 --- a/test/lib/transformations/summarize.js +++ b/test/lib/transformations/summarize.js @@ -8,6 +8,21 @@ describe('summarize', () => { it('matches the spec', () => { const testCases = [ +// Should remove unwanted attributes +[ +'foo', +'foo' +], +// Should keep white-listed attributes +[ +'foo', +'foo' +], +// Should remove comments +[ +'foobar', +'foobar' +], // Should flatten empty nodes [ 'f', @@ -46,7 +61,7 @@ // math tags are stripped but any math images are shown [ 'The Planck–Einstein relation connects the particulate photon energy E with its associated wave frequency f:\n\nhttp://www.w3.org/1998/Math/MathML";>\n \n\n \n E\n=\nh\nf\n \n\n{\\displaystyle E=hf}\n \nhttps://wikimedia.org/api/rest_v1/media/math/render/svg/f39fac3593bb1e2dec0282c112c4dff7a99007f6"; class="mwe-math-fallback-image-inline" aria-hidden="true" style="vertical-align: -0.671ex; width:7.533ex; height:2.509ex;">', -'The Planck–Einstein relation connects the particulate photon energy E with its associated wave frequency f:\n\nhttps://wikimedia.org/api/re
[MediaWiki-commits] [Gerrit] mediawiki...Flow[wmf/1.31.0-wmf.16]: Unbreak CSS selector for fallback input widget
Catrope has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/403567 ) Change subject: Unbreak CSS selector for fallback input widget .. Unbreak CSS selector for fallback input widget Bug: T184631 Change-Id: I52bf0d5137e4c04fd71cb0058fad14aa70d2860d (cherry picked from commit bb668ee3211a491f331d8472d92210fc195ec4b0) --- M modules/styles/flow/widgets/editor/mw.flow.ui.EditorWidget.less 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/67/403567/1 diff --git a/modules/styles/flow/widgets/editor/mw.flow.ui.EditorWidget.less b/modules/styles/flow/widgets/editor/mw.flow.ui.EditorWidget.less index 7e17b47..958e8d7 100644 --- a/modules/styles/flow/widgets/editor/mw.flow.ui.EditorWidget.less +++ b/modules/styles/flow/widgets/editor/mw.flow.ui.EditorWidget.less @@ -31,7 +31,7 @@ bottom: @editorToolbarHeight; } - > .oo-ui-textInputWidget { + &-editor > .oo-ui-textInputWidget { max-width: none; textarea { -- To view, visit https://gerrit.wikimedia.org/r/403567 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I52bf0d5137e4c04fd71cb0058fad14aa70d2860d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: wmf/1.31.0-wmf.16 Gerrit-Owner: Catrope Gerrit-Reviewer: Esanders ___ 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)
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
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
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
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'), -self.get_patches_for_repo
[MediaWiki-commits] [Gerrit] mediawiki...release[master]: releases: use os.path.join() in a few places
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
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...Flow[master]: Use jQuery 3 .catch( fn ) instead of .then( null, fn )
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/403354 ) Change subject: Use jQuery 3 .catch( fn ) instead of .then( null, fn ) .. Use jQuery 3 .catch( fn ) instead of .then( null, fn ) https://api.jquery.com/deferred.catch/ Since jQuery 3 deferred.catch( fn ) is an alias to deferred.then( null, fn ) This improves the readability. Change-Id: I6c032936451d370a045ef9db23dad84a7ff985a7 --- M modules/flow/ui/widgets/mw.flow.ui.BoardDescriptionWidget.js M modules/flow/ui/widgets/mw.flow.ui.EditPostWidget.js M modules/flow/ui/widgets/mw.flow.ui.EditTopicSummaryWidget.js M modules/flow/ui/widgets/mw.flow.ui.NewTopicWidget.js M modules/messagePoster/ext.flow.messagePoster.js 5 files changed, 5 insertions(+), 6 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/flow/ui/widgets/mw.flow.ui.BoardDescriptionWidget.js b/modules/flow/ui/widgets/mw.flow.ui.BoardDescriptionWidget.js index 27f7754..d29f0df 100644 --- a/modules/flow/ui/widgets/mw.flow.ui.BoardDescriptionWidget.js +++ b/modules/flow/ui/widgets/mw.flow.ui.BoardDescriptionWidget.js @@ -245,7 +245,7 @@ widget.$content.empty().append( $.parseHTML( desc.content.content ) ); widget.emit( 'saveContent' ); } ) - .then( null, function ( errorCode, errorObj ) { + .catch( function ( errorCode, errorObj ) { widget.captcha.update( errorCode, errorObj ); if ( !widget.captcha.isRequired() ) { widget.error.setLabel( new OO.ui.HtmlSnippet( errorObj.error && errorObj.error.info || errorObj.exception ) ); diff --git a/modules/flow/ui/widgets/mw.flow.ui.EditPostWidget.js b/modules/flow/ui/widgets/mw.flow.ui.EditPostWidget.js index f99cf78..861328d 100644 --- a/modules/flow/ui/widgets/mw.flow.ui.EditPostWidget.js +++ b/modules/flow/ui/widgets/mw.flow.ui.EditPostWidget.js @@ -148,7 +148,7 @@ widget.emit( 'saveContent', workflow, content, format ); } ) - .then( null, function ( errorCode, errorObj ) { + .catch( function ( errorCode, errorObj ) { widget.captcha.update( errorCode, errorObj ); if ( !widget.captcha.isRequired() ) { widget.error.setLabel( new OO.ui.HtmlSnippet( errorObj.error && errorObj.error.info || errorObj.exception ) ); diff --git a/modules/flow/ui/widgets/mw.flow.ui.EditTopicSummaryWidget.js b/modules/flow/ui/widgets/mw.flow.ui.EditTopicSummaryWidget.js index 376a1f4..6888a8b 100644 --- a/modules/flow/ui/widgets/mw.flow.ui.EditTopicSummaryWidget.js +++ b/modules/flow/ui/widgets/mw.flow.ui.EditTopicSummaryWidget.js @@ -150,7 +150,7 @@ widget.emit( 'saveContent', workflow, content, format ); } ) - .then( null, function ( errorCode, errorObj ) { + .catch( function ( errorCode, errorObj ) { widget.captcha.update( errorCode, errorObj ); if ( !widget.captcha.isRequired() ) { widget.error.setLabel( new OO.ui.HtmlSnippet( errorObj.error && errorObj.error.info || errorObj.exception ) ); diff --git a/modules/flow/ui/widgets/mw.flow.ui.NewTopicWidget.js b/modules/flow/ui/widgets/mw.flow.ui.NewTopicWidget.js index eea6ea5..794acc3 100644 --- a/modules/flow/ui/widgets/mw.flow.ui.NewTopicWidget.js +++ b/modules/flow/ui/widgets/mw.flow.ui.NewTopicWidget.js @@ -216,7 +216,7 @@ widget.toggleExpanded( false ); widget.emit( 'save', topicId ); } ) - .then( null, function ( errorCode, errorObj ) { + .catch( function ( errorCode, errorObj ) { widget.captcha.update( errorCode, errorObj ); if ( !widget.captcha.isRequired() ) { widget.error.setLabel( new OO.ui.HtmlSnippet( errorObj.error && errorObj.error.info || errorObj.exception ) ); diff --git a/modules/messagePoster/ext.flow.messagePoster.js b/modules/messagePoster/ext.flow.messagePoster.js index 60d45d7..ce980b5 100644 --- a/modules/messagePoster/ext.flow.messagePoster.js +++ b/modules/messagePoster/ext.flow.messagePoster.js @@ -39,8 +39,7 @@ nttopic: subject, ntcontent: body, ntformat: 'wikitext' - } ).then( - null, // Preserve parameters from postWithToken promise +
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Use jQuery 3 .catch( fn ) instead of .then( null, fn )
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/403210 ) Change subject: Use jQuery 3 .catch( fn ) instead of .then( null, fn ) .. Use jQuery 3 .catch( fn ) instead of .then( null, fn ) https://api.jquery.com/deferred.catch/ Since jQuery 3 deferred.catch( fn ) is an alias to deferred.then( null, fn ) This improves the readability. Change-Id: I20fa3a1ed5c959ad0639ddf0162b8837fc15c720 --- M resources/src/mediawiki.special/mediawiki.special.apisandbox.js M resources/src/mediawiki/api.js M resources/src/mediawiki/mediawiki.ForeignStructuredUpload.BookletLayout.js M resources/src/mediawiki/mediawiki.js M tests/qunit/suites/resources/mediawiki.api/mediawiki.api.test.js 5 files changed, 6 insertions(+), 9 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/src/mediawiki.special/mediawiki.special.apisandbox.js b/resources/src/mediawiki.special/mediawiki.special.apisandbox.js index ff4335a..534af05 100644 --- a/resources/src/mediawiki.special/mediawiki.special.apisandbox.js +++ b/resources/src/mediawiki.special/mediawiki.special.apisandbox.js @@ -1112,7 +1112,7 @@ return xhr; } } ) - .then( null, function ( code, data, result, jqXHR ) { + .catch( function ( code, data, result, jqXHR ) { var deferred = $.Deferred(); if ( code !== 'http' ) { diff --git a/resources/src/mediawiki/api.js b/resources/src/mediawiki/api.js index 0e9c19b..2fcb4be 100644 --- a/resources/src/mediawiki/api.js +++ b/resources/src/mediawiki/api.js @@ -321,9 +321,7 @@ return abortedPromise; } - return ( abortable = api.post( params, ajaxOptions ) ).then( - // If no error, return to caller as-is - null, + return ( abortable = api.post( params, ajaxOptions ) ).catch( // Error handler function ( code ) { if ( code === 'badtoken' ) { diff --git a/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.BookletLayout.js b/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.BookletLayout.js index ac2bb02..2efacc9 100644 --- a/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.BookletLayout.js +++ b/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.BookletLayout.js @@ -113,8 +113,7 @@ } ) ); } - ).then( - null, + ).catch( // Always resolve, never reject function () { return $.Deferred().resolve(); } ); diff --git a/resources/src/mediawiki/mediawiki.js b/resources/src/mediawiki/mediawiki.js index 6a218e3..104f699 100644 --- a/resources/src/mediawiki/mediawiki.js +++ b/resources/src/mediawiki/mediawiki.js @@ -2780,9 +2780,9 @@ // We only need a callback, not any actual module. First try a single using() // for all loading modules. If one fails, fall back to tracking each module // separately via $.when(), this is expensive. - loading = mw.loader.using( modules ).then( null, function () { + loading = mw.loader.using( modules ).catch( function () { var all = modules.map( function ( module ) { - return mw.loader.using( module ).then( null, function () { + return mw.loader.using( module ).catch( function () { return $.Deferred().resolve(); } ); } ); diff --git a/tests/qunit/suites/resources/mediawiki.api/mediawiki.api.test.js b/tests/qunit/suites/resources/mediawiki.api/mediawiki.api.test.js index 2361f70..6c2d51e 100644 --- a/tests/qunit/suites/resources/mediawiki.api/mediawiki.api.test.js +++ b/tests/qunit/suites/resources/mediawiki.api/mediawiki.api.test.js @@ -203,7 +203,7 @@ // Don't cache error (T67268) return api.getToken( 'testerror' ) - .then( null, function ( err ) { + .catch( function ( err ) { assert.equal( err, 'bite-me', 'Expected error' ); return api.getToken( 'testerror' ); -- To view, visit https://gerrit.wikimed
[MediaWiki-commits] [Gerrit] operations/puppet[production]: [WIP] coal: Consume EventLogging from Kafka instead of ZMQ
Krinkle has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/403560 ) Change subject: [WIP] coal: Consume EventLogging from Kafka instead of ZMQ .. [WIP] coal: Consume EventLogging from Kafka instead of ZMQ Bug: T110903 Change-Id: I3d258f84cc4221a51750f79b5ba2dc4db329e570 --- M modules/coal/files/coal M modules/coal/manifests/init.pp M modules/coal/templates/initscripts/coal.systemd.erb 3 files changed, 40 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/60/403560/1 diff --git a/modules/coal/files/coal b/modules/coal/files/coal index 2ec68da..09aef4f 100755 --- a/modules/coal/files/coal +++ b/modules/coal/files/coal @@ -25,6 +25,7 @@ sys.setdefaultencoding('utf-8') import argparse +import json import collections import dateutil.parser import errno @@ -37,7 +38,7 @@ import time import whisper -import zmq +from kafka import KafkaConsumer WINDOW_SPAN = 60 * 5 # Size of sliding window, in seconds. @@ -105,10 +106,10 @@ default=os.getcwd(), help='Path for Whisper files. Defaults to working directory.' ) -arg_parser.add_argument( -'endpoint', -help='EventLogging endpoint URL.' -) +ap.add_argument('--brokers', required=True, +help='Comma-separated list of kafka brokers') +ap.add_argument('--consumer-group', required=True, +help='Consumer group to register with Kafka') def __init__(self): self.args = self.arg_parser.parse_args() @@ -128,7 +129,20 @@ def run(self): self.create_whisper_files() -self.log.info('Connecting to %s.', self.args.endpoint) +# Based on webperf/navtiming.py +kafka_bootstrap_servers = tuple(self.args.brokers.split(',')) +kafka_topics = ('eventlogging_NavigationTiming', 'eventlogging_SaveTiming') +kafka_consumer_timeout_seconds = 60 +consumer = KafkaConsumer( +*kafka_topics, +bootstrap_servers=kafka_bootstrap_servers, +group_id=self.args.consumer_group, +auto_offset_reset='latest', +enable_auto_commit=False, +consumer_timeout_ms=kafka_consumer_timeout_seconds * 1000 +) + +self.log.info('Starting Kafka consumer') socket = zmq.Context().socket(zmq.SUB) socket.connect(self.args.endpoint) socket.subscribe = b'' diff --git a/modules/coal/manifests/init.pp b/modules/coal/manifests/init.pp index 10aa0c1..17f8b6f 100644 --- a/modules/coal/manifests/init.pp +++ b/modules/coal/manifests/init.pp @@ -1,6 +1,16 @@ # == Class: coal # -# Store a basic set of Navigation Timing metrics in Whisper files. +# Captures NavigationTiming events from Kafka and writes +# a subset of metric directly to Whisper files. +# +# This complements webperf::navtiming, which uses StatsD and writes +# to Graphite's default backend via carbon. StatsD produces derived metrics, +# like 'p99' and 'sample_rate'. Graphite aggregates Carbon's Whisper files +# at varying resolutions as data gets older. +# +# Coal, on the other hand, simply retains data for 1 year at a constant +# resolution of 1-minute. +# # See https://meta.wikimedia.org/wiki/Schema:NavigationTiming & # http://www.mediawiki.org/wiki/Extension:NavigationTiming # @@ -10,11 +20,14 @@ # URI of EventLogging event publisher to subscribe to. # For example, 'tcp://eventlogging.eqiad.wmnet:8600'. # +# [*kafka_brokers*] +# String of comma separated Kafka bootstrap brokers. +# class coal( $endpoint ) { require_package('python-flask') require_package('python-numpy') require_package('python-whisper') -require_package('python-zmq') +require_package('python-kafka') group { 'coal': ensure => present, diff --git a/modules/coal/templates/initscripts/coal.systemd.erb b/modules/coal/templates/initscripts/coal.systemd.erb index d53916b..405d83b 100644 --- a/modules/coal/templates/initscripts/coal.systemd.erb +++ b/modules/coal/templates/initscripts/coal.systemd.erb @@ -1,11 +1,14 @@ [Unit] -Description=Navigation Timing Whisper logger +Description=Navigation Timing Whisper writer [Service] User=coal Group=coal Restart=always -ExecStart=/usr/local/bin/coal --whisper-dir "/var/lib/coal" "<%= @endpoint %>" +ExecStart=/usr/local/bin/coal \ +--whisper-dir "/var/lib/coal" \ +--brokers <%= @kafka_brokers %> \ +--consumer-group coal [Install] WantedBy=multi-user.target -- To view, visit https://gerrit.wikimedia.org/r/403560 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3d258f84cc4221a51750f79b5ba2dc4db329e570 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Krinkle ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org htt
[MediaWiki-commits] [Gerrit] operations/puppet[production]: rename planet_server to just planet
Dzahn has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/393710 ) Change subject: rename planet_server to just planet .. rename planet_server to just planet Change-Id: I88e3fcb0205e1f1d99afae86627cc81e7a2e2a5a --- R hieradata/role/common/planet.yaml M manifests/site.pp M modules/profile/templates/cumin/aliases.yaml.erb R modules/role/manifests/planet.pp 4 files changed, 4 insertions(+), 4 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/hieradata/role/common/planet_server.yaml b/hieradata/role/common/planet.yaml similarity index 100% rename from hieradata/role/common/planet_server.yaml rename to hieradata/role/common/planet.yaml diff --git a/manifests/site.pp b/manifests/site.pp index 020e122..0469cca 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -1792,7 +1792,7 @@ # virtual machines hosting https://wikitech.wikimedia.org/wiki/Planet.wikimedia.org node /^planet[12]001\.(eqiad|codfw)\.wmnet$/ { -role(planet_server) +role(planet) interface::add_ip6_mapped { 'main': } } diff --git a/modules/profile/templates/cumin/aliases.yaml.erb b/modules/profile/templates/cumin/aliases.yaml.erb index fb60525..0f6323b 100644 --- a/modules/profile/templates/cumin/aliases.yaml.erb +++ b/modules/profile/templates/cumin/aliases.yaml.erb @@ -149,7 +149,7 @@ parsoid-canary: P{wtp1025.eqiad.wmnet} parsoid-codfw: A:parsoid and A:codfw parsoid-eqiad: A:parsoid and A:eqiad -planet: P{O:planet_server} +planet: P{O:planet} poolcounter: P{O:poolcounter::server} poolcounter-codfw: A:poolcounter and A:codfw poolcounter-eqiad: A:poolcounter and A:eqiad diff --git a/modules/role/manifests/planet_server.pp b/modules/role/manifests/planet.pp similarity index 77% rename from modules/role/manifests/planet_server.pp rename to modules/role/manifests/planet.pp index a5fc707..c7c0ee3 100644 --- a/modules/role/manifests/planet_server.pp +++ b/modules/role/manifests/planet.pp @@ -1,11 +1,11 @@ # server running a planet RSS feed aggregator -class role::planet_server { +class role::planet { include ::standard include ::profile::base::firewall include ::profile::planet::venus -system::role { 'planet_server': +system::role { 'planet': description => 'Planet-venus or rawdog RSS feed aggregator' } } -- To view, visit https://gerrit.wikimedia.org/r/393710 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I88e3fcb0205e1f1d99afae86627cc81e7a2e2a5a Gerrit-PatchSet: 5 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn Gerrit-Reviewer: Dzahn Gerrit-Reviewer: Giuseppe Lavagetto Gerrit-Reviewer: Paladox Gerrit-Reviewer: Volans 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...GlobalPreferences[master]: Schema tweaks
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/403307 ) Change subject: Schema tweaks .. Schema tweaks * Use prefix for table name. * Replace unique index with a primary one per our policy that every table must have a primary index. * Comment everything. Note for Vagrant users: automatic upgrades won't work because the centralauth DB is not a full MediaWiki one. Use this command to upgrade/test: vagrant ssh -- 'cat /vagrant/mediawiki/extensions/GlobalPreferences/sql/patch_primary_index.sql | mysql centralauth' Change-Id: I4204ad88af49fe7595ecf5232c8c14d89c91bce7 --- M includes/Hooks.php D schema.sql A sql/patch_primary_index.sql A sql/tables.sql 4 files changed, 23 insertions(+), 10 deletions(-) Approvals: jenkins-bot: Verified Samwilson: Looks good to me, approved diff --git a/includes/Hooks.php b/includes/Hooks.php index 83e9e1b..f150d45 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -144,8 +144,12 @@ global $wgGlobalPreferencesDB; if ( is_null( $wgGlobalPreferencesDB ) || $wgGlobalPreferencesDB === wfWikiID() ) { // Only add the table if it's supposed to be on this wiki. - $sqlPath = __DIR__ . '/../schema.sql'; - $updater->addExtensionTable( 'global_preferences', $sqlPath ); + $sqlPath = dirname( __DIR__ ) . '/sql'; + $updater->addExtensionTable( 'global_preferences', "$sqlPath/tables.sql" ); + $updater->dropExtensionIndex( 'global_preferences', + 'global_preferences_user_property', + "$sqlPath/patch_primary_index.sql" + ); } return true; diff --git a/schema.sql b/schema.sql deleted file mode 100644 index 614ed2f..000 --- a/schema.sql +++ /dev/null @@ -1,8 +0,0 @@ -CREATE TABLE global_preferences ( - gp_user INT(11) NOT NULL, - gp_property VARBINARY(255) NOT NULL, - gp_value BLOB -) /*$wgDBTableOptions*/; - -CREATE UNIQUE INDEX /*i*/global_preferences_user_property ON /*_*/global_preferences (gp_user,gp_property); -CREATE INDEX /*i*/global_preferences_property ON /*_*/global_preferences (gp_property); diff --git a/sql/patch_primary_index.sql b/sql/patch_primary_index.sql new file mode 100644 index 000..fc15f3a --- /dev/null +++ b/sql/patch_primary_index.sql @@ -0,0 +1,3 @@ +ALTER TABLE /*_*/global_preferences + DROP INDEX /*i*/global_preferences_user_property, + ADD PRIMARY KEY (gp_user, gp_property); \ No newline at end of file diff --git a/sql/tables.sql b/sql/tables.sql new file mode 100644 index 000..bae0b45 --- /dev/null +++ b/sql/tables.sql @@ -0,0 +1,14 @@ +-- Central table that stores global preferences +CREATE TABLE /*_*/global_preferences ( + -- Key to globaluser.gu_id + gp_user INT(11) NOT NULL, + -- Property name, same as user_properties.up_property + gp_property VARBINARY(255) NOT NULL, + -- Property value, same as user_properties.up_value + gp_value BLOB, + + PRIMARY KEY (gp_user, gp_property) +) /*$wgDBTableOptions*/; + +-- For batch lookup +CREATE INDEX /*i*/global_preferences_property ON /*_*/global_preferences (gp_property); -- To view, visit https://gerrit.wikimedia.org/r/403307 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4204ad88af49fe7595ecf5232c8c14d89c91bce7 Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/GlobalPreferences Gerrit-Branch: master Gerrit-Owner: MaxSem Gerrit-Reviewer: MaxSem Gerrit-Reviewer: Samwilson 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...Flow[master]: Implement robot-policy
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/403416 ) Change subject: Implement robot-policy .. Implement robot-policy * Actions other than 'view' have 'noindex,nofollow' * Hidden topics have 'noindex,nofollow' * View board and view (visible) topic use the Article getRobotPolicy algorithm using the board title. It respects $wgArticleRobotPolicies, $wgNamespaceRobotPolicies and $wgDefaultRobotPolicy. * Magic words are not currently supported. Bug: T122119 Bug: T184185 Change-Id: Idefb5ee59e809a0e11edc1948295405ac57fea42 --- M includes/View.php 1 file changed, 33 insertions(+), 2 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/View.php b/includes/View.php index dbb547e..f1284e8 100644 --- a/includes/View.php +++ b/includes/View.php @@ -2,8 +2,10 @@ namespace Flow; +use Article; use ContextSource; use Flow\Block\AbstractBlock; +use Flow\Block\TopicBlock; use Flow\Exception\InvalidActionException; use Flow\Model\Anchor; use Flow\Model\HtmlRenderingInformation; @@ -75,7 +77,33 @@ $block->setPageTitle( $output ); } - $this->renderApiResponse( $apiResponse ); + $robotPolicy = $this->getRobotPolicy( $action, $loader->getWorkflow(), $blocks ); + $this->renderApiResponse( $apiResponse, $robotPolicy ); + } + + private function getRobotPolicy( $action, $workflow, $blocks ) { + if ( $action !== 'view' ) { + // consistent with 'edit' and other action pages in Core + return [ + 'index' => 'noindex', + 'follow' => 'nofollow', + ]; + } + + if ( $workflow->getType() === 'topic' ) { + /** @var TopicBlock $topic */ + $topic = $blocks[ 'topic' ]; + if ( $topic->loadTopicTitle()->isHidden() ) { + return [ + 'index' => 'noindex', + 'follow' => 'nofollow', + ]; + } + } + + $boardTitle = $workflow->getOwnerTitle(); + $article = Article::newFromTitle( $boardTitle, $this->getContext() ); + return $article->getRobotPolicy( /* unused $action parameter */ null ); } protected function addModules( OutputPage $out, $action ) { @@ -241,7 +269,7 @@ return $apiResponse; } - protected function renderApiResponse( array $apiResponse ) { + protected function renderApiResponse( array $apiResponse, array $robotPolicy ) { // Render the flow-component wrapper if ( empty( $apiResponse['blocks'] ) ) { return []; @@ -325,6 +353,9 @@ ], $template( $apiResponse ) ) ); + + $out->setIndexPolicy( $robotPolicy[ 'index' ] ); + $out->setFollowPolicy( $robotPolicy[ 'follow' ] ); } } -- To view, visit https://gerrit.wikimedia.org/r/403416 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idefb5ee59e809a0e11edc1948295405ac57fea42 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Sbisson Gerrit-Reviewer: Catrope 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...GlobalPreferences[master]: Improve div-style form layout
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/403111 ) Change subject: Improve div-style form layout .. Improve div-style form layout Bring the div display style closer to the table-based display of Special:Preferences. Bug: T179738 Change-Id: Ic3eddc49735b93c23605de1c2c73be477a683023 --- M includes/GlobalPreferencesForm.php M resources/ext.GlobalPreferences.global-nojs.css 2 files changed, 30 insertions(+), 4 deletions(-) Approvals: MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/GlobalPreferencesForm.php b/includes/GlobalPreferencesForm.php index b872421..ede8e20 100644 --- a/includes/GlobalPreferencesForm.php +++ b/includes/GlobalPreferencesForm.php @@ -3,6 +3,7 @@ namespace GlobalPreferences; use Html; +use HTMLFormField; use IContextSource; use MediaWiki\MediaWikiServices; use PreferencesForm; @@ -29,6 +30,27 @@ } /** +* Override this in order to hide empty labels. +* @param array[]|HTMLFormField[] $fields Array of fields (either arrays or objects). +* @param string $sectionName Identifier for this section. +* @param string $fieldsetIDPrefix Prefix for the fieldset of each subsection. +* @param bool &$hasUserVisibleFields Whether the section had user-visible fields. +* @return string +*/ + public function displaySection( + $fields, $sectionName = '', $fieldsetIDPrefix = '', &$hasUserVisibleFields = false + ) { + foreach ( $fields as $key => $value ) { + if ( $value instanceof HTMLFormField ) { + $value->setShowEmptyLabel( false ); + } + } + return parent::displaySection( + $fields, $sectionName, $fieldsetIDPrefix, $hasUserVisibleFields + ); + } + + /** * Get the whole body of the form, adding the global preferences header text to the top of each * section. Javascript will later add the 'select all' checkbox to this header. * @return string diff --git a/resources/ext.GlobalPreferences.global-nojs.css b/resources/ext.GlobalPreferences.global-nojs.css index e8a0f78..8b091b9 100644 --- a/resources/ext.GlobalPreferences.global-nojs.css +++ b/resources/ext.GlobalPreferences.global-nojs.css @@ -1,7 +1,3 @@ -.mw-htmlform-nolabel .mw-label { - display: none; -} - .mw-globalprefs-global-check .mw-label, .mw-globalprefs-global-check label { display: none; @@ -47,6 +43,14 @@ padding-left: 7%; } +div.mw-input, +div.mw-label { + display: table-cell; +} +div.mw-label { + padding-right: 0.5em; +} + .mw-globalprefs-global-check { font-size: smaller; padding-left: 0; -- To view, visit https://gerrit.wikimedia.org/r/403111 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic3eddc49735b93c23605de1c2c73be477a683023 Gerrit-PatchSet: 5 Gerrit-Project: mediawiki/extensions/GlobalPreferences Gerrit-Branch: master Gerrit-Owner: Samwilson Gerrit-Reviewer: MaxSem 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...Wikispeech[master]: Break out lexicon tool while under development
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/399418 ) Change subject: Break out lexicon tool while under development .. Break out lexicon tool while under development This reverts commits e559d7521f36b7aedb1598ae3caf031f9e38b449 and 01f254d951c77f7dc75129e800b1e4c40551ec31. Bug: T182861 Change-Id: I5e8f53adfe92005dc417676c7cb91185e0d45b00 --- M Wikispeech.alias.php M extension.json M i18n/en.json M i18n/qqq.json D specials/SpecialWikispeechLexiconTool.php 5 files changed, 2 insertions(+), 45 deletions(-) Approvals: Lokal Profil: Looks good to me, approved jenkins-bot: Verified diff --git a/Wikispeech.alias.php b/Wikispeech.alias.php index e2dbf56..b0fc561 100644 --- a/Wikispeech.alias.php +++ b/Wikispeech.alias.php @@ -9,5 +9,4 @@ /** English (English) */ $specialPageAliases['en'] = array( 'Wikispeech' => array( 'Wikispeech' ), - 'WikispeechLexiconTool' => array( 'WikispeechLexiconTool' ), ); diff --git a/extension.json b/extension.json index b519ff8..6f7cebb 100644 --- a/extension.json +++ b/extension.json @@ -17,7 +17,6 @@ }, "AutoloadClasses": { "SpecialWikispeech": "specials/SpecialWikispeech.php", - "SpecialWikispeechLexiconTool": "specials/SpecialWikispeechLexiconTool.php", "WikispeechHooks": "Hooks.php", "CleanedText": "includes/CleanedContent.php", "SegmentBreak": "includes/CleanedContent.php", @@ -53,8 +52,7 @@ "remoteExtPath": "Wikispeech/modules" }, "SpecialPages": { - "Wikispeech": "SpecialWikispeech", - "WikispeechLexiconTool": "SpecialWikispeechLexiconTool" + "Wikispeech": "SpecialWikispeech" }, "ExtensionMessagesFiles": { "WikispeechAlias": "Wikispeech.alias.php" diff --git a/i18n/en.json b/i18n/en.json index a8d550e..0e32437 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -8,9 +8,6 @@ "wikispeech-desc": "A text-to-speech tool to make Wikimedia's projects more accessible for people that for different reasons have difficulties reading.", "special-wikispeech-intro": "Wikispeech", "special-wikispeech-title": "Special page introduction.", - "wikispeechlexicontool": "Wikispeech Lexicon Tool", - "special-wikispeech-lexicon-tool-intro": "Wikispeech Lexicon Tool", - "special-wikispeech-lexicon-tool-title": "The tool used to add suggested words into the Wikispeech lexicon.", "apihelp-wikispeech-summary": "Process a page to be used by the Wikispeech extension.", "apihelp-wikispeech-param-page": "The title of the page to process.", "apihelp-wikispeech-param-output": "The formats of the output, can be a combination of the following:", diff --git a/i18n/qqq.json b/i18n/qqq.json index 711245f..80a60a9 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -1,17 +1,13 @@ { "@metadata": { "authors": [ - "Sebastian Berlin", - "Egbe Eugene" + "Sebastian Berlin" ] }, "wikispeech": "The name of the extension", "wikispeech-desc": "{{desc|name=Wikispeech|url=https://www.mediawiki.org/wiki/Extension:Wikispeech}}";, "special-wikispeech-intro": "Description appearing on top of Special:{{ll|Wikispeech}}.", "special-wikispeech-title": "Title of the special page Special:Wikispeech", - "wikispeechlexicontool": "The name of the tool which suggests words about an article not found in the lexicon and adds them", - "special-wikispeech-lexicon-tool-intro": "Description appearing on top of Special:{{ll|WikispeechLexiconTool}}.", - "special-wikispeech-lexicon-tool-title": "Title of the special page Special:WikispeechLexiconTool", "apihelp-wikispeech-summary": "{{doc-apihelp-summary|wikispeech}}", "apihelp-wikispeech-param-page": "{{doc-apihelp-param|wikispeech|page}}", "apihelp-wikispeech-param-output": "{{doc-apihelp-param|wikispeech|output}}", diff --git a/specials/SpecialWikispeechLexiconTool.php b/specials/SpecialWikispeechLexiconTool.php deleted file mode 100644 index 704328e..000 --- a/specials/SpecialWikispeechLexiconTool.php +++ /dev/null @@ -1,33 +0,0 @@ -getOutput(); - $out->setPageTitle( $this->msg( 'special-wikispeech-lexicon-tool-title' ) ); - $out->addHelpLink( 'How to become a MediaWiki hacker' ); - $out->addWikiMsg( 'special-wikispeech-lexicon-tool-intro' ); - } - - /** -* @see SpecialPage::getGroupName -* -* @return string -*/ - protected function getGroupName() { - return 'wiki'; - } -} -- To view, visit https://gerrit.wikimedia.org/r/399418 To unsubscribe, visit https://gerrit.wikimedia.org/r/s
[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: Unbreak CSS selector for fallback input widget
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/403441 ) Change subject: Unbreak CSS selector for fallback input widget .. Unbreak CSS selector for fallback input widget Bug: T184631 Change-Id: I52bf0d5137e4c04fd71cb0058fad14aa70d2860d --- M modules/styles/flow/widgets/editor/mw.flow.ui.EditorWidget.less 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/styles/flow/widgets/editor/mw.flow.ui.EditorWidget.less b/modules/styles/flow/widgets/editor/mw.flow.ui.EditorWidget.less index 7e17b47..958e8d7 100644 --- a/modules/styles/flow/widgets/editor/mw.flow.ui.EditorWidget.less +++ b/modules/styles/flow/widgets/editor/mw.flow.ui.EditorWidget.less @@ -31,7 +31,7 @@ bottom: @editorToolbarHeight; } - > .oo-ui-textInputWidget { + &-editor > .oo-ui-textInputWidget { max-width: none; textarea { -- To view, visit https://gerrit.wikimedia.org/r/403441 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I52bf0d5137e4c04fd71cb0058fad14aa70d2860d Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Esanders Gerrit-Reviewer: Catrope Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Update CiviCRM submodule
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/403559 ) Change subject: Update CiviCRM submodule .. Update CiviCRM submodule 9017e2e CRM-21634 Stdise search fields as they relate to contacts Change-Id: I0ca5498e4515d691aff9ec6d607ece1e3b77f2b0 --- M civicrm 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: jenkins-bot: Verified Eileen: Looks good to me, approved diff --git a/civicrm b/civicrm index 9fbcd49..9017e2e 16 --- a/civicrm +++ b/civicrm @@ -1 +1 @@ -Subproject commit 9fbcd496bd919097cf6f87bebf9ff325aa184c7c +Subproject commit 9017e2e90a7324edc34c7d0c4eea62fbeb32940e -- To view, visit https://gerrit.wikimedia.org/r/403559 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0ca5498e4515d691aff9ec6d607ece1e3b77f2b0 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: deployment Gerrit-Owner: Eileen Gerrit-Reviewer: Eileen Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Add extension to change contact types
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/403558 ) Change subject: Add extension to change contact types .. Add extension to change contact types Note we need some (already upstreamed) civicrm fixes merged + progress on this https://github.com/civicrm/civicrm-core/pull/11405 before the tests will pass. I propose that we actually DON'T skip processing greetings when the amount is $500+ because it would benefit major gifts if that were set. Bug: T156193 Change-Id: I7c34be4225c04ac112d74891035607144178fd5f --- M sites/all/modules/wmf_civicrm/wmf_civicrm.install A sites/default/civicrm/extensions/org.wikimedia.contacteditor/ActivityTypeContactChange.mgd.php A sites/default/civicrm/extensions/org.wikimedia.contacteditor/CRM/Contacteditor/ChangeContactType.php A sites/default/civicrm/extensions/org.wikimedia.contacteditor/CRM/Contacteditor/Form/ContactTypeChange.php A sites/default/civicrm/extensions/org.wikimedia.contacteditor/LICENSE.txt A sites/default/civicrm/extensions/org.wikimedia.contacteditor/README.md A sites/default/civicrm/extensions/org.wikimedia.contacteditor/contacteditor.civix.php A sites/default/civicrm/extensions/org.wikimedia.contacteditor/contacteditor.php A sites/default/civicrm/extensions/org.wikimedia.contacteditor/info.xml A sites/default/civicrm/extensions/org.wikimedia.contacteditor/phpunit.xml.dist A sites/default/civicrm/extensions/org.wikimedia.contacteditor/templates/CRM/Contacteditor/Form/ContactTypeChange.tpl A sites/default/civicrm/extensions/org.wikimedia.contacteditor/tests/phpunit/BaseUnitTestClass.php A sites/default/civicrm/extensions/org.wikimedia.contacteditor/tests/phpunit/ContactEditorTest.php A sites/default/civicrm/extensions/org.wikimedia.contacteditor/tests/phpunit/bootstrap.php A sites/default/civicrm/extensions/org.wikimedia.contacteditor/xml/Menu/contacteditor.xml 15 files changed, 2,211 insertions(+), 0 deletions(-) Approvals: jenkins-bot: Verified Eileen: Looks good to me, approved diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.install b/sites/all/modules/wmf_civicrm/wmf_civicrm.install index 3b30ed8..b92f1c4 100644 --- a/sites/all/modules/wmf_civicrm/wmf_civicrm.install +++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.install @@ -64,6 +64,8 @@ wmf_civicrm_update_7575(); wmf_civicrm_update_7580(); wmf_civicrm_update_7585(); + wmf_civicrm_update_7595(); + wmf_civicrm_update_7605(); } /** @@ -3311,3 +3313,14 @@ civicrm_api3('Contact', 'create', array('id' => $result->id)); } } + +/** + * Add contact type editor extension. + * + * Bug: TT156193 + */ +function wmf_civicrm_update_7605() { + civicrm_initialize(); + civicrm_api3('extension', 'refresh', array()); + civicrm_api3('extension', 'install', array('key' => 'org.wikimedia.contacteditor')); +} diff --git a/sites/default/civicrm/extensions/org.wikimedia.contacteditor/ActivityTypeContactChange.mgd.php b/sites/default/civicrm/extensions/org.wikimedia.contacteditor/ActivityTypeContactChange.mgd.php new file mode 100644 index 000..d790c4d --- /dev/null +++ b/sites/default/civicrm/extensions/org.wikimedia.contacteditor/ActivityTypeContactChange.mgd.php @@ -0,0 +1,15 @@ + array( +'name' => 'Contact Type Changed', +'entity' => 'OptionValue', +'params' => array( + 'version' => 3, + 'option_group_id' => 'activity_type', + 'label' => 'Contact Type Changed', + 'name' => 'contact_type_changed', + 'description' => 'Contact type changed', + 'filter' => 1, +), + ), +); diff --git a/sites/default/civicrm/extensions/org.wikimedia.contacteditor/CRM/Contacteditor/ChangeContactType.php b/sites/default/civicrm/extensions/org.wikimedia.contacteditor/CRM/Contacteditor/ChangeContactType.php new file mode 100644 index 000..6a10e4f --- /dev/null +++ b/sites/default/civicrm/extensions/org.wikimedia.contacteditor/CRM/Contacteditor/ChangeContactType.php @@ -0,0 +1,331 @@ +getApiRequest(); +if ($request['entity'] !== 'Contact' || $request['action'] !== 'create') { + return; +} +if (empty($request['params']['id']) || empty($request['params']['contact_type'])) { + // Hook is only interested in changes that update contact type. + return; +} +$contactID = $request['params']['id']; +$newContactType = $request['params']['contact_type']; +// Usually we will return after getting this - if we proceed past here we do more extensive data gathering as it is 'the real deal'. +$existingContactType = civicrm_api3('Contact', 'getvalue', [ + 'id' => $contactID, + 'return' => 'contact_type', +]); +if ($existingContactType === $newContactType) { + return; +} +if (!empty($request['params']['check_permissions']) && !CRM_Core_Permission::check(array('Change CiviCRM contact type'))) { + throw new CRM_Core_Exception('You do have not permission to
[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Re-save any contacts without a display name.
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/403557 ) Change subject: Re-save any contacts without a display name. .. Re-save any contacts without a display name. Doing a blank re-save will cause the display name to be recalculated by Civi * rules. * * Not useful here but possibly for Major Gifts letter addressing it also * will allow us to update addressing fields (e.g Dear Fred) for sending letters. * We don't do that for all contacts but could for MG. * * Bug: T179118 Change-Id: Ib74916c507217524d57afb277e97ad8ac297adbe --- M sites/all/modules/wmf_civicrm/wmf_civicrm.install 1 file changed, 22 insertions(+), 0 deletions(-) Approvals: jenkins-bot: Verified Eileen: Looks good to me, approved diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.install b/sites/all/modules/wmf_civicrm/wmf_civicrm.install index 4340077..3b30ed8 100644 --- a/sites/all/modules/wmf_civicrm/wmf_civicrm.install +++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.install @@ -3289,3 +3289,25 @@ require_once 'update_payment_instruments.php'; wmf_install_add_missing_payment_instruments(); } + +/** + * Re-save any contacts without a display name. + * + * Doing a blank re-save will cause the display name to be recalculated by Civi + * rules. + * + * Not useful here but possibly for Major Gifts letter addressing it also + * will allow us to update addressing fields (e.g Dear Fred) for sending letters. + * We don't do that for all contacts but could for MG. + * + * Bug: T179118 + */ +function wmf_civicrm_update_7600() { + civicrm_initialize(); + $result = CRM_Core_DAO::executeQuery( +"SELECT id FROM civicrm_contact WHERE (display_name is null OR display_name = '') AND is_deleted= 0" + ); + while ($result->fetch()) { +civicrm_api3('Contact', 'create', array('id' => $result->id)); + } +} -- To view, visit https://gerrit.wikimedia.org/r/403557 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib74916c507217524d57afb277e97ad8ac297adbe Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: deployment Gerrit-Owner: Eileen Gerrit-Reviewer: Eileen Gerrit-Reviewer: Ejegg Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: CiviCRM submodule update
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/403555 ) Change subject: CiviCRM submodule update .. CiviCRM submodule update 9fbcd49 CRM-16819 improve on CRM_Utils_Request::retrieve 6134e93 Removed use of deprecated = Change-Id: I67f33ad7064409a061514ff303fd26d3426bd1f5 --- M civicrm 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: jenkins-bot: Verified Eileen: Looks good to me, approved diff --git a/civicrm b/civicrm index bd3fadb..9fbcd49 16 --- a/civicrm +++ b/civicrm @@ -1 +1 @@ -Subproject commit bd3fadbf3335985e0b7ac425217b05ee5e963f11 +Subproject commit 9fbcd496bd919097cf6f87bebf9ff325aa184c7c -- To view, visit https://gerrit.wikimedia.org/r/403555 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I67f33ad7064409a061514ff303fd26d3426bd1f5 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: deployment Gerrit-Owner: Eileen Gerrit-Reviewer: Eileen Gerrit-Reviewer: Ejegg Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Add Citibank International to payment instruments on new ins...
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/403556 ) Change subject: Add Citibank International to payment instruments on new installs. .. Add Citibank International to payment instruments on new installs. There are 2 Citibank payment instruments on live but neither are added via the install script for test sites. I have stuck all the code that adds payment instruments into one function and it is always called on new installs. A new function needs to be added to get them onto live like wmf_civicrm_update_7595. I've removed older instances of the payment_instrument adds - I don't feel like it adds some amazing historical value to keep them all. I also added a few extension installs update functions to the new-install to make sure they get enabled Change-Id: Ib1ca183c597f464d4493bbe754fd482c7d496691 --- A sites/all/modules/wmf_civicrm/update_payment_instruments.php M sites/all/modules/wmf_civicrm/wmf_civicrm.install 2 files changed, 110 insertions(+), 158 deletions(-) Approvals: jenkins-bot: Verified Eileen: Looks good to me, approved diff --git a/sites/all/modules/wmf_civicrm/update_payment_instruments.php b/sites/all/modules/wmf_civicrm/update_payment_instruments.php new file mode 100644 index 000..920cb56 --- /dev/null +++ b/sites/all/modules/wmf_civicrm/update_payment_instruments.php @@ -0,0 +1,101 @@ + array(array('total_amount', 'receive_date')), )); -} - -/** - * Add Latin American payment methods for AstroPay - */ -function wmf_civicrm_update_7195() { - $payment_instruments = array( -'Credit Card: Elo', -'Credit Card: HiperCard', -'Credit Card: MercadoLivre', -'Credit Card: Cabal', -'Credit Card: Naranja', -'Credit Card: Tarjeta Shopping', -'Credit Card: Nativa', -'Credit Card: Cencosud', -'Credit Card: Argencard', -'Credit Card: Webpay', -'Banamex', -'Bancomer', -'Davivienda', -'Efecty', -'OXXO', -'Pago Facil', -'Provencia Pagos', -'Red Pagos', -'Rapi Pago', -'Santander', - ); - wmf_civicrm_bootstrap_civi(); - wmf_civicrm_create_option_values('payment_instrument', $payment_instruments); -} - -/** - * Add a few more Chilean credit cards - */ -function wmf_civicrm_update_7196() { - $payment_instruments = array( -'Credit Card: CMR Falabella', -'Credit Card: Magna', -'Credit Card: Presto', - ); - wmf_civicrm_bootstrap_civi(); - wmf_civicrm_create_option_values('payment_instrument', $payment_instruments); } /** @@ -3016,17 +2878,6 @@ } /** - * Add Bijcard - */ -function wmf_civicrm_update_7521() { - $payment_instruments = array( -'Credit Card: Bijenkorf', - ); - wmf_civicrm_bootstrap_civi(); - wmf_civicrm_create_option_values('payment_instrument', $payment_instruments); -} - -/** * Normalize old phone numbers **/ function wmf_civicrm_update_7522() { @@ -3434,7 +3285,7 @@ /** * Add Stripe payment instrument */ -function wmf_civicrm_update_7590() { - civicrm_initialize(); - wmf_civicrm_create_option_values('payment_instrument', array('Stripe')); +function wmf_civicrm_update_7595() { + require_once 'update_payment_instruments.php'; + wmf_install_add_missing_payment_instruments(); } -- To view, visit https://gerrit.wikimedia.org/r/403556 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib1ca183c597f464d4493bbe754fd482c7d496691 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: deployment Gerrit-Owner: Eileen Gerrit-Reviewer: Eileen Gerrit-Reviewer: Ejegg Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Update CiviCRM submodule
Eileen has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/403559 ) Change subject: Update CiviCRM submodule .. Update CiviCRM submodule 9017e2e CRM-21634 Stdise search fields as they relate to contacts Change-Id: I0ca5498e4515d691aff9ec6d607ece1e3b77f2b0 --- M civicrm 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/59/403559/1 diff --git a/civicrm b/civicrm index 9fbcd49..9017e2e 16 --- a/civicrm +++ b/civicrm @@ -1 +1 @@ -Subproject commit 9fbcd496bd919097cf6f87bebf9ff325aa184c7c +Subproject commit 9017e2e90a7324edc34c7d0c4eea62fbeb32940e -- To view, visit https://gerrit.wikimedia.org/r/403559 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0ca5498e4515d691aff9ec6d607ece1e3b77f2b0 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: deployment Gerrit-Owner: Eileen ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Add extension to change contact types
Eileen has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/403558 ) Change subject: Add extension to change contact types .. Add extension to change contact types Note we need some (already upstreamed) civicrm fixes merged + progress on this https://github.com/civicrm/civicrm-core/pull/11405 before the tests will pass. I propose that we actually DON'T skip processing greetings when the amount is $500+ because it would benefit major gifts if that were set. Bug: T156193 Change-Id: I7c34be4225c04ac112d74891035607144178fd5f --- M sites/all/modules/wmf_civicrm/wmf_civicrm.install A sites/default/civicrm/extensions/org.wikimedia.contacteditor/ActivityTypeContactChange.mgd.php A sites/default/civicrm/extensions/org.wikimedia.contacteditor/CRM/Contacteditor/ChangeContactType.php A sites/default/civicrm/extensions/org.wikimedia.contacteditor/CRM/Contacteditor/Form/ContactTypeChange.php A sites/default/civicrm/extensions/org.wikimedia.contacteditor/LICENSE.txt A sites/default/civicrm/extensions/org.wikimedia.contacteditor/README.md A sites/default/civicrm/extensions/org.wikimedia.contacteditor/contacteditor.civix.php A sites/default/civicrm/extensions/org.wikimedia.contacteditor/contacteditor.php A sites/default/civicrm/extensions/org.wikimedia.contacteditor/info.xml A sites/default/civicrm/extensions/org.wikimedia.contacteditor/phpunit.xml.dist A sites/default/civicrm/extensions/org.wikimedia.contacteditor/templates/CRM/Contacteditor/Form/ContactTypeChange.tpl A sites/default/civicrm/extensions/org.wikimedia.contacteditor/tests/phpunit/BaseUnitTestClass.php A sites/default/civicrm/extensions/org.wikimedia.contacteditor/tests/phpunit/ContactEditorTest.php A sites/default/civicrm/extensions/org.wikimedia.contacteditor/tests/phpunit/bootstrap.php A sites/default/civicrm/extensions/org.wikimedia.contacteditor/xml/Menu/contacteditor.xml 15 files changed, 2,211 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/58/403558/1 diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.install b/sites/all/modules/wmf_civicrm/wmf_civicrm.install index 3b30ed8..b92f1c4 100644 --- a/sites/all/modules/wmf_civicrm/wmf_civicrm.install +++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.install @@ -64,6 +64,8 @@ wmf_civicrm_update_7575(); wmf_civicrm_update_7580(); wmf_civicrm_update_7585(); + wmf_civicrm_update_7595(); + wmf_civicrm_update_7605(); } /** @@ -3311,3 +3313,14 @@ civicrm_api3('Contact', 'create', array('id' => $result->id)); } } + +/** + * Add contact type editor extension. + * + * Bug: TT156193 + */ +function wmf_civicrm_update_7605() { + civicrm_initialize(); + civicrm_api3('extension', 'refresh', array()); + civicrm_api3('extension', 'install', array('key' => 'org.wikimedia.contacteditor')); +} diff --git a/sites/default/civicrm/extensions/org.wikimedia.contacteditor/ActivityTypeContactChange.mgd.php b/sites/default/civicrm/extensions/org.wikimedia.contacteditor/ActivityTypeContactChange.mgd.php new file mode 100644 index 000..d790c4d --- /dev/null +++ b/sites/default/civicrm/extensions/org.wikimedia.contacteditor/ActivityTypeContactChange.mgd.php @@ -0,0 +1,15 @@ + array( +'name' => 'Contact Type Changed', +'entity' => 'OptionValue', +'params' => array( + 'version' => 3, + 'option_group_id' => 'activity_type', + 'label' => 'Contact Type Changed', + 'name' => 'contact_type_changed', + 'description' => 'Contact type changed', + 'filter' => 1, +), + ), +); diff --git a/sites/default/civicrm/extensions/org.wikimedia.contacteditor/CRM/Contacteditor/ChangeContactType.php b/sites/default/civicrm/extensions/org.wikimedia.contacteditor/CRM/Contacteditor/ChangeContactType.php new file mode 100644 index 000..6a10e4f --- /dev/null +++ b/sites/default/civicrm/extensions/org.wikimedia.contacteditor/CRM/Contacteditor/ChangeContactType.php @@ -0,0 +1,331 @@ +getApiRequest(); +if ($request['entity'] !== 'Contact' || $request['action'] !== 'create') { + return; +} +if (empty($request['params']['id']) || empty($request['params']['contact_type'])) { + // Hook is only interested in changes that update contact type. + return; +} +$contactID = $request['params']['id']; +$newContactType = $request['params']['contact_type']; +// Usually we will return after getting this - if we proceed past here we do more extensive data gathering as it is 'the real deal'. +$existingContactType = civicrm_api3('Contact', 'getvalue', [ + 'id' => $contactID, + 'return' => 'contact_type', +]); +if ($existingContactType === $newContactType) { + return; +} +if (!empty($request['params']['check_permissions']) && !CRM_Core_Permission::check(array('Change CiviCRM contact type'))) { + throw new CRM_Core_Exception('You do have not perm
[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: CiviCRM submodule update
Eileen has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/403555 ) Change subject: CiviCRM submodule update .. CiviCRM submodule update 9fbcd49 CRM-16819 improve on CRM_Utils_Request::retrieve 6134e93 Removed use of deprecated = Change-Id: I67f33ad7064409a061514ff303fd26d3426bd1f5 --- M civicrm 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/55/403555/1 diff --git a/civicrm b/civicrm index bd3fadb..9fbcd49 16 --- a/civicrm +++ b/civicrm @@ -1 +1 @@ -Subproject commit bd3fadbf3335985e0b7ac425217b05ee5e963f11 +Subproject commit 9fbcd496bd919097cf6f87bebf9ff325aa184c7c -- To view, visit https://gerrit.wikimedia.org/r/403555 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I67f33ad7064409a061514ff303fd26d3426bd1f5 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: deployment Gerrit-Owner: Eileen ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Add Citibank International to payment instruments on new ins...
Eileen has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/403556 ) Change subject: Add Citibank International to payment instruments on new installs. .. Add Citibank International to payment instruments on new installs. There are 2 Citibank payment instruments on live but neither are added via the install script for test sites. I have stuck all the code that adds payment instruments into one function and it is always called on new installs. A new function needs to be added to get them onto live like wmf_civicrm_update_7595. I've removed older instances of the payment_instrument adds - I don't feel like it adds some amazing historical value to keep them all. I also added a few extension installs update functions to the new-install to make sure they get enabled Change-Id: Ib1ca183c597f464d4493bbe754fd482c7d496691 --- A sites/all/modules/wmf_civicrm/update_payment_instruments.php M sites/all/modules/wmf_civicrm/wmf_civicrm.install 2 files changed, 110 insertions(+), 158 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/56/403556/1 diff --git a/sites/all/modules/wmf_civicrm/update_payment_instruments.php b/sites/all/modules/wmf_civicrm/update_payment_instruments.php new file mode 100644 index 000..920cb56 --- /dev/null +++ b/sites/all/modules/wmf_civicrm/update_payment_instruments.php @@ -0,0 +1,101 @@ + array(array('total_amount', 'receive_date')), )); -} - -/** - * Add Latin American payment methods for AstroPay - */ -function wmf_civicrm_update_7195() { - $payment_instruments = array( -'Credit Card: Elo', -'Credit Card: HiperCard', -'Credit Card: MercadoLivre', -'Credit Card: Cabal', -'Credit Card: Naranja', -'Credit Card: Tarjeta Shopping', -'Credit Card: Nativa', -'Credit Card: Cencosud', -'Credit Card: Argencard', -'Credit Card: Webpay', -'Banamex', -'Bancomer', -'Davivienda', -'Efecty', -'OXXO', -'Pago Facil', -'Provencia Pagos', -'Red Pagos', -'Rapi Pago', -'Santander', - ); - wmf_civicrm_bootstrap_civi(); - wmf_civicrm_create_option_values('payment_instrument', $payment_instruments); -} - -/** - * Add a few more Chilean credit cards - */ -function wmf_civicrm_update_7196() { - $payment_instruments = array( -'Credit Card: CMR Falabella', -'Credit Card: Magna', -'Credit Card: Presto', - ); - wmf_civicrm_bootstrap_civi(); - wmf_civicrm_create_option_values('payment_instrument', $payment_instruments); } /** @@ -3016,17 +2878,6 @@ } /** - * Add Bijcard - */ -function wmf_civicrm_update_7521() { - $payment_instruments = array( -'Credit Card: Bijenkorf', - ); - wmf_civicrm_bootstrap_civi(); - wmf_civicrm_create_option_values('payment_instrument', $payment_instruments); -} - -/** * Normalize old phone numbers **/ function wmf_civicrm_update_7522() { @@ -3434,7 +3285,7 @@ /** * Add Stripe payment instrument */ -function wmf_civicrm_update_7590() { - civicrm_initialize(); - wmf_civicrm_create_option_values('payment_instrument', array('Stripe')); +function wmf_civicrm_update_7595() { + require_once 'update_payment_instruments.php'; + wmf_install_add_missing_payment_instruments(); } -- To view, visit https://gerrit.wikimedia.org/r/403556 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib1ca183c597f464d4493bbe754fd482c7d496691 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: deployment Gerrit-Owner: Eileen ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Re-save any contacts without a display name.
Eileen has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/403557 ) Change subject: Re-save any contacts without a display name. .. Re-save any contacts without a display name. Doing a blank re-save will cause the display name to be recalculated by Civi * rules. * * Not useful here but possibly for Major Gifts letter addressing it also * will allow us to update addressing fields (e.g Dear Fred) for sending letters. * We don't do that for all contacts but could for MG. * * Bug: T179118 Change-Id: Ib74916c507217524d57afb277e97ad8ac297adbe --- M sites/all/modules/wmf_civicrm/wmf_civicrm.install 1 file changed, 22 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/57/403557/1 diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.install b/sites/all/modules/wmf_civicrm/wmf_civicrm.install index 4340077..3b30ed8 100644 --- a/sites/all/modules/wmf_civicrm/wmf_civicrm.install +++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.install @@ -3289,3 +3289,25 @@ require_once 'update_payment_instruments.php'; wmf_install_add_missing_payment_instruments(); } + +/** + * Re-save any contacts without a display name. + * + * Doing a blank re-save will cause the display name to be recalculated by Civi + * rules. + * + * Not useful here but possibly for Major Gifts letter addressing it also + * will allow us to update addressing fields (e.g Dear Fred) for sending letters. + * We don't do that for all contacts but could for MG. + * + * Bug: T179118 + */ +function wmf_civicrm_update_7600() { + civicrm_initialize(); + $result = CRM_Core_DAO::executeQuery( +"SELECT id FROM civicrm_contact WHERE (display_name is null OR display_name = '') AND is_deleted= 0" + ); + while ($result->fetch()) { +civicrm_api3('Contact', 'create', array('id' => $result->id)); + } +} -- To view, visit https://gerrit.wikimedia.org/r/403557 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib74916c507217524d57afb277e97ad8ac297adbe Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: deployment Gerrit-Owner: Eileen ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Update CiviCRM submodule
Eileen has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/403554 ) Change subject: Update CiviCRM submodule .. Update CiviCRM submodule 9017e2e CRM-21634 Stdise search fields as they relate to contacts Change-Id: I0ca5498e4515d691aff9ec6d607ece1e3b77f2b0 --- M civicrm 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: jenkins-bot: Verified Eileen: Looks good to me, approved diff --git a/civicrm b/civicrm index 9fbcd49..9017e2e 16 --- a/civicrm +++ b/civicrm @@ -1 +1 @@ -Subproject commit 9fbcd496bd919097cf6f87bebf9ff325aa184c7c +Subproject commit 9017e2e90a7324edc34c7d0c4eea62fbeb32940e -- To view, visit https://gerrit.wikimedia.org/r/403554 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0ca5498e4515d691aff9ec6d607ece1e3b77f2b0 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: Eileen Gerrit-Reviewer: Eileen Gerrit-Reviewer: Ejegg 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...Contributors[master]: Fix for 2270fb67891f - remove unset() call
Yaron Koren has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/403551 ) Change subject: Fix for 2270fb67891f - remove unset() call .. Fix for 2270fb67891f - remove unset() call It led to an error in certain cases - see T181903. Bug: T181903 Change-Id: Ia2c07fca66edfb07c2d1ca58394fd07c0f9c766f --- M includes/SpecialContributors.php 1 file changed, 2 insertions(+), 3 deletions(-) Approvals: Yaron Koren: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/SpecialContributors.php b/includes/SpecialContributors.php index f847ee7..4f36722 100644 --- a/includes/SpecialContributors.php +++ b/includes/SpecialContributors.php @@ -32,10 +32,9 @@ $this->setHeaders(); $opts = $this->getOptions(); - $target = $opts['target']; - unset( $opts['target'] ); $this->setContributorsClass( - new Contributors( Title::newFromText( $target ), $opts->getAllValues() ) ); + new Contributors( Title::newFromText( $opts['target'] ), $opts->getAllValues() ) + ); # What are we doing? Different execution paths for inclusion, # direct access and raw access -- To view, visit https://gerrit.wikimedia.org/r/403551 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia2c07fca66edfb07c2d1ca58394fd07c0f9c766f Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/Contributors Gerrit-Branch: master Gerrit-Owner: Yaron Koren Gerrit-Reviewer: Krinkle Gerrit-Reviewer: Yaron Koren Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Update CiviCRM submodule
Eileen has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/403554 ) Change subject: Update CiviCRM submodule .. Update CiviCRM submodule 9017e2e CRM-21634 Stdise search fields as they relate to contacts Change-Id: I0ca5498e4515d691aff9ec6d607ece1e3b77f2b0 --- M civicrm 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/54/403554/1 diff --git a/civicrm b/civicrm index 9fbcd49..9017e2e 16 --- a/civicrm +++ b/civicrm @@ -1 +1 @@ -Subproject commit 9fbcd496bd919097cf6f87bebf9ff325aa184c7c +Subproject commit 9017e2e90a7324edc34c7d0c4eea62fbeb32940e -- To view, visit https://gerrit.wikimedia.org/r/403554 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0ca5498e4515d691aff9ec6d607ece1e3b77f2b0 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: Eileen ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Hygiene: Split getSummaryType into standalone method and add...
Mholloway has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/403553 ) Change subject: Hygiene: Split getSummaryType into standalone method and add unit tests .. Hygiene: Split getSummaryType into standalone method and add unit tests Change-Id: Ibd73ce5363719769d921957d8358c68fecf493e6 --- M lib/mobile-util.js M test/lib/mobile-util/mobile-util-test.js 2 files changed, 23 insertions(+), 14 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps refs/changes/53/403553/1 diff --git a/lib/mobile-util.js b/lib/mobile-util.js index 6856795..52ba34b 100644 --- a/lib/mobile-util.js +++ b/lib/mobile-util.js @@ -159,6 +159,23 @@ }; }; +/** + * Get the page summary type. + * @param {!Object} meta page metadata from MW API + * return {!String} the summary type (one of 'standard', 'disambiguation', or 'mainpage') + */ +mUtil.getSummaryType = function(meta) { +const isDisambiguationPage = meta.pageprops + && {}.hasOwnProperty.call(meta.pageprops, 'disambiguation'); +if (meta.mainpage) { +return 'mainpage'; +} +if (isDisambiguationPage) { +return 'disambiguation'; +} +return 'standard'; +}; + /* * Build a page summary * @param {!String} domain the request domain @@ -169,22 +186,9 @@ mUtil.buildSummary = function(domain, title, pageData) { const page = pageData.page; const meta = pageData.meta; -const pageProps = meta && meta.pageprops; -const isDisambiguationPage = pageProps && {}.hasOwnProperty.call(pageProps, 'disambiguation'); -const isMainPage = meta.mainpage; const isContentModelWikitext = meta.contentmodel === 'wikitext'; const isWhiteListedNamespace = mUtil.SUMMARY_NS_WHITELIST.includes(meta.ns); const isRedirect = meta.redirect; - -function getType() { -if (isMainPage) { -return 'mainpage'; -} -if (isDisambiguationPage) { -return 'disambiguation'; -} -return 'standard'; -} if (!isContentModelWikitext) { return { code: 204 }; @@ -204,7 +208,7 @@ return Object.assign({ code: 200, -type : getType(), +type : mUtil.getSummaryType(meta), title: meta.normalizedtitle, displaytitle: meta.displaytitle, namespace: { id: meta.ns, text: meta.nsText }, diff --git a/test/lib/mobile-util/mobile-util-test.js b/test/lib/mobile-util/mobile-util-test.js index a063737..bbc000b 100644 --- a/test/lib/mobile-util/mobile-util-test.js +++ b/test/lib/mobile-util/mobile-util-test.js @@ -30,4 +30,9 @@ assert.deepEqual(mUtil.extractDbTitleFromAnchor(link), 'My_db_title'); }); +it('getSummaryType identifies main and disambig pages, defaults to \'standard\'', () => { +assert.deepEqual(mUtil.getSummaryType({"mainpage":true}), 'mainpage'); + assert.deepEqual(mUtil.getSummaryType({"pageprops":{"disambiguation":""}}), 'disambiguation'); +assert.deepEqual(mUtil.getSummaryType({}), 'standard'); +}); }); -- To view, visit https://gerrit.wikimedia.org/r/403553 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibd73ce5363719769d921957d8358c68fecf493e6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/mobileapps Gerrit-Branch: master Gerrit-Owner: Mholloway ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...WikiEditor[master]: Remove reference to mw-editButtons-pipe-separator, now remov...
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/403547 ) Change subject: Remove reference to mw-editButtons-pipe-separator, now removed from MW .. Remove reference to mw-editButtons-pipe-separator, now removed from MW Change-Id: I50aeda4aee2dae8094ae19bdc6fb0c64425c3e14 --- M modules/ext.wikiEditor.toolbar.styles.less 1 file changed, 1 insertion(+), 2 deletions(-) Approvals: Bartosz Dziewoński: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ext.wikiEditor.toolbar.styles.less b/modules/ext.wikiEditor.toolbar.styles.less index 016a56c..da93bfa 100644 --- a/modules/ext.wikiEditor.toolbar.styles.less +++ b/modules/ext.wikiEditor.toolbar.styles.less @@ -4,8 +4,7 @@ /* Hide vanilla MediaWiki's "Editing help" link, as we provide it in the toolbar */ .client-js .editButtons { - .editHelp, - .mw-editButtons-pipe-separator { + .editHelp { display: none; } } -- To view, visit https://gerrit.wikimedia.org/r/403547 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I50aeda4aee2dae8094ae19bdc6fb0c64425c3e14 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikiEditor Gerrit-Branch: master Gerrit-Owner: Jforrester Gerrit-Reviewer: Bartosz Dziewoński Gerrit-Reviewer: TheDJ Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...civicrm[master]: CRM-21634 Stdise search fields as they relate to contacts
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/403098 ) Change subject: CRM-21634 Stdise search fields as they relate to contacts .. CRM-21634 Stdise search fields as they relate to contacts https://github.com/civicrm/civicrm-core/pull/11492 Bug: 184496 Change-Id: Id7edd36e043a7a3ce0f693a53da6d05af746747d --- M CRM/Contribute/Form/Search.php M CRM/Core/Form/Search.php M CRM/Event/Form/Search.php M CRM/Member/Form/Search.php M CRM/Pledge/Form/Search.php A templates/CRM/Contact/Form/Search/ContactSearchFields.tpl M templates/CRM/Contribute/Form/Search.tpl M templates/CRM/Event/Form/Search.tpl M templates/CRM/Member/Form/Search.tpl M templates/CRM/Pledge/Form/Search.tpl 10 files changed, 195 insertions(+), 73 deletions(-) Approvals: jenkins-bot: Verified Ejegg: Looks good to me, approved diff --git a/CRM/Contribute/Form/Search.php b/CRM/Contribute/Form/Search.php index e79c29b..30bb298 100644 --- a/CRM/Contribute/Form/Search.php +++ b/CRM/Contribute/Form/Search.php @@ -173,25 +173,7 @@ */ public function buildQuickForm() { parent::buildQuickForm(); -$this->addSortNameField(); - -$this->_group = CRM_Core_PseudoConstant::nestedGroup(); - -// multiselect for groups -if ($this->_group) { - $this->add('select', 'group', ts('Groups'), $this->_group, FALSE, -array('id' => 'group', 'multiple' => 'multiple', 'class' => 'crm-select2') - ); -} - -// multiselect for tags -$contactTags = CRM_Core_BAO_Tag::getTags(); - -if ($contactTags) { - $this->add('select', 'contact_tags', ts('Tags'), $contactTags, FALSE, -array('id' => 'contact_tags', 'multiple' => 'multiple', 'class' => 'crm-select2') - ); -} +$this->addContactSearchFields(); CRM_Contribute_BAO_Query::buildSearchForm($this); @@ -237,6 +219,36 @@ } /** + * Get the label for the tag field. + * + * We do this in a function so the 'ts' wraps the whole string to allow + * better translation. + * + * @return string + */ + protected function getTagLabel() { +return ts('Contributor Tag(s)'); + } + + /** + * Get the label for the group field. + * + * @return string + */ + protected function getGroupLabel() { +return ts('Contributor Group(s)'); + } + + /** + * Get the label for the group field. + * + * @return string + */ + protected function getContactTypeLabel() { +return ts('Contributor Contact Type'); + } + + /** * The post processing of the form gets done here. * * Key things done during post processing are diff --git a/CRM/Core/Form/Search.php b/CRM/Core/Form/Search.php index ec2ef48..dabab86 100644 --- a/CRM/Core/Form/Search.php +++ b/CRM/Core/Form/Search.php @@ -199,4 +199,39 @@ return 'search'; } + /** + * Add generic fields that specify the contact. + */ + protected function addContactSearchFields() { +$this->addSortNameField(); + +$this->_group = CRM_Core_PseudoConstant::nestedGroup(); +if ($this->_group) { + $this->add('select', 'group', $this->getGroupLabel(), $this->_group, FALSE, +array( + 'id' => 'group', + 'multiple' => 'multiple', + 'class' => 'crm-select2', +) + ); +} + +$contactTags = CRM_Core_BAO_Tag::getTags(); +if ($contactTags) { + $this->add('select', 'contact_tags', $this->getTagLabel(), $contactTags, FALSE, +array( + 'id' => 'contact_tags', + 'multiple' => 'multiple', + 'class' => 'crm-select2', +) + ); +} +$this->addField('contact_type', array('entity' => 'Contact')); + +if (CRM_Core_Permission::check('access deleted contacts') && Civi::settings()->get('contact_undelete')) { + $this->addElement('checkbox', 'deleted_contacts', ts('Search in Trash') . '' . ts('(deleted contacts)')); +} + + } + } diff --git a/CRM/Event/Form/Search.php b/CRM/Event/Form/Search.php index 4552103..5f5783d 100644 --- a/CRM/Event/Form/Search.php +++ b/CRM/Event/Form/Search.php @@ -29,8 +29,6 @@ * * @package CRM * @copyright CiviCRM LLC (c) 2004-2017 - * $Id$ - * */ /** @@ -168,11 +166,7 @@ */ public function buildQuickForm() { parent::buildQuickForm(); -$this->addSortNameField(); - -if (CRM_Core_Permission::check('access deleted contacts') and Civi::settings()->get('contact_undelete')) { - $this->addElement('checkbox', 'deleted_contacts', ts('Search in Trash') . '' . ts('(deleted contacts)')); -} +$this->addContactSearchFields(); CRM_Event_BAO_Query::buildSearchForm($this); @@ -273,6 +267,36 @@ } /** + * Get the label for the tag field. + * + * We do this in a function so the 'ts' wraps the whole string to allow + * better translation. + * + * @return string + */ + protected function getTagLabel() { +return ts('Participant Tag(s)'); +
[MediaWiki-commits] [Gerrit] mediawiki...Nostalgia[master]: Don't style the special page selector like an OOUI button
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/403482 ) Change subject: Don't style the special page selector like an OOUI button .. Don't style the special page selector like an OOUI button This doesn't match the appearance of the rest of the skin, nor is it representative for Wikipedia from that time. Bug: T184601 Change-Id: I1739b9f4d7f52ec73b312b1443d4e9c2fbab3484 --- M NostalgiaTemplate.php 1 file changed, 5 insertions(+), 1 deletion(-) Approvals: Bartosz Dziewoński: Looks good to me, approved jenkins-bot: Verified diff --git a/NostalgiaTemplate.php b/NostalgiaTemplate.php index 67dcf17..585889b 100644 --- a/NostalgiaTemplate.php +++ b/NostalgiaTemplate.php @@ -353,7 +353,11 @@ return Html::rawElement( 'form', [ 'id' => 'specialpages', 'method' => 'get', 'action' => $wgScript ], - $select->getHTML() . Xml::submitButton( wfMessage( 'go' )->text() ) ); + $select->getHTML() . Html::element( + 'input', + [ 'type' => 'submit', 'value' => wfMessage( 'go' )->text() ] + ) + ); } /** -- To view, visit https://gerrit.wikimedia.org/r/403482 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1739b9f4d7f52ec73b312b1443d4e9c2fbab3484 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/Nostalgia Gerrit-Branch: master Gerrit-Owner: Mainframe98 Gerrit-Reviewer: Bartosz Dziewoński Gerrit-Reviewer: Daniel Friesen Gerrit-Reviewer: Isarra Gerrit-Reviewer: Jack Phoenix Gerrit-Reviewer: Krinkle Gerrit-Reviewer: Njw Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] integration/config[master]: Provide Java 8 for mwdumper testing
Awight has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/403552 ) Change subject: Provide Java 8 for mwdumper testing .. Provide Java 8 for mwdumper testing Change-Id: I08b3fc3b3ba063ef76e4a2e49e8615837a14b9d1 --- M jjb/mediawiki-tools.yaml 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/52/403552/1 diff --git a/jjb/mediawiki-tools.yaml b/jjb/mediawiki-tools.yaml index e815528..2d31181 100644 --- a/jjb/mediawiki-tools.yaml +++ b/jjb/mediawiki-tools.yaml @@ -65,8 +65,8 @@ - job: name: 'mwdumper-maven' project-type: maven -jdk: 'Debian - OpenJdk 7' -node: ci-jessie-wikimedia +jdk: 'Debian - OpenJdk 8' +node: ci-stretch-wikimedia defaults: use-remote-zuul-shallow-clone concurrent: true triggers: -- To view, visit https://gerrit.wikimedia.org/r/403552 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I08b3fc3b3ba063ef76e4a2e49e8615837a14b9d1 Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Awight ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Add extension to change contact types
Eileen has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/398176 ) Change subject: Add extension to change contact types .. Add extension to change contact types Note we need some (already upstreamed) civicrm fixes merged + progress on this https://github.com/civicrm/civicrm-core/pull/11405 before the tests will pass. I propose that we actually DON'T skip processing greetings when the amount is $500+ because it would benefit major gifts if that were set. Bug: T156193 Change-Id: I7c34be4225c04ac112d74891035607144178fd5f --- M phpunit.xml M sites/all/modules/wmf_civicrm/wmf_civicrm.install A sites/default/civicrm/extensions/org.wikimedia.contacteditor/ActivityTypeContactChange.mgd.php A sites/default/civicrm/extensions/org.wikimedia.contacteditor/CRM/Contacteditor/ChangeContactType.php A sites/default/civicrm/extensions/org.wikimedia.contacteditor/CRM/Contacteditor/Form/ContactTypeChange.php A sites/default/civicrm/extensions/org.wikimedia.contacteditor/LICENSE.txt A sites/default/civicrm/extensions/org.wikimedia.contacteditor/README.md A sites/default/civicrm/extensions/org.wikimedia.contacteditor/contacteditor.civix.php A sites/default/civicrm/extensions/org.wikimedia.contacteditor/contacteditor.php A sites/default/civicrm/extensions/org.wikimedia.contacteditor/info.xml A sites/default/civicrm/extensions/org.wikimedia.contacteditor/phpunit.xml.dist A sites/default/civicrm/extensions/org.wikimedia.contacteditor/templates/CRM/Contacteditor/Form/ContactTypeChange.tpl A sites/default/civicrm/extensions/org.wikimedia.contacteditor/tests/phpunit/BaseUnitTestClass.php A sites/default/civicrm/extensions/org.wikimedia.contacteditor/tests/phpunit/ContactEditorTest.php A sites/default/civicrm/extensions/org.wikimedia.contacteditor/tests/phpunit/bootstrap.php A sites/default/civicrm/extensions/org.wikimedia.contacteditor/xml/Menu/contacteditor.xml 16 files changed, 2,214 insertions(+), 0 deletions(-) Approvals: jenkins-bot: Verified Ejegg: Looks good to me, approved diff --git a/phpunit.xml b/phpunit.xml index 5507958..5731077 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -49,5 +49,8 @@ sites/default/civicrm/extensions/org.wikimedia.omnimail/tests/phpunit + + sites/default/civicrm/extensions/org.wikimedia.contacteditor/tests/phpunit + diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.install b/sites/all/modules/wmf_civicrm/wmf_civicrm.install index 3b30ed8..b92f1c4 100644 --- a/sites/all/modules/wmf_civicrm/wmf_civicrm.install +++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.install @@ -64,6 +64,8 @@ wmf_civicrm_update_7575(); wmf_civicrm_update_7580(); wmf_civicrm_update_7585(); + wmf_civicrm_update_7595(); + wmf_civicrm_update_7605(); } /** @@ -3311,3 +3313,14 @@ civicrm_api3('Contact', 'create', array('id' => $result->id)); } } + +/** + * Add contact type editor extension. + * + * Bug: TT156193 + */ +function wmf_civicrm_update_7605() { + civicrm_initialize(); + civicrm_api3('extension', 'refresh', array()); + civicrm_api3('extension', 'install', array('key' => 'org.wikimedia.contacteditor')); +} diff --git a/sites/default/civicrm/extensions/org.wikimedia.contacteditor/ActivityTypeContactChange.mgd.php b/sites/default/civicrm/extensions/org.wikimedia.contacteditor/ActivityTypeContactChange.mgd.php new file mode 100644 index 000..d790c4d --- /dev/null +++ b/sites/default/civicrm/extensions/org.wikimedia.contacteditor/ActivityTypeContactChange.mgd.php @@ -0,0 +1,15 @@ + array( +'name' => 'Contact Type Changed', +'entity' => 'OptionValue', +'params' => array( + 'version' => 3, + 'option_group_id' => 'activity_type', + 'label' => 'Contact Type Changed', + 'name' => 'contact_type_changed', + 'description' => 'Contact type changed', + 'filter' => 1, +), + ), +); diff --git a/sites/default/civicrm/extensions/org.wikimedia.contacteditor/CRM/Contacteditor/ChangeContactType.php b/sites/default/civicrm/extensions/org.wikimedia.contacteditor/CRM/Contacteditor/ChangeContactType.php new file mode 100644 index 000..6a10e4f --- /dev/null +++ b/sites/default/civicrm/extensions/org.wikimedia.contacteditor/CRM/Contacteditor/ChangeContactType.php @@ -0,0 +1,331 @@ +getApiRequest(); +if ($request['entity'] !== 'Contact' || $request['action'] !== 'create') { + return; +} +if (empty($request['params']['id']) || empty($request['params']['contact_type'])) { + // Hook is only interested in changes that update contact type. + return; +} +$contactID = $request['params']['id']; +$newContactType = $request['params']['contact_type']; +// Usually we will return after getting this - if we proceed past here we do more extensive data gathering as it is 'the real deal'. +$existingContactType = civicrm_api3('Contact', 'getvalue', [ +
[MediaWiki-commits] [Gerrit] mediawiki...Contributors[master]: Fix for 2270fb67891f - removed unset() call
Yaron Koren has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/403551 ) Change subject: Fix for 2270fb67891f - removed unset() call .. Fix for 2270fb67891f - removed unset() call It led to an error in certain cases - see https://phabricator.wikimedia.org/T181903 Change-Id: Ia2c07fca66edfb07c2d1ca58394fd07c0f9c766f --- M includes/SpecialContributors.php 1 file changed, 1 insertion(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Contributors refs/changes/51/403551/2 diff --git a/includes/SpecialContributors.php b/includes/SpecialContributors.php index f847ee7..6c06c32 100644 --- a/includes/SpecialContributors.php +++ b/includes/SpecialContributors.php @@ -32,10 +32,8 @@ $this->setHeaders(); $opts = $this->getOptions(); - $target = $opts['target']; - unset( $opts['target'] ); $this->setContributorsClass( - new Contributors( Title::newFromText( $target ), $opts->getAllValues() ) ); + new Contributors( Title::newFromText( $opts['target'] ), $opts->getAllValues() ) ); # What are we doing? Different execution paths for inclusion, # direct access and raw access -- To view, visit https://gerrit.wikimedia.org/r/403551 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia2c07fca66edfb07c2d1ca58394fd07c0f9c766f Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Contributors Gerrit-Branch: master Gerrit-Owner: Yaron Koren ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[specialpages]: Hygiene: Remove MobileContext::getConfigVariable
Jdlrobson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/403550 ) Change subject: Hygiene: Remove MobileContext::getConfigVariable .. Hygiene: Remove MobileContext::getConfigVariable Going forward we will make use of the FeatureManager for these kinds of checks. Given the complexity of the shouldShowWikibaseDescriptions method I've not (yet) removed it, but have wired it up to the feature management system. Change-Id: I6aa1c66ec131a8db75d6e6128d4e3af78f351af0 --- M includes/MobileContext.php M includes/MobileFrontend.body.php M includes/MobileFrontend.hooks.php M includes/ServiceWiring.php M tests/phpunit/MobileContextTest.php A tests/phpunit/features/FeaturesManagerTest.php 6 files changed, 86 insertions(+), 135 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/50/403550/1 diff --git a/includes/MobileContext.php b/includes/MobileContext.php index 1da8860..49d7cb7 100644 --- a/includes/MobileContext.php +++ b/includes/MobileContext.php @@ -141,90 +141,6 @@ } /** -* Gets the value of a config variable whose value depends on whether the -* user is a member of the beta group. -* -* @warning If the value of the config variable doesn't behave this way, then -* `null` is returned. -* -* @example -* ``` -* $wgFoo = [ -* 'beta' => 'bar', -* 'base' => 'baz', -* ]; -* $wgQux = 'quux'; -* $wgCorge = [ -* 'grault' => 'garply', -* ]; -* -* $context = MobileContext::singleton(); -* $context->getConfigVariable( 'Foo' ); // => 'baz' -* -* $context->setMobileMode( 'beta' ); -* $context->getConfigVariable( 'Foo' ); // => 'bar' -* -* // If the config variable isn't a dictionary, then its value will be -* // returned returned regardless of whether the user is a member of the beta -* // group. -* $context->getConfigVariable( 'Qux' ); // => 'quux' -* -* // If the config variable is a dictionary but doesn't have "beta" or "base" -* // entries, then `null` will be returned. -* $context->getConfigVariable( 'Corge' ); // => null -* ``` -* -* @param string $variableName Config variable to be returned -* @return mixed|null -* @throws ConfigException If the config variable doesn't exist -* -* @TODO Should this be renamed, e.g. `getFlag`, or extracted? -*/ - public function getConfigVariable( $variableName ) { - $configVariable = $this->getMFConfig()->get( $variableName ) ?: []; - - if ( !is_array( $configVariable ) ) { - return $configVariable; - } - - if ( $this->isBetaGroupMember() && array_key_exists( 'beta', $configVariable ) ) { - return $configVariable['beta']; - } elseif ( array_key_exists( 'base', $configVariable ) ) { - return $configVariable['base']; - } - return null; - } - - /** -* Checks whether references should be lazy loaded for the current user -* @return bool -*/ - public function isLazyLoadReferencesEnabled() { - return $this->getConfigVariable( 'MFLazyLoadReferences' ); - } - - /** -* Checks whether images should be lazy loaded for the current user -* @return bool -*/ - public function isLazyLoadImagesEnabled() { - return $this->getConfigVariable( 'MFLazyLoadImages' ); - } - - /** -* Checks whether the first paragraph from the lead section should be -* shown before all infoboxes that come earlier. -* @return bool -*/ - public function shouldShowFirstParagraphBeforeInfobox() { - if ( $this->showFirstParagraphBeforeInfobox === null ) { - $this->showFirstParagraphBeforeInfobox = $this->getConfigVariable( - 'MFShowFirstParagraphBeforeInfobox' ); - } - return $this->showFirstParagraphBeforeInfobox; - } - - /** * Detects whether the UA is sending the request from a device and, if so, * whether to display the mobile view to that device. * @@ -1157,6 +1073,11 @@ * `wgMFDisplayWikibaseDescriptions` configuration variable for detail */ public function shouldShowWikibaseDescriptions( $feature ) { + $featureManager = \MediaWiki\MediaWikiServices::getInstance() + ->getService( 'MobileFrontend.FeaturesManager' ); + $isEnabled = $featureManager->isAvailableInContext( + 'MFEnableWikid
[MediaWiki-commits] [Gerrit] mediawiki...MinervaNeue[master]: Remove reference to mw-editButtons-pipe-separator, now remov...
Jforrester has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/403549 ) Change subject: Remove reference to mw-editButtons-pipe-separator, now removed from MW .. Remove reference to mw-editButtons-pipe-separator, now removed from MW Change-Id: I59d34dfdd13122db0229ce40909d66d88bdd8d65 --- M skinStyles/mediawiki.action.edit.styles/minerva.less 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/MinervaNeue refs/changes/49/403549/1 diff --git a/skinStyles/mediawiki.action.edit.styles/minerva.less b/skinStyles/mediawiki.action.edit.styles/minerva.less index d3fdb20..cfd634d 100644 --- a/skinStyles/mediawiki.action.edit.styles/minerva.less +++ b/skinStyles/mediawiki.action.edit.styles/minerva.less @@ -5,7 +5,7 @@ border: 1px solid @colorGray12; } -.editHelp, .cancelLink, .mw-editButtons-pipe-separator { +.editHelp, .cancelLink { display: none; } -- To view, visit https://gerrit.wikimedia.org/r/403549 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I59d34dfdd13122db0229ce40909d66d88bdd8d65 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/MinervaNeue Gerrit-Branch: master Gerrit-Owner: Jforrester ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] analytics/refinery[master]: Point data and success flags to the same directory
Nuria has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/403484 ) Change subject: Point data and success flags to the same directory .. Point data and success flags to the same directory While working on re-starting this job, I noticed the output data was actually going to a different directory than the success flags. I missed this in manual oozie testing because it has to do with the table definition, and I was using a different test table in my own db. I'm not sure how to test this in production, so a sanity check from someone doing the code review would be nice. Bug: T170764 Change-Id: I54e5d2017cd6baeb5ec2c1ba0764107b97b3afeb --- M hive/interlanguage/create_interlanguage_navigation_table.hql M oozie/interlanguage/daily/README.md M oozie/interlanguage/datasets.xml 3 files changed, 3 insertions(+), 11 deletions(-) Approvals: Nuria: Verified; Looks good to me, approved diff --git a/hive/interlanguage/create_interlanguage_navigation_table.hql b/hive/interlanguage/create_interlanguage_navigation_table.hql index 939f8fa..a54629d 100644 --- a/hive/interlanguage/create_interlanguage_navigation_table.hql +++ b/hive/interlanguage/create_interlanguage_navigation_table.hql @@ -18,5 +18,5 @@ `date` string COMMENT 'Date in -MM-DD format' ) STORED AS PARQUET -LOCATION '/wmf/data/wmf/interlanguage/navigation' +LOCATION '/wmf/data/wmf/interlanguage/navigation/daily' ; diff --git a/oozie/interlanguage/daily/README.md b/oozie/interlanguage/daily/README.md index 5cc51cf..6f56798 100644 --- a/oozie/interlanguage/daily/README.md +++ b/oozie/interlanguage/daily/README.md @@ -4,4 +4,4 @@ from one wiki project to another. Only counting desktop site browsing. Output is appended into (-mm-dd) daily partitions -in /wmf/data/wmf/interlanguage/navigation +in /wmf/data/wmf/interlanguage/navigation/daily diff --git a/oozie/interlanguage/datasets.xml b/oozie/interlanguage/datasets.xml index 18875b5..fb1d59b 100644 --- a/oozie/interlanguage/datasets.xml +++ b/oozie/interlanguage/datasets.xml @@ -16,20 +16,12 @@ that are referred from another wiki within the same project family but in a different language. This allows the tracking of inter-language user navigation. - -Note that we do not use “${...}” but “${"$"}{...}", as dataset files are -passed to EL twice in cascade, and in the first EL level, ${MONTH} -evaluates to the string “${MONTH}”. Hence, we escape the dollar sign in -“${}" to “${"$"}{...}”. At the first EL level, “${"$"}” gets turned -into a dollar sign, and “{...}” is just passed along. Hence, we arrive -at “${...}” as input for the second EL level. There, the variables hold -their expected values, and we can start unpadding them. --> - ${interlanguage_data_directory}/navigation/daily/date=${YEAR}-${"$"}{MONTH + 0}-${"$"}{DAY + 0} + ${interlanguage_data_directory}/navigation/daily/date=${YEAR}-${MONTH}-${DAY} _SUCCESS -- To view, visit https://gerrit.wikimedia.org/r/403484 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I54e5d2017cd6baeb5ec2c1ba0764107b97b3afeb Gerrit-PatchSet: 1 Gerrit-Project: analytics/refinery Gerrit-Branch: master Gerrit-Owner: Milimetric Gerrit-Reviewer: Joal Gerrit-Reviewer: Nuria Gerrit-Reviewer: Ottomata ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...CodeEditor[master]: Remove reference to mw-editButtons-pipe-separator, now remov...
Jforrester has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/403548 ) Change subject: Remove reference to mw-editButtons-pipe-separator, now removed from MW .. Remove reference to mw-editButtons-pipe-separator, now removed from MW Change-Id: Ia214c25b1ca65f6998da9de0949034829d9959d5 --- M modules/jquery.codeEditor.less 1 file changed, 1 insertion(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CodeEditor refs/changes/48/403548/1 diff --git a/modules/jquery.codeEditor.less b/modules/jquery.codeEditor.less index 98aabb3..5112f5b 100644 --- a/modules/jquery.codeEditor.less +++ b/modules/jquery.codeEditor.less @@ -122,8 +122,7 @@ /* Hide vanilla MediaWiki's "Editing help" link, as we provide it in the toolbar */ /* Copied from the same code in WikiEditor */ .client-js .editButtons { - .editHelp, - .mw-editButtons-pipe-separator { + .editHelp { display: none; } } -- To view, visit https://gerrit.wikimedia.org/r/403548 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia214c25b1ca65f6998da9de0949034829d9959d5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CodeEditor Gerrit-Branch: master Gerrit-Owner: Jforrester ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...WikiEditor[master]: Remove reference to mw-editButtons-pipe-separator, now remov...
Jforrester has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/403547 ) Change subject: Remove reference to mw-editButtons-pipe-separator, now removed from MW .. Remove reference to mw-editButtons-pipe-separator, now removed from MW Change-Id: I50aeda4aee2dae8094ae19bdc6fb0c64425c3e14 --- M modules/ext.wikiEditor.toolbar.styles.less 1 file changed, 1 insertion(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikiEditor refs/changes/47/403547/1 diff --git a/modules/ext.wikiEditor.toolbar.styles.less b/modules/ext.wikiEditor.toolbar.styles.less index 016a56c..da93bfa 100644 --- a/modules/ext.wikiEditor.toolbar.styles.less +++ b/modules/ext.wikiEditor.toolbar.styles.less @@ -4,8 +4,7 @@ /* Hide vanilla MediaWiki's "Editing help" link, as we provide it in the toolbar */ .client-js .editButtons { - .editHelp, - .mw-editButtons-pipe-separator { + .editHelp { display: none; } } -- To view, visit https://gerrit.wikimedia.org/r/403547 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I50aeda4aee2dae8094ae19bdc6fb0c64425c3e14 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikiEditor Gerrit-Branch: master Gerrit-Owner: Jforrester ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] search/MjoLniR[master]: Repoint spark in example_train.yaml
EBernhardson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/403546 ) Change subject: Repoint spark in example_train.yaml .. Repoint spark in example_train.yaml Mostly this makes it easier to push a branch over to stat1005 and try something out against full-sized data. Having example_train.yaml be "close enough" helps a good bit. Also update spark to 2.1.2 to match, and add a 'master' template so yarn/local can be toggled from spark.py command line Change-Id: Iccd44c0c9436287ba963a3c8b2244b3fa0a46274 --- M example_train.yaml A mjolnir/pruning.py A mjolnir/scan_es.py M mjolnir/test/fixtures/load_config/example_train.expect 4 files changed, 316 insertions(+), 100 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/search/MjoLniR refs/changes/46/403546/1 diff --git a/example_train.yaml b/example_train.yaml index 31ce45c..7b1749c 100644 --- a/example_train.yaml +++ b/example_train.yaml @@ -3,10 +3,11 @@ global: environment: PYSPARK_PYTHON: venv/bin/python -SPARK_CONF_DIR: /etc/spark/conf -SPARK_HOME: "%(HOME)s/spark-%(spark_version)s-bin-hadoop2.6" +SPARK_CONF_DIR: /etc/spark2/conf +SPARK_HOME: "/usr/lib/spark2" template_vars: -spark_version: 2.1.0 +spark_version: 2.1.2 +master: yarn # Path to spark-submit applicatoin spark_submit: "%(SPARK_HOME)s/bin/spark-submit" # Local path to zip'd virtualenv which will be shipped to executors @@ -50,7 +51,7 @@ ? "%(spark_submit)s" ? "%(PYSPARK_PYTHON)s" spark_args: -master: yarn +master: "%(master)s" # TODO: When is this necessary? files: /usr/lib/libhdfs.so.0.0.0 # Ship the mjolnir virtualenv to executors and decompress it to ./venv diff --git a/mjolnir/pruning.py b/mjolnir/pruning.py new file mode 100644 index 000..c2e78f9 --- /dev/null +++ b/mjolnir/pruning.py @@ -0,0 +1,134 @@ +from __future__ import absolute_import +import json +import math +from pyspark.sql import functions as F +from pyspark.sql.types import FloatType, StructField, StructType + + +class Split(object): +def __init__(self, left, right, feature, threshold): +self.left = left +self.right = right +self.feature = feature +self.threshold = threshold + +def isLeaf(self): +return False + +def eval(self, features): +n = self +while not n.isLeaf(): +if n.threshold > features[n.feature]: +n = n.left +else: +n = n.right +return n.output + + +class Leaf(object): +def __init__(self, output): +self.output = output + +def isLeaf(self): +return True + + +def _parse_node(json_node): +if 'leaf' in json_node: +return Leaf(json_node['leaf']) +else: +left = _parse_node(json_node['children'][0]) +right = _parse_node(json_node['children'][1]) +return Split(left, right, json_node['split'], json_node['split_condition']) + + +def parse_xgboost(json_tree): +return [_parse_node(tree) for tree in json.loads(json_tree)] + + +def ndcg_at_k(k, predicted, actual): +idcg = sum([((1 << label) - 1) / math.log(i + 2.0, 2) for i, label in enumerate(actual[:k])]) +if idcg == 0: +return 0. +else: +dcg = sum([((1 << label) - 1) / math.log(i + 2.0, 2) for i, label in enumerate(predicted[:k])]) +return dcg / idcg + + +# Horrible name ... it returns the ndcg for each removed tree +def gen_per_tree_ndcg(tree_cols, removed_trees, label_col, k=10): +def f(rows): +# Remove trees from the sum +cur_sum = [reduce(lambda acc, tree: acc - row[tree], removed_trees, row.sum) for row in rows] +data = zip(rows, cur_sum) + +# TODO: actual could be pre-calculated? Actually full idcg could be pre-calculated +actual = [x[0][label_col] for x in sorted(data, key=lambda x: x[0][label_col], reverse=True)] +# baseline ndcg +predicted = [x[0][label_col] for x in sorted(data, key=lambda x: x[1], reverse=True)] +res = [ndcg_at_k(k, predicted, actual)] +# Per-tree ndcgs +for tree_pred in tree_cols: +predicted = [x[0][label_col] for x in sorted(data, key=lambda x: x[1] - x[0][tree_pred], reverse=True)] +res.append(ndcg_at_k(k, predicted, actual)) +return res +fields = [StructField(name, FloatType()) for name in ['orig'] + tree_cols] +return F.udf(f, StructType(fields)) + + +def gen_eval_tree_udf(bc_trees): +def f(tree_id, features): +return bc_trees.value[tree_id].eval(features) +return F.udf(f, FloatType()) + + +def prune(df, trees, feature_col='features', label_col='label', group_cols=['wikiid', 'query']): +# Calculate per-tree scores +eval_tree_udf = gen_eval_tree_udf(df._sc.broadcast(trees)) +c
[MediaWiki-commits] [Gerrit] search/MjoLniR[master]: JVM components to support file-based training
EBernhardson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/403545 ) Change subject: JVM components to support file-based training .. JVM components to support file-based training An upcoming refactor changes training_pipeline.py from dataframe based training to file based training, where we emit partitioned and formatted folds/splits to hdfs and load them into training by copying to a local file and pointing c++ as it. This is a separate patch so we can release a new version of the MjoLniR jar. Due to how our CI works python cannot test against new jvm code until it has been released. The entry points that python will be using are: * DataWriter.write * MlrXGBoost.trainWithFiles Change-Id: Ib5e8cd9d3e87e724f05b5ec0941c140aa5077d71 --- M .gitignore D jvm/mjolnir.iml M jvm/pom.xml A jvm/src/main/scala/ml/dmlc/xgboost4j/scala/spark/MjolnirUtils.scala A jvm/src/main/scala/org/wikimedia/search/mjolnir/AsLocalFile.scala A jvm/src/main/scala/org/wikimedia/search/mjolnir/DataWriter.scala A jvm/src/main/scala/org/wikimedia/search/mjolnir/MlrXGBoost.scala A jvm/src/test/resources/fixtures/datasets/test.txt A jvm/src/test/resources/fixtures/datasets/test.txt.query A jvm/src/test/resources/fixtures/datasets/train.txt A jvm/src/test/resources/fixtures/datasets/train.txt.query M jvm/src/test/scala/org/wikimedia/search/mjolnir/PythonUtilsSuite.scala 12 files changed, 749 insertions(+), 163 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/search/MjoLniR refs/changes/45/403545/1 diff --git a/.gitignore b/.gitignore index f2a9cf7..83930f6 100644 --- a/.gitignore +++ b/.gitignore @@ -27,6 +27,7 @@ # Editor temporary files .*.sw[po] /jvm/.idea +/jvm/mjolnir.iml # Vagrant, and cdh stuff in vagrant .vagrant diff --git a/jvm/mjolnir.iml b/jvm/mjolnir.iml deleted file mode 100644 index b341014..000 --- a/jvm/mjolnir.iml +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/jvm/pom.xml b/jvm/pom.xml index 479b4ec..d1fdc13 100644 --- a/jvm/pom.xml +++ b/jvm/pom.xml @@ -14,7 +14,7 @@ 2.1.0 2.11.8 2.11 -0.7-wmf-1 +0.8-wmf-1-SNAPSHOT @@ -146,6 +146,16 @@ jackson-module-scala_${scala.binary.version} 2.6.5 + +ml.dmlc +xgboost4j-spark +${xgboost.version} + + +ml.dmlc +xgboost4j +${xgboost.version} + diff --git a/jvm/src/main/scala/ml/dmlc/xgboost4j/scala/spark/MjolnirUtils.scala b/jvm/src/main/scala/ml/dmlc/xgboost4j/scala/spark/MjolnirUtils.scala new file mode 100644 index 000..45a00af --- /dev/null +++ b/jvm/src/main/scala/ml/dmlc/xgboost4j/scala/spark/MjolnirUtils.scala @@ -0,0 +1,28 @@ +package ml.dmlc.xgboost4j.scala.spark + +import ml.dmlc.xgboost4j.java.IRabitTracker +import ml.dmlc.xgboost4j.scala.Booster +import ml.dmlc.xgboost4j.scala.rabit.RabitTracker + +/** + * Provide access to package-private constructs of xgboost4j-spark + */ +object MjolnirUtils { + def model(booster: Booster, metrics: Map[String, Array[Float]], trainMatrix: String): XGBoostModel = { +// Arbitrarily take an 'other' matrix if available +val xgMetrics = metrics.keys.find(!_.equals(trainMatrix)).map{ name => Map( + "train" -> metrics(trainMatrix), + "test" -> metrics(name) +) }.getOrElse(Map( + "train" -> metrics(trainMatrix) +)) + +val model = new XGBoostRegressionModel(booster) +model.setSummary(XGBoostTrainingSummary(xgMetrics)) +model + } + + def scalaRabitTracker(nWorkers: Int): IRabitTracker = { +new RabitTracker(nWorkers) + } +} diff --git a/jvm/src/main/scala/org/wikimedia/search/mjolnir/AsLocalFile.scala b/jvm/src/main/scala/org/wikimedia/search/mjolnir/AsLocalFile.scala new file mode 100644 index 000..9962b3a --- /dev/null +++ b/jvm/src/main/scala/org/wikimedia/search/mjolnir/AsLocalF