[MediaWiki-commits] [Gerrit] [WIP/POC] Live notifications of new notifications - change (mediawiki...Echo)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/126201 Change subject: [WIP/POC] Live notifications of new notifications .. [WIP/POC] Live notifications of new notifications Change-Id: I8f7bc77d05762fd12927437f6450ae3f97eb84af --- M Echo.php M Hooks.php A modules/desktop/ext.echo.live.js 3 files changed, 64 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/01/126201/1 diff --git a/Echo.php b/Echo.php index 1ab6362..94f3b63 100644 --- a/Echo.php +++ b/Echo.php @@ -153,6 +153,14 @@ ), 'targets' = array( 'desktop', 'mobile' ), ), + 'ext.echo.live' = $echoResourceTemplate + array( + 'scripts' = 'desktop/ext.echo.live.js', + 'dependencies' = array( + 'ext.echo.base', + 'mediawiki.notify', + 'mediawiki.api', + ) + ), 'ext.echo.desktop' = $echoResourceTemplate + array( 'scripts' = 'desktop/ext.echo.desktop.js', 'dependencies' = array( diff --git a/Hooks.php b/Hooks.php index d45b1de..aee326d 100644 --- a/Hooks.php +++ b/Hooks.php @@ -639,7 +639,7 @@ if ( $user-isLoggedIn() $user-getOption( 'echo-notify-show-link' ) ) { // Load the module for the Notifications flyout - $out-addModules( array( 'ext.echo.overlay' ) ); + $out-addModules( array( 'ext.echo.overlay', 'ext.echo.live' ) ); // Load the styles for the Notifications badge $out-addModuleStyles( 'ext.echo.badge' ); } diff --git a/modules/desktop/ext.echo.live.js b/modules/desktop/ext.echo.live.js new file mode 100644 index 000..62dd857 --- /dev/null +++ b/modules/desktop/ext.echo.live.js @@ -0,0 +1,55 @@ +( function ( $, mw ) { + 'use strict'; + + // Implements a live-polling Echo notifier! + mw.echo.live = { + /** +* Last notification id that we saw. +*/ + last: 0, + /** +* Continue param +*/ + cont: '', + + /** +* Append uselang param to API get/post data if applicable +*/ + update: function () { + var api = new mw.Api(), + params = { + action: 'query', + meta: 'notifications', + notformat: 'html' + }; + + if ( mw.echo.live.cont ) { + params.notcontinue = mw.echo.live.cont; + } + + api.get( params ).done( function( data ) { + console.log(mw.echo.live.last); + + + // Note, this will do it in reverse order... + $.each( data.query.notifications.list, function( id, info ) { + console.log(+info.id); + if ( ( +info.id ) mw.echo.live.last ) { + mw.notify( $( info['*'] ) ); + } + }); + + mw.echo.live.last = +Object.keys( data.query.notifications.list )[0] + mw.echo.live.cont = data.query.notifications.list[+mw.echo.live.last] + '|' + mw.echo.live.last; + mw.echo.live.queue(); + }); + }, + + queue: function () { + setTimeout( mw.echo.live.update, 60*1000 ); + } + }; + + $( mw.echo.live.queue ); // Go! + +} )( jQuery, mediaWiki ); -- To view, visit https://gerrit.wikimedia.org/r/126201 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8f7bc77d05762fd12927437f6450ae3f97eb84af Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove db38 from x1 shard - change (operations/puppet)
Springle has uploaded a new change for review. https://gerrit.wikimedia.org/r/126202 Change subject: Remove db38 from x1 shard .. Remove db38 from x1 shard Change-Id: Ib8ac9dbb0748c520c1fe51c2f45a1d7683ed05be --- M manifests/role/coredb.pp M manifests/site.pp 2 files changed, 2 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/02/126202/1 diff --git a/manifests/role/coredb.pp b/manifests/role/coredb.pp index ad280cf..0c0a066 100644 --- a/manifests/role/coredb.pp +++ b/manifests/role/coredb.pp @@ -65,10 +65,10 @@ 'no_master' = [ 'db1007', 'db1041' ] }, 'x1' = { - 'hosts' = { 'pmtpa' = [ 'db38' ], + 'hosts' = { 'eqiad' = [ 'db1029', 'db1030', 'db1031' ] }, 'primary_site' = $::mw_primary, - 'masters' = { 'pmtpa' = 'db38', 'eqiad' = 'db1029' }, + 'masters' = { 'eqiad' = 'db1029' }, 'snapshot' = [ 'db1031' ], 'no_master' = [] }, diff --git a/manifests/site.pp b/manifests/site.pp index 5ad9e51..a965d2b 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -618,11 +618,6 @@ } } -## x1 shard -node /^db(38)\.pmtpa\.wmnet/ { -include role::coredb::x1 -} - ## m1 shard (new) node /^db(35)\.pmtpa\.wmnet/ { class { 'role::coredb::m1': -- To view, visit https://gerrit.wikimedia.org/r/126202 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib8ac9dbb0748c520c1fe51c2f45a1d7683ed05be Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Springle sprin...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove db38 from x1 shard - change (operations/puppet)
Springle has submitted this change and it was merged. Change subject: Remove db38 from x1 shard .. Remove db38 from x1 shard Change-Id: Ib8ac9dbb0748c520c1fe51c2f45a1d7683ed05be --- M manifests/role/coredb.pp M manifests/site.pp 2 files changed, 2 insertions(+), 7 deletions(-) Approvals: Springle: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/coredb.pp b/manifests/role/coredb.pp index ad280cf..0c0a066 100644 --- a/manifests/role/coredb.pp +++ b/manifests/role/coredb.pp @@ -65,10 +65,10 @@ 'no_master' = [ 'db1007', 'db1041' ] }, 'x1' = { - 'hosts' = { 'pmtpa' = [ 'db38' ], + 'hosts' = { 'eqiad' = [ 'db1029', 'db1030', 'db1031' ] }, 'primary_site' = $::mw_primary, - 'masters' = { 'pmtpa' = 'db38', 'eqiad' = 'db1029' }, + 'masters' = { 'eqiad' = 'db1029' }, 'snapshot' = [ 'db1031' ], 'no_master' = [] }, diff --git a/manifests/site.pp b/manifests/site.pp index 5ad9e51..a965d2b 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -618,11 +618,6 @@ } } -## x1 shard -node /^db(38)\.pmtpa\.wmnet/ { -include role::coredb::x1 -} - ## m1 shard (new) node /^db(35)\.pmtpa\.wmnet/ { class { 'role::coredb::m1': -- To view, visit https://gerrit.wikimedia.org/r/126202 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib8ac9dbb0748c520c1fe51c2f45a1d7683ed05be Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Springle sprin...@wikimedia.org Gerrit-Reviewer: Springle sprin...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove db48 and db49 from OTRS mail duties. db49 is decommis... - change (operations/puppet)
Springle has uploaded a new change for review. https://gerrit.wikimedia.org/r/126203 Change subject: Remove db48 and db49 from OTRS mail duties. db49 is decommissioned already so hasn't worked as a secondary for a while. .. Remove db48 and db49 from OTRS mail duties. db49 is decommissioned already so hasn't worked as a secondary for a while. Change-Id: I6a903ca4a2a42b384cba1e53efe462e7f3dd28f2 --- M templates/exim/exim4.conf.SMTP_IMAP_MM.erb 1 file changed, 2 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/03/126203/1 diff --git a/templates/exim/exim4.conf.SMTP_IMAP_MM.erb b/templates/exim/exim4.conf.SMTP_IMAP_MM.erb index d90246b..71e4ff0 100644 --- a/templates/exim/exim4.conf.SMTP_IMAP_MM.erb +++ b/templates/exim/exim4.conf.SMTP_IMAP_MM.erb @@ -1,5 +1,5 @@ # -### THIS FILE IS MANAGED BY PUPPET +### THIS FILE IS MANAGED BY PUPPET ### puppet:///templates/exim/exim4.conf.SMTP_IMAP_MM.erb # @@ -9,7 +9,7 @@ # (Not all will be used) CONFDIR=/etc/exim4 -WIKI_INTERFACE=; 208.80.152.133 ; 91.198.174.5 ; 2620:0:862:1::25:1 +WIKI_INTERFACE=; 208.80.152.133 ; 91.198.174.5 ; 2620:0:862:1::25:1 USERDB=/var/vmaildb/user.db VMAIL=/var/vmail DELIVER=/usr/lib/dovecot/deliver @@ -34,11 +34,7 @@ % if enable_mail_relay == primary or enable_otrs_server == true then -% # MySQL lookups (OTRS) -% if site == eqiad -% hide mysql_servers = db1048.eqiad.wmnet/otrs/exim/%= scope.lookupvar('exim::smtp::otrs_mysql_password') % : db1046.eqiad.wmnet/otrs/exim/%= scope.lookupvar('exim::smtp::otrs_mysql_password') % -% else -% -hide mysql_servers = db48.pmtpa.wmnet/otrs/exim/%= scope.lookupvar('exim::smtp::otrs_mysql_password') % : db49.pmtpa.wmnet/otrs/exim/%= scope.lookupvar('exim::smtp::otrs_mysql_password') % -% end -% % end -% % if enable_mail_relay == primary then -% -- To view, visit https://gerrit.wikimedia.org/r/126203 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6a903ca4a2a42b384cba1e53efe462e7f3dd28f2 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Springle sprin...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] bugzilla, make Apache SSL CipherSuite configurable - change (operations/puppet)
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/126204 Change subject: bugzilla,make Apache SSL CipherSuite configurable .. bugzilla,make Apache SSL CipherSuite configurable instead of setting it in the template multiple times. to make it easier to change this. it might change more often and then i just want to touch it in a single place. change of the cipher suite options coming up separately on top of this Change-Id: Ia6dddb22475b88e516a790bc18b4ef42636f0b49 --- M manifests/role/bugzilla.pp M modules/bugzilla/manifests/apache.pp M modules/bugzilla/manifests/init.pp M modules/bugzilla/templates/apache/bugzilla.wikimedia.org.erb 4 files changed, 6 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/04/126204/1 diff --git a/manifests/role/bugzilla.pp b/manifests/role/bugzilla.pp index be0ef22..672622b 100644 --- a/manifests/role/bugzilla.pp +++ b/manifests/role/bugzilla.pp @@ -1,5 +1,5 @@ # manifests/role/bugzilla.pp - +# role for a Bugzilla server class role::bugzilla { system::role { 'role::bugzilla': description = 'Bugzilla server' } diff --git a/modules/bugzilla/manifests/apache.pp b/modules/bugzilla/manifests/apache.pp index 4036af0..7f68b70 100644 --- a/modules/bugzilla/manifests/apache.pp +++ b/modules/bugzilla/manifests/apache.pp @@ -1,7 +1,7 @@ # this class sets up the Apache site config and SSL certs # for a Wikimedia Bugzilla installation # it expects {'webserver::php5': ssl = true; } on the node -class bugzilla::apache ($svc_name, $attach_svc_name, $docroot){ +class bugzilla::apache ($svc_name, $attach_svc_name, $docroot, $cipher_suite){ # separate cert and ServerName for attachments for security install_certificate{ $svc_name: } diff --git a/modules/bugzilla/manifests/init.pp b/modules/bugzilla/manifests/init.pp index 89f6f40..309e145 100644 --- a/modules/bugzilla/manifests/init.pp +++ b/modules/bugzilla/manifests/init.pp @@ -53,6 +53,7 @@ svc_name= 'bugzilla.wikimedia.org', attach_svc_name = 'bug-attachment.wikimedia.org', docroot = '/srv/org/wikimedia/bugzilla/', +cipher_suite= 'AES128-GCM-SHA256:RC4-SHA:RC4-MD5:DES-CBC3-SHA:AES128-SHA:AES256-SHA', } # Perl modules needed by Bugzilla diff --git a/modules/bugzilla/templates/apache/bugzilla.wikimedia.org.erb b/modules/bugzilla/templates/apache/bugzilla.wikimedia.org.erb index 43e43ae..9f8d012 100644 --- a/modules/bugzilla/templates/apache/bugzilla.wikimedia.org.erb +++ b/modules/bugzilla/templates/apache/bugzilla.wikimedia.org.erb @@ -50,7 +50,7 @@ Redirect permanent / https://%= scope.lookupvar('bugzilla::apache::svc_name') %/ SSLEngine On SSLProtocol -ALL +SSLv3 +TLSv1 - SSLCipherSuite AES128-GCM-SHA256:RC4-SHA:RC4-MD5:DES-CBC3-SHA:AES128-SHA:AES256-SHA + SSLCipherSuite %= scope.lookupvar('bugzilla::apache::cipher_suite') % SSLHonorCipherOrder on SSLCertificateFile /etc/ssl/certs/%= scope.lookupvar('bugzilla::apache::svc_name') %.pem SSLCertificateKeyFile /etc/ssl/private/%= scope.lookupvar('bugzilla::apache::svc_name') %.key @@ -66,7 +66,7 @@ DocumentRoot %= scope.lookupvar('bugzilla::apache::docroot') % SSLEngine On SSLProtocol -ALL +SSLv3 +TLSv1 - SSLCipherSuite AES128-GCM-SHA256:RC4-SHA:RC4-MD5:DES-CBC3-SHA:AES128-SHA:AES256-SHA + SSLCipherSuite %= scope.lookupvar('bugzilla::apache::cipher_suite') % SSLHonorCipherOrder on SSLCertificateFile /etc/ssl/certs/%= scope.lookupvar('bugzilla::apache::svc_name') %.pem SSLCertificateKeyFile /etc/ssl/private/%= scope.lookupvar('bugzilla::apache::svc_name') %.key @@ -179,7 +179,7 @@ DocumentRoot %= scope.lookupvar('bugzilla::apache::docroot') % SSLEngine On SSLProtocol -ALL +SSLv3 +TLSv1 - SSLCipherSuite AES128-GCM-SHA256:RC4-SHA:RC4-MD5:DES-CBC3-SHA:AES128-SHA:AES256-SHA + SSLCipherSuite %= scope.lookupvar('bugzilla::apache::cipher_suite') % SSLHonorCipherOrder on SSLCertificateFile /etc/ssl/certs/%= scope.lookupvar('bugzilla::apache::attach_svc_name') %.pem SSLCertificateKeyFile /etc/ssl/private/%= scope.lookupvar('bugzilla::apache::attach_svc_name') %.key -- To view, visit https://gerrit.wikimedia.org/r/126204 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia6dddb22475b88e516a790bc18b4ef42636f0b49 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn dz...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] bugzilla, use SSLProtocol ALL -SSLv2 - change (operations/puppet)
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/126206 Change subject: bugzilla, use SSLProtocol ALL -SSLv2 .. bugzilla, use SSLProtocol ALL -SSLv2 instead of disabling ALL and enabling SSLv3 and TLSv1, enable ALL and disable SSLv2 - SSLProtocol -ALL +SSLv3 +TLSv1 + SSLProtocol ALL -SSLv2 because we want to allow newer ciphers and Mozilla recommends it but is it really better to exclude things instead of including them Change-Id: Ibfcc19a32016ff3a74b73ae633d31cdc18a4ba30 --- M modules/bugzilla/templates/apache/bugzilla.wikimedia.org.erb 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/06/126206/1 diff --git a/modules/bugzilla/templates/apache/bugzilla.wikimedia.org.erb b/modules/bugzilla/templates/apache/bugzilla.wikimedia.org.erb index 9f8d012..b51aeb2 100644 --- a/modules/bugzilla/templates/apache/bugzilla.wikimedia.org.erb +++ b/modules/bugzilla/templates/apache/bugzilla.wikimedia.org.erb @@ -49,7 +49,7 @@ ServerName bugs.wikimedia.org Redirect permanent / https://%= scope.lookupvar('bugzilla::apache::svc_name') %/ SSLEngine On - SSLProtocol -ALL +SSLv3 +TLSv1 + SSLProtocol ALL -SSLv2 SSLCipherSuite %= scope.lookupvar('bugzilla::apache::cipher_suite') % SSLHonorCipherOrder on SSLCertificateFile /etc/ssl/certs/%= scope.lookupvar('bugzilla::apache::svc_name') %.pem @@ -65,7 +65,7 @@ ServerName %= scope.lookupvar('bugzilla::apache::svc_name') % DocumentRoot %= scope.lookupvar('bugzilla::apache::docroot') % SSLEngine On - SSLProtocol -ALL +SSLv3 +TLSv1 + SSLProtocol ALL -SSLv2 SSLCipherSuite %= scope.lookupvar('bugzilla::apache::cipher_suite') % SSLHonorCipherOrder on SSLCertificateFile /etc/ssl/certs/%= scope.lookupvar('bugzilla::apache::svc_name') %.pem @@ -178,7 +178,7 @@ ServerName %= scope.lookupvar('bugzilla::apache::attach_svc_name') % DocumentRoot %= scope.lookupvar('bugzilla::apache::docroot') % SSLEngine On - SSLProtocol -ALL +SSLv3 +TLSv1 + SSLProtocol ALL -SSLv2 SSLCipherSuite %= scope.lookupvar('bugzilla::apache::cipher_suite') % SSLHonorCipherOrder on SSLCertificateFile /etc/ssl/certs/%= scope.lookupvar('bugzilla::apache::attach_svc_name') %.pem -- To view, visit https://gerrit.wikimedia.org/r/126206 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibfcc19a32016ff3a74b73ae633d31cdc18a4ba30 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn dz...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] bugzilla, use better SSL cipher suite - change (operations/puppet)
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/126205 Change subject: bugzilla, use better SSL cipher suite .. bugzilla, use better SSL cipher suite I want to fix / SSLLabs said: RC4 cipher is used with TLS 1.1 or newer protocols, even though stronger ciphers are available. RT #6763 RT #7281 bug 53259 The server does not support Forward Secrecy with the reference browsers. Mozilla says: The general purpose ciphersuite at the time of this writing is: .. what i used below .. If your version of OpenSSL is old, unavailable ciphers will be discarded automatically. Always use the full ciphersuite above and let OpenSSL pick the ones it supports. - ECDHE+AESGCM ciphers are selected first. These are TLS 1.2 ciphers and not widely supported at the moment. No known attack currently target these ciphers. - PFS ciphersuites are preferred, with ECDHE first, then DHE. AES 128 is preferred to AES 256 AES is preferred to RC4. BEAST attacks on AES are mitigated in TLS 1.1 and above, and difficult to achieve in TLS 1.0. In comparison, attacks on RC4 are not mitigated and likely to become more and more dangerous. RC4 is on the path to removal, but still present for backward compatibiliy from: https://wiki.mozilla.org/Security/Server_Side_TLS Chris Steipp says: I'd definitely be up for trying Mozilla's recommended ciphersuite I'd expect to see 5-10% overhead, but it would be great to get real numbers. PFS is preferred, and rc4 is discouraged (but preferred over 3des, which has horrible performance), so overall load will definitely increase, just how much depends on what kinds of browsers hit the server. zirconium says: Error in cipher list 140707153184416:error:140E6118:SSL routines:SSL_CIPHER_PROCESS_RULESTR:invalid command:ssl_ciph.c:1167: :p Change-Id: I7e9adc182dc16b70fab1871d1400018a80f71769 --- M modules/bugzilla/manifests/init.pp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/05/126205/1 diff --git a/modules/bugzilla/manifests/init.pp b/modules/bugzilla/manifests/init.pp index 309e145..58bb681 100644 --- a/modules/bugzilla/manifests/init.pp +++ b/modules/bugzilla/manifests/init.pp @@ -53,7 +53,7 @@ svc_name= 'bugzilla.wikimedia.org', attach_svc_name = 'bug-attachment.wikimedia.org', docroot = '/srv/org/wikimedia/bugzilla/', -cipher_suite= 'AES128-GCM-SHA256:RC4-SHA:RC4-MD5:DES-CBC3-SHA:AES128-SHA:AES256-SHA', +cipher_suite= 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:ECDHE-RSA-RC4-SHA:ECDHE-ECDSA-RC4-SHA:AES128:AES256:RC4-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!3DES:!MD5:!PSK', } # Perl modules needed by Bugzilla -- To view, visit https://gerrit.wikimedia.org/r/126205 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7e9adc182dc16b70fab1871d1400018a80f71769 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn dz...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make sure ~vagrant/.gem is owned by vagrant:vagrant - change (mediawiki/vagrant)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/126207 Change subject: Make sure ~vagrant/.gem is owned by vagrant:vagrant .. Make sure ~vagrant/.gem is owned by vagrant:vagrant /etc/profile.d/gem-home.sh hard-codes '/home/vagrant'. If it happens to run as root, the directory created is also owned by root, and not writable by vagrant. Bug: 61285 Change-Id: Ib510b2e4d56574b25b3c7d1f3ead5585c50fc50d --- M puppet/modules/browsertests/manifests/init.pp M puppet/modules/misc/files/gem-home.sh 2 files changed, 17 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/07/126207/1 diff --git a/puppet/modules/browsertests/manifests/init.pp b/puppet/modules/browsertests/manifests/init.pp index a4b5dd4..1794fb6 100644 --- a/puppet/modules/browsertests/manifests/init.pp +++ b/puppet/modules/browsertests/manifests/init.pp @@ -69,18 +69,30 @@ ensure = present, } -exec { 'use ruby 1.9.1': +exec { 'use_ruby_1.9.1': command = 'update-alternatives --set ruby /usr/bin/ruby1.9.1', unless = 'readlink /etc/alternatives/ruby | grep 1.9', require = Package['ruby1.9.1-full', 'ruby-bundler'], } -exec { 'install browsertests bundle': +file { '/home/vagrant/.gem': +ensure= directory, +owner = 'vagrant', +group = 'vagrant', +mode = '0755', +recursive = true, +} + +exec { 'install_browsertests_bundle': command = 'bundle install --path /home/vagrant/.gem', cwd = '/srv/browsertests/tests/browser', user= 'vagrant', unless = 'bundle check', -require = [ Exec['use ruby 1.9.1'], Git::Clone['qa/browsertests'] ], timeout = 0, +require = [ +Exec['use_ruby_1.9.1'], +File['/home/vagrant/.gem'], +Git::Clone['qa/browsertests'] +], } } diff --git a/puppet/modules/misc/files/gem-home.sh b/puppet/modules/misc/files/gem-home.sh index 25bbdbf..8329d7a 100755 --- a/puppet/modules/misc/files/gem-home.sh +++ b/puppet/modules/misc/files/gem-home.sh @@ -1,6 +1,5 @@ # Set RubyGems's GEM_HOME to $HOME/.gem # This file is managed by Puppet. # -mkdir -p /home/vagrant/.gem -export GEM_HOME=/home/vagrant/.gem -export PATH=$PATH:$GEM_HOME/bin \ No newline at end of file +export GEM_HOME=$HOME/.gem +export PATH=$PATH:$GEM_HOME/bin -- To view, visit https://gerrit.wikimedia.org/r/126207 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib510b2e4d56574b25b3c7d1f3ead5585c50fc50d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: Ori.livneh o...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove a console debug statement added in I579c3ccb6e0c1ad - change (mediawiki...UniversalLanguageSelector)
jenkins-bot has submitted this change and it was merged. Change subject: Remove a console debug statement added in I579c3ccb6e0c1ad .. Remove a console debug statement added in I579c3ccb6e0c1ad Change-Id: Ifbbc9b8b3a643d38fd8874e23c1087e5ee431e80 --- M lib/jquery.webfonts.js 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: KartikMistry: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/jquery.webfonts.js b/lib/jquery.webfonts.js index 1fb59d4..c28df95 100644 --- a/lib/jquery.webfonts.js +++ b/lib/jquery.webfonts.js @@ -308,7 +308,6 @@ return item.replace( /[\s']/g, '' ); } ); fontFamily = fontFamily.replace( /[\s']/g, '' ); - console.log(fontFamily+':'+overridableFontFamilies); return $.inArray( fontFamily, overridableFontFamilies ) = 0; }, -- To view, visit https://gerrit.wikimedia.org/r/126199 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifbbc9b8b3a643d38fd8874e23c1087e5ee431e80 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com Gerrit-Reviewer: KartikMistry kartik.mis...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] remove pmtpa payments LVS monitoring - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: remove pmtpa payments LVS monitoring .. remove pmtpa payments LVS monitoring it had a FIXME. how close are we to this?. Change-Id: Ic29e2ed7049167c34da90e64f9a0e0bedc3f4acd --- M modules/lvs/manifests/monitor.pp 1 file changed, 0 insertions(+), 10 deletions(-) Approvals: Matanya: Looks good to me, but someone else must approve Jgreen: Looks good to me, but someone else must approve jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/modules/lvs/manifests/monitor.pp b/modules/lvs/manifests/monitor.pp index 3b1a499..290f5cc 100644 --- a/modules/lvs/manifests/monitor.pp +++ b/modules/lvs/manifests/monitor.pp @@ -22,16 +22,6 @@ lvs::monitor_service_custom { search-pool5.svc.eqiad.wmnet: ip_address = 10.2.2.16, port = 8123, description = LVS Lucene, check_command = check_lucene } lvs::monitor_service_custom { search-prefix.svc.eqiad.wmnet: ip_address = 10.2.2.15, port = 8123, description = LVS Lucene, check_command = check_lucene } -# PMTPA - -# FIXME: remove after pmtpa decommissioning -lvs::monitor_service_custom { payments.wikimedia.org: -ip_address = 208.80.155.5, -port = 443, -check_command = check_https_url!payments.wikimedia.org!/index.php/Special:SystemStatus, -retries = 20 -} - # EQIAD lvs::monitor_service_http_https { 'text-lb.eqiad.wikimedia.org': -- To view, visit https://gerrit.wikimedia.org/r/125715 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic29e2ed7049167c34da90e64f9a0e0bedc3f4acd Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn dz...@wikimedia.org Gerrit-Reviewer: ArielGlenn ar...@wikimedia.org Gerrit-Reviewer: Dzahn dz...@wikimedia.org Gerrit-Reviewer: Gage jger...@wikimedia.org Gerrit-Reviewer: Jgreen jgr...@wikimedia.org Gerrit-Reviewer: Matanya mata...@foss.co.il Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] beta: drop pmtpa instances from the natfix subclass - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: beta: drop pmtpa instances from the natfix subclass .. beta: drop pmtpa instances from the natfix subclass pmtpa instances have been phased out, there is no need to keep the iptables hack for them. Change-Id: I8abc7c560bedd7385c93b6905b61d98a580b8878 --- M modules/beta/manifests/natfix.pp 1 file changed, 0 insertions(+), 11 deletions(-) Approvals: Hashar: Verified; Looks good to me, but someone else must approve jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/modules/beta/manifests/natfix.pp b/modules/beta/manifests/natfix.pp index 4680dd9..9dd749b 100644 --- a/modules/beta/manifests/natfix.pp +++ b/modules/beta/manifests/natfix.pp @@ -19,17 +19,6 @@ # the web interface :-D # $nat_mappings = { -# pmtpa -'deployment-cache-text1'= {public_ip = '208.80.153.219', -private_ip = '10.4.1.133' }, -'deployment-cache-upload04' = {public_ip = '208.80.153.242', -private_ip = '10.4.0.211' }, -'deployment-cache-bits03' = {public_ip = '208.80.153.243', -private_ip = '10.4.0.51' }, -'deployment-eventlogging' = {public_ip = '208.80.153.244', -private_ip = '10.4.0.48' }, -'deployment-cache-mobile01' = {public_ip = '208.80.153.143', -private_ip = '10.4.1.82' }, # eqiad 'deployment-cache-text02' = {public_ip = '208.80.155.135', private_ip = '10.68.16.16' }, -- To view, visit https://gerrit.wikimedia.org/r/125194 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8abc7c560bedd7385c93b6905b61d98a580b8878 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Hashar has...@free.fr Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org Gerrit-Reviewer: Andrew Bogott abog...@wikimedia.org Gerrit-Reviewer: Dzahn dz...@wikimedia.org Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: coren mpellet...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] timeout submit_check_result, see rt #5311 - change (operations/puppet)
ArielGlenn has uploaded a new change for review. https://gerrit.wikimedia.org/r/126209 Change subject: timeout submit_check_result, see rt #5311 .. timeout submit_check_result, see rt #5311 Change-Id: I68d1d56e43ace3d446b69d78b12de7311afbf626 --- M files/snmp/snmptt.conf M files/snmp/snmptt.conf.icinga 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/09/126209/1 diff --git a/files/snmp/snmptt.conf b/files/snmp/snmptt.conf index 2e0f908..5355efe 100644 --- a/files/snmp/snmptt.conf +++ b/files/snmp/snmptt.conf @@ -1,7 +1,7 @@ # wikimedia puppet exec event EVENT enterpriseSpecific .1.3.6.1.4.1.33298.0.1004 Status Events Normal FORMAT Exec of puppet event from $r. -EXEC /usr/local/nagios/libexec/eventhandlers/submit_check_result $r Puppet freshness 0 puppet ran at `date` +EXEC /usr/bin/timeout -s 9 30s /usr/local/nagios/libexec/eventhandlers/submit_check_result $r Puppet freshness 0 puppet ran at `date` SDESC snmp trap that's sent whenever puppet runs on a wikimedia host. EDESC diff --git a/files/snmp/snmptt.conf.icinga b/files/snmp/snmptt.conf.icinga index a32ed89..61762ad 100644 --- a/files/snmp/snmptt.conf.icinga +++ b/files/snmp/snmptt.conf.icinga @@ -1,7 +1,7 @@ # wikimedia puppet exec event EVENT enterpriseSpecific .1.3.6.1.4.1.33298.0.1004 Status Events Normal FORMAT Exec of puppet event from $r. -EXEC /usr/lib/nagios/plugins/eventhandlers/submit_check_result $r Puppet freshness 0 puppet ran at `date` +EXEC /usr/bin/timeout -s 9 30s /usr/lib/nagios/plugins/eventhandlers/submit_check_result $r Puppet freshness 0 puppet ran at `date` SDESC snmp trap that's sent whenever puppet runs on a wikimedia host. EDESC -- To view, visit https://gerrit.wikimedia.org/r/126209 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I68d1d56e43ace3d446b69d78b12de7311afbf626 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: ArielGlenn ar...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added support for CDN-only thumbnail storage - change (mediawiki/core)
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/126210 Change subject: Added support for CDN-only thumbnail storage .. Added support for CDN-only thumbnail storage Change-Id: I10f772c678fa2c4b2fb99e9136e2a0cfd3d249a9 --- M includes/DefaultSettings.php M includes/filerepo/FileRepo.php M includes/filerepo/file/File.php M includes/filerepo/file/LocalFile.php 4 files changed, 63 insertions(+), 19 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/10/126210/1 diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 663098f..79fbf7d 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -417,6 +417,10 @@ * - thumbScriptUrl The URL for thumb.php (optional, not recommended) * - transformVia404 Whether to skip media file transformation on parse and rely on a 404 * handler instead. + * - cdnThumbnailsDo not store thumbnails in the backend. This assumes that any CDN + * cache collates all thumbnails for a file under the directory for + * thumbnails for that file. PURGE requests are sent to that directory. + * This only has an effect if transformVia404 is also enabled. * - initialCapital Equivalent to $wgCapitalLinks (or $wgCapitalLinkOverrides[NS_FILE], * determines whether filenames implicitly start with a capital letter. * The current implementation may give incorrect description page links diff --git a/includes/filerepo/FileRepo.php b/includes/filerepo/FileRepo.php index 888af37..e702567 100644 --- a/includes/filerepo/FileRepo.php +++ b/includes/filerepo/FileRepo.php @@ -111,6 +111,9 @@ */ protected $abbrvThreshold; + /** @var bool Whether thumbnails are stored CDN only and collated by source file name */ + protected $cdnThumbnails = false; + /** @var string The URL of the repo's favicon, if any */ protected $favicon; @@ -150,7 +153,7 @@ $optionalSettings = array( 'descBaseUrl', 'scriptDirUrl', 'articleUrl', 'fetchDescription', 'thumbScriptUrl', 'pathDisclosureProtection', 'descriptionCacheExpiry', - 'scriptExtension', 'favicon' + 'scriptExtension', 'favicon', 'cdnThumbnails' ); foreach ( $optionalSettings as $var ) { if ( isset( $info[$var] ) ) { @@ -628,6 +631,18 @@ } /** +* Returns true if the repository relies only on CDN for thumbnail storage +* +* CDN-only storage requires that a cache PURGE request to the parent +* directory of thumbnails for a file results in purging all such thumbnails +* +* @return bool +*/ + public function cdnThumbnails() { + return $this-cdnThumbnails; + } + + /** * Get the name of a file from its title object * * @param Title $title diff --git a/includes/filerepo/file/File.php b/includes/filerepo/file/File.php index 21ff65c..741a35d 100644 --- a/includes/filerepo/file/File.php +++ b/includes/filerepo/file/File.php @@ -993,7 +993,9 @@ $this-migrateThumbFile( $thumbName ); // Check if an up-to-date thumbnail already exists... wfDebug( __METHOD__ . : Doing stat for $thumbPath\n ); - if ( !( $flags self::RENDER_FORCE ) $this-repo-fileExists( $thumbPath ) ) { + if ( !( $flags self::RENDER_FORCE ) !$this-repo-cdnThumbnails() +$this-repo-fileExists( $thumbPath ) + ) { $timestamp = $this-repo-getFileTimestamp( $thumbPath ); if ( $timestamp !== false $timestamp = $wgThumbnailEpoch ) { // XXX: Pass in the storage path even though we are not rendering anything @@ -1010,7 +1012,7 @@ // If the backend is ready-only, don't keep generating thumbnails // only to return transformation errors, just return the error now. - if ( $this-repo-getReadOnlyReason() !== false ) { + if ( !$this-repo-cdnThumbnails() $this-repo-getReadOnlyReason() !== false ) { $thumb = $this-transformErrorOutput( $thumbPath, $thumbUrl, $params, $flags ); break; } @@ -1039,13 +1041,16 @@ $thumb = $handler-getTransform( $this, $tmpThumbPath, $thumbUrl,
[MediaWiki-commits] [Gerrit] beta: adjust protoproxy for eqiad - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: beta: adjust protoproxy for eqiad .. beta: adjust protoproxy for eqiad To be applied on all beta cluster varnish caches. Bug: 63538 Change-Id: I23ffc46af40d3372a3577f16b3d741056c3bf20c --- M manifests/role/protoproxy.pp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/manifests/role/protoproxy.pp b/manifests/role/protoproxy.pp index 8af6b3b..3c1a33f 100644 --- a/manifests/role/protoproxy.pp +++ b/manifests/role/protoproxy.pp @@ -333,7 +333,7 @@ proxy_server_cert_name = 'star.wmflabs.org', proxy_backend = { # send all traffic to the local cache -'pmtpa' = { 'primary' = '127.0.0.1' } +'eqiad' = { 'primary' = '127.0.0.1' } }, ipv6_enabled = false, enabled = true, -- To view, visit https://gerrit.wikimedia.org/r/124057 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I23ffc46af40d3372a3577f16b3d741056c3bf20c Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Hashar has...@free.fr Gerrit-Reviewer: Dzahn dz...@wikimedia.org Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: Matanya mata...@foss.co.il Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] misc/dsh.pp: retab and almost pass puppet lint - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: misc/dsh.pp: retab and almost pass puppet lint .. misc/dsh.pp: retab and almost pass puppet lint Change-Id: I692e125c8236ce29ec54cba80eefd61034f6d21f --- M manifests/misc/dsh.pp 1 file changed, 37 insertions(+), 31 deletions(-) Approvals: Matanya: Looks good to me, but someone else must approve jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/manifests/misc/dsh.pp b/manifests/misc/dsh.pp index 8d5cd73..b4f9bbb 100644 --- a/manifests/misc/dsh.pp +++ b/manifests/misc/dsh.pp @@ -1,39 +1,45 @@ +# == Class misc::dsh +# # Standard installation of dsh (Dancer's distributed shell) - +# class misc::dsh { - package { dsh: - ensure = present - } - include files - - class files { - file { - /etc/dsh: - ensure = directory, - owner = root, - group = root, - mode = 0444; - /etc/dsh/group: - owner = root, - group = root, - mode = 0444, - source = puppet:///files/dsh/group, - recurse = true; - /etc/dsh/dsh.conf: - owner = root, - group = root, - mode = 0444, - source = puppet:///files/dsh/dsh.conf; - } - } +package { 'dsh': +ensure = present, +} +include files + +class files { +file { '/etc/dsh': +ensure = directory, +owner = 'root', +group = 'root', +mode = '0444', +} +file { '/etc/dsh/group': +owner = 'root', +group = 'root', +mode= '0444', +source = 'puppet:///files/dsh/group', +recurse = true, +} +file { '/etc/dsh/dsh.conf': +owner = 'root', +group = 'root', +mode = '0444', +source = 'puppet:///files/dsh/dsh.conf', +} +} } +# == Define dsh_groups +# # Checks that this host belongs to dsh group(s) +# define dsh_groups( $groups = [] ) { - $groups_string = join( $groups, ' ' ) +$groups_string = join( $groups, ' ' ) - monitor_service { dsh: - description = 'dsh groups', - check_command = check_dsh_groups!$groups_string, - } +monitor_service { 'dsh': +description = 'dsh groups', +check_command = check_dsh_groups!${groups_string}, +} } -- To view, visit https://gerrit.wikimedia.org/r/122789 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I692e125c8236ce29ec54cba80eefd61034f6d21f Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Hashar has...@free.fr Gerrit-Reviewer: Dzahn dz...@wikimedia.org Gerrit-Reviewer: Matanya mata...@foss.co.il Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] role::beta::uploadservice to allow port 80 - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: role::beta::uploadservice to allow port 80 .. role::beta::uploadservice to allow port 80 The deployment-upload instance is a hack. We have the role::beta::natfix rule applied, since ferm default to drop we have to accept port 80 explicitly. Change-Id: I60438ddb004034249220ecc2777bc4749f321251 --- M manifests/role/beta.pp 1 file changed, 15 insertions(+), 0 deletions(-) Approvals: Hashar: Verified; Looks good to me, but someone else must approve jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/manifests/role/beta.pp b/manifests/role/beta.pp index 68ba167..3307ac8 100644 --- a/manifests/role/beta.pp +++ b/manifests/role/beta.pp @@ -16,6 +16,21 @@ } +# To be applied on deployment-upload.eqiad.wmflabs +# Queried by Varnish upload cache whenever we need to serve thumbnails +# There is a hacked nginx on it and a php5 cgi service +class role::beta::uploadservice { + +system::role { 'role::beta::uploadservice': +description = 'Upload/thumbs backend used by Varnish' +} + +ferm::rule { 'allow_http': +rule = 'proto tcp dport http ACCEPT;' +} + +} + # Should be applied on any instance that needs to access DNS entries pointing # back to the beta cluster. This should be applied at a minimum on any instance # running MediaWiki. -- To view, visit https://gerrit.wikimedia.org/r/122786 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I60438ddb004034249220ecc2777bc4749f321251 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Hashar has...@free.fr Gerrit-Reviewer: ArielGlenn ar...@wikimedia.org Gerrit-Reviewer: Dzahn dz...@wikimedia.org Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] admins::jenkins sort account list - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: admins::jenkins sort account list .. admins::jenkins sort account list Change-Id: I153df9b41767ddcd7dfc26dd6d7e62e943da9f02 --- M manifests/admins.pp 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/manifests/admins.pp b/manifests/admins.pp index 601384e..b4b8812 100644 --- a/manifests/admins.pp +++ b/manifests/admins.pp @@ -3822,14 +3822,14 @@ include groups::wikidev include jenkins::group +include accounts::aaron +include accounts::csteipp include accounts::demon include accounts::dsc #account disabled include accounts::hashar include accounts::krinkle -include accounts::reedy include accounts::mholmquist -include accounts::csteipp -include accounts::aaron +include accounts::reedy } class admins::dctech { -- To view, visit https://gerrit.wikimedia.org/r/126154 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I153df9b41767ddcd7dfc26dd6d7e62e943da9f02 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Hashar has...@free.fr Gerrit-Reviewer: BryanDavis bda...@wikimedia.org Gerrit-Reviewer: Dzahn dz...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix quotation marks - change (mediawiki...Wikibase)
Adrian Lang has uploaded a new change for review. https://gerrit.wikimedia.org/r/126211 Change subject: Fix quotation marks .. Fix quotation marks Change-Id: Id21ded8662a422cd40c67bbc89300f328d4dd66d --- M client/includes/LangLinkHandler.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/11/126211/1 diff --git a/client/includes/LangLinkHandler.php b/client/includes/LangLinkHandler.php index 9709bfc..ef78497 100644 --- a/client/includes/LangLinkHandler.php +++ b/client/includes/LangLinkHandler.php @@ -79,8 +79,8 @@ */ public function getEntityLinks( Title $title ) { wfProfileIn( __METHOD__ ); - wfDebugLog( __CLASS__, __FUNCTION__ . : Looking for sitelinks defined by the ' - . 'corresponding item on the wikibase repo. ); + wfDebugLog( __CLASS__, __FUNCTION__ . : Looking for sitelinks defined by the + . corresponding item on the wikibase repo. ); $links = array(); -- To view, visit https://gerrit.wikimedia.org/r/126211 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id21ded8662a422cd40c67bbc89300f328d4dd66d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Adrian Lang adrian.l...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix quotation marks - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Fix quotation marks .. Fix quotation marks Change-Id: Id21ded8662a422cd40c67bbc89300f328d4dd66d --- M client/includes/LangLinkHandler.php 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/client/includes/LangLinkHandler.php b/client/includes/LangLinkHandler.php index 9709bfc..ef78497 100644 --- a/client/includes/LangLinkHandler.php +++ b/client/includes/LangLinkHandler.php @@ -79,8 +79,8 @@ */ public function getEntityLinks( Title $title ) { wfProfileIn( __METHOD__ ); - wfDebugLog( __CLASS__, __FUNCTION__ . : Looking for sitelinks defined by the ' - . 'corresponding item on the wikibase repo. ); + wfDebugLog( __CLASS__, __FUNCTION__ . : Looking for sitelinks defined by the + . corresponding item on the wikibase repo. ); $links = array(); -- To view, visit https://gerrit.wikimedia.org/r/126211 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id21ded8662a422cd40c67bbc89300f328d4dd66d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Adrian Lang adrian.l...@wikimedia.de Gerrit-Reviewer: Siebrand siebr...@kitano.nl Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix debug log format, expand var in debug log entry - change (mediawiki...Wikibase)
Adrian Lang has uploaded a new change for review. https://gerrit.wikimedia.org/r/126212 Change subject: Fix debug log format, expand var in debug log entry .. Fix debug log format, expand var in debug log entry Change-Id: Ie5bfaafbb72136cce914854ada1d44e483a43e45 --- M client/includes/EntityIdPropertyUpdater.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/12/126212/1 diff --git a/client/includes/EntityIdPropertyUpdater.php b/client/includes/EntityIdPropertyUpdater.php index 13d38db..f3ca879 100644 --- a/client/includes/EntityIdPropertyUpdater.php +++ b/client/includes/EntityIdPropertyUpdater.php @@ -58,9 +58,9 @@ // unset property, if it was set $this-unsetProperty( $out, 'wikibase_item' ); - wfDebugLog( __CLASS__, __FUNCTION__ . 'Trying to set wikibase_item property for ' + wfDebugLog( __CLASS__, __FUNCTION__ . ': Trying to set wikibase_item property for ' . $siteLink-getSiteId() . ':' . $siteLink-getPageName() - . ' but $itemId is not an EntityId object.' ); + . but $itemId is not an EntityId object. ); } } -- To view, visit https://gerrit.wikimedia.org/r/126212 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie5bfaafbb72136cce914854ada1d44e483a43e45 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Adrian Lang adrian.l...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Initial commit of pmacct module and role - change (operations/puppet)
Mark Bergsma has submitted this change and it was merged. Change subject: Initial commit of pmacct module and role .. Initial commit of pmacct module and role fix indent spacing, set proper role name Change-Id: I44f02a7911ac8f596f78ea0a6ae5a61c72e75e5c --- A manifests/role/pmacct.pp A modules/pmacct/README.md A modules/pmacct/manifests/configs.pp A modules/pmacct/manifests/init.pp A modules/pmacct/manifests/install.pp A modules/pmacct/mysqlschema.example A modules/pmacct/templates/config.erb 7 files changed, 342 insertions(+), 0 deletions(-) Approvals: Mark Bergsma: Looks good to me, approved jenkins-bot: Verified Dzahn: Looks good to me, but someone else must approve diff --git a/manifests/role/pmacct.pp b/manifests/role/pmacct.pp new file mode 100644 index 000..fd47b77 --- /dev/null +++ b/manifests/role/pmacct.pp @@ -0,0 +1,106 @@ +# modules/pmacct/configuration.pp +# Defines specific agent configuration for pmacct + +class role::pmacct { +system::role { 'role::pmacct': +description = '(network monitoring) flow accounting '} + +# Behave differently in labs from production +case $::realm { +'labs': { +# Database connectivity +$pmacct_database = { +host = '127.0.01', +name = 'pmacct', +user = 'pmacct', +pass = 'pmacct', +} + +# Agent definitions +$pmacct_agents = { +# tpa - as65001 +cr1-sdtpa = { +port = '6001', +ip = '208.80.152.196', +samplerate = '200', +}, +testing = { +port = '12333', +ip = '123.123.123.123', +samplerate = '123', +}, +} # end of agents +} +'production': { +# Database connectivity (placeholder) +$pmacct_database = { +host = '127.0.01', +name = 'pmacct', +user = 'pmacct', +pass = 'pmacct', +} + +# Agent definitions +$pmacct_agents = { +# tpa - as65001 +cr1-sdtpa = { +port = '6511', +ip = '208.80.152.196', +samplerate = '200', +}, +# Currently running old JunOS and will not sample correctly +#cr2-pmtpa = { +#port = '6512', +#ip = '208.80.152.197', +#samplerate = '1000', +#}, + +# eqiad - as65002 +cr1-eqiad = { +port = '6521', +ip = '208.80.154.196', +samplerate = '1000', +}, +cr2-eqiad = { +port = '6522', +ip = '208.80.154.197', +samplerate = '1000', +}, + +# ulsfo - as65003 +cr1-ulsfo = { +port = '6531', +ip = '198.35.26.192', +samplerate = '1000', +}, +cr2-ulsfo = { +port = '6532', +ip = '198.35.26.193', +samplerate = '1000', +}, + +# ams - as43821 +cr1-esams = { +port = '4381', +ip = '91.198.174.245', +samplerate = '1000', +}, +cr2-knams = { +port = '4382', +ip = '91.198.174.246', +samplerate = '1000', +} +} # end of agents + +} +default: { +fail('unknown realm, should be labs or production') +} +} + +# the 'pmacct' class from modules/pmacct/init.pp does the setup +class {'::pmacct': +pmacct_database = $pmacct_database, +pmacct_agents = $pmacct_agents, +} +} diff --git a/modules/pmacct/README.md b/modules/pmacct/README.md new file mode 100644 index 000..38f37ff --- /dev/null +++ b/modules/pmacct/README.md @@ -0,0 +1,6 @@ +This module installs pmacct with a mysql backend + +An example of the necessary mysql schema can be found at mysqlschema.example + +Author: Joel Krauska + diff --git a/modules/pmacct/manifests/configs.pp b/modules/pmacct/manifests/configs.pp new file mode 100644 index 000..02c4b9e --- /dev/null +++ b/modules/pmacct/manifests/configs.pp @@ -0,0 +1,30 @@ +# pmacct::makeconfig +# Generates a unique config file per device and pretag file. +
[MediaWiki-commits] [Gerrit] create a new WikidataBot class for cacheSources() and getSou... - change (pywikibot/core)
Ricordisamoa has uploaded a new change for review. https://gerrit.wikimedia.org/r/126213 Change subject: create a new WikidataBot class for cacheSources() and getSource() for claimit.py, coordinate_import.py and harvest_template.py .. create a new WikidataBot class for cacheSources() and getSource() for claimit.py, coordinate_import.py and harvest_template.py bug: 62438 this also allows for non-Wikipedia sources in claimit.py and coordinate_import.py as with change I29df011b82fd8687d4c38def62d0c0ea3a1b7994 bug: 62991 Change-Id: Ic05987911f0878d42a06cf5af842134bd9d615e8 --- M pywikibot/bot.py M scripts/claimit.py M scripts/coordinate_import.py M scripts/harvest_template.py 4 files changed, 45 insertions(+), 85 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/13/126213/1 diff --git a/pywikibot/bot.py b/pywikibot/bot.py index 3aa8189..7beda63 100644 --- a/pywikibot/bot.py +++ b/pywikibot/bot.py @@ -21,6 +21,7 @@ import os.path import sys import re +import json _logger = bot @@ -815,3 +816,32 @@ if choice != 'n': page.put(newtext, async=(choice == 'a')) + + +class WikidataBot: + +Generic Wikidata Bot to be subclassed +used in claimit.py, coordinate_import.py and harvest_template.py + + +def cacheSources(self): + +Fetches the sources from the onwiki list +and stores it internally + +page = pywikibot.Page(self.repo, u'List of wikis/python', ns=4) +self.source_values = json.loads(page.get()) +for family_code, family in self.source_values.iteritems(): +for source_lang in family: +self.source_values[family_code][source_lang] = pywikibot.ItemPage(self.repo, + family[source_lang]) + +def getSource(self, site): + +Get the source for the specified site, +if possible + +if site.family.name in self.source_values and site.code in self.source_values[site.family.name]: +source = pywikibot.Claim(self.repo, 'P143') + source.setTarget(self.source_values.get(site.family.name).get(site.code)) +return source diff --git a/scripts/claimit.py b/scripts/claimit.py index db8ff17..64beeb2 100755 --- a/scripts/claimit.py +++ b/scripts/claimit.py @@ -50,19 +50,18 @@ # # (C) Legoktm, 2013 -# (C) Pywikibot team, 2013 +# (C) Pywikibot team, 2013-2014 # # Distributed under the terms of the MIT license. # __version__ = '$Id$' # -import json import pywikibot -from pywikibot import pagegenerators +from pywikibot import pagegenerators, WikidataBot -class ClaimRobot: +class ClaimRobot(WikidataBot): A bot to add Wikidata claims @@ -79,28 +78,6 @@ self.exists_arg = exists_arg self.repo = pywikibot.Site().data_repository() self.cacheSources() - -def getSource(self, lang): - -Get the source for the specified language, -if possible - -if lang in self.source_values: -source = pywikibot.Claim(self.repo, 'p143') -source.setTarget(self.source_values.get(lang)) -return source - -def cacheSources(self): - -Fetches the sources from the onwiki list -and stores it internally - -page = pywikibot.Page(self.repo, u'Wikidata:List of wikis/python') -self.source_values = json.loads(page.get()) -self.source_values = self.source_values['wikipedia'] -for source_lang in self.source_values: -self.source_values[source_lang] = pywikibot.ItemPage(self.repo, - self.source_values[source_lang]) def run(self): @@ -147,7 +124,7 @@ % (claim.getID(), claim.getTarget())) item.addClaim(claim) # A generator might yield pages from multiple languages -source = self.getSource(page.site.language()) +source = self.getSource(page.site) if source: claim.addSource(source, bot=True) # TODO FIXME: We need to check that we aren't adding a diff --git a/scripts/coordinate_import.py b/scripts/coordinate_import.py index f89f55f..d732c22 100644 --- a/scripts/coordinate_import.py +++ b/scripts/coordinate_import.py @@ -18,18 +18,17 @@ # # (C) Multichill 2014 -# (C) Pywikibot team, 2013 +# (C) Pywikibot team, 2013-2014 # # Distributed under the terms of MIT License. # __version__ = '$Id$' # -import json import pywikibot -from pywikibot import pagegenerators +from pywikibot import pagegenerators, WikidataBot -class coordImportRobot: +class CoordImportRobot(WikidataBot): A bot to import
[MediaWiki-commits] [Gerrit] puppet-lint: ignore class_parameter_defaults - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: puppet-lint: ignore class_parameter_defaults .. puppet-lint: ignore class_parameter_defaults When invoking puppet-lint, it looks for a file .puppet-lint.rc which let one list default command line arguments. Use that feature to disable the class_parameter_defaults check (parameters not having a default in our classes). Change-Id: I1dffd9658aeb1f0b815a0e78db00e9a5c57f17a2 --- A .puppet-lint.rc 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Dzahn: Verified; Looks good to me, approved diff --git a/.puppet-lint.rc b/.puppet-lint.rc new file mode 100644 index 000..de6375f --- /dev/null +++ b/.puppet-lint.rc @@ -0,0 +1 @@ +--no-class_parameter_defaults-check -- To view, visit https://gerrit.wikimedia.org/r/123600 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1dffd9658aeb1f0b815a0e78db00e9a5c57f17a2 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Hashar has...@free.fr Gerrit-Reviewer: Dzahn dz...@wikimedia.org Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: Matanya mata...@foss.co.il Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Optimize time parsers regular expressions - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Optimize time parsers regular expressions .. Optimize time parsers regular expressions * Removed one matching bracket that's not needed. * \D is short for [^\d] (and in my opinion better readable). Change-Id: I68e07db23ad83edc1d276f7ab32e7107eeb5bcd0 --- M lib/includes/parsers/DateTimeParser.php M lib/includes/parsers/EraParser.php 2 files changed, 12 insertions(+), 11 deletions(-) Approvals: WikidataJenkins: Verified Addshore: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/includes/parsers/DateTimeParser.php b/lib/includes/parsers/DateTimeParser.php index 5479f00..1f41aad 100644 --- a/lib/includes/parsers/DateTimeParser.php +++ b/lib/includes/parsers/DateTimeParser.php @@ -52,7 +52,7 @@ $calendarModelParser = new CalendarModelParser(); $options = $this-getOptions(); - //Place to put large years when they are found + // Place to put large years when they are found $largeYear = null; try{ @@ -68,14 +68,14 @@ ) ); - //PHP's DateTime object also cant handel larger than 4 digit years - //e.g. 1 June 202020 - if( preg_match( '/^(.*[^\d]|)(\d{5,})(.*|)$/', $value, $matches ) ) { + // PHP's DateTime object also can't handle larger than 4 digit years, + // e.g. 1 June 202020 + if( preg_match( '/^(.*\D)?(\d{5,})(.*)$/', $value, $matches ) ) { $value = $matches[1] . substr( $matches[2], -4 ) . $matches[3]; $largeYear = $matches[2]; } - //Parse using the DateTime object (this will allow us to format the date in a nicer way) + // Parse using the DateTime object (this will allow us to format the date in a nicer way) $dateTime = new DateTime( $value ); if( $largeYear === null ) { $timeString = $sign . $dateTime-format( 'Y-m-d\TH:i:s\Z' ); @@ -83,7 +83,7 @@ $timeString = $sign . $largeYear . $dateTime-format( '-m-d\TH:i:s\Z' ); } - //Pass the reformatted string into a base parser that parses this +/-Y-m-d\TH:i:s\Z format with a precision + // Pass the reformatted string into a base parser that parses this +/-Y-m-d\TH:i:s\Z format with a precision $valueParser = new \ValueParsers\TimeParser( $calendarModelParser, $options ); return $valueParser-parse( $timeString ); } @@ -106,7 +106,7 @@ } /** -* PHP's DateTime object also cant handel smaller than 4 digit years +* PHP's DateTime object also can't handle smaller than 4 digit years * e.g. instead of 12 it needs 0012 etc. * * @param string $value @@ -114,7 +114,7 @@ * @return string */ private function getValueWithFixedYearLengths( $value ) { - if( preg_match( '/^(\d+)([^\d])(\d+)([^\d])(\d+)$/', $value, $dateParts ) ) { + if( preg_match( '/^(\d+)(\D)(\d+)(\D)(\d+)$/', $value, $dateParts ) ) { if( $dateParts[1] 31 $dateParts[5] = 31 ) { // the year looks like it is at the front if( strlen( $dateParts[1] ) 4 ) { @@ -129,7 +129,7 @@ } } } else { - if( preg_match( '/^(.*[^\d])(\d{1,3})$/', $value, $matches ) ) { + if( preg_match( '/^(.*\D)(\d{1,3})$/', $value, $matches ) ) { $value = $matches[1] . str_pad( $matches[2], 4, '0', STR_PAD_LEFT ); } } diff --git a/lib/includes/parsers/EraParser.php b/lib/includes/parsers/EraParser.php index 91fb221..88011c4 100644 --- a/lib/includes/parsers/EraParser.php +++ b/lib/includes/parsers/EraParser.php @@ -81,8 +81,9 @@ $value = substr( $value, 1 ); } - $value = preg_replace( '/(\s*(' . $this-CEregex . '|' . $this-BCEregex . '))$/i', '', $value ); + $value = preg_replace( '/\s*(' . $this-CEregex . '|' . $this-BCEregex . ')$/i', '', $value ); return trim( $value ); } -} \ No newline at end of file + +} -- To view, visit https://gerrit.wikimedia.org/r/126018 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I68e07db23ad83edc1d276f7ab32e7107eeb5bcd0
[MediaWiki-commits] [Gerrit] Use EraParser constants instead of repeating the +/- characters - change (mediawiki...Wikibase)
Addshore has submitted this change and it was merged. Change subject: Use EraParser constants instead of repeating the +/- characters .. Use EraParser constants instead of repeating the +/- characters Change-Id: Ic69eb0b43b0634fce992799ca6d2d4fc25e62d83 --- M lib/includes/parsers/MWTimeIsoParser.php 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: WikidataJenkins: Verified Addshore: Looks good to me, approved diff --git a/lib/includes/parsers/MWTimeIsoParser.php b/lib/includes/parsers/MWTimeIsoParser.php index 022d288..3ce8da8 100644 --- a/lib/includes/parsers/MWTimeIsoParser.php +++ b/lib/includes/parsers/MWTimeIsoParser.php @@ -157,12 +157,12 @@ */ private function getTimeFromYear( $year, $isBce ) { if( $isBce ) { - $sign = '-'; + $sign = EraParser::BEFORE_CURRENT_ERA; } else { - $sign = '+'; + $sign = EraParser::CURRENT_ERA; } $timeString = $sign . $year . '-00-00T00:00:00Z'; return $this-timeValueTimeParser-parse( $timeString ); } -} \ No newline at end of file +} -- To view, visit https://gerrit.wikimedia.org/r/126022 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic69eb0b43b0634fce992799ca6d2d4fc25e62d83 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de Gerrit-Reviewer: Addshore addshorew...@gmail.com Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: WikidataJenkins wikidata-servi...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Show error message when server connection failed - change (mediawiki...ContentTranslation)
Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/126214 Change subject: Show error message when server connection failed .. Show error message when server connection failed Change-Id: I9d93c1f451d7fd325bbc9274a7fb39a4dc31374a --- M Resources.php M i18n/en.json M i18n/qqq.json M modules/base/ext.cx.datamanager.js M modules/header/ext.cx.header.render.js M modules/header/styles/ext.cx.header.less 6 files changed, 31 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/14/126214/1 diff --git a/Resources.php b/Resources.php index 84c2de3..5a37e7b 100644 --- a/Resources.php +++ b/Resources.php @@ -51,7 +51,8 @@ ), 'messages' = array( 'cx-header-translation-center', - 'cx-publish-button' + 'cx-publish-button', + 'cx-error-server-connection', ), ) + $resourcePaths; diff --git a/i18n/en.json b/i18n/en.json index 1a570b7..e7055ba 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -28,5 +28,6 @@ cx-tools-instructions-text5: Publish the translation, cx-tools-instructions-text6: When you are happy with the result, press {{int:cx-publish-button}}., cx-tools-searchbox-text: Search for a word, -cx-tools-view-guidelines: [$1 View translation guidelines] +cx-tools-view-guidelines: [$1 View translation guidelines], + cx-error-server-connection: Error: Could not connect to the server } diff --git a/i18n/qqq.json b/i18n/qqq.json index 904d1b1..4809242 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -29,5 +29,6 @@ cx-tools-instructions-text5: Help text for the translation tools pane., cx-tools-instructions-text6: Help text for the translation tools pane.\n\nRefers to {{msg-mw|Cx-publish-button}}., cx-tools-searchbox-text: Placeholder text for the searchbox on the translation tools column, -cx-tools-view-guidelines: Parameters:\n* $1 - the URL pointing to the guidelines for translation in Wikipedia +cx-tools-view-guidelines: Parameters:\n* $1 - the URL pointing to the guidelines for translation in Wikipedia, + cx-error-server-connection: Error message shown when connection to the ontent translation server is failed. } diff --git a/modules/base/ext.cx.datamanager.js b/modules/base/ext.cx.datamanager.js index a404c73..79e815a 100644 --- a/modules/base/ext.cx.datamanager.js +++ b/modules/base/ext.cx.datamanager.js @@ -15,8 +15,12 @@ /* global io */ function initConnection() { + if ( !window.io ) { + return false; + } socket = io.connect( mw.config.get( 'wgContentTranslationServerURL' ) ); mw.log( '[CX] Connected to server' ); + return true; } function updateModel( data ) { @@ -27,7 +31,13 @@ mw.cx.connect = function () { if ( !socket ) { - initConnection(); + if ( !initConnection() ) { + // io not defined. Server is unreachable. + $( '.cx-header__infobar' ) + .text( mw.msg( 'cx-error-server-connection' ) ) + .show(); + return; + } } socket.emit( 'cx.init', { // FIXME diff --git a/modules/header/ext.cx.header.render.js b/modules/header/ext.cx.header.render.js index 2328bae..16cc732 100644 --- a/modules/header/ext.cx.header.render.js +++ b/modules/header/ext.cx.header.render.js @@ -13,7 +13,7 @@ mw.cx.ContentTranslationHeader.prototype.render = function () { var $logo, $userName, $userDetails, $headerBar, $publishButton, - $translationCenterLink, $translationCenter; + $translationCenterLink, $translationCenter, $infoBar; $logo = $( 'div' ).addClass( 'cx-header__logo' ); $userName = $( 'a' ) @@ -35,9 +35,12 @@ $headerBar = $( 'div' ) .addClass( 'cx-header__bar' ) .append( $translationCenter, $publishButton ); + $infoBar = $( 'div' ) + .addClass( 'cx-header__infobar' ) + .hide(); this.$container .addClass( 'cx-header' ) - .append( $logo, $userDetails, $headerBar ); + .append( $logo, $userDetails, $headerBar, $infoBar ); }; }( jQuery, mediaWiki ) ); diff --git a/modules/header/styles/ext.cx.header.less b/modules/header/styles/ext.cx.header.less index a909d11..4591efd 100644 --- a/modules/header/styles/ext.cx.header.less +++
[MediaWiki-commits] [Gerrit] Rename PropertyInfo to more generic EntityInfo - change (mediawiki...Wikibase)
Addshore has submitted this change and it was merged. Change subject: Rename PropertyInfo to more generic EntityInfo .. Rename PropertyInfo to more generic EntityInfo This is a direct follow-up to patch I912882b09d302f8c74b1138b1aa3ab807d19f094. Yes, I messed that up by choosing the wrong name. Don't ask. ;-) Change-Id: I46bdbd049521e10f8cb7a9bfbf13ad3ad96302f5 --- M repo/includes/ClaimHtmlGenerator.php M repo/includes/EntityView.php M repo/includes/view/SnakHtmlGenerator.php M repo/tests/phpunit/includes/view/SnakHtmlGeneratorTest.php 4 files changed, 42 insertions(+), 38 deletions(-) Approvals: WikidataJenkins: Verified Addshore: Looks good to me, approved jenkins-bot: Checked diff --git a/repo/includes/ClaimHtmlGenerator.php b/repo/includes/ClaimHtmlGenerator.php index aa4fd79..7e578ea 100644 --- a/repo/includes/ClaimHtmlGenerator.php +++ b/repo/includes/ClaimHtmlGenerator.php @@ -49,17 +49,17 @@ * @since 0.4 * * @param Claim $claim the claim to render -* @param array[] $propertyInfo +* @param array[] $entityInfo * @param null|string $editSectionHtml has the html for the edit section * * @return string */ - public function getHtmlForClaim( Claim $claim, array $propertyInfo, $editSectionHtml = null ) { + public function getHtmlForClaim( Claim $claim, array $entityInfo, $editSectionHtml = null ) { wfProfileIn( __METHOD__ ); $mainSnakHtml = $this-snakHtmlGenerator-getSnakHtml( $claim-getMainSnak(), - $propertyInfo, + $entityInfo, false ); @@ -67,7 +67,7 @@ $claimHtml = wfTemplate( 'wb-claim', $claim-getGuid(), $mainSnakHtml, - $this-getHtmlForQualifiers( $claim-getQualifiers(), $propertyInfo ), + $this-getHtmlForQualifiers( $claim-getQualifiers(), $entityInfo ), $editSectionHtml ); } else { @@ -94,14 +94,14 @@ $referencesHtml = $this-getHtmlForReferences( $claim-getReferences(), - $propertyInfo + $entityInfo ); $claimHtml = wfTemplate( 'wb-statement', $rankHtml, $claim-getGuid(), $mainSnakHtml, - $this-getHtmlForQualifiers( $claim-getQualifiers(), $propertyInfo ), + $this-getHtmlForQualifiers( $claim-getQualifiers(), $entityInfo ), $editSectionHtml, $referencesHeading, $referencesHtml @@ -116,11 +116,11 @@ * Generates and returns the HTML representing a claim's qualifiers. * * @param Snaks $qualifiers -* @param array[] $propertyInfo +* @param array[] $entityInfo * * @return string */ - protected function getHtmlForQualifiers( Snaks $qualifiers, array $propertyInfo ) { + protected function getHtmlForQualifiers( Snaks $qualifiers, array $entityInfo ) { $qualifiersByProperty = new ByPropertyIdArray( $qualifiers ); $qualifiersByProperty-buildIndex(); @@ -129,7 +129,7 @@ foreach( $qualifiersByProperty-getPropertyIds() as $propertyId ) { $snaklistviewsHtml .= $this-getSnaklistviewHtml( $qualifiersByProperty-getByPropertyId( $propertyId ), - $propertyInfo + $entityInfo ); } @@ -140,15 +140,15 @@ * Generates the HTML for a ReferenceList object. * * @param ReferenceList $referenceList -* @param array[] $propertyInfo +* @param array[] $entityInfo * * @return string */ - protected function getHtmlForReferences( ReferenceList $referenceList, array $propertyInfo ) { + protected function getHtmlForReferences( ReferenceList $referenceList, array $entityInfo ) { $referencesHtml = ''; foreach( $referenceList as $reference ) { - $referencesHtml .= $this-getHtmlForReference( $reference, $propertyInfo ); + $referencesHtml .= $this-getHtmlForReference( $reference, $entityInfo ); } return $this-wrapInListview( $referencesHtml ); @@ -166,11 +166,11 @@ * Generates the HTML for a Reference
[MediaWiki-commits] [Gerrit] remove mw1163 from dsh, broken memory - change (operations/puppet)
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/126215 Change subject: remove mw1163 from dsh, broken memory .. remove mw1163 from dsh, broken memory RT #6741: mw1163 dmesg output shows memory errors 09:22 cmjohnson1 !log shutting down mw1163 to replace DIMM +icinga-wm PROBLEM - Host mw1163 is DOWN: PING CRITICAL - Packet loss = 100% if these stay in dsh while being down then deployers will get errors during scap and ask us what's up with that please _revert_ this after hardware is fixed Change-Id: I05af644d085d6ca998ca2e6214f1e8a21537990d --- M files/dsh/group/apache-eqiad M files/dsh/group/apaches M files/dsh/group/mediawiki-installation M files/dsh/group/mw-eqiad 4 files changed, 0 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/15/126215/1 diff --git a/files/dsh/group/apache-eqiad b/files/dsh/group/apache-eqiad index 12bfc5a..01b5fcd 100644 --- a/files/dsh/group/apache-eqiad +++ b/files/dsh/group/apache-eqiad @@ -160,7 +160,6 @@ mw1160 mw1161 mw1162 -mw1163 mw1164 mw1165 mw1166 diff --git a/files/dsh/group/apaches b/files/dsh/group/apaches index 12bfc5a..01b5fcd 100644 --- a/files/dsh/group/apaches +++ b/files/dsh/group/apaches @@ -160,7 +160,6 @@ mw1160 mw1161 mw1162 -mw1163 mw1164 mw1165 mw1166 diff --git a/files/dsh/group/mediawiki-installation b/files/dsh/group/mediawiki-installation index 509f3a6..787f25d 100644 --- a/files/dsh/group/mediawiki-installation +++ b/files/dsh/group/mediawiki-installation @@ -171,7 +171,6 @@ mw1160 mw1161 mw1162 -mw1163 mw1164 mw1165 mw1166 diff --git a/files/dsh/group/mw-eqiad b/files/dsh/group/mw-eqiad index 2f9d320..6023844 100644 --- a/files/dsh/group/mw-eqiad +++ b/files/dsh/group/mw-eqiad @@ -161,7 +161,6 @@ mw1160 mw1161 mw1162 -mw1163 mw1164 mw1165 mw1166 -- To view, visit https://gerrit.wikimedia.org/r/126215 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I05af644d085d6ca998ca2e6214f1e8a21537990d Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn dz...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] remove mw1163 from dsh, broken memory - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: remove mw1163 from dsh, broken memory .. remove mw1163 from dsh, broken memory RT #6741: mw1163 dmesg output shows memory errors 09:22 cmjohnson1 !log shutting down mw1163 to replace DIMM +icinga-wm PROBLEM - Host mw1163 is DOWN: PING CRITICAL - Packet loss = 100% if these stay in dsh while being down then deployers will get errors during scap and ask us what's up with that please _revert_ this after hardware is fixed Change-Id: I05af644d085d6ca998ca2e6214f1e8a21537990d --- M files/dsh/group/apache-eqiad M files/dsh/group/apaches M files/dsh/group/mediawiki-installation M files/dsh/group/mw-eqiad 4 files changed, 0 insertions(+), 4 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/files/dsh/group/apache-eqiad b/files/dsh/group/apache-eqiad index 12bfc5a..01b5fcd 100644 --- a/files/dsh/group/apache-eqiad +++ b/files/dsh/group/apache-eqiad @@ -160,7 +160,6 @@ mw1160 mw1161 mw1162 -mw1163 mw1164 mw1165 mw1166 diff --git a/files/dsh/group/apaches b/files/dsh/group/apaches index 12bfc5a..01b5fcd 100644 --- a/files/dsh/group/apaches +++ b/files/dsh/group/apaches @@ -160,7 +160,6 @@ mw1160 mw1161 mw1162 -mw1163 mw1164 mw1165 mw1166 diff --git a/files/dsh/group/mediawiki-installation b/files/dsh/group/mediawiki-installation index 509f3a6..787f25d 100644 --- a/files/dsh/group/mediawiki-installation +++ b/files/dsh/group/mediawiki-installation @@ -171,7 +171,6 @@ mw1160 mw1161 mw1162 -mw1163 mw1164 mw1165 mw1166 diff --git a/files/dsh/group/mw-eqiad b/files/dsh/group/mw-eqiad index 2f9d320..6023844 100644 --- a/files/dsh/group/mw-eqiad +++ b/files/dsh/group/mw-eqiad @@ -161,7 +161,6 @@ mw1160 mw1161 mw1162 -mw1163 mw1164 mw1165 mw1166 -- To view, visit https://gerrit.wikimedia.org/r/126215 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I05af644d085d6ca998ca2e6214f1e8a21537990d Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn dz...@wikimedia.org Gerrit-Reviewer: BryanDavis bda...@wikimedia.org Gerrit-Reviewer: Cmjohnson cmjohn...@wikimedia.org Gerrit-Reviewer: Dzahn dz...@wikimedia.org Gerrit-Reviewer: Greg Grossmeier g...@wikimedia.org Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Allow overriding the header styles from typography refresh - change (mediawiki...UniversalLanguageSelector)
jenkins-bot has submitted this change and it was merged. Change subject: Allow overriding the header styles from typography refresh .. Allow overriding the header styles from typography refresh Bug: 63718 Change-Id: Ifa36c6718694158c44da09ae8eb62d31ef5fd0a0 --- M resources/js/ext.uls.webfonts.js 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: KartikMistry: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/js/ext.uls.webfonts.js b/resources/js/ext.uls.webfonts.js index 242116f..0e26cff 100644 --- a/resources/js/ext.uls.webfonts.js +++ b/resources/js/ext.uls.webfonts.js @@ -202,7 +202,8 @@ } return excludes; - }() ) + }() ), + overridableFontFamilies: [ $( 'h1' ).css( 'font-family' ) ] } ); // Execute after task queue is processed so that the rendering is complete. -- To view, visit https://gerrit.wikimedia.org/r/125702 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifa36c6718694158c44da09ae8eb62d31ef5fd0a0 Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il Gerrit-Reviewer: Jdlrobson jrob...@wikimedia.org Gerrit-Reviewer: KartikMistry kartik.mis...@gmail.com Gerrit-Reviewer: Liangent liang...@gmail.com Gerrit-Reviewer: Santhosh santhosh.thottin...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add ParserOutput::unsetProperty, add tests - change (mediawiki/core)
Adrian Lang has uploaded a new change for review. https://gerrit.wikimedia.org/r/126216 Change subject: Add ParserOutput::unsetProperty, add tests .. Add ParserOutput::unsetProperty, add tests Change-Id: I29af31918c48a1225b6487c74fd638de26f07b28 --- M includes/parser/ParserOutput.php M tests/phpunit/includes/parser/ParserOutputTest.php 2 files changed, 32 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/16/126216/1 diff --git a/includes/parser/ParserOutput.php b/includes/parser/ParserOutput.php index d1e3e58..eab2705 100644 --- a/includes/parser/ParserOutput.php +++ b/includes/parser/ParserOutput.php @@ -455,6 +455,10 @@ return isset( $this-mProperties[$name] ) ? $this-mProperties[$name] : false; } + public function unsetProperty( $name ) { + unset( $this-mProperties[$name] ); + } + public function getProperties() { if ( !isset( $this-mProperties ) ) { $this-mProperties = array(); diff --git a/tests/phpunit/includes/parser/ParserOutputTest.php b/tests/phpunit/includes/parser/ParserOutputTest.php index c73666d..c024cee 100644 --- a/tests/phpunit/includes/parser/ParserOutputTest.php +++ b/tests/phpunit/includes/parser/ParserOutputTest.php @@ -56,4 +56,32 @@ $this-assertNull( $po-getExtensionData( one ) ); $this-assertEquals( Bar, $po-getExtensionData( two ) ); } + + /** +* @covers ParserOutput::setProperty +* @covers ParserOutput::getProperty +* @covers ParserOutput::unsetProperty +* @covers ParserOutput::getProperties +*/ + public function testProperties() { + $po = new ParserOutput(); + + $po-setProperty( 'foo', 'val' ); + + $properties = $po-getProperties(); + $this-assertEquals( $po-getProperty( 'foo' ), 'val' ); + $this-assertEquals( $properties['foo'], 'val' ); + + $po-setProperty( 'foo', 'second val' ); + + $properties = $po-getProperties(); + $this-assertEquals( $po-getProperty( 'foo' ), 'second val' ); + $this-assertEquals( $properties['foo'], 'second val' ); + + $po-unsetProperty( 'foo' ); + + $properties = $po-getProperties(); + $this-assertEquals( $po-getProperty( 'foo' ), false ); + $this-assertArrayNotHasKey( 'foo', $properties ); + } } -- To view, visit https://gerrit.wikimedia.org/r/126216 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I29af31918c48a1225b6487c74fd638de26f07b28 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Adrian Lang adrian.l...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix debug log format, expand var in debug log entry - change (mediawiki...Wikibase)
Addshore has submitted this change and it was merged. Change subject: Fix debug log format, expand var in debug log entry .. Fix debug log format, expand var in debug log entry Change-Id: Ie5bfaafbb72136cce914854ada1d44e483a43e45 --- M client/includes/EntityIdPropertyUpdater.php 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: WikidataJenkins: Verified Addshore: Looks good to me, approved diff --git a/client/includes/EntityIdPropertyUpdater.php b/client/includes/EntityIdPropertyUpdater.php index 13d38db..f3ca879 100644 --- a/client/includes/EntityIdPropertyUpdater.php +++ b/client/includes/EntityIdPropertyUpdater.php @@ -58,9 +58,9 @@ // unset property, if it was set $this-unsetProperty( $out, 'wikibase_item' ); - wfDebugLog( __CLASS__, __FUNCTION__ . 'Trying to set wikibase_item property for ' + wfDebugLog( __CLASS__, __FUNCTION__ . ': Trying to set wikibase_item property for ' . $siteLink-getSiteId() . ':' . $siteLink-getPageName() - . ' but $itemId is not an EntityId object.' ); + . but $itemId is not an EntityId object. ); } } -- To view, visit https://gerrit.wikimedia.org/r/126212 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie5bfaafbb72136cce914854ada1d44e483a43e45 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Adrian Lang adrian.l...@wikimedia.de Gerrit-Reviewer: Addshore addshorew...@gmail.com Gerrit-Reviewer: Adrian Lang adrian.l...@wikimedia.de Gerrit-Reviewer: WikidataJenkins wikidata-servi...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Clean-up ItemContentTest and Wikibase.hooks.php - change (mediawiki...Wikibase)
Addshore has submitted this change and it was merged. Change subject: Clean-up ItemContentTest and Wikibase.hooks.php .. Clean-up ItemContentTest and Wikibase.hooks.php Change-Id: Id1831e69486c5f79c1fffddb50d1cb64bb19aaad --- M repo/Wikibase.hooks.php M repo/tests/phpunit/includes/content/ItemContentTest.php 2 files changed, 56 insertions(+), 55 deletions(-) Approvals: WikidataJenkins: Verified Addshore: Looks good to me, approved diff --git a/repo/Wikibase.hooks.php b/repo/Wikibase.hooks.php index cb86c43..a438e85 100644 --- a/repo/Wikibase.hooks.php +++ b/repo/Wikibase.hooks.php @@ -7,6 +7,7 @@ use Content; use ContentHandler; use DatabaseUpdater; +use DummyLinker; use HistoryPager; use Html; use Language; @@ -29,8 +30,8 @@ use SplFileInfo; use Title; use User; -use Wikibase\content\SiteLinkUniquenessValidator; use Wikibase\content\LabelUniquenessValidator; +use Wikibase\content\SiteLinkUniquenessValidator; use Wikibase\Hook\MakeGlobalVariablesScriptHandler; use Wikibase\Hook\OutputPageJsConfigHookHandler; use Wikibase\Repo\WikibaseRepo; @@ -65,7 +66,8 @@ * * @param OutputPage $out * @param Skin $skin -* @return boolean +* +* @return bool */ public static function onBeforePageDisplay( OutputPage $out, Skin $skin ) { $out-addModules( 'wikibase.ui.entitysearch' ); @@ -81,8 +83,8 @@ * @note: $wgExtraNamespaces and $wgNamespaceAliases have already been processed at this point *and should no longer be touched. * -* @return boolean * @throws MWException +* @return bool */ public static function onSetupAfterCache() { wfProfileIn( __METHOD__ ); @@ -117,7 +119,7 @@ * * @param DatabaseUpdater $updater * -* @return boolean +* @return bool */ public static function onSchemaUpdate( DatabaseUpdater $updater ) { $type = $updater-getDB()-getType(); @@ -171,7 +173,7 @@ * * @param array $files * -* @return boolean +* @return bool */ public static function registerUnitTests( array $files ) { // @codeCoverageIgnoreStart @@ -201,10 +203,10 @@ * * @since 0.1 * -* @param integer $ns Namespace ID -* @param boolean $movable +* @param int $ns Namespace ID +* @param bool $movable * -* @return boolean +* @return bool */ public static function onNamespaceIsMovable( $ns, $movable ) { wfProfileIn( __METHOD__ ); @@ -223,12 +225,12 @@ * * @since 0.1 * -* @param weirdStuffButProbably|WikiPage $article +* @param WikiPage $article A WikiPage object as of MediaWiki 1.19, an Article one before. * @param Revision $revision -* @param integer $baseID +* @param int $baseID * @param User $user * -* @return boolean +* @return bool */ public static function onNewRevisionFromEditComplete( $article, Revision $revision, $baseID, User $user ) { wfProfileIn( __METHOD__ ); @@ -279,13 +281,13 @@ * @param WikiPage $wikiPage * @param User $user * @param string $reason -* @param integer $id +* @param int $id * @param Content $content * @param LogEntryBase $logEntry * * @throws MWException * -* @return boolean +* @return bool */ public static function onArticleDeleteComplete( WikiPage $wikiPage, User $user, $reason, $id, Content $content = null, LogEntryBase $logEntry = null @@ -469,7 +471,7 @@ * @param string $s * @param array $classes * -* @return boolean +* @return bool */ public static function onPageHistoryLineEnding( HistoryPager $history, $row, $s, array $classes ) { wfProfileIn( __METHOD__ ); @@ -509,7 +511,7 @@ * @param SkinTemplate $sktemplate * @param array $links * -* @return boolean +* @return bool */ public static function onPageTabs( SkinTemplate $sktemplate, array $links ) { wfProfileIn( __METHOD__ ); @@ -562,9 +564,9 @@ * * @since 0.1 * -* @param callable $reportMessage // takes a string param and echos it +* @param callable $reportMessage Takes a string parameter and echos it. * -* @return boolean +* @return bool */ public static function onWikibaseRebuildData( $reportMessage ) { wfProfileIn( __METHOD__ ); @@ -590,7 +592,7 @@ * @param array $groups * @param bool
[MediaWiki-commits] [Gerrit] contint: get rid of misc::pbuilder on slaves - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: contint: get rid of misc::pbuilder on slaves .. contint: get rid of misc::pbuilder on slaves Our class misc::pbuilder creates a bunch of pbuilder/cowbuilder images on the disk. To build Debian packages we are using jenkins-job-debian-glue which installs package dependencies and take care of creating cowbuilder images. We just have to make sure the images are going to be build under /mnt/pbuilder to have enough disk space. Change-Id: I45317e87ad2f1a8c0cf699b1fac0a7d3135151b7 --- M manifests/role/ci.pp M modules/contint/manifests/packages/labs.pp 2 files changed, 13 insertions(+), 2 deletions(-) Approvals: Hashar: Verified; Looks good to me, but someone else must approve jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/manifests/role/ci.pp b/manifests/role/ci.pp index 33c5469..130c8a4 100644 --- a/manifests/role/ci.pp +++ b/manifests/role/ci.pp @@ -346,7 +346,6 @@ include role::ci::slave::labs::common, -role::package::builder::labs, # git-deploy replacement on labs contint::slave-scripts, # Include package unsafe for production diff --git a/modules/contint/manifests/packages/labs.pp b/modules/contint/manifests/packages/labs.pp index d7ace87..b38462f 100644 --- a/modules/contint/manifests/packages/labs.pp +++ b/modules/contint/manifests/packages/labs.pp @@ -10,6 +10,17 @@ # Shell script wrappers to ease package building # Package generated via the mirror operations/debs/jenkins-debian-glue.git + +file { '/mnt/pbuilder': +ensure = directory, +require = Mount['/mnt'], +} + +file { '/var/cache/pbuilder': +ensure = link, +target = '/mnt/pbuilder', +} + package { [ 'jenkins-debian-glue', 'jenkins-debian-glue-buildenv', @@ -19,7 +30,8 @@ 'jenkins-debian-glue-buildenv-taptools', ]: ensure = latest, -require = Class['misc::package-builder'], +# Make sure cowbuilder images will be on /mnt +require = File['/mnt/pbuilder'], } package { [ -- To view, visit https://gerrit.wikimedia.org/r/122707 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I45317e87ad2f1a8c0cf699b1fac0a7d3135151b7 Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Hashar has...@free.fr Gerrit-Reviewer: Dzahn dz...@wikimedia.org Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: Matanya mata...@foss.co.il Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] contint: directory to hold debian-glue packages - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: contint: directory to hold debian-glue packages .. contint: directory to hold debian-glue packages Creates /data/project/debianrepo to have debian-glue generated packages hosted on a shared space. Needs to update the Jenkins debian-glue jobs to point to it. Change-Id: If356c8156ed18ff26b8d81ff240e9fd9523bc28a --- M modules/contint/manifests/packages/labs.pp 1 file changed, 9 insertions(+), 0 deletions(-) Approvals: Hashar: Verified; Looks good to me, but someone else must approve jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/modules/contint/manifests/packages/labs.pp b/modules/contint/manifests/packages/labs.pp index b38462f..848f2dd 100644 --- a/modules/contint/manifests/packages/labs.pp +++ b/modules/contint/manifests/packages/labs.pp @@ -11,9 +11,17 @@ # Shell script wrappers to ease package building # Package generated via the mirror operations/debs/jenkins-debian-glue.git +# jenkins-debian glue puppetization: file { '/mnt/pbuilder': ensure = directory, require = Mount['/mnt'], +} + +file { '/data/project/debianrepo': +ensure = directory, +owner = 'jenkins-deploy', +group = 'wikidev', +mode = '0775', } file { '/var/cache/pbuilder': @@ -33,6 +41,7 @@ # Make sure cowbuilder images will be on /mnt require = File['/mnt/pbuilder'], } +# end of jenkins-debian glue puppetization package { [ 'npm', -- To view, visit https://gerrit.wikimedia.org/r/122712 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If356c8156ed18ff26b8d81ff240e9fd9523bc28a Gerrit-PatchSet: 4 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Hashar has...@free.fr Gerrit-Reviewer: Dzahn dz...@wikimedia.org Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Refactor API code and fix invalid input handling - change (mediawiki...Thanks)
jenkins-bot has submitted this change and it was merged. Change subject: Refactor API code and fix invalid input handling .. Refactor API code and fix invalid input handling Simplify the code and add additional checks for invalid input. Change-Id: Ic1fe978730af7715c72f58cd7af46ab753e614e8 --- M ApiFlowThank.php M ApiRevThank.php M ApiThank.php 3 files changed, 23 insertions(+), 23 deletions(-) Approvals: Addshore: Looks good to me, approved jenkins-bot: Verified diff --git a/ApiFlowThank.php b/ApiFlowThank.php index 6838d33..7c86b7e 100644 --- a/ApiFlowThank.php +++ b/ApiFlowThank.php @@ -24,17 +24,22 @@ $this-dieOnBadUser( $user ); $params = $this-extractRequestParams(); - $postId = UUID::create( $params['postid'] ); - if ( $this-userAlreadySentThanksForId( $user, $postId ) ) { - $this-markResultSuccess(); - return; + try { + $postId = UUID::create( $params['postid'] ); + } catch ( FlowException $e ) { + $this-dieUsage( 'Post ID is invalid', 'invalidpostid' ); } $data = $this-getFlowData( $postId ); $recipient = $this-getRecipientFromPost( $data['post'] ); $this-dieOnBadRecipient( $user, $recipient ); + + if ( $this-userAlreadySentThanksForId( $user, $postId ) ) { + $this-markResultSuccess( $recipient-getName() ); + return; + } $rootPost = $data['root']; $workflowId = $rootPost-getPostId(); @@ -87,8 +92,7 @@ * @returns User */ private function getRecipientFromPost( PostRevision $post ) { - $uid = $post-getCreatorId(); - $recipient = User::newFromId( $uid ); + $recipient = User::newFromId( $post-getCreatorId() ); if ( !$recipient-loadFromId() ) { $this-dieUsage( 'Recipient is invalid', 'invalidrecipient' ); } @@ -102,12 +106,6 @@ private function getPageTitleFromRootPost( PostRevision $rootPost ) { $workflow = Container::get( 'storage' )-get( 'Workflow', $rootPost-getPostId() ); return $workflow-getArticleTitle(); - } - - private function markResultSuccess() { - $this-getResult()-addValue( null, 'result', array( - 'success' = 1, - ) ); } /** @@ -139,7 +137,7 @@ // Mark the thank in session to prevent duplicates (Bug 46690). $user-getRequest()-setSessionData( flow-thanked-{$postId-getAlphadecimal()}, true ); // Set success message. - $this-markResultSuccess(); + $this-markResultSuccess( $recipient-getName() ); // Log it if we're supposed to log it. if ( $wgThanksLogging ) { $this-logThanks( $user, $recipient ); diff --git a/ApiRevThank.php b/ApiRevThank.php index 827cdd9..c1b1caf 100644 --- a/ApiRevThank.php +++ b/ApiRevThank.php @@ -16,7 +16,7 @@ $revision = $this-getRevisionFromParams( $params ); if ( $this-userAlreadySentThanksForRevision( $user, $revision ) ) { - $this-markResultSuccess( $revision ); + $this-markResultSuccess( $revision-getUserText() ); } else { $recipient = $this-getUserFromRevision( $revision ); $this-dieOnBadRecipient( $user, $recipient ); @@ -35,7 +35,9 @@ private function getRevisionFromParams( $params ) { $revision = Revision::newFromId( $params['rev'] ); - if ( !$revision ) { + + // Revision ID 1 means an invalid argument was passed in. + if ( !$revision || $revision-getId() === 1 ) { $this-dieUsage( 'Revision ID is not valid', 'invalidrevision' ); } elseif ( $revision-isDeleted( Revision::DELETED_TEXT ) ) { $this-dieUsage( 'Revision has been deleted', 'revdeleted' ); @@ -70,13 +72,6 @@ return User::newFromId( $recipient ); } - private function markResultSuccess( Revision $revision ) { - $this-getResult()-addValue( null, 'result', array( - 'success' = 1, - 'recipient' = $revision-getUserText( Revision::FOR_PUBLIC ) - ) ); - } - private function sendThanks( User $user, Revision $revision, User $recipient, $source ) { global $wgThanksLogging; $title = $this-getTitleFromRevision( $revision ); @@ -96,7 +91,7 @@ // Mark the thank in session to
[MediaWiki-commits] [Gerrit] Don't show expand view when Media Viewer is disabled - change (mediawiki...MultimediaViewer)
Gilles has uploaded a new change for review. https://gerrit.wikimedia.org/r/126217 Change subject: Don't show expand view when Media Viewer is disabled .. Don't show expand view when Media Viewer is disabled Change-Id: I52d9f044a2535ad9bc4f68b44ffc67058757bce8 Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/456 --- M resources/mmv/mmv.bootstrap.js 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MultimediaViewer refs/changes/17/126217/1 diff --git a/resources/mmv/mmv.bootstrap.js b/resources/mmv/mmv.bootstrap.js index 3722b8e..505154a 100755 --- a/resources/mmv/mmv.bootstrap.js +++ b/resources/mmv/mmv.bootstrap.js @@ -162,8 +162,8 @@ caption = this.htmlUtils.htmlToTextWithLinks( $thumbCaption.html() || '' ); } - if ( $thumb.closest( '#file' ).length 0 ) { - // This is a file page. Make adjustments. + // This is a file page. Make adjustments, but only if media viewer links are activated for that user + if ( $thumb.closest( '#file' ).length 0 mw.config.get( 'wgMediaViewerOnClick' ) ) { link = $thumb.closest( 'a' ).prop( 'href' ); $( 'p' ) -- To view, visit https://gerrit.wikimedia.org/r/126217 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I52d9f044a2535ad9bc4f68b44ffc67058757bce8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MultimediaViewer Gerrit-Branch: master Gerrit-Owner: Gilles gdu...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Choose feedback survey based on user language - change (mediawiki...MultimediaViewer)
jenkins-bot has submitted this change and it was merged. Change subject: Choose feedback survey based on user language .. Choose feedback survey based on user language Change-Id: Ia9d53b6a3caedecd05429e5285765b1c5098342e Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/420 --- M resources/mmv/ui/mmv.ui.stripeButtons.js 1 file changed, 27 insertions(+), 2 deletions(-) Approvals: Gilles: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/mmv/ui/mmv.ui.stripeButtons.js b/resources/mmv/ui/mmv.ui.stripeButtons.js index 67c8afa..a2b35a8 100644 --- a/resources/mmv/ui/mmv.ui.stripeButtons.js +++ b/resources/mmv/ui/mmv.ui.stripeButtons.js @@ -188,11 +188,36 @@ }; /** +* Returns a link to a survey in the given language or null if that language is not supported +* @param {string|null} langcode +*/ + SBP.getFeedbackSurveyBaseUrlForLanguage = function ( langcode ) { + var baseUrl = 'https://www.surveymonkey.com/s/media-viewer-1', + surveyTranslations = { ca: 1, hu: 1 }; + + langcode = langcode.split( /[_-]/ )[0]; // get rid of variants + if ( langcode === 'en') { + return baseUrl; + } else if ( surveyTranslations[langcode] ) { + return baseUrl + '-' + langcode; + } else { + return null; + } + }; + + /** +* Returns a link to a survey in the user language, or null if not supported +*/ + SBP.getFeedbackSurveyBaseUrl = function () { + return this.getFeedbackSurveyBaseUrlForLanguage( mw.config.get( 'wgUserLanguage' ) ); + }; + + /** * Checks if it is suitable to show a survey to the current user. */ SBP.shouldShowFeedbackSurvey = function () { return mw.config.get( 'wgMultimediaViewer' ).showSurvey - mw.config.get( 'wgUserLanguage' ) === 'en'; + this.getFeedbackSurveyBaseUrl(); }; /** @@ -201,7 +226,7 @@ * @return {string} */ SBP.getFeedbackSurveyUrl = function () { - return 'https://www.surveymonkey.com/s/media-viewer-1?c=' + mw.config.get( 'wgDBname' ); + return this.getFeedbackSurveyBaseUrl() + '?c=' + mw.config.get( 'wgDBname' ); }; /** -- To view, visit https://gerrit.wikimedia.org/r/125936 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia9d53b6a3caedecd05429e5285765b1c5098342e Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/MultimediaViewer Gerrit-Branch: master Gerrit-Owner: Gergő Tisza gti...@wikimedia.org Gerrit-Reviewer: Gergő Tisza gti...@wikimedia.org Gerrit-Reviewer: Gilles gdu...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Rename MwTimeIsoFormatter to TimeFormatter - change (mediawiki...Wikibase)
Addshore has uploaded a new change for review. https://gerrit.wikimedia.org/r/126219 Change subject: Rename MwTimeIsoFormatter to TimeFormatter .. Rename MwTimeIsoFormatter to TimeFormatter Change-Id: I6b2a2a7d05cd95c510329278d7b31070751f6fb9 --- M lib/includes/formatters/TimeDetailsFormatter.php R lib/includes/formatters/TimeFormatter.php M lib/includes/formatters/WikibaseValueFormatterBuilders.php M lib/tests/phpunit/formatters/MwTimeIsoFormatterTest.php 4 files changed, 11 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/19/126219/1 diff --git a/lib/includes/formatters/TimeDetailsFormatter.php b/lib/includes/formatters/TimeDetailsFormatter.php index 5e5a021..b6ff00e 100644 --- a/lib/includes/formatters/TimeDetailsFormatter.php +++ b/lib/includes/formatters/TimeDetailsFormatter.php @@ -22,7 +22,7 @@ class TimeDetailsFormatter extends ValueFormatterBase { /** -* @var MwTimeIsoFormatter +* @var TimeFormatter */ protected $isoTimeFormatter; @@ -40,7 +40,7 @@ if ( $options-hasOption( TimeFormatter::OPT_TIME_ISO_FORMATTER ) ) { $this-isoTimeFormatter = $options-getOption( TimeFormatter::OPT_TIME_ISO_FORMATTER ); } else { - $this-isoTimeFormatter = new MwTimeIsoFormatter( $options ); + $this-isoTimeFormatter = new TimeFormatter( $options ); $options-setOption( TimeFormatter::OPT_TIME_ISO_FORMATTER, $this-isoTimeFormatter ); } diff --git a/lib/includes/formatters/MwTimeIsoFormatter.php b/lib/includes/formatters/TimeFormatter.php similarity index 96% rename from lib/includes/formatters/MwTimeIsoFormatter.php rename to lib/includes/formatters/TimeFormatter.php index 8524943..203a5f2 100644 --- a/lib/includes/formatters/MwTimeIsoFormatter.php +++ b/lib/includes/formatters/TimeFormatter.php @@ -18,7 +18,7 @@ * * @todo move me to DataValues-time */ -class MwTimeIsoFormatter extends ValueFormatterBase { +class TimeFormatter extends ValueFormatterBase { /** * MediaWiki language object. @@ -63,8 +63,11 @@ * [8] = 02 * [9] = 03 */ - $regexSuccess = preg_match( '/^(\+|\-)((\d{0,12})?(\d{4}))-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})Z/', - $extendedIsoTimestamp, $matches ); + $regexSuccess = preg_match( + '/^(\+|\-)((\d{0,12})?(\d{4}))-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})Z/', + $extendedIsoTimestamp, + $matches + ); if( !$regexSuccess || intval( $matches[2] ) === 0 ) { return $extendedIsoTimestamp; diff --git a/lib/includes/formatters/WikibaseValueFormatterBuilders.php b/lib/includes/formatters/WikibaseValueFormatterBuilders.php index 8bc4477..8b83d74 100644 --- a/lib/includes/formatters/WikibaseValueFormatterBuilders.php +++ b/lib/includes/formatters/WikibaseValueFormatterBuilders.php @@ -525,7 +525,7 @@ * @return HtmlTimeFormatter */ private static function newHtmlTimeFormatter( FormatterOptions $options, WikibaseValueFormatterBuilders $builders ) { - return new HtmlTimeFormatter( $options, new MwTimeIsoFormatter( $options ) ); + return new HtmlTimeFormatter( $options, new TimeFormatter( $options ) ); } /** diff --git a/lib/tests/phpunit/formatters/MwTimeIsoFormatterTest.php b/lib/tests/phpunit/formatters/MwTimeIsoFormatterTest.php index feb0913..09f33ce 100644 --- a/lib/tests/phpunit/formatters/MwTimeIsoFormatterTest.php +++ b/lib/tests/phpunit/formatters/MwTimeIsoFormatterTest.php @@ -8,7 +8,7 @@ use ValueFormatters\FormatterOptions; use ValueParsers\ParserOptions; use ValueParsers\ValueParser; -use Wikibase\Lib\MwTimeIsoFormatter; +use Wikibase\Lib\TimeFormatter; use Wikibase\Lib\Parsers\TimeParser; use Wikibase\Utils; @@ -327,7 +327,7 @@ ValueFormatter::OPT_LANG = $langCode ) ); - $isoFormatter = new MwTimeIsoFormatter( $options ); + $isoFormatter = new TimeFormatter( $options ); $formattedTime = $isoFormatter-format( $timeValue ); $this-assertEquals( $expected, $formattedTime ); -- To view, visit https://gerrit.wikimedia.org/r/126219 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6b2a2a7d05cd95c510329278d7b31070751f6fb9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Addshore addshorew...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org
[MediaWiki-commits] [Gerrit] Use CacheOutput::unsetProperty - change (mediawiki...Wikibase)
Adrian Lang has uploaded a new change for review. https://gerrit.wikimedia.org/r/126220 Change subject: Use CacheOutput::unsetProperty .. Use CacheOutput::unsetProperty This depends on I29af31918c48a1225b6487c74fd638de26f07b28. Change-Id: Id3658228ec3233c92f5acbff7a5112563668ad34 --- M client/includes/EntityIdPropertyUpdater.php 1 file changed, 2 insertions(+), 22 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/20/126220/1 diff --git a/client/includes/EntityIdPropertyUpdater.php b/client/includes/EntityIdPropertyUpdater.php index f3ca879..5c1c511 100644 --- a/client/includes/EntityIdPropertyUpdater.php +++ b/client/includes/EntityIdPropertyUpdater.php @@ -55,31 +55,11 @@ $idFormatter = WikibaseClient::getDefaultInstance()-getEntityIdFormatter(); $out-setProperty( 'wikibase_item', $idFormatter-format( $itemId ) ); } else { - // unset property, if it was set - $this-unsetProperty( $out, 'wikibase_item' ); + $out-unsetProperty( 'wikibase_item' ); wfDebugLog( __CLASS__, __FUNCTION__ . ': Trying to set wikibase_item property for ' . $siteLink-getSiteId() . ':' . $siteLink-getPageName() - . but $itemId is not an EntityId object. ); - } - } - - /** -* Unsets the wikibase_item property -* @todo: should use functionality in core, and if not exists, add it there. -* -* @since 0.4 -* -* @param ParserOutput $out -* @param string $propertyName -*/ - private function unsetProperty( \ParserOutput $out, $propertyName ) { - // unset property, if it was set - $properties = $out-getProperties(); - - if ( array_key_exists( $propertyName, $properties ) ) { - unset( $properties[$propertyName] ); - $out-mProperties = $properties; + . ' but $itemId ' . $itemId . ' is not an EntityId object.' ); } } } -- To view, visit https://gerrit.wikimedia.org/r/126220 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id3658228ec3233c92f5acbff7a5112563668ad34 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Adrian Lang adrian.l...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Do not load too-big thumbnails for SVGs - change (mediawiki...MultimediaViewer)
jenkins-bot has submitted this change and it was merged. Change subject: Do not load too-big thumbnails for SVGs .. Do not load too-big thumbnails for SVGs Change-Id: Iae75105151bfcd0e974fc292794802c77eb26ea4 Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/448 --- M resources/mmv/mmv.js M resources/mmv/ui/mmv.ui.canvas.js M tests/qunit/mmv/mmv.test.js M tests/qunit/mmv/ui/mmv.ui.canvas.test.js 4 files changed, 25 insertions(+), 20 deletions(-) Approvals: Gilles: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/mmv/mmv.js b/resources/mmv/mmv.js index 0acb631..e55288b 100755 --- a/resources/mmv/mmv.js +++ b/resources/mmv/mmv.js @@ -569,14 +569,19 @@ * @returns {jQuery.Promise.mw.mmv.model.Thumbnail, HTMLImageElement} */ MMVP.fetchThumbnail = function ( fileTitle, width, originalWidth, originalHeight ) { - $.noop( originalWidth, originalHeight ); // keep JSHint happy... will be removed later + $.noop( originalHeight ); // keep JSHint happy... will be removed later var viewer = this, thumbnailPromise, imagePromise; + if ( originalWidth width originalWidth ) { + // Do not request images larger than the original image + width = originalWidth; + } + thumbnailPromise = this.thumbnailInfoProvider.get( fileTitle, width ); - imagePromise = thumbnailPromise.then( function( thumbnail ) { + imagePromise = thumbnailPromise.then( function ( thumbnail ) { return viewer.imageProvider.get( thumbnail.url ); } ); diff --git a/resources/mmv/ui/mmv.ui.canvas.js b/resources/mmv/ui/mmv.ui.canvas.js index 80d6725..e08f5ec 100644 --- a/resources/mmv/ui/mmv.ui.canvas.js +++ b/resources/mmv/ui/mmv.ui.canvas.js @@ -186,20 +186,7 @@ var targetWidth, targetHeight, blowupFactor, - blurredThumbnailShown = false, - maxSizeFileExtensions = { - 'svg' : true, - }; - - // There are some file types (SVG for example) for which there is no concept - // of initial size. For these cases we force a max canvas resize and no bluring. - if ( maxSizeFileExtensions[ this.imageRawMetadata.filePageTitle.getExtension().toLowerCase() ] ) { - $imagePlaceholder.width( imageWidths.cssWidth ); - $imagePlaceholder.height( imageWidths.cssHeight ); - this.set( this.imageRawMetadata, $imagePlaceholder.show() ); - - return blurredThumbnailShown; - } + blurredThumbnailShown = false; // Assume natural thumbnail size¸ targetWidth = imageInfo.width; diff --git a/tests/qunit/mmv/mmv.test.js b/tests/qunit/mmv/mmv.test.js index aef1ac6..37c6a26 100644 --- a/tests/qunit/mmv/mmv.test.js +++ b/tests/qunit/mmv/mmv.test.js @@ -363,4 +363,17 @@ } } } ); + + QUnit.test( 'Refuse to load too-big thumbnails', 1, function ( assert ) { + var viewer = new mw.mmv.MultimediaViewer(), + intendedWidth = 50, + title = mw.Title.newFromText( 'File:Foobar.svg' ); + + viewer.thumbnailInfoProvider.get = function ( fileTitle, width ) { + assert.strictEqual( width, intendedWidth ); + return $.Deferred().reject(); + }; + + viewer.fetchThumbnail( title, 1000, intendedWidth, 60 ); + } ); }( mediaWiki, jQuery ) ); diff --git a/tests/qunit/mmv/ui/mmv.ui.canvas.test.js b/tests/qunit/mmv/ui/mmv.ui.canvas.test.js index 4945b72..6895602 100644 --- a/tests/qunit/mmv/ui/mmv.ui.canvas.test.js +++ b/tests/qunit/mmv/ui/mmv.ui.canvas.test.js @@ -111,7 +111,7 @@ assert.ok( ! canvas.resizeListener, 'resize listener has been removed.' ); } ); - QUnit.test( 'maybeDisplayPlaceholder: Max area for SVG files', 5, function ( assert ) { + QUnit.test( 'maybeDisplayPlaceholder: Constrained area for SVG files', 4, function ( assert ) { var $image, blurredThumbnailShown, $qf = $( '#qunit-fixture' ), @@ -124,7 +124,7 @@ canvas.imageRawMetadata = imageRawMetadata; canvas.set = function () { - assert.ok ( true, 'Placeholder is shown'); + assert.ok ( false, 'Placeholder is not shown'); }; $image = $( 'img' ).width( 10 ).height( 5 ); @@ -135,8
[MediaWiki-commits] [Gerrit] contint::slave-scripts recurse submodules - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: contint::slave-scripts recurse submodules .. contint::slave-scripts recurse submodules All git::clone must recurse in submodules since some of the integration/* repositories have ... submodules! Change-Id: Ib1815b84f10f6e076dafaaf306cd20b092e3756a --- M modules/contint/manifests/slave-scripts.pp 1 file changed, 16 insertions(+), 12 deletions(-) Approvals: Hashar: Verified; Looks good to me, but someone else must approve jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/modules/contint/manifests/slave-scripts.pp b/modules/contint/manifests/slave-scripts.pp index 284f10a..ed6da2f 100644 --- a/modules/contint/manifests/slave-scripts.pp +++ b/modules/contint/manifests/slave-scripts.pp @@ -5,25 +5,29 @@ } git::clone { 'jenkins CI slave scripts': -ensure= 'latest', -directory = '/srv/deployment/integration/slave-scripts', -origin= 'https://gerrit.wikimedia.org/r/p/integration/jenkins.git', +ensure = 'latest', +directory = '/srv/deployment/integration/slave-scripts', +origin = 'https://gerrit.wikimedia.org/r/p/integration/jenkins.git', +recurse_submodules = true, } # We can not git-deploy on labs, so use the good old git::clone git::clone { 'jenkins CI kss': -ensure= 'latest', -directory = '/srv/deployment/integration/kss', -origin= 'https://gerrit.wikimedia.org/r/p/integration/kss.git', +ensure = 'latest', +directory = '/srv/deployment/integration/kss', +origin = 'https://gerrit.wikimedia.org/r/p/integration/kss.git', +recurse_submodules = true, } git::clone { 'jenkins CI phpcs': -ensure= 'latest', -directory = '/srv/deployment/integration/phpcs', -origin= 'https://gerrit.wikimedia.org/r/p/integration/phpcs.git', +ensure = 'latest', +directory = '/srv/deployment/integration/phpcs', +origin = 'https://gerrit.wikimedia.org/r/p/integration/phpcs.git', +recurse_submodules = true, } git::clone { 'jenkins CI phpunit': -ensure= 'latest', -directory = '/srv/deployment/integration/phpunit', -origin= 'https://gerrit.wikimedia.org/r/p/integration/phpunit.git', +ensure = 'latest', +directory = '/srv/deployment/integration/phpunit', +origin = 'https://gerrit.wikimedia.org/r/p/integration/phpunit.git', +recurse_submodules = true, } } -- To view, visit https://gerrit.wikimedia.org/r/122342 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib1815b84f10f6e076dafaaf306cd20b092e3756a Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Hashar has...@free.fr Gerrit-Reviewer: Dzahn dz...@wikimedia.org Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] contint: soften python-voluptuous version requirement - change (operations/puppet)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/126221 Change subject: contint: soften python-voluptuous version requirement .. contint: soften python-voluptuous version requirement Alexandros has build version of 0.8.2-1wmf1 of python-voluptuous so we can upgrade Zuul. Remove the version constraint in puppet so we can get 0.8.2-1wm1 installed. Change-Id: I6354f0385917cf5c4847e74e7ee734a01a56cf18 --- M modules/zuul/manifests/init.pp 1 file changed, 1 insertion(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/21/126221/1 diff --git a/modules/zuul/manifests/init.pp b/modules/zuul/manifests/init.pp index 679fcf5..d7d5cc0 100644 --- a/modules/zuul/manifests/init.pp +++ b/modules/zuul/manifests/init.pp @@ -59,11 +59,8 @@ ensure = present, } - # We have packaged the python voluptuous module under - # operations/debs/python-voluptuous. Zuul does not work - # AT ALL with version 0.7 so make sure we have 0.6.x package { 'python-voluptuous': -ensure = '0.6.1-1~wmf1', +ensure = present, } # Used to be in /var/lib/git/zuul but /var/lib/git can be used -- To view, visit https://gerrit.wikimedia.org/r/126221 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6354f0385917cf5c4847e74e7ee734a01a56cf18 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Hashar has...@free.fr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] decom virt5-11, pmtpa compute nodes - change (operations/puppet)
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/126222 Change subject: decom virt5-11, pmtpa compute nodes .. decom virt5-11, pmtpa compute nodes remove from puppet remove from DHCP remove from ganglia config Change-Id: I413779fcd5130fc3103c86bd92a5cc3d0f73c12f --- M manifests/ganglia.pp M manifests/site.pp M modules/install-server/files/dhcpd/linux-host-entries.ttyS0-115200 3 files changed, 0 insertions(+), 52 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/22/126222/1 diff --git a/manifests/ganglia.pp b/manifests/ganglia.pp index 9da45bb..3f6bf21 100644 --- a/manifests/ganglia.pp +++ b/manifests/ganglia.pp @@ -299,7 +299,6 @@ 'SSL cluster esams' = 'hooft.esams.wikimedia.org:11675 ssl3001.esams.wikimedia.org ssl3002.esams.wikimedia.org', 'Swift pmtpa'= 'ms-fe1.pmtpa.wmnet ms-fe2.pmtpa.wmnet', 'Virtualization cluster eqiad' = 'labnet1001.eqiad.wmnet virt1000.wikimedia.org', -'Virtualization cluster pmtpa' = 'virt5.pmtpa.wmnet virt0.wikimedia.org', 'Glusterfs cluster pmtpa'= 'labstore1.pmtpa.wmnet labstore2.pmtpa.wmnet', 'MySQL eqiad'= 'db1056.eqiad.wmnet db1021.eqiad.wmnet', 'LVS loadbalancers eqiad'= 'lvs1001.wikimedia.org lvs1002.wikimedia.org', diff --git a/manifests/site.pp b/manifests/site.pp index a965d2b..14b7d24 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -2808,22 +2808,6 @@ include role::nova::api } -node /virt([5-9]|1[0-1]).pmtpa.wmnet/ { -$cluster = 'virt' -if $::hostname =~ /^virt5$/ { - -$ganglia_aggregator = true -} - -$openstack_version = 'folsom' -$use_neutron = false - -include admins::labs - -include standard -include role::nova::compute -} - node 'labnet1001.eqiad.wmnet' { $cluster = 'virt' $openstack_version = 'havana' diff --git a/modules/install-server/files/dhcpd/linux-host-entries.ttyS0-115200 b/modules/install-server/files/dhcpd/linux-host-entries.ttyS0-115200 index 639368c..bc1d8e8 100644 --- a/modules/install-server/files/dhcpd/linux-host-entries.ttyS0-115200 +++ b/modules/install-server/files/dhcpd/linux-host-entries.ttyS0-115200 @@ -115,41 +115,6 @@ fixed-address virt1009.eqiad.wmnet; } -host virt5 { - hardware ethernet 88:43:e1:c2:86:40; - fixed-address virt5.pmtpa.wmnet; -} - -host virt6 { - hardware ethernet 88:43:E1:C2:57:EE; - fixed-address virt6.pmtpa.wmnet; -} - -host virt7 { - hardware ethernet 88:43:E1:C2:77:DE; - fixed-address virt7.pmtpa.wmnet; -} - -host virt8 { - hardware ethernet 00:22:BD:D3:61:7E; - fixed-address virt8.pmtpa.wmnet; -} - -host virt9 { - hardware ethernet 00:22:BD:D3:37:E4; - fixed-address virt9.pmtpa.wmnet; -} - -host virt10 { - hardware ethernet 88:43:E1:C2:5D:AC; - fixed-address virt10.pmtpa.wmnet; -} - -host virt11 { - hardware ethernet 88:43:E1:C2:4C:56; - fixed-address virt11.pmtpa.wmnet; -} - host virt15 { hardware ethernet 88:43:E1:C2:7B:6C; fixed-address virt15.pmtpa.wmnet; -- To view, visit https://gerrit.wikimedia.org/r/126222 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I413779fcd5130fc3103c86bd92a5cc3d0f73c12f Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn dz...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Activate the other projects sidebar managed by Wikibase in... - change (operations/mediawiki-config)
Ricordisamoa has uploaded a new change for review. https://gerrit.wikimedia.org/r/126223 Change subject: Activate the other projects sidebar managed by Wikibase in itwikisource .. Activate the other projects sidebar managed by Wikibase in itwikisource Enabling itwiki, itwikiquote, itwikivoyage and commonswiki as other projects. bug: 63993 Change-Id: Idbc0d0bc616e83fe768996cbec168216517a96f9 --- M wmf-config/InitialiseSettings.php 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/23/126223/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index df8d668..e7c6b17 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -12751,6 +12751,9 @@ 'ilowiki' = array( 'sort' = 'alphabetic', ), + 'itwikisource' = array( + 'otherProjectsLinks' = array( 'itwiki', 'itwikiquote', 'commonswiki', 'itwikivoyage' ), + ), 'lbwiki' = array( 'sort' = 'alphabetic', ), -- To view, visit https://gerrit.wikimedia.org/r/126223 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idbc0d0bc616e83fe768996cbec168216517a96f9 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Ricordisamoa ricordisa...@live.it ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add routing classes - change (mediawiki...MultimediaViewer)
jenkins-bot has submitted this change and it was merged. Change subject: Add routing classes .. Add routing classes Adds a Route class hierarchy for various URL schemes and a Router class to convert Route classes to and from URLs. Right now we only have two(-ish) schemes, but in the future we want to be able to show related images which are not present on the current page and need shareable URLs for those as well; also we might want to specify other things in the URL than the current image (the reuse box being open was one thing discussed); this will be a good framework to add features like that. The MainFileRoute class will be used by #416. Change-Id: I489126a0ada37f91a22a2f48a4e686140a28d162 Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/371 --- M MultimediaViewer.php M MultimediaViewerHooks.php A resources/mmv/routing/mmv.routing.MainFileRoute.js A resources/mmv/routing/mmv.routing.Route.js A resources/mmv/routing/mmv.routing.Router.js A resources/mmv/routing/mmv.routing.ThumbnailRoute.js A resources/mmv/routing/mmv.routing.js M tests/qunit/mmv/mmv.testhelpers.js A tests/qunit/mmv/routing/mmv.routing.MainFileRoute.test.js A tests/qunit/mmv/routing/mmv.routing.Router.test.js A tests/qunit/mmv/routing/mmv.routing.ThumbnailRoute.test.js 11 files changed, 561 insertions(+), 3 deletions(-) Approvals: Gilles: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/MultimediaViewer.php b/MultimediaViewer.php index c5e9438..236863b 100644 --- a/MultimediaViewer.php +++ b/MultimediaViewer.php @@ -238,6 +238,21 @@ ), ), + 'mmv.routing' = $wgMediaViewerResourceTemplate + array( + 'scripts' = array( + 'mmv/routing/mmv.routing.js', + 'mmv/routing/mmv.routing.Route.js', + 'mmv/routing/mmv.routing.ThumbnailRoute.js', + 'mmv/routing/mmv.routing.MainFileRoute.js', + 'mmv/routing/mmv.routing.Router.js', + ), + + 'dependencies' = array( + 'mediawiki.Title', + 'oojs', + ), + ), + 'mmv.base' = $wgMediaViewerResourceTemplate + array( 'scripts' = array( 'mmv/mmv.base.js', diff --git a/MultimediaViewerHooks.php b/MultimediaViewerHooks.php index 45daec7..cc0d104 100644 --- a/MultimediaViewerHooks.php +++ b/MultimediaViewerHooks.php @@ -201,6 +201,9 @@ 'tests/qunit/mmv/provider/mmv.provider.ThumbnailInfo.test.js', 'tests/qunit/mmv/provider/mmv.provider.UserInfo.test.js', 'tests/qunit/mmv/provider/mmv.provider.Image.test.js', + 'tests/qunit/mmv/routing/mmv.routing.MainFileRoute.test.js', + 'tests/qunit/mmv/routing/mmv.routing.ThumbnailRoute.test.js', + 'tests/qunit/mmv/routing/mmv.routing.Router.test.js', 'tests/qunit/mmv/ui/mmv.ui.test.js', 'tests/qunit/mmv/ui/mmv.ui.canvas.test.js', 'tests/qunit/mmv/ui/mmv.ui.canvasButtons.test.js', @@ -225,6 +228,7 @@ 'mmv.ui.reuse.share', 'mmv.ui.reuse.embed', 'mmv.ui.reuse.download', + 'mmv.routing', ), 'localBasePath' = __DIR__, 'remoteExtPath' = 'MultimediaViewer', diff --git a/resources/mmv/routing/mmv.routing.MainFileRoute.js b/resources/mmv/routing/mmv.routing.MainFileRoute.js new file mode 100644 index 000..042d0d6 --- /dev/null +++ b/resources/mmv/routing/mmv.routing.MainFileRoute.js @@ -0,0 +1,29 @@ +/* + * This file is part of the MediaWiki extension MediaViewer. + * + * MediaViewer is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * MediaViewer is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with MediaViewer. If not, see http://www.gnu.org/licenses/. + */ + +( function( mw, oo ) { + /** +* @class mw.mmv.routing.MainFileRoute +* @extends mw.mmv.routing.Route +* Route for showing the main image on the page,
[MediaWiki-commits] [Gerrit] decom virt5-11, pmtpa compute nodes - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: decom virt5-11, pmtpa compute nodes .. decom virt5-11, pmtpa compute nodes remove from puppet remove from DHCP remove from ganglia config Change-Id: I413779fcd5130fc3103c86bd92a5cc3d0f73c12f --- M manifests/ganglia.pp M manifests/site.pp M modules/install-server/files/dhcpd/linux-host-entries.ttyS0-115200 3 files changed, 1 insertion(+), 52 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/manifests/ganglia.pp b/manifests/ganglia.pp index 9da45bb..0b7d64d 100644 --- a/manifests/ganglia.pp +++ b/manifests/ganglia.pp @@ -299,7 +299,7 @@ 'SSL cluster esams' = 'hooft.esams.wikimedia.org:11675 ssl3001.esams.wikimedia.org ssl3002.esams.wikimedia.org', 'Swift pmtpa'= 'ms-fe1.pmtpa.wmnet ms-fe2.pmtpa.wmnet', 'Virtualization cluster eqiad' = 'labnet1001.eqiad.wmnet virt1000.wikimedia.org', -'Virtualization cluster pmtpa' = 'virt5.pmtpa.wmnet virt0.wikimedia.org', +'Virtualization cluster pmtpa' = 'virt0.wikimedia.org', 'Glusterfs cluster pmtpa'= 'labstore1.pmtpa.wmnet labstore2.pmtpa.wmnet', 'MySQL eqiad'= 'db1056.eqiad.wmnet db1021.eqiad.wmnet', 'LVS loadbalancers eqiad'= 'lvs1001.wikimedia.org lvs1002.wikimedia.org', diff --git a/manifests/site.pp b/manifests/site.pp index a965d2b..14b7d24 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -2808,22 +2808,6 @@ include role::nova::api } -node /virt([5-9]|1[0-1]).pmtpa.wmnet/ { -$cluster = 'virt' -if $::hostname =~ /^virt5$/ { - -$ganglia_aggregator = true -} - -$openstack_version = 'folsom' -$use_neutron = false - -include admins::labs - -include standard -include role::nova::compute -} - node 'labnet1001.eqiad.wmnet' { $cluster = 'virt' $openstack_version = 'havana' diff --git a/modules/install-server/files/dhcpd/linux-host-entries.ttyS0-115200 b/modules/install-server/files/dhcpd/linux-host-entries.ttyS0-115200 index 639368c..bc1d8e8 100644 --- a/modules/install-server/files/dhcpd/linux-host-entries.ttyS0-115200 +++ b/modules/install-server/files/dhcpd/linux-host-entries.ttyS0-115200 @@ -115,41 +115,6 @@ fixed-address virt1009.eqiad.wmnet; } -host virt5 { - hardware ethernet 88:43:e1:c2:86:40; - fixed-address virt5.pmtpa.wmnet; -} - -host virt6 { - hardware ethernet 88:43:E1:C2:57:EE; - fixed-address virt6.pmtpa.wmnet; -} - -host virt7 { - hardware ethernet 88:43:E1:C2:77:DE; - fixed-address virt7.pmtpa.wmnet; -} - -host virt8 { - hardware ethernet 00:22:BD:D3:61:7E; - fixed-address virt8.pmtpa.wmnet; -} - -host virt9 { - hardware ethernet 00:22:BD:D3:37:E4; - fixed-address virt9.pmtpa.wmnet; -} - -host virt10 { - hardware ethernet 88:43:E1:C2:5D:AC; - fixed-address virt10.pmtpa.wmnet; -} - -host virt11 { - hardware ethernet 88:43:E1:C2:4C:56; - fixed-address virt11.pmtpa.wmnet; -} - host virt15 { hardware ethernet 88:43:E1:C2:7B:6C; fixed-address virt15.pmtpa.wmnet; -- To view, visit https://gerrit.wikimedia.org/r/126222 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I413779fcd5130fc3103c86bd92a5cc3d0f73c12f Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn dz...@wikimedia.org Gerrit-Reviewer: Andrew Bogott abog...@wikimedia.org Gerrit-Reviewer: Dzahn dz...@wikimedia.org Gerrit-Reviewer: Matanya mata...@foss.co.il Gerrit-Reviewer: Reedy re...@wikimedia.org Gerrit-Reviewer: coren mpellet...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] reapply scores on trivial rebases/patchsets - change (All-Projects)
QChris has submitted this change and it was merged. Change subject: reapply scores on trivial rebases/patchsets .. reapply scores on trivial rebases/patchsets Recent Gerrit version comes with the ability to reapply previous votes on a Change when a new patchset is uploaded. Lets copy Code-Review scores whenever only the parent commit change or when no code changed. Verified is not impacted since we will still retrigger tests on rebase. Configuration reference: https://gerrit.wikimedia.org/r/Documentation/config-labels.html#label_copyAllScoresOnTrivialRebase See also: http://lists.wikimedia.org/pipermail/wikitech-l/2014-April/075834.html Bug: 41074 Change-Id: Ia50bbd74d978d77a5fffadeec5f1a823b2610d6d --- M project.config 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Chad: Looks good to me, but someone else must approve QChris: Verified; Looks good to me, approved diff --git a/project.config b/project.config index a950f4a..19332d2 100644 --- a/project.config +++ b/project.config @@ -77,6 +77,8 @@ value = 0 No score value = +1 Looks good to me, but someone else must approve value = +2 Looks good to me, approved + copyAllScoresOnTrivialRebase = true + copyAllScoresIfNoCodeChange = true [access refs/meta/dashboards/*] create = group Project Owners create = group platform-engineering -- To view, visit https://gerrit.wikimedia.org/r/124891 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia50bbd74d978d77a5fffadeec5f1a823b2610d6d Gerrit-PatchSet: 2 Gerrit-Project: All-Projects Gerrit-Branch: refs/meta/config Gerrit-Owner: Hashar has...@free.fr Gerrit-Reviewer: Chad ch...@wikimedia.org Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: QChris christ...@quelltextlich.at ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Replace current URL generation logic with routing classes - change (mediawiki...MultimediaViewer)
jenkins-bot has submitted this change and it was merged. Change subject: Replace current URL generation logic with routing classes .. Replace current URL generation logic with routing classes * deduplicates URL generating/parsing code * gets rid of spaces in URLs * fixes error for file names with / in them (in case they exist; current MediaWiki seems to disallow such names anyway) Change-Id: I5aad43f6af1b99523c597c39befcc9db1ecab83a Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/371 --- M MultimediaViewer.php M MultimediaViewerHooks.php M resources/mmv/mmv.EmbedFileFormatter.js M resources/mmv/mmv.bootstrap.js M resources/mmv/mmv.js M resources/mmv/ui/mmv.ui.reuse.share.js M tests/qunit/mmv/mmv.bootstrap.test.js M tests/qunit/mmv/mmv.test.js M tests/qunit/mmv/ui/mmv.ui.reuse.share.test.js 9 files changed, 38 insertions(+), 18 deletions(-) Approvals: Gilles: Looks good to me, approved jenkins-bot: Verified diff --git a/MultimediaViewer.php b/MultimediaViewer.php index 236863b..78ac77a 100644 --- a/MultimediaViewer.php +++ b/MultimediaViewer.php @@ -471,6 +471,7 @@ 'dependencies' = array( 'mmv.base', + 'mmv.routing', 'oojs', 'mmv.HtmlUtils', ), @@ -540,6 +541,7 @@ 'dependencies' = array( 'mmv.ui.reuse.tab', 'mmv.ui.reuse.utils', + 'mmv.routing', 'oojs', 'oojs-ui', ), @@ -686,6 +688,7 @@ 'mmv.model.TaskQueue', 'mmv.lightboxinterface', 'mmv.provider', + 'mmv.routing', 'jquery.fullscreen', 'jquery.hidpi', 'jquery.scrollTo', diff --git a/MultimediaViewerHooks.php b/MultimediaViewerHooks.php index cc0d104..fb5e32b 100644 --- a/MultimediaViewerHooks.php +++ b/MultimediaViewerHooks.php @@ -228,7 +228,6 @@ 'mmv.ui.reuse.share', 'mmv.ui.reuse.embed', 'mmv.ui.reuse.download', - 'mmv.routing', ), 'localBasePath' = __DIR__, 'remoteExtPath' = 'MultimediaViewer', diff --git a/resources/mmv/mmv.EmbedFileFormatter.js b/resources/mmv/mmv.EmbedFileFormatter.js index 93766e3..7297114 100644 --- a/resources/mmv/mmv.EmbedFileFormatter.js +++ b/resources/mmv/mmv.EmbedFileFormatter.js @@ -26,6 +26,11 @@ function EmbedFileFormatter() { /** @property {mw.mmv.HtmlUtils} htmlUtils - */ this.htmlUtils = new mw.mmv.HtmlUtils(); + + /** +* @property {mw.mmv.routing.Router} router - +*/ + this.router = new mw.mmv.routing.Router(); } EFFP = EmbedFileFormatter.prototype; @@ -167,13 +172,12 @@ }; /** -* Generare a link which we will be using for sharing stuff. -* FIXME this should be handled by mmv.js to be DRY -* +* Generate a link which we will be using for sharing stuff. * @param {mw.mmv.model.EmbedFileInfo} info */ EFFP.getLinkUrl = function ( info ) { - return info.imageInfo.descriptionUrl + '#mediaviewer/' + info.imageInfo.title.getMainText(); + var route = new mw.mmv.routing.ThumbnailRoute( info.imageInfo.title ); + return this.router.createHashedUrl( route, info.imageInfo.descriptionUrl ); }; mw.mmv.EmbedFileFormatter = EmbedFileFormatter; diff --git a/resources/mmv/mmv.bootstrap.js b/resources/mmv/mmv.bootstrap.js index 3722b8e..42eb17f 100755 --- a/resources/mmv/mmv.bootstrap.js +++ b/resources/mmv/mmv.bootstrap.js @@ -235,7 +235,7 @@ } this.loadViewer().then( function ( viewer ) { - viewer.loadImageByTitle( title.getPrefixedText(), true ); + viewer.loadImageByTitle( title, true ); } ); e.preventDefault(); diff --git a/resources/mmv/mmv.js b/resources/mmv/mmv.js index e55288b..fb38bb5 100755 --- a/resources/mmv/mmv.js +++ b/resources/mmv/mmv.js @@ -80,9 +80,14 @@ /** * Image index on page. -* @type {number} +* @property {number} */ this.currentIndex = 0; + + /** +* @property {mw.mmv.routing.Router} router - +*/ + this.router = new mw.mmv.routing.Router(); /** * UI object used to display the pictures in the page. @@ -318,7 +323,7 @@
[MediaWiki-commits] [Gerrit] [DO NOT SUBMIT] Score Test 2/2 - change (test/gerrit-ping)
QChris has uploaded a new change for review. https://gerrit.wikimedia.org/r/126225 Change subject: [DO NOT SUBMIT] Score Test 2/2 .. [DO NOT SUBMIT] Score Test 2/2 Change-Id: If8cbac4474c81c211c6bddeb5775f5c7cc98176c --- A fileB 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/test/gerrit-ping refs/changes/25/126225/1 diff --git a/fileB b/fileB new file mode 100644 index 000..78ed112 --- /dev/null +++ b/fileB @@ -0,0 +1 @@ +fileB -- To view, visit https://gerrit.wikimedia.org/r/126225 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If8cbac4474c81c211c6bddeb5775f5c7cc98176c Gerrit-PatchSet: 1 Gerrit-Project: test/gerrit-ping Gerrit-Branch: master Gerrit-Owner: QChris christ...@quelltextlich.at ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [DO NOT SUBMIT] Score Test 1/2 - change (test/gerrit-ping)
QChris has uploaded a new change for review. https://gerrit.wikimedia.org/r/126224 Change subject: [DO NOT SUBMIT] Score Test 1/2 .. [DO NOT SUBMIT] Score Test 1/2 Change-Id: I234e6868127333298c2a3c5c6376b5cfb0d513bc --- A fileA 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/test/gerrit-ping refs/changes/24/126224/1 diff --git a/fileA b/fileA new file mode 100644 index 000..ab47708 --- /dev/null +++ b/fileA @@ -0,0 +1 @@ +fileA -- To view, visit https://gerrit.wikimedia.org/r/126224 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I234e6868127333298c2a3c5c6376b5cfb0d513bc Gerrit-PatchSet: 1 Gerrit-Project: test/gerrit-ping Gerrit-Branch: master Gerrit-Owner: QChris christ...@quelltextlich.at ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] TextExtracts: Add classes and elements to the exclusion list - change (operations/mediawiki-config)
Prtksxna has uploaded a new change for review. https://gerrit.wikimedia.org/r/126226 Change subject: TextExtracts: Add classes and elements to the exclusion list .. TextExtracts: Add classes and elements to the exclusion list Bug: 63164 Change-Id: Id6f7e8ba1b3e34b42fa076ba61cc6afafd828fdb --- M wmf-config/InitialiseSettings.php 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/26/126226/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index df8d668..83e0f9c 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -11185,6 +11185,7 @@ 'base' = array( ), 'HTML' = array( + 'dl', ), 'WML' = array( '.topicon', @@ -11195,6 +11196,9 @@ '#coordinates', 'span.geo-multi-punct', 'span.geo-nondefault', + '.topbanner', + '.dablink', + '.noexcerpt', ), ), ), -- To view, visit https://gerrit.wikimedia.org/r/126226 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id6f7e8ba1b3e34b42fa076ba61cc6afafd828fdb Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Prtksxna psax...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] CX Entrypoint plugin and interlanguage red link - change (mediawiki...ContentTranslation)
jenkins-bot has submitted this change and it was merged. Change subject: CX Entrypoint plugin and interlanguage red link .. CX Entrypoint plugin and interlanguage red link Change-Id: If9da07ee0dfd75f38b15608a1bddb0d098c3c9ee --- M ContentTranslation.hooks.php M ContentTranslation.php M Resources.php M i18n/en.json M i18n/qqq.json A modules/entrypoint/ext.cx.entrypoint.js A modules/entrypoint/ext.cx.redlink.js A modules/entrypoint/images/close.png A modules/entrypoint/images/close.svg A modules/entrypoint/styles/ext.cx.entrypoint.less R modules/entrypoint/styles/ext.cx.redlink.less D modules/redlink/ext.cx.redlink.js M modules/translation/ext.cx.translation.js M tests/browser/features/red_link_anon.feature A tests/browser/features/red_link_dialog.feature M tests/browser/features/red_link_logged_in.feature M tests/browser/features/special_content_translation.feature M tests/browser/features/step_definitions/red_link_steps.rb M tests/browser/features/step_definitions/special_content_translation_steps.rb M tests/browser/features/support/pages/content_translation_page.rb A tests/browser/features/support/pages/page_creation_page.rb M tests/browser/features/support/pages/red_link_page.rb 22 files changed, 651 insertions(+), 93 deletions(-) Approvals: Santhosh: Looks good to me, approved jenkins-bot: Verified diff --git a/ContentTranslation.hooks.php b/ContentTranslation.hooks.php index 8c1359e..b47e359 100644 --- a/ContentTranslation.hooks.php +++ b/ContentTranslation.hooks.php @@ -46,11 +46,11 @@ * @return bool */ public static function addConfig( $vars ) { - global $wgContentTranslationServerURL; + global $wgContentTranslationServerURL, $wgContentTranslationDomainTemplate; $vars['wgContentTranslationServerURL'] = $wgContentTranslationServerURL; + $vars['wgContentTranslationDomainTemplate'] = $wgContentTranslationDomainTemplate; return true; } - } diff --git a/ContentTranslation.php b/ContentTranslation.php index 42ce5c0..cdb0cc1 100644 --- a/ContentTranslation.php +++ b/ContentTranslation.php @@ -94,3 +94,11 @@ * The EventLogging extension must be installed if this option is enabled. */ $GLOBALS['wgContentTranslationEventLogging'] = false; + +/** + * Domain template for starting an article in a foreign language. + * This is used when starting an article from scratch. + * $1 is replaced with the language code. + * The default is for Wikipedia. + */ +$GLOBALS['wgContentTranslationDomainTemplate'] = $1.wikipedia.org; diff --git a/Resources.php b/Resources.php index 84c2de3..619809b 100644 --- a/Resources.php +++ b/Resources.php @@ -142,12 +142,27 @@ ) + $resourcePaths; $wgResourceModules['ext.cx.redlink'] = array( - 'scripts' = 'redlink/ext.cx.redlink.js', - 'styles' = 'redlink/styles/ext.cx.redlink.less', + 'scripts' = 'entrypoint/ext.cx.redlink.js', + 'styles' = 'entrypoint/styles/ext.cx.redlink.less', 'messages' = array( 'cx-redlink-title', ), 'dependencies' = array( + 'ext.cx.entrypoint', + 'mediawiki.jqueryMsg', + ), +) + $resourcePaths; + +$wgResourceModules['ext.cx.entrypoint'] = array( + 'scripts' = 'entrypoint/ext.cx.entrypoint.js', + 'styles' = 'entrypoint/styles/ext.cx.entrypoint.less', + 'messages' = array( + 'cx-entrypoint-dialog-page-doesnt-exist-yet', + 'cx-entrypoint-dialog-title-in', + 'cx-entrypoint-dialog-button-create-from-scratch', + 'cx-entrypoint-dialog-button-translate-from', + ), + 'dependencies' = array( 'mediawiki.jqueryMsg', ), ) + $resourcePaths; diff --git a/i18n/en.json b/i18n/en.json index 1a570b7..d8cbdd8 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -18,7 +18,11 @@ cx-publish-summary: Created by translating the page \$1\, tag-contenttranslation: ContentTranslation, cx-source-loading: Loading $1, -cx-redlink-title: Translate this page to $1, +cx-entrypoint-title: Translate this page to $1, +cx-entrypoint-dialog-page-doesnt-exist-yet: This page does not exist in $1 yet.br /\nDo you want to create it?, +cx-entrypoint-dialog-title-in: Title for the new page in $1:, +cx-entrypoint-dialog-button-create-from-scratch: Create from scratch, +cx-entrypoint-dialog-button-translate-from: Translate from $1, cx-special-login-error: You must be logged in to translate in this page., cx-tools-instructions-title: Create a translation, cx-tools-instructions-text1: Add paragraphs to translate, diff --git a/i18n/qqq.json b/i18n/qqq.json index 904d1b1..59c6b26 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -19,7 +19,11 @@ cx-publish-summary: Edit summary when creating the translated page.\n\nThis is an automatic edit summary for
[MediaWiki-commits] [Gerrit] rm wap.wikipedia.org apache site - change (operations/puppet)
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/126227 Change subject: rm wap.wikipedia.org apache site .. rm wap.wikipedia.org apache site RT #5003 unless you can see this actually being used by a class Change-Id: If34305989d4103b3c3a80d0f4dc65f8fda173c9d --- D files/apache/sites/wap.wikipedia.org 1 file changed, 0 insertions(+), 15 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/27/126227/1 diff --git a/files/apache/sites/wap.wikipedia.org b/files/apache/sites/wap.wikipedia.org deleted file mode 100644 index a60f093..000 --- a/files/apache/sites/wap.wikipedia.org +++ /dev/null @@ -1,15 +0,0 @@ -# -### THIS FILE IS MANAGED BY PUPPET -### puppet:///files/apache/sites/wap.wikipedia.org -# -# vim: filetype=apache - -VirtualHost *:80 - ServerAdmin r...@wikimedia.org - ServerName wap.wikipedia.org - ServerAlias *.wap.wikipedia.org - - RewriteEngine On - RewriteCond %{HTTP_HOST} (.*)wap.wikipedia.org - RewriteRule ^(.*)$ http://%1mobile.wikipedia.org$1 [R] -/VirtualHost -- To view, visit https://gerrit.wikimedia.org/r/126227 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If34305989d4103b3c3a80d0f4dc65f8fda173c9d Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn dz...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Zuul status page: version and last reconfig - change (integration/docroot)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/126228 Change subject: Zuul status page: version and last reconfig .. Zuul status page: version and last reconfig New versions of Zuul provides the server version and timestamp of last reconfiguration in the status.json. Display them. Code borrowed from OpenStack project. Also updates the sample files from upstream. Change-Id: I2f4dc7add000e387340203fe29e5a766d563b319 --- M org/wikimedia/integration/zuul/default.html M org/wikimedia/integration/zuul/sample-status-basic.json M org/wikimedia/integration/zuul/sample-status-openstack.json M org/wikimedia/integration/zuul/status.js 4 files changed, 23 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/docroot refs/changes/28/126228/1 diff --git a/org/wikimedia/integration/zuul/default.html b/org/wikimedia/integration/zuul/default.html index c7f275e..ba23be7 100644 --- a/org/wikimedia/integration/zuul/default.html +++ b/org/wikimedia/integration/zuul/default.html @@ -50,6 +50,10 @@ amp;target=alias(summarize(zuul.pipeline.gate-and-submit.current_changes.value,'1min'),'1min avg') amp;target=alias(summarize(zuul.pipeline.gate-and-submit.current_changes.value,'1h','max'),'hourly max') amp;title=Zuul%20gate%20pipeline / + + h4Zuul infos/h4 + Version: span id=zuul-version/spanbr/ + Last reconfigured: span id=zuul-last-reconfigured/span/br !-- -- /div diff --git a/org/wikimedia/integration/zuul/sample-status-basic.json b/org/wikimedia/integration/zuul/sample-status-basic.json index 4e12cd6..c88e5b7 100644 --- a/org/wikimedia/integration/zuul/sample-status-basic.json +++ b/org/wikimedia/integration/zuul/sample-status-basic.json @@ -1,4 +1,5 @@ { +last_reconfigured: 1389381756000, message: Example error message, pipelines: [ { @@ -172,5 +173,6 @@ }, result_event_queue: { length: 0 -} +}, +zuul_version: 2.0.0.19 } diff --git a/org/wikimedia/integration/zuul/sample-status-openstack.json b/org/wikimedia/integration/zuul/sample-status-openstack.json index 5d16bdd..41c231a 100644 --- a/org/wikimedia/integration/zuul/sample-status-openstack.json +++ b/org/wikimedia/integration/zuul/sample-status-openstack.json @@ -1,4 +1,5 @@ { +last_reconfigured: 1389381756000, pipelines: [ { name: check, @@ -306,5 +307,6 @@ }, result_event_queue: { length: 0 -} +}, +zuul_version: 2.0.0.19 } diff --git a/org/wikimedia/integration/zuul/status.js b/org/wikimedia/integration/zuul/status.js index b00fde9..0761990 100644 --- a/org/wikimedia/integration/zuul/status.js +++ b/org/wikimedia/integration/zuul/status.js @@ -77,7 +77,7 @@ cache: false }) .done(function (data) { - var html = ''; + var html = '', last_reconfigured; data = data || {}; if ('message' in data) { @@ -104,6 +104,18 @@ $('#zuul-resulteventqueue-length').text( data.result_event_queue ? data.result_event_queue.length : '0' ); + + // Borrowed from OpenStack + $('#zuul-version').text( + data.zuul_version ? data.zuul_version : 'unknown' + ); + if ('last_reconfigured' in data) { + last_reconfigured = new Date(data.last_reconfigured); + $('#zuul-last-reconfigured').text( + last_reconfigured.toString() + ); + } + }) .fail(function (err, jqXHR, errMsg) { $msg.text(source + ': ' + errMsg).show(); -- To view, visit https://gerrit.wikimedia.org/r/126228 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2f4dc7add000e387340203fe29e5a766d563b319 Gerrit-PatchSet: 1 Gerrit-Project: integration/docroot Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Zuul status page: version and last reconfig - change (integration/docroot)
jenkins-bot has submitted this change and it was merged. Change subject: Zuul status page: version and last reconfig .. Zuul status page: version and last reconfig New versions of Zuul provides the server version and timestamp of last reconfiguration in the status.json. Display them. Code borrowed from OpenStack project. Also updates the sample files from upstream. Change-Id: I2f4dc7add000e387340203fe29e5a766d563b319 --- M org/wikimedia/integration/zuul/default.html M org/wikimedia/integration/zuul/sample-status-basic.json M org/wikimedia/integration/zuul/sample-status-openstack.json M org/wikimedia/integration/zuul/status.js 4 files changed, 23 insertions(+), 3 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/org/wikimedia/integration/zuul/default.html b/org/wikimedia/integration/zuul/default.html index c7f275e..ba23be7 100644 --- a/org/wikimedia/integration/zuul/default.html +++ b/org/wikimedia/integration/zuul/default.html @@ -50,6 +50,10 @@ amp;target=alias(summarize(zuul.pipeline.gate-and-submit.current_changes.value,'1min'),'1min avg') amp;target=alias(summarize(zuul.pipeline.gate-and-submit.current_changes.value,'1h','max'),'hourly max') amp;title=Zuul%20gate%20pipeline / + + h4Zuul infos/h4 + Version: span id=zuul-version/spanbr/ + Last reconfigured: span id=zuul-last-reconfigured/span/br !-- -- /div diff --git a/org/wikimedia/integration/zuul/sample-status-basic.json b/org/wikimedia/integration/zuul/sample-status-basic.json index 4e12cd6..c88e5b7 100644 --- a/org/wikimedia/integration/zuul/sample-status-basic.json +++ b/org/wikimedia/integration/zuul/sample-status-basic.json @@ -1,4 +1,5 @@ { +last_reconfigured: 1389381756000, message: Example error message, pipelines: [ { @@ -172,5 +173,6 @@ }, result_event_queue: { length: 0 -} +}, +zuul_version: 2.0.0.19 } diff --git a/org/wikimedia/integration/zuul/sample-status-openstack.json b/org/wikimedia/integration/zuul/sample-status-openstack.json index 5d16bdd..41c231a 100644 --- a/org/wikimedia/integration/zuul/sample-status-openstack.json +++ b/org/wikimedia/integration/zuul/sample-status-openstack.json @@ -1,4 +1,5 @@ { +last_reconfigured: 1389381756000, pipelines: [ { name: check, @@ -306,5 +307,6 @@ }, result_event_queue: { length: 0 -} +}, +zuul_version: 2.0.0.19 } diff --git a/org/wikimedia/integration/zuul/status.js b/org/wikimedia/integration/zuul/status.js index 18475c5..b802381 100644 --- a/org/wikimedia/integration/zuul/status.js +++ b/org/wikimedia/integration/zuul/status.js @@ -77,7 +77,7 @@ cache: false }) .done(function (data) { - var html = ''; + var html = '', last_reconfigured; data = data || {}; if ('message' in data) { @@ -104,6 +104,18 @@ $('#zuul-resulteventqueue-length').text( data.result_event_queue ? data.result_event_queue.length : '0' ); + + // Borrowed from OpenStack + $('#zuul-version').text( + data.zuul_version ? data.zuul_version : 'unknown' + ); + if ('last_reconfigured' in data) { + last_reconfigured = new Date(data.last_reconfigured); + $('#zuul-last-reconfigured').text( + last_reconfigured.toString() + ); + } + }) .fail(function (err, jqXHR, errMsg) { $msg.text(source + ': ' + errMsg).show(); -- To view, visit https://gerrit.wikimedia.org/r/126228 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2f4dc7add000e387340203fe29e5a766d563b319 Gerrit-PatchSet: 2 Gerrit-Project: integration/docroot Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: Krinkle krinklem...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] zuul: remove push_change_refs setting - change (operations/puppet)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/126229 Change subject: zuul: remove push_change_refs setting .. zuul: remove push_change_refs setting I have upgraded Zuul and the new version no more supports the push_change_refs settings (was meant to push Zuul references back to Gerrit which we never used). Can be merged at anytime. Bug: 63994 Change-Id: Ia6c252db82945f471da7d0d27e015ede1c7abf4f --- M manifests/role/zuul.pp M manifests/zuul.pp M modules/zuul/manifests/init.pp M modules/zuul/templates/zuul.conf.erb 4 files changed, 0 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/29/126229/1 diff --git a/manifests/role/zuul.pp b/manifests/role/zuul.pp index 8401c44..38788fe 100644 --- a/manifests/role/zuul.pp +++ b/manifests/role/zuul.pp @@ -39,7 +39,6 @@ config_git_branch= 'labs', git_branch = 'labs', git_dir = $role::zuul::configuration::zuul_git_dir, -push_change_refs = false, statsd_host = '', } @@ -83,7 +82,6 @@ config_git_branch= 'master', git_branch = 'master', git_dir = $role::zuul::configuration::zuul_git_dir, -push_change_refs = false, statsd_host = 'statsd.eqiad.wmnet', } diff --git a/manifests/zuul.pp b/manifests/zuul.pp index 99e0486..cc8a2c1 100644 --- a/manifests/zuul.pp +++ b/manifests/zuul.pp @@ -17,7 +17,6 @@ $config_git_branch='master', $git_branch='master', $git_dir='/var/lib/zuul/git', -$push_change_refs = false, $statsd_host = '' ) { @@ -40,7 +39,6 @@ zuul_url = $zuul_url, git_branch = $git_branch, git_dir = $git_dir, -push_change_refs = $push_change_refs, statsd_host = $statsd_host, } diff --git a/modules/zuul/manifests/init.pp b/modules/zuul/manifests/init.pp index d7d5cc0..a90d300 100644 --- a/modules/zuul/manifests/init.pp +++ b/modules/zuul/manifests/init.pp @@ -23,7 +23,6 @@ $git_source_repo = 'https://gerrit.wikimedia.org/r/p/integration/zuul.git', $git_branch = 'master', $git_dir = '/var/lib/zuul/git', -$push_change_refs = false, $statsd_host = '', ) { diff --git a/modules/zuul/templates/zuul.conf.erb b/modules/zuul/templates/zuul.conf.erb index 1eb2b42..7bb5c7a 100644 --- a/modules/zuul/templates/zuul.conf.erb +++ b/modules/zuul/templates/zuul.conf.erb @@ -21,7 +21,6 @@ log_config=/etc/zuul/logging.conf state_dir=/var/lib/zuul git_dir=%= @git_dir % -push_change_refs=%= @push_change_refs % url_pattern=%= @url_pattern % status_url=%= @status_url % zuul_url=%= @zuul_url % -- To view, visit https://gerrit.wikimedia.org/r/126229 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia6c252db82945f471da7d0d27e015ede1c7abf4f Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Hashar has...@free.fr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Enable MediaViewer user surveys on first batch of pilot sites - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Enable MediaViewer user surveys on first batch of pilot sites .. Enable MediaViewer user surveys on first batch of pilot sites (Soft) depends on Ia9d53b6a3caedecd05429e5285765b1c5098342e Change-Id: I7efa372fd6ceeeb049449bfcc49e19037b61a4a9 --- M wmf-config/InitialiseSettings.php 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Gilles: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index df8d668..a75e780 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -10755,6 +10755,10 @@ 'default' = false, // TODO disable 2014-05-10 'mediawikiwiki' = true, + // TODO disable 2014-05-17 + 'cawiki' = true, + 'huwiki' = true, + 'enwikivoyage' = true, ), 'wmgNetworkPerformanceSamplingFactor' = array( -- To view, visit https://gerrit.wikimedia.org/r/126190 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7efa372fd6ceeeb049449bfcc49e19037b61a4a9 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Gergő Tisza gti...@wikimedia.org Gerrit-Reviewer: Gilles gdu...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] contint: soften python-voluptuous version requirement - change (operations/puppet)
Alexandros Kosiaris has submitted this change and it was merged. Change subject: contint: soften python-voluptuous version requirement .. contint: soften python-voluptuous version requirement Alexandros has build version of 0.8.2-1wmf1 of python-voluptuous so we can upgrade Zuul. Remove the version constraint in puppet so we can get 0.8.2-1wm1 installed. Change-Id: I6354f0385917cf5c4847e74e7ee734a01a56cf18 --- M modules/zuul/manifests/init.pp 1 file changed, 1 insertion(+), 4 deletions(-) Approvals: Alexandros Kosiaris: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/zuul/manifests/init.pp b/modules/zuul/manifests/init.pp index 679fcf5..d7d5cc0 100644 --- a/modules/zuul/manifests/init.pp +++ b/modules/zuul/manifests/init.pp @@ -59,11 +59,8 @@ ensure = present, } - # We have packaged the python voluptuous module under - # operations/debs/python-voluptuous. Zuul does not work - # AT ALL with version 0.7 so make sure we have 0.6.x package { 'python-voluptuous': -ensure = '0.6.1-1~wmf1', +ensure = present, } # Used to be in /var/lib/git/zuul but /var/lib/git can be used -- To view, visit https://gerrit.wikimedia.org/r/126221 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6354f0385917cf5c4847e74e7ee734a01a56cf18 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Hashar has...@free.fr Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] zuul: remove push_change_refs setting - change (operations/puppet)
Alexandros Kosiaris has submitted this change and it was merged. Change subject: zuul: remove push_change_refs setting .. zuul: remove push_change_refs setting I have upgraded Zuul and the new version no more supports the push_change_refs settings (was meant to push Zuul references back to Gerrit which we never used). Can be merged at anytime. Bug: 63994 Change-Id: Ia6c252db82945f471da7d0d27e015ede1c7abf4f --- M manifests/role/zuul.pp M manifests/zuul.pp M modules/zuul/manifests/init.pp M modules/zuul/templates/zuul.conf.erb 4 files changed, 0 insertions(+), 6 deletions(-) Approvals: Alexandros Kosiaris: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/zuul.pp b/manifests/role/zuul.pp index 8401c44..38788fe 100644 --- a/manifests/role/zuul.pp +++ b/manifests/role/zuul.pp @@ -39,7 +39,6 @@ config_git_branch= 'labs', git_branch = 'labs', git_dir = $role::zuul::configuration::zuul_git_dir, -push_change_refs = false, statsd_host = '', } @@ -83,7 +82,6 @@ config_git_branch= 'master', git_branch = 'master', git_dir = $role::zuul::configuration::zuul_git_dir, -push_change_refs = false, statsd_host = 'statsd.eqiad.wmnet', } diff --git a/manifests/zuul.pp b/manifests/zuul.pp index 99e0486..cc8a2c1 100644 --- a/manifests/zuul.pp +++ b/manifests/zuul.pp @@ -17,7 +17,6 @@ $config_git_branch='master', $git_branch='master', $git_dir='/var/lib/zuul/git', -$push_change_refs = false, $statsd_host = '' ) { @@ -40,7 +39,6 @@ zuul_url = $zuul_url, git_branch = $git_branch, git_dir = $git_dir, -push_change_refs = $push_change_refs, statsd_host = $statsd_host, } diff --git a/modules/zuul/manifests/init.pp b/modules/zuul/manifests/init.pp index d7d5cc0..a90d300 100644 --- a/modules/zuul/manifests/init.pp +++ b/modules/zuul/manifests/init.pp @@ -23,7 +23,6 @@ $git_source_repo = 'https://gerrit.wikimedia.org/r/p/integration/zuul.git', $git_branch = 'master', $git_dir = '/var/lib/zuul/git', -$push_change_refs = false, $statsd_host = '', ) { diff --git a/modules/zuul/templates/zuul.conf.erb b/modules/zuul/templates/zuul.conf.erb index 1eb2b42..7bb5c7a 100644 --- a/modules/zuul/templates/zuul.conf.erb +++ b/modules/zuul/templates/zuul.conf.erb @@ -21,7 +21,6 @@ log_config=/etc/zuul/logging.conf state_dir=/var/lib/zuul git_dir=%= @git_dir % -push_change_refs=%= @push_change_refs % url_pattern=%= @url_pattern % status_url=%= @status_url % zuul_url=%= @zuul_url % -- To view, visit https://gerrit.wikimedia.org/r/126229 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia6c252db82945f471da7d0d27e015ede1c7abf4f Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Hashar has...@free.fr Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Sanitize the jquery id for the translation section - change (mediawiki...ContentTranslation)
Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/126230 Change subject: Sanitize the jquery id for the translation section .. Sanitize the jquery id for the translation section Make sure we use a valid jquery selector. Change-Id: Id21ce64d80f8026274b258e4d3790e694f74cecf --- M modules/translation/ext.cx.translation.js 1 file changed, 15 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/30/126230/1 diff --git a/modules/translation/ext.cx.translation.js b/modules/translation/ext.cx.translation.js index add1daa..447a053 100644 --- a/modules/translation/ext.cx.translation.js +++ b/modules/translation/ext.cx.translation.js @@ -161,13 +161,24 @@ * @param {string} [prefix] id prefix */ function jquerySelectorForId( id, prefix ) { + var selector, randomId; + + randomId = '#' + prefix + ( Math.floor( Math.random() * 100 ) + 1 ); prefix = prefix || ''; if ( !id ) { - return '#' + prefix + ( Math.floor( Math.random() * 100 ) + 1 ); + selector = randomId; + } else { + // make it a string + id = id + ''; + selector = '#' + prefix + id.replace( /(:|\/|\.|\[|\])/g, '\\$1' ); } - // make it a string - id = id + ''; - return '#' + prefix + id.replace( /(:|\/|\.|\[|\])/g, '\\$1' ); + try { + // Make sure jQuery consider it as a valid selector. + $( selector ); + } catch ( error ) { + selector = randomId; + } + return selector; } function souceSectionClickHandler() { -- To view, visit https://gerrit.wikimedia.org/r/126230 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id21ce64d80f8026274b258e4d3790e694f74cecf Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove the empty sections and do not add placeholders for them - change (mediawiki...ContentTranslation)
Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/126231 Change subject: Remove the empty sections and do not add placeholders for them .. Remove the empty sections and do not add placeholders for them Change-Id: Ia896f6daafccbbfd66c985d5d25d220a8a0895ff --- M modules/translation/ext.cx.translation.js 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/31/126231/1 diff --git a/modules/translation/ext.cx.translation.js b/modules/translation/ext.cx.translation.js index 447a053..2436b95 100644 --- a/modules/translation/ext.cx.translation.js +++ b/modules/translation/ext.cx.translation.js @@ -212,7 +212,9 @@ $section = $( $sections[ i ] ); sourceSectionId = $section.attr( 'id' ); $sourceSection = $( jquerySelectorForId( sourceSectionId ) ); - if ( $sourceSection.height() === 0 ) { + if ( $sourceSection.height() === 0 || !$sourceSection.text().trim() ) { + $sourceSection.remove(); + $section.remove(); // Source section has height as 0. This indicates an empty // section - mainly resulting from spurious wikitext continue; -- To view, visit https://gerrit.wikimedia.org/r/126231 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia896f6daafccbbfd66c985d5d25d220a8a0895ff Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] remove WAP / beta.wap.wikipedia.org ? - change (operations/dns)
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/126232 Change subject: remove WAP / beta.wap.wikipedia.org ? .. remove WAP / beta.wap.wikipedia.org ? Change-Id: I5152ff336ca31a5cc13eea0fa3206de70e06e37c --- M templates/wikipedia.org 1 file changed, 0 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dns refs/changes/32/126232/1 diff --git a/templates/wikipedia.org b/templates/wikipedia.org index 1cb5900..4f89ec3 100644 --- a/templates/wikipedia.org +++ b/templates/wikipedia.org @@ -86,9 +86,5 @@ ; Mobile sites using the new ruby architecture written by hcatlin@ m 1H IN CNAMEm.wikimedia.org. -$ORIGIN wap.{{ zonename }}. -{{ langlist('mobile-lb.eqiad.wikimedia.org.') }} -beta 1H IN CNAMEwikipedia-lb.wikimedia.org. - $ORIGIN mobile.{{ zonename }}. {{ langlist('mobile-lb.eqiad.wikimedia.org.') }} -- To view, visit https://gerrit.wikimedia.org/r/126232 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5152ff336ca31a5cc13eea0fa3206de70e06e37c Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: Dzahn dz...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix bug when exiting Media Viewer while image is loading - change (mediawiki...MultimediaViewer)
Gilles has uploaded a new change for review. https://gerrit.wikimedia.org/r/126233 Change subject: Fix bug when exiting Media Viewer while image is loading .. Fix bug when exiting Media Viewer while image is loading Which would cause the image to never appear, even when reopening Media Viewer. The source of the issue was an uncaught exception in ThumbnailWidth. Unfortunately this cannot be covered by E2E because the image loads too fast in that context, and cucumber/selenium doesn't have time to catch the placeholder. Change-Id: I9386f6e857a7974166ddb5eeb7ea731d943eddcf Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/450 --- M resources/mmv/mmv.js 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MultimediaViewer refs/changes/33/126233/1 diff --git a/resources/mmv/mmv.js b/resources/mmv/mmv.js index fb38bb5..eba3dd9 100755 --- a/resources/mmv/mmv.js +++ b/resources/mmv/mmv.js @@ -499,6 +499,12 @@ this.thumbnailPreloadQueue = this.pushLightboxImagesIntoQueue( function( lightboxImage ) { return function() { + // viewer.ui.canvas.getLightboxImageWidths needs the viewer to be open + // because it needs to read the size of visible elements + if ( !viewer.isOpen ) { + return; + } + return viewer.fetchThumbnailForLightboxImage( lightboxImage, viewer.ui.canvas.getLightboxImageWidths( lightboxImage ).real -- To view, visit https://gerrit.wikimedia.org/r/126233 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9386f6e857a7974166ddb5eeb7ea731d943eddcf Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MultimediaViewer Gerrit-Branch: master Gerrit-Owner: Gilles gdu...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Mask the templates and make it not editable - change (mediawiki...ContentTranslation)
Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/126234 Change subject: Mask the templates and make it not editable .. Mask the templates and make it not editable Change-Id: I2a43e51893e94a2340fc4536e422c330fee90a62 --- M modules/translation/ext.cx.translation.js M modules/translation/styles/ext.cx.translation.less 2 files changed, 15 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/34/126234/1 diff --git a/modules/translation/ext.cx.translation.js b/modules/translation/ext.cx.translation.js index 2436b95..0135952 100644 --- a/modules/translation/ext.cx.translation.js +++ b/modules/translation/ext.cx.translation.js @@ -201,7 +201,7 @@ */ ContentTranslationEditor.prototype.addPlaceholders = function () { var cxSectionSelector = this.getSectionSelector(), - $content, + $content, template, $sections, i, $section, sourceSectionId, $sourceSection; // Clone the source article and work on this detached object @@ -209,6 +209,7 @@ $content = $( '.cx-column--source .cx-column__content' ).clone(); $sections = $content.find( cxSectionSelector ); for ( i = 0; i $sections.length; i++ ) { + template = false; $section = $( $sections[ i ] ); sourceSectionId = $section.attr( 'id' ); $sourceSection = $( jquerySelectorForId( sourceSectionId ) ); @@ -220,6 +221,13 @@ continue; } + // Mask the templates + if ( $sourceSection.attr( 'typeof' ) === 'mw:Transclusion' ) { + $section.addClass( 'cx-mw-template' ); + $sourceSection.addClass( 'cx-mw-template' ); + template = true; + } + $section.empty(); $section.css( { 'min-height': $sourceSection.height(), @@ -228,8 +236,8 @@ $section.attr( { 'id': 't' + sourceSectionId, 'data-source': sourceSectionId, - // Sections are editable - 'contenteditable': true + // Sections are editable if they are not templates + 'contenteditable': template ? false : true } ); // Attach event handlers for sections diff --git a/modules/translation/styles/ext.cx.translation.less b/modules/translation/styles/ext.cx.translation.less index 217db28..bf70c96 100644 --- a/modules/translation/styles/ext.cx.translation.less +++ b/modules/translation/styles/ext.cx.translation.less @@ -18,4 +18,8 @@ font-weight: lighter; color: #AAA; cursor: pointer; +} + +.cx-mw-template { + -webkit-mask-image: -webkit-linear-gradient(top, rgba(0,0,0,0.4), rgba(0,0,0,0.4)); } \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/126234 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2a43e51893e94a2340fc4536e422c330fee90a62 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] move LDAP admin permissions, tools out of site.pp - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: move LDAP admin permissions,tools out of site.pp .. move LDAP admin permissions,tools out of site.pp - it's ugly to do this on the node in site.pp - we want to find a replacement host for formey - make a role out of the existing stuff, then move it - removed sudo privs to run gerrit.sh - removed full root for gerrit admin (because if needed that should be in the gerrit class) - removed setting gid to 550 - removed $ssh_tcp_forwarding = 'no' $ssh_x11_forwarding = 'no' (per comments on PS4) RT #6134 Change-Id: I39f8f613f4266c1628d3692f9c2f446dbebf6d16 --- M manifests/admins.pp A manifests/role/ldap.pp M manifests/site.pp 3 files changed, 28 insertions(+), 18 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/manifests/admins.pp b/manifests/admins.pp index b4b8812..7c26e09 100644 --- a/manifests/admins.pp +++ b/manifests/admins.pp @@ -3908,3 +3908,20 @@ } } + +# permissions and users for LDAP operations +# (formerly in site.pp directly in node formey) +class admins::ldap { + +$sudo_privs = [ +'ALL = NOPASSWD: /usr/local/sbin/add-ldap-user', +'ALL = NOPASSWD: /usr/local/sbin/delete-ldap-user', +'ALL = NOPASSWD: /usr/local/sbin/modify-ldap-user', +'ALL = NOPASSWD: /usr/local/bin/svn-group', +'ALL = NOPASSWD: /usr/local/sbin/add-labs-user', +] + +sudo_user { [ 'robla', 'sumanah', 'reedy' ]: privileges = $sudo_privs } + +} + diff --git a/manifests/role/ldap.pp b/manifests/role/ldap.pp new file mode 100644 index 000..bf2ebda --- /dev/null +++ b/manifests/role/ldap.pp @@ -0,0 +1,10 @@ +# role for a host with LDAP admins and tools +# not necessarily LDAP server +class role::ldap::operations { + +class { 'ldap::role::client::labs': +ldapincludes = ['openldap', 'nss', 'utils'], +} + +include admins::ldap +} diff --git a/manifests/site.pp b/manifests/site.pp index 14b7d24..d367fc8 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -999,29 +999,12 @@ node 'formey.wikimedia.org' { -$sudo_privs = [ 'ALL = NOPASSWD: /usr/local/sbin/add-ldap-user', -'ALL = NOPASSWD: /usr/local/sbin/delete-ldap-user', -'ALL = NOPASSWD: /usr/local/sbin/modify-ldap-user', -'ALL = NOPASSWD: /usr/local/bin/svn-group', -'ALL = NOPASSWD: /usr/local/sbin/add-labs-user', -'ALL = NOPASSWD: /var/lib/gerrit2/review_site/bin/gerrit.sh' ] -sudo_user { [ 'robla', 'sumanah', 'reedy' ]: privileges = $sudo_privs } - -# full root for gerrit admin (RT-3698) -sudo_user { 'demon': privileges = ['ALL = NOPASSWD: ALL'] } - -$gid = '550' -$ldapincludes = ['openldap', 'nss', 'utils'] -$ssh_tcp_forwarding = 'no' -$ssh_x11_forwarding = 'no' include standard include webserver::php5 include backup::client include role::deployment::test +include role::ldap::operations -class { 'ldap::role::client::labs': -ldapincludes = $ldapincludes, -} } # gadolinium is the webrequest socat multicast relay. -- To view, visit https://gerrit.wikimedia.org/r/125721 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I39f8f613f4266c1628d3692f9c2f446dbebf6d16 Gerrit-PatchSet: 8 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn dz...@wikimedia.org Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org Gerrit-Reviewer: Chad ch...@wikimedia.org Gerrit-Reviewer: Dzahn dz...@wikimedia.org Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: Reedy re...@wikimedia.org Gerrit-Reviewer: RobLa ro...@wikimedia.org Gerrit-Reviewer: Sumanah suma...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Show error message when server connection failed - change (mediawiki...ContentTranslation)
jenkins-bot has submitted this change and it was merged. Change subject: Show error message when server connection failed .. Show error message when server connection failed Change-Id: I9d93c1f451d7fd325bbc9274a7fb39a4dc31374a --- M Resources.php M i18n/en.json M i18n/qqq.json M modules/base/ext.cx.datamanager.js M modules/header/ext.cx.header.render.js M modules/header/styles/ext.cx.header.less 6 files changed, 29 insertions(+), 4 deletions(-) Approvals: KartikMistry: Looks good to me, approved jenkins-bot: Verified diff --git a/Resources.php b/Resources.php index 84c2de3..a1c9085 100644 --- a/Resources.php +++ b/Resources.php @@ -50,8 +50,9 @@ 'ext.cx.publish', ), 'messages' = array( + 'cx-error-server-connection', 'cx-header-translation-center', - 'cx-publish-button' + 'cx-publish-button', ), ) + $resourcePaths; diff --git a/i18n/en.json b/i18n/en.json index 1a570b7..0659fb2 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -8,6 +8,7 @@ ] }, cx: Translate page, +cx-error-server-connection: Error: Could not connect to the server., cx-desc: A tool that allows editors to translate pages from one language to another with the help of machine translation and other translation tools, cx-header-progressbar-text: $1% translated, cx-header-translation-center: Translation center, diff --git a/i18n/qqq.json b/i18n/qqq.json index 904d1b1..39d6993 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -9,6 +9,7 @@ ] }, cx: {{doc-special|ContentTranslation}}, +cx-error-server-connection: Error message shown when connection to the content translation server is failed., cx-desc: {{desc|name=ContentTranslation|url=http://www.mediawiki.org/wiki/Extension:ContentTranslation}};, cx-header-progressbar-text: Text to be shown with the progress bar in [[Special:ContentTranslation]]. $1 is translation progress in percentage., cx-header-translation-center: Text for translation center title., diff --git a/modules/base/ext.cx.datamanager.js b/modules/base/ext.cx.datamanager.js index a404c73..79e815a 100644 --- a/modules/base/ext.cx.datamanager.js +++ b/modules/base/ext.cx.datamanager.js @@ -15,8 +15,12 @@ /* global io */ function initConnection() { + if ( !window.io ) { + return false; + } socket = io.connect( mw.config.get( 'wgContentTranslationServerURL' ) ); mw.log( '[CX] Connected to server' ); + return true; } function updateModel( data ) { @@ -27,7 +31,13 @@ mw.cx.connect = function () { if ( !socket ) { - initConnection(); + if ( !initConnection() ) { + // io not defined. Server is unreachable. + $( '.cx-header__infobar' ) + .text( mw.msg( 'cx-error-server-connection' ) ) + .show(); + return; + } } socket.emit( 'cx.init', { // FIXME diff --git a/modules/header/ext.cx.header.render.js b/modules/header/ext.cx.header.render.js index 2328bae..16cc732 100644 --- a/modules/header/ext.cx.header.render.js +++ b/modules/header/ext.cx.header.render.js @@ -13,7 +13,7 @@ mw.cx.ContentTranslationHeader.prototype.render = function () { var $logo, $userName, $userDetails, $headerBar, $publishButton, - $translationCenterLink, $translationCenter; + $translationCenterLink, $translationCenter, $infoBar; $logo = $( 'div' ).addClass( 'cx-header__logo' ); $userName = $( 'a' ) @@ -35,9 +35,12 @@ $headerBar = $( 'div' ) .addClass( 'cx-header__bar' ) .append( $translationCenter, $publishButton ); + $infoBar = $( 'div' ) + .addClass( 'cx-header__infobar' ) + .hide(); this.$container .addClass( 'cx-header' ) - .append( $logo, $userDetails, $headerBar ); + .append( $logo, $userDetails, $headerBar, $infoBar ); }; }( jQuery, mediaWiki ) ); diff --git a/modules/header/styles/ext.cx.header.less b/modules/header/styles/ext.cx.header.less index a909d11..4591efd 100644 --- a/modules/header/styles/ext.cx.header.less +++ b/modules/header/styles/ext.cx.header.less @@ -40,6 +40,15 @@ } } +.cx-header__infobar { + .mw-ui-item; + .mw-ui-one-whole; + padding: 10px; + color: #f00; + border-bottom: 1px solid #ddd; +
[MediaWiki-commits] [Gerrit] Remove slow array_unique from ReferencedEntitesFinder - change (mediawiki...Wikibase)
Adrian Lang has uploaded a new change for review. https://gerrit.wikimedia.org/r/126235 Change subject: Remove slow array_unique from ReferencedEntitesFinder .. Remove slow array_unique from ReferencedEntitesFinder The array in question is filled with EntityIds, which are expensive to compare. Change-Id: I08898a36f8582aec3560216ab48da94a465911ca --- M lib/includes/ReferencedEntitiesFinder.php 1 file changed, 5 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/35/126235/1 diff --git a/lib/includes/ReferencedEntitiesFinder.php b/lib/includes/ReferencedEntitiesFinder.php index 5ed157b..1d70d4d 100644 --- a/lib/includes/ReferencedEntitiesFinder.php +++ b/lib/includes/ReferencedEntitiesFinder.php @@ -30,7 +30,8 @@ foreach ( $snaks as $snak ) { // all of the Snak's properties are referenced entities, add them: - $foundEntities[] = $snak-getPropertyId(); + $propertyId = $snak-getPropertyId(); + $foundEntities[ $propertyId-getSerialization() ] = $propertyId; // PropertyValueSnaks might have a value referencing an Entity, find those as well: if( $snak instanceof PropertyValueSnak ) { @@ -46,7 +47,7 @@ } } - return array_unique( $foundEntities ); + return $foundEntities; } /** @@ -61,8 +62,9 @@ switch( $dataValue-getType() ) { case 'wikibase-entityid': if( $dataValue instanceof EntityIdValue ) { + $entityId = $dataValue-getEntityId(); return array( - $dataValue-getEntityId() ); + $entityId-getSerialization() = $entityId ); } break; -- To view, visit https://gerrit.wikimedia.org/r/126235 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I08898a36f8582aec3560216ab48da94a465911ca Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Adrian Lang adrian.l...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make magic numbers unmagical - change (apps...wikipedia)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/126237 Change subject: Make magic numbers unmagical .. Make magic numbers unmagical Still some left. Need more careful handling. Bug: 63742 Change-Id: I8f31ddcc4248f1f938fc1bd1c4c048ca5532de08 --- M wikipedia/src/main/java/org/wikipedia/ApiTask.java M wikipedia/src/main/java/org/wikipedia/PageQueryTask.java M wikipedia/src/main/java/org/wikipedia/concurrency/SaneAsyncTask.java M wikipedia/src/main/java/org/wikipedia/createaccount/CreateAccountTask.java M wikipedia/src/main/java/org/wikipedia/editing/DoEditTask.java M wikipedia/src/main/java/org/wikipedia/editing/EditPreviewTask.java M wikipedia/src/main/java/org/wikipedia/editing/FetchEditTokenTask.java M wikipedia/src/main/java/org/wikipedia/editing/FetchSectionWikitextTask.java M wikipedia/src/main/java/org/wikipedia/editing/RefreshCaptchaTask.java M wikipedia/src/main/java/org/wikipedia/eventlogging/EventLoggingEvent.java M wikipedia/src/main/java/org/wikipedia/interlanguage/LangLinksFetchTask.java M wikipedia/src/main/java/org/wikipedia/login/LoginTask.java M wikipedia/src/main/java/org/wikipedia/login/LogoutTask.java M wikipedia/src/main/java/org/wikipedia/page/PageViewFragment.java M wikipedia/src/main/java/org/wikipedia/page/SectionsFetchTask.java M wikipedia/src/main/java/org/wikipedia/pagehistory/usercontributions/FetchUserContribsTask.java M wikipedia/src/main/java/org/wikipedia/pageimages/PageImageSaveTask.java M wikipedia/src/main/java/org/wikipedia/pageimages/PageImagesTask.java M wikipedia/src/main/java/org/wikipedia/random/RandomArticleIdTask.java M wikipedia/src/main/java/org/wikipedia/savedpages/DeleteSavedPageTask.java M wikipedia/src/main/java/org/wikipedia/savedpages/DownloadImageTask.java M wikipedia/src/main/java/org/wikipedia/savedpages/LoadSavedPageTask.java M wikipedia/src/main/java/org/wikipedia/savedpages/SavePageTask.java M wikipedia/src/main/java/org/wikipedia/search/SearchArticlesTask.java M wikipedia/src/main/java/org/wikipedia/zero/WikipediaZeroTask.java 25 files changed, 32 insertions(+), 45 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/37/126237/1 diff --git a/wikipedia/src/main/java/org/wikipedia/ApiTask.java b/wikipedia/src/main/java/org/wikipedia/ApiTask.java index b178a30..9c28115 100644 --- a/wikipedia/src/main/java/org/wikipedia/ApiTask.java +++ b/wikipedia/src/main/java/org/wikipedia/ApiTask.java @@ -6,8 +6,8 @@ public abstract class ApiTaskT extends SaneAsyncTaskT { private final Api api; -public ApiTask(int threadCount, Api api) { -super(threadCount); +public ApiTask(int concurrency, Api api) { +super(concurrency); this.api = api; } diff --git a/wikipedia/src/main/java/org/wikipedia/PageQueryTask.java b/wikipedia/src/main/java/org/wikipedia/PageQueryTask.java index b455a14..0a42522 100644 --- a/wikipedia/src/main/java/org/wikipedia/PageQueryTask.java +++ b/wikipedia/src/main/java/org/wikipedia/PageQueryTask.java @@ -10,8 +10,8 @@ private final ListPageTitle titles; private final Site site; -public PageQueryTask(int threadCount, Api api, Site site, ListPageTitle titles) { -super(threadCount, api); +public PageQueryTask(int concurrencyLevel, Api api, Site site, ListPageTitle titles) { +super(concurrencyLevel, api); this.titles = titles; this.site = site; } diff --git a/wikipedia/src/main/java/org/wikipedia/concurrency/SaneAsyncTask.java b/wikipedia/src/main/java/org/wikipedia/concurrency/SaneAsyncTask.java index 18f62e7..f23e041 100644 --- a/wikipedia/src/main/java/org/wikipedia/concurrency/SaneAsyncTask.java +++ b/wikipedia/src/main/java/org/wikipedia/concurrency/SaneAsyncTask.java @@ -1,10 +1,12 @@ package org.wikipedia.concurrency; -import android.os.*; - import java.util.concurrent.*; public abstract class SaneAsyncTaskT { +public static final int SINGLE_THREAD = 1; +public static final int LOW_CONCURRENCY = 2; +public static final int HIGH_CONCURRENCY = 4; + private final BackingAsyncTask underlyingTask; private final Executor executor; @@ -20,10 +22,10 @@ /** * Creates an executor using the default ExecutorService. * - * @param threadCount Number of threads to use at max for this thread pool. + * @param concurrencyLevel Number of threads to use at max for this thread pool. */ -public SaneAsyncTask(int threadCount) { -this.executor = ExecutorService.getSingleton().getExecutor(getClass(), threadCount); +public SaneAsyncTask(int concurrencyLevel) { +this.executor = ExecutorService.getSingleton().getExecutor(getClass(), concurrencyLevel); this.underlyingTask = new BackingAsyncTask(); } diff --git a/wikipedia/src/main/java/org/wikipedia/createaccount/CreateAccountTask.java
[MediaWiki-commits] [Gerrit] Fix broken tests for Page properties - change (apps...wikipedia)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/126238 Change subject: Fix broken tests for Page properties .. Fix broken tests for Page properties Change-Id: I2ac7f3e3c6912cbf4e89f90289755a473b09bf44 --- M wikipedia-it/src/main/java/org/wikipedia/test/PageTests.java M wikipedia-it/src/main/java/org/wikipedia/test/ParcelableTest.java 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/38/126238/1 diff --git a/wikipedia-it/src/main/java/org/wikipedia/test/PageTests.java b/wikipedia-it/src/main/java/org/wikipedia/test/PageTests.java index 9b9d4d2..5bea839 100644 --- a/wikipedia-it/src/main/java/org/wikipedia/test/PageTests.java +++ b/wikipedia-it/src/main/java/org/wikipedia/test/PageTests.java @@ -16,7 +16,7 @@ sections.add(new Section(i, 1, Something + i, Something_ + i, Content Something + i)); } PageTitle title = new PageTitle(null, Test, new Site(en.wikipedia.org)); -PageProperties props = new PageProperties(new Date()); +PageProperties props = new PageProperties(new Date(), null); Page page = new Page(title, sections, props); assertEquals(page, new Page(page.toJSON())); } diff --git a/wikipedia-it/src/main/java/org/wikipedia/test/ParcelableTest.java b/wikipedia-it/src/main/java/org/wikipedia/test/ParcelableTest.java index 49819b1..ca2f806 100644 --- a/wikipedia-it/src/main/java/org/wikipedia/test/ParcelableTest.java +++ b/wikipedia-it/src/main/java/org/wikipedia/test/ParcelableTest.java @@ -44,7 +44,7 @@ sections.add(new Section(i, 1, Something + i, Something_ + i, Content Something + i)); } PageTitle title = new PageTitle(null, Test, new Site(en.wikipedia.org)); -PageProperties props = new PageProperties(new Date()); +PageProperties props = new PageProperties(new Date(), Something); Page page = new Page(title, sections, props); parcelAndTestObjects(page); } -- To view, visit https://gerrit.wikimedia.org/r/126238 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2ac7f3e3c6912cbf4e89f90289755a473b09bf44 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Yuvipanda yuvipa...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Removing some references to stat1, replacing some of them wi... - change (operations/puppet)
Ottomata has submitted this change and it was merged. Change subject: Removing some references to stat1, replacing some of them with stat1003 .. Removing some references to stat1, replacing some of them with stat1003 This includes backups, rsync daemon hosts allow, and nfs exports. Also moving backup::host and backup::set into role classes Change-Id: Ib31c296d4f091895e2c62a980b1adb50c8f45215 --- M files/backup/disklist-daily M files/backup/disklist-monthly M files/backup/disklist-weekly M manifests/misc/statistics.pp M manifests/role/eventlogging.pp M manifests/role/statistics.pp M modules/dataset/files/exports M modules/dataset/files/rsync/rsyncd.conf.pagecounts 8 files changed, 10 insertions(+), 15 deletions(-) Approvals: Ottomata: Verified; Looks good to me, approved diff --git a/files/backup/disklist-daily b/files/backup/disklist-daily index d0dfba8..3282f0d 100644 --- a/files/backup/disklist-daily +++ b/files/backup/disklist-daily @@ -4,8 +4,6 @@ nfs2.pmtpa.wmnet/var/opendj/backups default ytterbium.wikimedia.org /var/lib/gerrit2/review_site/git default sodium.wikimedia.org /var/lib/mailmandefault -stat1.wikimedia.org /home default -stat1.wikimedia.org /a/eventlogging default stat1002.eqiad.wmnet/home default stat1002.eqiad.wmnet/a/eventlogging default virt0.wikimedia.org /a/backup default diff --git a/files/backup/disklist-monthly b/files/backup/disklist-monthly index 2964cf9..c0d89f8 100644 --- a/files/backup/disklist-monthly +++ b/files/backup/disklist-monthly @@ -1,5 +1,3 @@ mchenry.wikimedia.org /root default -stat1.wikimedia.org /home default -stat1.wikimedia.org /a/eventlogging default stat1002.eqiad.wmnet/home default stat1002.eqiad.wmnet/a/eventlogging default diff --git a/files/backup/disklist-weekly b/files/backup/disklist-weekly index 2964cf9..c0d89f8 100644 --- a/files/backup/disklist-weekly +++ b/files/backup/disklist-weekly @@ -1,5 +1,3 @@ mchenry.wikimedia.org /root default -stat1.wikimedia.org /home default -stat1.wikimedia.org /a/eventlogging default stat1002.eqiad.wmnet/home default stat1002.eqiad.wmnet/a/eventlogging default diff --git a/manifests/misc/statistics.pp b/manifests/misc/statistics.pp index 218ad71..8cf86df 100644 --- a/manifests/misc/statistics.pp +++ b/manifests/misc/statistics.pp @@ -87,7 +87,6 @@ # Manually set a list of statistics servers. $servers = [ -'stat1.wikimedia.org', 'stat1001.wikimedia.org', 'stat1002.eqiad.wmnet', 'stat1003.wikimedia.org', @@ -569,10 +568,6 @@ source = vanadium.eqiad.wmnet::eventlogging/archive/*.gz, destination = ${working_path}/eventlogging/archive, } - -$sets = [ 'a-eventlogging', 'home', ] -include backup::host -backup::set { $sets : } } # Define: misc::statistics::rsync_job diff --git a/manifests/role/eventlogging.pp b/manifests/role/eventlogging.pp index 5167e4d..0ba4b10 100644 --- a/manifests/role/eventlogging.pp +++ b/manifests/role/eventlogging.pp @@ -140,7 +140,7 @@ } $backup_destinations = $::realm ? { -production = [ 'stat1.wikimedia.org', 'stat1002.eqiad.wmnet' ], +production = [ 'stat1002.eqiad.wmnet', 'stat1003.wikimedia.org' ], labs = false, } diff --git a/manifests/role/statistics.pp b/manifests/role/statistics.pp index 826377f..006109c 100644 --- a/manifests/role/statistics.pp +++ b/manifests/role/statistics.pp @@ -5,6 +5,9 @@ backup::client, # amanda backups misc::statistics::base, base::packages::emacs + + include backup::host + backup::set { 'home' : } } class role::statistics::cruncher inherits role::statistics { @@ -61,4 +64,7 @@ misc::statistics::packages::java, misc::statistics::rsync::jobs::webrequest, misc::statistics::rsync::jobs::eventlogging + + # backup eventlogging logs + backup::set { 'a-eventlogging' : } } diff --git a/modules/dataset/files/exports b/modules/dataset/files/exports index 3e9d6fc..fbfa954 100644 --- a/modules/dataset/files/exports +++ b/modules/dataset/files/exports @@ -8,4 +8,4 @@ # /srv/nfs4gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check) # /srv/nfs4/homes gss/krb5i(rw,sync,no_subtree_check) # -/data snapshot1001.eqiad.wmnet(rw,async,no_root_squash,no_subtree_check) snapshot1002.eqiad.wmnet(rw,async,no_root_squash,no_subtree_check) snapshot1003.eqiad.wmnet(rw,async,no_root_squash,no_subtree_check) snapshot1004.eqiad.wmnet(rw,async,no_root_squash,no_subtree_check) stat1.wikimedia.org(ro,async,no_root_squash,no_subtree_check) stat1002.eqiad.wmnet(ro,async,no_root_squash,no_subtree_check) stat1003.wikimedia.org(ro,async,no_root_squash,no_subtree_check) +/data
[MediaWiki-commits] [Gerrit] Fix 2 typos in ForceSearchIndex option descriptions - change (mediawiki...CirrusSearch)
Matthias Mullie has uploaded a new change for review. https://gerrit.wikimedia.org/r/126239 Change subject: Fix 2 typos in ForceSearchIndex option descriptions .. Fix 2 typos in ForceSearchIndex option descriptions Change-Id: I20d30fb8d89079749d00e85b89965b5a0b0b43eb --- M maintenance/forceSearchIndex.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/39/126239/1 diff --git a/maintenance/forceSearchIndex.php b/maintenance/forceSearchIndex.php index ab94649..0f1d7ba 100644 --- a/maintenance/forceSearchIndex.php +++ b/maintenance/forceSearchIndex.php @@ -73,9 +73,9 @@ 'starting again. Defaults to the value specified for --maxJobs. Not meaningful without --queue.', false, true ); $this-addOption( 'indexOnSkip', 'When skipping either parsing or links send the document as an index. ' . 'This replaces the contents of the index for that entry with the entry built from a skipped process.' . - 'Without this if the entry does not exist then it will be skipped enirely. Only set this when running ' . + 'Without this if the entry does not exist then it will be skipped entirely. Only set this when running ' . 'the first pass of building the index. Otherwise, don\'t tempt fate by indexing half complete documents.' ); - $this-addOption( 'skipParse', 'Skip parsing the page. This is realy only good for running the second half ' . + $this-addOption( 'skipParse', 'Skip parsing the page. This is really only good for running the second half ' . 'of the two phase index build. If this is specified then the default batch size is actually 50.' ); $this-addOption( 'skipLinks', 'Skip looking for links to the page (counting and finding redirects). Use ' . 'this with --indexOnSkip for the first half of the two phase index build.' ); -- To view, visit https://gerrit.wikimedia.org/r/126239 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I20d30fb8d89079749d00e85b89965b5a0b0b43eb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: master Gerrit-Owner: Matthias Mullie mmul...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] protect against dounble run with flock - change (analytics/wikistats)
Erik Zachte has uploaded a new change for review. https://gerrit.wikimedia.org/r/126240 Change subject: protect against dounble run with flock .. protect against dounble run with flock Change-Id: I8f46c8b256f782f52d5c1de9fc9a797e88231752 --- M dammit.lt/bash/dammit_compact_daily.sh M dammit.lt/bash/dammit_compact_monthly.sh 2 files changed, 21 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/wikistats refs/changes/40/126240/1 diff --git a/dammit.lt/bash/dammit_compact_daily.sh b/dammit.lt/bash/dammit_compact_daily.sh index 6629648..0b0046d 100755 --- a/dammit.lt/bash/dammit_compact_daily.sh +++ b/dammit.lt/bash/dammit_compact_daily.sh @@ -7,13 +7,14 @@ wikistats=/a/wikistats_git dammit=$wikistats/dammit.lt perl=$dammit/perl -#perl=/home/ezachte/wikistats/dammit.lt/perl # tests +perl=/home/ezachte/wikistats/dammit.lt/perl # tests +bash=$perl/../bash logs=$dammit/logs input=/mnt/data/xmldatadumps/public/other/pagecounts-raw output=/a/dammit.lt/pagecounts/merged temp=/a/dammit.lt/pagecounts/temp -dataset2=dataset2.wikimedia.org::pagecounts-ez/merged/ +dataset1001=dataset1001.wikimedia.org::pagecounts-ez/merged/ mmdd=$(date +%Y_%m_%d) logfile=$logs/compact_daily_$mmdd.log @@ -27,17 +28,23 @@ echo Consolidate pagecount files into one daily file for last $maxage completed days echo # c1 perl DammitCompactHourlyOrDailyPageCountFiles.pl $mode -a $maxage -i $input -o $output -t $temp | tee -a $logfile | cat - perl DammitCompactHourlyOrDailyPageCountFiles.pl $mode -a $maxage -i $input -o $output -t $temp | tee -a $logfile | cat +# date $bash/dsh/dammit_compact_daily.semaphoreammit_compact_daily.semaphore +# flock -n = non block lock +cmd=nice perl DammitCompactHourlyOrDailyPageCountFiles.pl $mode -a $maxage -i $input -o $output -t $temp | tee -a $logfile | cat +flock -n -e $bash/dammit_compact_daily.semaphore -c $cmd || { echo Script is already running: lock on ../bash/dammit_compact_daily.semaphore ; exit 1 ; } 2 echo Consolidate pagecount files for whole month into one monthly file - only finds work to do on first day of new month echo -# c1 ./dammit_compact_monthly.sh - ./dammit_compact_monthly.sh +# c1 $bash/dammit_compact_monthly.sh +flock -n -e $bash/dammit_compact_monthly.semaphore -c Run dammit_compact_daily.sh || { echo Script dammit_compact_daily.sh is already running: lock on ../bash/dammit_compact_daily.semaphore ; exit 1 ; } 2 + +cd $bash +./dammit_compact_monthly.sh echo Publish new files echo -# c2 rsync -arv --include=*.bz2 $output/* $dataset2 - rsync -arv --include=*.bz2 $output/* $dataset2 +# c2 rsync -arv --include=*.bz2 $output/* $dataset1001 + rsync -arv --include=*.bz2 $output/* $dataset1001 #grep $logs/*.log diff --git a/dammit.lt/bash/dammit_compact_monthly.sh b/dammit.lt/bash/dammit_compact_monthly.sh index 94a1a1b..a627741 100755 --- a/dammit.lt/bash/dammit_compact_monthly.sh +++ b/dammit.lt/bash/dammit_compact_monthly.sh @@ -4,7 +4,8 @@ wikistats=/a/wikistats_git dammit=$wikistats/dammit.lt perl=$dammit/perl -# perl=/home/ezachte/wikistats/dammit.lt/perl # tests +perl=/home/ezachte/wikistats/dammit.lt/perl # tests +bash=$perl/../bash logs=$dammit/logs input=/a/dammit.lt/pagecounts/merged # .test @@ -23,6 +24,10 @@ echo Consolidate daily pagecount files into one monthly file for last $maxage completed months echo -nice perl DammitCompactHourlyOrDailyPageCountFiles.pl $mode $verbose -a $maxage -i $input -o $output -t $temp | tee -a $logfile | cat + +echo grab semaphore dammit_compact_monthly.semaphore +cmd=nice perl DammitCompactHourlyOrDailyPageCountFiles.pl $mode $verbose -a $maxage -i $input -o $output -t $temp | tee -a $logfile | cat +flock -n -e $bash/dammit_compact_monthly.semaphore -c $cmd || { echo Script is already running: lock on ../bash/dammit_compact_monthly.semaphore ; exit 1 ; } 2 + #grep $logs/*.log -- To view, visit https://gerrit.wikimedia.org/r/126240 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8f46c8b256f782f52d5c1de9fc9a797e88231752 Gerrit-PatchSet: 1 Gerrit-Project: analytics/wikistats Gerrit-Branch: master Gerrit-Owner: Erik Zachte ezac...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Support B.C. with dot at the end as well as B. C. with spaces - change (mediawiki...Wikibase)
Addshore has submitted this change and it was merged. Change subject: Support B.C. with dot at the end as well as B. C. with spaces .. Support B.C. with dot at the end as well as B. C. with spaces * More tests. * trim was done on the year part only, not on the era part. * Always the same BCE CE order, which is important since they overlap. Change-Id: I0f37cb0a532d36d75387e200957ff3cd5ed33695 --- M lib/includes/parsers/EraParser.php M lib/tests/phpunit/parsers/EraParserTest.php 2 files changed, 22 insertions(+), 15 deletions(-) Approvals: WikidataJenkins: Verified Addshore: Looks good to me, approved diff --git a/lib/includes/parsers/EraParser.php b/lib/includes/parsers/EraParser.php index 88011c4..653caa3 100644 --- a/lib/includes/parsers/EraParser.php +++ b/lib/includes/parsers/EraParser.php @@ -18,20 +18,22 @@ /** * @since 0.5 */ - const CURRENT_ERA = '+'; + const BEFORE_CURRENT_ERA = '-'; + /** * @since 0.5 */ - const BEFORE_CURRENT_ERA = '-'; + const CURRENT_ERA = '+'; /** * @var string regex snippet matching BEFORE_CURRENT_ERA */ - private $BCEregex = '(B\.?C(\.?E)?|Before\s(Christ|Common\sEra))'; + private $BCEregex = '(B\.?\s*C\.?(\s*E\.?)?|Before\s+(Christ|Common\s+Era))'; + /** * @var string regex snippet matching CURRENT_ERA */ - private $CEregex = '(C\.?E|A\.?D|Common\sEra|After\sChrist|Anno\sDomini)'; + private $CEregex = '(C\.?\s*E\.?|A\.?\s*D\.?|Common\s+Era|After\s+Christ|Anno\s+Domini)'; /** * Parses the provided string and returns the era @@ -42,15 +44,16 @@ * @return array( 0 = parsed era constant, 1 = $value with no era data ) */ protected function stringParse( $value ) { + $value = trim( $value ); + $char1 = substr( $value, 0, 1 ); - if( $char1 === self::CURRENT_ERA || $char1 === self::BEFORE_CURRENT_ERA ) { + if( $char1 === self::BEFORE_CURRENT_ERA || $char1 === self::CURRENT_ERA ) { $eraFromSign = $char1; } - if( preg_match( '/' . $this-CEregex . '$/i', $value, $matches ) ) { - $eraFromString = self::CURRENT_ERA; - } - if( preg_match( '/' . $this-BCEregex . '$/i', $value, $matches ) ) { + if( preg_match( '/' . $this-BCEregex . '$/i', $value ) ) { $eraFromString = self::BEFORE_CURRENT_ERA; + } elseif( preg_match( '/' . $this-CEregex . '$/i', $value ) ) { + $eraFromString = self::CURRENT_ERA; } if( isset( $eraFromSign ) isset( $eraFromString ) ) { @@ -64,7 +67,7 @@ if( isset( $eraFromSign ) ) { return array( $eraFromSign, $cleanValue ); } - //Default to CE + // Default to CE return array( self::CURRENT_ERA, $cleanValue ); } @@ -77,13 +80,12 @@ */ private function cleanValue( $value ) { $char1 = substr( $value, 0, 1 ); - if( $char1 === self::CURRENT_ERA || $char1 === self::BEFORE_CURRENT_ERA ) { + if( $char1 === self::BEFORE_CURRENT_ERA || $char1 === self::CURRENT_ERA ) { $value = substr( $value, 1 ); } - $value = preg_replace( '/\s*(' . $this-CEregex . '|' . $this-BCEregex . ')$/i', '', $value ); - - return trim( $value ); + return preg_replace( '/\s*(' . $this-BCEregex . '|' . $this-CEregex . ')$/i', '', + $value ); } } diff --git a/lib/tests/phpunit/parsers/EraParserTest.php b/lib/tests/phpunit/parsers/EraParserTest.php index b82647d..b5dff1d 100644 --- a/lib/tests/phpunit/parsers/EraParserTest.php +++ b/lib/tests/phpunit/parsers/EraParserTest.php @@ -35,10 +35,14 @@ return array( array( '+100', array( '+', '100' ) ), array( '-100', array( '-', '100' ) ), + array( ' -100', array( '-', '100' ) ), array( '100BC', array( '-', '100' ) ), array( '100 BC', array( '-', '100' ) ), array( '100 BCE', array( '-', '100' ) ), array( '100 AD', array( '+', '100' ) ), + array( '100 A. D.', array( '+', '100' ) ), + array( ' 100 B. C. ', array( '-', '100' ) ), + array( ' 100 Common Era ', array( '+', '100' ) ), array( '100 CE', array( '+', '100' ) ), array( '100CE', array( '+', '100' ) ), array( '+100', array( '+', '100' ) ),
[MediaWiki-commits] [Gerrit] Remove virt2 from puppet. - change (operations/puppet)
Andrew Bogott has uploaded a new change for review. https://gerrit.wikimedia.org/r/126241 Change subject: Remove virt2 from puppet. .. Remove virt2 from puppet. Also clean up a ref to virt1 which hasn't existed in ages. Change-Id: I6515e1d4564ef4d3847e36d302978ecb7be6756d --- M manifests/site.pp M modules/install-server/files/dhcpd/linux-host-entries.ttyS1-115200 2 files changed, 0 insertions(+), 17 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/41/126241/1 diff --git a/manifests/site.pp b/manifests/site.pp index d367fc8..ea1a18f 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -2779,18 +2779,6 @@ include backup::client } -node 'virt2.pmtpa.wmnet' { -$cluster = 'virt' -$openstack_version = 'folsom' -$use_neutron = false - -include admins::labs - -include standard -include role::nova::network -include role::nova::api -} - node 'labnet1001.eqiad.wmnet' { $cluster = 'virt' $openstack_version = 'havana' diff --git a/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-115200 b/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-115200 index 8720fd2..9327351 100644 --- a/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-115200 +++ b/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-115200 @@ -3320,11 +3320,6 @@ fixed-address virt0.wikimedia.org; } -host virt2 { - hardware ethernet f0:4d:a2:0b:3e:2d; - fixed-address virt2.pmtpa.wmnet; -} - host labsudb1 { hardware ethernet f0:4d:a2:0b:33:f2; fixed-address labsudb1.pmtpa.wmnet; -- To view, visit https://gerrit.wikimedia.org/r/126241 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6515e1d4564ef4d3847e36d302978ecb7be6756d Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Andrew Bogott abog...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Enabling cgi scripts for stats.wikimedia.org - change (operations/puppet)
Ottomata has submitted this change and it was merged. Change subject: Enabling cgi scripts for stats.wikimedia.org .. Enabling cgi scripts for stats.wikimedia.org Erik Zachte has a perl search script that he wants to enable for stats.wikimedia.org Change-Id: Id7699d9509edee4e7c1caade5a920422f383ef7d --- M templates/apache/sites/stats.wikimedia.org.erb 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Ottomata: Verified; Looks good to me, approved diff --git a/templates/apache/sites/stats.wikimedia.org.erb b/templates/apache/sites/stats.wikimedia.org.erb index 4d4a9d5..0238114 100644 --- a/templates/apache/sites/stats.wikimedia.org.erb +++ b/templates/apache/sites/stats.wikimedia.org.erb @@ -16,6 +16,9 @@ allow from all /Directory + # Allow CGI scripts for this site + ScriptAlias /cgi-bin/ /srv/stats.wikimedia.org/cgi-bin/ + ErrorLog /var/log/apache2/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. @@ -54,6 +57,7 @@ AuthUserFile /etc/apache2/htpasswd.stats Require user pediapress /Directory + END -% -- To view, visit https://gerrit.wikimedia.org/r/119754 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id7699d9509edee4e7c1caade5a920422f383ef7d Gerrit-PatchSet: 4 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ottomata o...@wikimedia.org Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org Gerrit-Reviewer: Erik Zachte ezac...@wikimedia.org Gerrit-Reviewer: Ottomata o...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] 'incl bots' - 'excl bots' - change (analytics/wikistats)
Erik Zachte has uploaded a new change for review. https://gerrit.wikimedia.org/r/126242 Change subject: 'incl bots' - 'excl bots' .. 'incl bots' - 'excl bots' Change-Id: I955b6c885f6b78f9f167710a1fe65a57a2f60430 --- M dumps/perl/WikiReports_EN.pm 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/wikistats refs/changes/42/126242/1 diff --git a/dumps/perl/WikiReports_EN.pm b/dumps/perl/WikiReports_EN.pm index 92db1bc..1e07dfe 100644 --- a/dumps/perl/WikiReports_EN.pm +++ b/dumps/perl/WikiReports_EN.pm @@ -247,7 +247,7 @@ $out_tbl7_hdr_ns = Namespace ; # new $out_tbl7_hdr_ca = Categorisedbrarticles sup1/sup ; # new -$out_tbl8_intro = Distribution of article edits over registered editors, incl. bots ; # new +$out_tbl8_intro = Distribution of article edits over registered editors, excl. bots ; # new $out_tbl9_intro = [[5]] most edited articles ( 25 edits) ; # new -- To view, visit https://gerrit.wikimedia.org/r/126242 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I955b6c885f6b78f9f167710a1fe65a57a2f60430 Gerrit-PatchSet: 1 Gerrit-Project: analytics/wikistats Gerrit-Branch: master Gerrit-Owner: Erik Zachte ezac...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix 2 typos in ForceSearchIndex option descriptions - change (mediawiki...CirrusSearch)
jenkins-bot has submitted this change and it was merged. Change subject: Fix 2 typos in ForceSearchIndex option descriptions .. Fix 2 typos in ForceSearchIndex option descriptions Change-Id: I20d30fb8d89079749d00e85b89965b5a0b0b43eb --- M maintenance/forceSearchIndex.php 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Manybubbles: Looks good to me, approved jenkins-bot: Verified diff --git a/maintenance/forceSearchIndex.php b/maintenance/forceSearchIndex.php index ab94649..0f1d7ba 100644 --- a/maintenance/forceSearchIndex.php +++ b/maintenance/forceSearchIndex.php @@ -73,9 +73,9 @@ 'starting again. Defaults to the value specified for --maxJobs. Not meaningful without --queue.', false, true ); $this-addOption( 'indexOnSkip', 'When skipping either parsing or links send the document as an index. ' . 'This replaces the contents of the index for that entry with the entry built from a skipped process.' . - 'Without this if the entry does not exist then it will be skipped enirely. Only set this when running ' . + 'Without this if the entry does not exist then it will be skipped entirely. Only set this when running ' . 'the first pass of building the index. Otherwise, don\'t tempt fate by indexing half complete documents.' ); - $this-addOption( 'skipParse', 'Skip parsing the page. This is realy only good for running the second half ' . + $this-addOption( 'skipParse', 'Skip parsing the page. This is really only good for running the second half ' . 'of the two phase index build. If this is specified then the default batch size is actually 50.' ); $this-addOption( 'skipLinks', 'Skip looking for links to the page (counting and finding redirects). Use ' . 'this with --indexOnSkip for the first half of the two phase index build.' ); -- To view, visit https://gerrit.wikimedia.org/r/126239 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I20d30fb8d89079749d00e85b89965b5a0b0b43eb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: master Gerrit-Owner: Matthias Mullie mmul...@wikimedia.org Gerrit-Reviewer: Manybubbles never...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove virt5-15 from dns - change (operations/dns)
Dzahn has submitted this change and it was merged. Change subject: Remove virt5-15 from dns .. Remove virt5-15 from dns PS3: also remove mgmt entries Change-Id: I0fb4eecc26b964499771a4641a93da4589d3396c --- M templates/10.in-addr.arpa M templates/wmnet 2 files changed, 0 insertions(+), 44 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa index d76a88f..6113655 100644 --- a/templates/10.in-addr.arpa +++ b/templates/10.in-addr.arpa @@ -532,32 +532,21 @@ 75 1H IN PTR labstore2.mgmt.pmtpa.wmnet. 76 1H IN PTR labstore3.mgmt.pmtpa.wmnet. 77 1H IN PTR labstore4.mgmt.pmtpa.wmnet. -78 1H IN PTR virt5.mgmt.pmtpa.wmnet. 79 1H IN PTR ms-fe3.mgmt.pmtpa.wmnet. 80 1H IN PTR ms-fe4.mgmt.pmtpa.wmnet. 87 1H IN PTR WMF3731.mgmt.pmtpa.wmnet. 88 1H IN PTR WMF3732.mgmt.pmtpa.wmnet. 89 1H IN PTR WMF3733.mgmt.pmtpa.wmnet. 90 1H IN PTR WMF3734.mgmt.pmtpa.wmnet. -91 1H IN PTR virt6.mgmt.pmtpa.wmnet. -92 1H IN PTR virt7.mgmt.pmtpa.wmnet. -93 1H IN PTR virt8.mgmt.pmtpa.wmnet. -94 1H IN PTR virt9.mgmt.pmtpa.wmnet. -95 1H IN PTR virt10.mgmt.pmtpa.wmnet. -96 1H IN PTR virt11.mgmt.pmtpa.wmnet. -97 1H IN PTR virt12.mgmt.pmtpa.wmnet. 98 1H IN PTR labsdb1.mgmt.pmtpa.wmnet. 99 1H IN PTR labsdb2.mgmt.pmtpa.wmnet. -1001H IN PTR virt15.mgmt.pmtpa.wmnet. 1011H IN PTR pc1.mgmt.pmtpa.wmnet. 1021H IN PTR pc2.mgmt.pmtpa.wmnet. 1031H IN PTR pc3.mgmt.pmtpa.wmnet. 104 1H IN PTR wmf5706.mgmt.pmtpa.wmnet. 1041H IN PTR labsdb3.mgmt.pmtpa.wmnet. 1051H IN PTR wmf5707.mgmt.pmtpa.wmnet. -1051H IN PTR virt13.mgmt.pmtpa.wmnet. 1061H IN PTR wmf5708.mgmt.pmtpa.wmnet. -1061H IN PTR virt14.mgmt.pmtpa.wmnet. 1071H IN PTR wmf5709.mgmt.pmtpa.wmnet. 1081H IN PTR wmf5710.mgmt.pmtpa.wmnet. 1091H IN PTR wmf5711.mgmt.pmtpa.wmnet. @@ -845,20 +834,9 @@ 1 1H IN PTR vrrp-gw-105.wikimedia.org. 3 1H IN PTR virt2.pmtpa.wmnet. -6 1H IN PTR virt5.pmtpa.wmnet. -7 1H IN PTR virt6.pmtpa.wmnet. -8 1H IN PTR virt7.pmtpa.wmnet. -9 1H IN PTR virt8.pmtpa.wmnet. 10 1H IN PTR labsdb1.pmtpa.wmnet. 11 1H IN PTR labsdb2.pmtpa.wmnet. 12 1H IN PTR labsdb3.pmtpa.wmnet. -13 1H IN PTR virt9.pmtpa.wmnet. -14 1H IN PTR virt10.pmtpa.wmnet. -15 1H IN PTR virt11.pmtpa.wmnet. -16 1H IN PTR virt12.pmtpa.wmnet. -17 1H IN PTR virt13.pmtpa.wmnet. -18 1H IN PTR virt14.pmtpa.wmnet. -19 1H IN PTR virt15.pmtpa.wmnet. 252 1H IN PTR ae0-105.cr1-sdtpa.wikimedia.org. 253 1H IN PTR ae0-105.cr2-pmtpa.wikimedia.org. diff --git a/templates/wmnet b/templates/wmnet index 3d6bd16..5b961e4 100644 --- a/templates/wmnet +++ b/templates/wmnet @@ -116,17 +116,6 @@ labsdb2 1H IN A10.4.16.11 labsdb3 1H IN A10.4.16.12 virt2 1H IN A10.4.16.3 -virt5 1H IN A10.4.16.6 -virt6 1H IN A10.4.16.7 -virt7 1H IN A10.4.16.8 -virt8 1H IN A10.4.16.9 -virt9 1H IN A10.4.16.13 -virt10 1H IN A10.4.16.14 -virt11 1H IN A10.4.16.15 -virt12 1H IN A10.4.16.16 -virt13 1H IN A10.4.16.17 -virt14 1H IN A10.4.16.18 -virt15 1H IN A10.4.16.19 ; GENERATES @@ -311,15 +300,6 @@ ts-array4b 1H IN A10.1.8.18 virt0 1H IN A10.1.8.28 virt2 1H IN A10.1.8.57 -virt5 1H IN A10.1.8.78 -virt6 1H IN A10.1.8.91 -virt7 1H IN A10.1.8.92 -virt8 1H IN A10.1.8.93 -virt9 1H IN A10.1.8.94 -virt10 1H IN A10.1.8.95 -virt11 1H IN A10.1.8.96 -virt12 1H IN A10.1.8.97 -virt15 1H IN A10.1.8.100 nas1-a-e0m 1H IN A10.1.8.66 nas1-b-e0m 1H IN A10.1.8.67 WMF36391H IN A10.1.8.69 @@ -338,9 +318,7 @@ wmf5706 1H IN
[MediaWiki-commits] [Gerrit] toollabs: Setup ssl cert for tools.wmflabs.org - change (operations/puppet)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/126243 Change subject: toollabs: Setup ssl cert for tools.wmflabs.org .. toollabs: Setup ssl cert for tools.wmflabs.org Change-Id: I092d55277c76c69c746057f713c2ee61f362dc59 --- M modules/dynamicproxy/templates/urlproxy.conf M modules/toollabs/manifests/proxy.pp 2 files changed, 4 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/43/126243/1 diff --git a/modules/dynamicproxy/templates/urlproxy.conf b/modules/dynamicproxy/templates/urlproxy.conf index d33dcf1..1298d38 100644 --- a/modules/dynamicproxy/templates/urlproxy.conf +++ b/modules/dynamicproxy/templates/urlproxy.conf @@ -36,7 +36,7 @@ # Serve both HTTP and HTTPS listen 443 default_server ssl spdy; -ssl_certificate /etc/ssl/certs/%= @ssl_certificate_name %.chained.pem; +ssl_certificate /etc/ssl/certs/%= @ssl_certificate_name %.pem; ssl_certificate_key /etc/ssl/private/%= @ssl_certificate_name %.key; # Copied from templates/nginx/nginx.conf.erb. Eugh diff --git a/modules/toollabs/manifests/proxy.pp b/modules/toollabs/manifests/proxy.pp index 79e55e0..c6d9cc5 100644 --- a/modules/toollabs/manifests/proxy.pp +++ b/modules/toollabs/manifests/proxy.pp @@ -3,8 +3,9 @@ include toollabs::infrastructure class { '::dynamicproxy': -luahandler = 'urlproxy', -resolver = '10.68.16.1' # eqiad DNS resolver +luahandler = 'urlproxy', +resolver = '10.68.16.1', # eqiad DNS resolver +ssl_certificate_name = 'tools.wmflabs.org' } package { 'python-redis': -- To view, visit https://gerrit.wikimedia.org/r/126243 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I092d55277c76c69c746057f713c2ee61f362dc59 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yuvipanda yuvipa...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Changing a message's lang must reset cached text. - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Changing a message's lang must reset cached text. .. Changing a message's lang must reset cached text. Without this patch, it's not possible to get text in different languages from the same Message object. Change-Id: I0bb915b0d9205e78ac4599ced5efacacf2cf0240 --- M includes/Message.php M tests/phpunit/includes/MessageTest.php 2 files changed, 21 insertions(+), 8 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Message.php b/includes/Message.php index d0ce482..f46c872 100644 --- a/includes/Message.php +++ b/includes/Message.php @@ -545,6 +545,7 @@ . passed a String or Language object; $type given ); } + $this-message = null; $this-interface = false; return $this; } @@ -565,8 +566,7 @@ } global $wgContLang; - $this-interface = false; - $this-language = $wgContLang; + $this-inLanguage( $wgContLang ); return $this; } diff --git a/tests/phpunit/includes/MessageTest.php b/tests/phpunit/includes/MessageTest.php index 44ca3d2..25b0805 100644 --- a/tests/phpunit/includes/MessageTest.php +++ b/tests/phpunit/includes/MessageTest.php @@ -120,8 +120,11 @@ public function testInLanguage() { $this-assertEquals( 'Main Page', wfMessage( 'mainpage' )-inLanguage( 'en' )-text() ); $this-assertEquals( 'Заглавная страница', wfMessage( 'mainpage' )-inLanguage( 'ru' )-text() ); - $this-assertEquals( 'Main Page', wfMessage( 'mainpage' )-inLanguage( Language::factory( 'en' ) )-text() ); - $this-assertEquals( 'Заглавная страница', wfMessage( 'mainpage' )-inLanguage( Language::factory( 'ru' ) )-text() ); + + // NOTE: make sure internal caching of the message text is reset appropriately + $msg = wfMessage( 'mainpage' ); + $this-assertEquals( 'Main Page', $msg-inLanguage( Language::factory( 'en' ) )-text() ); + $this-assertEquals( 'Заглавная страница', $msg-inLanguage( Language::factory( 'ru' ) )-text() ); } /** @@ -245,22 +248,32 @@ /** * @covers Message::inContentLanguage */ - public function testInContentLanguageDisabled() { + public function testInContentLanguage() { $this-setMwGlobals( 'wgLang', Language::factory( 'fr' ) ); - $this-assertEquals( 'Main Page', wfMessage( 'mainpage' )-inContentLanguage()-plain(), 'ForceUIMsg disabled' ); + // NOTE: make sure internal caching of the message text is reset appropriately + $msg = wfMessage( 'mainpage' ); + $this-assertEquals( 'Hauptseite', $msg-inLanguage( 'de' )-plain(), inLanguage( 'de' ) ); + $this-assertEquals( 'Main Page', $msg-inContentLanguage()-plain(), inContentLanguage() ); + $this-assertEquals( 'Accueil', $msg-inLanguage( 'fr' )-plain(), inLanguage( 'fr' ) ); } /** * @covers Message::inContentLanguage */ - public function testInContentLanguageEnabled() { + public function testInContentLanguageOverride() { $this-setMwGlobals( array( 'wgLang' = Language::factory( 'fr' ), 'wgForceUIMsgAsContentMsg' = array( 'mainpage' ), ) ); - $this-assertEquals( 'Accueil', wfMessage( 'mainpage' )-inContentLanguage()-plain(), 'ForceUIMsg enabled' ); + // NOTE: make sure internal caching of the message text is reset appropriately. + // NOTE: wgForceUIMsgAsContentMsg forces the messages *current* language to be used. + $msg = wfMessage( 'mainpage' ); + $this-assertEquals( 'Accueil', $msg-inContentLanguage()-plain(), 'inContentLanguage() with ForceUIMsg override enabled' ); + $this-assertEquals( 'Main Page', $msg-inLanguage( 'en' )-plain(), inLanguage( 'en' ) ); + $this-assertEquals( 'Main Page', $msg-inContentLanguage()-plain(), 'inContentLanguage() with ForceUIMsg override enabled' ); + $this-assertEquals( 'Hauptseite', $msg-inLanguage( 'de' )-plain(), inLanguage( 'de' ) ); } /** -- To view, visit https://gerrit.wikimedia.org/r/125388 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0bb915b0d9205e78ac4599ced5efacacf2cf0240 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Daniel Kinzler daniel.kinz...@wikimedia.de Gerrit-Reviewer: Aaron Schulz asch...@wikimedia.org Gerrit-Reviewer: Happy-melon
[MediaWiki-commits] [Gerrit] Requiring deployment::packages in deployment::target - change (operations/puppet)
Ottomata has uploaded a new change for review. https://gerrit.wikimedia.org/r/126244 Change subject: Requiring deployment::packages in deployment::target .. Requiring deployment::packages in deployment::target This ensures that needed packages are installed before deploy.sync_all is run. Change-Id: I16d3e820df534d832a7e0c7243f079ad346d895f --- M modules/deployment/manifests/target.pp 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/44/126244/1 diff --git a/modules/deployment/manifests/target.pp b/modules/deployment/manifests/target.pp index a6cc12d..d828e1d 100644 --- a/modules/deployment/manifests/target.pp +++ b/modules/deployment/manifests/target.pp @@ -1,4 +1,8 @@ define deployment::target($ensure=present) { +# Need packages before deploy.sync_all +# is run. (git, git-fat, etc.) +require deployment::packages + salt::grain { deployment_target_${name}: ensure = $ensure, grain = 'deployment_target', @@ -34,5 +38,4 @@ ]; } } -include deployment::packages } -- To view, visit https://gerrit.wikimedia.org/r/126244 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I16d3e820df534d832a7e0c7243f079ad346d895f Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ottomata o...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] remove virt2 from dns - change (operations/dns)
Andrew Bogott has uploaded a new change for review. https://gerrit.wikimedia.org/r/126245 Change subject: remove virt2 from dns .. remove virt2 from dns Change-Id: I41ae0525607f74d66287da203a2f9dcfc2522ce8 --- M templates/10.in-addr.arpa M templates/wmnet 2 files changed, 0 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dns refs/changes/45/126245/1 diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa index 6113655..7814fb7 100644 --- a/templates/10.in-addr.arpa +++ b/templates/10.in-addr.arpa @@ -507,7 +507,6 @@ 52 1H IN PTR WMF3847.mgmt.pmtpa.wmnet. 53 1H IN PTR WMF3846.mgmt.pmtpa.wmnet. 55 1H IN PTR dataset2.mgmt.pmtpa.wmnet. -57 1H IN PTR virt2.mgmt.pmtpa.wmnet. 60 1H IN PTR snapshot4.mgmt.pmtpa.wmnet. 61 1H IN PTR nas1-a.mgmt.pmtpa.wmnet. 62 1H IN PTR nas1-b.mgmt.pmtpa.wmnet. @@ -833,7 +832,6 @@ $ORIGIN 16.4.{{ zonename }}. 1 1H IN PTR vrrp-gw-105.wikimedia.org. -3 1H IN PTR virt2.pmtpa.wmnet. 10 1H IN PTR labsdb1.pmtpa.wmnet. 11 1H IN PTR labsdb2.pmtpa.wmnet. 12 1H IN PTR labsdb3.pmtpa.wmnet. diff --git a/templates/wmnet b/templates/wmnet index 5b961e4..707aab3 100644 --- a/templates/wmnet +++ b/templates/wmnet @@ -115,7 +115,6 @@ labsdb1 1H IN A10.4.16.10 labsdb2 1H IN A10.4.16.11 labsdb3 1H IN A10.4.16.12 -virt2 1H IN A10.4.16.3 ; GENERATES @@ -299,7 +298,6 @@ ts-array4a 1H IN A10.1.8.17 ts-array4b 1H IN A10.1.8.18 virt0 1H IN A10.1.8.28 -virt2 1H IN A10.1.8.57 nas1-a-e0m 1H IN A10.1.8.66 nas1-b-e0m 1H IN A10.1.8.67 WMF36391H IN A10.1.8.69 -- To view, visit https://gerrit.wikimedia.org/r/126245 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I41ae0525607f74d66287da203a2f9dcfc2522ce8 Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: Andrew Bogott abog...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove virt2 from puppet. - change (operations/puppet)
Andrew Bogott has submitted this change and it was merged. Change subject: Remove virt2 from puppet. .. Remove virt2 from puppet. Change-Id: I6515e1d4564ef4d3847e36d302978ecb7be6756d --- M manifests/site.pp M modules/install-server/files/dhcpd/linux-host-entries.ttyS1-115200 2 files changed, 0 insertions(+), 17 deletions(-) Approvals: Andrew Bogott: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/site.pp b/manifests/site.pp index d367fc8..ea1a18f 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -2779,18 +2779,6 @@ include backup::client } -node 'virt2.pmtpa.wmnet' { -$cluster = 'virt' -$openstack_version = 'folsom' -$use_neutron = false - -include admins::labs - -include standard -include role::nova::network -include role::nova::api -} - node 'labnet1001.eqiad.wmnet' { $cluster = 'virt' $openstack_version = 'havana' diff --git a/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-115200 b/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-115200 index 8720fd2..9327351 100644 --- a/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-115200 +++ b/modules/install-server/files/dhcpd/linux-host-entries.ttyS1-115200 @@ -3320,11 +3320,6 @@ fixed-address virt0.wikimedia.org; } -host virt2 { - hardware ethernet f0:4d:a2:0b:3e:2d; - fixed-address virt2.pmtpa.wmnet; -} - host labsudb1 { hardware ethernet f0:4d:a2:0b:33:f2; fixed-address labsudb1.pmtpa.wmnet; -- To view, visit https://gerrit.wikimedia.org/r/126241 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6515e1d4564ef4d3847e36d302978ecb7be6756d Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Andrew Bogott abog...@wikimedia.org Gerrit-Reviewer: Andrew Bogott abog...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix some typos in ForceSearchIndex options descriptions - change (mediawiki...CirrusSearch)
Matthias Mullie has uploaded a new change for review. https://gerrit.wikimedia.org/r/126246 Change subject: Fix some typos in ForceSearchIndex options descriptions .. Fix some typos in ForceSearchIndex options descriptions Change-Id: I5bc13595fe3ce6c774244c29c535610cd1e215dd --- M maintenance/forceSearchIndex.php 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch refs/changes/46/126246/1 diff --git a/maintenance/forceSearchIndex.php b/maintenance/forceSearchIndex.php index 0f1d7ba..6516e21 100644 --- a/maintenance/forceSearchIndex.php +++ b/maintenance/forceSearchIndex.php @@ -57,19 +57,19 @@ $this-addOption( 'from', 'Start date of reindex in -mm-ddTHH:mm:ssZ (exc. Defaults to 0 epoch.', false, true ); $this-addOption( 'to', 'Stop date of reindex in -mm-ddTHH:mm:ssZ. Defaults to now.', false, true ); $this-addOption( 'fromId', 'Start indexing at a specific page_id. Not useful with --deletes.', false, true ); - $this-addOption( 'toId', 'Stop indexing at a specific page_id. Note useful with --deletes or --from or --to.', false, true ); + $this-addOption( 'toId', 'Stop indexing at a specific page_id. Not useful with --deletes or --from or --to.', false, true ); $this-addOption( 'deletes', 'If this is set then just index deletes, not updates or creates.', false ); $this-addOption( 'limit', 'Maximum number of pages to process before exiting the script. Default to unlimited.', false, true ); $this-addOption( 'buildChunks', 'Instead of running the script spit out commands that can be farmed out to ' . 'different processes or machines to rebuild the index. Works with fromId and toId, not from and to. ' . - 'If specified as a number then chunks no larger than that size are spat out. If specified as a number with ' . + 'If specified as a number then chunks no larger than that size are spat out. If specified as a number ' . 'followed by the word total without a space between them then that many chunks will be spat out sized to ' . 'cover the entire wiki.' , false, true ); $this-addOption( 'queue', 'Rather than perform the indexes in process add them to the job queue. Ignored for delete.' ); $this-addOption( 'maxJobs', 'If there are more than this many index jobs in the queue then pause before adding ' . 'more. This is only checked every ' . self::SECONDS_BETWEEN_JOB_QUEUE_LENGTH_CHECKS . ' seconds. Not meaningful ' . 'without --queue.', false, true ); - $this-addOption( 'pauseForJobs', 'If paused adding jobs then wait for the there to be less than this many before ' . + $this-addOption( 'pauseForJobs', 'If paused adding jobs then wait for there to be less than this many before ' . 'starting again. Defaults to the value specified for --maxJobs. Not meaningful without --queue.', false, true ); $this-addOption( 'indexOnSkip', 'When skipping either parsing or links send the document as an index. ' . 'This replaces the contents of the index for that entry with the entry built from a skipped process.' . -- To view, visit https://gerrit.wikimedia.org/r/126246 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5bc13595fe3ce6c774244c29c535610cd1e215dd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: master Gerrit-Owner: Matthias Mullie mmul...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Prevent popups after scrolling - change (mediawiki...Popups)
Prtksxna has submitted this change and it was merged. Change subject: Prevent popups after scrolling .. Prevent popups after scrolling Prevent popups from showing up when the mouse cursor accidentally ends up hovering a link after scrolling. Change-Id: I07a95d9eabdc22a045a97b07f98fb0d632a276c1 --- M resources/ext.popups.core.js 1 file changed, 13 insertions(+), 1 deletion(-) Approvals: Prtksxna: Verified; Looks good to me, approved diff --git a/resources/ext.popups.core.js b/resources/ext.popups.core.js index 5428f96..3683c5b 100644 --- a/resources/ext.popups.core.js +++ b/resources/ext.popups.core.js @@ -10,6 +10,7 @@ var closeTimer, // The timer use to delay `closeBox` openTimer, // The timer used to delay sending the API request/opening the popup form cache + scrolled = false, // true if user scrolled the page but haven't moved mouse cursor elTime, // EL: UNIX timestamp of when the popup was rendered elDuration, // EL: How long was the popup open in milliseconds elAction, // EL: Was the popup clicked or middle clicked or dismissed @@ -372,6 +373,15 @@ } elSessionId = getSessionId(); + // Prevent popups from showing up when the mouse cursor accidentally + // ends up hovering a link after scrolling + $( window ).on( 'scroll', function () { + scrolled = true; + } ); + $( window ).on( 'mousemove', function () { + scrolled = false; + } ); + // Remove title attribute to remove the default yellow tooltip // Put the title back after the hover $( '#mw-content-text a' ) @@ -397,7 +407,9 @@ title = $this.attr( 'data-original-title' ); // If a popup for the following link can't be shown - if ( !title || + if ( + scrolled || + !title || $this.hasClass( 'extiw' ) || $this.hasClass( 'image' ) || $this.hasClass( 'new' ) || -- To view, visit https://gerrit.wikimedia.org/r/123790 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I07a95d9eabdc22a045a97b07f98fb0d632a276c1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Popups Gerrit-Branch: master Gerrit-Owner: JGonera jgon...@wikimedia.org Gerrit-Reviewer: JGonera jgon...@wikimedia.org Gerrit-Reviewer: Prtksxna psax...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add Phone/Tablet modifier to UA - change (apps...wikipedia)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/126247 Change subject: Add Phone/Tablet modifier to UA .. Add Phone/Tablet modifier to UA Change-Id: I3ac919861270a08abc9cd995ddc4790886ca41a6 --- A wikipedia/res/values-sw600dp/device_prop.xml A wikipedia/res/values/device_prop.xml M wikipedia/src/main/java/org/wikipedia/WikipediaApp.java 3 files changed, 13 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/47/126247/1 diff --git a/wikipedia/res/values-sw600dp/device_prop.xml b/wikipedia/res/values-sw600dp/device_prop.xml new file mode 100644 index 000..42e158b --- /dev/null +++ b/wikipedia/res/values-sw600dp/device_prop.xml @@ -0,0 +1,4 @@ +?xml version=1.0 encoding=utf-8? +resources +string name=device_typeTablet/string +/resources \ No newline at end of file diff --git a/wikipedia/res/values/device_prop.xml b/wikipedia/res/values/device_prop.xml new file mode 100644 index 000..22485b8 --- /dev/null +++ b/wikipedia/res/values/device_prop.xml @@ -0,0 +1,4 @@ +?xml version=1.0 encoding=utf-8? +resources +string name=device_typePhone/string +/resources \ No newline at end of file diff --git a/wikipedia/src/main/java/org/wikipedia/WikipediaApp.java b/wikipedia/src/main/java/org/wikipedia/WikipediaApp.java index 5714f02..c921735 100644 --- a/wikipedia/src/main/java/org/wikipedia/WikipediaApp.java +++ b/wikipedia/src/main/java/org/wikipedia/WikipediaApp.java @@ -106,7 +106,11 @@ private String userAgent; public String getUserAgent() { if (userAgent == null) { -userAgent = String.format(WikipediaApp/%s (Android/%s), WikipediaApp.APP_VERSION_STRING, Build.VERSION.RELEASE); +userAgent = String.format(WikipediaApp/%s (Android/%s;%s), +WikipediaApp.APP_VERSION_STRING, +Build.VERSION.RELEASE, +getString(R.string.device_type +)); } return userAgent; } -- To view, visit https://gerrit.wikimedia.org/r/126247 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3ac919861270a08abc9cd995ddc4790886ca41a6 Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Yuvipanda yuvipa...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] labs config, replace decom'ed virt2 - labnet1001 - change (operations/puppet)
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/126248 Change subject: labs config,replace decom'ed virt2 - labnet1001 .. labs config,replace decom'ed virt2 - labnet1001 Change-Id: Icf9e91ba893e22572b914a158aa9db3f25f86adf --- M files/openstack/folsom/virtscripts/prod.sh M manifests/role/nova.pp 2 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/48/126248/1 diff --git a/files/openstack/folsom/virtscripts/prod.sh b/files/openstack/folsom/virtscripts/prod.sh index 62aeabb..f72c912 100644 --- a/files/openstack/folsom/virtscripts/prod.sh +++ b/files/openstack/folsom/virtscripts/prod.sh @@ -11,7 +11,7 @@ SERVICE_TOKEN=redacted # ENDPOINT URLS -NOVA_PUBLIC_URL=http://virt2.pmtpa.wmnet:8774/v2/\$(tenant_id)s +NOVA_PUBLIC_URL=http://labnet1001.eqiad.wmnet:8774/v2/\$(tenant_id)s NOVA_ADMIN_URL=$NOVA_PUBLIC_URL NOVA_INTERNAL_URL=$NOVA_PUBLIC_URL diff --git a/manifests/role/nova.pp b/manifests/role/nova.pp index f75cc13..555f0ae 100644 --- a/manifests/role/nova.pp +++ b/manifests/role/nova.pp @@ -79,7 +79,7 @@ labs = $::ipaddress_eth0, }, api_host = $realm ? { - production = virt2.pmtpa.wmnet, + production = labnet1001.eqiad.wmnet, labs = $::ipaddress_eth0, }, api_ip = $realm ? { @@ -120,7 +120,7 @@ keystone_auth_protocol = $keystoneconfig[auth_protocol], keystone_auth_port = $keystoneconfig[auth_port], } - if ( $::hostname == virt2 ) { + if ( $::hostname == labnet1001 ) { $networkconfig = { network_flat_interface = $realm ? { production = bond1.103, -- To view, visit https://gerrit.wikimedia.org/r/126248 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icf9e91ba893e22572b914a158aa9db3f25f86adf Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn dz...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] updated fonts list and sorted it - change (operations/mediawiki-config)
ArielGlenn has uploaded a new change for review. https://gerrit.wikimedia.org/r/126249 Change subject: updated fonts list and sorted it .. updated fonts list and sorted it used fc-list :fontformat=TrueType on a scaler to generate Change-Id: Ib7b2bc21a36eb5ba0910c97464eab0e73ef77941 --- M fc-list 1 file changed, 324 insertions(+), 305 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/49/126249/1 diff --git a/fc-list b/fc-list index 904fc31..186fd30 100644 --- a/fc-list +++ b/fc-list @@ -1,310 +1,329 @@ -KacstArt:style=KacstArt -KacstBook:style=KacstBook -KacstDecorative:style=KacstDecorative -KacstDigital:style=KacstDigital -KacstFarsi:style=KacstFarsi -KacstOne:style=KacstOne -KacstPoster:style=KacstPoster -KacstQurn:style=KacstQurn -KacstTitle:style=KacstTitle -KacstTitleL:style=KacstTitleL -Tibetan Machine Uni:style=Regular -Liberation Mono:style=Regular -LucidaBright:style=Italic -MgOpen Moderna:style=BoldOblique -Saab:style=Regular -Utopia:style=Bold Italic -Nimbus Sans L:style=Regular Italic + aakar:style=medium -fxd:style=Bold semicondensed -DejaVu Serif,DejaVu Serif Condensed:style=Condensed,Book -TSCu_Paranar:style=Bold -WenQuanYi Bitmap Song:style=Bold -Bitstream Vera Sans Mono:style=Bold -MgOpen Modata:style=Regular -Bangwool,방울:style=Regular -sys:style=Bold -MgOpen Cosmetica:style=Bold -URW Palladio L:style=Roman -DejaVu Serif,DejaVu Serif Condensed:style=Condensed Bold Italic,Bold Italic -Century Schoolbook L:style=Bold Italic -DejaVu Serif,DejaVu Serif Condensed:style=Condensed Bold,Bold -Liberation Sans:style=Regular -DejaVu Sans,DejaVu Sans Condensed:style=Condensed Oblique,Oblique -DejaVu Sans Mono:style=Bold Oblique -mry_KacstQurn:style=Regular -Sarai:style=Regular -Mallige:style=BoldItalic -Norasi:style=Oblique -TlwgTypewriter:style=Oblique -Liberation Serif:style=Bold Italic -LucidaTypewriter:style=Sans Bold -Fixed:style=Bold -Kedage:style=NormalItalic -Bitstream Vera Sans:style=Oblique -TlwgMono:style=Medium -DejaVu Serif:style=Bold Italic -Samanata:style=Regular -Nimbus Sans L:style=Bold -Nazli:style=Bold -Lohit Oriya:style=Regular -Times:style=Bold Italic -Clean:style=Regular -Norasi:style=BoldOblique -Aksharyogini:style=Normal -Utopia:style=Bold -Likhan:style=Normal -UnGungseo,은 궁서:style=Regular -goth_p:style=Bold -ClearlyU PUA:style=Regular -UnPenheulim,은 펜흘림:style=Regular -UnBom,은 봄:style=Bold,Regular -URW Chancery L:style=Medium Italic -Bitstream Vera Sans:style=Roman -Charter:style=Bold Italic -Bitstream Charter:style=Bold Italic -MgOpen Moderna:style=Oblique -TSCu_Times:style=Normal -Pothana2000:style=Regular,Pothana2000 -DejaVu Sans:style=Bold Oblique -Nimbus Roman No9 L:style=Regular -AR PL UMing TW:style=Light -Loma:style=Oblique -Padauk:style=Bold -Century Schoolbook L:style=Bold -Century Schoolbook L:style=Italic -Scheherazade:style=Regular -Khmer OS:style=Regular -AR PL UMing HK:style=Light -TAMu_Maduram:style=Normal -fxd:style=semicondensed -UnGraphic,은 그래픽:style=Bold -AR PL UMing CN:style=Light -Norasi:style=BoldItalic -gargi:style=Medium -Nimbus Sans L:style=Regular -gothic:style=Bold -Courier:style=Regular -URW Palladio L:style=Italic -Charter:style=Bold -Helvetica:style=Oblique -Garuda:style=Oblique -UnJamoSora,은 자모 소라:style=Regular -LucidaBright:style=Regular -Nimbus Sans L:style=Bold Condensed -Terminal:style=Bold -TlwgTypewriter:style=Medium -Khmer OS Muol Pali:style=Regular -KacstOneFixed:style=Regular -URW Gothic L:style=Demi -Liberation Serif:style=Bold -MgOpen Canonica:style=Italic -Liberation Mono:style=Bold Italic -Nimbus Roman No9 L:style=Medium Italic -Bitstream Charter:style=Regular -Fixed:style=Bold SemiCondensed -EunjinNakseo,은진낙서:style=Regular -Garuda:style=BoldOblique -Nimbus Mono L:style=Bold Oblique -Khmer OS Muol:style=Regular -Nakula:style=Regular -Kalimati,नालिमाटी:style=Regular,कालिमाटी -Norasi:style=Italic -Dingbats:style=Regular -TlwgMono:style=Bold -fxd:style=Bold -Fixed:style=SemiCondensed -MgOpen Cosmetica:style=Bold Oblique -Loma:style=BoldOblique -Bitstream Vera Sans Mono:style=Oblique -Waree:style=Oblique -Nimbus Roman No9 L:style=Medium -Times:style=Bold -MgOpen Modata:style=Bold -Kedage:style=Bold -Nimbus Sans L:style=Bold Italic -Kedage:style=BoldItalic -Courier 10 Pitch:style=Bold Italic -AR PL UKai TW MBE:style=Book -Charter:style=Italic -TSCu_Comic:style=Normal -WenQuanYi Zen Hei,文泉驛正黑,文泉驿正黑:style=Medium,中等 -Khmer OS Siemreap:style=Regular -hlv:style=Bold -DejaVu Sans:style=Oblique -MgOpen Canonica:style=Bold Italic -Nimbus Mono L:style=Regular -Norasi:style=Regular -Lohit Kannada:style=Regular -UnPilgi,은 필기:style=Regular -Courier:style=Oblique -Khmer OS System:style=Regular -Bitstream Charter:style=Italic -Newspaper:style=Regular -URW Gothic L:style=Book -Kochi Gothic,東風ゴシック:style=Regular,標準 -UnJamoDotum,은 자모 돋움:style=Regular -Times:style=Italic -Khmer OS Battambang:style=Regular -Jamrul:style=Normal
[MediaWiki-commits] [Gerrit] remove virt2 from dns - change (operations/dns)
Andrew Bogott has submitted this change and it was merged. Change subject: remove virt2 from dns .. remove virt2 from dns Change-Id: I41ae0525607f74d66287da203a2f9dcfc2522ce8 --- M templates/10.in-addr.arpa M templates/wmnet 2 files changed, 0 insertions(+), 4 deletions(-) Approvals: Andrew Bogott: Looks good to me, approved jenkins-bot: Verified Dzahn: Looks good to me, but someone else must approve diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa index 6113655..7814fb7 100644 --- a/templates/10.in-addr.arpa +++ b/templates/10.in-addr.arpa @@ -507,7 +507,6 @@ 52 1H IN PTR WMF3847.mgmt.pmtpa.wmnet. 53 1H IN PTR WMF3846.mgmt.pmtpa.wmnet. 55 1H IN PTR dataset2.mgmt.pmtpa.wmnet. -57 1H IN PTR virt2.mgmt.pmtpa.wmnet. 60 1H IN PTR snapshot4.mgmt.pmtpa.wmnet. 61 1H IN PTR nas1-a.mgmt.pmtpa.wmnet. 62 1H IN PTR nas1-b.mgmt.pmtpa.wmnet. @@ -833,7 +832,6 @@ $ORIGIN 16.4.{{ zonename }}. 1 1H IN PTR vrrp-gw-105.wikimedia.org. -3 1H IN PTR virt2.pmtpa.wmnet. 10 1H IN PTR labsdb1.pmtpa.wmnet. 11 1H IN PTR labsdb2.pmtpa.wmnet. 12 1H IN PTR labsdb3.pmtpa.wmnet. diff --git a/templates/wmnet b/templates/wmnet index 5b961e4..707aab3 100644 --- a/templates/wmnet +++ b/templates/wmnet @@ -115,7 +115,6 @@ labsdb1 1H IN A10.4.16.10 labsdb2 1H IN A10.4.16.11 labsdb3 1H IN A10.4.16.12 -virt2 1H IN A10.4.16.3 ; GENERATES @@ -299,7 +298,6 @@ ts-array4a 1H IN A10.1.8.17 ts-array4b 1H IN A10.1.8.18 virt0 1H IN A10.1.8.28 -virt2 1H IN A10.1.8.57 nas1-a-e0m 1H IN A10.1.8.66 nas1-b-e0m 1H IN A10.1.8.67 WMF36391H IN A10.1.8.69 -- To view, visit https://gerrit.wikimedia.org/r/126245 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I41ae0525607f74d66287da203a2f9dcfc2522ce8 Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: Andrew Bogott abog...@wikimedia.org Gerrit-Reviewer: Andrew Bogott abog...@wikimedia.org Gerrit-Reviewer: Dzahn dz...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix some typos in ForceSearchIndex options descriptions - change (mediawiki...CirrusSearch)
jenkins-bot has submitted this change and it was merged. Change subject: Fix some typos in ForceSearchIndex options descriptions .. Fix some typos in ForceSearchIndex options descriptions Change-Id: I5bc13595fe3ce6c774244c29c535610cd1e215dd --- M maintenance/forceSearchIndex.php 1 file changed, 3 insertions(+), 3 deletions(-) Approvals: Yuvipanda: Looks good to me, approved jenkins-bot: Verified diff --git a/maintenance/forceSearchIndex.php b/maintenance/forceSearchIndex.php index 0f1d7ba..6516e21 100644 --- a/maintenance/forceSearchIndex.php +++ b/maintenance/forceSearchIndex.php @@ -57,19 +57,19 @@ $this-addOption( 'from', 'Start date of reindex in -mm-ddTHH:mm:ssZ (exc. Defaults to 0 epoch.', false, true ); $this-addOption( 'to', 'Stop date of reindex in -mm-ddTHH:mm:ssZ. Defaults to now.', false, true ); $this-addOption( 'fromId', 'Start indexing at a specific page_id. Not useful with --deletes.', false, true ); - $this-addOption( 'toId', 'Stop indexing at a specific page_id. Note useful with --deletes or --from or --to.', false, true ); + $this-addOption( 'toId', 'Stop indexing at a specific page_id. Not useful with --deletes or --from or --to.', false, true ); $this-addOption( 'deletes', 'If this is set then just index deletes, not updates or creates.', false ); $this-addOption( 'limit', 'Maximum number of pages to process before exiting the script. Default to unlimited.', false, true ); $this-addOption( 'buildChunks', 'Instead of running the script spit out commands that can be farmed out to ' . 'different processes or machines to rebuild the index. Works with fromId and toId, not from and to. ' . - 'If specified as a number then chunks no larger than that size are spat out. If specified as a number with ' . + 'If specified as a number then chunks no larger than that size are spat out. If specified as a number ' . 'followed by the word total without a space between them then that many chunks will be spat out sized to ' . 'cover the entire wiki.' , false, true ); $this-addOption( 'queue', 'Rather than perform the indexes in process add them to the job queue. Ignored for delete.' ); $this-addOption( 'maxJobs', 'If there are more than this many index jobs in the queue then pause before adding ' . 'more. This is only checked every ' . self::SECONDS_BETWEEN_JOB_QUEUE_LENGTH_CHECKS . ' seconds. Not meaningful ' . 'without --queue.', false, true ); - $this-addOption( 'pauseForJobs', 'If paused adding jobs then wait for the there to be less than this many before ' . + $this-addOption( 'pauseForJobs', 'If paused adding jobs then wait for there to be less than this many before ' . 'starting again. Defaults to the value specified for --maxJobs. Not meaningful without --queue.', false, true ); $this-addOption( 'indexOnSkip', 'When skipping either parsing or links send the document as an index. ' . 'This replaces the contents of the index for that entry with the entry built from a skipped process.' . -- To view, visit https://gerrit.wikimedia.org/r/126246 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5bc13595fe3ce6c774244c29c535610cd1e215dd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CirrusSearch Gerrit-Branch: master Gerrit-Owner: Matthias Mullie mmul...@wikimedia.org Gerrit-Reviewer: Manybubbles never...@wikimedia.org Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] updated fonts list and sorted it, rt #810 - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: updated fonts list and sorted it, rt #810 .. updated fonts list and sorted it, rt #810 used fc-list :fontformat=TrueType on a scaler to generate Change-Id: Ib7b2bc21a36eb5ba0910c97464eab0e73ef77941 --- M fc-list 1 file changed, 324 insertions(+), 305 deletions(-) Approvals: Kaldari: Looks good to me, approved jenkins-bot: Verified diff --git a/fc-list b/fc-list index 904fc31..186fd30 100644 --- a/fc-list +++ b/fc-list @@ -1,310 +1,329 @@ -KacstArt:style=KacstArt -KacstBook:style=KacstBook -KacstDecorative:style=KacstDecorative -KacstDigital:style=KacstDigital -KacstFarsi:style=KacstFarsi -KacstOne:style=KacstOne -KacstPoster:style=KacstPoster -KacstQurn:style=KacstQurn -KacstTitle:style=KacstTitle -KacstTitleL:style=KacstTitleL -Tibetan Machine Uni:style=Regular -Liberation Mono:style=Regular -LucidaBright:style=Italic -MgOpen Moderna:style=BoldOblique -Saab:style=Regular -Utopia:style=Bold Italic -Nimbus Sans L:style=Regular Italic + aakar:style=medium -fxd:style=Bold semicondensed -DejaVu Serif,DejaVu Serif Condensed:style=Condensed,Book -TSCu_Paranar:style=Bold -WenQuanYi Bitmap Song:style=Bold -Bitstream Vera Sans Mono:style=Bold -MgOpen Modata:style=Regular -Bangwool,방울:style=Regular -sys:style=Bold -MgOpen Cosmetica:style=Bold -URW Palladio L:style=Roman -DejaVu Serif,DejaVu Serif Condensed:style=Condensed Bold Italic,Bold Italic -Century Schoolbook L:style=Bold Italic -DejaVu Serif,DejaVu Serif Condensed:style=Condensed Bold,Bold -Liberation Sans:style=Regular -DejaVu Sans,DejaVu Sans Condensed:style=Condensed Oblique,Oblique -DejaVu Sans Mono:style=Bold Oblique -mry_KacstQurn:style=Regular -Sarai:style=Regular -Mallige:style=BoldItalic -Norasi:style=Oblique -TlwgTypewriter:style=Oblique -Liberation Serif:style=Bold Italic -LucidaTypewriter:style=Sans Bold -Fixed:style=Bold -Kedage:style=NormalItalic -Bitstream Vera Sans:style=Oblique -TlwgMono:style=Medium -DejaVu Serif:style=Bold Italic -Samanata:style=Regular -Nimbus Sans L:style=Bold -Nazli:style=Bold -Lohit Oriya:style=Regular -Times:style=Bold Italic -Clean:style=Regular -Norasi:style=BoldOblique -Aksharyogini:style=Normal -Utopia:style=Bold -Likhan:style=Normal -UnGungseo,은 궁서:style=Regular -goth_p:style=Bold -ClearlyU PUA:style=Regular -UnPenheulim,은 펜흘림:style=Regular -UnBom,은 봄:style=Bold,Regular -URW Chancery L:style=Medium Italic -Bitstream Vera Sans:style=Roman -Charter:style=Bold Italic -Bitstream Charter:style=Bold Italic -MgOpen Moderna:style=Oblique -TSCu_Times:style=Normal -Pothana2000:style=Regular,Pothana2000 -DejaVu Sans:style=Bold Oblique -Nimbus Roman No9 L:style=Regular -AR PL UMing TW:style=Light -Loma:style=Oblique -Padauk:style=Bold -Century Schoolbook L:style=Bold -Century Schoolbook L:style=Italic -Scheherazade:style=Regular -Khmer OS:style=Regular -AR PL UMing HK:style=Light -TAMu_Maduram:style=Normal -fxd:style=semicondensed -UnGraphic,은 그래픽:style=Bold -AR PL UMing CN:style=Light -Norasi:style=BoldItalic -gargi:style=Medium -Nimbus Sans L:style=Regular -gothic:style=Bold -Courier:style=Regular -URW Palladio L:style=Italic -Charter:style=Bold -Helvetica:style=Oblique -Garuda:style=Oblique -UnJamoSora,은 자모 소라:style=Regular -LucidaBright:style=Regular -Nimbus Sans L:style=Bold Condensed -Terminal:style=Bold -TlwgTypewriter:style=Medium -Khmer OS Muol Pali:style=Regular -KacstOneFixed:style=Regular -URW Gothic L:style=Demi -Liberation Serif:style=Bold -MgOpen Canonica:style=Italic -Liberation Mono:style=Bold Italic -Nimbus Roman No9 L:style=Medium Italic -Bitstream Charter:style=Regular -Fixed:style=Bold SemiCondensed -EunjinNakseo,은진낙서:style=Regular -Garuda:style=BoldOblique -Nimbus Mono L:style=Bold Oblique -Khmer OS Muol:style=Regular -Nakula:style=Regular -Kalimati,नालिमाटी:style=Regular,कालिमाटी -Norasi:style=Italic -Dingbats:style=Regular -TlwgMono:style=Bold -fxd:style=Bold -Fixed:style=SemiCondensed -MgOpen Cosmetica:style=Bold Oblique -Loma:style=BoldOblique -Bitstream Vera Sans Mono:style=Oblique -Waree:style=Oblique -Nimbus Roman No9 L:style=Medium -Times:style=Bold -MgOpen Modata:style=Bold -Kedage:style=Bold -Nimbus Sans L:style=Bold Italic -Kedage:style=BoldItalic -Courier 10 Pitch:style=Bold Italic -AR PL UKai TW MBE:style=Book -Charter:style=Italic -TSCu_Comic:style=Normal -WenQuanYi Zen Hei,文泉驛正黑,文泉驿正黑:style=Medium,中等 -Khmer OS Siemreap:style=Regular -hlv:style=Bold -DejaVu Sans:style=Oblique -MgOpen Canonica:style=Bold Italic -Nimbus Mono L:style=Regular -Norasi:style=Regular -Lohit Kannada:style=Regular -UnPilgi,은 필기:style=Regular -Courier:style=Oblique -Khmer OS System:style=Regular -Bitstream Charter:style=Italic -Newspaper:style=Regular -URW Gothic L:style=Book -Kochi Gothic,東風ゴシック:style=Regular,標準 -UnJamoDotum,은 자모 돋움:style=Regular -Times:style=Italic -Khmer OS Battambang:style=Regular -Jamrul:style=Normal -ClearlyU:style=Regular -MgOpen
[MediaWiki-commits] [Gerrit] FormatJson: Make it possible to change the indent string - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: FormatJson: Make it possible to change the indent string .. FormatJson: Make it possible to change the indent string This is to allow consistency with MediaWiki PHP and JS files (e.g. when generating JSON i18n files), not because tabs are better than spaces for indenting code (both have advantages and disadvantages). Because PHP's json_encode() function hardcodes the indent string, using tabs has a performance cost (in post-processing the output) and is less suitable for web output; thus the API and ResourceLoader debug mode will continue to use four spaces. Adjusting the maintenance scripts and JSON files is left to separate change sets. Bug: 63444 Change-Id: Ic915c50b0acd2e236940b70d5dd48ea87954c9d5 --- M RELEASE-NOTES-1.24 M includes/json/FormatJson.php M tests/phpunit/includes/json/FormatJsonTest.php 3 files changed, 61 insertions(+), 24 deletions(-) Approvals: Anomie: Looks good to me, approved jenkins-bot: Verified diff --git a/RELEASE-NOTES-1.24 b/RELEASE-NOTES-1.24 index 0e7fbe6..4e2b6a9 100644 --- a/RELEASE-NOTES-1.24 +++ b/RELEASE-NOTES-1.24 @@ -11,6 +11,8 @@ === Configuration changes in 1.24 === === New features in 1.24 === +* (bug 63444) Made it possible to change the indent string (default: 4 spaces) + used by FormatJson::encode(). === Bug fixes in 1.24 === * (bug 62258) A bug was fixed in File::getUnscaledThumb when a height diff --git a/includes/json/FormatJson.php b/includes/json/FormatJson.php index 83718c3..97d98a4 100644 --- a/includes/json/FormatJson.php +++ b/includes/json/FormatJson.php @@ -95,11 +95,17 @@ * (cf. FormatJson::XMLMETA_OK). Use Xml::encodeJsVar() instead in such cases. * * @param mixed $value The value to encode. Can be any type except a resource. -* @param bool $pretty If true, add non-significant whitespace to improve readability. +* @param string|bool $pretty If a string, add non-significant whitespace to improve +* readability, using that string for indentation. If true, use the default indent +* string (four spaces). * @param int $escaping Bitfield consisting of _OK class constants * @return string|bool: String if successful; false upon failure */ public static function encode( $value, $pretty = false, $escaping = 0 ) { + if ( !is_string( $pretty ) ) { + $pretty = $pretty ? '' : false; + } + if ( defined( 'JSON_UNESCAPED_UNICODE' ) ) { return self::encode54( $value, $pretty, $escaping ); } @@ -125,7 +131,7 @@ * JSON encoder wrapper for PHP = 5.4, which supports useful encoding options. * * @param mixed $value -* @param bool $pretty +* @param string|bool $pretty * @param int $escaping * @return string|bool */ @@ -134,7 +140,7 @@ // which is hardly useful when '' and '' are escaped (and inadequate), and such // escaping negatively impacts the human readability of URLs and similar strings. $options = JSON_UNESCAPED_SLASHES; - $options |= $pretty ? JSON_PRETTY_PRINT : 0; + $options |= $pretty !== false ? JSON_PRETTY_PRINT : 0; $options |= ( $escaping self::UTF8_OK ) ? JSON_UNESCAPED_UNICODE : 0; $options |= ( $escaping self::XMLMETA_OK ) ? 0 : ( JSON_HEX_TAG | JSON_HEX_AMP ); $json = json_encode( $value, $options ); @@ -142,10 +148,22 @@ return false; } - if ( $pretty ) { + if ( $pretty !== false ) { // Remove whitespace inside empty arrays/objects; different JSON encoders // vary on this, and we want our output to be consistent across implementations. $json = preg_replace( self::WS_CLEANUP_REGEX, '', $json ); + if ( $pretty !== '' ) { + // Change the four-space indent to a tab indent + $json = str_replace( \n, \n\t, $json ); + while ( strpos( $json, \t ) !== false ) { + $json = str_replace( \t, \t\t, $json ); + } + + if ( $pretty !== \t ) { + // Change the tab indent to the provided indent + $json = str_replace( \t, $pretty, $json ); + } + } } if ( $escaping self::UTF8_OK ) { $json = str_replace( self::$badChars, self::$badCharsEscaped, $json );
[MediaWiki-commits] [Gerrit] remove virt15 from DHCP, decom - change (operations/puppet)
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/126250 Change subject: remove virt15 from DHCP, decom .. remove virt15 from DHCP, decom Change-Id: I9a3e434b8be7782675bb3546060cf33046e51f36 --- M modules/install-server/files/dhcpd/linux-host-entries.ttyS0-115200 1 file changed, 0 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/50/126250/1 diff --git a/modules/install-server/files/dhcpd/linux-host-entries.ttyS0-115200 b/modules/install-server/files/dhcpd/linux-host-entries.ttyS0-115200 index bc1d8e8..0934e2e 100644 --- a/modules/install-server/files/dhcpd/linux-host-entries.ttyS0-115200 +++ b/modules/install-server/files/dhcpd/linux-host-entries.ttyS0-115200 @@ -115,8 +115,3 @@ fixed-address virt1009.eqiad.wmnet; } -host virt15 { - hardware ethernet 88:43:E1:C2:7B:6C; - fixed-address virt15.pmtpa.wmnet; -} - -- To view, visit https://gerrit.wikimedia.org/r/126250 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9a3e434b8be7782675bb3546060cf33046e51f36 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn dz...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Create autopatrolled user group on brwikimedia - change (operations/mediawiki-config)
Odder has uploaded a new change for review. https://gerrit.wikimedia.org/r/126251 Change subject: Create autopatrolled user group on brwikimedia .. Create autopatrolled user group on brwikimedia Since sysops are already able to add users to this group, it would be nice to actually have it, too. Requires setting $wgUseRCPatrol to 'true', which I'm doing after a comment from Lestaty, who speaks on behalf of the user group. Bug: 63345 Change-Id: Ib18fd0ac5a06ebbcea0f93fd25376561389dd6f1 --- M wmf-config/InitialiseSettings.php 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/51/126251/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index df8d668..3b15507 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -6071,6 +6071,7 @@ 'arwikisource' = true, 'bgwiki' = true, 'bnwiki' = true, // bug 11042 + 'brwikimedia' = true, // bug 63345 'cawiki' = true, 'commonswiki' = true, // bug 22834 'dawiki' = true, // wegge asked in #wikimedia-tech 2006-03-01 @@ -6550,6 +6551,9 @@ 'patroller' = array( 'patrol' = true, 'autopatrol' = true, 'rollback' = true, ), 'sysop' = array( 'upload' = true, 'autopatrol' = false, ), ), + 'brwikimedia' = array( // bug 63345 + 'autopatrolled' = array( 'autopatrol' = true, ), + ), 'bswiki' = array( 'patroller' = array( 'patrol' = true ), 'autopatrolled' = array( 'autopatrol' = true ), -- To view, visit https://gerrit.wikimedia.org/r/126251 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib18fd0ac5a06ebbcea0f93fd25376561389dd6f1 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Odder twkozlow...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] beta: do not use private key for star.wmflabs.org cert - change (operations/puppet)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/126252 Change subject: beta: do not use private key for star.wmflabs.org cert .. beta: do not use private key for star.wmflabs.org cert Apparently that might fix the issue with nginx not starting because the key is invalid for star.wmflabs.org. Change-Id: I30d5368a66580ec544af036b71faef8b4af39b82 --- M manifests/role/protoproxy.pp 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/52/126252/1 diff --git a/manifests/role/protoproxy.pp b/manifests/role/protoproxy.pp index 3c1a33f..50a21e4 100644 --- a/manifests/role/protoproxy.pp +++ b/manifests/role/protoproxy.pp @@ -314,7 +314,9 @@ certificates::wmf_labs_ca, role::protoproxy::ssl::common -install_certificate { 'star.wmflabs.org': } +install_certificate { 'star.wmflabs.org': +privatekey = false, +} } -- To view, visit https://gerrit.wikimedia.org/r/126252 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I30d5368a66580ec544af036b71faef8b4af39b82 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Hashar has...@free.fr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] FormatJson: Make it possible to change the indent string - change (mediawiki/core)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/126253 Change subject: FormatJson: Make it possible to change the indent string .. FormatJson: Make it possible to change the indent string This is to allow consistency with MediaWiki PHP and JS files (e.g. when generating JSON i18n files), not because tabs are better than spaces for indenting code (both have advantages and disadvantages). Because PHP's json_encode() function hardcodes the indent string, using tabs has a performance cost (in post-processing the output) and is less suitable for web output; thus the API and ResourceLoader debug mode will continue to use four spaces. Adjusting the maintenance scripts and JSON files is left to separate change sets. Bug: 63444 Change-Id: Ic915c50b0acd2e236940b70d5dd48ea87954c9d5 (cherry picked from commit 1efdda25ee5cbaea2b7e2dd7afdbaf53063d4b68) --- M RELEASE-NOTES-1.23 M includes/json/FormatJson.php M tests/phpunit/includes/json/FormatJsonTest.php 3 files changed, 61 insertions(+), 24 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/53/126253/1 diff --git a/RELEASE-NOTES-1.23 b/RELEASE-NOTES-1.23 index 496699e..958eac6 100644 --- a/RELEASE-NOTES-1.23 +++ b/RELEASE-NOTES-1.23 @@ -148,6 +148,8 @@ process the result set prior to rendering. * A PoolCounterRedis class was added which can be make use of in $wgPoolCounterConf. This requires at least one Redis 2.6+ server. +* (bug 63444) Made it possible to change the indent string (default: 4 spaces) + used by FormatJson::encode(). === Bug fixes in 1.23 === * (bug 41759) The updated since last visit markers (on history pages, recent diff --git a/includes/json/FormatJson.php b/includes/json/FormatJson.php index 83718c3..97d98a4 100644 --- a/includes/json/FormatJson.php +++ b/includes/json/FormatJson.php @@ -95,11 +95,17 @@ * (cf. FormatJson::XMLMETA_OK). Use Xml::encodeJsVar() instead in such cases. * * @param mixed $value The value to encode. Can be any type except a resource. -* @param bool $pretty If true, add non-significant whitespace to improve readability. +* @param string|bool $pretty If a string, add non-significant whitespace to improve +* readability, using that string for indentation. If true, use the default indent +* string (four spaces). * @param int $escaping Bitfield consisting of _OK class constants * @return string|bool: String if successful; false upon failure */ public static function encode( $value, $pretty = false, $escaping = 0 ) { + if ( !is_string( $pretty ) ) { + $pretty = $pretty ? '' : false; + } + if ( defined( 'JSON_UNESCAPED_UNICODE' ) ) { return self::encode54( $value, $pretty, $escaping ); } @@ -125,7 +131,7 @@ * JSON encoder wrapper for PHP = 5.4, which supports useful encoding options. * * @param mixed $value -* @param bool $pretty +* @param string|bool $pretty * @param int $escaping * @return string|bool */ @@ -134,7 +140,7 @@ // which is hardly useful when '' and '' are escaped (and inadequate), and such // escaping negatively impacts the human readability of URLs and similar strings. $options = JSON_UNESCAPED_SLASHES; - $options |= $pretty ? JSON_PRETTY_PRINT : 0; + $options |= $pretty !== false ? JSON_PRETTY_PRINT : 0; $options |= ( $escaping self::UTF8_OK ) ? JSON_UNESCAPED_UNICODE : 0; $options |= ( $escaping self::XMLMETA_OK ) ? 0 : ( JSON_HEX_TAG | JSON_HEX_AMP ); $json = json_encode( $value, $options ); @@ -142,10 +148,22 @@ return false; } - if ( $pretty ) { + if ( $pretty !== false ) { // Remove whitespace inside empty arrays/objects; different JSON encoders // vary on this, and we want our output to be consistent across implementations. $json = preg_replace( self::WS_CLEANUP_REGEX, '', $json ); + if ( $pretty !== '' ) { + // Change the four-space indent to a tab indent + $json = str_replace( \n, \n\t, $json ); + while ( strpos( $json, \t ) !== false ) { + $json = str_replace( \t, \t\t, $json ); + } + + if ( $pretty !== \t ) { + // Change the tab indent to the provided indent + $json = str_replace( \t, $pretty,
[MediaWiki-commits] [Gerrit] beta: do not use private key for star.wmflabs.org cert - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: beta: do not use private key for star.wmflabs.org cert .. beta: do not use private key for star.wmflabs.org cert Apparently that might fix the issue with nginx not starting because the key is invalid for star.wmflabs.org. Change-Id: I30d5368a66580ec544af036b71faef8b4af39b82 --- M manifests/role/protoproxy.pp 1 file changed, 3 insertions(+), 1 deletion(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/manifests/role/protoproxy.pp b/manifests/role/protoproxy.pp index 3c1a33f..50a21e4 100644 --- a/manifests/role/protoproxy.pp +++ b/manifests/role/protoproxy.pp @@ -314,7 +314,9 @@ certificates::wmf_labs_ca, role::protoproxy::ssl::common -install_certificate { 'star.wmflabs.org': } +install_certificate { 'star.wmflabs.org': +privatekey = false, +} } -- To view, visit https://gerrit.wikimedia.org/r/126252 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I30d5368a66580ec544af036b71faef8b4af39b82 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Hashar has...@free.fr Gerrit-Reviewer: Andrew Bogott abog...@wikimedia.org Gerrit-Reviewer: Dzahn dz...@wikimedia.org Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com Gerrit-Reviewer: coren mpellet...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Moved 'Edit review' user preferences into the 'Recent change... - change (mediawiki...FlaggedRevs)
jenkins-bot has submitted this change and it was merged. Change subject: Moved 'Edit review' user preferences into the 'Recent changes' tab .. Moved 'Edit review' user preferences into the 'Recent changes' tab As 'Edit review' preferences control how latest revisions are shown, 'Recent changes' tab seems to be the right one to move it to. Removed qqq messages as well. Bug: 63576 Change-Id: I2c2b08646da6bde2c7b62a9fc4d42cc610d3e690 --- M frontend/FlaggedRevsUI.hooks.php M i18n/flaggedrevs/en.json M i18n/flaggedrevs/qqq.json 3 files changed, 3 insertions(+), 5 deletions(-) Approvals: 01tonythomas: Looks good to me, but someone else must approve Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/frontend/FlaggedRevsUI.hooks.php b/frontend/FlaggedRevsUI.hooks.php index e940502..d8be90b 100644 --- a/frontend/FlaggedRevsUI.hooks.php +++ b/frontend/FlaggedRevsUI.hooks.php @@ -95,7 +95,7 @@ $preferences['flaggedrevssimpleui'] = array( 'type' = 'radio', - 'section' = 'flaggedrevs/flaggedrevs-ui', + 'section' = 'rc/flaggedrevs-ui', 'label-message' = 'flaggedrevs-pref-UI', 'options' = array( wfMessage( 'flaggedrevs-pref-UI-0' )-text() = 0, @@ -106,7 +106,7 @@ $preferences['flaggedrevsstable'] = array( 'type' = 'radio', - 'section' = 'flaggedrevs/flaggedrevs-ui', + 'section' = 'rc/flaggedrevs-ui', 'label-message' = 'flaggedrevs-prefs-stable', 'options' = array( wfMessage( 'flaggedrevs-pref-stable-0' )-text() = FR_SHOW_STABLE_DEFAULT, @@ -134,7 +134,7 @@ $preferences['flaggedrevsviewdiffs'] = array( 'type' = 'toggle', - 'section' = 'flaggedrevs/flaggedrevs-ui', + 'section' = 'rc/flaggedrevs-ui', 'label-message' = 'flaggedrevs-prefs-viewdiffs', ); } diff --git a/i18n/flaggedrevs/en.json b/i18n/flaggedrevs/en.json index bb9635a..bd7e1f3 100644 --- a/i18n/flaggedrevs/en.json +++ b/i18n/flaggedrevs/en.json @@ -15,7 +15,6 @@ flaggedrevs-pref-UI-0: Use detailed boxes to show review status of pages, flaggedrevs-pref-UI-1: Use small icons and minimal text to show review status of pages, flaggedrevs-stable-categories: , -prefs-flaggedrevs: Edit review, prefs-flaggedrevs-ui: Edit review, flaggedrevs-prefs-stable: When to show the stable version of content pages by default, flaggedrevs-pref-stable-0: Use the default settings for each page, diff --git a/i18n/flaggedrevs/qqq.json b/i18n/flaggedrevs/qqq.json index c93f507..0860781 100644 --- a/i18n/flaggedrevs/qqq.json +++ b/i18n/flaggedrevs/qqq.json @@ -43,7 +43,6 @@ flaggedrevs-pref-UI-0: {{Flagged Revs-small}}\nOption in [[Special:Preferences]], under {{msg-mw|prefs-flaggedrevs}}.\n\nSee {{msg-mw|flaggedrevs-pref-UI-1}} for the opposite message.\n\nSee [[:Image:FlaggedRevs.jpg]] for an example image., flaggedrevs-pref-UI-1: {{Flagged Revs-small}}\nOption in [[Special:Preferences]], under {{msg-mw|prefs-flaggedrevs}}.\n\nSee {{msg-mw|flaggedrevs-pref-UI-0}} for the opposite message.\n\nSee [[:Image:FlaggedRevs.jpg]] for an example image., flaggedrevs-stable-categories: {{Flagged Revs}}\n{{notranslate}}, -prefs-flaggedrevs: {{Flagged Revs-small}}\n\nThis appears in [[Special:Preferences]]:\n* as an additional ''tab'', when JavaScript is enabled, or\n* as an additional ''section header'', when JavaScript is disabled\nThe tab is for review-related preferences., prefs-flaggedrevs-ui: {{Flagged Revs-small}}\n\nThis appears in [[Special:Preferences]], under the tab that using the name {{Prefs-flaggedrevs}}., flaggedrevs-prefs-stable: {{Flagged Revs}}\nShown on [[Special:Preferences]].\nThe user is to select one of the following options:\n* {{msg-mw|Flaggedrevs-pref-stable-0}}\n* {{msg-mw|Flaggedrevs-pref-stable-1}}\n* {{msg-mw|Flaggedrevs-pref-stable-2}}\n{{Identical|Content page}}, flaggedrevs-pref-stable-0: {{Flagged Revs}}\nShow on [[Special:Preferences]] as an option for how to use stable versions.\nThis option make pages display the stable version either as the default or not as the default based on page and site settings, *rather* than any user settings. In other words, it removes any custom user-specified behavior., -- To view, visit
[MediaWiki-commits] [Gerrit] Documentation for page_props getter in ParserOutput - change (mediawiki/core)
Thiemo Mättig (WMDE) has uploaded a new change for review. https://gerrit.wikimedia.org/r/126254 Change subject: Documentation for page_props getter in ParserOutput .. Documentation for page_props getter in ParserOutput I would love to make this getter return null instead of false, similar to getExtensionData() in the same class. A property that's not set should be null. Not a boolean. This makes it impossible to have boolean properties. But I can't change this because it's used in extensions with !== false and such. Luckily the properties are strings. That's what the documentation now says. Change-Id: I2bc0bed1c58435d791f7a055bac2763a3411bb6f --- M includes/parser/ParserOutput.php 1 file changed, 7 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/54/126254/1 diff --git a/includes/parser/ParserOutput.php b/includes/parser/ParserOutput.php index eab2705..3f71d52 100644 --- a/includes/parser/ParserOutput.php +++ b/includes/parser/ParserOutput.php @@ -451,6 +451,13 @@ $this-mProperties[$name] = $value; } + /** +* Gets a property previously stored in the page_props database table. +* +* @param string $name The key to look up. +* +* @return string|false A serialized string value or false if no value was set for this key. +*/ public function getProperty( $name ) { return isset( $this-mProperties[$name] ) ? $this-mProperties[$name] : false; } -- To view, visit https://gerrit.wikimedia.org/r/126254 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2bc0bed1c58435d791f7a055bac2763a3411bb6f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Thiemo Mättig (WMDE) thiemo.maet...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits