[MediaWiki-commits] [Gerrit] T99836 Civi46 remove call to pseudoconstant:locationType - change (wikimedia...crm)
Eileen has uploaded a new change for review. https://gerrit.wikimedia.org/r/240040 Change subject: T99836 Civi46 remove call to pseudoconstant:locationType .. T99836 Civi46 remove call to pseudoconstant:locationType This function has been removed Change-Id: Iab6905629ed018555eac94e073c0b10e1f2d7a04 --- M sites/all/modules/wmf_civicrm/bootstrap.inc 1 file changed, 23 insertions(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/40/240040/1 diff --git a/sites/all/modules/wmf_civicrm/bootstrap.inc b/sites/all/modules/wmf_civicrm/bootstrap.inc index 2287589..018ae90 100644 --- a/sites/all/modules/wmf_civicrm/bootstrap.inc +++ b/sites/all/modules/wmf_civicrm/bootstrap.inc @@ -122,31 +122,38 @@ } } +/** + * Ensure that a location type exists for every item in the array. + * + * @param array $financial_types + * + * @throws \CiviCRM_API3_Exception + */ function wmf_civicrm_create_location_types($location_types, $update_existing = FALSE) { +$existingTypes = civicrm_api3('Address', 'getoptions', array( + 'field' => 'location_type_id', +)); +if (!$update_existing) { +$location_types = array_diff($location_types, $existingTypes['values']); +} foreach ($location_types as $name => $display_name) { -$location_type_id = CRM_Utils_Array::key( -$name, -CRM_Contribute_PseudoConstant::locationType() +$params = array( +'name' => $name, +'display_name' => $display_name, +'is_active' => 1, ); - -if (!$location_type_id || $update_existing == TRUE) -{ -$params = array( -'name' => $name, -'display_name' => $display_name, -'is_active' => 1, -); -if ($location_type_id && $update_existing == TRUE) -{ -$params['id'] = $location_type_id; -} -wmf_civicrm_add_location_type($params); +if ($update_existing) { +$params['id'] = array_search($display_name, $existingTypes['values']); } +civicrm_api3('LocationType', 'create', $params); } } +/** + * @deprecated + */ function wmf_civicrm_add_location_type($params) { $locationType = new CRM_Core_DAO_LocationType(); -- To view, visit https://gerrit.wikimedia.org/r/240040 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iab6905629ed018555eac94e073c0b10e1f2d7a04 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: Eileen ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] T99836 add option value for tag_used for upgrading installs ... - change (wikimedia...crm)
Eileen has uploaded a new change for review. https://gerrit.wikimedia.org/r/240038 Change subject: T99836 add option value for tag_used for upgrading installs too. .. T99836 add option value for tag_used for upgrading installs too. The tag_used option value civicrm_contribution now needs to exist before the tag can be created. But, current installs also need to add it - so adding in a second place. The function checks if it exists first Change-Id: Ic91a6fda168c8540e802bb4a4cd1302bec32586e --- M sites/all/modules/wmf_civicrm/wmf_civicrm.install 1 file changed, 11 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/38/240038/1 diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.install b/sites/all/modules/wmf_civicrm/wmf_civicrm.install index 780c62b..da4eb36 100644 --- a/sites/all/modules/wmf_civicrm/wmf_civicrm.install +++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.install @@ -1453,3 +1453,14 @@ wmf_civicrm_create_option_values( 'payment_instrument', array('Trilogy') ); return array(); } + +/** + * Add option value 'tag_used_for' for civicrm_contribution. + * + * This might exist as it had to be added to update 7022 so check first.d + */ +function wmf_civicrm_update_7035() { +wmf_civicrm_bootstrap_civi(); +wmf_civicrm_create_option_values( 'payment_instrument', array('Trilogy') ); +return array(); +} -- To view, visit https://gerrit.wikimedia.org/r/240038 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic91a6fda168c8540e802bb4a4cd1302bec32586e Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: Eileen ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add mainpage-nstab for translation - change (translatewiki)
Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/240036 Change subject: Add mainpage-nstab for translation .. Add mainpage-nstab for translation Change-Id: Ice9a4fed789d8e099f126ad23231a1b11a83dc9b --- M groups/MediaWiki/MediaWiki.yaml M groups/MediaWiki/wikimedia-mostused-2015.txt 2 files changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/translatewiki refs/changes/36/240036/1 diff --git a/groups/MediaWiki/MediaWiki.yaml b/groups/MediaWiki/MediaWiki.yaml index ccbce59..9da303b 100644 --- a/groups/MediaWiki/MediaWiki.yaml +++ b/groups/MediaWiki/MediaWiki.yaml @@ -429,7 +429,6 @@ - lonelypages-summary - longpage-hint - longpages-summary -- mainpage-nstab - markaspatrolledlink - mostcategories-summary - mostimages-summary diff --git a/groups/MediaWiki/wikimedia-mostused-2015.txt b/groups/MediaWiki/wikimedia-mostused-2015.txt index a6a41df..53690de 100644 --- a/groups/MediaWiki/wikimedia-mostused-2015.txt +++ b/groups/MediaWiki/wikimedia-mostused-2015.txt @@ -1,4 +1,5 @@ mainpage +mainpage-nstab editsectionhint editsection red-link-title -- To view, visit https://gerrit.wikimedia.org/r/240036 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ice9a4fed789d8e099f126ad23231a1b11a83dc9b Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Siebrand ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] T99836 remove code to add prevnext indexes - change (wikimedia...crm)
Eileen has uploaded a new change for review. https://gerrit.wikimedia.org/r/240039 Change subject: T99836 remove code to add prevnext indexes .. T99836 remove code to add prevnext indexes These indexes are already in core in 4.6 Change-Id: I45d935733c6f30dcbb68fd2be453808422ed553f --- M sites/all/modules/wmf_civicrm/wmf_civicrm.install 1 file changed, 3 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/39/240039/1 diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.install b/sites/all/modules/wmf_civicrm/wmf_civicrm.install index da4eb36..0fa4d5a 100644 --- a/sites/all/modules/wmf_civicrm/wmf_civicrm.install +++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.install @@ -1197,17 +1197,13 @@ } /** - * Add indexes to the civicrm_prevnext_cache table + * Add indexes to the civicrm_prevnext_cache table. + * + * In CiviCRM 4.6 these are in core. */ function wmf_civicrm_update_7025() { -$dbs = wmf_civicrm_get_dbs(); -$dbs->push('civicrm'); -db_query("alter table civicrm_prevnext_cache -add index entity_id1 (entity_id1), -add index entity_id2 (entity_id2), -add index cacheKey (cacheKey)"); } /** -- To view, visit https://gerrit.wikimedia.org/r/240039 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I45d935733c6f30dcbb68fd2be453808422ed553f Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: Eileen ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] T99836 CiviCRM 4.6 : add otion value for tag_used_for on ins... - change (wikimedia...crm)
Eileen has uploaded a new change for review. https://gerrit.wikimedia.org/r/240037 Change subject: T99836 CiviCRM 4.6 : add otion value for tag_used_for on install .. T99836 CiviCRM 4.6 : add otion value for tag_used_for on install The tag used_for is now required for creating tags used_for civicrm_contribution Change-Id: Ie5c698e29aa8ae9763dc8c890d2bfbfbee90125a --- M sites/all/modules/wmf_civicrm/bootstrap.inc M sites/all/modules/wmf_civicrm/wmf_civicrm.install 2 files changed, 54 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/37/240037/1 diff --git a/sites/all/modules/wmf_civicrm/bootstrap.inc b/sites/all/modules/wmf_civicrm/bootstrap.inc index 03f5eb0..2287589 100644 --- a/sites/all/modules/wmf_civicrm/bootstrap.inc +++ b/sites/all/modules/wmf_civicrm/bootstrap.inc @@ -53,31 +53,71 @@ } } +/** + * Create option values in CiviCRM. + * + * For more control use the option_values_detailed function below. + * + * NB - encapsulated the detailed create function has a slight performance + * cost since group is resolved potentially multiple times - but this + * function seems like a rarely run function. + * + * @param string $group_name + * @param array $values + */ function wmf_civicrm_create_option_values( $group_name, $values ) +{ +foreach ($values as $value) { +wmf_civicrm_create_option_values_detailed($group_name, array( +$value => array( +'name' => $value, +))); +} +} + +/** + * Create option values in CiviCRM with details. + * + * The previous other of this only permits a flat array. This allows a more + * nuanced option value create. + * + * This checks for an existing option value first. + * + * @param string $group_name + * @param array $values + */ +function wmf_civicrm_create_option_values_detailed($group_name, $values) { $api = wmf_civicrm_bootstrap_civi(); $api->OptionGroup->Get(array( -'name' => $group_name, + 'name' => $group_name, )); $result = $api->values(); $option_group = array_pop($result); -foreach ($values as $value) +foreach ($values as $key => $value) { +$params = array_merge(array( + 'option_group_id' => $option_group->id, + 'name' => $key, + 'label' => $key, + 'is_active' => 1, +), $value); + $api->OptionValue->Get(array( -'option_group_id' => $option_group->id, -'name' => $value, + 'option_group_id' => $option_group->id, + 'name' => $params['name'], )); $result = $api->values(); if (empty($result)) { -$api->OptionValue->Create(array( -'option_group_id' => $option_group->id, -'name' => $value, -'label' => $value, -'is_active' => 1, -)); +$api->OptionValue->Create(array_merge(array( + 'option_group_id' => $option_group->id, + 'name' => $key, + 'label' => $key, + 'is_active' => 1, +)), $value); } } } diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.install b/sites/all/modules/wmf_civicrm/wmf_civicrm.install index 2e07ff0..780c62b 100644 --- a/sites/all/modules/wmf_civicrm/wmf_civicrm.install +++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.install @@ -852,6 +852,10 @@ { $ret = array(); $api = wmf_civicrm_bootstrap_civi(); +wmf_civicrm_create_option_values_detailed('tag_used_for', array( +'Contributions' => array('value' => 'civicrm_contribution'), +)); + $success = $api->Tag->get(array( 'name' => 'RecurringRestarted', 'used_for' => 'civicrm_contribution', -- To view, visit https://gerrit.wikimedia.org/r/240037 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie5c698e29aa8ae9763dc8c890d2bfbfbee90125a Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: Eileen ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Defer the ApiTranslateUser::trackGroup saveSettings() call - change (mediawiki...Translate)
jenkins-bot has submitted this change and it was merged. Change subject: Defer the ApiTranslateUser::trackGroup saveSettings() call .. Defer the ApiTranslateUser::trackGroup saveSettings() call Bug: T94480 Bug: T92357 Change-Id: Id4232a1f79aad0925ec17a9834ee4b441201b749 --- M api/ApiTranslateUser.php 1 file changed, 4 insertions(+), 1 deletion(-) Approvals: Gilles: Looks good to me, approved jenkins-bot: Verified diff --git a/api/ApiTranslateUser.php b/api/ApiTranslateUser.php index 95ab332..1c81d7f 100644 --- a/api/ApiTranslateUser.php +++ b/api/ApiTranslateUser.php @@ -79,7 +79,10 @@ $groups = array_slice( $groups, 0, 5 ); $user->setOption( 'translate-recent-groups', implode( '|', $groups ) ); - $user->saveSettings(); + // Promise to persist the data post-send + DeferredUpdates::addCallableUpdate( function() use ( $user ) { + $user->saveSettings(); + } ); return true; } -- To view, visit https://gerrit.wikimedia.org/r/240035 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id4232a1f79aad0925ec17a9834ee4b441201b749 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Aaron Schulz Gerrit-Reviewer: Gilles Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Defer the ApiTranslateUser::trackGroup saveSettings() call - change (mediawiki...Translate)
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/240035 Change subject: Defer the ApiTranslateUser::trackGroup saveSettings() call .. Defer the ApiTranslateUser::trackGroup saveSettings() call Bug: T94480 Bug: T92357 Change-Id: Id4232a1f79aad0925ec17a9834ee4b441201b749 --- M api/ApiTranslateUser.php 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/35/240035/1 diff --git a/api/ApiTranslateUser.php b/api/ApiTranslateUser.php index 95ab332..1c81d7f 100644 --- a/api/ApiTranslateUser.php +++ b/api/ApiTranslateUser.php @@ -79,7 +79,10 @@ $groups = array_slice( $groups, 0, 5 ); $user->setOption( 'translate-recent-groups', implode( '|', $groups ) ); - $user->saveSettings(); + // Promise to persist the data post-send + DeferredUpdates::addCallableUpdate( function() use ( $user ) { + $user->saveSettings(); + } ); return true; } -- To view, visit https://gerrit.wikimedia.org/r/240035 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id4232a1f79aad0925ec17a9834ee4b441201b749 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Aaron Schulz ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Handle changes to `vagrant::config` order - change (mediawiki/vagrant)
jenkins-bot has submitted this change and it was merged. Change subject: Handle changes to `vagrant::config` order .. Handle changes to `vagrant::config` order Utilize the `match` parameter of `file_line` to remove lines that were written using the previous order. Change-Id: Ic8c6411e97f54819967025200d4d1c44f18c12b3 --- M puppet/modules/varnish/manifests/config.pp 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Gilles: Looks good to me, approved jenkins-bot: Verified diff --git a/puppet/modules/varnish/manifests/config.pp b/puppet/modules/varnish/manifests/config.pp index af23436..d0dc387 100644 --- a/puppet/modules/varnish/manifests/config.pp +++ b/puppet/modules/varnish/manifests/config.pp @@ -41,6 +41,7 @@ file_line { "${::varnish::conf}:${title}": line=> "include \"${path}\";", path=> $::varnish::conf, +match => "${::varnish::confd}/[0-9]+-${title}.vcl", require => File[$path], notify => Exec['varnish_sort_confd'], } -- To view, visit https://gerrit.wikimedia.org/r/239995 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic8c6411e97f54819967025200d4d1c44f18c12b3 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: Dduvall Gerrit-Reviewer: BryanDavis Gerrit-Reviewer: Gilles Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Revert "[TopTenPages] Disable for now" - change (translatewiki)
jenkins-bot has submitted this change and it was merged. Change subject: Revert "[TopTenPages] Disable for now" .. Revert "[TopTenPages] Disable for now" This reverts commit 2bdf317c0a76eb420095bd4387facef7dfb7490e. Change-Id: Ie7329934a76c7ec47d543fc6eb49b85eb41aa054 --- M groups/MediaWiki/mediawiki-extensions.txt 1 file changed, 2 insertions(+), 3 deletions(-) Approvals: Raimond Spekking: Looks good to me, approved jenkins-bot: Verified diff --git a/groups/MediaWiki/mediawiki-extensions.txt b/groups/MediaWiki/mediawiki-extensions.txt index b3bbeb7..c35cbbe 100644 --- a/groups/MediaWiki/mediawiki-extensions.txt +++ b/groups/MediaWiki/mediawiki-extensions.txt @@ -2275,9 +2275,8 @@ Tooltip -# Missing userrights for l10n-bot. Task T113158 -#Top Ten Pages -#aliasfile = TopTenPages/TopTenPages.alias.php +Top Ten Pages +aliasfile = TopTenPages/TopTenPages.alias.php Tor Block -- To view, visit https://gerrit.wikimedia.org/r/239983 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie7329934a76c7ec47d543fc6eb49b85eb41aa054 Gerrit-PatchSet: 1 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: Paladox Gerrit-Reviewer: Paladox Gerrit-Reviewer: Raimond Spekking Gerrit-Reviewer: Siebrand Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Defer the user update in enableCXBetaFeature() - change (mediawiki...ContentTranslation)
jenkins-bot has submitted this change and it was merged. Change subject: Defer the user update in enableCXBetaFeature() .. Defer the user update in enableCXBetaFeature() Bug: T94480 Bug: T92357 Change-Id: I248e64e8675f6e231ac288f94108240a21d9fa82 --- M specials/SpecialContentTranslation.php 1 file changed, 4 insertions(+), 1 deletion(-) Approvals: Gilles: Looks good to me, approved jenkins-bot: Verified diff --git a/specials/SpecialContentTranslation.php b/specials/SpecialContentTranslation.php index e76aa7c..28b45f0 100644 --- a/specials/SpecialContentTranslation.php +++ b/specials/SpecialContentTranslation.php @@ -29,7 +29,10 @@ $user = $this->getUser(); $out = $this->getOutput(); $user->setOption( 'cx', '1' ); - $user->saveSettings(); + // Promise to persist the setting post-send + DeferredUpdates::addCallableUpdate( function() use ( $user ) { + $user->saveSettings(); + } ); $out->addModules( 'ext.cx.beta.notification' ); } -- To view, visit https://gerrit.wikimedia.org/r/240022 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I248e64e8675f6e231ac288f94108240a21d9fa82 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Aaron Schulz Gerrit-Reviewer: Gilles Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mira: remove inclusion of releases::upload - change (operations/puppet)
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/240034 Change subject: mira: remove inclusion of releases::upload .. mira: remove inclusion of releases::upload In Ica21c2a4cc0c57e1 this include moved into the role but as commented by Alex Monk it was only removed from tin, not from mira. The point was to have it in the role and not on the nodes to avoid differences. Change-Id: Ifef3c210664226a34c636246d2edc77222e03887 --- M manifests/site.pp 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/34/240034/1 diff --git a/manifests/site.pp b/manifests/site.pp index 6a30abf..d7665d1 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -1894,7 +1894,6 @@ include standard include base::firewall include role::labsdb::manager -include role::releases::upload interface::add_ip6_mapped { 'main': interface => 'eth0', -- To view, visit https://gerrit.wikimedia.org/r/240034 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifef3c210664226a34c636246d2edc77222e03887 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] jobrunner/videoscaler: raise max_execution_time to 20 minutes - change (operations/puppet)
Giuseppe Lavagetto has submitted this change and it was merged. Change subject: jobrunner/videoscaler: raise max_execution_time to 20 minutes .. jobrunner/videoscaler: raise max_execution_time to 20 minutes Both jobrunners and videoscalers might be running long-running jobs. Change-Id: I88fb28eff17374312ae54b5ddc01e2f0f84004a6 --- M hieradata/role/common/mediawiki/jobrunner.yaml M hieradata/role/common/mediawiki/videoscaler.yaml 2 files changed, 4 insertions(+), 0 deletions(-) Approvals: Giuseppe Lavagetto: Looks good to me, approved jenkins-bot: Verified diff --git a/hieradata/role/common/mediawiki/jobrunner.yaml b/hieradata/role/common/mediawiki/jobrunner.yaml index 9ef51d2..0303204 100644 --- a/hieradata/role/common/mediawiki/jobrunner.yaml +++ b/hieradata/role/common/mediawiki/jobrunner.yaml @@ -8,3 +8,5 @@ mediawiki::jobrunner::runners_translate: 1 mediawiki::jobrunner::runners_upload: 7 nutcracker::verbosity: "4" +hhvm::extra::fcgi: + max_execution_time: 1200 diff --git a/hieradata/role/common/mediawiki/videoscaler.yaml b/hieradata/role/common/mediawiki/videoscaler.yaml index ac64148..4e48944 100644 --- a/hieradata/role/common/mediawiki/videoscaler.yaml +++ b/hieradata/role/common/mediawiki/videoscaler.yaml @@ -4,3 +4,5 @@ - perf-admins mediawiki::jobrunner::runners_transcode: 5 nutcracker::verbosity: "4" +hhvm::extra::fcgi: + max_execution_time: 1200 -- To view, visit https://gerrit.wikimedia.org/r/240033 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I88fb28eff17374312ae54b5ddc01e2f0f84004a6 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Giuseppe Lavagetto Gerrit-Reviewer: Giuseppe Lavagetto Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] jobrunner/videoscaler: raise max_execution_time to 20 minutes - change (operations/puppet)
Giuseppe Lavagetto has uploaded a new change for review. https://gerrit.wikimedia.org/r/240033 Change subject: jobrunner/videoscaler: raise max_execution_time to 20 minutes .. jobrunner/videoscaler: raise max_execution_time to 20 minutes Both jobrunners and videoscalers might be running long-running jobs. Change-Id: I88fb28eff17374312ae54b5ddc01e2f0f84004a6 --- M hieradata/role/common/mediawiki/jobrunner.yaml M hieradata/role/common/mediawiki/videoscaler.yaml 2 files changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/33/240033/1 diff --git a/hieradata/role/common/mediawiki/jobrunner.yaml b/hieradata/role/common/mediawiki/jobrunner.yaml index 9ef51d2..0303204 100644 --- a/hieradata/role/common/mediawiki/jobrunner.yaml +++ b/hieradata/role/common/mediawiki/jobrunner.yaml @@ -8,3 +8,5 @@ mediawiki::jobrunner::runners_translate: 1 mediawiki::jobrunner::runners_upload: 7 nutcracker::verbosity: "4" +hhvm::extra::fcgi: + max_execution_time: 1200 diff --git a/hieradata/role/common/mediawiki/videoscaler.yaml b/hieradata/role/common/mediawiki/videoscaler.yaml index ac64148..4e48944 100644 --- a/hieradata/role/common/mediawiki/videoscaler.yaml +++ b/hieradata/role/common/mediawiki/videoscaler.yaml @@ -4,3 +4,5 @@ - perf-admins mediawiki::jobrunner::runners_transcode: 5 nutcracker::verbosity: "4" +hhvm::extra::fcgi: + max_execution_time: 1200 -- To view, visit https://gerrit.wikimedia.org/r/240033 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I88fb28eff17374312ae54b5ddc01e2f0f84004a6 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Giuseppe Lavagetto ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Dashboard: Use ULS for language selection - change (mediawiki...ContentTranslation)
Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/240032 Change subject: Dashboard: Use ULS for language selection .. Dashboard: Use ULS for language selection Bug: T112051 Change-Id: I5ee3bdb25d8716641d88550ee1f5e85c1e384b0d --- M extension.json M modules/dashboard/ext.cx.dashboard.js M modules/dashboard/styles/ext.cx.dashboard.less 3 files changed, 71 insertions(+), 96 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/32/240032/1 diff --git a/extension.json b/extension.json index f1ad542..f2d5f99 100644 --- a/extension.json +++ b/extension.json @@ -221,7 +221,8 @@ "ext.cx.translationlist", "ext.cx.suggestionlist", "mediawiki.Uri", - "mediawiki.ui.button" + "mediawiki.ui.button", + "ext.uls.mediawiki" ], "messages": [ "cx-create-new-translation", diff --git a/modules/dashboard/ext.cx.dashboard.js b/modules/dashboard/ext.cx.dashboard.js index 5e53115..6935e9a 100644 --- a/modules/dashboard/ext.cx.dashboard.js +++ b/modules/dashboard/ext.cx.dashboard.js @@ -50,36 +50,23 @@ }; /** -* Populate the language filter +* Set the language filter label * -* @param {jQuery} $filter Source filter or target filter to fill -* @param {String[]} languages Array of language codes +* @param {jQuery} $filter Source filter or target filter * @param {String} selected Selected language code */ - CXDashboard.prototype.populateLanguageFilter = function ( $filter, languages, selected ) { - var i, label, $options = []; + CXDashboard.prototype.setLanguageFilterLabel = function ( $filter, selected ) { + var label; - $filter.empty(); - - if ( $filter.is( '.translation-source-language-filter' ) ) { + if ( selected ) { + label = $.uls.data.getAutonym( selected ); + } else if ( $filter.is( '.translation-source-language-filter' ) ) { label = mw.msg( 'cx-translation-filter-from-any-language' ); } else { label = mw.msg( 'cx-translation-filter-to-any-language' ); } - $options.push( $( '' ) - .text( label ) - .attr( 'value', '' ) - ); - for ( i = 0; i < languages.length; i++ ) { - $options.push( $( '' ) - // Todo: use translated language name - .text( $.uls.data.getAutonym( languages[ i ] ) ) - .prop( 'selected', selected === languages[ i ] ) - .attr( 'value', languages[ i ] ) - ); - } - $filter.append( $options ).show(); + $filter.text( label ); }; /** @@ -201,22 +188,19 @@ .addClass( 'cx-filters' ) .append( $filterTabs ); - this.$sourceLanguageFilter = $( '' ).addClass( 'translation-source-language-filter' ); - this.$targetLanguageFilter = $( '' ).addClass( 'translation-target-language-filter' ); + this.$sourceLanguageFilter = $( '' ) + .addClass( 'translation-source-language-filter' ); + this.$targetLanguageFilter = $( '' ) + .addClass( 'translation-target-language-filter' ); + this.setLanguageFilterLabel( this.$sourceLanguageFilter ); + this.setLanguageFilterLabel( this.$targetLanguageFilter ); $sourceLanguageContainer = $( '' ) .addClass( 'translation-language-source-container' ) - .append( - this.$sourceLanguageFilter, - $( '' ) - .addClass( 'translation-language-select-arrow' ) - ); + .append( this.$sourceLanguageFilter ); $targetLanguageContainer = $( '' ) .addClass( 'translation-language-target-container' ) - .append( - this.$targetLanguageFilter, - $( '' ).addClass( 'translation-language-select-arrow' ) - ); + .append( this.$targetLanguageFilter ); this.$listHeader.append( this.$filter, @@ -239,10 +223,8 @@ $.each( this.lists
[MediaWiki-commits] [Gerrit] registration: Allow extensions to specify which MW core vers... - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: registration: Allow extensions to specify which MW core versions they require .. registration: Allow extensions to specify which MW core versions they require This adds a "requires" property to extension.json, which extensions and skins can use to indicate which versions of MediaWiki core they support. The hacky wfUseMW() is now deprecated in favor of this. Rather than writing our own version constraint and parser library, we can re-use composer's, which was recently split out into a separate library named "composer/semver" for this patch. Any syntax accepted by composer[1] is available for usage here. Test cases have been provided to demonstrate how versions are parsed. For now it is recommended that people stick to expressing compatability with stable versions (e.g. ">= 1.26"). This patch does not support requiring specific MediaWiki core WMF branches, since those do not follow the standard semver format that composer parses. If we are unable to parse $wgVersion, all checking will be skipped and reported as compatible. [1] https://getcomposer.org/doc/01-basic-usage.md#package-versions Bug: T99084 Change-Id: I7785827216e16c596356d0ae42d6b30f3f179f10 --- M autoload.php M composer.json M docs/extension.schema.json M includes/GlobalFunctions.php A includes/registration/CoreVersionChecker.php M includes/registration/ExtensionProcessor.php M includes/registration/ExtensionRegistry.php M includes/registration/Processor.php A tests/phpunit/includes/registration/CoreVersionCheckerTest.php 9 files changed, 166 insertions(+), 0 deletions(-) Approvals: Parent5446: Looks good to me, approved Jforrester: Looks good to me, but someone else must approve Florianschmidtwelzow: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/autoload.php b/autoload.php index 82a45b4..b97e190 100644 --- a/autoload.php +++ b/autoload.php @@ -273,6 +273,7 @@ 'CopyJobQueue' => __DIR__ . '/maintenance/copyJobQueue.php', 'CoreParserFunctions' => __DIR__ . '/includes/parser/CoreParserFunctions.php', 'CoreTagHooks' => __DIR__ . '/includes/parser/CoreTagHooks.php', + 'CoreVersionChecker' => __DIR__ . '/includes/registration/CoreVersionChecker.php', 'CreateAndPromote' => __DIR__ . '/maintenance/createAndPromote.php', 'CreateFileOp' => __DIR__ . '/includes/filebackend/FileOp.php', 'CreditsAction' => __DIR__ . '/includes/actions/CreditsAction.php', diff --git a/composer.json b/composer.json index 852f2d2..adfe01b 100644 --- a/composer.json +++ b/composer.json @@ -16,6 +16,7 @@ "wiki": "https://www.mediawiki.org/"; }, "require": { + "composer/semver": "0.1.0", "cssjanus/cssjanus": "1.1.1", "ext-iconv": "*", "leafo/lessphp": "0.5.0", diff --git a/docs/extension.schema.json b/docs/extension.schema.json index 1d78ecc..ece38fe 100644 --- a/docs/extension.schema.json +++ b/docs/extension.schema.json @@ -270,6 +270,16 @@ "Unlicense" ] }, + "requires": { + "type": "object", + "description": "Indicates what versions of MediaWiki core are required. This syntax may be extended in the future, for example to check dependencies between other extensions.", + "properties": { + "MediaWiki": { + "type": "string", + "description": "Version constraint string against MediaWiki core." + } + } + }, "ResourceFileModulePaths": { "type": "object", "description": "Default paths to use for all ResourceLoader file modules", diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 9d89633..5e8b2c3 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -3202,6 +3202,7 @@ * * @see perldoc -f use * + * @deprecated since 1.26, use the "requires' property of extension.json * @param string|int|float $req_ver The version to check, can be a string, an integer, or a float * @throws MWException */ diff --git a/includes/registration/CoreVersionChecker.php b/includes/registration/CoreVersionChecker.php new file mode 100644 index 000..a7a926c --- /dev/null +++ b/includes/registration/CoreVersionChecker.php @@ -0,0 +1,68 @@ +http://www.gnu.org/copyleft/gpl.html + */ + +use Composer\Semver\VersionParser; +use Composer\Semver\Constraint\VersionConstraint; + +/** + * @since 1.26 + */ +class CoreVersionChecker { + + /** +* @var VersionConstraint|bool representing $wgVersion +*/ + p
[MediaWiki-commits] [Gerrit] 4.6 upgrade preparation, replace contribution_type with fina... - change (wikimedia...crm)
Eileen has uploaded a new change for review. https://gerrit.wikimedia.org/r/240031 Change subject: 4.6 upgrade preparation, replace contribution_type with financial_type .. 4.6 upgrade preparation, replace contribution_type with financial_type Patch fixes wmf_civicrm_create_contribution_types to the new field name financial_types Change-Id: Ie1b70e2118a92d0d43f98f0e9947bba8fc420a28 --- M sites/all/modules/wmf_civicrm/bootstrap.inc M sites/all/modules/wmf_civicrm/wmf_civicrm.install 2 files changed, 25 insertions(+), 24 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/31/240031/1 diff --git a/sites/all/modules/wmf_civicrm/bootstrap.inc b/sites/all/modules/wmf_civicrm/bootstrap.inc index 104ee48..03f5eb0 100644 --- a/sites/all/modules/wmf_civicrm/bootstrap.inc +++ b/sites/all/modules/wmf_civicrm/bootstrap.inc @@ -29,26 +29,27 @@ return $api; } -function wmf_civicrm_create_contribution_types($contribution_types) +/** + * Ensure that a financial type exists for every item in the array. + * + * @param array $financial_types + * + * @throws \CiviCRM_API3_Exception + */ +function wmf_civicrm_create_financial_types($financial_types) { -foreach ($contribution_types as $type) +$existingFinancialTypes = civicrm_api3('Contribution', 'getoptions', array( +'field' => 'financial_type_id', +)); +$missingTypes = array_diff($financial_types, $existingFinancialTypes['values']); +foreach ($missingTypes as $type) { -$contribution_type_id = CRM_Utils_Array::key( -$type, -CRM_Contribute_PseudoConstant::contributionType() -); - -if (!$contribution_type_id) -{ -$params = array( -'is_active' => 1, -'is_deductible' => 1, -'accounting_code' => strtoupper($type), -'name' => $type, -); -$ids = array(); -CRM_Contribute_BAO_ContributionType::add($params, $ids); -} +civicrm_api3('FinancialType', 'create', array( + 'is_active' => 1, + 'is_deductible' => 1, + 'accounting_code' => strtoupper($type), + 'name' => $type, +)); } } diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.install b/sites/all/modules/wmf_civicrm/wmf_civicrm.install index bffae6a..2e07ff0 100644 --- a/sites/all/modules/wmf_civicrm/wmf_civicrm.install +++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.install @@ -161,7 +161,7 @@ ); wmf_civicrm_bootstrap_civi(); -wmf_civicrm_create_contribution_types($contribution_types); +wmf_civicrm_create_financial_types($contribution_types); wmf_civicrm_create_option_values( 'payment_instrument', $payment_instruments ); return array(); @@ -252,7 +252,7 @@ function wmf_civicrm_update_7003() { wmf_civicrm_bootstrap_civi(); -wmf_civicrm_create_contribution_types(array( +wmf_civicrm_create_financial_types(array( 'Merkle', )); } @@ -575,7 +575,7 @@ { $api = wmf_civicrm_bootstrap_civi(); -wmf_civicrm_create_contribution_types(array( +wmf_civicrm_create_financial_types(array( 'Refund', 'Chargeback', )); @@ -595,7 +595,7 @@ function wmf_civicrm_update_7008() { wmf_civicrm_bootstrap_civi(); - wmf_civicrm_create_contribution_types(array( + wmf_civicrm_create_financial_types(array( 'Arizona Lockbox', )); } @@ -1088,7 +1088,7 @@ if (!$result) { throw new Exception('Could not find custom group wmf_donor. Please run update 7023 first.'); } - + $custom_group = array_pop($result); for ($year = WMF_MIN_ROLLUP_YEAR; $year <= WMF_MAX_ROLLUP_YEAR; $year++) { @@ -1256,7 +1256,7 @@ } wmf_civicrm_bootstrap_civi(); -wmf_civicrm_create_contribution_types( array( +wmf_civicrm_create_financial_types( array( 'Engage', ) ); } -- To view, visit https://gerrit.wikimedia.org/r/240031 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie1b70e2118a92d0d43f98f0e9947bba8fc420a28 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: Eileen ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove scap announces in -operations - change (labs...grrrit)
jenkins-bot has submitted this change and it was merged. Change subject: Remove scap announces in -operations .. Remove scap announces in -operations Keep it in -releng Change-Id: Ib2a375e4b7dd3d4a23daf80c0a308023f8440c99 --- M config.yaml 1 file changed, 1 insertion(+), 3 deletions(-) Approvals: Ori.livneh: Looks good to me, approved jenkins-bot: Verified diff --git a/config.yaml b/config.yaml index d23e85c..f641a3a 100644 --- a/config.yaml +++ b/config.yaml @@ -126,7 +126,6 @@ wikimedia/bugzilla/modifications: wikimedia/bots/jouncebot: # This is sent to #wikimedia-releng too. -mediawiki/tools/scap: "#wikimedia-releng": mediawiki/selenium: mediawiki/ruby/.*: @@ -135,11 +134,10 @@ mediawiki/tools/code-utils: mediawiki/tools/release: mediawiki/tools/releng: +mediawiki/tools/scap: # All commits to a betacluster branch goes here .*: branch: "betacluster" -# This is sent to #wikimedia-operations too. -mediawiki/tools/scap: "#wikidata-feed": mediawiki/extensions/Wikibase.*: mediawiki/extensions/Wikidata.*: -- To view, visit https://gerrit.wikimedia.org/r/240030 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib2a375e4b7dd3d4a23daf80c0a308023f8440c99 Gerrit-PatchSet: 1 Gerrit-Project: labs/tools/grrrit Gerrit-Branch: master Gerrit-Owner: Greg Grossmeier Gerrit-Reviewer: Merlijn van Deen Gerrit-Reviewer: Ori.livneh Gerrit-Reviewer: Yuvipanda 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 scap announces in -operations - change (labs...grrrit)
Greg Grossmeier has uploaded a new change for review. https://gerrit.wikimedia.org/r/240030 Change subject: Remove scap announces in -operations .. Remove scap announces in -operations Keep it in -releng Change-Id: Ib2a375e4b7dd3d4a23daf80c0a308023f8440c99 --- M config.yaml 1 file changed, 1 insertion(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/tools/grrrit refs/changes/30/240030/1 diff --git a/config.yaml b/config.yaml index d23e85c..f641a3a 100644 --- a/config.yaml +++ b/config.yaml @@ -126,7 +126,6 @@ wikimedia/bugzilla/modifications: wikimedia/bots/jouncebot: # This is sent to #wikimedia-releng too. -mediawiki/tools/scap: "#wikimedia-releng": mediawiki/selenium: mediawiki/ruby/.*: @@ -135,11 +134,10 @@ mediawiki/tools/code-utils: mediawiki/tools/release: mediawiki/tools/releng: +mediawiki/tools/scap: # All commits to a betacluster branch goes here .*: branch: "betacluster" -# This is sent to #wikimedia-operations too. -mediawiki/tools/scap: "#wikidata-feed": mediawiki/extensions/Wikibase.*: mediawiki/extensions/Wikidata.*: -- To view, visit https://gerrit.wikimedia.org/r/240030 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib2a375e4b7dd3d4a23daf80c0a308023f8440c99 Gerrit-PatchSet: 1 Gerrit-Project: labs/tools/grrrit Gerrit-Branch: master Gerrit-Owner: Greg Grossmeier ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update grunt-contrib-jshint to 0.11.3 - change (mediawiki...UniversalLanguageSelector)
jenkins-bot has submitted this change and it was merged. Change subject: Update grunt-contrib-jshint to 0.11.3 .. Update grunt-contrib-jshint to 0.11.3 Update to JSHint ~2.8.0. Change-Id: Ia3d7f353754ed55fc709aeb73d529cb958a8be27 --- M package.json 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: KartikMistry: Looks good to me, approved Hashar: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/package.json b/package.json index 4ba38c3..094b8ea 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "devDependencies": { "grunt": "0.4.5", "grunt-cli": "0.1.13", -"grunt-contrib-jshint": "0.11.2", +"grunt-contrib-jshint": "0.11.3", "grunt-banana-checker": "0.2.2", "grunt-jsonlint": "1.0.4" } -- To view, visit https://gerrit.wikimedia.org/r/239867 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia3d7f353754ed55fc709aeb73d529cb958a8be27 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Paladox Gerrit-Reviewer: Hashar Gerrit-Reviewer: KartikMistry Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Nikerabbit 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 index placeholder for ./2015/ - change (wikimedia/annualreport)
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/240029 Change subject: add index placeholder for ./2015/ .. add index placeholder for ./2015/ Adds a placeholder index.html to create ./2015/ dir. Also for demonstration purposes to show how Gerrit and git-review work. Bug:T112928 Change-Id: I9f69fe165da607d9ea183010f230d5ad0125e881 --- A 2015/index.html 1 file changed, 11 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/annualreport refs/changes/29/240029/1 diff --git a/2015/index.html b/2015/index.html new file mode 100644 index 000..5d50749 --- /dev/null +++ b/2015/index.html @@ -0,0 +1,11 @@ + + + + + +Wikimedia Foundation Annual Report 2015 + + + + + -- To view, visit https://gerrit.wikimedia.org/r/240029 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9f69fe165da607d9ea183010f230d5ad0125e881 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/annualreport Gerrit-Branch: master Gerrit-Owner: Dzahn ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Made RefreshLinksJob cleanup links for deleted pages - change (mediawiki/core)
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/240027 Change subject: Made RefreshLinksJob cleanup links for deleted pages .. Made RefreshLinksJob cleanup links for deleted pages * This makes it easy to defer page deletion links updates if desired. JobRunner is better at avoiding slave lag than random queries tacked on to web requests. * Removed redundant $flags to Revision::newFromTitle(). * Removed unused LinksDeletionUpdate::LinksDeletionUpdate(). Change-Id: Ia182968c90bf4c7d0092f2cd6309de2b2b4ed6ef --- M includes/deferred/LinksUpdate.php M includes/jobqueue/jobs/RefreshLinksJob.php 2 files changed, 44 insertions(+), 34 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/27/240027/1 diff --git a/includes/deferred/LinksUpdate.php b/includes/deferred/LinksUpdate.php index e9ec7ff..8db858d 100644 --- a/includes/deferred/LinksUpdate.php +++ b/includes/deferred/LinksUpdate.php @@ -940,21 +940,25 @@ * Update object handling the cleanup of links tables after a page was deleted. **/ class LinksDeletionUpdate extends SqlDataUpdate { - /** @var WikiPage The WikiPage that was deleted */ - protected $mPage; + /** @var WikiPage */ + protected $page; + /** @var integer */ + protected $pageId; /** -* Constructor -* * @param WikiPage $page Page we are updating +* @param integer|null $pageId ID of the page we are updating [optional] * @throws MWException */ - function __construct( WikiPage $page ) { + function __construct( WikiPage $page, $pageId = null ) { parent::__construct( false ); // no implicit transaction - $this->mPage = $page; - - if ( !$page->exists() ) { + $this->page = $page; + if ( $page->exists() ) { + $this->pageId = $page->getId(); + } elseif ( $pageId ) { + $this->pageId = $pageId; + } else { throw new MWException( "Page ID not known, perhaps the page doesn't exist?" ); } } @@ -963,21 +967,20 @@ * Do some database updates after deletion */ public function doUpdate() { - $title = $this->mPage->getTitle(); - $id = $this->mPage->getId(); + # Page may already be deleted, so don't just getId() + $id = $this->pageId; # Delete restrictions for it $this->mDb->delete( 'page_restrictions', array( 'pr_page' => $id ), __METHOD__ ); # Fix category table counts - $cats = array(); - $res = $this->mDb->select( 'categorylinks', 'cl_to', array( 'cl_from' => $id ), __METHOD__ ); - - foreach ( $res as $row ) { - $cats[] = $row->cl_to; - } - - $this->mPage->updateCategoryCounts( array(), $cats ); + $cats = $this->mDb->selectFieldValues( + 'categorylinks', + 'cl_to', + array( 'cl_from' => $id ), + __METHOD__ + ); + $this->page->updateCategoryCounts( array(), $cats ); # If using cascading deletes, we can skip some explicit deletes if ( !$this->mDb->cascadingDeletes() ) { @@ -995,6 +998,7 @@ # If using cleanup triggers, we can skip some manual deletes if ( !$this->mDb->cleanupTriggers() ) { + $title = $this->page->getTitle(); # Find recentchanges entries to clean up... $rcIdsForTitle = $this->mDb->selectFieldValues( 'recentchanges', 'rc_id', @@ -1017,17 +1021,5 @@ $this->mDb->delete( 'recentchanges', array( 'rc_id' => $rcIds ), __METHOD__ ); } } - } - - /** -* Update all the appropriate counts in the category table. -* @param array $added Associative array of category name => sort key -* @param array $deleted Associative array of category name => sort key -*/ - function updateCategoryCounts( $added, $deleted ) { - $a = WikiPage::factory( $this->mTitle ); - $a->updateCategoryCounts( - array_keys( $added ), array_keys( $deleted ) - ); } } diff --git a/includes/jobqueue/jobs/RefreshLinksJob.php b/includes/jobqueue/jobs/RefreshLinksJob.php index 935d2fb..1a50ce9 100644 --- a/includes/jobqueue/jobs/RefreshLinksJob.php +++ b/includes/jobqueue/jobs/RefreshLinksJob.php @@ -96,7 +96,7 @@ } elseif ( isset( $this->params['pages'] ) ) {
[MediaWiki-commits] [Gerrit] Made page deletions defer the link deletion updates - change (mediawiki/core)
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/240028 Change subject: Made page deletions defer the link deletion updates .. Made page deletions defer the link deletion updates * This enqueues a RefreshLinks job post-commit instead of doing the updates now. The job runners are better at avoiding slave lag. Bug: T95501 Change-Id: Ia99c55fb01059ba07ef0145bfe5bb0d94fb880c2 --- M includes/content/AbstractContent.php M includes/jobqueue/jobs/RefreshLinksJob.php M includes/page/WikiPage.php 3 files changed, 10 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/28/240028/1 diff --git a/includes/content/AbstractContent.php b/includes/content/AbstractContent.php index 6542d7d..fc41db4 100644 --- a/includes/content/AbstractContent.php +++ b/includes/content/AbstractContent.php @@ -412,9 +412,7 @@ * @see Content::getDeletionUpdates */ public function getDeletionUpdates( WikiPage $page, ParserOutput $parserOutput = null ) { - return array( - new LinksDeletionUpdate( $page ), - ); + return array(); } /** diff --git a/includes/jobqueue/jobs/RefreshLinksJob.php b/includes/jobqueue/jobs/RefreshLinksJob.php index 1a50ce9..84fd1a6 100644 --- a/includes/jobqueue/jobs/RefreshLinksJob.php +++ b/includes/jobqueue/jobs/RefreshLinksJob.php @@ -100,7 +100,8 @@ } // Job to update link tables for a given title } else { - $this->runForTitle( $this->title ); + $pageId = isset( $this->params['pageId'] ) ? $this->params['pageId'] : null; + $this->runForTitle( $this->title, $pageId ); } return true; diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php index d1cec60..c296f76 100644 --- a/includes/page/WikiPage.php +++ b/includes/page/WikiPage.php @@ -2911,13 +2911,18 @@ * may already return null when the page proper was deleted. */ public function doDeleteUpdates( $id, Content $content = null ) { - // update site status + // Update site status DeferredUpdates::addUpdate( new SiteStatsUpdate( 0, 1, - (int)$this->isCountable(), -1 ) ); - // remove secondary indexes, etc + // Remove secondary indexes, etc $updates = $this->getDeletionUpdates( $content ); DataUpdate::runUpdates( $updates ); + // Remove entires from backlink tables + JobQueueGroup::singleton()->lazyPush( + new RefreshLinksJob( $this->mTitle, array( 'pageId' => $id ) ) + ); + // Reparse any pages transcluding this page LinksUpdate::queueRecursiveJobsForTable( $this->mTitle, 'templatelinks' ); -- To view, visit https://gerrit.wikimedia.org/r/240028 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia99c55fb01059ba07ef0145bfe5bb0d94fb880c2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] (wmf) CRM-17156 log user id against queries fix - change (wikimedia...civicrm)
Eileen has uploaded a new change for review. https://gerrit.wikimedia.org/r/240026 Change subject: (wmf) CRM-17156 log user id against queries fix .. (wmf) CRM-17156 log user id against queries fix The 4.2 method for getting the user id for queries turned out to be causing a loop as it was being called too early in the instantiation process Change-Id: Iab0c70c91028cf414c0a42a13a117063b8e07c0c --- M packages/DB/common.php 1 file changed, 4 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm refs/changes/26/240026/1 diff --git a/packages/DB/common.php b/packages/DB/common.php index 6723202..32b4c8e 100644 --- a/packages/DB/common.php +++ b/packages/DB/common.php @@ -1158,9 +1158,10 @@ global $installType; if ( isset( $installType ) ) { $prefix = "/* Civi utils not available during installation */"; -} else { -$uid = CRM_Utils_System::getLoggedInUfID(); -$prefix = "/* https://civicrm.wikimedia.org/user/{$uid} */ "; +} +else { +global $user; +$prefix = "/* https://civicrm.wikimedia.org/user/{$user->uid} */ "; } $query = $prefix . $query; -- To view, visit https://gerrit.wikimedia.org/r/240026 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iab0c70c91028cf414c0a42a13a117063b8e07c0c Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm/civicrm Gerrit-Branch: master Gerrit-Owner: Eileen ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Change blueprint to Blueprint in $stylename - change (mediawiki...Blueprint)
jenkins-bot has submitted this change and it was merged. Change subject: Change blueprint to Blueprint in $stylename .. Change blueprint to Blueprint in $stylename The skin name should be capitalized here, matching what Vector does. Change-Id: I9c6bafc18a956673edf430ba028420431d7a81f0 --- M src/SkinBlueprint.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Spage: Looks good to me, approved jenkins-bot: Verified Objections: VolkerE: There's a problem with this change, please improve diff --git a/src/SkinBlueprint.php b/src/SkinBlueprint.php index b0ef50d..128e54b 100644 --- a/src/SkinBlueprint.php +++ b/src/SkinBlueprint.php @@ -2,7 +2,7 @@ class SkinBlueprint extends SkinTemplate { public $skinname = 'blueprint'; - public $stylename = 'blueprint'; + public $stylename = 'Blueprint'; public $template = 'BlueprintSkinTemplate'; public function initPage( OutputPage $out ) { -- To view, visit https://gerrit.wikimedia.org/r/239876 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9c6bafc18a956673edf430ba028420431d7a81f0 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/skins/Blueprint Gerrit-Branch: master Gerrit-Owner: Paladox Gerrit-Reviewer: Jforrester Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Prtksxna Gerrit-Reviewer: Spage Gerrit-Reviewer: VolkerE Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] jobqueue: A few small code cleanups to RefreshLinksJob - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: jobqueue: A few small code cleanups to RefreshLinksJob .. jobqueue: A few small code cleanups to RefreshLinksJob Change-Id: Ia331e9dbf9d2be137c34a8c93ef2d6da8aad6c56 --- M includes/jobqueue/jobs/RefreshLinksJob.php 1 file changed, 6 insertions(+), 5 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/jobqueue/jobs/RefreshLinksJob.php b/includes/jobqueue/jobs/RefreshLinksJob.php index dec944a..935d2fb 100644 --- a/includes/jobqueue/jobs/RefreshLinksJob.php +++ b/includes/jobqueue/jobs/RefreshLinksJob.php @@ -111,9 +111,6 @@ * @return bool */ protected function runForTitle( Title $title = null ) { - $linkCache = LinkCache::singleton(); - $linkCache->clear(); - if ( is_null( $title ) ) { $this->setLastError( "refreshLinks: Invalid title" ); return false; @@ -126,14 +123,18 @@ wfGetLB()->waitFor( $this->params['masterPos'] ); } - $page = WikiPage::factory( $title ); + // Clear out title cache data from prior job transaction snapshots + $linkCache = LinkCache::singleton(); + $linkCache->clear(); - // Fetch the current revision... + // Fetch the current page and revision... + $page = WikiPage::factory( $title ); $revision = Revision::newFromTitle( $title, false, Revision::READ_NORMAL ); if ( !$revision ) { $this->setLastError( "refreshLinks: Article not found {$title->getPrefixedDBkey()}" ); return false; // XXX: what if it was just deleted? } + $content = $revision->getContent( Revision::RAW ); if ( !$content ) { // If there is no content, pretend the content is empty -- To view, visit https://gerrit.wikimedia.org/r/240025 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia331e9dbf9d2be137c34a8c93ef2d6da8aad6c56 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz Gerrit-Reviewer: Krinkle Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Removed DeferredUpdates::addHTMLCacheUpdate() - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Removed DeferredUpdates::addHTMLCacheUpdate() .. Removed DeferredUpdates::addHTMLCacheUpdate() * That method does not belong in DeferredUpdates as this class should agnostic to the work done Change-Id: I8098ffb82bf9c33ccb48a31aa9dbad514e8724a8 --- M RELEASE-NOTES-1.26 M includes/deferred/DeferredUpdates.php M includes/page/WikiPage.php 3 files changed, 3 insertions(+), 13 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/RELEASE-NOTES-1.26 b/RELEASE-NOTES-1.26 index bf07b20..19309a8 100644 --- a/RELEASE-NOTES-1.26 +++ b/RELEASE-NOTES-1.26 @@ -189,6 +189,7 @@ extension instead. New tokens types should not be added. * DatabaseBase::errorCount() was removed (unused). * $wgDeferredUpdateList was removed. +* DeferredUpdates::addHTMLCacheUpdate() was removed. == Compatibility == diff --git a/includes/deferred/DeferredUpdates.php b/includes/deferred/DeferredUpdates.php index 713ce70..cd0266f 100644 --- a/includes/deferred/DeferredUpdates.php +++ b/includes/deferred/DeferredUpdates.php @@ -79,17 +79,6 @@ } /** -* HTMLCacheUpdates are the most common deferred update people use. This -* is a shortcut method for that. -* @see HTMLCacheUpdate::__construct() -* @param Title $title -* @param string $table -*/ - public static function addHTMLCacheUpdate( $title, $table ) { - self::addUpdate( new HTMLCacheUpdate( $title, $table ) ); - } - - /** * Add a callable update. In a lot of cases, we just need a callback/closure, * defining a new DeferrableUpdate object is not necessary * @see MWCallableUpdate::__construct() diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php index 30590cf..ddda130 100644 --- a/includes/page/WikiPage.php +++ b/includes/page/WikiPage.php @@ -3219,10 +3219,10 @@ */ public static function onArticleEdit( Title $title, Revision $revision = null ) { // Invalidate caches of articles which include this page - DeferredUpdates::addHTMLCacheUpdate( $title, 'templatelinks' ); + DeferredUpdates::addUpdate( new HTMLCacheUpdate( $title, 'templatelinks' ) ); // Invalidate the caches of all pages which redirect here - DeferredUpdates::addHTMLCacheUpdate( $title, 'redirect' ); + DeferredUpdates::addUpdate( new HTMLCacheUpdate( $title, 'redirect' ) ); // Purge squid for this page only $title->purgeSquid(); -- To view, visit https://gerrit.wikimedia.org/r/240011 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8098ffb82bf9c33ccb48a31aa9dbad514e8724a8 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz Gerrit-Reviewer: Legoktm Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] A few small code cleanups to RefreshLinksJob - change (mediawiki/core)
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/240025 Change subject: A few small code cleanups to RefreshLinksJob .. A few small code cleanups to RefreshLinksJob Change-Id: Ia331e9dbf9d2be137c34a8c93ef2d6da8aad6c56 --- M includes/jobqueue/jobs/RefreshLinksJob.php 1 file changed, 6 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/25/240025/1 diff --git a/includes/jobqueue/jobs/RefreshLinksJob.php b/includes/jobqueue/jobs/RefreshLinksJob.php index dec944a..935d2fb 100644 --- a/includes/jobqueue/jobs/RefreshLinksJob.php +++ b/includes/jobqueue/jobs/RefreshLinksJob.php @@ -111,9 +111,6 @@ * @return bool */ protected function runForTitle( Title $title = null ) { - $linkCache = LinkCache::singleton(); - $linkCache->clear(); - if ( is_null( $title ) ) { $this->setLastError( "refreshLinks: Invalid title" ); return false; @@ -126,14 +123,18 @@ wfGetLB()->waitFor( $this->params['masterPos'] ); } - $page = WikiPage::factory( $title ); + // Clear out title cache data from prior job transaction snapshots + $linkCache = LinkCache::singleton(); + $linkCache->clear(); - // Fetch the current revision... + // Fetch the current page and revision... + $page = WikiPage::factory( $title ); $revision = Revision::newFromTitle( $title, false, Revision::READ_NORMAL ); if ( !$revision ) { $this->setLastError( "refreshLinks: Article not found {$title->getPrefixedDBkey()}" ); return false; // XXX: what if it was just deleted? } + $content = $revision->getContent( Revision::RAW ); if ( !$content ) { // If there is no content, pretend the content is empty -- To view, visit https://gerrit.wikimedia.org/r/240025 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia331e9dbf9d2be137c34a8c93ef2d6da8aad6c56 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] (WIP) mailman: script to rename list - change (operations/puppet)
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/240024 Change subject: (WIP) mailman: script to rename list .. (WIP) mailman: script to rename list Change-Id: I29e9e4dc0113698fe1c44b84c9bd618a20aee48d --- A modules/mailman/files/scripts/rename_list.sh M modules/mailman/manifests/scripts.pp 2 files changed, 24 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/24/240024/1 diff --git a/modules/mailman/files/scripts/rename_list.sh b/modules/mailman/files/scripts/rename_list.sh new file mode 100644 index 000..a7731f1 --- /dev/null +++ b/modules/mailman/files/scripts/rename_list.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# helper script to rename a mailman list +# Daniel Zahn +# https://wikitech.wikimedia.org/wiki/Mailman#Rename_a_mailing_list +# +oldlist=$1 +newlist=$2 + +# create new list $2 +# rsync ./lists/ dir from old to new +# copy mbox file from old to new +# rename mbox file +# recreate archives from mbox for new list +# set correct permissions +# add old list email address to "acceptable aliases" on new list +# output suggested apache redirect and exim alias lines + diff --git a/modules/mailman/manifests/scripts.pp b/modules/mailman/manifests/scripts.pp index b565e78..369de20 100644 --- a/modules/mailman/manifests/scripts.pp +++ b/modules/mailman/manifests/scripts.pp @@ -33,4 +33,11 @@ source => 'puppet:///modules/mailman/scripts/rsync_exim.sh' } +file { '/usr/local/sbin/rename_list': +ensure => 'present', +owner => 'root', +group => 'list', +mode => '0550', + source => 'puppet:///modules/mailman/scripts/rename_list.sh' +} } -- To view, visit https://gerrit.wikimedia.org/r/240024 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I29e9e4dc0113698fe1c44b84c9bd618a20aee48d Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Correctly identify qualifier from JSON - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: Correctly identify qualifier from JSON .. Correctly identify qualifier from JSON Identifies any qualifier or reference if initialised through fromJSON() on parent claim Bug: T113212 Change-Id: I7255cf50b21bac19f44f152ddd4a189825dd7eab --- M pywikibot/page.py 1 file changed, 6 insertions(+), 6 deletions(-) Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified diff --git a/pywikibot/page.py b/pywikibot/page.py index 97c881c..a6069c1 100644 --- a/pywikibot/page.py +++ b/pywikibot/page.py @@ -4055,7 +4055,7 @@ """ A Claim on a Wikibase entity. -Claims are standard claims as well as references. +Claims are standard claims as well as references and qualifiers. """ TARGET_CONVERTER = { @@ -4114,10 +4114,7 @@ if 'id' in data: claim.snak = data['id'] elif 'hash' in data: -claim.isReference = True claim.hash = data['hash'] -else: -claim.isQualifier = True claim.snaktype = data['mainsnak']['snaktype'] if claim.getSnakType() == 'value': value = data['mainsnak']['datavalue']['value'] @@ -4159,6 +4156,7 @@ for claimsnak in data['snaks'][prop]: claim = cls.fromJSON(site, {'mainsnak': claimsnak, 'hash': data['hash']}) +claim.isReference = True if claim.getID() not in source: source[claim.getID()] = [] source[claim.getID()].append(claim) @@ -4175,8 +4173,10 @@ @return: Claim """ -return cls.fromJSON(site, {'mainsnak': data, - 'hash': data['hash']}) +claim = cls.fromJSON(site, {'mainsnak': data, +'hash': data['hash']}) +claim.isQualifier = True +return claim def toJSON(self): """ -- To view, visit https://gerrit.wikimedia.org/r/239780 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7255cf50b21bac19f44f152ddd4a189825dd7eab Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Lokal Profil Gerrit-Reviewer: John Vandenberg Gerrit-Reviewer: Ladsgroup Gerrit-Reviewer: Lokal Profil Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Reduced the DOS potential of 404 page floods - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Reduced the DOS potential of 404 page floods .. Reduced the DOS potential of 404 page floods * showMissingArticle() will now only show the log excerpt if the page was deleted very recently or if the viewing user is logged in. Crawlers and poorly written bots tend to be logged out, and logged in users are better tracked. If many hits to the same recently deleted page are made, then the innoDB buffer pool should actually have the relevant index pages in cache (especially with query grouping). * There have been several outages or DB performance problems caused by crawlers or sloppy mirrors hitting many bogus pages (due to bad URL generation, ect...). Previously a redis bloom filter was used to handle this, but was removed due to high complexity (especially if it was to be supported in multi-DC setup). This is a simpler solution to keep 404 pages cheap, as they cannot really be cached (there are innumerable possible titles that never existed). Change-Id: If948602a32deb16dba21d232d0c6128568a980d6 --- M includes/page/Article.php M includes/page/WikiPage.php M languages/i18n/en.json M languages/i18n/qqq.json 4 files changed, 33 insertions(+), 12 deletions(-) Approvals: Ori.livneh: Looks good to me, approved MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/page/Article.php b/includes/page/Article.php index 120aa5c..df94ecf 100644 --- a/includes/page/Article.php +++ b/includes/page/Article.php @@ -1234,18 +1234,33 @@ Hooks::run( 'ShowMissingArticle', array( $this ) ); - // Give extensions a chance to hide their (unrelated) log entries - $logTypes = array( 'delete', 'move' ); - $conds = array( "log_action != 'revision'" ); - Hooks::run( 'Article::MissingArticleConditions', array( &$conds, $logTypes ) ); - - # Show delete and move logs - LogEventsList::showLogExtract( $outputPage, $logTypes, $title, '', - array( 'lim' => 10, - 'conds' => $conds, - 'showIfEmpty' => false, - 'msgKey' => array( 'moveddeleted-notice' ) ) - ); + # Show delete and move logs if there were any such events. + # The logging query can DOS the site when bots/crawlers cause 404 floods, + # so be careful showing this. 404 pages must be cheap as they are hard to cache. + $cache = ObjectCache::getMainStashInstance(); + $key = wfMemcKey( 'page-recent-delete', md5( $title->getPrefixedText() ) ); + $loggedIn = $this->getContext()->getUser()->isLoggedIn(); + if ( $loggedIn || $cache->get( $key ) ) { + $logTypes = array( 'delete', 'move' ); + $conds = array( "log_action != 'revision'" ); + // Give extensions a chance to hide their (unrelated) log entries + Hooks::run( 'Article::MissingArticleConditions', array( &$conds, $logTypes ) ); + LogEventsList::showLogExtract( + $outputPage, + $logTypes, + $title, + '', + array( + 'lim' => 10, + 'conds' => $conds, + 'showIfEmpty' => false, + 'msgKey' => array( $loggedIn + ? 'moveddeleted-notice' + : 'moveddeleted-notice-recent' + ) + ) + ); + } if ( !$this->mPage->hasViewableContent() && $wgSend404Code && !$validUserPage ) { // If there's no backing content, send a 404 Not Found diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php index 69b675b..7557b04 100644 --- a/includes/page/WikiPage.php +++ b/includes/page/WikiPage.php @@ -2872,6 +2872,10 @@ $dbw->commit( __METHOD__ ); } + // Show log excerpt on 404 pages rather than just a link + $key = wfMemcKey( 'page-recent-delete', md5( $logTitle->getPrefixedText() ) ); + ObjectCache::getMainStashInstance()->set( $key, 1, 86400 ); + $this->doDeleteUpdates( $id, $content ); Hooks::run( 'ArticleDeleteComplete', array( &$this, &$user, $reason, $id, $content, $logEntry ) ); diff --git a/languages/i18n/en.json b/languages/i18n/en.json index 3bf72d5..e19452b 100644 -
[MediaWiki-commits] [Gerrit] logstash: Enable logging via stashbot in irc channel wikimed... - change (operations/puppet)
Yuvipanda has submitted this change and it was merged. Change subject: logstash: Enable logging via stashbot in irc channel wikimedia-analytics .. logstash: Enable logging via stashbot in irc channel wikimedia-analytics This will help logs from the analytics channel show up in https://tools.wmflabs.org/sal/analytics This will also need a change in https://wikitech.wikimedia.org/wiki/Hiera:Stashbot to work. role::logstash::stashbot::channels should include #wikimedia-analytics. Bug: T111393 Change-Id: Ic219a1c8c4fb52989569c0d0a393a47e2d85450c --- M files/logstash/filter-stashbot-sal.conf 1 file changed, 9 insertions(+), 0 deletions(-) Approvals: Yuvipanda: Verified; Looks good to me, approved diff --git a/files/logstash/filter-stashbot-sal.conf b/files/logstash/filter-stashbot-sal.conf index ce8a717..16f31ad 100644 --- a/files/logstash/filter-stashbot-sal.conf +++ b/files/logstash/filter-stashbot-sal.conf @@ -17,6 +17,15 @@ } } +if [channel] == "#wikimedia-analytics" { + grok { +match => [ "message", "^!log %{GREEDYDATA:message}$" ] +overwrite => [ "message" ] +named_captures_only => true +add_field => [ "project", "analytics" ] + } +} + if [channel] == "#wikimedia-operations" { grok { match => [ "message", "^!log %{GREEDYDATA:message}$" ] -- To view, visit https://gerrit.wikimedia.org/r/240014 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic219a1c8c4fb52989569c0d0a393a47e2d85450c Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Madhuvishy Gerrit-Reviewer: BryanDavis Gerrit-Reviewer: Faidon Liambotis Gerrit-Reviewer: Yuvipanda Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Removed deprecated $wgDeferredUpdateList - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Removed deprecated $wgDeferredUpdateList .. Removed deprecated $wgDeferredUpdateList Change-Id: I7072ad3b34dd9a0726df6d1c044616c3b4bcd79f --- M RELEASE-NOTES-1.26 M includes/Setup.php M includes/deferred/DeferredUpdates.php M tests/phpunit/includes/parser/NewParserTest.php 4 files changed, 4 insertions(+), 13 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/RELEASE-NOTES-1.26 b/RELEASE-NOTES-1.26 index 13239de..bf07b20 100644 --- a/RELEASE-NOTES-1.26 +++ b/RELEASE-NOTES-1.26 @@ -188,6 +188,7 @@ are deprecated. Applications using those can work via the OAuth extension instead. New tokens types should not be added. * DatabaseBase::errorCount() was removed (unused). +* $wgDeferredUpdateList was removed. == Compatibility == diff --git a/includes/Setup.php b/includes/Setup.php index 479ce8c..e79d13c 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -681,12 +681,6 @@ */ $wgTitle = null; -/** - * @deprecated since 1.24 Use DeferredUpdates::addUpdate instead - * @var array - */ -$wgDeferredUpdateList = array(); - Profiler::instance()->scopedProfileOut( $ps_globals ); $ps_extensions = Profiler::instance()->scopedProfileIn( $fname . '-extensions' ); diff --git a/includes/deferred/DeferredUpdates.php b/includes/deferred/DeferredUpdates.php index b7e5b0a..713ce70 100644 --- a/includes/deferred/DeferredUpdates.php +++ b/includes/deferred/DeferredUpdates.php @@ -106,9 +106,7 @@ * prevent lock contention */ public static function doUpdates( $commit = '' ) { - global $wgDeferredUpdateList; - - $updates = array_merge( $wgDeferredUpdateList, self::$updates ); + $updates = self::$updates; while ( count( $updates ) ) { self::clearPendingUpdates(); @@ -131,7 +129,7 @@ } } - $updates = array_merge( $wgDeferredUpdateList, self::$updates ); + $updates = self::$updates; } } @@ -140,7 +138,6 @@ * want or need to call this. Unit tests need it though. */ public static function clearPendingUpdates() { - global $wgDeferredUpdateList; - $wgDeferredUpdateList = self::$updates = array(); + self::$updates = array(); } } diff --git a/tests/phpunit/includes/parser/NewParserTest.php b/tests/phpunit/includes/parser/NewParserTest.php index 0d2129b..df7da98 100644 --- a/tests/phpunit/includes/parser/NewParserTest.php +++ b/tests/phpunit/includes/parser/NewParserTest.php @@ -106,7 +106,6 @@ $tmpGlobals['wgAdaptiveMessageCache'] = true; $tmpGlobals['wgUseDatabaseMessages'] = true; $tmpGlobals['wgLocaltimezone'] = 'UTC'; - $tmpGlobals['wgDeferredUpdateList'] = array(); $tmpGlobals['wgGroupPermissions'] = array( '*' => array( 'createaccount' => true, -- To view, visit https://gerrit.wikimedia.org/r/240013 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7072ad3b34dd9a0726df6d1c044616c3b4bcd79f Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz Gerrit-Reviewer: Cscott Gerrit-Reviewer: Jackmcbarn Gerrit-Reviewer: Krinkle Gerrit-Reviewer: Legoktm Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Avoid calling addHTMLCacheUpdate() - change (mediawiki...FlaggedRevs)
jenkins-bot has submitted this change and it was merged. Change subject: Avoid calling addHTMLCacheUpdate() .. Avoid calling addHTMLCacheUpdate() * That method does not belong in DeferredUpdates Change-Id: I64f76494fb9b580350a8968ff7b5f23b7ecf5829 --- M backend/FlaggedRevs.class.php 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/backend/FlaggedRevs.class.php b/backend/FlaggedRevs.class.php index 7020cc9..1655b1a 100755 --- a/backend/FlaggedRevs.class.php +++ b/backend/FlaggedRevs.class.php @@ -708,9 +708,9 @@ */ public static function HTMLCacheUpdates( Title $title ) { # Invalidate caches of articles which include this page... - DeferredUpdates::addHTMLCacheUpdate( $title, 'templatelinks' ); + DeferredUpdates::addUpdate( new HTMLCacheUpdate( $title, 'templatelinks' ) ); if ( $title->getNamespace() == NS_FILE ) { - DeferredUpdates::addHTMLCacheUpdate( $title, 'imagelinks' ); + DeferredUpdates::addUpdate( new HTMLCacheUpdate( $title, 'imagelinks' ) ); } DeferredUpdates::addUpdate( new FRExtraCacheUpdate( $title ) ); } -- To view, visit https://gerrit.wikimedia.org/r/240010 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I64f76494fb9b580350a8968ff7b5f23b7ecf5829 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/FlaggedRevs Gerrit-Branch: master Gerrit-Owner: Aaron Schulz Gerrit-Reviewer: Jackmcbarn Gerrit-Reviewer: Legoktm 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 !ie hacks - change (mediawiki...GettingStarted)
jenkins-bot has submitted this change and it was merged. Change subject: Remove !ie hacks .. Remove !ie hacks These seem to cause an issue with less.js, and should not be necessary anymore, since we don't serve JS to these versions (IE 6 and IE 7). Use -ms-filter for IE 8 since less.php breaks on the non-string form and again IE < 8 here is not an issue. Bug: T113313 Change-Id: Ie10c56819876ed60e10de192f9b89b209ab2524a --- M resources/ext.gettingstarted.return.less M resources/ext.gettingstarted.taskToolbar.less 2 files changed, 1 insertion(+), 15 deletions(-) Approvals: Ori.livneh: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/ext.gettingstarted.return.less b/resources/ext.gettingstarted.return.less index e4322a6..224e30f 100644 --- a/resources/ext.gettingstarted.return.less +++ b/resources/ext.gettingstarted.return.less @@ -1,10 +1,6 @@ @import 'mediawiki.mixins'; /* Specific elements */ -#mw-gettingstarted-cta-editable-main-page { - width: 510px !ie; -} - #mw-gettingstarted-cta-other-page { width: 365px; } @@ -41,7 +37,7 @@ height: 100%; background-color: #000; opacity: 0.5; - filter: alpha( opacity=50 ); + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=50)"; z-index: -1; } @@ -49,10 +45,6 @@ display: table-cell; vertical-align: middle; text-align: center; - display: block !ie; - position: absolute !ie; - top: 50% !ie; - left: 50% !ie; } /* @@ -71,10 +63,6 @@ display: inline-block; text-align: left; font-family: "Helvetica Neue", "Helvetica", Arial, sans-serif; - display: block !ie; - position: relative !ie; - top: -50% !ie; - left: -50% !ie; .mw-ui-button { display: inline-block; diff --git a/resources/ext.gettingstarted.taskToolbar.less b/resources/ext.gettingstarted.taskToolbar.less index ae62268..de893b9 100644 --- a/resources/ext.gettingstarted.taskToolbar.less +++ b/resources/ext.gettingstarted.taskToolbar.less @@ -50,8 +50,6 @@ float: right; margin-top: -4px; margin-left: 15px; - position: relative !ie; - left: -24px !ie; } /* help button that displays guiders */ -- To view, visit https://gerrit.wikimedia.org/r/240015 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie10c56819876ed60e10de192f9b89b209ab2524a Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/GettingStarted Gerrit-Branch: master Gerrit-Owner: Mattflaschen Gerrit-Reviewer: Mattflaschen Gerrit-Reviewer: Ori.livneh Gerrit-Reviewer: Phuedx Gerrit-Reviewer: Swalling Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Change `#searchInput` to `type="search"` and add `` - change (mediawiki...Blueprint)
jenkins-bot has submitted this change and it was merged. Change subject: Change `#searchInput` to `type="search"` and add `` .. Change `#searchInput` to `type="search"` and add `` Improving accessibility and (future) HTML5 capabilities by changing `#searchInput` to `type="search"` and adding corresponding ``. Removing associated search.svg. Including IE 10+ CSS workaround for cross-browser normalized styling and Less variables for future unified CSS transitions. Bug: T109135 Change-Id: I4338e613b5d738695ff15b03e345546a27ea6963 --- M resources/master.less D resources/search.svg M templates/Skin.php M templates/Skin.template 4 files changed, 40 insertions(+), 35 deletions(-) Approvals: Spage: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/master.less b/resources/master.less index 250c7fb..c8c7e78 100644 --- a/resources/master.less +++ b/resources/master.less @@ -1,3 +1,10 @@ +/** + * Variables + */ +@side-menu-border-color: #225196; +@side-menu-bg-color: #265bb2; +@transition-global: .2s ease-in; + /* Typography */ body { color: #333; @@ -58,10 +65,11 @@ padding: 1em; background: #f9f9f9; } -/* Typography */ -@side-menu-border-color: #225196; -@side-menu-bg-color: #265bb2; +/* Forms */ +[type="search"]::-ms-clear { // IE10+ adds clearing x, we want to avoid + display: none; +} /* Offscreen Navigation */ #side-menu { @@ -201,6 +209,7 @@ } .navbar-form { + position: relative; padding: 0; margin: 0; } @@ -211,22 +220,39 @@ color: #333; box-shadow: none; width: 300px; - background-image: url( 'search.svg' ); - background-repeat: no-repeat; - background-position: center left; - background-size: 3em; padding: 0 40px; margin-top: 10px; height: 30px; &:focus { - background-image: url( 'search_active.svg' ); - background-position: center left; - background-repeat: no-repeat; outline: none; box-shadow: none; + + & + .search-input-label { + opacity: 1; + } } } + .search-input-label { + background-image: url( search_active.svg ); + background-position: center left; + background-repeat: no-repeat; + background-size: 3em; + display: block; + position: absolute; + top: 0; + left: 0; + width: 42px; + height: 30px; + margin-top: 10px; + text-indent: 100%; + white-space: nowrap; + overflow: hidden; + opacity: 0.666; + cursor: pointer; + -webkit-transition: opacity @transition-global; + transition: opacity @transition-global; + } #navbar-right { border-bottom: 1px solid #eee; diff --git a/resources/search.svg b/resources/search.svg deleted file mode 100644 index a7c111a..000 --- a/resources/search.svg +++ /dev/null @@ -1,11 +0,0 @@ - - -http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd";> -http://www.w3.org/2000/svg"; xmlns:xlink="http://www.w3.org/1999/xlink"; x="0px" y="0px" -viewBox="0 0 1000 1000" enable-background="new 0 0 1000 1000" xml:space="preserve"> - - diff --git a/templates/Skin.php b/templates/Skin.php index f2bca8a..bacb840 100644 --- a/templates/Skin.php +++ b/templates/Skin.php @@ -243,13 +243,8 @@ - + + Search diff --git a/templates/Skin.template b/templates/Skin.template index 23efbe7..5bb172e 100644 --- a/templates/Skin.template +++ b/templates/Skin.template @@ -16,13 +16,8 @@ - + + Search -- To view, visit https://gerrit.wikimedia.org/r/238090 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4338e613b5d738695ff15b03e345546a27ea6963 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/skins/Blueprint Gerrit-Branch: master Gerrit-Owner: VolkerE Gerrit-Reviewer: Paladox Gerrit-Reviewer: Prtksxna Gerrit-Reviewer: Spage Gerrit-Reviewer: V
[MediaWiki-commits] [Gerrit] Normalize filenames in imageinfo - change (mediawiki...ParsoidBatchAPI)
jenkins-bot has submitted this change and it was merged. Change subject: Normalize filenames in imageinfo .. Normalize filenames in imageinfo Because Parsoid doesn't do this properly. And since it is a complicated thing to do, it may help other clients hypothetically if we do it. Bug: T113318 Change-Id: I83c9bcd6ce04258f991c9815f766529af83a1de2 --- M includes/ApiParsoidBatch.php 1 file changed, 6 insertions(+), 1 deletion(-) Approvals: Subramanya Sastry: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/ApiParsoidBatch.php b/includes/ApiParsoidBatch.php index 5e904b8..9a33a64 100644 --- a/includes/ApiParsoidBatch.php +++ b/includes/ApiParsoidBatch.php @@ -39,7 +39,10 @@ $this->assertScalar( $txopts, $k ); } } - $filenames[] = $itemParams['filename']; + // Normalize the filename in $batch so that we can find the corresponding + // file in the findFiles() result + $title = Title::makeTitleSafe( NS_FILE, $itemParams['filename'] ); + $filenames[] = $batch[$itemIndex]['filename'] = $title->getDBkey(); } else { $this->dieUsage( "Invalid action in item index $itemIndex", 'invalid_action' ); } @@ -51,6 +54,8 @@ // Now do the thing if ( count( $filenames ) ) { $files = RepoGroup::singleton()->findFiles( $filenames ); + } else { + $files = array(); } $batchResult = array(); -- To view, visit https://gerrit.wikimedia.org/r/240017 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I83c9bcd6ce04258f991c9815f766529af83a1de2 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/ParsoidBatchAPI Gerrit-Branch: master Gerrit-Owner: Tim Starling Gerrit-Reviewer: Subramanya Sastry Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Defer the user update in enableCXBetaFeature() - change (mediawiki...ContentTranslation)
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/240022 Change subject: Defer the user update in enableCXBetaFeature() .. Defer the user update in enableCXBetaFeature() Bug: T94480 Bug: T92357 Change-Id: I248e64e8675f6e231ac288f94108240a21d9fa82 --- M specials/SpecialContentTranslation.php 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/22/240022/1 diff --git a/specials/SpecialContentTranslation.php b/specials/SpecialContentTranslation.php index e76aa7c..28b45f0 100644 --- a/specials/SpecialContentTranslation.php +++ b/specials/SpecialContentTranslation.php @@ -29,7 +29,10 @@ $user = $this->getUser(); $out = $this->getOutput(); $user->setOption( 'cx', '1' ); - $user->saveSettings(); + // Promise to persist the setting post-send + DeferredUpdates::addCallableUpdate( function() use ( $user ) { + $user->saveSettings(); + } ); $out->addModules( 'ext.cx.beta.notification' ); } -- To view, visit https://gerrit.wikimedia.org/r/240022 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I248e64e8675f6e231ac288f94108240a21d9fa82 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Aaron Schulz ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] WIP: Tools: Deploy local package management key - change (operations/puppet)
Tim Landscheidt has uploaded a new change for review. https://gerrit.wikimedia.org/r/240021 Change subject: WIP: Tools: Deploy local package management key .. WIP: Tools: Deploy local package management key DO NOT COMMIT. The key used in this proof-of-concept is for testing only. Bug: T112699 Change-Id: I23baed34d5508559dbf0ae31546b9088f3653595 --- M hieradata/labs/tools/common.yaml M manifests/role/aptly.pp M modules/apt/manifests/repository.pp M modules/aptly/manifests/client.pp 4 files changed, 40 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/21/240021/1 diff --git a/hieradata/labs/tools/common.yaml b/hieradata/labs/tools/common.yaml index 4d88abb..f395906 100644 --- a/hieradata/labs/tools/common.yaml +++ b/hieradata/labs/tools/common.yaml @@ -1,5 +1,18 @@ "base::environment::core_dump_pattern": core classes: - role::aptly::client +role::aptly::client::key: !!binary | + mQENBFYAYg4BCAC2Xc4OHmajEtdbGJSK4yrjh46ZfYkWr5CLRQppZDLRB2kpdY93RpJZp/Ho7qh8 + tO7MOJaUVCqd2BIYJnB2i/bzEyDOg7Uo6qliZ0tWNkemU9iPBIZTEnGzw72r1/BASqh/domqv4x1 + k6H/xyjy9Lbf/rcTOH9OJTmyzPKWcngg89gWtac0kHH0GJPcnKJYMfCkTREycaX9EsGlQl+mGso8 + fDycobO382O4Qliwgk7jpr3R3m+WFWnVXAj13zQiPz5WlvKU5q0XOCuWqZHPILV+52OH054qdLbE + q8iODV4z2K1SeHVJyF6FLxXG7pnBhql/hMPLgXJYqOqzCwdjhxAHABEBAAG0M1dpa2ltZWRpYSBU + b29sIExhYnMgTG9jYWwgUGFja2FnZXMgU2lnbmluZyBUZXN0IEtleYkBOAQTAQIAIgUCVgBiDgIb + AwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQ+SpAakPAEtAIeAf+MRMzD1UGJrdTJcnPsc6C + gXVabXlaxylRHr6Six5hQCJ69IHGQ87R85DHP1SIIDstJT0zgNhZfVzne0kCvESqvphjBTzHDQt7 + S5Ddlc2b5hcSMfyNRyodYLGXcZRxiaTU8TALnYcVvdqoy1TAFRCkbyqMlwjsdNXFF/mIAiF8Ofu+ + ThlhSG/Ms8x/e4UhfOERym/4CrHIt3fHkWFlC8aZOijD1T/ZgAgZvcNZjbMP2DabhEdrcoopjxxC + uLEjNdRVrN1yQrqa1XoGfzLVVpUp1gx7GMVPfOLdu1NTrxDDTzIXJJ6Kl/BNDqHQtYqCPQuD1etg + RTAx5z42z0NXohWtFA== role::aptly::client::servername: tools-services-01 standard::has_default_mail_relay: false diff --git a/manifests/role/aptly.pp b/manifests/role/aptly.pp index bbfe6d9..c067f44 100644 --- a/manifests/role/aptly.pp +++ b/manifests/role/aptly.pp @@ -23,8 +23,10 @@ # Sets up a simple deb package that points to the project's aptly server class role::aptly::client( $servername = "${labsproject}-packages.${labsproject}.${site}.wmflabs", +$key= undef, ) { class { '::aptly::client': servername => $servername, +key=> $key, } } diff --git a/modules/apt/manifests/repository.pp b/modules/apt/manifests/repository.pp index 8493263..829024a 100644 --- a/modules/apt/manifests/repository.pp +++ b/modules/apt/manifests/repository.pp @@ -5,6 +5,7 @@ $source=true, $comment_old=false, $keyfile='', +$key = undef, $ensure=present ) { $binline = "deb ${uri} ${dist} ${components}\n" @@ -34,15 +35,27 @@ } } -if $keyfile { -file { "/var/lib/apt/keys/${name}.gpg": -ensure => present, -owner => 'root', -group => 'root', -mode=> '0400', -source => $keyfile, -require => File['/var/lib/apt/keys'], -before => File["/etc/apt/sources.list.d/${name}.list"], +if $key != undef or $keyfile { +if $key != undef { +file { "/var/lib/apt/keys/${name}.gpg": +ensure => present, +owner => 'root', +group => 'root', +mode=> '0400', +content => $key, +require => File['/var/lib/apt/keys'], +before => File["/etc/apt/sources.list.d/${name}.list"], +} +} else { +file { "/var/lib/apt/keys/${name}.gpg": +ensure => present, +owner => 'root', +group => 'root', +mode=> '0400', +source => $keyfile, +require => File['/var/lib/apt/keys'], +before => File["/etc/apt/sources.list.d/${name}.list"], +} } exec { "/usr/bin/apt-key add /var/lib/apt/keys/${name}.gpg": diff --git a/modules/aptly/manifests/client.pp b/modules/aptly/manifests/client.pp index 9e790c4..7dc5501 100644 --- a/modules/aptly/manifests/client.pp +++ b/modules/aptly/manifests/client.pp @@ -1,6 +1,7 @@ class aptly::client( $servername, -$source=false +$source=false, +$key = undef, ) { if os_version('ubuntu <= precise') { # Remove multiarch support in precise aptly clients. @@ -16,6 +17,7 @@ dist => "${::lsbdistcodename}-${::labsproject}", components => 'main', source => $source, +key=> $key, } # Pin it so it has higher preference -- To view, visit https://gerrit.wikimedia.org/r/240021 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchang
[MediaWiki-commits] [Gerrit] External surveys should behave identical to internal surveys - change (mediawiki...QuickSurveys)
Jdlrobson has uploaded a new change for review. https://gerrit.wikimedia.org/r/240020 Change subject: External surveys should behave identical to internal surveys .. External surveys should behave identical to internal surveys This patch cleans up a lot of unnecessary styles. There was a visual flash previously whilst surveys loaded and various rules for the Minerva skin that are just not needed. Bug: T113047 Change-Id: I79ff134cb715b9256b1ede75c2531f47e88b2724 --- M extension.json M resources/ext.quicksurveys.init/styles.less D resources/ext.quicksurveys.init/styles.minerva.less M resources/ext.quicksurveys.views/styles.less D resources/ext.quicksurveys.views/styles.minerva.less 5 files changed, 7 insertions(+), 34 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/QuickSurveys refs/changes/20/240020/1 diff --git a/extension.json b/extension.json index 601f2f0..4955b3b 100644 --- a/extension.json +++ b/extension.json @@ -57,9 +57,6 @@ "ext-quicksurveys-external-survey-yes-button", "ext-quicksurveys-external-survey-no-button" ], - "skinStyles": { - "minerva": "resources/ext.quicksurveys.views/styles.minerva.less" - }, "styles": [ "resources/ext.quicksurveys.views/styles.less" ], @@ -80,9 +77,6 @@ "mobile", "desktop" ], - "skinStyles": { - "minerva": "resources/ext.quicksurveys.init/styles.minerva.less" - }, "styles": [ "resources/ext.quicksurveys.init/styles.less" ], diff --git a/resources/ext.quicksurveys.init/styles.less b/resources/ext.quicksurveys.init/styles.less index 2d69cbb..f96e9e7 100644 --- a/resources/ext.quicksurveys.init/styles.less +++ b/resources/ext.quicksurveys.init/styles.less @@ -1,11 +1,16 @@ @import "mediawiki.ui/variables"; @import "../variables"; +.ext-quick-survey-panel, +.ext-qs-loader-bar { + width: auto; + background-color: @colorGrayLightest; +} + /* FIXME: Should be an ajax loader to give impression something is happening */ .ext-qs-loader-bar { display: block; height: 100px; - width: @panelWidth; margin-left: 1.4em; clear: right; float: right; @@ -20,6 +25,7 @@ .ext-qs-loader-bar, .ext-quick-survey-panel { margin-left: 1.4em; + width: @panelWidth; clear: right; float: right; } diff --git a/resources/ext.quicksurveys.init/styles.minerva.less b/resources/ext.quicksurveys.init/styles.minerva.less deleted file mode 100644 index 346575d..000 --- a/resources/ext.quicksurveys.init/styles.minerva.less +++ /dev/null @@ -1,18 +0,0 @@ -.skin-minerva { - .ext-qs-loader-bar { - clear: left; - float: left; - max-width: 500px; - width: auto; - } -} - -@media all and (min-width: 768px) { - .skin-minerva { - .ext-qs-loader-bar, - .ext-quick-survey-panel { - margin-left: 0; - min-width: 320px; - } - } -} diff --git a/resources/ext.quicksurveys.views/styles.less b/resources/ext.quicksurveys.views/styles.less index ed4c343..a73ba78 100644 --- a/resources/ext.quicksurveys.views/styles.less +++ b/resources/ext.quicksurveys.views/styles.less @@ -9,9 +9,6 @@ } .ext-quick-survey-panel { - background-color: @colorGrayLightest; - width: @panelWidth; - .image { background-repeat: no-repeat; .background-size( auto, 5em ); diff --git a/resources/ext.quicksurveys.views/styles.minerva.less b/resources/ext.quicksurveys.views/styles.minerva.less deleted file mode 100644 index 5d664a0..000 --- a/resources/ext.quicksurveys.views/styles.minerva.less +++ /dev/null @@ -1,6 +0,0 @@ -.skin-minerva { - .ext-quick-survey-panel { - width: auto; - } -} - -- To view, visit https://gerrit.wikimedia.org/r/240020 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I79ff134cb715b9256b1ede75c2531f47e88b2724 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/QuickSurveys Gerrit-Branch: dev Gerrit-Owner: Jdlrobson ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Show the wikitext editor first on the undo pages - change (mediawiki...Flow)
Sbisson has uploaded a new change for review. https://gerrit.wikimedia.org/r/240019 Change subject: Show the wikitext editor first on the undo pages .. Show the wikitext editor first on the undo pages The old editor system (used on the undo pages) does not expect to receive wikitext data. It just shows it as-is even in VE. This change makes all the undo pages just show the wikitext editor first but it is still possible to switch to VE. Bug: T112338 Change-Id: I5c7f08069b1f372bb476554cd9eac9247f7225a5 --- M modules/editor/ext.flow.editor.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/19/240019/1 diff --git a/modules/editor/ext.flow.editor.js b/modules/editor/ext.flow.editor.js index 1a62749..ab2e7a3 100644 --- a/modules/editor/ext.flow.editor.js +++ b/modules/editor/ext.flow.editor.js @@ -27,7 +27,7 @@ init: function () { var editorList = mw.config.get( 'wgFlowEditorList' ), - index = editorList.indexOf( mw.user.options.get( 'flow-editor' ) ); + index = editorList.indexOf( 'none' ); // determine editor instance to use, depending on availability mw.flow.editor.loadEditor( index ); -- To view, visit https://gerrit.wikimedia.org/r/240019 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5c7f08069b1f372bb476554cd9eac9247f7225a5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Sbisson ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add an emailuser web notification - change (mediawiki...Echo)
jenkins-bot has submitted this change and it was merged. Change subject: Add an emailuser web notification .. Add an emailuser web notification When an user sent an email to another user with [[Special:Emailuser]] or action=emailuser, give an echo for the target user to be lookup in his mailbox. This option is off by default. It is only useful as web notification, because an email notification would go to the same address. Bug: T56130 Change-Id: Ie279457daf51e1c34c998197ce9e76c78ee705e4 --- M Echo.php M Hooks.php M i18n/en.json M i18n/qqq.json 4 files changed, 60 insertions(+), 0 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/Echo.php b/Echo.php index fe69f12..0d8d8bf 100644 --- a/Echo.php +++ b/Echo.php @@ -78,6 +78,7 @@ $wgHooks['UserSaveOptions'][] = 'EchoHooks::onUserSaveOptions'; $wgHooks['UserClearNewTalkNotification'][] = 'EchoHooks::onUserClearNewTalkNotification'; $wgHooks['ParserTestTables'][] = 'EchoHooks::onParserTestTables'; +$wgHooks['EmailUserComplete'][] = 'EchoHooks::onEmailUserComplete'; // Extension:UserMerge support $wgHooks['UserMergeAccountFields'][] = 'EchoHooks::onUserMergeAccountFields'; @@ -162,6 +163,11 @@ 'welcome' => array( 'email' => false, ), + // No need to get a email when another user sends to me + 'emailuser' => array( + 'web' => true, + 'email' => false, + ), ); // Definitions of the different types of notification delivery that are possible. @@ -226,6 +232,10 @@ 'mention' => array( 'priority' => 4, 'tooltip' => 'echo-pref-tooltip-mention', + ), + 'emailuser' => array( + 'priority' => 9, + 'tooltip' => 'echo-pref-tooltip-emailuser', ), ); @@ -401,6 +411,19 @@ 'email-body-batch-params' => array( 'agent', 'user-rights-list' ), 'icon' => 'site', ), + 'emailuser' => array( + 'user-locators' => array( + array( 'EchoUserLocator::locateFromEventExtra', array( 'to-user-id' ) ), + ), + 'category' => 'emailuser', + 'group' => 'neutral', + 'section' => 'alert', + 'title-message' => 'notification-emailuser', + 'title-params' => array( 'agent' ), + 'flyout-message' => 'notification-emailuser-flyout', + 'flyout-params' => array( 'agent' ), + 'icon' => 'site', + ), ); // Enable new talk page messages alert for all logged in users by default @@ -425,6 +448,7 @@ $wgDefaultUserOptions['echo-subscriptions-email-system'] = true; $wgDefaultUserOptions['echo-subscriptions-email-user-rights'] = true; $wgDefaultUserOptions['echo-subscriptions-web-article-linked'] = false; +$wgDefaultUserOptions['echo-subscriptions-web-emailuser'] = false; // Echo Configuration for EventLogging $wgEchoConfig = array( diff --git a/Hooks.php b/Hooks.php index 6b005e4..f18d350 100644 --- a/Hooks.php +++ b/Hooks.php @@ -984,6 +984,34 @@ } /** +* Handler for EmailUserComplete hook. +* @see https://www.mediawiki.org/wiki/Manual:Hooks/EmailUserComplete +* @param $address MailAddress Adress of receiving user +* @param $from MailAddress Adress of sending user +* @param $subject string Subject of the mail +* @param $text string Text of the mail +* @return bool true in all cases +*/ + public static function onEmailUserComplete( $address, $from, $subject, $text ) { + if ( $from->name === $address->name ) { + // nothing to notify + return true; + } + $userTo = User::newFromName( $address->name ); + $userFrom = User::newFromName( $from->name ); + + EchoEvent::create( array( + 'type' => 'emailuser', + 'extra' => array( + 'to-user-id' => $userTo->getId(), + ), + 'agent' => $userFrom, + ) ); + + return true; + } + + /** * For integration with the UserMerge extension. * * @param array $updateFields diff --git a/i18n/en.json b/i18n/en.json index 2f60596..2329cb7 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -31,11 +31,13 @@ "echo-category-title-other": "{{PLURAL:$1|Other}}", "echo-category-title-system": "{{PLURAL:$1|System}}", "echo-category-title-user-rights": "{{PLURAL:$1|User rights change|User rights changes}}", + "echo-category-title-emailuser": "{{PLURAL:$1|Email from other user|Emails from other users}}", "echo-pref-tooltip-edit-user-talk": "Notify me when someone posts a
[MediaWiki-commits] [Gerrit] Updated watir-webdriver Ruby gem to the latest version - change (mediawiki...Echo)
jenkins-bot has submitted this change and it was merged. Change subject: Updated watir-webdriver Ruby gem to the latest version .. Updated watir-webdriver Ruby gem to the latest version Also updated other gems, except mediawiki_api (only patch version update), mediawiki_selenium (only patch version update) and rubocop. Bug: T112748 Change-Id: I30f8d45a2efb2c4e44927ebb150131e35419b8c8 --- M Gemfile M Gemfile.lock 2 files changed, 42 insertions(+), 44 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/Gemfile b/Gemfile index abeac30..50019af 100644 --- a/Gemfile +++ b/Gemfile @@ -1,10 +1,7 @@ -# ruby=ruby-2.1.1 -# ruby-gemset=Echo - source 'https://rubygems.org' -gem 'chunky_png' -gem 'csscss' -gem 'mediawiki_api' -gem 'mediawiki_selenium' -gem 'rubocop', require: false +gem 'chunky_png', '~> 1.3.4' +gem 'csscss', '~> 1.3.3' +gem 'mediawiki_api', '~> 0.3.0' +gem 'mediawiki_selenium', '~> 0.4.2' +gem 'rubocop', '~> 0.29.0', require: false diff --git a/Gemfile.lock b/Gemfile.lock index 56ba4b3..d8a172d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,49 +1,49 @@ GEM remote: https://rubygems.org/ specs: -ast (2.0.0) -astrolabe (1.3.0) - parser (>= 2.2.0.pre.3, < 3.0) +ast (2.1.0) +astrolabe (1.3.1) + parser (~> 2.2) blankslate (3.1.3) builder (3.2.2) -childprocess (0.5.5) +childprocess (0.5.6) ffi (~> 1.0, >= 1.0.11) -chunky_png (1.3.3) -colorize (0.7.5) +chunky_png (1.3.4) +colorize (0.7.7) csscss (1.3.3) colorize parslet (>= 1.6.1, < 2.0) -cucumber (1.3.18) +cucumber (1.3.20) builder (>= 2.1.2) diff-lcs (>= 1.1.3) gherkin (~> 2.12) multi_json (>= 1.7.5, < 2.0) - multi_test (>= 0.1.1) -data_magic (0.20) + multi_test (>= 0.1.2) +data_magic (0.21) faker (>= 1.1.2) yml_reader (>= 0.4) diff-lcs (1.2.5) -domain_name (0.5.23) +domain_name (0.5.24) unf (>= 0.0.5, < 1.0.0) -faker (1.4.3) +faker (1.5.0) i18n (~> 0.5) faraday (0.9.1) multipart-post (>= 1.2, < 3) faraday-cookie_jar (0.0.6) faraday (>= 0.7.4) http-cookie (~> 1.0.0) -ffi (1.9.6) +ffi (1.9.10) gherkin (2.12.2) multi_json (~> 1.3) headless (1.0.2) http-cookie (1.0.2) domain_name (~> 0.5) i18n (0.7.0) -json (1.8.2) -mediawiki_api (0.3.0) +json (1.8.3) +mediawiki_api (0.3.1) faraday (~> 0.9, >= 0.9.0) faraday-cookie_jar (~> 0.0, >= 0.0.6) -mediawiki_selenium (0.4.2) +mediawiki_selenium (0.4.3) cucumber (~> 1.3, >= 1.3.10) headless (~> 1.0, >= 1.0.1) json (~> 1.8, >= 1.8.1) @@ -52,37 +52,38 @@ rest-client (~> 1.6, >= 1.6.7) rspec-expectations (~> 2.14, >= 2.14.4) syntax (~> 1.2, >= 1.2.0) -mime-types (2.4.3) -multi_json (1.10.1) -multi_test (0.1.1) +mime-types (2.6.2) +multi_json (1.11.2) +multi_test (0.1.2) multipart-post (2.0.0) -netrc (0.10.2) -page-object (1.0.3) +netrc (0.10.3) +page-object (1.1.0) page_navigation (>= 0.9) selenium-webdriver (>= 2.44.0) watir-webdriver (>= 0.6.11) page_navigation (0.9) data_magic (>= 0.14) -parser (2.2.0.2) +parser (2.2.2.6) ast (>= 1.1, < 3.0) -parslet (1.6.2) +parslet (1.7.1) blankslate (>= 2.0, <= 4.0) -powerpack (0.1.0) +powerpack (0.1.1) rainbow (2.0.0) -rest-client (1.7.2) +rest-client (1.8.0) + http-cookie (>= 1.0.2, < 2.0) mime-types (>= 1.16, < 3.0) netrc (~> 0.7) rspec-expectations (2.99.2) diff-lcs (>= 1.1.3, < 2.0) -rubocop (0.29.0) +rubocop (0.29.1) astrolabe (~> 1.3) parser (>= 2.2.0.1, < 3.0) powerpack (~> 0.1) rainbow (>= 1.99.1, < 3.0) ruby-progressbar (~> 1.4) -ruby-progressbar (1.7.1) +ruby-progressbar (1.7.5) rubyzip (1.1.7) -selenium-webdriver (2.44.0) +selenium-webdriver (2.47.1) childprocess (~> 0.5) multi_json (~> 1.0) rubyzip (~> 1.0) @@ -90,18 +91,18 @@ syntax (1.2.0) unf (0.1.4) unf_ext -unf_ext (0.0.6) -watir-webdriver (0.6.11) - selenium-webdriver (>= 2.18.0) -websocket (1.2.1) +unf_ext (0.0.7.1) +watir-webdriver (0.8.0) + selenium-webdriver (>= 2.46.2) +websocket (1.2.2) yml_reader (0.5) PLATFORMS ruby DEPENDENCIES - chunky_png - csscss - mediawiki_api - mediawiki_selenium - rubocop + chunky_png (~> 1.3.4) + csscss (~> 1.3.3) + mediawiki_api (~> 0.3.0) + mediawiki_selenium (~> 0.4.2) + rubocop (~> 0.29.0) -- To view, visit https://gerrit.wikimedia.org/r/238942 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I30f8d45a2efb2c4e44927ebb150131e35419b8c8
[MediaWiki-commits] [Gerrit] Revert "block POSTs to pretty wiki URLs..." - change (operations/puppet)
Faidon Liambotis has submitted this change and it was merged. Change subject: Revert "block POSTs to pretty wiki URLs..." .. Revert "block POSTs to pretty wiki URLs..." This reverts commit 51b957cda0f8e4430f721288a690e93cb9d98d7d. Bug: T113319 Change-Id: I56a2981104589346667bf81c5a9d768dd9f3a073 --- M modules/varnish/templates/vcl/wikimedia.vcl.erb 1 file changed, 0 insertions(+), 4 deletions(-) Approvals: Faidon Liambotis: Verified; Looks good to me, approved diff --git a/modules/varnish/templates/vcl/wikimedia.vcl.erb b/modules/varnish/templates/vcl/wikimedia.vcl.erb index 4566811..776c585 100644 --- a/modules/varnish/templates/vcl/wikimedia.vcl.erb +++ b/modules/varnish/templates/vcl/wikimedia.vcl.erb @@ -169,10 +169,6 @@ } sub filter_noise { - if (req.request == "POST" && req.url ~ "^/wiki/") { - error 403 "Noise"; - } - // Forged UAs on zerodot. This largely handles lazywebtools below, incidentally. if (req.http.host ~ "zero\.wikipedia\.org" && req.http.User-Agent && req.http.User-Agent ~ "Facebookbot|Googlebot") { error 403 "Noise"; -- To view, visit https://gerrit.wikimedia.org/r/240018 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I56a2981104589346667bf81c5a9d768dd9f3a073 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Faidon Liambotis Gerrit-Reviewer: Faidon Liambotis ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Revert "block POSTs to pretty wiki URLs..." - change (operations/puppet)
Faidon Liambotis has uploaded a new change for review. https://gerrit.wikimedia.org/r/240018 Change subject: Revert "block POSTs to pretty wiki URLs..." .. Revert "block POSTs to pretty wiki URLs..." This reverts commit 51b957cda0f8e4430f721288a690e93cb9d98d7d. Bug: T113319 Change-Id: I56a2981104589346667bf81c5a9d768dd9f3a073 --- M modules/varnish/templates/vcl/wikimedia.vcl.erb 1 file changed, 0 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/18/240018/1 diff --git a/modules/varnish/templates/vcl/wikimedia.vcl.erb b/modules/varnish/templates/vcl/wikimedia.vcl.erb index 4566811..776c585 100644 --- a/modules/varnish/templates/vcl/wikimedia.vcl.erb +++ b/modules/varnish/templates/vcl/wikimedia.vcl.erb @@ -169,10 +169,6 @@ } sub filter_noise { - if (req.request == "POST" && req.url ~ "^/wiki/") { - error 403 "Noise"; - } - // Forged UAs on zerodot. This largely handles lazywebtools below, incidentally. if (req.http.host ~ "zero\.wikipedia\.org" && req.http.User-Agent && req.http.User-Agent ~ "Facebookbot|Googlebot") { error 403 "Noise"; -- To view, visit https://gerrit.wikimedia.org/r/240018 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I56a2981104589346667bf81c5a9d768dd9f3a073 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Faidon Liambotis ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Normalize filenames in imageinfo - change (mediawiki...ParsoidBatchAPI)
Tim Starling has uploaded a new change for review. https://gerrit.wikimedia.org/r/240017 Change subject: Normalize filenames in imageinfo .. Normalize filenames in imageinfo Because Parsoid doesn't do this properly. And since it is a complicated thing to do, it may help other clients hypothetical if we do it. Bug: T113318 Change-Id: I83c9bcd6ce04258f991c9815f766529af83a1de2 --- M includes/ApiParsoidBatch.php 1 file changed, 6 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ParsoidBatchAPI refs/changes/17/240017/1 diff --git a/includes/ApiParsoidBatch.php b/includes/ApiParsoidBatch.php index 5e904b8..9a33a64 100644 --- a/includes/ApiParsoidBatch.php +++ b/includes/ApiParsoidBatch.php @@ -39,7 +39,10 @@ $this->assertScalar( $txopts, $k ); } } - $filenames[] = $itemParams['filename']; + // Normalize the filename in $batch so that we can find the corresponding + // file in the findFiles() result + $title = Title::makeTitleSafe( NS_FILE, $itemParams['filename'] ); + $filenames[] = $batch[$itemIndex]['filename'] = $title->getDBkey(); } else { $this->dieUsage( "Invalid action in item index $itemIndex", 'invalid_action' ); } @@ -51,6 +54,8 @@ // Now do the thing if ( count( $filenames ) ) { $files = RepoGroup::singleton()->findFiles( $filenames ); + } else { + $files = array(); } $batchResult = array(); -- To view, visit https://gerrit.wikimedia.org/r/240017 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I83c9bcd6ce04258f991c9815f766529af83a1de2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ParsoidBatchAPI Gerrit-Branch: master Gerrit-Owner: Tim Starling ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] bastion: separate role for general and opsonly - change (operations/puppet)
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/240016 Change subject: bastion: separate role for general and opsonly .. bastion: separate role for general and opsonly Since we want to treat these hosts differently, but also use a role to apply user groups (see comment from Faidon on Change-Id: Ide3a0ab7457a1d3 f.e.), actually use different roles for different types of servers. Change-Id: Ia947f6ccde75995346a9a1d2cf8b15ec6aaf3543 --- M manifests/role/bastionhost.pp M manifests/site.pp 2 files changed, 28 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/16/240016/1 diff --git a/manifests/role/bastionhost.pp b/manifests/role/bastionhost.pp index d2ab0dd..aa6b55f 100644 --- a/manifests/role/bastionhost.pp +++ b/manifests/role/bastionhost.pp @@ -1,7 +1,27 @@ -# bastion host role -class role::bastionhost { +# bastion host roles +class role::bastionhost::general { system::role { 'bastionhost': -description => 'Bastion', +description => 'Bastion host for all shell users', +} + +include ::bastionhost +include base::firewall +include role::backup::host + +backup::set {'home': } + +ferm::service { 'ssh': +desc => 'SSH open from everywhere, this is a bastion host', +prio => '01', +proto => 'tcp', +port => 'ssh', +} + +} + +class role::bastionhost::opsonly { +system::role { 'bastionhost': +description => 'Bastion host restricted to the ops team', } include ::bastionhost diff --git a/manifests/site.pp b/manifests/site.pp index 6a30abf..9079e2c 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -230,7 +230,7 @@ $cluster = 'misc' $ganglia_aggregator = true -role bastionhost +role bastionhost::general include standard include subversion::client @@ -246,7 +246,7 @@ interface::add_ip6_mapped { 'main': interface => 'eth0', } -role bastionhost +role bastionhost::general include standard } @@ -257,7 +257,7 @@ interface => 'eth0', } -role bastionhost +role bastionhost::general include standard include role::ipmi include role::installserver::tftp-server @@ -1159,7 +1159,7 @@ interface::add_ip6_mapped { 'main': interface => 'eth0', } -role bastionhost +role bastionhost::general include standard include role::installserver::tftp-server @@ -1240,7 +1240,7 @@ interface::add_ip6_mapped { 'main': interface => 'eth0', } -role bastionhost +role bastionhost::opsonly include standard include role::ipmi -- To view, visit https://gerrit.wikimedia.org/r/240016 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia947f6ccde75995346a9a1d2cf8b15ec6aaf3543 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Enable logging via stashbot in irc channel wikimedia-analytics - change (operations/puppet)
Madhuvishy has uploaded a new change for review. https://gerrit.wikimedia.org/r/240014 Change subject: Enable logging via stashbot in irc channel wikimedia-analytics .. Enable logging via stashbot in irc channel wikimedia-analytics This will help logs from the analytics channel show up in https://tools.wmflabs.org/sal/analytics This will also need a change in https://wikitech.wikimedia.org/wiki/Hiera:Stashbot to work. role::logstash::stashbot::channels should include #wikimedia-analytics. Bug: T111393 Change-Id: Ic219a1c8c4fb52989569c0d0a393a47e2d85450c --- M files/logstash/filter-stashbot-sal.conf 1 file changed, 9 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/14/240014/1 diff --git a/files/logstash/filter-stashbot-sal.conf b/files/logstash/filter-stashbot-sal.conf index ce8a717..16f31ad 100644 --- a/files/logstash/filter-stashbot-sal.conf +++ b/files/logstash/filter-stashbot-sal.conf @@ -17,6 +17,15 @@ } } +if [channel] == "#wikimedia-analytics" { + grok { +match => [ "message", "^!log %{GREEDYDATA:message}$" ] +overwrite => [ "message" ] +named_captures_only => true +add_field => [ "project", "analytics" ] + } +} + if [channel] == "#wikimedia-operations" { grok { match => [ "message", "^!log %{GREEDYDATA:message}$" ] -- To view, visit https://gerrit.wikimedia.org/r/240014 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic219a1c8c4fb52989569c0d0a393a47e2d85450c Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Madhuvishy ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove !ie hacks - change (mediawiki...GettingStarted)
Mattflaschen has uploaded a new change for review. https://gerrit.wikimedia.org/r/240015 Change subject: Remove !ie hacks .. Remove !ie hacks These seem to cause an issue with less.js, and should not be necessary anymore, since we don't serve JS to these versions (IE 6 and IE 7). Bug: T113313 Change-Id: Ie10c56819876ed60e10de192f9b89b209ab2524a --- M resources/ext.gettingstarted.return.less M resources/ext.gettingstarted.taskToolbar.less 2 files changed, 0 insertions(+), 14 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GettingStarted refs/changes/15/240015/1 diff --git a/resources/ext.gettingstarted.return.less b/resources/ext.gettingstarted.return.less index e4322a6..4750f3a 100644 --- a/resources/ext.gettingstarted.return.less +++ b/resources/ext.gettingstarted.return.less @@ -1,10 +1,6 @@ @import 'mediawiki.mixins'; /* Specific elements */ -#mw-gettingstarted-cta-editable-main-page { - width: 510px !ie; -} - #mw-gettingstarted-cta-other-page { width: 365px; } @@ -49,10 +45,6 @@ display: table-cell; vertical-align: middle; text-align: center; - display: block !ie; - position: absolute !ie; - top: 50% !ie; - left: 50% !ie; } /* @@ -71,10 +63,6 @@ display: inline-block; text-align: left; font-family: "Helvetica Neue", "Helvetica", Arial, sans-serif; - display: block !ie; - position: relative !ie; - top: -50% !ie; - left: -50% !ie; .mw-ui-button { display: inline-block; diff --git a/resources/ext.gettingstarted.taskToolbar.less b/resources/ext.gettingstarted.taskToolbar.less index ae62268..de893b9 100644 --- a/resources/ext.gettingstarted.taskToolbar.less +++ b/resources/ext.gettingstarted.taskToolbar.less @@ -50,8 +50,6 @@ float: right; margin-top: -4px; margin-left: 15px; - position: relative !ie; - left: -24px !ie; } /* help button that displays guiders */ -- To view, visit https://gerrit.wikimedia.org/r/240015 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie10c56819876ed60e10de192f9b89b209ab2524a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/GettingStarted Gerrit-Branch: master Gerrit-Owner: Mattflaschen ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Removed $wgDeferredUpdateList mentioning - change (mediawiki...FlaggedRevs)
jenkins-bot has submitted this change and it was merged. Change subject: Removed $wgDeferredUpdateList mentioning .. Removed $wgDeferredUpdateList mentioning Change-Id: I95abee6dfe337da456dd5f6e70e2f816439ae210 --- M backend/FRPageConfig.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/backend/FRPageConfig.php b/backend/FRPageConfig.php index 2307acb..dab4443 100644 --- a/backend/FRPageConfig.php +++ b/backend/FRPageConfig.php @@ -233,7 +233,7 @@ ); } # Also, clear their squid caches and purge other pages that use this page. - # NOTE: all of these updates are deferred via $wgDeferredUpdateList. + # NOTE: all of these updates are deferred via DeferredUpdates foreach ( $titlesClearTracking as $title ) { FlaggedRevs::purgeSquid( $title ); if ( FlaggedRevs::inclusionSetting() == FR_INCLUDES_STABLE ) { -- To view, visit https://gerrit.wikimedia.org/r/240012 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I95abee6dfe337da456dd5f6e70e2f816439ae210 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/FlaggedRevs Gerrit-Branch: master Gerrit-Owner: Aaron Schulz Gerrit-Reviewer: Jackmcbarn Gerrit-Reviewer: Krinkle Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use spage and epage in coins metadata - change (mediawiki...citoid)
Mobrovac has submitted this change and it was merged. Change subject: Use spage and epage in coins metadata .. Use spage and epage in coins metadata Use spage and epage fields in coins metadata to create pages field from crossRef. Bug: T107647 Change-Id: Ic307c6112fe1c30c3fe78e79646fa64ebaac6388 --- M lib/Scraper.js M lib/translators/coins.js M test/features/scraping/index.js M test/features/unit/coins.js 4 files changed, 47 insertions(+), 10 deletions(-) Approvals: Mobrovac: Looks good to me, approved diff --git a/lib/Scraper.js b/lib/Scraper.js index 94a6128..f69a8cd 100644 --- a/lib/Scraper.js +++ b/lib/Scraper.js @@ -294,6 +294,7 @@ // Add universal (non genre specific) coins properties citation = coins.general.addAuthors(citation, metadata); + citation = coins.other.spage(citation, metadata); citation = translate(citation, metadata, coins.general); // Add type specific coins properties diff --git a/lib/translators/coins.js b/lib/translators/coins.js index fdb9b6e..b233887 100644 --- a/lib/translators/coins.js +++ b/lib/translators/coins.js @@ -184,6 +184,27 @@ }; /** + * Convert spage and epage fields to Zotero pages + * + * This function does not get used in the translate function- + * it must be called explicitly. Citation itemType must + * already be set before calling. + * + * @type {Function} + */ +exports.other.spage = function(citation, metadata){ + if (!citation.itemType || metadata.pages || !metadata.spage || !metadata.epage || + typeof metadata.spage !== 'string' || typeof metadata.epage !== 'string'){ + return citation; + } + // Add page range if pages is a valid field for the type + if (['journalArticle', 'book', 'conferencePaper','bookSection', 'report'].indexOf(citation.itemType) >= 0) { + citation.pages = metadata.spage + '-' + metadata.epage; + } + return citation; +}; + +/** * Add parameters in a list to a string * @param {Object}citation citation object * @param {Array} valuesArray of string values @@ -229,8 +250,6 @@ quarter: null, part: null, isbn: null, // Invalid Zotero field - spage: null, // Start page // TODO: Add function to use this - epage: null, // end page // TODO: Add function to use this pages: makeTranslator('pages'), place: null, // Invalid Zotero field series: makeTranslator('series'), @@ -251,8 +270,6 @@ edition: makeTranslator('edition'), tpages: null, // Total pages bici: null, // Book item and component identifier - spage: null, // Start page // TODO: Add function to use this - epage: null, // end page // TODO: Add function to use this pages: makeTranslator('pages'), place: makeTranslator('place'), series: makeTranslator('series'), @@ -270,8 +287,6 @@ atitle: makeTranslator('title'), title: makeTranslator('proceedingsTitle'), // Deprecated jtitle: makeTranslator('proceedingsTitle'), - spage: null, // Start page // TODO: Add function to use this - epage: null, // end page // TODO: Add function to use this pages: makeTranslator('pages'), place: makeTranslator('place'), series: makeTranslator('series'), @@ -290,8 +305,6 @@ btitle: makeTranslator('bookTitle'), stitle: makeTranslator('shortTitle'), edition: makeTranslator('edition'), - spage: null, // Start page // TODO: Add function to use this - epage: null, // end page // TODO: Add function to use this pages: makeTranslator('pages'), place: makeTranslator('place'), series: makeTranslator('series'), @@ -322,8 +335,6 @@ jtitle: makeTranslator('seriesTitle'), stitle: makeTranslator('shortTitle'), title: makeTranslator('seriesTitle'), - spage: null, // Start page // TODO: Add function to use this - epage: null, // end page // TODO: Add function to use this pages: makeTranslator('pages'), place: makeTranslator('place'), series: makeTranslator('seriesTitle'), diff --git a/test/features/scraping/index.js b/test/features/scraping/index.js index 67adc7f..75ce5be 100644 --- a/test/features/scraping/index.js +++ b/test/features/scraping/index.js @@ -187,6 +187,17 @@ }); }); + it('doi spage and epage fields in crossRef coins data', function() { + return server.query('http://dx.doi.org/10.1002/jlac.18571010113').then(function(res) { + assert.status(res, 200); + assert.checkZotCitation(res, 'Ueber einige Derivate des Naphtylamins'); + assert.deepEqual(!!res.body[0].DOI, true, 'Missing DOI'); +
[MediaWiki-commits] [Gerrit] Produce monolog messages through kafka+avro - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Produce monolog messages through kafka+avro .. Produce monolog messages through kafka+avro This allows a logging channel to be configured to write directly to kafka. Logs can be serialized either to json blobs or the more compact apache avro format. The Kafka handler for monolog needs a list of one of more kafka servers to query cluster metadata from. This should be able to use any monolog formatter, although some like JsonFormatter require you to disable formatBatch as Kafka protocol would prefer to encode each record independently in the protocol. This requires the nmred/kafka-php library, version >= 1.3.0. Adds a new formatter which serializes to the apache avro format. This is a compact binary format which uses pre- defined schemas. This initial implementation is very simple and takes the plain schemas as a constructor argument. Adds a new option to MonologSpi to wrap handlers in a BufferHandler. This doesn't flush until the request shuts down and prevents any network requests in the logger from adding latency to web requests. Related mediawiki/vendor update: Ibfe4bd2036ae8e998e2973f07bd9a6f057691578 The necessary config is something like: array( 'loggers' => array( 'CirrusSearchRequests' => array( 'handlers' => array( 'kafka' ), ), ), 'handlers' => array( 'kafka' => array( 'factory' => '\\MediaWiki\\Logger\\Monolog\\KafkaHandler::factory', 'args' => array( 'localhost:9092' ), 'formatter' => 'avro', 'buffer' => true, ), ), 'formatters' => array( 'avro' => array( 'class' => '\\MediaWiki\\Logger\\Monolog\\AvroFormatter', 'args' => array( array( 'CirrusSearchRequests' => array( 'type' => 'record', 'name' => 'CirrusSearchRequests' 'fields' => array( ... ) ), ), ), ), ), ) Bug: T106256 Change-Id: I6ee744b3e5306af0bed70811b558a543eed22840 --- M autoload.php M composer.json M includes/debug/logger/MonologSpi.php A includes/debug/logger/monolog/AvroFormatter.php A includes/debug/logger/monolog/BufferHandler.php A includes/debug/logger/monolog/KafkaHandler.php A includes/utils/AvroValidator.php A tests/phpunit/includes/ConsecutiveParametersMatcher.php A tests/phpunit/includes/debug/logger/monolog/AvroFormatterTest.php A tests/phpunit/includes/debug/logger/monolog/KafkaHandlerTest.php A tests/phpunit/includes/utils/AvroValidatorTest.php 11 files changed, 1,093 insertions(+), 1 deletion(-) Approvals: MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/autoload.php b/autoload.php index 5adfbe5..03728e9 100644 --- a/autoload.php +++ b/autoload.php @@ -149,6 +149,7 @@ 'AutoLoader' => __DIR__ . '/includes/AutoLoader.php', 'AutoloadGenerator' => __DIR__ . '/includes/utils/AutoloadGenerator.php', 'Autopromote' => __DIR__ . '/includes/Autopromote.php', + 'AvroValidator' => __DIR__ . '/includes/utils/AvroValidator.php', 'BacklinkCache' => __DIR__ . '/includes/cache/BacklinkCache.php', 'BacklinkJobUtils' => __DIR__ . '/includes/jobqueue/utils/BacklinkJobUtils.php', 'BackupDumper' => __DIR__ . '/maintenance/backup.inc', @@ -753,6 +754,9 @@ 'MediaWiki\\Logger\\LegacySpi' => __DIR__ . '/includes/debug/logger/LegacySpi.php', 'MediaWiki\\Logger\\LoggerFactory' => __DIR__ . '/includes/debug/logger/LoggerFactory.php', 'MediaWiki\\Logger\\MonologSpi' => __DIR__ . '/includes/debug/logger/MonologSpi.php', + 'MediaWiki\\Logger\\Monolog\\AvroFormatter' => __DIR__ . '/includes/debug/logger/monolog/AvroFormatter.php', + 'MediaWiki\\Logger\\Monolog\\BufferHandler' => __DIR__ . '/includes/debug/logger/monolog/BufferHandler.php', + 'MediaWiki\\Logger\\Monolog\\KafkaHandler' => __DIR__ . '/includes/debug/logger/monolog/KafkaHandler.php', 'MediaWiki\\Logger\\Monolog\\LegacyFormatter' => __DIR__ . '/includes/debug/logger/monolog/LegacyFormatter.php', 'MediaWiki\\Logger\\Monolog\\LegacyHandler' => __DIR__ . '/includes/debug/logger/monolog/LegacyHandler.php', 'MediaWiki\\Logger\\Monolog\\LineFormatter' => __DIR__ . '/includes/debug/logger/monolog/LineFormatter.php', diff --git a/composer.json b/composer.json index 1fe1e50..1ba5827 100644 --- a/composer.json +++ b/composer.json @@ -45,9 +45,11 @@ "ext-wikidiff2": "Diff accelerator", "ext-apc": "Local data and opcode cache", "monolog/monolog": "Flexible debug logging system", + "nmred/kafka-php": "Send debug log events to kafka", "pear/mail": "Mail sending support", "pear/mail_mime": "Mail sen
[MediaWiki-commits] [Gerrit] Removed deprecated $wgDeferredUpdateList - change (mediawiki/core)
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/240013 Change subject: Removed deprecated $wgDeferredUpdateList .. Removed deprecated $wgDeferredUpdateList Change-Id: I7072ad3b34dd9a0726df6d1c044616c3b4bcd79f --- M includes/Setup.php M includes/deferred/DeferredUpdates.php M tests/phpunit/includes/parser/NewParserTest.php 3 files changed, 3 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/13/240013/1 diff --git a/includes/Setup.php b/includes/Setup.php index 479ce8c..e79d13c 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -681,12 +681,6 @@ */ $wgTitle = null; -/** - * @deprecated since 1.24 Use DeferredUpdates::addUpdate instead - * @var array - */ -$wgDeferredUpdateList = array(); - Profiler::instance()->scopedProfileOut( $ps_globals ); $ps_extensions = Profiler::instance()->scopedProfileIn( $fname . '-extensions' ); diff --git a/includes/deferred/DeferredUpdates.php b/includes/deferred/DeferredUpdates.php index b7e5b0a..713ce70 100644 --- a/includes/deferred/DeferredUpdates.php +++ b/includes/deferred/DeferredUpdates.php @@ -106,9 +106,7 @@ * prevent lock contention */ public static function doUpdates( $commit = '' ) { - global $wgDeferredUpdateList; - - $updates = array_merge( $wgDeferredUpdateList, self::$updates ); + $updates = self::$updates; while ( count( $updates ) ) { self::clearPendingUpdates(); @@ -131,7 +129,7 @@ } } - $updates = array_merge( $wgDeferredUpdateList, self::$updates ); + $updates = self::$updates; } } @@ -140,7 +138,6 @@ * want or need to call this. Unit tests need it though. */ public static function clearPendingUpdates() { - global $wgDeferredUpdateList; - $wgDeferredUpdateList = self::$updates = array(); + self::$updates = array(); } } diff --git a/tests/phpunit/includes/parser/NewParserTest.php b/tests/phpunit/includes/parser/NewParserTest.php index 0d2129b..df7da98 100644 --- a/tests/phpunit/includes/parser/NewParserTest.php +++ b/tests/phpunit/includes/parser/NewParserTest.php @@ -106,7 +106,6 @@ $tmpGlobals['wgAdaptiveMessageCache'] = true; $tmpGlobals['wgUseDatabaseMessages'] = true; $tmpGlobals['wgLocaltimezone'] = 'UTC'; - $tmpGlobals['wgDeferredUpdateList'] = array(); $tmpGlobals['wgGroupPermissions'] = array( '*' => array( 'createaccount' => true, -- To view, visit https://gerrit.wikimedia.org/r/240013 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7072ad3b34dd9a0726df6d1c044616c3b4bcd79f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use OOUI dialogs instead of jquery.ui - change (mediawiki...UploadWizard)
jenkins-bot has submitted this change and it was merged. Change subject: Use OOUI dialogs instead of jquery.ui .. Use OOUI dialogs instead of jquery.ui Bug: T112117 Change-Id: Id3f2642b50d380fba77d6362564930ec08402b76 --- M UploadWizardHooks.php M i18n/en.json M i18n/qqq.json M resources/controller/uw.controller.Details.js M resources/mw.ErrorDialog.js M resources/mw.FlickrChecker.js M resources/mw.UploadWizardDetails.js M resources/mw.UploadWizardLicenseInput.js M resources/mw.UploadWizardUpload.js M resources/mw.UploadWizardUploadInterface.js M resources/ui/uw.ui.Upload.js 11 files changed, 149 insertions(+), 157 deletions(-) Approvals: Bartosz Dziewoński: Looks good to me, approved jenkins-bot: Verified diff --git a/UploadWizardHooks.php b/UploadWizardHooks.php index f011d47..2b31e38 100644 --- a/UploadWizardHooks.php +++ b/UploadWizardHooks.php @@ -19,7 +19,6 @@ 'jquery.checkboxShiftClick', 'jquery.client', 'jquery.ui.core', - 'jquery.ui.dialog', 'jquery.spinner', 'jquery.ui.selectable', 'jquery.placeholder', @@ -458,10 +457,8 @@ 'wm-license-cc-by-sa-3.0-no-text', 'wm-license-cc-by-sa-3.0-pl-text', 'wm-license-cc-by-sa-3.0-ro-text', - 'mwe-upwiz-too-many-files-ok', 'mwe-upwiz-too-many-files-text', 'mwe-upwiz-too-many-files', - 'mwe-upwiz-file-too-large-ok', 'mwe-upwiz-file-too-large-text', 'mwe-upwiz-file-too-large', 'mwe-upwiz-necessary-confirm', diff --git a/i18n/en.json b/i18n/en.json index 8e444b6..3600500 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -224,10 +224,8 @@ "mwe-upwiz-error-license-wikitext-too-short": "The wikitext here is too short to be a license", "mwe-upwiz-error-license-wikitext-too-long": "The wikitext you entered is too long.", "mwe-upwiz-details-error-count": "There {{PLURAL:$1|is one error|are $1 errors}} with the {{PLURAL:$2|form|forms}} above. Correct the {{PLURAL:$1|error|errors}}, and try submitting again.", - "mwe-upwiz-too-many-files-ok": "OK", "mwe-upwiz-too-many-files-text": "You can only upload $1 {{PLURAL:$1|file|files}} at once but you tried to upload $2 {{PLURAL:$2|file|files}} in total. Please try again with fewer files!", "mwe-upwiz-too-many-files": "Too many files.", - "mwe-upwiz-file-too-large-ok": "OK", "mwe-upwiz-file-too-large-text": "You can only upload files with a size of up to $1. You tried to upload a file that is $2.", "mwe-upwiz-file-too-large": "File too large.", "mwe-upwiz-necessary-confirm": "It is recommended that you fill in a category for your uploads. Do you want to continue without filling all the fields?", diff --git a/i18n/qqq.json b/i18n/qqq.json index 000dce0..18fd1bd 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -247,10 +247,8 @@ "mwe-upwiz-error-license-wikitext-too-short": "Message for a failed minimum length validation on the license form.", "mwe-upwiz-error-license-wikitext-too-long": "Message for a failed maximum length validation on the license form.", "mwe-upwiz-details-error-count": "Used as error message. Parameters:\n* $1 - number of errors\n* $2 - number of forms. i.e. number of uploads", - "mwe-upwiz-too-many-files-ok": "OK button text.\n{{Identical|OK}}", "mwe-upwiz-too-many-files-text": "Error message informing the user there are too many uploads in a dialog. Each param is a file count.\n\nParameters:\n* $1 - limit number of files\n* $2 - number of files you tried to upload", "mwe-upwiz-too-many-files": "Error dialog title", - "mwe-upwiz-file-too-large-ok": "{{Identical|OK}}", "mwe-upwiz-file-too-large-text": "Error message informing the user that their file is too large to upload. Parameters:\n* $1 - the maximum file size\n* $2 - the size of the file they tried to upload\nThese two parameters use any one of the following messages:\n** {{msg-mw|Size-bytes}}\n** {{msg-mw|Size-kilobytes}}\n** {{msg-mw|Size-megabytes}}\n** {{msg-mw|Size-gigabytes}}", "mwe-upwiz-file-too-large": "Error dialog title", "mwe-upwiz-necessary-confirm": "Confirmation box suggesting that it is recommended to fill in a category for uploads and asking the uploader whether they want to continue without them", diff --git a/resources/controller/uw.controller.Details.js b/resources/controller/uw.controller.Details.js index 120fd06..557f700 100644 --- a/resources/controller/u
[MediaWiki-commits] [Gerrit] Removed $wgDeferredUpdateList mentioning - change (mediawiki...FlaggedRevs)
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/240012 Change subject: Removed $wgDeferredUpdateList mentioning .. Removed $wgDeferredUpdateList mentioning Change-Id: I95abee6dfe337da456dd5f6e70e2f816439ae210 --- M backend/FRPageConfig.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/FlaggedRevs refs/changes/12/240012/1 diff --git a/backend/FRPageConfig.php b/backend/FRPageConfig.php index 2307acb..dab4443 100644 --- a/backend/FRPageConfig.php +++ b/backend/FRPageConfig.php @@ -233,7 +233,7 @@ ); } # Also, clear their squid caches and purge other pages that use this page. - # NOTE: all of these updates are deferred via $wgDeferredUpdateList. + # NOTE: all of these updates are deferred via DeferredUpdates foreach ( $titlesClearTracking as $title ) { FlaggedRevs::purgeSquid( $title ); if ( FlaggedRevs::inclusionSetting() == FR_INCLUDES_STABLE ) { -- To view, visit https://gerrit.wikimedia.org/r/240012 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I95abee6dfe337da456dd5f6e70e2f816439ae210 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/FlaggedRevs Gerrit-Branch: master Gerrit-Owner: Aaron Schulz ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] block POSTs to pretty wiki URLs... - change (operations/puppet)
BBlack has submitted this change and it was merged. Change subject: block POSTs to pretty wiki URLs... .. block POSTs to pretty wiki URLs... Change-Id: Icf7d133a0ddf1fb40191e2785adca5818c1338c8 --- M modules/varnish/templates/vcl/wikimedia.vcl.erb 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: BBlack: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/varnish/templates/vcl/wikimedia.vcl.erb b/modules/varnish/templates/vcl/wikimedia.vcl.erb index 776c585..4566811 100644 --- a/modules/varnish/templates/vcl/wikimedia.vcl.erb +++ b/modules/varnish/templates/vcl/wikimedia.vcl.erb @@ -169,6 +169,10 @@ } sub filter_noise { + if (req.request == "POST" && req.url ~ "^/wiki/") { + error 403 "Noise"; + } + // Forged UAs on zerodot. This largely handles lazywebtools below, incidentally. if (req.http.host ~ "zero\.wikipedia\.org" && req.http.User-Agent && req.http.User-Agent ~ "Facebookbot|Googlebot") { error 403 "Noise"; -- To view, visit https://gerrit.wikimedia.org/r/240009 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icf7d133a0ddf1fb40191e2785adca5818c1338c8 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlack Gerrit-Reviewer: BBlack Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Avoid calling addHTMLCacheUpdate() - change (mediawiki/core)
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/240011 Change subject: Avoid calling addHTMLCacheUpdate() .. Avoid calling addHTMLCacheUpdate() * That method does not belong in DeferredUpdates Change-Id: I8098ffb82bf9c33ccb48a31aa9dbad514e8724a8 --- M includes/page/WikiPage.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/11/240011/1 diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php index 30590cf..ddda130 100644 --- a/includes/page/WikiPage.php +++ b/includes/page/WikiPage.php @@ -3219,10 +3219,10 @@ */ public static function onArticleEdit( Title $title, Revision $revision = null ) { // Invalidate caches of articles which include this page - DeferredUpdates::addHTMLCacheUpdate( $title, 'templatelinks' ); + DeferredUpdates::addUpdate( new HTMLCacheUpdate( $title, 'templatelinks' ) ); // Invalidate the caches of all pages which redirect here - DeferredUpdates::addHTMLCacheUpdate( $title, 'redirect' ); + DeferredUpdates::addUpdate( new HTMLCacheUpdate( $title, 'redirect' ) ); // Purge squid for this page only $title->purgeSquid(); -- To view, visit https://gerrit.wikimedia.org/r/240011 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8098ffb82bf9c33ccb48a31aa9dbad514e8724a8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Avoid calling addHTMLCacheUpdate() - change (mediawiki...FlaggedRevs)
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/240010 Change subject: Avoid calling addHTMLCacheUpdate() .. Avoid calling addHTMLCacheUpdate() Change-Id: I64f76494fb9b580350a8968ff7b5f23b7ecf5829 --- M backend/FlaggedRevs.class.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/FlaggedRevs refs/changes/10/240010/1 diff --git a/backend/FlaggedRevs.class.php b/backend/FlaggedRevs.class.php index 7020cc9..1655b1a 100755 --- a/backend/FlaggedRevs.class.php +++ b/backend/FlaggedRevs.class.php @@ -708,9 +708,9 @@ */ public static function HTMLCacheUpdates( Title $title ) { # Invalidate caches of articles which include this page... - DeferredUpdates::addHTMLCacheUpdate( $title, 'templatelinks' ); + DeferredUpdates::addUpdate( new HTMLCacheUpdate( $title, 'templatelinks' ) ); if ( $title->getNamespace() == NS_FILE ) { - DeferredUpdates::addHTMLCacheUpdate( $title, 'imagelinks' ); + DeferredUpdates::addUpdate( new HTMLCacheUpdate( $title, 'imagelinks' ) ); } DeferredUpdates::addUpdate( new FRExtraCacheUpdate( $title ) ); } -- To view, visit https://gerrit.wikimedia.org/r/240010 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I64f76494fb9b580350a8968ff7b5f23b7ecf5829 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/FlaggedRevs Gerrit-Branch: master Gerrit-Owner: Aaron Schulz ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] block POSTs to pretty wiki URLs... - change (operations/puppet)
BBlack has uploaded a new change for review. https://gerrit.wikimedia.org/r/240009 Change subject: block POSTs to pretty wiki URLs... .. block POSTs to pretty wiki URLs... Change-Id: Icf7d133a0ddf1fb40191e2785adca5818c1338c8 --- M modules/varnish/templates/vcl/wikimedia.vcl.erb 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/09/240009/1 diff --git a/modules/varnish/templates/vcl/wikimedia.vcl.erb b/modules/varnish/templates/vcl/wikimedia.vcl.erb index 776c585..c6f41f6 100644 --- a/modules/varnish/templates/vcl/wikimedia.vcl.erb +++ b/modules/varnish/templates/vcl/wikimedia.vcl.erb @@ -169,6 +169,10 @@ } sub filter_noise { + if (req.request == "POST" && req.url ~ "/wiki/") { + error 403 "Noise"; + } + // Forged UAs on zerodot. This largely handles lazywebtools below, incidentally. if (req.http.host ~ "zero\.wikipedia\.org" && req.http.User-Agent && req.http.User-Agent ~ "Facebookbot|Googlebot") { error 403 "Noise"; -- To view, visit https://gerrit.wikimedia.org/r/240009 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icf7d133a0ddf1fb40191e2785adca5818c1338c8 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlack ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update Wikidata - Fix autocomment format and change coalesci... - change (mediawiki...Wikidata)
jenkins-bot has submitted this change and it was merged. Change subject: Update Wikidata - Fix autocomment format and change coalescing bugs .. Update Wikidata - Fix autocomment format and change coalescing bugs Also remove deprecated code in ApiXmlFormatTest. It is safe to remove now, but when this branch is tested with the next MW core branch, then the deprecation warning will cause jenkins to fail. Change-Id: I5d2475797e599351d2baf02b0a33c5f3c21c2740 --- M composer.lock M extensions/Wikibase/client/includes/Changes/ChangeRunCoalescer.php M extensions/Wikibase/client/tests/phpunit/includes/Changes/ChangeRunCoalescerTest.php M extensions/Wikibase/repo/Wikibase.hooks.php M extensions/Wikibase/repo/tests/phpunit/includes/api/ApiXmlFormatTest.php M vendor/composer/installed.json 6 files changed, 277 insertions(+), 245 deletions(-) Approvals: Alex Monk: Looks good to me, approved jenkins-bot: Verified diff --git a/composer.lock b/composer.lock index 9a75d39..d342695 100644 --- a/composer.lock +++ b/composer.lock @@ -1385,7 +1385,7 @@ "source": { "type": "git", "url": "https://gerrit.wikimedia.org/r/mediawiki/extensions/Wikibase";, -"reference": "e38851b8fccc2ed0944738224c0545054269e806" +"reference": "61a3888d245e1ce27f874bce7d0ea0134e9c5ac5" }, "require": { "data-values/common": "~0.3.0", @@ -1467,7 +1467,7 @@ "issues": "https://phabricator.wikimedia.org/";, "irc": "irc://irc.freenode.net/wikidata" }, -"time": "2015-09-10 17:53:20" +"time": "2015-09-21 13:04:56" }, { "name": "wikibase/wikimedia-badges", diff --git a/extensions/Wikibase/client/includes/Changes/ChangeRunCoalescer.php b/extensions/Wikibase/client/includes/Changes/ChangeRunCoalescer.php index 8183f5d..99b681e 100644 --- a/extensions/Wikibase/client/includes/Changes/ChangeRunCoalescer.php +++ b/extensions/Wikibase/client/includes/Changes/ChangeRunCoalescer.php @@ -149,7 +149,7 @@ $entityId = $first->getEntityId(); $parentRevId = $firstmeta['parent_id']; - $latestRevId = $firstmeta['rev_id']; + $latestRevId = $lastmeta['rev_id']; $entityRev = $this->entityRevisionLookup->getEntityRevision( $entityId, $latestRevId ); @@ -233,15 +233,12 @@ if ( !$break && ( $change instanceof ItemChange ) ) { $siteLinkDiff = $change->getSiteLinkDiff(); if ( isset( $siteLinkDiff[ $this->localSiteId ] ) ) { + // TODO: don't break if only the link's badges changed $break = true; $breakNext = true; } } - // FIXME: We should call changeNeedsRendering() and see if the needs-rendering - //stays the same, and break the run if not. This way, uninteresting - //changes can be sorted out more cleanly later. - // FIXME: Perhaps more easily, get rid of them here and now! if ( $break ) { if ( !empty( $currentRun ) ) { try { diff --git a/extensions/Wikibase/client/tests/phpunit/includes/Changes/ChangeRunCoalescerTest.php b/extensions/Wikibase/client/tests/phpunit/includes/Changes/ChangeRunCoalescerTest.php index 985d6b3..2bf9e16 100644 --- a/extensions/Wikibase/client/tests/phpunit/includes/Changes/ChangeRunCoalescerTest.php +++ b/extensions/Wikibase/client/tests/phpunit/includes/Changes/ChangeRunCoalescerTest.php @@ -3,13 +3,20 @@ namespace Wikibase\Client\Tests\Changes; use Diff\Differ\MapDiffer; +use Diff\DiffOp\AtomicDiffOp; +use Traversable; use Wikibase\Change; use Wikibase\ChangesTable; use Wikibase\Client\Changes\ChangeRunCoalescer; +use Wikibase\DataModel\Entity\EntityId; use Wikibase\DataModel\Entity\Item; use Wikibase\DataModel\Entity\ItemId; use Wikibase\DataModel\Services\Diff\EntityDiff; +use Wikibase\DataModel\Services\Diff\EntityDiffer; +use Wikibase\DataModel\Services\Diff\ItemDiffer; +use Wikibase\DataModel\SiteLink; use Wikibase\EntityChange; +use Wikibase\EntityFactory; use Wikibase\Lib\Store\EntityRevisionLookup; use Wikibase\Test\MockRepository; use Wikibase\Test\TestChanges; @@ -48,39 +55,34 @@ private function getEntityRevisionLookup() { $repo = new MockRepository(); - // entity 1, revision 11 - $entity1 = new Item( new I
[MediaWiki-commits] [Gerrit] Only send IsVerified if !ESOP - change (mediawiki...DonationInterface)
jenkins-bot has submitted this change and it was merged. Change subject: Only send IsVerified if !ESOP .. Only send IsVerified if !ESOP Change-Id: Iaacdbdb9587f6dd364d9720d058b754a8fa2078d --- M worldpay_gateway/worldpay.adapter.php 1 file changed, 8 insertions(+), 3 deletions(-) Approvals: Awight: Looks good to me, approved jenkins-bot: Verified diff --git a/worldpay_gateway/worldpay.adapter.php b/worldpay_gateway/worldpay.adapter.php index 6bbaa8f..63ec212 100644 --- a/worldpay_gateway/worldpay.adapter.php +++ b/worldpay_gateway/worldpay.adapter.php @@ -395,6 +395,9 @@ // AVS and CVV check details. If fraud checks pass we will simultaneously // authorize and deposit the payment using the 'Sale' aka AuthorizeAndDepositPayment // transaction. + + // ADDITIONAL NOTE: ESOP needs this value unset, so I've removed it and + // added logic in do_transaction to set it if the transaction is not ESOP. $this->transactions['AuthorizePaymentForFraud'] = array( 'request' => array( 'VersionUsed', @@ -403,7 +406,6 @@ 'RequestType', 'TRXSource', 'MOP', - 'IsVerify', 'IsTest', 'MerchantId', @@ -437,7 +439,6 @@ 'RequestType' => 'A', // Authorize a payment 'TRXSource' => 4, // Card not present (web order) transaction 'MOP' => 'CC', // Credit card transaction - 'IsVerify' => 1,// Perform CVV and AVS verification for account (deposit not allowed) 'Amount' => '0.10', // Perform a small amount authorization (just enough to trigger it) ), 'never_log' => array ( @@ -785,8 +786,8 @@ switch ( $transaction ) { case 'GenerateToken': - // This parameter will cause WP to use the iframe code path. if ( $this->isESOP() ) { + // This parameter will cause WP to use the iframe code path. $this->transactions['GenerateToken']['values']['IsHosted'] = 1; } @@ -806,6 +807,10 @@ break; case 'AuthorizePaymentForFraud': + if ( ! $this->isESOP() ) { + // Perform CVV and AVS verification for account (deposit not allowed) + $this->transactions['AuthorizePaymentForFraud']['values']['IsVerify'] = 1; + } $this->addRequestData( array( 'cvv' => $this->get_cvv() ) ); $this->store_cvv_in_session( null ); // Remove the CVV from the session return parent::do_transaction( $transaction ); -- To view, visit https://gerrit.wikimedia.org/r/240007 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iaacdbdb9587f6dd364d9720d058b754a8fa2078d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DonationInterface Gerrit-Branch: master Gerrit-Owner: Cdentinger Gerrit-Reviewer: Awight Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 9beb40c..8a0ead0 - change (mediawiki/extensions)
Jenkins-mwext-sync has submitted this change and it was merged. Change subject: Syncronize VisualEditor: 9beb40c..8a0ead0 .. Syncronize VisualEditor: 9beb40c..8a0ead0 Change-Id: I9b0d9373562afcb3963ecb4f75901aecfa4da0a3 --- M VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Jenkins-mwext-sync: Verified; Looks good to me, approved diff --git a/VisualEditor b/VisualEditor index 9beb40c..8a0ead0 16 --- a/VisualEditor +++ b/VisualEditor -Subproject commit 9beb40c40eba3ec4d177451aa41b060d791c9947 +Subproject commit 8a0ead09401b3046af5b4d5b756842983844e23c -- To view, visit https://gerrit.wikimedia.org/r/240008 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9b0d9373562afcb3963ecb4f75901aecfa4da0a3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions Gerrit-Branch: master Gerrit-Owner: Jenkins-mwext-sync Gerrit-Reviewer: Jenkins-mwext-sync ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 9beb40c..8a0ead0 - change (mediawiki/extensions)
Jenkins-mwext-sync has uploaded a new change for review. https://gerrit.wikimedia.org/r/240008 Change subject: Syncronize VisualEditor: 9beb40c..8a0ead0 .. Syncronize VisualEditor: 9beb40c..8a0ead0 Change-Id: I9b0d9373562afcb3963ecb4f75901aecfa4da0a3 --- M VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions refs/changes/08/240008/1 diff --git a/VisualEditor b/VisualEditor index 9beb40c..8a0ead0 16 --- a/VisualEditor +++ b/VisualEditor -Subproject commit 9beb40c40eba3ec4d177451aa41b060d791c9947 +Subproject commit 8a0ead09401b3046af5b4d5b756842983844e23c -- To view, visit https://gerrit.wikimedia.org/r/240008 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9b0d9373562afcb3963ecb4f75901aecfa4da0a3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions Gerrit-Branch: master Gerrit-Owner: Jenkins-mwext-sync ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Only send IsVerified if !ESOP - change (mediawiki...DonationInterface)
Cdentinger has uploaded a new change for review. https://gerrit.wikimedia.org/r/240007 Change subject: Only send IsVerified if !ESOP .. Only send IsVerified if !ESOP Change-Id: Iaacdbdb9587f6dd364d9720d058b754a8fa2078d --- M worldpay_gateway/worldpay.adapter.php 1 file changed, 8 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface refs/changes/07/240007/1 diff --git a/worldpay_gateway/worldpay.adapter.php b/worldpay_gateway/worldpay.adapter.php index 6bbaa8f..63ec212 100644 --- a/worldpay_gateway/worldpay.adapter.php +++ b/worldpay_gateway/worldpay.adapter.php @@ -395,6 +395,9 @@ // AVS and CVV check details. If fraud checks pass we will simultaneously // authorize and deposit the payment using the 'Sale' aka AuthorizeAndDepositPayment // transaction. + + // ADDITIONAL NOTE: ESOP needs this value unset, so I've removed it and + // added logic in do_transaction to set it if the transaction is not ESOP. $this->transactions['AuthorizePaymentForFraud'] = array( 'request' => array( 'VersionUsed', @@ -403,7 +406,6 @@ 'RequestType', 'TRXSource', 'MOP', - 'IsVerify', 'IsTest', 'MerchantId', @@ -437,7 +439,6 @@ 'RequestType' => 'A', // Authorize a payment 'TRXSource' => 4, // Card not present (web order) transaction 'MOP' => 'CC', // Credit card transaction - 'IsVerify' => 1,// Perform CVV and AVS verification for account (deposit not allowed) 'Amount' => '0.10', // Perform a small amount authorization (just enough to trigger it) ), 'never_log' => array ( @@ -785,8 +786,8 @@ switch ( $transaction ) { case 'GenerateToken': - // This parameter will cause WP to use the iframe code path. if ( $this->isESOP() ) { + // This parameter will cause WP to use the iframe code path. $this->transactions['GenerateToken']['values']['IsHosted'] = 1; } @@ -806,6 +807,10 @@ break; case 'AuthorizePaymentForFraud': + if ( ! $this->isESOP() ) { + // Perform CVV and AVS verification for account (deposit not allowed) + $this->transactions['AuthorizePaymentForFraud']['values']['IsVerify'] = 1; + } $this->addRequestData( array( 'cvv' => $this->get_cvv() ) ); $this->store_cvv_in_session( null ); // Remove the CVV from the session return parent::do_transaction( $transaction ); -- To view, visit https://gerrit.wikimedia.org/r/240007 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iaacdbdb9587f6dd364d9720d058b754a8fa2078d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DonationInterface Gerrit-Branch: master Gerrit-Owner: Cdentinger ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Allow pressing 'escape' from all pages of save dialog - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Allow pressing 'escape' from all pages of save dialog .. Allow pressing 'escape' from all pages of save dialog Bonus: Add 'Resume editing' button to review changes page Change-Id: Ief200c8aa2e2c8363bf6c9be3544ec1c56e07ff4 --- M modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js 1 file changed, 8 insertions(+), 5 deletions(-) Approvals: Alex Monk: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js b/modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js index 5c7ce0f..1b98419 100644 --- a/modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js +++ b/modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js @@ -55,7 +55,7 @@ { label: OO.ui.deferMsg( 'visualeditor-savedialog-label-resume-editing' ), flags: [ 'safe', 'back' ], - modes: [ 'save', 'conflict' ] + modes: [ 'save', 'review', 'conflict' ] }, { action: 'review', @@ -149,14 +149,13 @@ */ ve.ui.MWSaveDialog.prototype.swapPanel = function ( panel ) { var currentEditSummaryWikitext, + size = 'medium', dialog = this, panelObj = dialog[ panel + 'Panel' ]; if ( ( [ 'save', 'review', 'conflict', 'nochanges' ].indexOf( panel ) ) === -1 ) { throw new Error( 'Unknown saveDialog panel: ' + panel ); } - - this.setSize( 'medium' ); // Update the window title // The following messages can be used here: @@ -168,6 +167,10 @@ // Reset save button if we disabled it for e.g. unrecoverable spam error this.actions.setAbilities( { save: true } ); + + // On panels without inputs, ensure the dialog is focused so events + // are captured, e.g. 'Esc' to close + this.$content[ 0 ].focus(); switch ( panel ) { case 'save': @@ -183,7 +186,7 @@ .setMode( 'conflict' ); break; case 'review': - this.setSize( 'larger' ); + size = 'larger'; currentEditSummaryWikitext = this.editSummaryInput.getValue(); if ( this.lastEditSummaryWikitext === undefined || this.lastEditSummaryWikitext !== currentEditSummaryWikitext ) { if ( this.editSummaryXhr ) { @@ -224,7 +227,7 @@ // Show the target panel this.panels.setItem( panelObj ); - this.updateSize(); + this.setSize( size ); mw.hook( 've.saveDialog.stateChanged' ).fire(); -- To view, visit https://gerrit.wikimedia.org/r/239883 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ief200c8aa2e2c8363bf6c9be3544ec1c56e07ff4 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders Gerrit-Reviewer: Alex Monk Gerrit-Reviewer: Jforrester Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Enable captchas on testwiki - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Enable captchas on testwiki .. Enable captchas on testwiki Bug: T86460 Change-Id: I791182190e4717e87f7b983a362d076405d03898 --- M wmf-config/InitialiseSettings.php 1 file changed, 0 insertions(+), 3 deletions(-) Approvals: Alex Monk: Looks good to me, approved Zfilipin: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index b95041d..e7fb0ea 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -10145,9 +10145,6 @@ 'fishbowl' => false, 'closed' => false, - // testing - 'testwiki' => false, - // 'global-multiwrite' backend isn't available, so disable for now 'labswiki' => false, ), -- To view, visit https://gerrit.wikimedia.org/r/238357 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I791182190e4717e87f7b983a362d076405d03898 Gerrit-PatchSet: 2 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: CSteipp Gerrit-Reviewer: Alex Monk Gerrit-Reviewer: Dduvall Gerrit-Reviewer: Hashar Gerrit-Reviewer: Zfilipin Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 8486cbb..9beb40c - change (mediawiki/extensions)
Jenkins-mwext-sync has submitted this change and it was merged. Change subject: Syncronize VisualEditor: 8486cbb..9beb40c .. Syncronize VisualEditor: 8486cbb..9beb40c Change-Id: Ic60299e23b4abdaa35e89dd2707ead3be3559391 --- M VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Jenkins-mwext-sync: Verified; Looks good to me, approved diff --git a/VisualEditor b/VisualEditor index 8486cbb..9beb40c 16 --- a/VisualEditor +++ b/VisualEditor -Subproject commit 8486cbb0a87b0d6e228b3ab2c864bda46ed22160 +Subproject commit 9beb40c40eba3ec4d177451aa41b060d791c9947 -- To view, visit https://gerrit.wikimedia.org/r/240006 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic60299e23b4abdaa35e89dd2707ead3be3559391 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions Gerrit-Branch: master Gerrit-Owner: Jenkins-mwext-sync Gerrit-Reviewer: Jenkins-mwext-sync ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 8486cbb..9beb40c - change (mediawiki/extensions)
Jenkins-mwext-sync has uploaded a new change for review. https://gerrit.wikimedia.org/r/240006 Change subject: Syncronize VisualEditor: 8486cbb..9beb40c .. Syncronize VisualEditor: 8486cbb..9beb40c Change-Id: Ic60299e23b4abdaa35e89dd2707ead3be3559391 --- M VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions refs/changes/06/240006/1 diff --git a/VisualEditor b/VisualEditor index 8486cbb..9beb40c 16 --- a/VisualEditor +++ b/VisualEditor -Subproject commit 8486cbb0a87b0d6e228b3ab2c864bda46ed22160 +Subproject commit 9beb40c40eba3ec4d177451aa41b060d791c9947 -- To view, visit https://gerrit.wikimedia.org/r/240006 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic60299e23b4abdaa35e89dd2707ead3be3559391 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions Gerrit-Branch: master Gerrit-Owner: Jenkins-mwext-sync ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make save dialog variable height - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: Make save dialog variable height .. Make save dialog variable height Change-Id: I90437b3130d08441e5c93b2a34fd9083106a14b3 --- M modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js 1 file changed, 7 insertions(+), 1 deletion(-) Approvals: Alex Monk: Looks good to me, approved Jforrester: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js b/modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js index 112baba..5c7ce0f 100644 --- a/modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js +++ b/modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js @@ -212,6 +212,7 @@ dialog.$reviewEditSummary.parent().addClass( 'oo-ui-element-hidden' ); } ).always( function () { dialog.$reviewEditSummary.parent().removeClass( 'mw-ajax-loader' ); + dialog.updateSize(); } ); } } @@ -223,6 +224,7 @@ // Show the target panel this.panels.setItem( panelObj ); + this.updateSize(); mw.hook( 've.saveDialog.stateChanged' ).fire(); @@ -343,6 +345,7 @@ // Properties this.panels = new OO.ui.StackLayout( { scrollable: true } ); this.savePanel = new OO.ui.PanelLayout( { + expanded: false, scrollable: true, padded: true, classes: [ 've-ui-mwSaveDialog-savePanel' ] @@ -408,6 +411,7 @@ // Review panel this.reviewPanel = new OO.ui.PanelLayout( { + expanded: false, scrollable: true, padded: true } ); @@ -425,6 +429,7 @@ // Conflict panel this.conflictPanel = new OO.ui.PanelLayout( { + expanded: false, scrollable: true, padded: true } ); @@ -435,6 +440,7 @@ // No changes panel this.nochangesPanel = new OO.ui.PanelLayout( { + expanded: false, scrollable: true, padded: true } ); @@ -547,7 +553,7 @@ */ ve.ui.MWSaveDialog.prototype.getBodyHeight = function () { // Don't vary the height when the foot is made visible or not - return 350 - this.$foot.outerHeight( true ); + return this.panels.getCurrentItem().$element.outerHeight( true ); }; /** -- To view, visit https://gerrit.wikimedia.org/r/239879 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I90437b3130d08441e5c93b2a34fd9083106a14b3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders Gerrit-Reviewer: Alex Monk Gerrit-Reviewer: Jforrester Gerrit-Reviewer: Krinkle Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Finish openGraph definitions - change (mediawiki...citoid)
Mobrovac has submitted this change and it was merged. Change subject: Finish openGraph definitions .. Finish openGraph definitions Finish openGraph definitions, and validate date and language fields. Bug: T1069 Bug: T93337 Change-Id: If25fe8f94974d5c67a75d04c798e0254a02e9e18 --- M lib/Exporter.js M lib/translators/general.js M lib/translators/openGraph.js M test/features/scraping/index.js M test/features/scraping/lang.js M test/features/scraping/noZotero.js M test/features/unit/general.js 7 files changed, 76 insertions(+), 16 deletions(-) Approvals: Mobrovac: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/Exporter.js b/lib/Exporter.js index a5914ee..ff95b2a 100644 --- a/lib/Exporter.js +++ b/lib/Exporter.js @@ -446,3 +446,4 @@ module.exports.fixURL = fixURL; module.exports.stripCitation = stripCitation; module.exports.fixDate = fixDate; +module.exports.fixLang = fixLang; diff --git a/lib/translators/general.js b/lib/translators/general.js index caff5f7..8a28cc0 100644 --- a/lib/translators/general.js +++ b/lib/translators/general.js @@ -1,10 +1,14 @@ 'use strict'; + /** * Utility function to map the keys directly + * @param {String} property Zotero property name to add to citation + * @param {Function} validate Function to run on scraped value + * @return {Object}citation object */ -function makeTranslator(property) { +function makeTranslator(property, validate) { function translateProp(citation, metadataValue) { citation = citation || {}; if (typeof metadataValue === 'string') { @@ -14,7 +18,11 @@ // Choose the first value translateProp(citation, metadataValue[0]); } - return citation; + if (validate) { + return validate(citation); + } else { + return citation; + } } return { name: property, diff --git a/lib/translators/openGraph.js b/lib/translators/openGraph.js index 234db25..9327358 100644 --- a/lib/translators/openGraph.js +++ b/lib/translators/openGraph.js @@ -2,6 +2,8 @@ var makeTranslator = require('./general').util.makeTranslator; +var fixDate = require('../Exporter.js').fixDate; +var fixLang = require('../Exporter.js').fixLang; /** * Open graph type field values : Zotero type field values @@ -9,9 +11,9 @@ */ exports.types = { website: 'webpage', - article: 'blogPost', //or journalArticle, newspaperArticle, magazineArticle ? + article: 'blogPost', // May change to journalArticle, newspaperArticle, magazineArticle book: 'book', - profile: 'webpage', //may be possible to obtain more information from this link a.k.a. names + profile: 'webpage', // May be possible to obtain more information from this link a.k.a. names 'music.song': 'audioRecording', 'music.album': 'audioRecording', 'music.playlist': 'webpage', @@ -33,7 +35,7 @@ image: null, // general OG property, unused in any Zotero type //could possible put in archive location? audio: null, // general OG property, unused in Zotero in any Zotero type //could possibly put in archive location? description: makeTranslator('abstractNote'), // general OG property, abstractNote common to all Zotero types - locale: null, // general OG property, common to all Zotero types + locale: makeTranslator('language', fixLang), // general OG property, common to all Zotero types determiner: null, // general OG property, unused in any Zotero type 'locale:alternate': null, // general OG property, unused in any Zotero type site_name: null, // general OG property, only used in webpage types - translate there @@ -47,10 +49,33 @@ * @type {Object} */ exports.webpage = { - site_name: makeTranslator('websiteTitle') // prefix og: general property, but should only be assigned if type webpage is used + site_name: makeTranslator('websiteTitle'), // prefix og: general property, but should only be assigned if type webpage is used }; exports.videoRecording = { duration: makeTranslator('runningTime'), - release_date: makeTranslator('date') + release_date: makeTranslator('date', fixDate) }; + +exports.audioRecording = { + release_date: makeTranslator('date',fixDate) // only present in music.album +}; + +exports.blogPost = { + published_time: makeTranslator('date', fixDate), +}; + +exports.book = { + release_date: makeTranslator('date', fixDate), + isbn: makeTranslator('ISBN'), +}; + +/** Not currently used */ +exports.journalArticle = { + published_time: makeTranslator('date', fixDate), +}; + +/** Not currently used */ +exports.newspaperArticle = { + published_time: makeTranslator('date', fixDate), +};
[MediaWiki-commits] [Gerrit] Measure non-compliant Navigation Timing browsers - change (mediawiki...NavigationTiming)
jenkins-bot has submitted this change and it was merged. Change subject: Measure non-compliant Navigation Timing browsers .. Measure non-compliant Navigation Timing browsers Bug: T112593 Change-Id: Iadf405a1ba23197b5f249f3e6ef6825ea9062eef (cherry picked from commit 5b5621c3199d7d59e66d4b5e5e5592a3fee35783) --- M modules/ext.navigationTiming.js 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ext.navigationTiming.js b/modules/ext.navigationTiming.js index ba30dab..235853f 100644 --- a/modules/ext.navigationTiming.js +++ b/modules/ext.navigationTiming.js @@ -168,6 +168,10 @@ } $.extend( event, getNavTiming() ); + if ( navigation && navigation.type === 0 && !isCompliant() ) { + // Keep track of non-compliant browsers (only on TYPE_NAVIGATE) + mw.eventLog.logFailure( 'NavigationTiming', 'nonCompliant' ); + } mw.eventLog.logEvent( 'NavigationTiming', event ); } -- To view, visit https://gerrit.wikimedia.org/r/240005 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iadf405a1ba23197b5f249f3e6ef6825ea9062eef Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/NavigationTiming Gerrit-Branch: wmf/1.26wmf23 Gerrit-Owner: Krinkle Gerrit-Reviewer: Krinkle Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Measure non-compliant Navigation Timing browsers - change (mediawiki...NavigationTiming)
Krinkle has uploaded a new change for review. https://gerrit.wikimedia.org/r/240005 Change subject: Measure non-compliant Navigation Timing browsers .. Measure non-compliant Navigation Timing browsers Bug: T112593 Change-Id: Iadf405a1ba23197b5f249f3e6ef6825ea9062eef (cherry picked from commit 5b5621c3199d7d59e66d4b5e5e5592a3fee35783) --- M modules/ext.navigationTiming.js 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/NavigationTiming refs/changes/05/240005/1 diff --git a/modules/ext.navigationTiming.js b/modules/ext.navigationTiming.js index ba30dab..235853f 100644 --- a/modules/ext.navigationTiming.js +++ b/modules/ext.navigationTiming.js @@ -168,6 +168,10 @@ } $.extend( event, getNavTiming() ); + if ( navigation && navigation.type === 0 && !isCompliant() ) { + // Keep track of non-compliant browsers (only on TYPE_NAVIGATE) + mw.eventLog.logFailure( 'NavigationTiming', 'nonCompliant' ); + } mw.eventLog.logEvent( 'NavigationTiming', event ); } -- To view, visit https://gerrit.wikimedia.org/r/240005 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iadf405a1ba23197b5f249f3e6ef6825ea9062eef Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/NavigationTiming Gerrit-Branch: wmf/1.26wmf23 Gerrit-Owner: Krinkle ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Clean up some mobile stuff - change (mediawiki...GreyStuff)
jenkins-bot has submitted this change and it was merged. Change subject: Clean up some mobile stuff .. Clean up some mobile stuff Change-Id: I08239eabc8a6341463cca3eef92245610cfed5d1 --- M resources/main.less D resources/mobile.js.css A resources/mobile.js.less M resources/screen-mobile.less M skin.json 5 files changed, 40 insertions(+), 29 deletions(-) Approvals: Isarra: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/main.less b/resources/main.less index 0768ca0..b9b96bb 100644 --- a/resources/main.less +++ b/resources/main.less @@ -261,8 +261,8 @@ #f-list { margin: 1em 0 0; padding: 0; + font-size: 90%; list-style: none; - line-height: 1.2em; li { display: inline; diff --git a/resources/mobile.js.css b/resources/mobile.js.css deleted file mode 100644 index b6a0795..000 --- a/resources/mobile.js.css +++ /dev/null @@ -1,22 +0,0 @@ -/* js stuff */ - -/* For the footer menus */ -#footer-container { - padding-top: 0; -} -#footer-navigation .p-body { - display: none; -} -#footer-navigation .mw-portlet { - padding: 0; -} -#footer-navigation h3 { - margin: 0; - padding: .75em 0 .75em 0; -} -#footer-navigation .mw-portlet.visible { - padding-bottom: .75em; -} -#footer-navigation li { - padding: .25em 1em; -} diff --git a/resources/mobile.js.less b/resources/mobile.js.less new file mode 100644 index 000..3f8eabc --- /dev/null +++ b/resources/mobile.js.less @@ -0,0 +1,29 @@ +/* js stuff */ + +/* For the footer menus */ +#footer-container { + padding-top: 0; +} +#footer-navigation { + + .p-body { + display: none; + } + .mw-portlet { + padding: 0; + } + h3 { + margin: 0; + padding: .75em 0 .75em 0; + + &:hover { + cursor: pointer; + } + } + .mw-portlet.visible { + padding-bottom: .75em; + } + li { + padding: .25em 1em; + } +} diff --git a/resources/screen-mobile.less b/resources/screen-mobile.less index 04e57ef..e189bed 100644 --- a/resources/screen-mobile.less +++ b/resources/screen-mobile.less @@ -3,7 +3,8 @@ /* Extra stuff mobile doesn't need */ #sitesubtitle, #header-navigation-container, -#p-logo { +#p-logo, +#content-header ul li#ca-view { display: none; } @@ -29,7 +30,6 @@ } /* Full-width thumbnails */ - div.thumb { float: none; } @@ -59,6 +59,12 @@ margin: 0 auto .5em; } +/* Keep images from overflowing */ +#content a > img { + height: auto !important; + max-width: 100% !important; +} + /* Table of contents */ #toc, .toc, .mw-warning { width: 100%; @@ -72,7 +78,6 @@ } /* Footer links and icons */ - #footer-container #f-list li#lastmod { display: block; margin-bottom: 1em; @@ -85,8 +90,7 @@ font-size: 100%; } -/* Footer (need to accordianise and do same with top but hidden by a toggle?) */ - +/* Footer */ #footer-navigation { font-size: 100%; } diff --git a/skin.json b/skin.json index fba75b9..18b1bad 100644 --- a/skin.json +++ b/skin.json @@ -49,7 +49,7 @@ }, "skins.greystuff.mobile": { "styles": { - "resources/mobile.js.css": { + "resources/mobile.js.less": { "media": "(max-width: 760px)" } }, -- To view, visit https://gerrit.wikimedia.org/r/240004 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I08239eabc8a6341463cca3eef92245610cfed5d1 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/skins/GreyStuff Gerrit-Branch: master Gerrit-Owner: Isarra Gerrit-Reviewer: Isarra Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Cleanup some mobile stuff - change (mediawiki...GreyStuff)
Isarra has uploaded a new change for review. https://gerrit.wikimedia.org/r/240004 Change subject: Cleanup some mobile stuff .. Cleanup some mobile stuff Change-Id: I08239eabc8a6341463cca3eef92245610cfed5d1 --- M resources/main.less D resources/mobile.js.css A resources/mobile.js.less M resources/screen-mobile.less M skin.json 5 files changed, 40 insertions(+), 29 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/GreyStuff refs/changes/04/240004/1 diff --git a/resources/main.less b/resources/main.less index 0768ca0..b9b96bb 100644 --- a/resources/main.less +++ b/resources/main.less @@ -261,8 +261,8 @@ #f-list { margin: 1em 0 0; padding: 0; + font-size: 90%; list-style: none; - line-height: 1.2em; li { display: inline; diff --git a/resources/mobile.js.css b/resources/mobile.js.css deleted file mode 100644 index b6a0795..000 --- a/resources/mobile.js.css +++ /dev/null @@ -1,22 +0,0 @@ -/* js stuff */ - -/* For the footer menus */ -#footer-container { - padding-top: 0; -} -#footer-navigation .p-body { - display: none; -} -#footer-navigation .mw-portlet { - padding: 0; -} -#footer-navigation h3 { - margin: 0; - padding: .75em 0 .75em 0; -} -#footer-navigation .mw-portlet.visible { - padding-bottom: .75em; -} -#footer-navigation li { - padding: .25em 1em; -} diff --git a/resources/mobile.js.less b/resources/mobile.js.less new file mode 100644 index 000..3f8eabc --- /dev/null +++ b/resources/mobile.js.less @@ -0,0 +1,29 @@ +/* js stuff */ + +/* For the footer menus */ +#footer-container { + padding-top: 0; +} +#footer-navigation { + + .p-body { + display: none; + } + .mw-portlet { + padding: 0; + } + h3 { + margin: 0; + padding: .75em 0 .75em 0; + + &:hover { + cursor: pointer; + } + } + .mw-portlet.visible { + padding-bottom: .75em; + } + li { + padding: .25em 1em; + } +} diff --git a/resources/screen-mobile.less b/resources/screen-mobile.less index 04e57ef..e189bed 100644 --- a/resources/screen-mobile.less +++ b/resources/screen-mobile.less @@ -3,7 +3,8 @@ /* Extra stuff mobile doesn't need */ #sitesubtitle, #header-navigation-container, -#p-logo { +#p-logo, +#content-header ul li#ca-view { display: none; } @@ -29,7 +30,6 @@ } /* Full-width thumbnails */ - div.thumb { float: none; } @@ -59,6 +59,12 @@ margin: 0 auto .5em; } +/* Keep images from overflowing */ +#content a > img { + height: auto !important; + max-width: 100% !important; +} + /* Table of contents */ #toc, .toc, .mw-warning { width: 100%; @@ -72,7 +78,6 @@ } /* Footer links and icons */ - #footer-container #f-list li#lastmod { display: block; margin-bottom: 1em; @@ -85,8 +90,7 @@ font-size: 100%; } -/* Footer (need to accordianise and do same with top but hidden by a toggle?) */ - +/* Footer */ #footer-navigation { font-size: 100%; } diff --git a/skin.json b/skin.json index fba75b9..18b1bad 100644 --- a/skin.json +++ b/skin.json @@ -49,7 +49,7 @@ }, "skins.greystuff.mobile": { "styles": { - "resources/mobile.js.css": { + "resources/mobile.js.less": { "media": "(max-width: 760px)" } }, -- To view, visit https://gerrit.wikimedia.org/r/240004 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I08239eabc8a6341463cca3eef92245610cfed5d1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/GreyStuff Gerrit-Branch: master Gerrit-Owner: Isarra ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] tools: Don't explicitly install git - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: tools: Don't explicitly install git .. tools: Don't explicitly install git Is installed by standard-packages Change-Id: I694f8288365b4d086a6deba0da82ad041ffa1231 --- M modules/toollabs/manifests/exec_environ.pp 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/modules/toollabs/manifests/exec_environ.pp b/modules/toollabs/manifests/exec_environ.pp index c12305d..e03c80c 100644 --- a/modules/toollabs/manifests/exec_environ.pp +++ b/modules/toollabs/manifests/exec_environ.pp @@ -246,7 +246,6 @@ 'fabric', # T56135. 'gawk',# T67974. 'gdal-bin', -'git', 'git-review', # T64871. 'git-svn', 'gnuplot-nox', -- To view, visit https://gerrit.wikimedia.org/r/240002 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I694f8288365b4d086a6deba0da82ad041ffa1231 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yuvipanda Gerrit-Reviewer: Dzahn Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Begin ortiz and dwell-time computations - change (wikimedia...ortiz)
OliverKeyes has uploaded a new change for review. https://gerrit.wikimedia.org/r/240003 Change subject: Begin ortiz and dwell-time computations .. Begin ortiz and dwell-time computations Starts work on 'ortiz', a package of functions for speedily generating values for particular user satisfaction metrics. Includes the guts of a dwell-threshold function. Bug: T113297 Change-Id: I0f9bd051c5affd2daa9f77fe562683cbcb022a69 --- A .Rbuildignore A .gitignore A .gitreview A DESCRIPTION A LICENSE A NAMESPACE A R/RcppExports.R A R/ortiz.R A man/ortiz.Rd A ortiz.Rproj A src/.gitignore A src/RcppExports.cpp A src/dwell.cpp A src/dwell.h A src/ortiz.cpp 15 files changed, 181 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/ortiz refs/changes/03/240003/1 diff --git a/.Rbuildignore b/.Rbuildignore new file mode 100644 index 000..fdb7e2b --- /dev/null +++ b/.Rbuildignore @@ -0,0 +1,6 @@ +^.*\.Rproj$ +^\.Rproj\.user$ +^Makefile$ +^README.Rmd$ +^.travis.yml$ +^appveyor.yml$ diff --git a/.gitignore b/.gitignore new file mode 100644 index 000..0a74739 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +.Rproj.user +.Rhistory +.RData +src/*.o +src/*.so +src/*.dll diff --git a/.gitreview b/.gitreview new file mode 100644 index 000..32a6f67 --- /dev/null +++ b/.gitreview @@ -0,0 +1,6 @@ +[gerrit] +host=gerrit.wikimedia.org +port=29418 +project=wikimedia/discovery/ortiz.git +defaultbranch=master +defaultrebase=0 diff --git a/DESCRIPTION b/DESCRIPTION new file mode 100644 index 000..dd4319b --- /dev/null +++ b/DESCRIPTION @@ -0,0 +1,12 @@ +Package: ortiz +Title: Speedy User Satisfaction Computations +Version: 0.0.1 +Author: Oliver Keyes +Maintainer: Oliver Keyes +Description: Speedily computes various user satisfaction-related metrics for Search. +License: MIT + file LICENSE +LazyData: true +URL: https://gerrit.wikimedia.org/r/#/admin/projects/wikimedia/discovery/ortiz +BugReports: https://phabricator.wikimedia.org/maniphest/task/create/?projects=Discovery +LinkingTo: Rcpp +Imports: Rcpp diff --git a/LICENSE b/LICENSE new file mode 100644 index 000..171cf7c --- /dev/null +++ b/LICENSE @@ -0,0 +1,2 @@ +YEAR: +COPYRIGHT HOLDER: Oliver Keyes diff --git a/NAMESPACE b/NAMESPACE new file mode 100644 index 000..184004d --- /dev/null +++ b/NAMESPACE @@ -0,0 +1,4 @@ +# Generated by roxygen2 (4.1.1): do not edit by hand + +importFrom(Rcpp,sourceCpp) +useDynLib(ortiz) diff --git a/R/RcppExports.R b/R/RcppExports.R new file mode 100644 index 000..d6e42b5 --- /dev/null +++ b/R/RcppExports.R @@ -0,0 +1,7 @@ +# This file was generated by Rcpp::compileAttributes +# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 + +dwell_time_ <- function(timestamps, dwell_value) { +.Call('ortiz_dwell_time_', PACKAGE = 'ortiz', timestamps, dwell_value) +} + diff --git a/R/ortiz.R b/R/ortiz.R new file mode 100644 index 000..38696be --- /dev/null +++ b/R/ortiz.R @@ -0,0 +1,10 @@ + +#' @title Speedy User Satisfaction Computations +#' +#' @description Speedily computes various user satisfaction-related metrics for Search. +#' +#' @docType package +#' @name ortiz +#' @useDynLib ortiz +#' @importFrom Rcpp sourceCpp +NULL diff --git a/man/ortiz.Rd b/man/ortiz.Rd new file mode 100644 index 000..87868cf --- /dev/null +++ b/man/ortiz.Rd @@ -0,0 +1,11 @@ +% Generated by roxygen2 (4.1.1): do not edit by hand +% Please edit documentation in R/ortiz.R +\docType{package} +\name{ortiz} +\alias{ortiz} +\alias{ortiz-package} +\title{Speedy User Satisfaction Computations} +\description{ +Speedily computes various user satisfaction-related metrics for Search. +} + diff --git a/ortiz.Rproj b/ortiz.Rproj new file mode 100644 index 000..4d263d7 --- /dev/null +++ b/ortiz.Rproj @@ -0,0 +1,20 @@ +Version: 1.0 + +RestoreWorkspace: Default +SaveWorkspace: Default +AlwaysSaveHistory: Default + +EnableCodeIndexing: Yes +UseSpacesForTab: Yes +NumSpacesForTab: 2 +Encoding: UTF-8 + +RnwWeave: Sweave +LaTeX: pdfLaTeX + +AutoAppendNewline: Yes + +BuildType: Package +PackageUseDevtools: Yes +PackageInstallArgs: --no-multiarch --with-keep.source +PackageRoxygenize: rd,collate,namespace,vignette diff --git a/src/.gitignore b/src/.gitignore new file mode 100644 index 000..22034c4 --- /dev/null +++ b/src/.gitignore @@ -0,0 +1,3 @@ +*.o +*.so +*.dll diff --git a/src/RcppExports.cpp b/src/RcppExports.cpp new file mode 100644 index 000..f349fed --- /dev/null +++ b/src/RcppExports.cpp @@ -0,0 +1,19 @@ +// This file was generated by Rcpp::compileAttributes +// Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 + +#include + +using namespace Rcpp; + +// dwell_time_ +std::vector < bool > dwell_time_(std::list < std::vector < int > > timestamps, int dwell_value); +RcppExport SEXP ortiz_dwell_time_(SEXP timestampsSEXP, SEXP dwell_valueSEXP) { +BEGIN_RCPP +Rcpp::RObject __result; +Rcpp::RNGScope __rngScope; +Rcpp::tr
[MediaWiki-commits] [Gerrit] tools: Don't explicitly install git - change (operations/puppet)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/240002 Change subject: tools: Don't explicitly install git .. tools: Don't explicitly install git Is installed by standard-packages Change-Id: I694f8288365b4d086a6deba0da82ad041ffa1231 --- M modules/toollabs/manifests/exec_environ.pp 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/02/240002/1 diff --git a/modules/toollabs/manifests/exec_environ.pp b/modules/toollabs/manifests/exec_environ.pp index c12305d..e03c80c 100644 --- a/modules/toollabs/manifests/exec_environ.pp +++ b/modules/toollabs/manifests/exec_environ.pp @@ -246,7 +246,6 @@ 'fabric', # T56135. 'gawk',# T67974. 'gdal-bin', -'git', 'git-review', # T64871. 'git-svn', 'gnuplot-nox', -- To view, visit https://gerrit.wikimedia.org/r/240002 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I694f8288365b4d086a6deba0da82ad041ffa1231 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yuvipanda ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make gerrit offer newer key exchange algorithms for new sshs - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: Make gerrit offer newer key exchange algorithms for new sshs .. Make gerrit offer newer key exchange algorithms for new sshs OpenSSH 7 onwards has gerrit's default key exchange algorithm deprecated. Hence, people with a recent OpenSSH can no longer push to gerrit over ssh without adapting the ssh configs. This is on the one hand annoying, on the other, we really should offer recent secure algorithms. Hence, we make gerrit use BounceCastle, which (even for our old gerrit) offers key exchange algorithms that OpenSSH >=7 still accepts. Bug: T112025 Change-Id: I48b9385cbf67f64c4299a41005bc8ca094cfc96f --- M modules/gerrit/manifests/jetty.pp 1 file changed, 27 insertions(+), 1 deletion(-) Approvals: Paladox: Looks good to me, but someone else must approve QChris: Looks good to me, but someone else must approve JanZerebecki: Looks good to me, but someone else must approve jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/modules/gerrit/manifests/jetty.pp b/modules/gerrit/manifests/jetty.pp index 84231c3..0d20f91 100644 --- a/modules/gerrit/manifests/jetty.pp +++ b/modules/gerrit/manifests/jetty.pp @@ -196,6 +196,16 @@ require => Exec['install_gerrit_jetty'], } +file { '/var/lib/gerrit2/review_site/lib': +ensure => directory, +owner => 'gerrit2', +group => 'gerrit2', +mode=> '0755', +require => [Exec['install_gerrit_jetty'], +File['/var/lib/gerrit2/review_site'] +], +} + git::clone { 'operations/gerrit/plugins': ensure=> latest, directory => '/var/lib/gerrit2/review_site/plugins', @@ -204,6 +214,20 @@ owner => 'gerrit2', group => 'gerrit2', require => File['/var/lib/gerrit2/review_site'], +} + +# This file is tuned for gerrit-2.8.1-4-ga1048ce. If you update gerrit, +# you also need to update this jar to match the BouncyCastle version +# required by the fresh gerrit. +file { '/var/lib/gerrit2/review_site/lib/bcprov-jdk16-144.jar': +ensure => link, +owner => 'gerrit2', +group => 'gerrit2', +mode=> '0444', +target => '/var/lib/gerrit2/review_site/plugins/bouncycastle/bcprov-1.44-from-Debian-wheezy.jar', +require => [Git::Clone['operations/gerrit/plugins'], +File['/var/lib/gerrit2/review_site/lib'] +], } exec { 'install_gerrit_jetty': @@ -225,7 +249,9 @@ enable=> true, hasstatus => false, status=> '/etc/init.d/gerrit check', -require => Exec['install_gerrit_jetty'], +require => [Exec['install_gerrit_jetty'], + File['/var/lib/gerrit2/review_site/lib/bcprov-jdk16-144.jar'] +], } nrpe::monitor_service { 'gerrit': -- To view, visit https://gerrit.wikimedia.org/r/237753 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I48b9385cbf67f64c4299a41005bc8ca094cfc96f Gerrit-PatchSet: 4 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: QChris Gerrit-Reviewer: Alex Monk Gerrit-Reviewer: Chad Gerrit-Reviewer: Dzahn Gerrit-Reviewer: JanZerebecki Gerrit-Reviewer: Jcrespo Gerrit-Reviewer: Paladox Gerrit-Reviewer: QChris Gerrit-Reviewer: Yuvipanda Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update grunt-jscs to 2.1.0 - change (mediawiki...MsUpload)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/240001 Change subject: Update grunt-jscs to 2.1.0 .. Update grunt-jscs to 2.1.0 Change-Id: I019aa4e02f6cc578f679f3401f25fb7784b91557 --- M package.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MsUpload refs/changes/01/240001/1 diff --git a/package.json b/package.json index 93beca9..064530e 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "grunt-cli": "0.1.13", "grunt-contrib-jshint": "0.11.2", "grunt-banana-checker": "0.2.2", -"grunt-jscs": "1.8.0", +"grunt-jscs": "2.1.0", "grunt-jsonlint": "1.0.4" } } -- To view, visit https://gerrit.wikimedia.org/r/240001 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I019aa4e02f6cc578f679f3401f25fb7784b91557 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MsUpload Gerrit-Branch: master Gerrit-Owner: Paladox ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Ensure gerrit's plugins are kept in sync with plugin repo - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: Ensure gerrit's plugins are kept in sync with plugin repo .. Ensure gerrit's plugins are kept in sync with plugin repo It seems at some point in the past Gerrit's plugin repo went out of sync with what is really deployed in Gerrit. This makes it unnecessarily hard to recover in case the machine dies. To improve on that, we make sure that the clone is current, so we at least notice if we're running out of sync with the plugin repo. Change-Id: Icb0e5997fc70bb2bfbc1ffa90bf460e84af4dbff --- M modules/gerrit/manifests/jetty.pp 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Paladox: Looks good to me, but someone else must approve QChris: Looks good to me, but someone else must approve JanZerebecki: Looks good to me, but someone else must approve jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/modules/gerrit/manifests/jetty.pp b/modules/gerrit/manifests/jetty.pp index 6ccdbf9..84231c3 100644 --- a/modules/gerrit/manifests/jetty.pp +++ b/modules/gerrit/manifests/jetty.pp @@ -197,6 +197,7 @@ } git::clone { 'operations/gerrit/plugins': +ensure=> latest, directory => '/var/lib/gerrit2/review_site/plugins', branch=> 'master', origin=> 'https://gerrit.wikimedia.org/r/p/operations/gerrit/plugins.git', -- To view, visit https://gerrit.wikimedia.org/r/238976 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icb0e5997fc70bb2bfbc1ffa90bf460e84af4dbff Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: QChris Gerrit-Reviewer: Dzahn Gerrit-Reviewer: JanZerebecki Gerrit-Reviewer: Paladox Gerrit-Reviewer: QChris Gerrit-Reviewer: Yuvipanda 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 tests to make sure production ssh keys are not in labs - change (operations/puppet)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/24 Change subject: Add tests to make sure production ssh keys are not in labs .. Add tests to make sure production ssh keys are not in labs Change-Id: Ia979a4a9236ce3e54a907a7e5f2ca574f85fe090 --- M modules/admin/data/data_test.py M modules/admin/data/requirements.txt 2 files changed, 36 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/00/24/1 diff --git a/modules/admin/data/data_test.py b/modules/admin/data/data_test.py index 9e2744d..176691e 100644 --- a/modules/admin/data/data_test.py +++ b/modules/admin/data/data_test.py @@ -1,13 +1,20 @@ #!/usr/bin/env python # 2014 Chase Pettet +# 2015 Alex Monk # Tests to perform basic validation on data.yaml from collections import Counter import itertools +import ldap import os +import sys import unittest import yaml + +sys.path.append('../../ldap/files/scripts') + +import ldapsupportlib class DataTest(unittest.TestCase): @@ -25,11 +32,14 @@ ) return list(set(self.flatten(nested_users_list))) -def testDataDotYaml(self): - +def open_data(self): with open(os.path.join(os.path.dirname(__file__), 'data.yaml')) as f: admins = yaml.safe_load(f) +return admins + +def testDataDotYaml(self): +admins = self.open_data() all_users = list(admins['users']) grouped_users = self.all_assigned_users(admins) @@ -47,5 +57,28 @@ dupes = [k for k, v in Counter(gids).items() if v > 1] self.assertEqual([], dupes, 'Duplicate group GIDs') +def testLabsSshKeys(self): +# Make sure no users have the same ssh key in labs and production + +ldapSupportLib = ldapsupportlib.LDAPSupportLib() +ds = ldapSupportLib.connect() +base = "ou=people," + ldapSupportLib.getBase() + +keys = set() +for entry in ds.search_s(base, ldap.SCOPE_SUBTREE, "(objectclass=inetOrgPerson)"): +for k, v in entry[1].items(): +if k == "sshPublicKey": +for v2 in v: +key = ' '.join(v2.split(' ')[:2]) +keys.update([key]) + +prodData = self.open_data() +for userName, userData in prodData['users'].items(): +badKeys = list(set(userData['ssh_keys']).intersection(keys)) +if len(badKeys) > 0: +print('%s: %s' % (userName, userData)) +self.assertEqual(badKeys, 0) +ds.unbind() + if __name__ == '__main__': unittest.main() diff --git a/modules/admin/data/requirements.txt b/modules/admin/data/requirements.txt index 5500f00..0ae4b4e 100644 --- a/modules/admin/data/requirements.txt +++ b/modules/admin/data/requirements.txt @@ -1 +1,2 @@ PyYAML +python-ldap -- To view, visit https://gerrit.wikimedia.org/r/24 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia979a4a9236ce3e54a907a7e5f2ca574f85fe090 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Legoktm ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Replace Package['git-core'] with Package['git'] - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: Replace Package['git-core'] with Package['git'] .. Replace Package['git-core'] with Package['git'] The package has been renamed upstream. The last Wikimedia release that did not have the package renamed was lucid and now that is gone so we can proceed with the rename. Change-Id: If812909df17eacc24f1e9bb67d93e5903b32b80d --- M modules/authdns/manifests/account.pp M modules/authdns/manifests/scripts.pp M modules/base/manifests/standard-packages.pp M modules/beta/manifests/autoupdater.pp M modules/deployment/files/states/deploy/sync_all.sls M modules/deployment/manifests/deployment_server.pp M modules/git/manifests/clone.pp M modules/labs_bootstrapvz/files/labs-jessie.manifest.yaml M modules/labs_vmbuilder/templates/vmbuilder.cfg.erb M modules/phabricator/manifests/vcs.pp 10 files changed, 17 insertions(+), 17 deletions(-) Approvals: Hashar: Looks good to me, but someone else must approve BBlack: Looks good to me, but someone else must approve jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/modules/authdns/manifests/account.pp b/modules/authdns/manifests/account.pp index 31ddbe4..f132042 100644 --- a/modules/authdns/manifests/account.pp +++ b/modules/authdns/manifests/account.pp @@ -13,7 +13,7 @@ system => true, managehome => true, shell => '/usr/bin/git-shell', -require=> Package['git-core'], +require=> Package['git'], } group { $group: ensure => 'present', diff --git a/modules/authdns/manifests/scripts.pp b/modules/authdns/manifests/scripts.pp index 4b281c4..a5cdd45 100644 --- a/modules/authdns/manifests/scripts.pp +++ b/modules/authdns/manifests/scripts.pp @@ -10,8 +10,8 @@ } # Can clash with base::standard-packages class -if ! defined(Package['git-core']){ -package { 'git-core': +if ! defined(Package['git']){ +package { 'git': ensure => present, } } diff --git a/modules/base/manifests/standard-packages.pp b/modules/base/manifests/standard-packages.pp index af7710e..5cc589e 100644 --- a/modules/base/manifests/standard-packages.pp +++ b/modules/base/manifests/standard-packages.pp @@ -48,8 +48,8 @@ } # Can clash with authdns::scripts class -if ! defined(Package['git-core']){ -package { 'git-core': +if ! defined(Package['git']){ +package { 'git': ensure => latest, } } diff --git a/modules/beta/manifests/autoupdater.pp b/modules/beta/manifests/autoupdater.pp index 9990b7c..7b2e798 100644 --- a/modules/beta/manifests/autoupdater.pp +++ b/modules/beta/manifests/autoupdater.pp @@ -18,7 +18,7 @@ owner => 'root', group => 'root', mode=> '0555', -require => Package['git-core'], +require => Package['git'], content => template('beta/wmf-beta-autoupdate.py.erb'), } @@ -26,7 +26,7 @@ owner => 'root', group => 'root', mode=> '0555', -require => Package['git-core'], +require => Package['git'], content => template('beta/wmf-beta-mwconfig-update.erb'), } diff --git a/modules/deployment/files/states/deploy/sync_all.sls b/modules/deployment/files/states/deploy/sync_all.sls index 0f3539b..075a8b7 100644 --- a/modules/deployment/files/states/deploy/sync_all.sls +++ b/modules/deployment/files/states/deploy/sync_all.sls @@ -1,4 +1,4 @@ -git-core: +git: pkg.installed python-redis: @@ -9,10 +9,10 @@ #module.run: # - name: deploy.sync_all # - require: - #- pkg: git-core + #- pkg: git #- pkg: python-redis cmd.run: - name: salt-call --return=deploy_redis deploy.sync_all - require: - - pkg: git-core + - pkg: git - pkg: python-redis diff --git a/modules/deployment/manifests/deployment_server.pp b/modules/deployment/manifests/deployment_server.pp index 25a659a..919712a 100644 --- a/modules/deployment/manifests/deployment_server.pp +++ b/modules/deployment/manifests/deployment_server.pp @@ -22,7 +22,7 @@ mode=> '0444', owner => 'root', group => 'root', -require => Package['git-core'], +require => Package['git'], } file { '/usr/local/bin/git-new-workdir': @@ -30,7 +30,7 @@ mode=> '0555', owner => 'root', group => 'root', -require => Package['git-core'], +require => Package['git'], } file { '/srv/patches': diff --git a/modules/git/manifests/clone.pp b/modules/git/manifests/clone.pp index a6703b7..3c282d3 100644 --- a/modules/git/manifests/clone.pp +++ b/modules/git/manifests/clone.pp @@ -143,7 +143,7 @@ group => $group, umask => $git_umask, timeout => $timeout, -
[MediaWiki-commits] [Gerrit] Fix esams IPv6 space's geolocation - change (operations/dns)
Faidon Liambotis has submitted this change and it was merged. Change subject: Fix esams IPv6 space's geolocation .. Fix esams IPv6 space's geolocation 2620:0:862::/48 should be "esams, eqiad, codfw", not "esams, eqiad", similar to its IPv4 counterpart. Change-Id: I468bdd31aef27e90f88d892f98a2d57bf6a22783 --- M config-geo 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Faidon Liambotis: Looks good to me, approved jenkins-bot: Verified diff --git a/config-geo b/config-geo index a4e263e..8209268 100644 --- a/config-geo +++ b/config-geo @@ -200,7 +200,7 @@ 198.35.26.0/23=> [ulsfo, eqiad, codfw], # ulsfo 2620:0:860::/48 => [ codfw, eqiad], # codfw 2620:0:861::/48 => [ eqiad, codfw], # eqiad -2620:0:862::/48 => [ esams, eqiad], # esams +2620:0:862::/48 => [esams, eqiad, codfw], # esams 2620:0:863::/48 => [ulsfo, eqiad, codfw], # ulsfo 198.73.209.0/24 => [ulsfo, eqiad, codfw], # WMF OIT 2620:62:c000::/48 => [ulsfo, eqiad, codfw], # WMF OIT -- To view, visit https://gerrit.wikimedia.org/r/23 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I468bdd31aef27e90f88d892f98a2d57bf6a22783 Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: Faidon Liambotis Gerrit-Reviewer: Faidon Liambotis 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 esams IPv6 space's geolocation - change (operations/dns)
Faidon Liambotis has uploaded a new change for review. https://gerrit.wikimedia.org/r/23 Change subject: Fix esams IPv6 space's geolocation .. Fix esams IPv6 space's geolocation 2620:0:862::/48 should be "esams, eqiad, codfw", not "esams, eqiad", similar to its IPv4 counterpart. Change-Id: I468bdd31aef27e90f88d892f98a2d57bf6a22783 --- M config-geo 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dns refs/changes/99/23/1 diff --git a/config-geo b/config-geo index a4e263e..8209268 100644 --- a/config-geo +++ b/config-geo @@ -200,7 +200,7 @@ 198.35.26.0/23=> [ulsfo, eqiad, codfw], # ulsfo 2620:0:860::/48 => [ codfw, eqiad], # codfw 2620:0:861::/48 => [ eqiad, codfw], # eqiad -2620:0:862::/48 => [ esams, eqiad], # esams +2620:0:862::/48 => [esams, eqiad, codfw], # esams 2620:0:863::/48 => [ulsfo, eqiad, codfw], # ulsfo 198.73.209.0/24 => [ulsfo, eqiad, codfw], # WMF OIT 2620:62:c000::/48 => [ulsfo, eqiad, codfw], # WMF OIT -- To view, visit https://gerrit.wikimedia.org/r/23 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I468bdd31aef27e90f88d892f98a2d57bf6a22783 Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: Faidon Liambotis ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Switch Russia's esams backup from ulsfo to eqiad - change (operations/dns)
Faidon Liambotis has submitted this change and it was merged. Change subject: Switch Russia's esams backup from ulsfo to eqiad .. Switch Russia's esams backup from ulsfo to eqiad Extensive testing with a number of different IPs and different Russian ISPs revealed that the vast majority of the traffic passes via Europe, even for the farther ends of Russia like Vladivostok. Even after engineering the traffic to pass through very specific ISPs that we know that own submarine cables to Asia (namely: Rostelecom) and succeeding into passing traffic via Tokyo, we were not able to see a substantial improvement over eqiad and still a disadvantage over esams. If we factor in the differences in population density and internet populations across Russia, it's clear that shifting traffic from esams to ulsfo rather than eqiad would actually harm performance in times of esams maintenances. It's thus clear at this point that even a regional split of Russia with different GeoDNS per their subdivisions wouldn't help. Therefore, set Russia to the standard triplet esams,eqiad,codfw like the rest of Europe. Change-Id: Ibc588eb3313d4e41091e6f35f72a4f69a54c9b2d --- M config-geo 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Faidon Liambotis: Looks good to me, approved BBlack: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/config-geo b/config-geo index 9f56f1d..a4e263e 100644 --- a/config-geo +++ b/config-geo @@ -107,7 +107,7 @@ PT => [esams, eqiad, codfw], # Portugal RO => [esams, eqiad, codfw], # Romania RS => [esams, eqiad, codfw], # Serbia -RU => [esams, ulsfo, codfw], # Russian Federation +RU => [esams, eqiad, codfw], # Russian Federation SE => [esams, eqiad, codfw], # Sweden SI => [esams, eqiad, codfw], # Slovenia SJ => [esams, eqiad, codfw], # Svalbard and Jan Mayen Islands -- To view, visit https://gerrit.wikimedia.org/r/239996 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibc588eb3313d4e41091e6f35f72a4f69a54c9b2d Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: Faidon Liambotis Gerrit-Reviewer: BBlack Gerrit-Reviewer: Faidon Liambotis Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update mod_status configuration - change (operations/puppet)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/239998 Change subject: Update mod_status configuration .. Update mod_status configuration The default mod_status configuration enables /server-status on all vhosts for local requests, but it does not correctly distinguish between requests which are truly local and requests that have been proxied. So replace the default config with a more conservative one, which listens only on the loopback interface to truly local requests. Change-Id: Ia095457fbb51677f7ba6577bec7267740620e11b --- A modules/apache/files/status.conf M modules/apache/manifests/monitoring.pp 2 files changed, 36 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/98/239998/1 diff --git a/modules/apache/files/status.conf b/modules/apache/files/status.conf new file mode 100644 index 000..a0f45cb --- /dev/null +++ b/modules/apache/files/status.conf @@ -0,0 +1,26 @@ +# Only serve /server-status on loopback interface to local requests. + + + + ServerName localhost + ServerAlias 127.0.0.1 + + +SetHandler server-status +AllowOverride None + += 2.4> + Require local + + + + Order deny,allow + Deny from all + Allow from 127.0.0.1 localhost ::1 + + + + + + +# vim: syntax=apache ts=4 sw=4 sts=4 sr noet diff --git a/modules/apache/manifests/monitoring.pp b/modules/apache/manifests/monitoring.pp index ce7f5e9..8945795 100644 --- a/modules/apache/manifests/monitoring.pp +++ b/modules/apache/manifests/monitoring.pp @@ -9,6 +9,16 @@ include ::apache::mod::status include ::ganglia +# The default mod_status configuration enables /server-status on all +# vhosts for local requests, but it does not correctly distinguish +# between requests which are truly local and requests that have been +# proxied. So replace the default config with a more conservative one. +apache::conf { 'server_status': +source => 'puppet:///modules/apache/status.conf', +replaces => '/etc/apache2/mods-enabled/status.conf', +require => Apache::Mod_conf['status'], +} + # Use `links -dump http://127.0.0.1/server-status` to generate # an Apache status report. require_package('links') -- To view, visit https://gerrit.wikimedia.org/r/239998 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia095457fbb51677f7ba6577bec7267740620e11b Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ori.livneh ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove support for Ubuntu Lucid/10.04 - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: Remove support for Ubuntu Lucid/10.04 .. Remove support for Ubuntu Lucid/10.04 Change-Id: I49b16d717559c8126e2517bb5131dc0ae88e27bd --- M manifests/role/labs.pp M modules/base/files/puppet/puppet-run M modules/base/manifests/puppet.pp M modules/coredb_mysql/manifests/packages.pp M modules/diamond/manifests/init.pp M modules/ganglia/templates/gmond.conf.erb M modules/install_server/files/autoinstall/partman/ms-be-eqiad-hp.cfg M modules/install_server/files/autoinstall/partman/ms-be-eqiad.cfg M modules/install_server/files/autoinstall/partman/ms-be-esams.cfg M modules/install_server/files/autoinstall/partman/virt-raid10-cisco.cfg M modules/install_server/files/reprepro/distributions M modules/mailman/manifests/listserve.pp M modules/memcached/manifests/ganglia.pp M modules/mysql_wmf/manifests/packages.pp M modules/ssh/templates/sshd_config.erb M modules/sslcert/manifests/certificate.pp M modules/trebuchet/manifests/packages.pp 17 files changed, 10 insertions(+), 79 deletions(-) Approvals: Muehlenhoff: Looks good to me, but someone else must approve BBlack: Looks good to me, but someone else must approve jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/manifests/role/labs.pp b/manifests/role/labs.pp index d528e70..43a5287 100644 --- a/manifests/role/labs.pp +++ b/manifests/role/labs.pp @@ -3,10 +3,7 @@ include standard include base::labs include sudo - -if os_version('ubuntu > lucid') { -include base::instance-upstarts -} +include base::instance-upstarts sudo::group { 'ops': privileges => ['ALL=(ALL) NOPASSWD: ALL'], diff --git a/modules/base/files/puppet/puppet-run b/modules/base/files/puppet/puppet-run index 07dcd88..30eb617 100644 --- a/modules/base/files/puppet/puppet-run +++ b/modules/base/files/puppet/puppet-run @@ -1,11 +1,5 @@ #!/bin/bash -# older versions of timeout (before coreutils) didn't support -k -# remove the coditional after the last lucid host goes -if timeout -k 10 10 true >/dev/null 2>&1; then - KILL_TIMEOUT="-k 60" -fi - set -e # We pass show-diff, show the log may be sensitive, @@ -31,9 +25,9 @@ echo Ignoring stale puppet agent lock for pid `cat $PUPPETLOCK` >>/var/log/puppet.log fi -timeout $KILL_TIMEOUT 300 apt-get update -qq >> /var/log/puppet.log 2>&1 +timeout -k 60 300 apt-get update -qq >> /var/log/puppet.log 2>&1 -timeout $KILL_TIMEOUT 1800 puppet agent \ +timeout -k 60 1800 puppet agent \ --onetime \ --no-daemonize \ --verbose \ diff --git a/modules/base/manifests/puppet.pp b/modules/base/manifests/puppet.pp index 9889f69..6193c7c 100644 --- a/modules/base/manifests/puppet.pp +++ b/modules/base/manifests/puppet.pp @@ -64,14 +64,6 @@ enable => false, } -if os_version('ubuntu <= lucid') { -# folded into coreutils in newer distros -package {'timeout': -ensure => present, -before => File['/usr/local/sbin/puppet-run'], -} -} - file { '/usr/local/sbin/puppet-run': mode=> '0555', owner => 'root', diff --git a/modules/coredb_mysql/manifests/packages.pp b/modules/coredb_mysql/manifests/packages.pp index 9732b90..08bc79e 100644 --- a/modules/coredb_mysql/manifests/packages.pp +++ b/modules/coredb_mysql/manifests/packages.pp @@ -1,6 +1,6 @@ # coredb_mysql required packages class coredb_mysql::packages { -if $::lsbdistid == 'Ubuntu' and versioncmp($::lsbdistrelease, '12.04') >= 0 { +if $::lsbdistid == 'Ubuntu' { apt::repository { 'wikimedia-mariadb': uri=> 'http://apt.wikimedia.org/wikimedia', dist => 'precise-wikimedia', diff --git a/modules/diamond/manifests/init.pp b/modules/diamond/manifests/init.pp index 01a6c42..a873846 100644 --- a/modules/diamond/manifests/init.pp +++ b/modules/diamond/manifests/init.pp @@ -63,9 +63,7 @@ port => '8125', }, ) { -if os_version('debian >= jessie || ubuntu >= precise') { -require_package('python-statsd') -} +require_package('python-statsd') package { [ 'python-diamond', 'python-configobj' ]: ensure => present, diff --git a/modules/ganglia/templates/gmond.conf.erb b/modules/ganglia/templates/gmond.conf.erb index a2f6e7c..176bbea 100644 --- a/modules/ganglia/templates/gmond.conf.erb +++ b/modules/ganglia/templates/gmond.conf.erb @@ -57,11 +57,9 @@ } <% end -%> } -<% if scope.function_os_version(['debian >= jessie || ubuntu >= precise']) %> /* Increase the buffer size. With the default setting (224KB), Tim observed ~30% packet loss on a cluster with 12 hosts and ~300 metrics per host. */ buffer = 4194304 -<% end -%> } /* You can specify as many tcp_accept_channels as you like to share diff --git a/modules/install_server/files/autoinstall/partman/ms-be-eqiad-hp.cfg b/m
[MediaWiki-commits] [Gerrit] Set getFeatures() for MemoryFileBackend - change (mediawiki/core)
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/239997 Change subject: Set getFeatures() for MemoryFileBackend .. Set getFeatures() for MemoryFileBackend Change-Id: I565e2e2c8a4a89c6706349a4ef9826f87445d1d2 --- M includes/filebackend/MemoryFileBackend.php 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/97/239997/1 diff --git a/includes/filebackend/MemoryFileBackend.php b/includes/filebackend/MemoryFileBackend.php index ba2cf23..2879ddd 100644 --- a/includes/filebackend/MemoryFileBackend.php +++ b/includes/filebackend/MemoryFileBackend.php @@ -35,6 +35,10 @@ /** @var array Map of (file path => (data,mtime) */ protected $files = array(); + public function getFeatures() { + return self::ATTR_UNICODE_PATHS; + } + public function isPathUsableInternal( $storagePath ) { return true; } -- To view, visit https://gerrit.wikimedia.org/r/239997 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I565e2e2c8a4a89c6706349a4ef9826f87445d1d2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Switch Russia's esams backup from ulsfo to eqiad - change (operations/dns)
Faidon Liambotis has uploaded a new change for review. https://gerrit.wikimedia.org/r/239996 Change subject: Switch Russia's esams backup from ulsfo to eqiad .. Switch Russia's esams backup from ulsfo to eqiad Extensive testing with a number of different IPs and different Russian ISPs revealed that the vast majority of the traffic passes via Europe, even for the farther ends of Russia like Vladivostok. Even after engineering the traffic to pass through very specific ISPs that we know that own submarine cables to Asia (namely: Rostelecom) and succeeding into passing traffic via Tokyo, we were not able to see a substantial improvement over eqiad and still a disadvantage over esams. If we factor in the differences in population density and internet populations across Russia, it's clear that shifting traffic from esams to ulsfo rather than eqiad would actually harm performance in times of esams maintenances. It's thus clear at this point that even a regional split of Russia with different GeoDNS per their subdivisions wouldn't help. Therefore, set Russia to the standard triplet esams,eqiad,codfw like the rest of Europe. Change-Id: Ibc588eb3313d4e41091e6f35f72a4f69a54c9b2d --- M config-geo 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dns refs/changes/96/239996/1 diff --git a/config-geo b/config-geo index 9f56f1d..a4e263e 100644 --- a/config-geo +++ b/config-geo @@ -107,7 +107,7 @@ PT => [esams, eqiad, codfw], # Portugal RO => [esams, eqiad, codfw], # Romania RS => [esams, eqiad, codfw], # Serbia -RU => [esams, ulsfo, codfw], # Russian Federation +RU => [esams, eqiad, codfw], # Russian Federation SE => [esams, eqiad, codfw], # Sweden SI => [esams, eqiad, codfw], # Slovenia SJ => [esams, eqiad, codfw], # Svalbard and Jan Mayen Islands -- To view, visit https://gerrit.wikimedia.org/r/239996 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibc588eb3313d4e41091e6f35f72a4f69a54c9b2d Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: Faidon Liambotis ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Handle changes to `vagrant::config` order - change (mediawiki/vagrant)
Dduvall has uploaded a new change for review. https://gerrit.wikimedia.org/r/239995 Change subject: Handle changes to `vagrant::config` order .. Handle changes to `vagrant::config` order Utilize the `match` parameter of `file_line` to remove lines that were written using the previous priority. Change-Id: Ic8c6411e97f54819967025200d4d1c44f18c12b3 --- M puppet/modules/varnish/manifests/config.pp 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/95/239995/1 diff --git a/puppet/modules/varnish/manifests/config.pp b/puppet/modules/varnish/manifests/config.pp index af23436..d0dc387 100644 --- a/puppet/modules/varnish/manifests/config.pp +++ b/puppet/modules/varnish/manifests/config.pp @@ -41,6 +41,7 @@ file_line { "${::varnish::conf}:${title}": line=> "include \"${path}\";", path=> $::varnish::conf, +match => "${::varnish::confd}/[0-9]+-${title}.vcl", require => File[$path], notify => Exec['varnish_sort_confd'], } -- To view, visit https://gerrit.wikimedia.org/r/239995 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic8c6411e97f54819967025200d4d1c44f18c12b3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: Dduvall ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Increase Varnish's `shm_reclen` from 1024 to 2048 - change (operations/puppet)
BBlack has submitted this change and it was merged. Change subject: Increase Varnish's `shm_reclen` from 1024 to 2048 .. Increase Varnish's `shm_reclen` from 1024 to 2048 The 1024 byte limit is a tad too short for some EventLogging URLs. Internet Explorer up to and including version 10 limits URLs to 2083 characters, so the 2048 limit would not only be sufficient for now, but for the foreseeable future as well. This also increases shm_workspace from the default of 8192 to 16384. varnishstat on various clusters indicates we were already having to flush this fairly regularly (in some cases, up to ~4x per second), so it probably deserves an increase anyways. Because not all URLs are of (either) maximum size, doubling the workspace should more than make up for any shm flush impact from the shm_reclen increase, and flush rate should still drop after this change. Note that we should apply these parameters via varnish daemon restarts slowly across the clusters, rather than at runtime, as the timing and sanity of increasing these at runtime via varnishadm is questionable. Bug: T112002 Bug: T91347 Change-Id: I8f398936350d0e240a1b55d6a12076a2fd341935 --- M modules/varnish/templates/initscripts/varnish.systemd.erb M modules/varnish/templates/varnish-default.erb 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: BBlack: Verified; Looks good to me, approved diff --git a/modules/varnish/templates/initscripts/varnish.systemd.erb b/modules/varnish/templates/initscripts/varnish.systemd.erb index 419e12b..03573a6 100644 --- a/modules/varnish/templates/initscripts/varnish.systemd.erb +++ b/modules/varnish/templates/initscripts/varnish.systemd.erb @@ -21,7 +21,7 @@ <%= @varnish_storage -%> \ -p user=varnish -p thread_pool_add_delay=1 -p thread_pool_stack=131072 \ -p listen_depth=4096 -p session_max=20 -p vcc_err_unref=off \ --p nuke_limit=300 -p shm_reclen=1024 \ +-p nuke_limit=300 -p shm_workspace=16384 -p shm_reclen=2048 \ -p http_req_size=24576 \ <%= @runtime_params -%> \ <%= @extraopts -%> \ diff --git a/modules/varnish/templates/varnish-default.erb b/modules/varnish/templates/varnish-default.erb index fc680da..b929e3e 100644 --- a/modules/varnish/templates/varnish-default.erb +++ b/modules/varnish/templates/varnish-default.erb @@ -106,7 +106,7 @@ # -s ${VARNISH_STORAGE}" # -EXTRA_OPTS="-p user=varnish -p thread_pool_add_delay=1 -p thread_pool_stack=131072 -p listen_depth=4096 -p session_max=20 -p vcc_err_unref=off -p nuke_limit=300 -p shm_reclen=1024 <%= @runtime_params %>" +EXTRA_OPTS="-p user=varnish -p thread_pool_add_delay=1 -p thread_pool_stack=131072 -p listen_depth=4096 -p session_max=20 -p vcc_err_unref=off -p nuke_limit=300 -p shm_workspace=16384 -p shm_reclen=2048 <%= @runtime_params %>" <% if has_variable?("extraopts") then %> EXTRA_OPTS="$EXTRA_OPTS <%= @extraopts %>" <% end %> -- To view, visit https://gerrit.wikimedia.org/r/238536 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8f398936350d0e240a1b55d6a12076a2fd341935 Gerrit-PatchSet: 4 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ori.livneh Gerrit-Reviewer: BBlack Gerrit-Reviewer: Ori.livneh Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Import refund data from CSV - change (wikimedia...crm)
Ejegg has uploaded a new change for review. https://gerrit.wikimedia.org/r/239994 Change subject: Import refund data from CSV .. Import refund data from CSV New command drush import-refunds processor filename takes a CSV file with the gateway's original order ID, refund date, currency, amount, and optionally the gateway's refund ID and refund type, and marks each as refunded. Heavily modified version of old import_chargebacks. TODO: maybe try/catch on each line? Bug: T110367 Change-Id: I3cc58e7b8561a4a589091497de6ad82ea38bc11f --- A sites/all/modules/offline2civicrm/import_refunds.drush.inc 1 file changed, 120 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/94/239994/1 diff --git a/sites/all/modules/offline2civicrm/import_refunds.drush.inc b/sites/all/modules/offline2civicrm/import_refunds.drush.inc new file mode 100644 index 000..7b9d110 --- /dev/null +++ b/sites/all/modules/offline2civicrm/import_refunds.drush.inc @@ -0,0 +1,120 @@ + + */ + +/** + * Implementation of hook_drush_command() + */ +function import_refunds_drush_command() { + $items = array(); + + $items['import-refunds'] = array( + 'description' => 'Import refunds into CiviCRM from a csv', + 'examples' => array( 'drush import-refunds globalcollect filename.csv' ), + 'required-arguments' => true, + 'arguments' => array( + 'processor' => 'Name of payment processor', + 'file' => 'Name of csv file to process' + ), + ); + + return $items; +} + +/** + * Implementation of hook_drush_help() + */ +function import_refunds_drush_help( $section ) { + switch ( $section ) { + case 'drush:import-refunds': + return dt( "Import refunds into CiviCRM from a csv" ); + } +} + +function drush_import_refunds( $processor = null, $filename = null ) { + + if ( !file_exists( $filename ) ) { + watchdog( + 'offline2civicrm', + "Import refunds: File does not exist: $filename", + null, + WATCHDOG_ERROR + ); + return; + } + + $file = fopen( $filename, 'r' ); + if ( $file === false ) { + watchdog( + 'offline2civicrm', + "Import refunds: Could not open file for reading: $filename", + null, + WATCHDOG_ERROR + ); + return; + } + + try { + $headers = _load_headers( fgetcsv( $file, 0, ',' ) ); + $rowCount = 0; + civicrm_initialize(); + while ( ( $row = fgetcsv( $file, 0, ',' ) ) !== FALSE ) { + $rowCount += 1; + $orderid = _get_value( 'Order ID', $row, $headers ); + $refundid = _get_value( 'Refund ID', $row, $headers, null ); + $currency = _get_value( 'Currency', $row, $headers ); + $amount = _get_value( 'Amount', $row, $headers ); + $date = _get_value( 'Date', $row, $headers ); + $refundType = _get_value( 'Type', $row, $headers, 'refund' ); + + if ( $orderid == '' ) { + watchdog( + 'offline2civicrm', + "Invalid OrderID for refund on row $rowCount", + $row, + WATCHDOG_INFO + ); + continue; + } + + $contributions = wmf_civicrm_get_contributions_from_gateway_id( $processor, $orderid ); + if ( $contributions ) { + $contribution = array_shift( $contributions ); + } else { + watchdog( + 'offline2civicrm', + "Could not find transaction matching trxn_id: $orderid", + NULL, + WATCHDOG_ERROR + ); + continue; + } + + // execute the refund + wmf_civicrm_mark_refund( + $contribution['id'], + $refundType, + true, + $date, + $refundid, + $currency, + $amount +
[MediaWiki-commits] [Gerrit] lists: TTL up to 1H - change (operations/dns)
Dzahn has submitted this change and it was merged. Change subject: lists: TTL up to 1H .. lists: TTL up to 1H Change-Id: Ic1a02317f59e7b8a40eadf0af022dae44a216d3c --- M templates/wikimedia.org 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/templates/wikimedia.org b/templates/wikimedia.org index 1af51c8..b8acac9 100644 --- a/templates/wikimedia.org +++ b/templates/wikimedia.org @@ -61,8 +61,8 @@ dumps 1H IN CNAME dataset1001 sitemap 600 IN DYNA geoip!text-addrs -lists 5M IN A208.80.154.75 -5M IN 2620:0:861:3::2 +lists 1H IN A208.80.154.75 +1H IN 2620:0:861:3::2 1H IN MX 10 lists 1H IN TXT "v=spf1 mx ?all" -- To view, visit https://gerrit.wikimedia.org/r/239400 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic1a02317f59e7b8a40eadf0af022dae44a216d3c Gerrit-PatchSet: 2 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: John F. Lewis Gerrit-Reviewer: Dzahn Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Security improvements - change (mediawiki...QuickSurveys)
Robmoen has uploaded a new change for review. https://gerrit.wikimedia.org/r/239993 Change subject: Security improvements .. Security improvements * Parse messages used directly in HTML in ExternalSurvey.js * Truncate Country code to 2 characters per ISO_3166-1 alpha-2 Bug: T110662 Change-Id: I742221107e5becc784b2721b4df070d8cccbffe9 --- M resources/ext.quicksurveys.views/ExternalSurvey.js M resources/ext.quicksurveys.views/utils.js 2 files changed, 6 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/QuickSurveys refs/changes/93/239993/1 diff --git a/resources/ext.quicksurveys.views/ExternalSurvey.js b/resources/ext.quicksurveys.views/ExternalSurvey.js index 82ab5db..5694064 100644 --- a/resources/ext.quicksurveys.views/ExternalSurvey.js +++ b/resources/ext.quicksurveys.views/ExternalSurvey.js @@ -15,7 +15,7 @@ * @inheritdoc */ initialize: function ( config ) { - this.defaults.templateData.footer = mw.msg( config.survey.privacyPolicy ); + this.defaults.templateData.footer = mw.message( config.survey.privacyPolicy ).parse(); QuickSurvey.prototype.initialize.call( this, config ); }, /** @@ -23,9 +23,11 @@ */ renderButtons: function () { var $btnContainer = this.initialPanel.$element.find( '.survey-button-container' ), + // Force https per security review See: T110662 + link = mw.msg( this.config.survey.link ).replace( 'http:', 'https:' ), buttons = [ { - href: mw.msg( this.config.survey.link ), + href: link, target: '_blank', label: mw.msg( 'ext-quicksurveys-external-survey-yes-button' ), flags: 'constructive' diff --git a/resources/ext.quicksurveys.views/utils.js b/resources/ext.quicksurveys.views/utils.js index fd0b727..b69d19f 100644 --- a/resources/ext.quicksurveys.views/utils.js +++ b/resources/ext.quicksurveys.views/utils.js @@ -53,7 +53,8 @@ var geoIP = mw.cookie.get( 'GeoIP', '' ); if ( geoIP ) { - return geoIP.split( ':' )[0]; + // Return truncated per ISO 3166-1 alpha-2 country code + return geoIP.split( ':' )[0].substring( 0, 2 ); } return 'Unknown'; } -- To view, visit https://gerrit.wikimedia.org/r/239993 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I742221107e5becc784b2721b4df070d8cccbffe9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/QuickSurveys Gerrit-Branch: dev Gerrit-Owner: Robmoen ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove sodium from puppet (spare/decom) - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: Remove sodium from puppet (spare/decom) .. Remove sodium from puppet (spare/decom) Bug: T110142 Change-Id: I6f04b2bcd86519921edf3ed3c4d452fbedaaf2ff --- M manifests/role/lists.pp M manifests/site.pp M modules/install_server/files/autoinstall/netboot.cfg M modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 4 files changed, 0 insertions(+), 16 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/manifests/role/lists.pp b/manifests/role/lists.pp index 4fc0ca0..6dc1e68 100644 --- a/manifests/role/lists.pp +++ b/manifests/role/lists.pp @@ -133,7 +133,6 @@ default => 'sda', } -# values chosen based on i/o averages for sodium nrpe::monitor_service { 'mailman_iostat': description => 'mailman I/O stats', nrpe_command => "/usr/local/lib/nagios/plugins/check_iostat -i -w 250,350,300,14000,7500 -c 500,400,600,28000,11000 -d ${iostat_device}", diff --git a/manifests/site.pp b/manifests/site.pp index 8df1779..e92451d 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -2387,15 +2387,6 @@ interface::add_ip6_mapped { 'main': } } -node 'sodium.wikimedia.org' { -role lists -include standard - -interface::add_ip6_mapped { 'main': -interface => 'eth0', -} -} - node /^(strontium|rhodium).eqiad.wmnet/ { include standard include role::puppetmaster::backend diff --git a/modules/install_server/files/autoinstall/netboot.cfg b/modules/install_server/files/autoinstall/netboot.cfg index a6babbd..8cf3923 100755 --- a/modules/install_server/files/autoinstall/netboot.cfg +++ b/modules/install_server/files/autoinstall/netboot.cfg @@ -118,5 +118,4 @@ virt101[0-2]) echo partman/virt-hp.cfg ;; \ wdqs100[1-9]) echo partman/lvm-wdqs.cfg ;; \ wtp[1-2]0[0-2][0-9]|hafnium) echo partman/raid1-lvm.cfg ;; \ -# sodium) echo partman/mailserver.cfg ;; \ esac 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 844f52d..0a36657 100644 --- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 +++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 @@ -6174,11 +6174,6 @@ fixed-address snapshot1004.eqiad.wmnet; } -host sodium { - hardware ethernet 78:2b:cb:08:aa:e1; - fixed-address sodium.wikimedia.org; -} - host stat1001 { hardware ethernet 78:2b:cb:35:c4:f7; fixed-address stat1001.eqiad.wmnet; -- To view, visit https://gerrit.wikimedia.org/r/239411 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6f04b2bcd86519921edf3ed3c4d452fbedaaf2ff Gerrit-PatchSet: 4 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: John F. Lewis Gerrit-Reviewer: Dzahn Gerrit-Reviewer: Faidon Liambotis Gerrit-Reviewer: RobH Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Made RenameUserJob better avoid slave lag spikes - change (mediawiki...Renameuser)
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/239992 Change subject: Made RenameUserJob better avoid slave lag spikes .. Made RenameUserJob better avoid slave lag spikes * Do the major table updates using a SELECT+UPDATE pattern so the slaves only see the query to update rows by PRIMARY KEY. Otherwise, queries that take dozens of seconds hit the slaves, causing that much lag. * Also cleaned up the job documentation while at it. Bug: T95501 Change-Id: I5d79858eee48f780530485b05bec7567ae7bafe7 --- M RenameUserJob.php M RenameuserSQL.php 2 files changed, 76 insertions(+), 35 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Renameuser refs/changes/92/239992/1 diff --git a/RenameUserJob.php b/RenameUserJob.php index d2dc14c..6913e6f 100644 --- a/RenameUserJob.php +++ b/RenameUserJob.php @@ -1,63 +1,97 @@ params['table']; $column = $this->params['column']; $oldname = $this->params['oldname']; - $userID = isset( $this->params['userID'] ) ? $this->params['userID'] : null; - $uidColumn = isset( $this->params['uidColumn'] ) ? $this->params['uidColumn'] : null; - $timestampColumn = isset( $this->params['timestampColumn'] ) ? $this->params['timestampColumn'] : null; - $minTimestamp = $this->params['minTimestamp']; - $maxTimestamp = $this->params['maxTimestamp']; - $uniqueKey = isset( $this->params['uniqueKey'] ) ? $this->params['uniqueKey'] : null; - $keyId = isset( $this->params['keyId'] ) ? $this->params['keyId'] : null; $newname = $this->params['newname']; $count = $this->params['count']; + if ( isset( $this->params['userID'] ) ) { + $userID = $this->params['userID']; + $uidColumn = $this->params['uidColumn']; + } else { + $userID = null; + $uidColumn = null; + } + if ( isset( $this->params['timestampColumn'] ) ) { + $timestampColumn = $this->params['timestampColumn']; + $minTimestamp = $this->params['minTimestamp']; + $maxTimestamp = $this->params['maxTimestamp']; + } else { + $timestampColumn = null; + $minTimestamp = null; + $maxTimestamp = null; + } + $uniqueKey = isset( $this->params['uniqueKey'] ) ? $this->params['uniqueKey'] : null; + $keyId = isset( $this->params['keyId'] ) ? $this->params['keyId'] : null; # Conditions like "*_user_text = 'x' $conds = array( $column => $oldname ); - # If user ID given, add that to condition to avoid rename collisions. - if ( isset( $userID ) ) { + # If user ID given, add that to condition to avoid rename collisions + if ( $userID !== null ) { $conds[$uidColumn] = $userID; } # Bound by timestamp if given - if ( isset( $timestampColumn ) ) { + if ( $timestampColumn !== null ) { $conds[] = "$timestampColumn >= '$minTimestamp'"; $conds[] = "$timestampColumn <= '$maxTimestamp'"; - # Otherwise, bound by key (B/C) - } elseif ( isset( $uniqueKey ) ) { + # Bound by unique key if given (B/C) + } elseif ( $uniqueKey !== null && $keyId !== null ) { $conds[$uniqueKey] = $keyId; } else { - wfDebug( 'RenameUserJob::run - invalid job row given' ); // this shouldn't happen - return false; + throw new InvalidArgumentException( "Expected ID batch or time range" ); } - # Update a chuck of rows! - $dbw->update( $table, - array( $column => $newname ), - $conds, - __METHOD__ - ); + + $dbw = wfGetDB( DB_MASTER ); + + if ( $uniqueKey !== null ) { + # Select the rows to update by PRIMARY KEY + $ids = $dbw->selectFieldValues( $table, $uniqueKey, $conds, __METHOD__ ); + # Update these rows by PRIMARY KEY to avoid slave lag + if ( $ids ) { + $dbw->update( $table, + array( $column => $newname ), + array( $column => $oldname, $uniqueKey => $ids ), + __METHOD__ + ); +
[MediaWiki-commits] [Gerrit] Make WPT script files use placeholders - change (performance/WebPageTest)
jenkins-bot has submitted this change and it was merged. Change subject: Make WPT script files use placeholders .. Make WPT script files use placeholders Replace placeholders looking like <%NAME> in WPT script files and batch file with corresponding node env variable. The placeholder <%NAME> will be replaced with the value of process.env.NAME If there's no match, there's an error log message. Bug: T112733 Change-Id: I1d4e3a62922f05da2093a9dc9e779ce0694bb310 --- M lib/cli.js M lib/index.js M lib/util.js A test/files/scriptingWithEnv.txt M test/utilTest.js 5 files changed, 92 insertions(+), 36 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/cli.js b/lib/cli.js index c7f75e2..e0e3612 100644 --- a/lib/cli.js +++ b/lib/cli.js @@ -82,7 +82,8 @@ getInputURLorFile: function(arg) { // is it a file or URL we wanna test? if (arg.indexOf('http') === -1) { -return util.readFile(arg); +var fileContent = util.readFile(arg); +return util.replaceWithEnv(fileContent); } else { return arg; } diff --git a/lib/index.js b/lib/index.js index c39e3a9..c3a77e6 100644 --- a/lib/index.js +++ b/lib/index.js @@ -45,7 +45,6 @@ if (line.indexOf('#') !== 0 && line.length > 1) { var myArgs = util.convertTextLineToMinimist(line); - if (!cli.isArgsOK(myArgs)) { process.exit(1); } diff --git a/lib/util.js b/lib/util.js index 4cb4bb0..7584928 100644 --- a/lib/util.js +++ b/lib/util.js @@ -90,6 +90,8 @@ return wptOptions; }, convertTextLineToMinimist: function(line) { +// replace variables with env variables +line = this.replaceWithEnv(line); // the location element for WebPageTest has a couple of different // variants: http://www.webpagetest.org/getLocations.php // most problem for us is the space that sometimes is in the name @@ -117,6 +119,23 @@ path.sep, filename); return fs.readFileSync(fullPathToFile, 'utf-8'); }, +replaceWithEnv: function(text) { +var matches = text.match(/<(.*?)>/g); +if (matches) { +matches.forEach(function(match) { +// do we have a matching ENV? +var env = match.substring(2, match.length - 1); +if (process.env[env]) { +text = text.replace(match, process.env[env]); +} else { +console.error('No ENV set for ' + env + ' the expr ' + match + +' will not be replaced'); +} + +}); +} +return text; +}, collectMetrics: function(wptJson, userStatus, namespace) { var self = this; diff --git a/test/files/scriptingWithEnv.txt b/test/files/scriptingWithEnv.txt new file mode 100644 index 000..c27a1a8 --- /dev/null +++ b/test/files/scriptingWithEnv.txt @@ -0,0 +1,14 @@ +logData0 + +// https://sites.google.com/a/webpagetest.org/docs/using-webpagetest/scripting + +// put any urls you want to navigate +navigate<%MY_URL> + +logData1 + +// this step will get recorded +navigate<%MY_SECOND_URL> + +// and then navigate back +navigate<%MY_URL> diff --git a/test/utilTest.js b/test/utilTest.js index 65ad570..007cad9 100644 --- a/test/utilTest.js +++ b/test/utilTest.js @@ -28,17 +28,6 @@ describe('Test util', function() { - it('WebPageTest options should be added', function() { - -var args = { - location: 'ap-northeast-1_IE10', - connectivity: '3G' -}; -var wptOptions = util.setupWPTOptions(args); -assert.deepEqual(wptOptions.location, 'ap-northeast-1_IE10'); -assert.deepEqual(wptOptions.connectivity, '3G'); - }); - it('Location field should work with and without spaces and without a location', function() { var validValues = ['Dulles:Chrome', 'Dulles_MotoG:Motorola G - Chrome', undefined]; var lines = batchScript.split(eol); @@ -52,26 +41,37 @@ }); - it('Parameters specific for wptstatsv should be cleaned out from WebPageTest options', function() { +it('WebPageTest options should be added', function() { -var keysToBeRemoved = ['webPageTestKey', 'webPageTestHost', '_', 'verbose', 'userStatus', 'sendMetrics', 'customMetrics', 'namespace']; -var args = { - webPageTestKey: 'aSupERSecrEtKey', - webPageTestHost: 'http://our.wpt.org', - _: ['all', 'extra', 'args'], - verbose: true, - userStatus: 'anonymous', - dryRun: true, - customMetrics: 'javascript that collects custom metrics', - namespace: 'super.special.namespace' -}; - -var wptOptions = util.setupWPTOptions(args); -keysToBeRemoved.forEach(function(key) { - assert.strictEqual(wptOptions[key], undefined); +var args = { +location: 'ap-nor
[MediaWiki-commits] [Gerrit] Revert "mailman: ferm, allow rsync from sodium for migration" - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: Revert "mailman: ferm, allow rsync from sodium for migration" .. Revert "mailman: ferm, allow rsync from sodium for migration" This reverts commit 9c0d9fdb7723ce6b481b4942f47052eb7a6599c0. Change-Id: Id82319868a3a949b7c8fc46c8e23bff1f317adaa --- M manifests/role/lists.pp 1 file changed, 0 insertions(+), 6 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/manifests/role/lists.pp b/manifests/role/lists.pp index 0f17eff..4fc0ca0 100644 --- a/manifests/role/lists.pp +++ b/manifests/role/lists.pp @@ -158,12 +158,6 @@ ferm::rule { 'mailman-spamd-local': rule => 'proto tcp dport 783 { saddr (127.0.0.1 ::1) ACCEPT; }' } - -ferm::service { 'sodium-rysnc': -proto => 'tcp', -port => '873', -srange => '208.80.154.61/32', -} } class role::lists::migration { -- To view, visit https://gerrit.wikimedia.org/r/235976 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id82319868a3a949b7c8fc46c8e23bff1f317adaa Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn Gerrit-Reviewer: Dzahn Gerrit-Reviewer: John F. Lewis Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added read affinity tests for FileBackendMultiWrite - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Added read affinity tests for FileBackendMultiWrite .. Added read affinity tests for FileBackendMultiWrite Change-Id: I1407273175396d4d3631531ff0ca0afa3009913e --- M tests/phpunit/includes/filebackend/FileBackendTest.php 1 file changed, 50 insertions(+), 0 deletions(-) Approvals: Gilles: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/phpunit/includes/filebackend/FileBackendTest.php b/tests/phpunit/includes/filebackend/FileBackendTest.php index aaa93ef..2e4942f 100644 --- a/tests/phpunit/includes/filebackend/FileBackendTest.php +++ b/tests/phpunit/includes/filebackend/FileBackendTest.php @@ -2392,6 +2392,56 @@ "Scoped unlocking of files succeeded with OK status ($backendName)." ); } + public function testReadAffinity() { + $be = TestingAccessWrapper::newFromObject( + new FileBackendMultiWrite( array( + 'name' => 'localtesting', + 'wikiId' => wfWikiId() . mt_rand(), + 'backends' => array( + array( // backend 0 + 'name' => 'multitesting0', + 'class' => 'MemoryFileBackend', + 'isMultiMaster' => false, + 'readAffinity' => true + ), + array( // backend 1 + 'name' => 'multitesting1', + 'class' => 'MemoryFileBackend', + 'isMultiMaster' => true + ) + ) + ) ) + ); + + $this->assertEquals( + 1, + $be->getReadIndexFromParams( array( 'latest' => 1 ) ), + 'Reads with "latest" flag use backend 1' + ); + $this->assertEquals( + 0, + $be->getReadIndexFromParams( array( 'latest' => 0 ) ), + 'Reads without "latest" flag use backend 0' + ); + + $p = 'container/test-cont/file.txt'; + $be->backends[0]->quickCreate( array( + 'dst' => "mwstore://multitesting0/$p", 'content' => 'cattitude' ) ); + $be->backends[1]->quickCreate( array( + 'dst' => "mwstore://multitesting1/$p", 'content' => 'princess of power' ) ); + + $this->assertEquals( + 'cattitude', + $be->getFileContents( array( 'src' => "mwstore://localtesting/$p" ) ), + "Non-latest read came from backend 0" + ); + $this->assertEquals( + 'princess of power', + $be->getFileContents( array( 'src' => "mwstore://localtesting/$p", 'latest' => 1 ) ), + "Latest read came from backend1" + ); + } + // helper function private function listToArray( $iter ) { return is_array( $iter ) ? $iter : iterator_to_array( $iter ); -- To view, visit https://gerrit.wikimedia.org/r/239894 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1407273175396d4d3631531ff0ca0afa3009913e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz Gerrit-Reviewer: Gilles Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [WIP] T86271: Serialize s next to modified content on ... - change (mediawiki...parsoid)
Subramanya Sastry has uploaded a new change for review. https://gerrit.wikimedia.org/r/239991 Change subject: [WIP] T86271: Serialize s next to modified content on own line .. [WIP] T86271: Serialize s next to modified content on own line * This currently only affects selser mode and consequently, this results in a huge number of false failures wherever categories, language links, or include directives are involved. Change-Id: I13b70cc98bb77c4a7ab1821070ffee5954b45505 --- M lib/mediawiki.DOMUtils.js M lib/wts.TagHandlers.js M lib/wts.separators.js M tests/parserTests-blacklist.js 4 files changed, 261 insertions(+), 29 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid refs/changes/91/239991/1 diff --git a/lib/mediawiki.DOMUtils.js b/lib/mediawiki.DOMUtils.js index c80efc9..aae95af 100644 --- a/lib/mediawiki.DOMUtils.js +++ b/lib/mediawiki.DOMUtils.js @@ -1009,7 +1009,7 @@ * @param {MWParserEnvironment} env */ hasDiffMarkers: function(node, env) { - return this.currentDiffMark(node, env) !== null; + return this.currentDiffMark(node, env) !== null || this.isDiffMarker(node); }, hasDiffMark: function(node, env, mark) { diff --git a/lib/wts.TagHandlers.js b/lib/wts.TagHandlers.js index 6f1158c..df31077 100644 --- a/lib/wts.TagHandlers.js +++ b/lib/wts.TagHandlers.js @@ -460,6 +460,18 @@ return prev !== null && prev.nodeName === node.nodeName; } +// Helper function +function serializeLinkNodeOnOwnLine(node, otherNode, env) { + return DU.isSolTransparentLink(node) && + // Fresh node + (DU.isNewElt(node) && !DU.isBody(otherNode)) + // In a document fragment + || DU.isDocumentFragment(node.parentNode) + // T86271: next/previous node is new/modified + || DU.hasDiffMarkers(node.previousSibling, env) + || DU.hasDiffMarkers(node.nextSibling, env); +} + var TagHandlers = { b: buildQuoteHandler("'''"), i: buildQuoteHandler("''"), @@ -1169,21 +1181,15 @@ return state.serializer.linkHandler(node, state, cb); }, sepnls: { - before: function(node, otherNode) { - if (DU.isSolTransparentLink(node) && - ((DU.isNewElt(node) && !DU.isBody(otherNode)) || - DU.isDocumentFragment(node.parentNode)) - ) { // Fresh category link: Serialize on its own line + before: function(node, otherNode, state) { + if (serializeLinkNodeOnOwnLine(node, otherNode, state.env)) { return { min: 1 }; } else { return {}; } }, - after: function(node, otherNode) { - if (DU.isSolTransparentLink(node) && - ((DU.isNewElt(node) && !DU.isBody(otherNode)) || - DU.isDocumentFragment(node.parentNode)) - ) { // Fresh category link: Serialize on its own line + after: function(node, otherNode, state) { + if (serializeLinkNodeOnOwnLine(node, otherNode, state.env)) { return { min: 1 }; } else { return {}; diff --git a/lib/wts.separators.js b/lib/wts.separators.js index 31353cf..bc51c1c 100644 --- a/lib/wts.separators.js +++ b/lib/wts.separators.js @@ -75,16 +75,17 @@ * min, max structure. */ function getSepNlConstraints(state, nodeA, sepNlsHandlerA, nodeB, sepNlsHandlerB) { + var env = state.env; var nlConstraints = { a: {}, b: {} }; // Leave constraints unchanged when: // * both nodes are element nodes // * both nodes were present in original wikitext - // * either one of them is sol-transparent + // * either one of them is sol-transparent without modified nodes in between if (DU.isElt(nodeA) && DU.isElt(nodeB) && !DU.isNewElt(nodeA) && !DU.isNewElt(nodeB) - && (DU.emitsSolTransparentSingleLineWT(state.env, nodeA) - || DU.emitsSolTransparentSingleLineWT(state.env, nodeB))) { + && ((DU.emitsSolTransparentSingleLineWT(env, nodeA) && !DU.hasDiffMarkers(nodeA.nextSibling, env)) + || (DU.emitsSolTransparentSingleLineWT(env, nodeB)) && !DU.hasDiffMarkers(nodeB.previousSibling, state.env))) { return nlConstraints; } @@ -102,7 +103,7
[MediaWiki-commits] [Gerrit] mediawiki.Upload.Dialog: Factor out stack layout - change (mediawiki/core)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/239990 Change subject: mediawiki.Upload.Dialog: Factor out stack layout .. mediawiki.Upload.Dialog: Factor out stack layout So that it can be used outside of the upload dialog. Change-Id: Ic6e7e4499611e64a905f2828bdf0ee538168c9ec --- M resources/Resources.php M resources/src/mediawiki/mediawiki.Upload.Dialog.js A resources/src/mediawiki/mediawiki.Upload.StackLayout.js 3 files changed, 486 insertions(+), 381 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/90/239990/1 diff --git a/resources/Resources.php b/resources/Resources.php index 4e59312..7ee3396 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -1151,19 +1151,31 @@ ), ), 'mediawiki.Upload.Dialog' => array( - 'scripts' => 'resources/src/mediawiki/mediawiki.Upload.Dialog.js', + 'scripts' => array( + 'resources/src/mediawiki/mediawiki.Upload.Dialog.js', + ), 'dependencies' => array( 'oojs-ui', - 'mediawiki.Upload', + 'mediawiki.StackLayout', ), 'messages' => array( 'upload-dialog-title', - 'upload-dialog-error', - 'upload-dialog-warning', 'upload-dialog-button-cancel', 'upload-dialog-button-done', 'upload-dialog-button-save', 'upload-dialog-button-upload', + ), + ), + 'mediawiki.Upload.StackLayout' => array( + 'scripts' => array( + 'resources/src/mediawiki/mediawiki.Upload.StackLayout.js', + ), + 'dependencies' => array( + 'oojs-ui', + ), + 'messages' => array( + 'upload-dialog-error', + 'upload-dialog-warning', 'upload-dialog-label-select-file', 'upload-dialog-label-infoform-title', 'upload-dialog-label-infoform-name', diff --git a/resources/src/mediawiki/mediawiki.Upload.Dialog.js b/resources/src/mediawiki/mediawiki.Upload.Dialog.js index 36fbd46..4ee0c3c 100644 --- a/resources/src/mediawiki/mediawiki.Upload.Dialog.js +++ b/resources/src/mediawiki/mediawiki.Upload.Dialog.js @@ -1,33 +1,8 @@ ( function ( $, mw ) { /** -* mw.Upload.Dialog encapsulates the process of uploading a file -* to MediaWiki using the {@link mw.Upload mw.Upload} model. -* The dialog emits events that can be used to get the stashed -* upload and the final file. It can be extended to accept -* additional fields from the user for specific scenarios like -* for Commons, or campaigns. -* -* ## Structure -* -* The {@link OO.ui.ProcessDialog dialog} has three steps: -* -* - **Upload**: Has a {@link OO.ui.SelectFileWidget field} to get the file object. -* -* - **Information**: Has a {@link OO.ui.FormLayout form} to collect metadata. This can be -* extended. -* -* - **Insert**: Has details on how to use the file that was uploaded. -* -* Each step has a form associated with it defined in -* {@link mw.Upload.Dialog#renderUploadForm renderUploadForm}, -* {@link mw.Upload.Dialog#renderInfoForm renderInfoForm}, and -* {@link mw.Upload.Dialog#renderInsertForm renderInfoForm}. The -* {@link mw.Upload.Dialog#getFile getFile}, -* {@link mw.Upload.Dialog#getFilename getFilename}, and -* {@link mw.Upload.Dialog#getText getText} methods are used to get -* the information filled in these forms, required to call -* {@link mw.Upload mw.Upload}. +* mw.Upload.Dialog controls an +* {@link mw.Upload.StackLayout StackLayout}. * * ## Usage * @@ -44,23 +19,6 @@ * {@link mw.Upload.Dialog#event-fileUploaded fileUploaded}, * and {@link mw.Upload.Dialog#event-fileSaved fileSaved} events can * be used to get details of the upload. -* -* ## Extending -* -* To extend using {@link mw.Upload mw.Upload}, override -* {@link mw.Upload.Dialog#renderInfoForm renderInfoForm} to render -* the form required for the specific use-case. Update the -* {@link mw.Upload.Dialog#getFilename getFilename}, and -* {@link mw.Upload.Dialog#getText getText} methods to return data -* from your newly created form. If you added new fields you'll also have -* to update the {@link #getTeardownProcess} method. -* -* If you