[MediaWiki-commits] [Gerrit] install-server: Add graphite2002 MAC address - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: install-server: Add graphite2002 MAC address .. install-server: Add graphite2002 MAC address Bug:T130938 Change-Id: I90e0ea613c866f9fa456f6ce0ca74a078a2b8e7e --- M modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved 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 97faf36..8717c71 100644 --- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 +++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 @@ -2520,6 +2520,11 @@ fixed-address graphite2001.codfw.wmnet; } +host graphite2002 { +hardware ethernet 14:18:77:5B:2C:CA; +fixed-address graphite2002.codfw.wmnet; +} + host hafnium { hardware ethernet 78:2b:cb:1f:17:48; fixed-address hafnium.eqiad.wmnet; -- To view, visit https://gerrit.wikimedia.org/r/280809 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I90e0ea613c866f9fa456f6ce0ca74a078a2b8e7e Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: PapaulGerrit-Reviewer: Dzahn 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] DNS: Add production DNS for graphite2002 Bug:T130938 - change (operations/dns)
Dzahn has submitted this change and it was merged. Change subject: DNS: Add production DNS for graphite2002 Bug:T130938 .. DNS: Add production DNS for graphite2002 Bug:T130938 Change-Id: I3992cd19944398a88ea34dfefa2c2c8f957381d1 --- M templates/10.in-addr.arpa M templates/wmnet 2 files changed, 2 insertions(+), 0 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa index e056c71..93488bb 100644 --- a/templates/10.in-addr.arpa +++ b/templates/10.in-addr.arpa @@ -3000,6 +3000,7 @@ 137 1H IN PTR restbase2004-a.codfw.wmnet. 138 1H IN PTR restbase2004-b.codfw.wmnet. 139 1H IN PTR restbase2004-c.codfw.wmnet. +140 1H IN PTR graphite2002.codfw.wmnet. $ORIGIN 33.192.{{ zonename }}. 1 1H IN PTR vl2019-eth2.lvs2001.codfw.wmnet. diff --git a/templates/wmnet b/templates/wmnet index b58821f..d1cd844 100644 --- a/templates/wmnet +++ b/templates/wmnet @@ -2307,6 +2307,7 @@ ganeti2005 1H IN A10.192.16.129 ganeti2006 1H IN A10.192.16.130 graphite20011H IN A10.192.16.33 +graphite20021H IN A10.192.32.140 hassaleh1H IN A10.192.16.173 heze1H IN A10.192.0.31 kafka2001 1H IN A10.192.0.139 -- To view, visit https://gerrit.wikimedia.org/r/280808 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3992cd19944398a88ea34dfefa2c2c8f957381d1 Gerrit-PatchSet: 2 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: PapaulGerrit-Reviewer: Dzahn 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] DNS: Add mgmt DNS for graphite2002 Bug:T130938 - change (operations/dns)
Dzahn has submitted this change and it was merged. Change subject: DNS: Add mgmt DNS for graphite2002 Bug:T130938 .. DNS: Add mgmt DNS for graphite2002 Bug:T130938 Change-Id: Id71bc4d6b5640aa44b7f27f0a0ee6a698a095887 --- M templates/10.in-addr.arpa M templates/wmnet 2 files changed, 4 insertions(+), 2 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa index a87e19a..e056c71 100644 --- a/templates/10.in-addr.arpa +++ b/templates/10.in-addr.arpa @@ -4002,7 +4002,8 @@ 248 1H IN PTR wmf6401.mgmt.codfw.wmnet. 249 1H IN PTR wasat.mgmt.codfw.wmnet. 249 1H IN PTR wmf6402.mgmt.codfw.wmnet. - +251 1H IN PTR graphite2002.mgmt.codfw.wmnet. +251 1H IN PTR wmf6403.mgmt.codfw.wmnet. ; 10.195.0.0/25 - frack.codfw subnets $ORIGIN 0.195.{{ zonename }}. diff --git a/templates/wmnet b/templates/wmnet index 0b5f187..b58821f 100644 --- a/templates/wmnet +++ b/templates/wmnet @@ -2957,6 +2957,7 @@ ganeti2005 1H IN A10.193.2.169 ganeti2006 1H IN A10.193.2.170 graphite20011H IN A10.193.2.14 +graphite20021H IN A10.193.2.251 haedus 1H IN A10.193.2.1 heze1H IN A10.193.1.250 install2001 1H IN A10.193.1.10 @@ -3660,7 +3661,7 @@ WMF6400 1H IN A10.193.2.247 WMF6401 1H IN A10.193.2.248 WMF6402 1H IN A10.193.2.249 - +WMF6403 1H IN A10.193.2.251 ; ; ESAMS -- To view, visit https://gerrit.wikimedia.org/r/280807 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id71bc4d6b5640aa44b7f27f0a0ee6a698a095887 Gerrit-PatchSet: 2 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: PapaulGerrit-Reviewer: Dzahn 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] Clarify state in groupreview message - change (mediawiki...Translate)
MtDu has uploaded a new change for review. https://gerrit.wikimedia.org/r/280811 Change subject: Clarify state in groupreview message .. Clarify state in groupreview message Bug: T131349 Change-Id: If48870923723d67734dd261130e3347feb51f4d6 --- M i18n/api/en.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate refs/changes/11/280811/1 diff --git a/i18n/api/en.json b/i18n/api/en.json index b78a793..0fcd496 100644 --- a/i18n/api/en.json +++ b/i18n/api/en.json @@ -14,7 +14,7 @@ "apihelp-groupreview-param-group": "Message group.", "apihelp-groupreview-param-language": "Language code.", "apihelp-groupreview-param-state": "The new state for the group.", - "apihelp-groupreview-example-1": "Mark group \"group-Example\" as ready for German", + "apihelp-groupreview-example-1": "Mark the state of the German translation for the message group \"group-Example\" as ready", "apihelp-query+languagestats-description": "Query language stats.", "apihelp-query+languagestats-param-timelimit": "Maximum time to spend calculating missing statistics. If zero, only the cached results from the beginning are returned.", "apihelp-query+languagestats-param-language": "Language code.", -- To view, visit https://gerrit.wikimedia.org/r/280811 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If48870923723d67734dd261130e3347feb51f4d6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: MtDu___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added 'tooltip' param to #autoedit - change (mediawiki...SemanticForms)
Yaron Koren has submitted this change and it was merged. Change subject: Added 'tooltip' param to #autoedit .. Added 'tooltip' param to #autoedit Based on a patch by Clubfan22 Change-Id: I6aeaa7485d27b3ad4f8fa863b433d1dd0fb40fe9 --- M includes/SF_ParserFunctions.php 1 file changed, 11 insertions(+), 2 deletions(-) Approvals: Yaron Koren: Checked; Looks good to me, approved jenkins-bot: Verified diff --git a/includes/SF_ParserFunctions.php b/includes/SF_ParserFunctions.php index 5d5179d..7380b52 100644 --- a/includes/SF_ParserFunctions.php +++ b/includes/SF_ParserFunctions.php @@ -132,7 +132,8 @@ * * '#autoedit' is called as: * - * {{#autoedit:form=|target=|link text=|link type=|query string=|reload}} + * {{#autoedit:form=|target=|link text=|link type=|tooltip=|query string= + * |reload}} * * This function creates a link or button that, when clicked on, * automatically modifies the specified page according to the values in the @@ -480,6 +481,7 @@ $linkType = 'span'; $summary = null; $classString = 'autoedit-trigger'; + $inTooltip = null; $inQueryArr = array(); $editTime = null; @@ -522,6 +524,9 @@ // do not parse ok text or error text yet. Will be parsed on api call $arr = array( $key => $value ); $inQueryArr = SFUtils::array_merge_recursive_distinct( $inQueryArr, $arr ); + break; + case 'tooltip': + $inTooltip = Sanitizer::decodeCharReferences( $value ); break; case 'target': @@ -568,7 +573,11 @@ // do not use Html::rawElement() for buttons! $linkElement = ' 'submit', 'class' => $classString ) ) . '>' . $linkString . ''; } elseif ( $linkType == 'link' ) { - $linkElement = Html::rawElement( 'a', array( 'class' => $classString, 'href' => "#" ), $linkString ); + $attrs = array( 'class' => $classString, 'href' => "#" ); + if ( $inTooltip != null ) { + $attrs['title'] = $inTooltip; + } + $linkElement = Html::rawElement( 'a', $attrs, $linkString ); } else { $linkElement = Html::rawElement( 'span', array( 'class' => $classString ), $linkString ); } -- To view, visit https://gerrit.wikimedia.org/r/280810 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6aeaa7485d27b3ad4f8fa863b433d1dd0fb40fe9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SemanticForms Gerrit-Branch: master Gerrit-Owner: Yaron KorenGerrit-Reviewer: Yaron Koren Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added 'tooltip' param to #autoedit - change (mediawiki...SemanticForms)
Yaron Koren has uploaded a new change for review. https://gerrit.wikimedia.org/r/280810 Change subject: Added 'tooltip' param to #autoedit .. Added 'tooltip' param to #autoedit Based on a patch by Clubfan22 Change-Id: I6aeaa7485d27b3ad4f8fa863b433d1dd0fb40fe9 --- M includes/SF_ParserFunctions.php 1 file changed, 11 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticForms refs/changes/10/280810/1 diff --git a/includes/SF_ParserFunctions.php b/includes/SF_ParserFunctions.php index 5d5179d..7380b52 100644 --- a/includes/SF_ParserFunctions.php +++ b/includes/SF_ParserFunctions.php @@ -132,7 +132,8 @@ * * '#autoedit' is called as: * - * {{#autoedit:form=|target=|link text=|link type=|query string=|reload}} + * {{#autoedit:form=|target=|link text=|link type=|tooltip=|query string= + * |reload}} * * This function creates a link or button that, when clicked on, * automatically modifies the specified page according to the values in the @@ -480,6 +481,7 @@ $linkType = 'span'; $summary = null; $classString = 'autoedit-trigger'; + $inTooltip = null; $inQueryArr = array(); $editTime = null; @@ -522,6 +524,9 @@ // do not parse ok text or error text yet. Will be parsed on api call $arr = array( $key => $value ); $inQueryArr = SFUtils::array_merge_recursive_distinct( $inQueryArr, $arr ); + break; + case 'tooltip': + $inTooltip = Sanitizer::decodeCharReferences( $value ); break; case 'target': @@ -568,7 +573,11 @@ // do not use Html::rawElement() for buttons! $linkElement = ' 'submit', 'class' => $classString ) ) . '>' . $linkString . ''; } elseif ( $linkType == 'link' ) { - $linkElement = Html::rawElement( 'a', array( 'class' => $classString, 'href' => "#" ), $linkString ); + $attrs = array( 'class' => $classString, 'href' => "#" ); + if ( $inTooltip != null ) { + $attrs['title'] = $inTooltip; + } + $linkElement = Html::rawElement( 'a', $attrs, $linkString ); } else { $linkElement = Html::rawElement( 'span', array( 'class' => $classString ), $linkString ); } -- To view, visit https://gerrit.wikimedia.org/r/280810 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6aeaa7485d27b3ad4f8fa863b433d1dd0fb40fe9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SemanticForms Gerrit-Branch: master Gerrit-Owner: Yaron Koren___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] install-server: Add graphite2002 MAC address Bug:T130938 - change (operations/puppet)
Papaul has uploaded a new change for review. https://gerrit.wikimedia.org/r/280809 Change subject: install-server: Add graphite2002 MAC address Bug:T130938 .. install-server: Add graphite2002 MAC address Bug:T130938 Change-Id: I90e0ea613c866f9fa456f6ce0ca74a078a2b8e7e --- M modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/09/280809/1 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 b1b2c6d..f45eebc 100644 --- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 +++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 @@ -2548,6 +2548,11 @@ fixed-address graphite2001.codfw.wmnet; } +host graphite2002 { +hardware ethernet 14:18:77:5B:2C:CA; +fixed-address graphite2002.codfw.wmnet; +} + host hafnium { hardware ethernet 78:2b:cb:1f:17:48; fixed-address hafnium.eqiad.wmnet; -- To view, visit https://gerrit.wikimedia.org/r/280809 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I90e0ea613c866f9fa456f6ce0ca74a078a2b8e7e Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Papaul___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] DNS: Add production DNS for graphite2002 Bug:T130938 - change (operations/dns)
Papaul has uploaded a new change for review. https://gerrit.wikimedia.org/r/280808 Change subject: DNS: Add production DNS for graphite2002 Bug:T130938 .. DNS: Add production DNS for graphite2002 Bug:T130938 Change-Id: I3992cd19944398a88ea34dfefa2c2c8f957381d1 --- M templates/10.in-addr.arpa M templates/wmnet 2 files changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dns refs/changes/08/280808/1 diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa index a87e19a..cdbcbbd 100644 --- a/templates/10.in-addr.arpa +++ b/templates/10.in-addr.arpa @@ -3000,6 +3000,7 @@ 137 1H IN PTR restbase2004-a.codfw.wmnet. 138 1H IN PTR restbase2004-b.codfw.wmnet. 139 1H IN PTR restbase2004-c.codfw.wmnet. +140 1H IN PTR graphite2002.codfw.wmnet. $ORIGIN 33.192.{{ zonename }}. 1 1H IN PTR vl2019-eth2.lvs2001.codfw.wmnet. diff --git a/templates/wmnet b/templates/wmnet index 0b5f187..ed2775e 100644 --- a/templates/wmnet +++ b/templates/wmnet @@ -2307,6 +2307,7 @@ ganeti2005 1H IN A10.192.16.129 ganeti2006 1H IN A10.192.16.130 graphite20011H IN A10.192.16.33 +graphite20021H IN A10.192.32.140 hassaleh1H IN A10.192.16.173 heze1H IN A10.192.0.31 kafka2001 1H IN A10.192.0.139 -- To view, visit https://gerrit.wikimedia.org/r/280808 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3992cd19944398a88ea34dfefa2c2c8f957381d1 Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: Papaul___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] DNS: Add mgmt DNS for graphite2002 Bug:T130938 - change (operations/dns)
Papaul has uploaded a new change for review. https://gerrit.wikimedia.org/r/280807 Change subject: DNS: Add mgmt DNS for graphite2002 Bug:T130938 .. DNS: Add mgmt DNS for graphite2002 Bug:T130938 Change-Id: Id71bc4d6b5640aa44b7f27f0a0ee6a698a095887 --- M templates/10.in-addr.arpa M templates/wmnet 2 files changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dns refs/changes/07/280807/1 diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa index a87e19a..e056c71 100644 --- a/templates/10.in-addr.arpa +++ b/templates/10.in-addr.arpa @@ -4002,7 +4002,8 @@ 248 1H IN PTR wmf6401.mgmt.codfw.wmnet. 249 1H IN PTR wasat.mgmt.codfw.wmnet. 249 1H IN PTR wmf6402.mgmt.codfw.wmnet. - +251 1H IN PTR graphite2002.mgmt.codfw.wmnet. +251 1H IN PTR wmf6403.mgmt.codfw.wmnet. ; 10.195.0.0/25 - frack.codfw subnets $ORIGIN 0.195.{{ zonename }}. diff --git a/templates/wmnet b/templates/wmnet index 0b5f187..b58821f 100644 --- a/templates/wmnet +++ b/templates/wmnet @@ -2957,6 +2957,7 @@ ganeti2005 1H IN A10.193.2.169 ganeti2006 1H IN A10.193.2.170 graphite20011H IN A10.193.2.14 +graphite20021H IN A10.193.2.251 haedus 1H IN A10.193.2.1 heze1H IN A10.193.1.250 install2001 1H IN A10.193.1.10 @@ -3660,7 +3661,7 @@ WMF6400 1H IN A10.193.2.247 WMF6401 1H IN A10.193.2.248 WMF6402 1H IN A10.193.2.249 - +WMF6403 1H IN A10.193.2.251 ; ; ESAMS -- To view, visit https://gerrit.wikimedia.org/r/280807 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id71bc4d6b5640aa44b7f27f0a0ee6a698a095887 Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: Papaul___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added quotes around field names, to avoid Postgres lowercasing - change (mediawiki...Cargo)
Yaron Koren has submitted this change and it was merged. Change subject: Added quotes around field names, to avoid Postgres lowercasing .. Added quotes around field names, to avoid Postgres lowercasing Change-Id: I1cdce214a08b6f9cbf9d6bd02cccd041f254fd11 --- M CargoSQLQuery.php M CargoUtils.php 2 files changed, 18 insertions(+), 11 deletions(-) Approvals: Yaron Koren: Checked; Looks good to me, approved jenkins-bot: Verified diff --git a/CargoSQLQuery.php b/CargoSQLQuery.php index 51ebfc5..27995eb 100644 --- a/CargoSQLQuery.php +++ b/CargoSQLQuery.php @@ -1101,7 +1101,14 @@ // call the DB query. $realAliasedFieldNames = array(); foreach ( $this->mAliasedFieldNames as $alias => $fieldName ) { - $realAliasedFieldNames['"' . $alias . '"'] = $fieldName; + $alias = $cdb->addIdentifierQuotes( $alias ); + // If it's really a field name, add quotes around it. + // (The quotes are mostly needed for Postgres, which + // lowercases all unquoted fields.) + if ( strpos( $fieldName, '(' ) === false ) { + $fieldName = $cdb->addIdentifierQuotes( $fieldName ); + } + $realAliasedFieldNames[$alias] = $fieldName; } $res = $cdb->select( $this->mTableNames, $realAliasedFieldNames, $this->mWhereStr, __METHOD__, diff --git a/CargoUtils.php b/CargoUtils.php index 3cc4f7a..ce212df 100644 --- a/CargoUtils.php +++ b/CargoUtils.php @@ -536,11 +536,11 @@ $createSQL = "CREATE TABLE " . $cdb->tableName( $tableName ) . ' ( ' . - "_ID $intTypeString NOT NULL UNIQUE, " . - "_pageName $stringTypeString NOT NULL, " . - "_pageTitle $stringTypeString NOT NULL, " . - "_pageNamespace $intTypeString NOT NULL, " . - "_pageID $intTypeString NOT NULL"; + $cdb->addIdentifierQuotes( '_ID' ) . " $intTypeString NOT NULL UNIQUE, " . + $cdb->addIdentifierQuotes( '_pageName' ) . " $stringTypeString NOT NULL, " . + $cdb->addIdentifierQuotes( '_pageTitle' ) . " $stringTypeString NOT NULL, " . + $cdb->addIdentifierQuotes( '_pageNamespace' ) . " $intTypeString NOT NULL, " . + $cdb->addIdentifierQuotes( '_pageID' ) . " $intTypeString NOT NULL"; foreach ( $tableSchema->mFieldDescriptions as $fieldName => $fieldDescription ) { $size = $fieldDescription->mSize; @@ -552,7 +552,7 @@ // instead, we'll have one called // fieldName + '__full', and a separate table // for holding each value. - $createSQL .= ', ' . $fieldName . '__full '; + $createSQL .= ', ' . $cdb->addIdentifierQuotes( $fieldName . '__full' ) . ' '; // The field holding the full list will always // just be text $createSQL .= $stringTypeString; @@ -563,16 +563,16 @@ if ( !$isList && $fieldType == 'Coordinates' ) { $floatTypeString = self::fieldTypeToSQLType( 'Float', $dbType ); - $createSQL .= ', ' . $fieldName . '__lat '; + $createSQL .= ', ' . $cdb->addIdentifierQuotes( $fieldName . '__lat' ) . ' '; $createSQL .= $floatTypeString; - $createSQL .= ', ' . $fieldName . '__lon '; + $createSQL .= ', ' . $cdb->addIdentifierQuotes( $fieldName . '__lon' ) . ' '; $createSQL .= $floatTypeString; } elseif ( $fieldType == 'Date' || $fieldType == 'Datetime' ) { $integerTypeString = self::fieldTypeToSQLType( 'Integer', $dbType ); - $createSQL .= ', ' . $fieldName . '__precision '; + $createSQL .= ", " . $cdb->addIdentifierQuotes( $fieldName . '__precision' ) . ' '; $createSQL .= $integerTypeString; } elseif ( $fieldType == 'Searchtext' ) { - $createSQL .= ", FULLTEXT KEY $fieldName ($fieldName)"; + $createSQL .= ", FULLTEXT KEY $fieldName (" . $cdb->addIdentifierQuotes( $fieldName ) . ')'; } } $createSQL .= ' )'; -- To view, visit https://gerrit.wikimedia.org/r/280806
[MediaWiki-commits] [Gerrit] Added quotes around field names, to avoid Postgres lowercasing - change (mediawiki...Cargo)
Yaron Koren has uploaded a new change for review. https://gerrit.wikimedia.org/r/280806 Change subject: Added quotes around field names, to avoid Postgres lowercasing .. Added quotes around field names, to avoid Postgres lowercasing Change-Id: I1cdce214a08b6f9cbf9d6bd02cccd041f254fd11 --- M CargoSQLQuery.php M CargoUtils.php 2 files changed, 18 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cargo refs/changes/06/280806/1 diff --git a/CargoSQLQuery.php b/CargoSQLQuery.php index 51ebfc5..27995eb 100644 --- a/CargoSQLQuery.php +++ b/CargoSQLQuery.php @@ -1101,7 +1101,14 @@ // call the DB query. $realAliasedFieldNames = array(); foreach ( $this->mAliasedFieldNames as $alias => $fieldName ) { - $realAliasedFieldNames['"' . $alias . '"'] = $fieldName; + $alias = $cdb->addIdentifierQuotes( $alias ); + // If it's really a field name, add quotes around it. + // (The quotes are mostly needed for Postgres, which + // lowercases all unquoted fields.) + if ( strpos( $fieldName, '(' ) === false ) { + $fieldName = $cdb->addIdentifierQuotes( $fieldName ); + } + $realAliasedFieldNames[$alias] = $fieldName; } $res = $cdb->select( $this->mTableNames, $realAliasedFieldNames, $this->mWhereStr, __METHOD__, diff --git a/CargoUtils.php b/CargoUtils.php index 3cc4f7a..ce212df 100644 --- a/CargoUtils.php +++ b/CargoUtils.php @@ -536,11 +536,11 @@ $createSQL = "CREATE TABLE " . $cdb->tableName( $tableName ) . ' ( ' . - "_ID $intTypeString NOT NULL UNIQUE, " . - "_pageName $stringTypeString NOT NULL, " . - "_pageTitle $stringTypeString NOT NULL, " . - "_pageNamespace $intTypeString NOT NULL, " . - "_pageID $intTypeString NOT NULL"; + $cdb->addIdentifierQuotes( '_ID' ) . " $intTypeString NOT NULL UNIQUE, " . + $cdb->addIdentifierQuotes( '_pageName' ) . " $stringTypeString NOT NULL, " . + $cdb->addIdentifierQuotes( '_pageTitle' ) . " $stringTypeString NOT NULL, " . + $cdb->addIdentifierQuotes( '_pageNamespace' ) . " $intTypeString NOT NULL, " . + $cdb->addIdentifierQuotes( '_pageID' ) . " $intTypeString NOT NULL"; foreach ( $tableSchema->mFieldDescriptions as $fieldName => $fieldDescription ) { $size = $fieldDescription->mSize; @@ -552,7 +552,7 @@ // instead, we'll have one called // fieldName + '__full', and a separate table // for holding each value. - $createSQL .= ', ' . $fieldName . '__full '; + $createSQL .= ', ' . $cdb->addIdentifierQuotes( $fieldName . '__full' ) . ' '; // The field holding the full list will always // just be text $createSQL .= $stringTypeString; @@ -563,16 +563,16 @@ if ( !$isList && $fieldType == 'Coordinates' ) { $floatTypeString = self::fieldTypeToSQLType( 'Float', $dbType ); - $createSQL .= ', ' . $fieldName . '__lat '; + $createSQL .= ', ' . $cdb->addIdentifierQuotes( $fieldName . '__lat' ) . ' '; $createSQL .= $floatTypeString; - $createSQL .= ', ' . $fieldName . '__lon '; + $createSQL .= ', ' . $cdb->addIdentifierQuotes( $fieldName . '__lon' ) . ' '; $createSQL .= $floatTypeString; } elseif ( $fieldType == 'Date' || $fieldType == 'Datetime' ) { $integerTypeString = self::fieldTypeToSQLType( 'Integer', $dbType ); - $createSQL .= ', ' . $fieldName . '__precision '; + $createSQL .= ", " . $cdb->addIdentifierQuotes( $fieldName . '__precision' ) . ' '; $createSQL .= $integerTypeString; } elseif ( $fieldType == 'Searchtext' ) { - $createSQL .= ", FULLTEXT KEY $fieldName ($fieldName)"; + $createSQL .= ", FULLTEXT KEY $fieldName (" . $cdb->addIdentifierQuotes( $fieldName ) . ')'; } } $createSQL .= ' )'; -- To view,
[MediaWiki-commits] [Gerrit] ganglia: leave aggregator on hooft until bast3001 works - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: ganglia: leave aggregator on hooft until bast3001 works .. ganglia: leave aggregator on hooft until bast3001 works amslvs1 doesn't boot into PXE.. sigh :/ leave the aggregator for esams on hooft until bast3001 actually works, we don't want ganglia to be broken for so long. Bug:T123712 Change-Id: I5c3bf03efc2c850b01d1df867be5cf2536ea9eb6 --- M hieradata/esams.yaml M manifests/site.pp 2 files changed, 5 insertions(+), 1 deletion(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/hieradata/esams.yaml b/hieradata/esams.yaml index 767f77c..030ef4d 100644 --- a/hieradata/esams.yaml +++ b/hieradata/esams.yaml @@ -1 +1 @@ -ganglia_aggregators: bast3001.wikimedia.org:11649 +ganglia_aggregators: hooft.esams.wikimedia.org:11649 diff --git a/manifests/site.pp b/manifests/site.pp index 9c7ca56..ff4cd5b 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -1179,6 +1179,10 @@ } role bastionhost::general, installserver::tftp_server +class { 'ganglia::monitor::aggregator': +sites => 'esams', +} + } # Primary graphite machines -- To view, visit https://gerrit.wikimedia.org/r/280803 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5c3bf03efc2c850b01d1df867be5cf2536ea9eb6 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: DzahnGerrit-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] IndicatorElement: Rename protected "indicator" property - change (oojs/ui)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/280804 Change subject: IndicatorElement: Rename protected "indicator" property .. IndicatorElement: Rename protected "indicator" property This renames the "indicator" property to "indicatorName" because the move to traits will cause a conflict with the other "indicator" property representing the target Tag. Change-Id: I8f0bbca09c3acea7c3ae343bc883bd386a02c404 --- M php/mixins/IndicatorElement.php 1 file changed, 8 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/04/280804/1 diff --git a/php/mixins/IndicatorElement.php b/php/mixins/IndicatorElement.php index deb0a5f..13371cc 100644 --- a/php/mixins/IndicatorElement.php +++ b/php/mixins/IndicatorElement.php @@ -18,7 +18,7 @@ * * @var string|null */ - protected $indicator = null; + protected $indicatorName = null; public static $targetPropertyName = 'indicator'; @@ -47,15 +47,15 @@ * @return $this */ public function setIndicator( $indicator = null ) { - if ( $this->indicator !== null ) { - $this->target->removeClasses( [ 'oo-ui-indicator-' . $this->indicator ] ); + if ( $this->indicatorName !== null ) { + $this->target->removeClasses( [ 'oo-ui-indicator-' . $this->indicatorName ] ); } if ( $indicator !== null ) { $this->target->addClasses( [ 'oo-ui-indicator-' . $indicator ] ); } - $this->indicator = $indicator; - $this->element->toggleClasses( [ 'oo-ui-indicatorElement' ], (bool)$this->indicator ); + $this->indicatorName = $indicator; + $this->element->toggleClasses( [ 'oo-ui-indicatorElement' ], (bool)$this->indicatorName ); return $this; } @@ -66,12 +66,12 @@ * @return string Symbolic name of indicator */ public function getIndicator() { - return $this->indicator; + return $this->indicatorName; } public function getConfig( &$config ) { - if ( $this->indicator !== null ) { - $config['indicator'] = $this->indicator; + if ( $this->indicatorName !== null ) { + $config['indicator'] = $this->indicatorName; } return parent::getConfig( $config ); } -- To view, visit https://gerrit.wikimedia.org/r/280804 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8f0bbca09c3acea7c3ae343bc883bd386a02c404 Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: Legoktm___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] LabelElement: Rename protected "label" property - change (oojs/ui)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/280805 Change subject: LabelElement: Rename protected "label" property .. LabelElement: Rename protected "label" property This renames the "label" property to "labelValue" because the move to traits will cause a conflict with the other "label" property representing the target Tag. Change-Id: I29f2580ace1a58c6b53ee16867a5b27ea0889eca --- M php/mixins/LabelElement.php 1 file changed, 8 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/05/280805/1 diff --git a/php/mixins/LabelElement.php b/php/mixins/LabelElement.php index 663972c..0daa862 100644 --- a/php/mixins/LabelElement.php +++ b/php/mixins/LabelElement.php @@ -13,7 +13,7 @@ * * @var string|HtmlSnippet|null */ - protected $label = null; + protected $labelValue = null; public static $targetPropertyName = 'label'; @@ -43,18 +43,18 @@ * @return $this */ public function setLabel( $label ) { - $this->label = (string)$label ? $label : null; + $this->labelValue = (string)$label ? $label : null; $this->target->clearContent(); - if ( $this->label !== null ) { - if ( is_string( $this->label ) && $this->label !== '' && trim( $this->label ) === '' ) { + if ( $this->labelValue !== null ) { + if ( is_string( $this->labelValue ) && $this->labelValue !== '' && trim( $this->labelValue ) === '' ) { $this->target->appendContent( new HtmlSnippet( '' ) ); } else { $this->target->appendContent( $label ); } } - $this->element->toggleClasses( [ 'oo-ui-labelElement' ], !!$this->label ); + $this->element->toggleClasses( [ 'oo-ui-labelElement' ], !!$this->labelValue ); return $this; } @@ -65,12 +65,12 @@ * @return string|HtmlSnippet|null Label text */ public function getLabel() { - return $this->label; + return $this->labelValue; } public function getConfig( &$config ) { - if ( $this->label !== null ) { - $config['label'] = $this->label; + if ( $this->labelValue !== null ) { + $config['label'] = $this->labelValue; } return parent::getConfig( $config ); } -- To view, visit https://gerrit.wikimedia.org/r/280805 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I29f2580ace1a58c6b53ee16867a5b27ea0889eca Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: Legoktm___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] ganglia: leave aggregator on hooft until bast3001 works - change (operations/puppet)
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/280803 Change subject: ganglia: leave aggregator on hooft until bast3001 works .. ganglia: leave aggregator on hooft until bast3001 works amslvs1 doesn't boot into PXE.. sigh :/ leave the aggregator for esams on hooft until bast3001 actually works, we don't want ganglia to be broken for so long. Bug:T123712 Change-Id: I5c3bf03efc2c850b01d1df867be5cf2536ea9eb6 --- M hieradata/esams.yaml M manifests/site.pp 2 files changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/03/280803/1 diff --git a/hieradata/esams.yaml b/hieradata/esams.yaml index 767f77c..030ef4d 100644 --- a/hieradata/esams.yaml +++ b/hieradata/esams.yaml @@ -1 +1 @@ -ganglia_aggregators: bast3001.wikimedia.org:11649 +ganglia_aggregators: hooft.esams.wikimedia.org:11649 diff --git a/manifests/site.pp b/manifests/site.pp index 9c7ca56..806ca41 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -1179,6 +1179,10 @@ } role bastionhost::general, installserver::tftp_server +class { 'ganglia::monitor::aggregator': +sites => 'esams', +} +} } # Primary graphite machines -- To view, visit https://gerrit.wikimedia.org/r/280803 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5c3bf03efc2c850b01d1df867be5cf2536ea9eb6 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] Put Admin in steward group - change (mediawiki/vagrant)
Mattflaschen has uploaded a new change for review. https://gerrit.wikimedia.org/r/280802 Change subject: Put Admin in steward group .. Put Admin in steward group Change-Id: I4bdde571ba01ee798ad486fa19281c3240455c05 --- M puppet/modules/mediawiki/manifests/init.pp 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/02/280802/1 diff --git a/puppet/modules/mediawiki/manifests/init.pp b/puppet/modules/mediawiki/manifests/init.pp index a71f19c..dd9d84f 100644 --- a/puppet/modules/mediawiki/manifests/init.pp +++ b/puppet/modules/mediawiki/manifests/init.pp @@ -131,11 +131,12 @@ ], } -mediawiki::user { "admin_user_in_suppress_on_${db_name}": +mediawiki::user { "admin_user_in_steward_suppress_on_${db_name}": username => $admin_user, password => $admin_pass, wiki => $db_name, groups => [ +'steward', 'suppress', ], require => MediaWiki::Wiki[$wiki_name], -- To view, visit https://gerrit.wikimedia.org/r/280802 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4bdde571ba01ee798ad486fa19281c3240455c05 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant 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] TextInputWidget: Use getValidity in demos - change (oojs/ui)
Ricordisamoa has uploaded a new change for review. https://gerrit.wikimedia.org/r/280801 Change subject: TextInputWidget: Use getValidity in demos .. TextInputWidget: Use getValidity in demos Instead of the deprecated isValid method. Change-Id: Iaf73379a2d7bdc62306290ba5b19144ab405b9ee --- M demos/pages/widgets.js 1 file changed, 8 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/01/280801/1 diff --git a/demos/pages/widgets.js b/demos/pages/widgets.js index 2820c58..165b298 100644 --- a/demos/pages/widgets.js +++ b/demos/pages/widgets.js @@ -116,16 +116,14 @@ deferred = $.Deferred(), delay = 500 + Math.floor( Math.random() * 500 ); - this.isValid().done( function ( valid ) { - if ( valid ) { - // Resolve with results after a faked delay - setTimeout( function () { - deferred.resolve( [ value * 1, value * 2, value * 3, value * 4, value * 5 ] ); - }, delay ); - } else { - // No results when the input contains invalid content - deferred.resolve( [] ); - } + this.getValidity().then( function () { + // Resolve with results after a faked delay + setTimeout( function () { + deferred.resolve( [ value * 1, value * 2, value * 3, value * 4, value * 5 ] ); + }, delay ); + }, function () { + // No results when the input contains invalid content + deferred.resolve( [] ); } ); return deferred.promise( { abort: function () {} } ); -- To view, visit https://gerrit.wikimedia.org/r/280801 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iaf73379a2d7bdc62306290ba5b19144ab405b9ee Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: Ricordisamoa___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use resetUserEmail.php from core - change (mediawiki/vagrant)
Mattflaschen has uploaded a new change for review. https://gerrit.wikimedia.org/r/280800 Change subject: Use resetUserEmail.php from core .. Use resetUserEmail.php from core Change-Id: I7d2cf288b6829a8680dad762d0e1b0bc21a36b09 --- M puppet/modules/mediawiki/manifests/user.pp D puppet/modules/mediawiki/templates/set_user_email.erb 2 files changed, 1 insertion(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/00/280800/1 diff --git a/puppet/modules/mediawiki/manifests/user.pp b/puppet/modules/mediawiki/manifests/user.pp index a0e63a7..5c1c872 100644 --- a/puppet/modules/mediawiki/manifests/user.pp +++ b/puppet/modules/mediawiki/manifests/user.pp @@ -98,7 +98,7 @@ if $email { mediawiki::maintenance { "mediawiki_user_${canonical_username}_${wiki}_email": -command => template('mediawiki/set_user_email.erb'), +command => "/usr/local/bin/mwscript resetUserEmail.php --wiki='${wiki}' '${canonical_username}' '${email}' --no-reset-password", refreshonly => true, subscribe => Mediawiki::Maintenance["mediawiki_user_${canonical_username}_${wiki}"], } diff --git a/puppet/modules/mediawiki/templates/set_user_email.erb b/puppet/modules/mediawiki/templates/set_user_email.erb deleted file mode 100644 index ebe4e2d..000 --- a/puppet/modules/mediawiki/templates/set_user_email.erb +++ /dev/null @@ -1,5 +0,0 @@ -/bin/echo '$u = User::newFromName( "<%= @username %>" ); -$u->setEmail( "<%= @email %>" ); -$u->setEmailAuthenticationTimestamp( wfTimestamp() ); -$u->saveSettings();' | -/usr/local/bin/mwscript eval.php --wiki=<%= @wiki %> -- To view, visit https://gerrit.wikimedia.org/r/280800 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7d2cf288b6829a8680dad762d0e1b0bc21a36b09 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant 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] site.pp: temp add hooft back as install-server - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: site.pp: temp add hooft back as install-server .. site.pp: temp add hooft back as install-server Bug:T123712 Change-Id: I5457d5d5a27a280940d5996a26e8cd76ecebf929 --- M manifests/site.pp 1 file changed, 9 insertions(+), 0 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/manifests/site.pp b/manifests/site.pp index dcf4cb5..9c7ca56 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -1172,6 +1172,15 @@ } } +node 'hooft.esams.wikimedia.org' { + +interface::add_ip6_mapped { 'main': +interface => 'eth0', +} +role bastionhost::general, installserver::tftp_server + +} + # Primary graphite machines node 'graphite1001.eqiad.wmnet' { role graphite::production, statsdlb, performance, graphite::alerts, restbase::alerts, graphite::alerts::reqstats, elasticsearch::alerts -- To view, visit https://gerrit.wikimedia.org/r/280799 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5457d5d5a27a280940d5996a26e8cd76ecebf929 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: DzahnGerrit-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] site.pp: temp add hooft back as install-server - change (operations/puppet)
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/280799 Change subject: site.pp: temp add hooft back as install-server .. site.pp: temp add hooft back as install-server Bug:T123712 Change-Id: I5457d5d5a27a280940d5996a26e8cd76ecebf929 --- M manifests/site.pp 1 file changed, 9 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/99/280799/1 diff --git a/manifests/site.pp b/manifests/site.pp index dcf4cb5..9c7ca56 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -1172,6 +1172,15 @@ } } +node 'hooft.esams.wikimedia.org' { + +interface::add_ip6_mapped { 'main': +interface => 'eth0', +} +role bastionhost::general, installserver::tftp_server + +} + # Primary graphite machines node 'graphite1001.eqiad.wmnet' { role graphite::production, statsdlb, performance, graphite::alerts, restbase::alerts, graphite::alerts::reqstats, elasticsearch::alerts -- To view, visit https://gerrit.wikimedia.org/r/280799 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5457d5d5a27a280940d5996a26e8cd76ecebf929 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] install/ganglia/network: adjust bast3001 IP address - change (operations/puppet)
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/280798 Change subject: install/ganglia/network: adjust bast3001 IP address .. install/ganglia/network: adjust bast3001 IP address The IP address of bast3001 has changed to .112 from .113 which is still hooft as of right now. Bug:T123712 Change-Id: I88aaae4ca29c4f562b178a8558110334a7d231eb --- M manifests/network.pp M modules/ganglia/manifests/configuration.pp M modules/install_server/files/dhcpd/dhcpd.conf 3 files changed, 8 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/98/280798/1 diff --git a/manifests/network.pp b/manifests/network.pp index c22c7cf..26d0a1e 100644 --- a/manifests/network.pp +++ b/manifests/network.pp @@ -25,9 +25,8 @@ '2620:0:861:2:7a2b:cbff:fe09:11ba', # bast1001.wikimedia.org SLAAC '208.80.153.5', # bast2001.wikimedia.org '2620:0:860:1:208:80:153:5',# bast2001.wikimedia.org -'91.198.174.113', # bast3001.esams.wikimedia.org -'2620:0:862:1:91:198:174:113', # bast3001.esams.wikimedia.org -'2620:0:862:1:a6ba:dbff:fe30:d770', # bast3001.esams.wikimedia.org SLAAC +'91.198.174.112', # bast3001.esams.wikimedia.org +'2620:0:862:1:91:198:174:112', # bast3001.esams.wikimedia.org '198.35.26.5', # bast4001.wikimedia.org '2620:0:863:1:198:35:26:5', # bast4001.wikimedia.org '2620:0:863:1:92b1:1cff:fe4d:4249', # bast4001.wikimedia.org SLAAC @@ -56,9 +55,8 @@ '2620:0:861:2:7a2b:cbff:fe09:11ba', # bast1001.wikimedia.org SLAAC '208.80.153.5', # bast2001.wikimedia.org '2620:0:860:1:208:80:153:5',# bast2001.wikimedia.org -'91.198.174.113', # bast3001.esams.wikimedia.org -'2620:0:862:1:91:198:174:113', # bast3001.esams.wikimedia.org -'2620:0:862:1:a6ba:dbff:fe30:d770', # bast3001.esams.wikimedia.org SLAAC +'91.198.174.112', # bast3001.esams.wikimedia.org +'2620:0:862:1:91:198:174:112', # bast3001.esams.wikimedia.org '198.35.26.5', # bast4001.wikimedia.org '2620:0:863:1:198:35:26:5', # bast4001.wikimedia.org '2620:0:863:1:92b1:1cff:fe4d:4249', # bast4001.wikimedia.org SLAAC diff --git a/modules/ganglia/manifests/configuration.pp b/modules/ganglia/manifests/configuration.pp index 625d97d..ba8b8e9 100644 --- a/modules/ganglia/manifests/configuration.pp +++ b/modules/ganglia/manifests/configuration.pp @@ -11,7 +11,7 @@ $gmetad_hosts = [ '208.80.154.53', '208.80.154.150', '208.80.154.14' ] $aggregator_hosts = { 'eqiad' => [ ipresolve('carbon.wikimedia.org') ], -'esams' => [ '91.198.174.113' ], +'esams' => [ '91.198.174.112' ], 'codfw' => [ '208.80.153.4' ], 'ulsfo' => [ ipresolve('bast4001.wikimedia.org') ], } diff --git a/modules/install_server/files/dhcpd/dhcpd.conf b/modules/install_server/files/dhcpd/dhcpd.conf index c65ae81..795e31b 100644 --- a/modules/install_server/files/dhcpd/dhcpd.conf +++ b/modules/install_server/files/dhcpd/dhcpd.conf @@ -379,7 +379,7 @@ option domain-name "wikimedia.org"; option domain-name-servers 91.198.174.216, 208.80.154.239; # esams, eqiad caches -next-server 91.198.174.113; # bast3001 (tftp server) +next-server 91.198.174.112; # bast3001 (tftp server) } # esams Management subnet @@ -394,7 +394,7 @@ option domain-name "mgmt.esams.wmnet"; option domain-name-servers 91.198.174.216, 208.80.154.239; # esams, eqiad caches -next-server 91.198.174.113; # bast3001 (tftp server) +next-server 91.198.174.112; # bast3001 (tftp server) } # private1-esams subnet @@ -407,7 +407,7 @@ option domain-name "esams.wmnet"; option domain-name-servers 91.198.174.6, 208.80.154.239; # esams, eqiad caches -next-server 91.198.174.113; # bast3001 (tftp server) +next-server 91.198.174.112; # bast3001 (tftp server) } # -- To view, visit https://gerrit.wikimedia.org/r/280798 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I88aaae4ca29c4f562b178a8558110334a7d231eb Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org
[MediaWiki-commits] [Gerrit] assign IP to bast3001, v4 and v6 - change (operations/dns)
Dzahn has submitted this change and it was merged. Change subject: assign IP to bast3001, v4 and v6 .. assign IP to bast3001, v4 and v6 Assigning a free IP .112 next to hooft, .113 so we can install this box from hooft. Bug:T123712 Change-Id: Icb251914942aa1a3730aef691aeb55c7969fb556 --- M templates/174.198.91.in-addr.arpa M templates/2.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa M templates/wikimedia.org 3 files changed, 4 insertions(+), 0 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/templates/174.198.91.in-addr.arpa b/templates/174.198.91.in-addr.arpa index 7582b72..8c717ed 100644 --- a/templates/174.198.91.in-addr.arpa +++ b/templates/174.198.91.in-addr.arpa @@ -31,6 +31,7 @@ 107 1H IN PTR slauerhoff-array.esams.wikimedia.org. 108 1H IN PTR slauerhoff.esams.wikimedia.org. +112 1H IN PTR bast3001.wikimedia.org. 113 1H IN PTR hooft.esams.wikimedia.org. 114 1H IN PTR multatuli.wikimedia.org. diff --git a/templates/2.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa b/templates/2.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa index e22d8df..04c990f 100644 --- a/templates/2.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa +++ b/templates/2.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa @@ -28,6 +28,7 @@ 1.2.1.0.4.7.1.0.8.9.1.0.1.9.0.0 1H IN PTR eeden.wikimedia.org. 6.0.1.0.4.7.1.0.8.9.1.0.1.9.0.0 1H IN PTR nescio.wikimedia.org. +2.1.1.0.4.7.1.0.8.9.1.0.1.9.0.0 1H IN PTR bast3001.wikimedia.org. 3.1.1.0.4.7.1.0.8.9.1.0.1.9.0.0 1H IN PTR hooft.esams.wikimedia.org. 4.1.1.0.4.7.1.0.8.9.1.0.1.9.0.0 1H IN PTR multatuli.wikimedia.org. 2.2.1.0.4.7.1.0.8.9.1.0.1.9.0.0 1H IN PTR maerlant.wikimedia.org. diff --git a/templates/wikimedia.org b/templates/wikimedia.org index 43b0457..770df8a 100644 --- a/templates/wikimedia.org +++ b/templates/wikimedia.org @@ -107,6 +107,8 @@ 1H IN 2620:0:861:2:208:80:154:149 bast20011H IN A208.80.153.5 1H IN 2620:0:860:1:208:80:153:5 +bast30011H IN A91.198.174.112 +1H IN 2620:0:862:1:91:198:174:112 bast40011H IN A198.35.26.5 1H IN 2620:0:863:1:198:35:26:5 californium 1H IN A208.80.154.147 -- To view, visit https://gerrit.wikimedia.org/r/280797 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icb251914942aa1a3730aef691aeb55c7969fb556 Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: DzahnGerrit-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] assign IP to bast3001, v4 and v6 - change (operations/dns)
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/280797 Change subject: assign IP to bast3001, v4 and v6 .. assign IP to bast3001, v4 and v6 Assigning a free IP .112 next to hooft, .113 so we can install this box from hooft. Bug:T123712 Change-Id: Icb251914942aa1a3730aef691aeb55c7969fb556 --- M templates/174.198.91.in-addr.arpa M templates/2.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa M templates/wikimedia.org 3 files changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dns refs/changes/97/280797/1 diff --git a/templates/174.198.91.in-addr.arpa b/templates/174.198.91.in-addr.arpa index 7582b72..8c717ed 100644 --- a/templates/174.198.91.in-addr.arpa +++ b/templates/174.198.91.in-addr.arpa @@ -31,6 +31,7 @@ 107 1H IN PTR slauerhoff-array.esams.wikimedia.org. 108 1H IN PTR slauerhoff.esams.wikimedia.org. +112 1H IN PTR bast3001.wikimedia.org. 113 1H IN PTR hooft.esams.wikimedia.org. 114 1H IN PTR multatuli.wikimedia.org. diff --git a/templates/2.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa b/templates/2.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa index e22d8df..04c990f 100644 --- a/templates/2.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa +++ b/templates/2.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa @@ -28,6 +28,7 @@ 1.2.1.0.4.7.1.0.8.9.1.0.1.9.0.0 1H IN PTR eeden.wikimedia.org. 6.0.1.0.4.7.1.0.8.9.1.0.1.9.0.0 1H IN PTR nescio.wikimedia.org. +2.1.1.0.4.7.1.0.8.9.1.0.1.9.0.0 1H IN PTR bast3001.wikimedia.org. 3.1.1.0.4.7.1.0.8.9.1.0.1.9.0.0 1H IN PTR hooft.esams.wikimedia.org. 4.1.1.0.4.7.1.0.8.9.1.0.1.9.0.0 1H IN PTR multatuli.wikimedia.org. 2.2.1.0.4.7.1.0.8.9.1.0.1.9.0.0 1H IN PTR maerlant.wikimedia.org. diff --git a/templates/wikimedia.org b/templates/wikimedia.org index 43b0457..770df8a 100644 --- a/templates/wikimedia.org +++ b/templates/wikimedia.org @@ -107,6 +107,8 @@ 1H IN 2620:0:861:2:208:80:154:149 bast20011H IN A208.80.153.5 1H IN 2620:0:860:1:208:80:153:5 +bast30011H IN A91.198.174.112 +1H IN 2620:0:862:1:91:198:174:112 bast40011H IN A198.35.26.5 1H IN 2620:0:863:1:198:35:26:5 californium 1H IN A208.80.154.147 -- To view, visit https://gerrit.wikimedia.org/r/280797 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icb251914942aa1a3730aef691aeb55c7969fb556 Gerrit-PatchSet: 1 Gerrit-Project: operations/dns 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] Revert "Enable Ex:OATHAuth in beta, disabled for all users" - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Revert "Enable Ex:OATHAuth in beta, disabled for all users" .. Revert "Enable Ex:OATHAuth in beta, disabled for all users" This reverts commit 2b9a3cca4bdf16a96a730960a754e93f31f0fd35. Change-Id: Icb5361e797cac15f8061747e5338164131550664 --- M wmf-config/CommonSettings-labs.php M wmf-config/InitialiseSettings-labs.php 2 files changed, 0 insertions(+), 11 deletions(-) Approvals: CSteipp: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/CommonSettings-labs.php b/wmf-config/CommonSettings-labs.php index a5ef67c..8bf542b 100644 --- a/wmf-config/CommonSettings-labs.php +++ b/wmf-config/CommonSettings-labs.php @@ -337,13 +337,6 @@ $wgOresBaseUrl = 'https://ores.wmflabs.org/'; } -if ( $wmgUseOATHAuth && $wmgUseCentralAuth ) { - wfLoadExtension( 'OATHAuth' ); - $wgOATHAuthDatabase = 'centralauth'; - // Roll this feature out to specific groups initially - $wgGroupPermissions['*']['oathauth-enable'] = false; -} - // Experimental $wgGadgetsCaching = false; diff --git a/wmf-config/InitialiseSettings-labs.php b/wmf-config/InitialiseSettings-labs.php index 81d4b18..4f6240e 100644 --- a/wmf-config/InitialiseSettings-labs.php +++ b/wmf-config/InitialiseSettings-labs.php @@ -652,9 +652,5 @@ 'wmgUseCollection' => array( 'zhwiki' => true, // T128425 ), - // Test enabling OATH for 2FA - 'wmgUseOATHAuth' => array( - 'default' => true, - ) ); } # wmflLabsSettings() -- To view, visit https://gerrit.wikimedia.org/r/280796 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icb5361e797cac15f8061747e5338164131550664 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: CSteippGerrit-Reviewer: CSteipp 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 "Enable Ex:OATHAuth in beta, disabled for all users" - change (operations/mediawiki-config)
CSteipp has uploaded a new change for review. https://gerrit.wikimedia.org/r/280796 Change subject: Revert "Enable Ex:OATHAuth in beta, disabled for all users" .. Revert "Enable Ex:OATHAuth in beta, disabled for all users" This reverts commit 2b9a3cca4bdf16a96a730960a754e93f31f0fd35. Change-Id: Icb5361e797cac15f8061747e5338164131550664 --- M wmf-config/CommonSettings-labs.php M wmf-config/InitialiseSettings-labs.php 2 files changed, 0 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/96/280796/1 diff --git a/wmf-config/CommonSettings-labs.php b/wmf-config/CommonSettings-labs.php index a5ef67c..8bf542b 100644 --- a/wmf-config/CommonSettings-labs.php +++ b/wmf-config/CommonSettings-labs.php @@ -337,13 +337,6 @@ $wgOresBaseUrl = 'https://ores.wmflabs.org/'; } -if ( $wmgUseOATHAuth && $wmgUseCentralAuth ) { - wfLoadExtension( 'OATHAuth' ); - $wgOATHAuthDatabase = 'centralauth'; - // Roll this feature out to specific groups initially - $wgGroupPermissions['*']['oathauth-enable'] = false; -} - // Experimental $wgGadgetsCaching = false; diff --git a/wmf-config/InitialiseSettings-labs.php b/wmf-config/InitialiseSettings-labs.php index 81d4b18..4f6240e 100644 --- a/wmf-config/InitialiseSettings-labs.php +++ b/wmf-config/InitialiseSettings-labs.php @@ -652,9 +652,5 @@ 'wmgUseCollection' => array( 'zhwiki' => true, // T128425 ), - // Test enabling OATH for 2FA - 'wmgUseOATHAuth' => array( - 'default' => true, - ) ); } # wmflLabsSettings() -- To view, visit https://gerrit.wikimedia.org/r/280796 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icb5361e797cac15f8061747e5338164131550664 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: CSteipp___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Avoid redirect loop - change (mediawiki...mobileapps)
Ppchelko has submitted this change and it was merged. Change subject: Avoid redirect loop .. Avoid redirect loop Make sure req.params.opts is saved in getContent(). Bug: T131416 Change-Id: Ida7fb125fb107b32548b43d19b27383e044ce917 --- M lib/parsoid-access.js 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Ppchelko: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/parsoid-access.js b/lib/parsoid-access.js index a2e280e..948a4fd 100644 --- a/lib/parsoid-access.js +++ b/lib/parsoid-access.js @@ -101,6 +101,7 @@ }); } opts.redirects--; +req.params.opts = opts; return preq(request).then(function(response) { mwapi.checkResponseStatus(response); -- To view, visit https://gerrit.wikimedia.org/r/280789 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ida7fb125fb107b32548b43d19b27383e044ce917 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/services/mobileapps Gerrit-Branch: master Gerrit-Owner: BearNDGerrit-Reviewer: Dbrant Gerrit-Reviewer: Fjalapeno Gerrit-Reviewer: GWicke Gerrit-Reviewer: Mholloway Gerrit-Reviewer: Mhurd Gerrit-Reviewer: Mobrovac Gerrit-Reviewer: Niedzielski Gerrit-Reviewer: Ppchelko Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Revert "rename hooft.esams to bast3001" - change (operations/dns)
Dzahn has submitted this change and it was merged. Change subject: Revert "rename hooft.esams to bast3001" .. Revert "rename hooft.esams to bast3001" This reverts commit 493d6690e3accebbcec34afccb8d77f9f51bb04b. Change-Id: I4bf10d93c2b0815c785278b5bd9fc6ae1c6ca277 --- M templates/174.198.91.in-addr.arpa M templates/2.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa M templates/wikimedia.org 3 files changed, 4 insertions(+), 4 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/templates/174.198.91.in-addr.arpa b/templates/174.198.91.in-addr.arpa index 72fce2b..7582b72 100644 --- a/templates/174.198.91.in-addr.arpa +++ b/templates/174.198.91.in-addr.arpa @@ -31,7 +31,7 @@ 107 1H IN PTR slauerhoff-array.esams.wikimedia.org. 108 1H IN PTR slauerhoff.esams.wikimedia.org. -113 1H IN PTR bast3001.wikimedia.org. +113 1H IN PTR hooft.esams.wikimedia.org. 114 1H IN PTR multatuli.wikimedia.org. 121 1H IN PTR eeden.wikimedia.org. diff --git a/templates/2.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa b/templates/2.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa index 94ebd71..e22d8df 100644 --- a/templates/2.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa +++ b/templates/2.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa @@ -28,7 +28,7 @@ 1.2.1.0.4.7.1.0.8.9.1.0.1.9.0.0 1H IN PTR eeden.wikimedia.org. 6.0.1.0.4.7.1.0.8.9.1.0.1.9.0.0 1H IN PTR nescio.wikimedia.org. -3.1.1.0.4.7.1.0.8.9.1.0.1.9.0.0 1H IN PTR bast3001.wikimedia.org. +3.1.1.0.4.7.1.0.8.9.1.0.1.9.0.0 1H IN PTR hooft.esams.wikimedia.org. 4.1.1.0.4.7.1.0.8.9.1.0.1.9.0.0 1H IN PTR multatuli.wikimedia.org. 2.2.1.0.4.7.1.0.8.9.1.0.1.9.0.0 1H IN PTR maerlant.wikimedia.org. diff --git a/templates/wikimedia.org b/templates/wikimedia.org index 5b587e0..43b0457 100644 --- a/templates/wikimedia.org +++ b/templates/wikimedia.org @@ -107,8 +107,6 @@ 1H IN 2620:0:861:2:208:80:154:149 bast20011H IN A208.80.153.5 1H IN 2620:0:860:1:208:80:153:5 -bast30011H IN A91.198.174.113 -1H IN 2620:0:862:1:91:198:174:113 bast40011H IN A198.35.26.5 1H IN 2620:0:863:1:198:35:26:5 californium 1H IN A208.80.154.147 @@ -773,5 +771,7 @@ ; FIXME: these stay under .esams.wikimedia.org until they get reprovisioned slauerhoff.esams 1H IN A91.198.174.108 slauerhoff-array.esams 1H IN A91.198.174.107 +hooft.esams1H IN A91.198.174.113 + 1H IN 2620:0:862:1:91:198:174:113 ; esams Management scs-oe11-esams.esams 1H IN A10.21.0.102 -- To view, visit https://gerrit.wikimedia.org/r/280795 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4bf10d93c2b0815c785278b5bd9fc6ae1c6ca277 Gerrit-PatchSet: 2 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: DzahnGerrit-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] Enable Ex:OATHAuth in beta, disabled for all users - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Enable Ex:OATHAuth in beta, disabled for all users .. Enable Ex:OATHAuth in beta, disabled for all users Enable OATHAuth in beta, but disable it for all users. For testing, we'll give the user right to the global Staff group. Change-Id: I29d054e60d6c81524037143fab2bc07db4a2d38e --- M wmf-config/CommonSettings-labs.php M wmf-config/InitialiseSettings-labs.php 2 files changed, 11 insertions(+), 0 deletions(-) Approvals: CSteipp: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/CommonSettings-labs.php b/wmf-config/CommonSettings-labs.php index 8bf542b..a5ef67c 100644 --- a/wmf-config/CommonSettings-labs.php +++ b/wmf-config/CommonSettings-labs.php @@ -337,6 +337,13 @@ $wgOresBaseUrl = 'https://ores.wmflabs.org/'; } +if ( $wmgUseOATHAuth && $wmgUseCentralAuth ) { + wfLoadExtension( 'OATHAuth' ); + $wgOATHAuthDatabase = 'centralauth'; + // Roll this feature out to specific groups initially + $wgGroupPermissions['*']['oathauth-enable'] = false; +} + // Experimental $wgGadgetsCaching = false; diff --git a/wmf-config/InitialiseSettings-labs.php b/wmf-config/InitialiseSettings-labs.php index 4f6240e..81d4b18 100644 --- a/wmf-config/InitialiseSettings-labs.php +++ b/wmf-config/InitialiseSettings-labs.php @@ -652,5 +652,9 @@ 'wmgUseCollection' => array( 'zhwiki' => true, // T128425 ), + // Test enabling OATH for 2FA + 'wmgUseOATHAuth' => array( + 'default' => true, + ) ); } # wmflLabsSettings() -- To view, visit https://gerrit.wikimedia.org/r/280676 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I29d054e60d6c81524037143fab2bc07db4a2d38e Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: CSteippGerrit-Reviewer: CSteipp Gerrit-Reviewer: Dpatrick Gerrit-Reviewer: Florianschmidtwelzow 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 "rename hooft.esams to bast3001" - change (operations/dns)
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/280795 Change subject: Revert "rename hooft.esams to bast3001" .. Revert "rename hooft.esams to bast3001" This reverts commit 493d6690e3accebbcec34afccb8d77f9f51bb04b. Change-Id: I4bf10d93c2b0815c785278b5bd9fc6ae1c6ca277 --- M templates/174.198.91.in-addr.arpa M templates/2.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa M templates/wikimedia.org 3 files changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dns refs/changes/95/280795/1 diff --git a/templates/174.198.91.in-addr.arpa b/templates/174.198.91.in-addr.arpa index 72fce2b..7582b72 100644 --- a/templates/174.198.91.in-addr.arpa +++ b/templates/174.198.91.in-addr.arpa @@ -31,7 +31,7 @@ 107 1H IN PTR slauerhoff-array.esams.wikimedia.org. 108 1H IN PTR slauerhoff.esams.wikimedia.org. -113 1H IN PTR bast3001.wikimedia.org. +113 1H IN PTR hooft.esams.wikimedia.org. 114 1H IN PTR multatuli.wikimedia.org. 121 1H IN PTR eeden.wikimedia.org. diff --git a/templates/2.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa b/templates/2.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa index 94ebd71..e22d8df 100644 --- a/templates/2.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa +++ b/templates/2.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa @@ -28,7 +28,7 @@ 1.2.1.0.4.7.1.0.8.9.1.0.1.9.0.0 1H IN PTR eeden.wikimedia.org. 6.0.1.0.4.7.1.0.8.9.1.0.1.9.0.0 1H IN PTR nescio.wikimedia.org. -3.1.1.0.4.7.1.0.8.9.1.0.1.9.0.0 1H IN PTR bast3001.wikimedia.org. +3.1.1.0.4.7.1.0.8.9.1.0.1.9.0.0 1H IN PTR hooft.esams.wikimedia.org. 4.1.1.0.4.7.1.0.8.9.1.0.1.9.0.0 1H IN PTR multatuli.wikimedia.org. 2.2.1.0.4.7.1.0.8.9.1.0.1.9.0.0 1H IN PTR maerlant.wikimedia.org. diff --git a/templates/wikimedia.org b/templates/wikimedia.org index 5b587e0..43b0457 100644 --- a/templates/wikimedia.org +++ b/templates/wikimedia.org @@ -107,8 +107,6 @@ 1H IN 2620:0:861:2:208:80:154:149 bast20011H IN A208.80.153.5 1H IN 2620:0:860:1:208:80:153:5 -bast30011H IN A91.198.174.113 -1H IN 2620:0:862:1:91:198:174:113 bast40011H IN A198.35.26.5 1H IN 2620:0:863:1:198:35:26:5 californium 1H IN A208.80.154.147 @@ -773,5 +771,7 @@ ; FIXME: these stay under .esams.wikimedia.org until they get reprovisioned slauerhoff.esams 1H IN A91.198.174.108 slauerhoff-array.esams 1H IN A91.198.174.107 +hooft.esams1H IN A91.198.174.113 + 1H IN 2620:0:862:1:91:198:174:113 ; esams Management scs-oe11-esams.esams 1H IN A10.21.0.102 -- To view, visit https://gerrit.wikimedia.org/r/280795 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4bf10d93c2b0815c785278b5bd9fc6ae1c6ca277 Gerrit-PatchSet: 1 Gerrit-Project: operations/dns 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] Use appropriate selection args for recent searches - change (apps...wikipedia)
Niedzielski has uploaded a new change for review. https://gerrit.wikimedia.org/r/280794 Change subject: Use appropriate selection args for recent searches .. Use appropriate selection args for recent searches No functional change since the selection arguments are hardcoded in the database table. Change-Id: I3654ede2870ed2b43672afbb7d888450c36c85ba --- M app/src/main/java/org/wikipedia/search/SearchArticlesFragment.java 1 file changed, 1 insertion(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/94/280794/1 diff --git a/app/src/main/java/org/wikipedia/search/SearchArticlesFragment.java b/app/src/main/java/org/wikipedia/search/SearchArticlesFragment.java index f05e0b0..15f83f1 100644 --- a/app/src/main/java/org/wikipedia/search/SearchArticlesFragment.java +++ b/app/src/main/java/org/wikipedia/search/SearchArticlesFragment.java @@ -29,7 +29,6 @@ import org.wikipedia.concurrency.SaneAsyncTask; import org.wikipedia.events.WikipediaZeroStateChangeEvent; import org.wikipedia.history.HistoryEntry; -import org.wikipedia.history.HistoryEntryDatabaseTable; import org.wikipedia.page.PageActivity; import org.wikipedia.page.PageTitle; import org.wikipedia.settings.LanguagePreferenceDialog; @@ -443,7 +442,7 @@ @Override public Void performTask() throws Throwable { -app.getDatabaseClient(RecentSearch.class).upsert(entry, HistoryEntryDatabaseTable.Col.SELECTION); +app.getDatabaseClient(RecentSearch.class).upsert(entry, RecentSearchDatabaseTable.Col.SELECTION); return null; } -- To view, visit https://gerrit.wikimedia.org/r/280794 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3654ede2870ed2b43672afbb7d888450c36c85ba Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Niedzielski___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] install_server: re-use amslvs1 for bast3001 - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: install_server: re-use amslvs1 for bast3001 .. install_server: re-use amslvs1 for bast3001 Like I18fd69a3aeda597f43eb7 but not using multatuli and instead reusing amslvs1. Confirmed they are the same hardware type via racadm and this was shutdown so definitely wasn't used. Bug:T123712 Change-Id: I60dd78c79dda6a3173e84a3541a75f6e0c2dc37b --- M modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved 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 976f637..97faf36 100644 --- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 +++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 @@ -263,7 +263,7 @@ } host bast3001 { -hardware ethernet a4:ba:db:30:d7:70; +hardware ethernet a4:ba:db:38:e2:5e; fixed-address bast3001.wikimedia.org; option pxelinux.pathprefix "jessie-installer/"; filename "jessie-installer/debian-installer/amd64/pxelinux.0"; -- To view, visit https://gerrit.wikimedia.org/r/280791 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I60dd78c79dda6a3173e84a3541a75f6e0c2dc37b Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: DzahnGerrit-Reviewer: Dzahn 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] IconElement: Rename protected "icon" property - change (oojs/ui)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/280793 Change subject: IconElement: Rename protected "icon" property .. IconElement: Rename protected "icon" property This renames the "icon" property to "iconName" because the move to traits will cause a conflict with the other "icon" property representing the target Tag. There will be a slight inconsistency with the JavaScript version now, however that was already inconsistent because that used "$icon" to represent the icon object, which we can't do in PHP. Change-Id: I778e64592b695943eb9659665696c7a69ab27eed --- M php/mixins/IconElement.php 1 file changed, 8 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/93/280793/1 diff --git a/php/mixins/IconElement.php b/php/mixins/IconElement.php index 2a8cd0f..a55f1d8 100644 --- a/php/mixins/IconElement.php +++ b/php/mixins/IconElement.php @@ -18,7 +18,7 @@ * * @var string */ - protected $icon = null; + protected $iconName = null; public static $targetPropertyName = 'icon'; @@ -45,15 +45,15 @@ * @return $this */ public function setIcon( $icon = null ) { - if ( $this->icon !== null ) { - $this->target->removeClasses( [ 'oo-ui-icon-' . $this->icon ] ); + if ( $this->iconName !== null ) { + $this->target->removeClasses( [ 'oo-ui-icon-' . $this->iconName ] ); } if ( $icon !== null ) { $this->target->addClasses( [ 'oo-ui-icon-' . $icon ] ); } - $this->icon = $icon; - $this->element->toggleClasses( [ 'oo-ui-iconElement' ], (bool)$this->icon ); + $this->iconName = $icon; + $this->element->toggleClasses( [ 'oo-ui-iconElement' ], (bool)$this->iconName ); return $this; } @@ -64,12 +64,12 @@ * @return string Icon name */ public function getIcon() { - return $this->icon; + return $this->iconName; } public function getConfig( &$config ) { - if ( $this->icon !== null ) { - $config['icon'] = $this->icon; + if ( $this->iconName !== null ) { + $config['icon'] = $this->iconName; } return parent::getConfig( $config ); } -- To view, visit https://gerrit.wikimedia.org/r/280793 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I778e64592b695943eb9659665696c7a69ab27eed Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: Legoktm___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] T53852: Serialize localized image options for rtl languages - change (mediawiki...parsoid)
Arlolra has uploaded a new change for review. https://gerrit.wikimedia.org/r/280792 Change subject: T53852: Serialize localized image options for rtl languages .. T53852: Serialize localized image options for rtl languages * At least this much is agreed on. https://lists.wikimedia.org/pipermail/wikitech-l/2016-March/085146.html Change-Id: Iefc0f9fbb55a9c5ca10246871d027e569ea86167 --- M lib/html2wt/LinkHandler.js M tests/parserTests.txt 2 files changed, 12 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid refs/changes/92/280792/1 diff --git a/lib/html2wt/LinkHandler.js b/lib/html2wt/LinkHandler.js index e9e027b..cca33bd 100644 --- a/lib/html2wt/LinkHandler.js +++ b/lib/html2wt/LinkHandler.js @@ -1045,8 +1045,7 @@ }); if (idx < 0) { // New option, default to English localization for most languages - // TODO: use first alias (localized) instead for RTL languages (T53852) - no.ak = lastItem(no.ak); + no.ak = state.env.conf.wiki.rtl ? no.ak[0] : lastItem(no.ak); changed = true; return; /* new option */ } diff --git a/tests/parserTests.txt b/tests/parserTests.txt index 400cb76..7ee809a 100644 --- a/tests/parserTests.txt +++ b/tests/parserTests.txt @@ -13844,6 +13844,17 @@ !! end !! test +Localized image handling (3). +!! options +language=fa +parsoid=html2wt +!! html/parsoid + +!! wikitext +[[File:Foobar.jpg|بندانگشتی]] +!! end + +!! test "border", "frameless" and "class" attributes on an image. !! options thumbsize=220 -- To view, visit https://gerrit.wikimedia.org/r/280792 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iefc0f9fbb55a9c5ca10246871d027e569ea86167 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/parsoid Gerrit-Branch: master Gerrit-Owner: Arlolra___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] install_server: re-use amslvs1 for bast3001 - change (operations/puppet)
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/280791 Change subject: install_server: re-use amslvs1 for bast3001 .. install_server: re-use amslvs1 for bast3001 Like I18fd69a3aeda597f43eb7 but not using multatuli and instead reusing amslvs1. Confirmed they are the same hardware type via racadm and this was shutdown so definitely wasn't used. Bug:T123712 Change-Id: I60dd78c79dda6a3173e84a3541a75f6e0c2dc37b --- M modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/91/280791/1 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 976f637..97faf36 100644 --- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 +++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 @@ -263,7 +263,7 @@ } host bast3001 { -hardware ethernet a4:ba:db:30:d7:70; +hardware ethernet a4:ba:db:38:e2:5e; fixed-address bast3001.wikimedia.org; option pxelinux.pathprefix "jessie-installer/"; filename "jessie-installer/debian-installer/amd64/pxelinux.0"; -- To view, visit https://gerrit.wikimedia.org/r/280791 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I60dd78c79dda6a3173e84a3541a75f6e0c2dc37b 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] Move data constraints to config - change (mediawiki...DonationInterface)
Ejegg has uploaded a new change for review. https://gerrit.wikimedia.org/r/280790 Change subject: Move data constraints to config .. Move data constraints to config Declarative party, y'all. There are still some rules in GlobalCollect's tuneConstraints method, but this moves all the easy ones. Change-Id: Icea2b74e4d6d608cab2b832ed8470768db874dfc --- M adyen_gateway/adyen.adapter.php M amazon_gateway/amazon.adapter.php M astropay_gateway/astropay.adapter.php A astropay_gateway/config/data_constraints.yaml M gateway_common/gateway.adapter.php A globalcollect_gateway/config/data_constraints.yaml M globalcollect_gateway/globalcollect.adapter.php M paypal_gateway/paypal.adapter.php A worldpay_gateway/config/data_constraints.yaml M worldpay_gateway/worldpay.adapter.php 10 files changed, 339 insertions(+), 261 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface refs/changes/90/280790/1 diff --git a/adyen_gateway/adyen.adapter.php b/adyen_gateway/adyen.adapter.php index 7cfb42c..1dd74a0 100644 --- a/adyen_gateway/adyen.adapter.php +++ b/adyen_gateway/adyen.adapter.php @@ -45,9 +45,6 @@ ); } - function defineDataConstraints() { - } - function defineErrorMap() { $this->error_map = array( 'internal-' => 'donate_interface-processing-error', // Failed failed pre-process checks. diff --git a/amazon_gateway/amazon.adapter.php b/amazon_gateway/amazon.adapter.php index b8720d2..53930be 100644 --- a/amazon_gateway/amazon.adapter.php +++ b/amazon_gateway/amazon.adapter.php @@ -81,8 +81,6 @@ function defineReturnValueMap() {} - function defineDataConstraints() {} - function defineOrderIDMeta() { $this->order_id_meta = array( 'generate' => TRUE, diff --git a/astropay_gateway/astropay.adapter.php b/astropay_gateway/astropay.adapter.php index 274cf3a..599efc9 100644 --- a/astropay_gateway/astropay.adapter.php +++ b/astropay_gateway/astropay.adapter.php @@ -43,29 +43,6 @@ $this->accountInfo = $this->account_config; } - function defineDataConstraints() { - $this->dataConstraints = array( - 'x_login' => array( 'type' => 'alphanumeric', 'length' => 10, ), - 'x_trans_key' => array( 'type' => 'alphanumeric', 'length' => 10, ), - 'x_invoice' => array( 'type' => 'alphanumeric', 'length' => 20, ), - 'x_amount' => array( 'type' => 'numeric', ), - 'x_currency'=> array( 'type' => 'alphanumeric', 'length' => 3, ), - 'x_bank'=> array( 'type' => 'alphanumeric', 'length' => 3, ), - 'x_country' => array( 'type' => 'alphanumeric', 'length' => 2, ), - 'x_description' => array( 'type' => 'alphanumeric', 'length' => 200, ), - 'x_iduser' => array( 'type' => 'alphanumeric', 'length' => 20, ), - 'x_cpf' => array( 'type' => 'alphanumeric', 'length' => 30, ), - 'x_name'=> array( 'type' => 'alphanumeric', ), - 'x_email' => array( 'type' => 'alphanumeric', ), - 'x_bdate' => array( 'type' => 'date', 'length' => 8, ), - 'x_address' => array( 'type' => 'alphanumeric', ), - 'x_zip' => array( 'type' => 'alphanumeric', 'length' => 10, ), - 'x_city'=> array( 'type' => 'alphanumeric', ), - 'x_state' => array( 'type' => 'alphanumeric', 'length' => 2, ), - 'country_code' => array( 'type' => 'alphanumeric', 'length' => 2, ), - ); - } - function defineErrorMap() { $this->error_map = array( 'internal-' => 'donate_interface-processing-error', // Failed pre-process checks. diff --git a/astropay_gateway/config/data_constraints.yaml b/astropay_gateway/config/data_constraints.yaml new file mode 100644 index 000..2ac59be --- /dev/null +++ b/astropay_gateway/config/data_constraints.yaml @@ -0,0 +1,49 @@ +x_login: +type: alphanumeric +length: 10 +x_trans_key: +type: alphanumeric +length: 10 +x_invoice: +type: alphanumeric +length: 20 +x_amount: +type: numeric +x_currency: +type: alphanumeric +length: 3 +x_bank: +type: alphanumeric +length: 3 +x_country: +type: alphanumeric +length: 2 +x_description: +type: alphanumeric +length: 200 +x_iduser: +type:
[MediaWiki-commits] [Gerrit] Avoid redirect loop - change (mediawiki...mobileapps)
BearND has uploaded a new change for review. https://gerrit.wikimedia.org/r/280789 Change subject: Avoid redirect loop .. Avoid redirect loop Make sure req.params.opts is initialized in getContent(). Bug: T131416 Change-Id: Ida7fb125fb107b32548b43d19b27383e044ce917 --- M lib/parsoid-access.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps refs/changes/89/280789/1 diff --git a/lib/parsoid-access.js b/lib/parsoid-access.js index a2e280e..4ae2e88 100644 --- a/lib/parsoid-access.js +++ b/lib/parsoid-access.js @@ -73,7 +73,7 @@ */ function getContent(app, req) { var revision = req.params.revision; -var opts = req.params.opts; +var opts = req.params.opts = req.params.opts || {}; req.params.domain = req.params.domain.replace(/^(\w+\.)m\./, '$1'); var request = new Template(app.conf.restbase_req).expand({ -- To view, visit https://gerrit.wikimedia.org/r/280789 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ida7fb125fb107b32548b43d19b27383e044ce917 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/mobileapps Gerrit-Branch: master Gerrit-Owner: BearND___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Revert "install_server: make multatuli the new bast, not hooft" - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: Revert "install_server: make multatuli the new bast, not hooft" .. Revert "install_server: make multatuli the new bast, not hooft" This reverts commit 80bcff48206a2b208371db6cccf8c82adaa13100. Change-Id: I3b22a1fa8cd44e2da51779a929614246f4f20d53 --- M modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 1 file changed, 8 insertions(+), 1 deletion(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved 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 8bb9153..976f637 100644 --- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 +++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 @@ -263,7 +263,7 @@ } host bast3001 { -hardware ethernet a4:ba:db:30:d5:99; +hardware ethernet a4:ba:db:30:d7:70; fixed-address bast3001.wikimedia.org; option pxelinux.pathprefix "jessie-installer/"; filename "jessie-installer/debian-installer/amd64/pxelinux.0"; @@ -3692,6 +3692,13 @@ fixed-address ms-fe3002.esams.wmnet; } +host multatuli { +hardware ethernet a4:ba:db:30:d5:99; +fixed-address multatuli.wikimedia.org; +option pxelinux.pathprefix "jessie-installer/"; +filename "jessie-installer/debian-installer/amd64/pxelinux.0"; +} + host mw1001 { hardware ethernet 84:2b:2b:78:2c:b4; fixed-address mw1001.eqiad.wmnet; -- To view, visit https://gerrit.wikimedia.org/r/280788 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3b22a1fa8cd44e2da51779a929614246f4f20d53 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: DzahnGerrit-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] Revert "install_server: make multatuli the new bast, not hooft" - change (operations/puppet)
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/280788 Change subject: Revert "install_server: make multatuli the new bast, not hooft" .. Revert "install_server: make multatuli the new bast, not hooft" This reverts commit 80bcff48206a2b208371db6cccf8c82adaa13100. Change-Id: I3b22a1fa8cd44e2da51779a929614246f4f20d53 --- M modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 1 file changed, 8 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/88/280788/1 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 8bb9153..976f637 100644 --- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 +++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 @@ -263,7 +263,7 @@ } host bast3001 { -hardware ethernet a4:ba:db:30:d5:99; +hardware ethernet a4:ba:db:30:d7:70; fixed-address bast3001.wikimedia.org; option pxelinux.pathprefix "jessie-installer/"; filename "jessie-installer/debian-installer/amd64/pxelinux.0"; @@ -3692,6 +3692,13 @@ fixed-address ms-fe3002.esams.wmnet; } +host multatuli { +hardware ethernet a4:ba:db:30:d5:99; +fixed-address multatuli.wikimedia.org; +option pxelinux.pathprefix "jessie-installer/"; +filename "jessie-installer/debian-installer/amd64/pxelinux.0"; +} + host mw1001 { hardware ethernet 84:2b:2b:78:2c:b4; fixed-address mw1001.eqiad.wmnet; -- To view, visit https://gerrit.wikimedia.org/r/280788 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3b22a1fa8cd44e2da51779a929614246f4f20d53 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] WIP: Comment shared_apt_cache - change (mediawiki/vagrant)
Tim Landscheidt has uploaded a new change for review. https://gerrit.wikimedia.org/r/280787 Change subject: WIP: Comment shared_apt_cache .. WIP: Comment shared_apt_cache Change-Id: Ie206123e5d6ef92f07df945e5e9462f6198dabd3 --- M Vagrantfile 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/87/280787/1 diff --git a/Vagrantfile b/Vagrantfile index 93ff0bb..b35e11c 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -244,7 +244,7 @@ 'git_user' => settings[:git_user], 'forwarded_port' => settings[:http_port], 'forwarded_https_port' => settings[:https_port], - 'shared_apt_cache' => '/vagrant/cache/apt/', + # 'shared_apt_cache' => '/vagrant/cache/apt/', 'environment'=> ENV['MWV_ENVIRONMENT'] || 'vagrant', 'vmhost' => Socket.gethostname, # T86282: Force Puppet's LANG env var by exploiting a factor quirk. -- To view, visit https://gerrit.wikimedia.org/r/280787 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie206123e5d6ef92f07df945e5e9462f6198dabd3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: Tim Landscheidt___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add support for libvirt (KVM/QEMU) - change (mediawiki/vagrant)
Tim Landscheidt has uploaded a new change for review. https://gerrit.wikimedia.org/r/280785 Change subject: Add support for libvirt (KVM/QEMU) .. Add support for libvirt (KVM/QEMU) Bug: T71223 Change-Id: I64a4af3a8b6fa3a7571f48281044ce9776eb204b --- M README.md M Vagrantfile A support/README-libvirt.md 3 files changed, 52 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/85/280785/1 diff --git a/README.md b/README.md index ab11485..53a6a12 100644 --- a/README.md +++ b/README.md @@ -17,9 +17,10 @@ You'll need to install recent versions of Vagrant and VirtualBox. -(Note that *experimental* support for Parallels, LXC, VMWare Fusion, and -Microsoft Hyper-V providers exists. See `support/README-lxc.md` or -`support/README-parallels.md` for details on the former two.) +(Note that *experimental* support for Parallels, LXC, libvirt +(KVM/QEMU), VMWare Fusion, and Microsoft Hyper-V providers exists. +See `support/README-libvirt.md` `support/README-lxc.md` or +`support/README-parallels.md` for details on the former three.) * VirtualBox: https://www.virtualbox.org/wiki/Downloads * Vagrant: https://www.vagrantup.com/downloads-archive.html (the version must be diff --git a/Vagrantfile b/Vagrantfile index 5e27203..7d798cd 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -116,6 +116,13 @@ override.vm.network :private_network, ip: settings[:static_ip] end + # libvirt (KVM/QEMU) provider. Enable with `--provider=libvirt`. + config.vm.provider :libvirt do |_libvirt, override| +override.vm.box = 'trusty-cloud' + +override.vm.network :private_network, ip: settings[:static_ip] + end + config.vm.network :forwarded_port, guest: 80, host: settings[:http_port], host_ip: settings[:host_ip], id: 'http' @@ -192,6 +199,12 @@ lxc.customize 'cgroup.memory.limit_in_bytes', "#{settings[:vagrant_ram]}M" end + config.vm.provider :libvirt do |libvirt| +libvirt.driver = 'qemu' +libvirt.memory = settings[:vagrant_ram] +libvirt.cpus = settings[:vagrant_cores] + end + config.vm.provision :lsb_check do |lsb| lsb.version = '14.04' end diff --git a/support/README-libvirt.md b/support/README-libvirt.md new file mode 100644 index 000..bbdaf77 --- /dev/null +++ b/support/README-libvirt.md @@ -0,0 +1,35 @@ +# Using libvirt (KVM/QEMU) with MediaWiki-Vagrant # + +libvirt is a virtualization API. It supports multiple backends +(hypervisors), including KVM/QEMU. + + + +## Setup ## + +Running MediaWiki-Vagrant in KVM/QEMU under libvirt requires to +install the libvirt Vagrant plugin. In a Fedora system, you can just +install the package vagrant-libvirt. + +In addition you need convert the Ubuntu Trusty VirtualBox box that +MediaWiki-Vagrant uses by default for the libvirt provider. To do +that: + +1. Install the mutate Vagrant plugin by "vagrant plugin install mutate". +2. Download the Ubuntu Trusty VirtualBox box by "vagrant box add + trusty-cloud + https://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box;. +3. Convert the box by "vagrant mutate trusty-cloud libvirt". + + + +## Use ## + +vagrant up --provider=libvirt + + + +## Caveats ## + + * Currently vagrant-libvirt does only support system VMs +(cf. https://github.com/pradels/vagrant-libvirt/issues/272). -- To view, visit https://gerrit.wikimedia.org/r/280785 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I64a4af3a8b6fa3a7571f48281044ce9776eb204b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: Tim Landscheidt___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add setting nfs_force_v3 to force NFS 3 - change (mediawiki/vagrant)
Tim Landscheidt has uploaded a new change for review. https://gerrit.wikimedia.org/r/280786 Change subject: Add setting nfs_force_v3 to force NFS 3 .. Add setting nfs_force_v3 to force NFS 3 Change-Id: Ie6a28e128ee06a3b2a02d0b8c83dff2b62050e26 --- M Gemfile.lock M Vagrantfile M features/config.feature M lib/mediawiki-vagrant/settings/definitions.rb M lib/mediawiki-vagrant/version.rb M spec/mediawiki_vagrant/settings/definitions_spec.rb 6 files changed, 32 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/86/280786/1 diff --git a/Gemfile.lock b/Gemfile.lock index 8a3a135..24b53e2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -24,7 +24,7 @@ PATH remote: . specs: -mediawiki-vagrant (0.13.0) +mediawiki-vagrant (0.14.0) GEM remote: https://rubygems.org/ diff --git a/Vagrantfile b/Vagrantfile index 7d798cd..93ff0bb 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -145,6 +145,7 @@ root_share_options[:type] = :nfs root_share_options[:mount_options] = ['noatime', 'rsize=32767', 'wsize=32767', 'async'] root_share_options[:mount_options] << 'fsc' if settings[:nfs_cache] +root_share_options[:mount_options] << 'vers=3' if settings[:nfs_force_v3] config.nfs.map_uid = Process.uid config.nfs.map_gid = Process.gid else diff --git a/features/config.feature b/features/config.feature index 2d002aa..2231923 100644 --- a/features/config.feature +++ b/features/config.feature @@ -29,6 +29,7 @@ | http_port | | https_port| | nfs_shares| + | nfs_force_v3 | | forward_agent | | forward_x11 | @@ -77,6 +78,7 @@ | https_port| 4433| | host_ip | 0.0.0.0 | | nfs_shares| no | + | nfs_force_v3 | no | | nfs_cache | yes | | forward_agent | yes | | forward_x11 | no | @@ -90,6 +92,7 @@ | https_port| 4433| | host_ip | 0.0.0.0 | | nfs_shares| no | + | nfs_force_v3 | no | | nfs_cache | yes | | forward_agent | yes | | forward_x11 | no | diff --git a/lib/mediawiki-vagrant/settings/definitions.rb b/lib/mediawiki-vagrant/settings/definitions.rb index 38917c4..b2952e5 100644 --- a/lib/mediawiki-vagrant/settings/definitions.rb +++ b/lib/mediawiki-vagrant/settings/definitions.rb @@ -47,6 +47,12 @@ default: defined?(Vagrant::Util::Platform) ? !Vagrant::Util::Platform.windows? : true, coercion: ->(_setting, new) { !!(new.to_s =~ /^(true|t|yes|y|1)$/i) } +setting :nfs_force_v3, + description: 'Use NFS version 3', + help: "Enter 'yes' or 'no'.", + default: false, + coercion: ->(_setting, new) { !!(new.to_s =~ /^(true|t|yes|y|1)$/i) } + setting :nfs_cache, description: 'Use cachefilesd to speed up NFS file access (EXPERIMENTAL)', help: "Enter 'yes' or 'no'. If your VM is currently running, reload it after changing this setting.", diff --git a/lib/mediawiki-vagrant/version.rb b/lib/mediawiki-vagrant/version.rb index 93797c0..f401f2b 100644 --- a/lib/mediawiki-vagrant/version.rb +++ b/lib/mediawiki-vagrant/version.rb @@ -1,3 +1,3 @@ module MediaWikiVagrant - VERSION = '0.13.0' + VERSION = '0.14.0' end diff --git a/spec/mediawiki_vagrant/settings/definitions_spec.rb b/spec/mediawiki_vagrant/settings/definitions_spec.rb index c4232be..cfa59a0 100644 --- a/spec/mediawiki_vagrant/settings/definitions_spec.rb +++ b/spec/mediawiki_vagrant/settings/definitions_spec.rb @@ -127,6 +127,26 @@ end end + describe 'nfs_force_v3' do +subject { definitions[:nfs_force_v3] } + +context 'when a new value is set' do + it 'considers values "true", "t", "yes", "y", "1" all to be true' do +%w(true t yes y 1).each do |value| + subject.value = value + expect(subject.value).to be(true), "expected #{value} to be considered true" +end + end + + it 'considers values "false", "f", "no", "n", "0" to be false' do +%w(false f no n 0).each do |value| + subject.value = value + expect(subject.value).to be(false), "expected #{value} to be considered false" +end + end +end + end + describe 'forward_agent' do subject { definitions[:forward_agent] } -- To view, visit https://gerrit.wikimedia.org/r/280786 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie6a28e128ee06a3b2a02d0b8c83dff2b62050e26 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: Tim Landscheidt___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org
[MediaWiki-commits] [Gerrit] contint:firewall: let phabricator talk to gearman - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: contint:firewall: let phabricator talk to gearman .. contint:firewall: let phabricator talk to gearman Let phabricator on iridium connect to Gearman on gallium as requested. Bug:T131375 Change-Id: I6394329a84ae9d6320fd6f30a4c869d72984e49c --- M hieradata/common/contint.yaml M modules/contint/manifests/firewall.pp 2 files changed, 10 insertions(+), 0 deletions(-) Approvals: 20after4: Looks good to me, but someone else must approve jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/hieradata/common/contint.yaml b/hieradata/common/contint.yaml index 05df9eb..cfb8378 100644 --- a/hieradata/common/contint.yaml +++ b/hieradata/common/contint.yaml @@ -3,6 +3,7 @@ # Use ip address since the value is injected in an iptables rule and ferm # @resolve has undefined behavior. nodepool_host: '10.64.20.18' # labnodepool1001.eqiad.wmnet +phabricator_host: '10.64.32.150' # iridium.eqiad.wmnet # Hosts running zuul-merger process # diff --git a/modules/contint/manifests/firewall.pp b/modules/contint/manifests/firewall.pp index 12ff738..c118c04 100644 --- a/modules/contint/manifests/firewall.pp +++ b/modules/contint/manifests/firewall.pp @@ -34,6 +34,15 @@ port => '4730', srange => $nodepool_host, } + +# Let Phabricator talk to Gearman (T131375) +$phabricator_host = hiera('contint::phabricator_host') +ferm::service { 'gearman_from_phabricator': +proto => 'tcp', +port => '4730', +srange => $phabricator_host, +} + ferm::service { 'jenkins_zeromq_from_nodepool': proto => 'tcp', port => '', -- To view, visit https://gerrit.wikimedia.org/r/280706 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6394329a84ae9d6320fd6f30a4c869d72984e49c Gerrit-PatchSet: 4 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: DzahnGerrit-Reviewer: 20after4 Gerrit-Reviewer: Dzahn Gerrit-Reviewer: Hashar Gerrit-Reviewer: Rush Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] is_deleted is another way to opt out ; ) - change (wikimedia...tools)
Awight has uploaded a new change for review. https://gerrit.wikimedia.org/r/280784 Change subject: is_deleted is another way to opt out ;) .. is_deleted is another way to opt out ;) Bug: T130660 Change-Id: Ia0a5ea1b5e95a0c3d392c388c4100070373386f9 --- M silverpop_export/update_table.sql 1 file changed, 2 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/tools refs/changes/84/280784/1 diff --git a/silverpop_export/update_table.sql b/silverpop_export/update_table.sql index 1cbceb1..a874854 100755 --- a/silverpop_export/update_table.sql +++ b/silverpop_export/update_table.sql @@ -58,13 +58,12 @@ SELECT e.id, e.contact_id, e.email, c.first_name, c.last_name, IF(SUBSTRING(c.preferred_language, 1, 1) = '_', 'en', SUBSTRING(c.preferred_language, 1, 2)), -(c.is_opt_out OR c.do_not_email OR e.on_hold OR COALESCE(d.do_not_solicit, 0)) +(c.is_opt_out OR c.do_not_email OR e.on_hold OR COALESCE(d.do_not_solicit, 0) OR c.is_deleted) FROM civicrm.civicrm_email e LEFT JOIN civicrm.civicrm_contact c ON e.contact_id = c.id LEFT JOIN civicrm.wmf_donor d ON d.entity_id = c.id WHERE -e.email IS NOT NULL AND e.email != '' -AND c.is_deleted = 0; +e.email IS NOT NULL AND e.email != ''; -- Find the latest donation for each email address. Ordering by -- recieve_date and total_amount descending should always insert -- To view, visit https://gerrit.wikimedia.org/r/280784 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia0a5ea1b5e95a0c3d392c388c4100070373386f9 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/tools Gerrit-Branch: master Gerrit-Owner: Awight___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move var_map to config - change (mediawiki...DonationInterface)
Ejegg has uploaded a new change for review. https://gerrit.wikimedia.org/r/280783 Change subject: Move var_map to config .. Move var_map to config Thanks for handing out the whittling knives, cwd! Change-Id: I5ab795d58bd9b5ae83bc827c9205d44f66cf32ec --- M adyen_gateway/adyen.adapter.php A adyen_gateway/config/var_map.yaml M amazon_gateway/amazon.adapter.php M astropay_gateway/astropay.adapter.php A astropay_gateway/config/var_map.yaml M gateway_common/gateway.adapter.php A globalcollect_gateway/config/var_map.yaml M globalcollect_gateway/globalcollect.adapter.php A paypal_gateway/config/var_map.yaml M paypal_gateway/paypal.adapter.php A worldpay_gateway/config/var_map.yaml M worldpay_gateway/worldpay.adapter.php 12 files changed, 147 insertions(+), 181 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface refs/changes/83/280783/1 diff --git a/adyen_gateway/adyen.adapter.php b/adyen_gateway/adyen.adapter.php index 3b5e30a..c3bea70 100644 --- a/adyen_gateway/adyen.adapter.php +++ b/adyen_gateway/adyen.adapter.php @@ -69,41 +69,6 @@ $this->data_transformers = parent::getCoreDataTransformers(); } - /** -* Define var_map -*/ - function defineVarMap() { - $this->var_map = array( - 'allowedMethods' => 'allowed_methods', - 'billingAddress.city' => 'city', - 'billingAddress.country' => 'country', - 'billingAddress.postalCode' => 'zip', - 'billingAddress.stateOrProvince' => 'state', - 'billingAddress.street' => 'street', - 'billingAddressType' => 'billing_address_type', - 'blockedMethods' => 'blocked_methods', - 'card.cardHolderName' => 'full_name', - 'currencyCode' => 'currency_code', - 'deliveryAddressType' => 'delivery_address_type', - 'merchantAccount' => 'merchant_account', - 'merchantReference' => 'order_id', - 'merchantReturnData' => 'return_data', - 'merchantSig' => 'hpp_signature', - 'offset' => 'risk_score', - 'orderData' => 'order_data', - 'paymentAmount' => 'amount', - 'pspReference' => 'gateway_txn_id', - 'recurringContract' => 'recurring_type', - 'sessionValidity' => 'session_expiration', - 'shipBeforeDate' => 'expiration', - 'shopperEmail' => 'email', - 'shopperLocale' => 'language', - 'shopperReference' => 'customer_id', - 'shopperStatement' => 'statement_template', - 'skinCode' => 'skin_code', - ); - } - function defineReturnValueMap() { $this->return_value_map = array( 'authResult' => 'result', diff --git a/adyen_gateway/config/var_map.yaml b/adyen_gateway/config/var_map.yaml new file mode 100644 index 000..ce01b4a --- /dev/null +++ b/adyen_gateway/config/var_map.yaml @@ -0,0 +1,27 @@ +allowedMethods: allowed_methods +billingAddress.city: city +billingAddress.country: country +billingAddress.postalCode: zip +billingAddress.stateOrProvince: state +billingAddress.street: street +billingAddressType: billing_address_type +blockedMethods: blocked_methods +card.cardHolderName: full_name +currencyCode: currency_code +deliveryAddressType: delivery_address_type +merchantAccount: merchant_account +merchantReference: order_id +merchantReturnData: return_data +merchantSig: hpp_signature +offset: risk_score +orderData: order_data +paymentAmount: amount +pspReference: gateway_txn_id +recurringContract: recurring_type +sessionValidity: session_expiration +shipBeforeDate: expiration +shopperEmail: email +shopperLocale: language +shopperReference: customer_id +shopperStatement: statement_template +skinCode: skin_code diff --git a/amazon_gateway/amazon.adapter.php b/amazon_gateway/amazon.adapter.php index 8f043e0..33987ea 100644 --- a/amazon_gateway/amazon.adapter.php +++ b/amazon_gateway/amazon.adapter.php @@ -74,11 +74,6 @@ ); } - function defineVarMap() { - // TODO: maybe use this for mapping gatway data to API call parameters - $this->var_map = array(); - } - function defineAccountInfo() { // We use account_config instead $this->accountInfo = array(); diff --git a/astropay_gateway/astropay.adapter.php b/astropay_gateway/astropay.adapter.php index f1e60c2..7368fbd 100644 --- a/astropay_gateway/astropay.adapter.php +++ b/astropay_gateway/astropay.adapter.php @@
[MediaWiki-commits] [Gerrit] snapshots: one more dblist dir fixup - change (operations/puppet)
ArielGlenn has submitted this change and it was merged. Change subject: snapshots: one more dblist dir fixup .. snapshots: one more dblist dir fixup Change-Id: Ifab8f571f814007110bdd5789ddb1f1f7fdcf60d --- M modules/snapshot/templates/wikidump.conf.erb 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: ArielGlenn: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/snapshot/templates/wikidump.conf.erb b/modules/snapshot/templates/wikidump.conf.erb index 757efa5..82c3502 100644 --- a/modules/snapshot/templates/wikidump.conf.erb +++ b/modules/snapshot/templates/wikidump.conf.erb @@ -11,7 +11,7 @@ biglist=<%= scope.lookupvar('snapshot::dumps::dirs::apachedir') -%>/dblists/big.dblist skipdblist=<%= @config[@configtype]['skipdblist'] %> wikidatalist=<%= scope.lookupvar('snapshot::dumps::dirs::apachedir') -%>/dblists/wikidata.dblist -globalusagelist=<%= scope.lookupvar('snapshot::dumps::dirs::dumpsdir::dblistsdir') -%>/globalusage.dblist +globalusagelist=<%= scope.lookupvar('snapshot::dumps::dirs::dblistsdir') -%>/globalusage.dblist wikidataclientlist=<%= scope.lookupvar('snapshot::dumps::dirs::apachedir') -%>/dblists/wikidataclient.dblist nonflowlist=<%= scope.lookupvar('snapshot::dumps::dirs::apachedir') -%>/dblists/nonflow.dblist dir=<%= scope.lookupvar('snapshot::dumps::dirs::apachedir') %> -- To view, visit https://gerrit.wikimedia.org/r/280782 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifab8f571f814007110bdd5789ddb1f1f7fdcf60d Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: ArielGlennGerrit-Reviewer: ArielGlenn Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] snapshots: one more dblist dir fixup - change (operations/puppet)
ArielGlenn has uploaded a new change for review. https://gerrit.wikimedia.org/r/280782 Change subject: snapshots: one more dblist dir fixup .. snapshots: one more dblist dir fixup Change-Id: Ifab8f571f814007110bdd5789ddb1f1f7fdcf60d --- M modules/snapshot/templates/wikidump.conf.erb 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/82/280782/1 diff --git a/modules/snapshot/templates/wikidump.conf.erb b/modules/snapshot/templates/wikidump.conf.erb index 757efa5..82c3502 100644 --- a/modules/snapshot/templates/wikidump.conf.erb +++ b/modules/snapshot/templates/wikidump.conf.erb @@ -11,7 +11,7 @@ biglist=<%= scope.lookupvar('snapshot::dumps::dirs::apachedir') -%>/dblists/big.dblist skipdblist=<%= @config[@configtype]['skipdblist'] %> wikidatalist=<%= scope.lookupvar('snapshot::dumps::dirs::apachedir') -%>/dblists/wikidata.dblist -globalusagelist=<%= scope.lookupvar('snapshot::dumps::dirs::dumpsdir::dblistsdir') -%>/globalusage.dblist +globalusagelist=<%= scope.lookupvar('snapshot::dumps::dirs::dblistsdir') -%>/globalusage.dblist wikidataclientlist=<%= scope.lookupvar('snapshot::dumps::dirs::apachedir') -%>/dblists/wikidataclient.dblist nonflowlist=<%= scope.lookupvar('snapshot::dumps::dirs::apachedir') -%>/dblists/nonflow.dblist dir=<%= scope.lookupvar('snapshot::dumps::dirs::apachedir') %> -- To view, visit https://gerrit.wikimedia.org/r/280782 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifab8f571f814007110bdd5789ddb1f1f7fdcf60d Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: ArielGlenn___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update grunt-svg2png to commit ba12d37712bf9e7d568e3743339ce... - change (oojs/ui)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/280781 Change subject: Update grunt-svg2png to commit ba12d37712bf9e7d568e3743339cef5da0506ff8 .. Update grunt-svg2png to commit ba12d37712bf9e7d568e3743339cef5da0506ff8 Change-Id: Ib40d08962488be81ffe918cef7a458d5bca2f91d --- M package.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/81/280781/1 diff --git a/package.json b/package.json index 37b2b88..ea094fc 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "grunt-jsonlint": "1.0.7", "grunt-karma": "0.12.2", "grunt-promise-q": "0.1.1", -"grunt-svg2png": "git://github.com/jdforrester/grunt-svg2png.git#v0.2.7-wmf", +"grunt-svg2png": "git://github.com/jdforrester/grunt-svg2png.git#ba12d37712bf9e7d568e3743339cef5da0506ff8", "grunt-tyops": "0.1.0", "grunt": "0.4.5", "karma-chrome-launcher": "0.2.2", -- To view, visit https://gerrit.wikimedia.org/r/280781 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib40d08962488be81ffe918cef7a458d5bca2f91d Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui 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] Encrypt password when stored in user session - change (mediawiki...OATHAuth)
jenkins-bot has submitted this change and it was merged. Change subject: Encrypt password when stored in user session .. Encrypt password when stored in user session During the two-step login, users with OATH enabled need to have their login details saved into their session while we prompt them for their OATH code. This encrypts that data, so we don't write their user's password into our session storage. Change-Id: I9969871205ac5c438706df41ef1519cb4cd7a964 --- M OATHAuth.hooks.php A OATHAuthUtils.php M extension.json M special/SpecialOATH.php M special/SpecialOATHLogin.php 5 files changed, 120 insertions(+), 3 deletions(-) Approvals: MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/OATHAuth.hooks.php b/OATHAuth.hooks.php index 4e78c0a..0fd551c 100644 --- a/OATHAuth.hooks.php +++ b/OATHAuth.hooks.php @@ -81,7 +81,12 @@ $oathuser = $oathrepo->findByUser( $user ); if ( $oathuser->getKey() !== null && !$request->getCheck( 'token' ) ) { - $request->setSessionData( 'oath_login', $request->getValues() ); + $encData = OATHAuthUtils::encryptSessionData( + $request->getValues(), + $user->getId() + ); + $request->setSessionData( 'oath_login', $encData ); + $request->setSessionData( 'oath_uid', $user->getId() ); $output->redirect( SpecialPage::getTitleFor( 'OATH' )->getFullURL( '', false, PROTO_CURRENT ) ); return false; } else { diff --git a/OATHAuthUtils.php b/OATHAuthUtils.php new file mode 100644 index 000..9d8b401 --- /dev/null +++ b/OATHAuthUtils.php @@ -0,0 +1,105 @@ + substr( $keymats, 0, 32 ), + 'hmac' => substr( $keymats, 32, 32 ), + ); + } + + /** +* Actually encrypt the data, using a new random IV, and prepend the hmac +* of the encrypted data + IV, using a separate hmac key. +* @return $hmac.$iv.$ciphertext, each component b64 encoded +*/ + private static function seal( $data, $encKey, $hmacKey ) { + $iv = MWCryptRand::generate( 16, true ); + $ciphertext = openssl_encrypt( + $data, + 'aes-256-ctr', + $encKey, + OPENSSL_RAW_DATA, + $iv + ); + $sealed = base64_encode( $iv ) . '.' . base64_encode( $ciphertext ); + $hmac = hash_hmac( 'sha256', $sealed, $hmacKey, true ); + return base64_encode( $hmac ) . '.' . $sealed; + } + + /** +* Decrypt data sealed using seal(). First checks the hmac to prevent various +* attacks. +* @return plaintext +*/ + private static function unseal( $encrypted, $encKey, $hmacKey ) { + $pieces = explode( '.', $encrypted ); + if ( count( $pieces ) !== 3 ) { + throw new InvalidArgumentException( 'Invalid sealed-secret format' ); + } + + list( $hmac, $iv, $ciphertext ) = $pieces; + $integCalc = hash_hmac( 'sha256', $iv . '.' . $ciphertext, $hmacKey, true ); + if ( !hash_equals( $integCalc, base64_decode( $hmac ) ) ) { + throw new Exception( 'Sealed secret has been tampered with, aborting.' ); + } + + return openssl_decrypt( + base64_decode( $ciphertext ), + 'aes-256-ctr', + $encKey, + OPENSSL_RAW_DATA, + base64_decode( $iv ) + ); + } + +} diff --git a/extension.json b/extension.json index 29151b2..d028cff 100644 --- a/extension.json +++ b/extension.json @@ -8,6 +8,7 @@ "AutoloadClasses": { "OATHAuthHooks": "OATHAuth.hooks.php", "OATHAuthKey": "OATHAuthKey.php", + "OATHAuthUtils": "OATHAuthUtils.php", "OATHUserRepository": "OATHUserRepository.php", "HOTP": "lib/hotp.php", "HOTPResult": "lib/hotp.php", @@ -46,7 +47,8 @@ }, "config": { "OATHAuthWindowRadius": 4, - "OATHAuthDatabase": false + "OATHAuthDatabase": false, + "OATHAuthSecret": false }, "ResourceModules": { "ext.oathauth": { diff --git a/special/SpecialOATH.php b/special/SpecialOATH.php index 7f8a580..ae99c39 100644 --- a/special/SpecialOATH.php +++ b/special/SpecialOATH.php @@ -20,8 +20,12 @@ $page = null; if ( $this->getUser()->isAnon() && $loginInfo !== null ) { // User is anonymous, so
[MediaWiki-commits] [Gerrit] Fix i18n merge errors - change (mediawiki...OATHAuth)
jenkins-bot has submitted this change and it was merged. Change subject: Fix i18n merge errors .. Fix i18n merge errors Address comments by Raimond Spekking on I39859cc59f1811de42b72f6167d332ea48812f97 Change-Id: Ib17f1a2f0e70e5fd286d7ea441b13f79da3743c5 --- M i18n/en.json 1 file changed, 1 insertion(+), 2 deletions(-) Approvals: Siebrand: Looks good to me, but someone else must approve MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/i18n/en.json b/i18n/en.json index da3e6cf..ea88e39 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -17,7 +17,7 @@ "oathauth-verify": "Verify two-factor token", "openstackmanager-scratchtokens": "The following list is a list of one-time use scratch tokens. These tokens can only be used once, and are for emergency use. Please write these down and keep them in a secure location. If you lose your phone, these tokens are the only way to rescue your account. These tokens will never be shown again.", "oathauth-reset": "Reset two-factor credentials", - "oathauth-donotdeleteoldsecret": "Please do not delete your old credentials until you have successfully validated your new credentials.", + "oathauth-donotdeleteoldsecret": "Please do not delete your old credentials until you have validated your new credentials.", "oathauth-token": "Token", "oathauth-currenttoken": "Current token", "oathauth-newtoken": "New token", @@ -36,7 +36,6 @@ "oathauth-notloggedin": "Login required", "oathauth-mustbeloggedin": "You must be logged in to perform this action.", "oathauth-prefs-label": "Two-factor authentication:", - "oathauth-abortlogin": "The two-factor authentication token provided was invalid.", "oathauth-abortlogin": "The two-factor authentication token provided was invalid.", "oathauth-step1": "Step 1: Download the app", "oathauth-step1-test": "Download a mobile app for two-factor authentication (such as Google Authenticator) on to your phone.", -- To view, visit https://gerrit.wikimedia.org/r/280701 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib17f1a2f0e70e5fd286d7ea441b13f79da3743c5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/OATHAuth Gerrit-Branch: wmf/1.27.0-wmf.19 Gerrit-Owner: CSteippGerrit-Reviewer: MaxSem 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] Move token login to separate page - change (mediawiki...OATHAuth)
jenkins-bot has submitted this change and it was merged. Change subject: Move token login to separate page .. Move token login to separate page Rather than have an extraneous form on the login page, move the token input to a separate page. The actual logic for logging in is identical, the only difference is that the token is added to the form data on a second page request. Bug: 53195 Change-Id: I39859cc59f1811de42b72f6167d332ea48812f97 (cherry picked from commit 1a8006317dd2c52e4f70d10f585800e8efeb5b1a) --- M OATHAuth.hooks.php M extension.json M i18n/en.json M i18n/qqq.json M special/SpecialOATH.php M special/SpecialOATHDisable.php M special/SpecialOATHEnable.php A special/SpecialOATHLogin.php 8 files changed, 175 insertions(+), 79 deletions(-) Approvals: MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/OATHAuth.hooks.php b/OATHAuth.hooks.php index c65fdf6..4e78c0a 100644 --- a/OATHAuth.hooks.php +++ b/OATHAuth.hooks.php @@ -7,23 +7,6 @@ */ class OATHAuthHooks { /** -* @param $template UserloginTemplate -* @return bool -*/ - static function ModifyUITemplate( &$template ) { - $input = '' - . wfMessage( 'oathauth-token' )->escaped() - . '' - . Html::input( 'wpOATHToken', null, 'text', array( - 'class' => 'loginText', 'id' => 'wpOATHToken', 'tabindex' => '3', 'size' => '20' - ) ) . ''; - - $template->set( 'extrafields', $template->get( 'extrafields', '' ) . $input ); - - return true; - } - - /** * Get the singleton OATH user repository * * @return OATHUserRepository @@ -59,7 +42,19 @@ * @return bool */ static function AbortChangePassword( $user, $password, $newpassword, &$errorMsg ) { - $result = self::authenticate( $user ); + global $wgRequest; + + $token = $wgRequest->getText( 'wpOATHToken' ); + $oathrepo = self::getOATHUserRepository(); + $oathuser = $oathrepo->findByUser( $user ); + # Though it's weird to default to true, we only want to deny + # users who have two-factor enabled and have validated their + # token. + $result = true; + + if ( $oathuser->getKey() !== null ) { + $result = $oathuser->getKey()->verifyToken( $token, $oathuser ); + } if ( $result ) { return true; @@ -78,57 +73,18 @@ * @return bool */ static function AbortLogin( $user, $password, &$abort, &$errorMsg ) { - $result = self::authenticate( $user ); - if ( $result ) { - return true; - } else { - $abort = LoginForm::ABORTED; - $errorMsg = 'oathauth-abortlogin'; - return false; - } - } + $context = RequestContext::getMain(); + $request = $context->getRequest(); + $output = $context->getOutput(); - /** -* @param $user User -* @return bool -*/ - static function authenticate( $user ) { - global $wgRequest; + $oathrepo = self::getOATHUserRepository(); + $oathuser = $oathrepo->findByUser( $user ); - $token = $wgRequest->getText( 'wpOATHToken' ); - $oathuser = self::getOATHUserRepository()->findByUser( $user ); - # Though it's weird to default to true, we only want to deny - # users who have two-factor enabled and have validated their - # token. - $result = true; - - if ( $oathuser->getKey() !== null ) { - $result = $oathuser->getKey()->verifyToken( $token, $oathuser ); - } - - return $result; - } - - /** -* Determine if two-factor authentication is enabled for $wgUser -* -* @param bool &$isEnabled Will be set to true if enabled, false otherwise -* -* @return bool False if enabled, true otherwise -*/ - static function TwoFactorIsEnabled( &$isEnabled ) { - global $wgUser; - - $user = self::getOATHUserRepository()->findByUser( $wgUser ); - if ( $user && $user->getKey() !== null ) { - $isEnabled = true; - # This two-factor extension is enabled by the user, - # we don't need to check others. + if ( $oathuser->getKey() !== null && !$request->getCheck( 'token' ) ) { + $request->setSessionData(
[MediaWiki-commits] [Gerrit] snapshots: fix up all variable refs to dump dirs in templates - change (operations/puppet)
ArielGlenn has submitted this change and it was merged. Change subject: snapshots: fix up all variable refs to dump dirs in templates .. snapshots: fix up all variable refs to dump dirs in templates Change-Id: Ibc1027b69289793a621937a65544268c1ed313fa --- M modules/snapshot/manifests/dumps/configs.pp M modules/snapshot/manifests/dumps/dblists.pp M modules/snapshot/manifests/dumps/dirs.pp M modules/snapshot/templates/create-mediadir-list.sh.erb M modules/snapshot/templates/dumpcentralauth.sh.erb M modules/snapshot/templates/dumpcirrussearch.sh.erb M modules/snapshot/templates/initscripts/dumps-monitor.upstart.erb M modules/snapshot/templates/list-last-good-dumps.sh.erb M modules/snapshot/templates/wikidatadumps-shared.sh.erb M modules/snapshot/templates/wikidump.conf.erb M modules/snapshot/templates/wq.conf.erb M modules/snapshot/templates/wq.conf.media.erb 12 files changed, 72 insertions(+), 67 deletions(-) Approvals: ArielGlenn: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/snapshot/manifests/dumps/configs.pp b/modules/snapshot/manifests/dumps/configs.pp index ebd58f7..17550bd 100644 --- a/modules/snapshot/manifests/dumps/configs.pp +++ b/modules/snapshot/manifests/dumps/configs.pp @@ -5,16 +5,18 @@ include snapshot::dumps::dirs +$dblistsdir = $snapshot::dumps::dirs::dblistsdir + $config = { smallwikis => { dblist=> "${snapshot::dumps::dirs::apachedir}/dblists/all.dblist", -skipdblist=> "${snapshot::dumps::dirs::dumpsdir}/dblists/skip.dblist", +skipdblist=> "${dblistsdir}/skip.dblist", keep => '12', chunksEnabled => '0', }, bigwikis => { -dblist => "${snapshot::dumps::dirs::dumpsdir}/dblists/bigwikis.dblist", -skipdblist => "${snapshot::dumps::dirs::dumpsdir}/dblists/skipnone.dblist", +dblist => "${dblistsdir}/bigwikis.dblist", +skipdblist => "${dblistsdir}/skipnone.dblist", keep => '10', chunksEnabled=> '1', recombineHistory => '0', @@ -93,8 +95,8 @@ }, }, hugewikis => { -dblist => "${snapshot::dumps::dirs::dumpsdir}/dblists/hugewikis.dblist", -skipdblist => "${snapshot::dumps::dirs::dumpsdir}/dblists/skipnone.dblist", +dblist => "${dblistsdir}/hugewikis.dblist", +skipdblist => "${dblistsdir}/skipnone.dblist", keep => '9', chunksEnabled=> '1', recombineHistory => '0', @@ -108,13 +110,13 @@ }, monitor => { dblist=> "${snapshot::dumps::dirs::apachedir}/dblists/all.dblist", -skipdblist=> "${snapshot::dumps::dirs::dumpsdir}/dblists/skipmonitor.dblist", +skipdblist=> "${dblistsdir}/skipmonitor.dblist", keep => '30', chunksEnabled => '0', }, media => { dblist=> "${snapshot::dumps::dirs::apachedir}/dblists/all.dblist", -skipdblist=> "${snapshot::dumps::dirs::dumpsdir}/dblists/globalusage.dblist", +skipdblist=> "${dblistsdir}/globalusage.dblist", keep => '30', chunksEnabled => '0', }, diff --git a/modules/snapshot/manifests/dumps/dblists.pp b/modules/snapshot/manifests/dumps/dblists.pp index 2ba8dc3..c8f3305 100644 --- a/modules/snapshot/manifests/dumps/dblists.pp +++ b/modules/snapshot/manifests/dumps/dblists.pp @@ -20,52 +20,54 @@ include snapshot::dumps::dirs +$dblistsdir = $snapshot::dumps::dirs::dblistsdir + if ($hugewikis_enable) { # this host will run enwiki dumps -file { "${snapshot::dumps::dirs::dumpsdir}/dblists/hugewikis.dblist": +file { "${dblistsdir}/hugewikis.dblist": ensure => 'present', -path=> "${snapshot::dumps::dirs::dumpsdir}/dblists/hugewikis.dblist", +path=> "${dblistsdir}/hugewikis.dblist", mode=> '0644', owner => 'root', group => 'root', content => "${hugewikis_dblist}\n", } } -file { "${snapshot::dumps::dirs::dumpsdir}/dblists/bigwikis.dblist": +file { "${dblistsdir}/bigwikis.dblist": ensure => 'present', -path=> "${snapshot::dumps::dirs::dumpsdir}/dblists/bigwikis.dblist", +path=> "${dblistsdir}/bigwikis.dblist", mode=> '0644', owner => 'root', group => 'root', content => "${bigwikis_dblist}\n", } -file { "${snapshot::dumps::dirs::dumpsdir}/dblists/skip.dblist": +
[MediaWiki-commits] [Gerrit] Encrypt password when stored in user session - change (mediawiki...OATHAuth)
CSteipp has uploaded a new change for review. https://gerrit.wikimedia.org/r/280780 Change subject: Encrypt password when stored in user session .. Encrypt password when stored in user session During the two-step login, users with OATH enabled need to have their login details saved into their session while we prompt them for their OATH code. This encrypts that data, so we don't write their user's password into our session storage. Change-Id: I9969871205ac5c438706df41ef1519cb4cd7a964 --- M OATHAuth.hooks.php A OATHAuthUtils.php M extension.json M special/SpecialOATH.php M special/SpecialOATHLogin.php 5 files changed, 120 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OATHAuth refs/changes/80/280780/1 diff --git a/OATHAuth.hooks.php b/OATHAuth.hooks.php index 4e78c0a..0fd551c 100644 --- a/OATHAuth.hooks.php +++ b/OATHAuth.hooks.php @@ -81,7 +81,12 @@ $oathuser = $oathrepo->findByUser( $user ); if ( $oathuser->getKey() !== null && !$request->getCheck( 'token' ) ) { - $request->setSessionData( 'oath_login', $request->getValues() ); + $encData = OATHAuthUtils::encryptSessionData( + $request->getValues(), + $user->getId() + ); + $request->setSessionData( 'oath_login', $encData ); + $request->setSessionData( 'oath_uid', $user->getId() ); $output->redirect( SpecialPage::getTitleFor( 'OATH' )->getFullURL( '', false, PROTO_CURRENT ) ); return false; } else { diff --git a/OATHAuthUtils.php b/OATHAuthUtils.php new file mode 100644 index 000..9d8b401 --- /dev/null +++ b/OATHAuthUtils.php @@ -0,0 +1,105 @@ + substr( $keymats, 0, 32 ), + 'hmac' => substr( $keymats, 32, 32 ), + ); + } + + /** +* Actually encrypt the data, using a new random IV, and prepend the hmac +* of the encrypted data + IV, using a separate hmac key. +* @return $hmac.$iv.$ciphertext, each component b64 encoded +*/ + private static function seal( $data, $encKey, $hmacKey ) { + $iv = MWCryptRand::generate( 16, true ); + $ciphertext = openssl_encrypt( + $data, + 'aes-256-ctr', + $encKey, + OPENSSL_RAW_DATA, + $iv + ); + $sealed = base64_encode( $iv ) . '.' . base64_encode( $ciphertext ); + $hmac = hash_hmac( 'sha256', $sealed, $hmacKey, true ); + return base64_encode( $hmac ) . '.' . $sealed; + } + + /** +* Decrypt data sealed using seal(). First checks the hmac to prevent various +* attacks. +* @return plaintext +*/ + private static function unseal( $encrypted, $encKey, $hmacKey ) { + $pieces = explode( '.', $encrypted ); + if ( count( $pieces ) !== 3 ) { + throw new InvalidArgumentException( 'Invalid sealed-secret format' ); + } + + list( $hmac, $iv, $ciphertext ) = $pieces; + $integCalc = hash_hmac( 'sha256', $iv . '.' . $ciphertext, $hmacKey, true ); + if ( !hash_equals( $integCalc, base64_decode( $hmac ) ) ) { + throw new Exception( 'Sealed secret has been tampered with, aborting.' ); + } + + return openssl_decrypt( + base64_decode( $ciphertext ), + 'aes-256-ctr', + $encKey, + OPENSSL_RAW_DATA, + base64_decode( $iv ) + ); + } + +} diff --git a/extension.json b/extension.json index 29151b2..d028cff 100644 --- a/extension.json +++ b/extension.json @@ -8,6 +8,7 @@ "AutoloadClasses": { "OATHAuthHooks": "OATHAuth.hooks.php", "OATHAuthKey": "OATHAuthKey.php", + "OATHAuthUtils": "OATHAuthUtils.php", "OATHUserRepository": "OATHUserRepository.php", "HOTP": "lib/hotp.php", "HOTPResult": "lib/hotp.php", @@ -46,7 +47,8 @@ }, "config": { "OATHAuthWindowRadius": 4, - "OATHAuthDatabase": false + "OATHAuthDatabase": false, + "OATHAuthSecret": false }, "ResourceModules": { "ext.oathauth": { diff --git a/special/SpecialOATH.php b/special/SpecialOATH.php index 7f8a580..ae99c39 100644 --- a/special/SpecialOATH.php +++ b/special/SpecialOATH.php @@ -20,8 +20,12 @@ $page = null; if ( $this->getUser()->isAnon() && $loginInfo !==
[MediaWiki-commits] [Gerrit] Add npm entry point - change (mediawiki...FundraisingChart)
jenkins-bot has submitted this change and it was merged. Change subject: Add npm entry point .. Add npm entry point Change-Id: If04653306e13d428c2c69f8500fe0e477174d046 --- M .gitignore M .jshintignore M .jshintrc A Gruntfile.js A package.json M resources/js/chartFormatHelpers.js M resources/js/fundraising_charts.js 7 files changed, 97 insertions(+), 12 deletions(-) Approvals: Awight: Looks good to me, approved jenkins-bot: Verified diff --git a/.gitignore b/.gitignore index 98b092a..1689d7a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -.svn *~ *.kate-swp .*.swp +node_modules/** diff --git a/.jshintignore b/.jshintignore index 9f73a1b..0a892e2 100644 --- a/.jshintignore +++ b/.jshintignore @@ -1,3 +1,5 @@ -modules/ext.fundraisingChart.chartsjs -modules/ext.fundraisingChart.d3 -modules/ext.fundraisingChart.topojson +modules/ext.fundraisingChart.chartsjs/** +modules/ext.fundraisingChart.d3/** +modules/ext.fundraisingChart.datamaps/** +modules/ext.fundraisingChart.topojson/** +node_modules/** diff --git a/.jshintrc b/.jshintrc index 0967ef4..5aa4b04 100644 --- a/.jshintrc +++ b/.jshintrc @@ -1 +1,28 @@ -{} +{ + // Enforcing + "bitwise": true, + "eqeqeq": true, + "freeze": true, + "latedef": "nofunc", + "noarg": true, + "nonew": true, + "undef": true, + "unused": false, + "strict": false, + + // Relaxing + "es5": false, + + // Environment + "browser": true, + "jquery": true, + + "globals": { + "mediaWiki": false, + "moment": true, + "circleThroughColors": false, + "Chart": false, + "Datamap": false, + "console": true + } +} diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 000..35b8c1b --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,34 @@ +/*jshint node:true */ +module.exports = function ( grunt ) { + grunt.loadNpmTasks( 'grunt-contrib-jshint' ); + grunt.loadNpmTasks( 'grunt-jsonlint' ); + grunt.loadNpmTasks( 'grunt-banana-checker' ); + + grunt.initConfig( { + jshint: { + options: { + jshintrc: true + }, + all: [ + '**/*.js', + '!node_modules/**', + '!modules/ext.fundraisingChart.chartsjs/**', + '!modules/ext.fundraisingChart.d3/**', + '!modules/ext.fundraisingChart.datamaps/**', + '!modules/ext.fundraisingChart.topojson/**' + ] + }, + banana: { + all: 'i18n/' + }, + jsonlint: { + all: [ + '**/*.json', + '!node_modules/**' + ] + } + } ); + + grunt.registerTask( 'test', [ 'jshint', 'jsonlint', 'banana' ] ); + grunt.registerTask( 'default', 'test' ); +}; diff --git a/package.json b/package.json new file mode 100644 index 000..ec97d7b --- /dev/null +++ b/package.json @@ -0,0 +1,12 @@ +{ + "scripts": { +"test": "grunt test" + }, + "devDependencies": { +"grunt": "0.4.5", +"grunt-cli": "0.1.13", +"grunt-banana-checker": "0.4.0", +"grunt-contrib-jshint": "1.0.0", +"grunt-jsonlint": "1.0.7" + } +} diff --git a/resources/js/chartFormatHelpers.js b/resources/js/chartFormatHelpers.js index 9f90065..62af44b 100644 --- a/resources/js/chartFormatHelpers.js +++ b/resources/js/chartFormatHelpers.js @@ -1,3 +1,5 @@ +/*jshint -W121 */ + /** * Cycle through available colors to generate a colors array of any specified length. * For general use in chart widgets. @@ -60,14 +62,17 @@ return val; } -function convertStringDatesToMoments(dataSet){ +function convertStringDatesToMoments( dataSet ) { -dataSet.forEach(function(row,i){ +dataSet.forEach( function ( row ) { +var d; +var dateString; +var newDate; d = row.date; -dateString = d.slice(0,10); -newDate = moment(dateString); +dateString = d.slice( 0, 10 ); +newDate = moment( dateString ); row.date = newDate; -}); +} ); return dataSet; @@ -78,11 +83,11 @@ //TODO: test this because I'm just slapping it in here for later (isn't used right now) var today = moment().format('-MM-DD'), one_year_ago = moment().subtract('months', 11), -yesterday = moment(today).subtract('days', 31), one_yr_ago_month = (one_year_ago.month()), months = []; +var i; -for(i = one_yr_ago_month; i
[MediaWiki-commits] [Gerrit] [InlineCategorizer] Add npm test and composer-test - change (integration/config)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/280779 Change subject: [InlineCategorizer] Add npm test and composer-test .. [InlineCategorizer] Add npm test and composer-test Also move jsonlint to check: for non-whitelisted users and add jshint to check: Requires I77e57255cb18c2e2c063deb38ce6579c08ebc9ac Change-Id: Ifb8f6f26cbc204500e4715bc96ba15b6ea81c552 --- M zuul/layout.yaml 1 file changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/79/280779/1 diff --git a/zuul/layout.yaml b/zuul/layout.yaml index 26d2752..c31666d 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -4763,8 +4763,12 @@ - name: mediawiki/extensions/InlineCategorizer template: - - name: jsonlint + - name: composer-test - name: extension-unittests-generic + - name: npm +check: + - jsonlint + - jshint - name: mediawiki/extensions/InteractiveBlockMessage template: -- To view, visit https://gerrit.wikimedia.org/r/280779 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifb8f6f26cbc204500e4715bc96ba15b6ea81c552 Gerrit-PatchSet: 1 Gerrit-Project: integration/config 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] Remove $element::$title fallback for TitledElement mixin - change (oojs/ui)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/280778 Change subject: Remove $element::$title fallback for TitledElement mixin .. Remove $element::$title fallback for TitledElement mixin This feature has probably never been used, and barely anyone knew about it. Because it uses the same name as the $title property of TitledElement, it would be problematic to support when mixins are converted to use proper PHP traits. Change-Id: I654e83e07758f01573cb1610ec1b0c830065b1d3 --- M php/mixins/TitledElement.php 1 file changed, 1 insertion(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/78/280778/1 diff --git a/php/mixins/TitledElement.php b/php/mixins/TitledElement.php index cc0bde0..2065bf9 100644 --- a/php/mixins/TitledElement.php +++ b/php/mixins/TitledElement.php @@ -32,8 +32,7 @@ // Initialization $this->setTitle( - isset( $config['title'] ) ? $config['title'] : - ( isset( $element::$title ) ? $element::$title : null ) + isset( $config['title'] ) ? $config['title'] : null ); } -- To view, visit https://gerrit.wikimedia.org/r/280778 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I654e83e07758f01573cb1610ec1b0c830065b1d3 Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: Legoktm___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move currencies to config - change (mediawiki...DonationInterface)
jenkins-bot has submitted this change and it was merged. Change subject: Move currencies to config .. Move currencies to config Except for Worldpay, so as not to further block Icb3bc8e1f7b909ecf790efae3514e7af5763198a Change-Id: I699b80fd28d0c093d025256b50f4cbbf2fed285d --- M adyen_gateway/adyen.adapter.php A adyen_gateway/config/currencies.yaml M amazon_gateway/amazon.adapter.php A amazon_gateway/config/currencies.yaml M astropay_gateway/astropay.adapter.php A astropay_gateway/config/currencies.yaml M gateway_common/gateway.adapter.php A globalcollect_gateway/config/currencies.yaml M globalcollect_gateway/globalcollect.adapter.php A paypal_gateway/config/currencies.yaml M paypal_gateway/paypal.adapter.php 11 files changed, 331 insertions(+), 359 deletions(-) Approvals: Awight: Looks good to me, approved jenkins-bot: Verified diff --git a/adyen_gateway/adyen.adapter.php b/adyen_gateway/adyen.adapter.php index 3b5e30a..545387b 100644 --- a/adyen_gateway/adyen.adapter.php +++ b/adyen_gateway/adyen.adapter.php @@ -270,214 +270,6 @@ return $transaction; } - public function getCurrencies( $options = array() ) { - // See http://www.adyen.com/platform/all-countries-all-currencies/ - // This should be the list of all global "acceptance currencies". Not - // finding that list, I've used everything for which we keep - // conversion rates. - // TODO: do we need to filter by country/method? - $currencies = array( - 'ADF', // Andorran Franc - 'ADP', // Andorran Peseta - 'AED', // Utd. Arab Emir. Dirham - 'AFA', // Afghanistan Afghani - 'AFN', // Afghanistan Afghani - 'ALL', // Albanian Lek - 'AMD', // Armenian Dram - 'ANG', // NL Antillian Guilder - 'AOA', // Angolan Kwanza - 'AON', // Angolan Old Kwanza - 'ARS', // Argentinian peso - 'ATS', // Austrian Schilling - 'AUD', // Australian Dollar - 'AWG', // Aruban Florin - 'AZM', // Azerbaijan Old Manat - 'AZN', // Azerbaijan New Manat - 'BAM', // Bosnian Mark - 'BBD', // Barbadian dollar - 'BDT', // Bangladeshi Taka - 'BEF', // Belgian Franc - 'BGL', // Bulgarian Old Lev - 'BGN', // Bulgarian Lev - 'BHD', // Bahraini Dinar - 'BIF', // Burundi Franc - 'BMD', // Bermudian Dollar - 'BND', // Brunei Dollar - 'BOB', // Bolivian Boliviano - 'BRL', // Brazilian Real - 'BSD', // Bahamian Dollar - 'BTN', // Bhutan Ngultrum - 'BWP', // Botswana Pula - 'BYR', // Belarusian Ruble - 'BZD', // Belize Dollar - 'CAD', // Canadian Dollar - 'CDF', // Congolese Franc - 'CHF', // Swiss Franc - 'CLP', // Chilean Peso - 'CNY', // Chinese Yuan Renminbi - 'COP', // Colombian Peso - 'CRC', // Costa Rican Colon - 'CUC', // Cuban Convertible Peso - 'CUP', // Cuban Peso - 'CVE', // Cape Verde Escudo - 'CYP', // Cyprus Pound - 'CZK', // Czech Koruna - 'DEM', // German Mark - 'DJF', // Djibouti Franc - 'DKK', // Danish Krone - 'DOP', // Dominican R. Peso - 'DZD', // Algerian Dinar - 'ECS', // Ecuador Sucre - 'EEK', // Estonian Kroon - 'EGP', // Egyptian Pound - 'ESP', // Spanish Peseta - 'ETB', // Ethiopian Birr - 'EUR', // Euro - 'FIM', // Finnish Markka - 'FJD', // Fiji Dollar - 'FKP', // Falkland Islands Pound - 'FRF', // French Franc - 'GBP', // British Pound - 'GEL', // Georgian Lari - 'GHC', // Ghanaian Cedi - 'GHS', // Ghanaian New Cedi - 'GIP', // Gibraltar Pound - 'GMD', // Gambian Dalasi - 'GNF', // Guinea Franc - 'GRD', //
[MediaWiki-commits] [Gerrit] Move currencies to config - change (mediawiki...DonationInterface)
Ejegg has uploaded a new change for review. https://gerrit.wikimedia.org/r/280776 Change subject: Move currencies to config .. Move currencies to config Except for Worldpay, so as not to further block Icb3bc8e1f7b909ecf790efae3514e7af5763198a Change-Id: I699b80fd28d0c093d025256b50f4cbbf2fed285d --- M adyen_gateway/adyen.adapter.php A adyen_gateway/config/currencies.yaml M amazon_gateway/amazon.adapter.php A amazon_gateway/config/currencies.yaml M astropay_gateway/astropay.adapter.php A astropay_gateway/config/currencies.yaml M gateway_common/gateway.adapter.php A globalcollect_gateway/config/currencies.yaml M globalcollect_gateway/globalcollect.adapter.php A paypal_gateway/config/currencies.yaml M paypal_gateway/paypal.adapter.php 11 files changed, 331 insertions(+), 359 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface refs/changes/76/280776/1 diff --git a/adyen_gateway/adyen.adapter.php b/adyen_gateway/adyen.adapter.php index 3b5e30a..545387b 100644 --- a/adyen_gateway/adyen.adapter.php +++ b/adyen_gateway/adyen.adapter.php @@ -270,214 +270,6 @@ return $transaction; } - public function getCurrencies( $options = array() ) { - // See http://www.adyen.com/platform/all-countries-all-currencies/ - // This should be the list of all global "acceptance currencies". Not - // finding that list, I've used everything for which we keep - // conversion rates. - // TODO: do we need to filter by country/method? - $currencies = array( - 'ADF', // Andorran Franc - 'ADP', // Andorran Peseta - 'AED', // Utd. Arab Emir. Dirham - 'AFA', // Afghanistan Afghani - 'AFN', // Afghanistan Afghani - 'ALL', // Albanian Lek - 'AMD', // Armenian Dram - 'ANG', // NL Antillian Guilder - 'AOA', // Angolan Kwanza - 'AON', // Angolan Old Kwanza - 'ARS', // Argentinian peso - 'ATS', // Austrian Schilling - 'AUD', // Australian Dollar - 'AWG', // Aruban Florin - 'AZM', // Azerbaijan Old Manat - 'AZN', // Azerbaijan New Manat - 'BAM', // Bosnian Mark - 'BBD', // Barbadian dollar - 'BDT', // Bangladeshi Taka - 'BEF', // Belgian Franc - 'BGL', // Bulgarian Old Lev - 'BGN', // Bulgarian Lev - 'BHD', // Bahraini Dinar - 'BIF', // Burundi Franc - 'BMD', // Bermudian Dollar - 'BND', // Brunei Dollar - 'BOB', // Bolivian Boliviano - 'BRL', // Brazilian Real - 'BSD', // Bahamian Dollar - 'BTN', // Bhutan Ngultrum - 'BWP', // Botswana Pula - 'BYR', // Belarusian Ruble - 'BZD', // Belize Dollar - 'CAD', // Canadian Dollar - 'CDF', // Congolese Franc - 'CHF', // Swiss Franc - 'CLP', // Chilean Peso - 'CNY', // Chinese Yuan Renminbi - 'COP', // Colombian Peso - 'CRC', // Costa Rican Colon - 'CUC', // Cuban Convertible Peso - 'CUP', // Cuban Peso - 'CVE', // Cape Verde Escudo - 'CYP', // Cyprus Pound - 'CZK', // Czech Koruna - 'DEM', // German Mark - 'DJF', // Djibouti Franc - 'DKK', // Danish Krone - 'DOP', // Dominican R. Peso - 'DZD', // Algerian Dinar - 'ECS', // Ecuador Sucre - 'EEK', // Estonian Kroon - 'EGP', // Egyptian Pound - 'ESP', // Spanish Peseta - 'ETB', // Ethiopian Birr - 'EUR', // Euro - 'FIM', // Finnish Markka - 'FJD', // Fiji Dollar - 'FKP', // Falkland Islands Pound - 'FRF', // French Franc - 'GBP', // British Pound - 'GEL', // Georgian Lari - 'GHC', // Ghanaian Cedi - 'GHS', // Ghanaian New Cedi - 'GIP', // Gibraltar Pound - 'GMD', // Gambian Dalasi -
[MediaWiki-commits] [Gerrit] Add npm entry point - change (mediawiki...InlineCategorizer)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/280777 Change subject: Add npm entry point .. Add npm entry point Change-Id: I77e57255cb18c2e2c063deb38ce6579c08ebc9ac --- A .jshintignore A .jshintrc A Gruntfile.js M modules/ext.inlineCategorizer.core.js M modules/ext.inlineCategorizer.init.js A package.json 6 files changed, 70 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/InlineCategorizer refs/changes/77/280777/1 diff --git a/.jshintignore b/.jshintignore new file mode 100644 index 000..3c3629e --- /dev/null +++ b/.jshintignore @@ -0,0 +1 @@ +node_modules diff --git a/.jshintrc b/.jshintrc new file mode 100644 index 000..04c3a97 --- /dev/null +++ b/.jshintrc @@ -0,0 +1,23 @@ +{ + // Enforcing + "bitwise": true, + "eqeqeq": true, + "freeze": true, + "latedef": "nofunc", + "noarg": true, + "nonew": true, + "undef": true, + "unused": true, + "strict": false, + + // Relaxing + "es5": false, + + // Environment + "browser": true, + "jquery": true, + + "globals": { + "mediaWiki": false + } +} diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 000..36b6671 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,30 @@ +/*jshint node:true */ +module.exports = function ( grunt ) { + grunt.loadNpmTasks( 'grunt-contrib-jshint' ); + grunt.loadNpmTasks( 'grunt-jsonlint' ); + grunt.loadNpmTasks( 'grunt-banana-checker' ); + + grunt.initConfig( { + jshint: { + options: { + jshintrc: true + }, + all: [ + '**/*.js', + '!node_modules/**' + ] + }, + banana: { + all: 'i18n/' + }, + jsonlint: { + all: [ + '**/*.json', + '!node_modules/**' + ] + } + } ); + + grunt.registerTask( 'test', [ 'jshint', 'jsonlint', 'banana' ] ); + grunt.registerTask( 'default', 'test' ); +}; diff --git a/modules/ext.inlineCategorizer.core.js b/modules/ext.inlineCategorizer.core.js index 8039c9a..3d4ffc8 100644 --- a/modules/ext.inlineCategorizer.core.js +++ b/modules/ext.inlineCategorizer.core.js @@ -8,7 +8,7 @@ * Relies on: mw.config (wgFormattedNamespaces, wgNamespaceIds, * wgCaseSensitiveNamespaces, wgUserGroups), mw.util.wikiGetlink */ -( function ($) { +( function ( $, mw ) { /* Local scope */ @@ -1152,4 +1152,4 @@ } }; -})(jQuery); +}( jQuery, mediaWiki ) ); diff --git a/modules/ext.inlineCategorizer.init.js b/modules/ext.inlineCategorizer.init.js index 502ab61..0df40b7 100644 --- a/modules/ext.inlineCategorizer.init.js +++ b/modules/ext.inlineCategorizer.init.js @@ -1,4 +1,4 @@ -jQuery( document ).ready( function(){ +jQuery( document ).ready( function( mw ){ /** * Initialize an instance of InlineCategorizer into mw.page */ @@ -6,4 +6,4 @@ // Separate function for call to prevent jQuery // from executing it in the document context. mw.page.inlineCategorizer.setup(); -} ); +}( mediaWiki ) ); diff --git a/package.json b/package.json new file mode 100644 index 000..0ee955e --- /dev/null +++ b/package.json @@ -0,0 +1,12 @@ +{ + "scripts": { +"test": "grunt test" + }, + "devDependencies": { +"grunt": "0.4.5", +"grunt-cli": "0.1.13", +"grunt-banana-checker": "0.5.0", +"grunt-contrib-jshint": "1.0.0", +"grunt-jsonlint": "1.0.7" + } +} -- To view, visit https://gerrit.wikimedia.org/r/280777 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I77e57255cb18c2e2c063deb38ce6579c08ebc9ac Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/InlineCategorizer 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] [IndexFunction] Add npm test and composer-test - change (integration/config)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/280775 Change subject: [IndexFunction] Add npm test and composer-test .. [IndexFunction] Add npm test and composer-test Also move jsonlint and jshint to check: for non-whitelisted users. Requires I51538d869950b4a104294b14720e6e7973cdc365 Change-Id: I7200b89ea4ef22ca654c0a9f698c82afba0ffdba --- M zuul/layout.yaml 1 file changed, 5 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/75/280775/1 diff --git a/zuul/layout.yaml b/zuul/layout.yaml index 26d2752..45a0adb 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -4757,9 +4757,12 @@ - name: mediawiki/extensions/IndexFunction template: - - name: jshint - - name: jsonlint + - name: composer-test - name: extension-unittests-non-voting + - name: npm +check: + - jsonlint + - jshint - name: mediawiki/extensions/InlineCategorizer template: -- To view, visit https://gerrit.wikimedia.org/r/280775 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7200b89ea4ef22ca654c0a9f698c82afba0ffdba Gerrit-PatchSet: 1 Gerrit-Project: integration/config 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] Add hook to define log tables, specifying INNODB & indexing ... - change (wikimedia...crm)
jenkins-bot has submitted this change and it was merged. Change subject: Add hook to define log tables, specifying INNODB & indexing contact fields .. Add hook to define log tables, specifying INNODB & indexing contact fields Bug: T130161 Change-Id: I2d8b027568e1f02ec8c69bd4f5329c1b367cf617 --- M sites/all/modules/wmf_civicrm/wmf_civicrm.module 1 file changed, 25 insertions(+), 0 deletions(-) Approvals: Awight: Looks good to me, approved jenkins-bot: Verified diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module b/sites/all/modules/wmf_civicrm/wmf_civicrm.module index ef290a7..291f74e 100644 --- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module +++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module @@ -2228,6 +2228,31 @@ } /** + * Implements hook_logTableSpec(). + * + * @param array $logTableSpec + */ +function wmf_civicrm_civicrm_logTableSpec(&$logTableSpec) { + $logTableSpec['wmf_donor'] = array(); + $logTableSpec['wmf_contribution_extra'] = array(); + $contactReferences = CRM_Dedupe_Merger::cidRefs(); + foreach (array_keys($logTableSpec) as $tableName) { +$contactIndexes = array(); +$logTableSpec[$tableName]['engine'] = 'INNODB'; +$logTableSpec[$tableName]['engine_config'] = 'ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4'; +$contactRefsForTable = CRM_Utils_Array::value($tableName, $contactReferences, array()); +foreach ($contactRefsForTable as $fieldName) { + $contactIndexes['index_' . $fieldName] = $fieldName; +} +$logTableSpec[$tableName]['indexes'] = array_merge(array( + 'index_id' => 'id', + 'index_log_conn_id' => 'log_conn_id', + 'index_log_date' => 'log_date', +), $contactIndexes); + } +} + +/** * Check if any completed contributions exist for the contact after the provided date. * * @param int $contact_id -- To view, visit https://gerrit.wikimedia.org/r/277934 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2d8b027568e1f02ec8c69bd4f5329c1b367cf617 Gerrit-PatchSet: 3 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: EileenGerrit-Reviewer: Awight Gerrit-Reviewer: Cdentinger Gerrit-Reviewer: Eileen Gerrit-Reviewer: Ejegg Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use writable database when deleting rows - change (apps...wikipedia)
Niedzielski has uploaded a new change for review. https://gerrit.wikimedia.org/r/280774 Change subject: Use writable database when deleting rows .. Use writable database when deleting rows Change-Id: I24d7cb21c44539b932af743c612f4dc9ab5ddbff --- M app/src/main/java/org/wikipedia/database/SQLiteContentProvider.java 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/74/280774/1 diff --git a/app/src/main/java/org/wikipedia/database/SQLiteContentProvider.java b/app/src/main/java/org/wikipedia/database/SQLiteContentProvider.java index 3eda720..de9f5fc 100644 --- a/app/src/main/java/org/wikipedia/database/SQLiteContentProvider.java +++ b/app/src/main/java/org/wikipedia/database/SQLiteContentProvider.java @@ -90,7 +90,7 @@ int rows; int uriType = uriMatcher.match(uri); -SQLiteDatabase db = getDatabase().getReadableDatabase(); +SQLiteDatabase db = getDatabase().getWritableDatabase(); switch(uriType) { case MATCH_ALL: -- To view, visit https://gerrit.wikimedia.org/r/280774 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I24d7cb21c44539b932af743c612f4dc9ab5ddbff Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Niedzielski___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add npm entry point - change (mediawiki...IndexFunction)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/280773 Change subject: Add npm entry point .. Add npm entry point Change-Id: I51538d869950b4a104294b14720e6e7973cdc365 --- A .jshintignore A .jshintrc A Gruntfile.js A package.json M specialindex.js 5 files changed, 68 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/IndexFunction refs/changes/73/280773/1 diff --git a/.jshintignore b/.jshintignore new file mode 100644 index 000..3c3629e --- /dev/null +++ b/.jshintignore @@ -0,0 +1 @@ +node_modules diff --git a/.jshintrc b/.jshintrc new file mode 100644 index 000..04c3a97 --- /dev/null +++ b/.jshintrc @@ -0,0 +1,23 @@ +{ + // Enforcing + "bitwise": true, + "eqeqeq": true, + "freeze": true, + "latedef": "nofunc", + "noarg": true, + "nonew": true, + "undef": true, + "unused": true, + "strict": false, + + // Relaxing + "es5": false, + + // Environment + "browser": true, + "jquery": true, + + "globals": { + "mediaWiki": false + } +} diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 000..36b6671 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,30 @@ +/*jshint node:true */ +module.exports = function ( grunt ) { + grunt.loadNpmTasks( 'grunt-contrib-jshint' ); + grunt.loadNpmTasks( 'grunt-jsonlint' ); + grunt.loadNpmTasks( 'grunt-banana-checker' ); + + grunt.initConfig( { + jshint: { + options: { + jshintrc: true + }, + all: [ + '**/*.js', + '!node_modules/**' + ] + }, + banana: { + all: 'i18n/' + }, + jsonlint: { + all: [ + '**/*.json', + '!node_modules/**' + ] + } + } ); + + grunt.registerTask( 'test', [ 'jshint', 'jsonlint', 'banana' ] ); + grunt.registerTask( 'default', 'test' ); +}; diff --git a/package.json b/package.json new file mode 100644 index 000..0ee955e --- /dev/null +++ b/package.json @@ -0,0 +1,12 @@ +{ + "scripts": { +"test": "grunt test" + }, + "devDependencies": { +"grunt": "0.4.5", +"grunt-cli": "0.1.13", +"grunt-banana-checker": "0.5.0", +"grunt-contrib-jshint": "1.0.0", +"grunt-jsonlint": "1.0.7" + } +} diff --git a/specialindex.js b/specialindex.js index 5674193..3e29f80 100644 --- a/specialindex.js +++ b/specialindex.js @@ -1,6 +1,8 @@ // Javascript for Special:Index to hide/show details // Adapted from the enhanced RC JS +var appendCSS; + appendCSS('.mw-index-hidden {'+ ' display:none;'+ '}'+ -- To view, visit https://gerrit.wikimedia.org/r/280773 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I51538d869950b4a104294b14720e6e7973cdc365 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/IndexFunction 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] Start sampling regular & slow requests - change (operations/puppet)
Yuvipanda has submitted this change and it was merged. Change subject: Start sampling regular & slow requests .. Start sampling regular & slow requests We need a better understanding of normal requests, without adding undue burden on our logging infrastructure. To this end, this patch leverages service-runner logger functionality to configure sampled logging of normal & slow requests, aiming for a logging rate of no more than about one log message per minute. Change-Id: I972271b23b71cf5e954add6e7c92f37770ac6d77 --- M modules/restbase/templates/config.yaml.erb 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: Yuvipanda: Verified; Looks good to me, approved diff --git a/modules/restbase/templates/config.yaml.erb b/modules/restbase/templates/config.yaml.erb index ecfb08c..8b84fb4 100644 --- a/modules/restbase/templates/config.yaml.erb +++ b/modules/restbase/templates/config.yaml.erb @@ -891,6 +891,11 @@ logging: name: <%= @logging_name %> level: <%= @logging_level %> + sampled_levels: +# Target is about 1 request logged per minute @1000 req/s +trace/request: 0.1 +# Not sure what the rate of these is, so start conservatively. +trace/request/slow: 0.0001 streams: # XXX: Use gelf-stream -> logstash - type: gelf -- To view, visit https://gerrit.wikimedia.org/r/280711 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I972271b23b71cf5e954add6e7c92f37770ac6d77 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: GWickeGerrit-Reviewer: Dzahn Gerrit-Reviewer: Eevans Gerrit-Reviewer: GWicke Gerrit-Reviewer: Ppchelko 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 ldap->keystone transitional classes and tools - change (mediawiki...OpenStackManager)
jenkins-bot has submitted this change and it was merged. Change subject: Remove ldap->keystone transitional classes and tools .. Remove ldap->keystone transitional classes and tools Now that projects and role-assignment live in Keystone, we no longer need these classes that read/write projects and roles from/to keystone. Bug: T126758 Change-Id: Ifb3279498aaeac07733550b682d1e87f1f219317 --- M OpenStackManager.php D maintenance/migrateLdapAssignmentToKeystone.php D nova/OpenStackNovaProjectLdap.php D nova/OpenStackNovaRoleLdap.php 4 files changed, 0 insertions(+), 1,114 deletions(-) Approvals: Alex Monk: Looks good to me, approved jenkins-bot: Verified diff --git a/OpenStackManager.php b/OpenStackManager.php index bedab09..e22a194 100644 --- a/OpenStackManager.php +++ b/OpenStackManager.php @@ -202,8 +202,6 @@ $wgAutoloadClasses['OpenStackNovaPuppetGroup'] = $dir . 'nova/OpenStackNovaPuppetGroup.php'; $wgAutoloadClasses['OpenStackNovaLdapConnection'] = $dir . 'nova/OpenStackNovaLdapConnection.php'; $wgAutoloadClasses['OpenStackNovaProject'] = $dir . 'nova/OpenStackNovaProject.php'; -$wgAutoloadClasses['OpenStackNovaProjectLdap'] = $dir . 'nova/OpenStackNovaProjectLdap.php'; -$wgAutoloadClasses['OpenStackNovaRoleLdap'] = $dir . 'nova/OpenStackNovaRoleLdap.php'; $wgAutoloadClasses['OpenStackNovaProjectLimits'] = $dir . 'nova/OpenStackNovaProjectLimits.php'; $wgAutoloadClasses['OpenStackNovaProjectGroup'] = $dir . 'nova/OpenStackNovaProjectGroup.php'; $wgAutoloadClasses['SpecialNovaInstance'] = $dir . 'special/SpecialNovaInstance.php'; diff --git a/maintenance/migrateLdapAssignmentToKeystone.php b/maintenance/migrateLdapAssignmentToKeystone.php deleted file mode 100644 index a2d7d01..000 --- a/maintenance/migrateLdapAssignmentToKeystone.php +++ /dev/null @@ -1,60 +0,0 @@ -mDescription = "Read ldap-based projects, roles and memberships, and insert them into keystone."; - } - - public function execute() { - global $wgOpenStackManagerCreateResourcePages; - - $wgOpenStackManagerCreateResourcePages = false; - - $projects = OpenStackNovaProjectLdap::getAllProjects(); - foreach ( $projects as $ldapproject) { - $name = $ldapproject->getProjectName(); - $ldapproject->fetchProjectInfo( true ); - $keystoneproject = OpenStackNovaProject::createProject($name); - if ( !$keystoneproject ) { - print "Failed to create project $name, loading instead\n"; - $keystoneproject = OpenStackNovaProject::getProjectByName($name); - } - if ( !$keystoneproject ) { - print "Failed to create or load project $name, skipping\n"; - continue; - } - $id = $keystoneproject->getId(); - print "Migrating project $name to keystone project with id $id\n"; - $keystoneproject->fetchProjectInfo( true ); - $ldapmembers = $ldapproject->getMembers(); - foreach ( $ldapmembers as $member ) { - print "* Adding $member to $name\n"; - if ( !$keystoneproject->addMember( $member ) ) { - print "Failed to add member $member to $name\n"; - } - } - $ldaproles = $ldapproject->getRoles(); - foreach ( $ldaproles as $ldaprole ) { - $rolename = $ldaprole->getRoleName(); - $keystonerole = OpenStackNovaRole::getProjectRoleByName( $rolename, $keystoneproject ); - foreach ( $ldaprole->getMembers() as $membername ) { - print "* Adding $membername to $rolename in $name\n"; - if ( !$keystonerole->addMember( $membername ) ) { - print "Failed to add member $membername to role $rolename in $name\n"; - } - } - } - } - } -} - -$maintClass = "OpenStackNovaDumpProjects"; -require_once( RUN_MAINTENANCE_IF_MAIN ); diff --git a/nova/OpenStackNovaProjectLdap.php b/nova/OpenStackNovaProjectLdap.php deleted file mode 100644 index 8424751..000 --- a/nova/OpenStackNovaProjectLdap.php +++ /dev/null @@ -1,823 +0,0 @@ -projectname = $projectname; - if ( $load ) { - OpenStackNovaLdapConnection::connect(); - $this->fetchProjectInfo(); - } else { -
[MediaWiki-commits] [Gerrit] Introduce the changeprop service - change (mediawiki/vagrant)
jenkins-bot has submitted this change and it was merged. Change subject: Introduce the changeprop service .. Introduce the changeprop service The change-propagation service is a service listening to events emitted to the EventBus Kafka cluster and propagating the events onto dependencies. Bug: T126098 Change-Id: I013b4d76a4d8047dce88d7568f1d0b90bb409c75 --- M puppet/hieradata/common.yaml A puppet/modules/changeprop/manifests/init.pp A puppet/modules/changeprop/templates/config.yaml.erb M puppet/modules/role/manifests/eventbus.pp 4 files changed, 38 insertions(+), 0 deletions(-) Approvals: Dduvall: Looks good to me, approved jenkins-bot: Verified diff --git a/puppet/hieradata/common.yaml b/puppet/hieradata/common.yaml index e0e0665..76f1a14 100644 --- a/puppet/hieradata/common.yaml +++ b/puppet/hieradata/common.yaml @@ -27,6 +27,8 @@ citoid::port: 1970 citoid::log_level: info +changeprop::port: 7272 + contenttranslation::dir: "%{hiera('mediawiki::dir')}/extensions/ContentTranslation" contenttranslation::cxserver::dir: "%{hiera('mwv::services_dir')}/cxserver" contenttranslation::parsoid_url: "http://127.0.0.1:%{::mediawiki::parsoid::port}; diff --git a/puppet/modules/changeprop/manifests/init.pp b/puppet/modules/changeprop/manifests/init.pp new file mode 100644 index 000..fe170bd --- /dev/null +++ b/puppet/modules/changeprop/manifests/init.pp @@ -0,0 +1,26 @@ +# == Class: changeprop +# +# Change propagation is a Node.JS service reacting to messages emitted to the +# EventBus Kafka cluster and propagating them onto declared dependencies. +# +# === Parameters +# +# [*port*] +# Port the service listens on for incoming connections. +# +# [*log_level*] +# The lowest level to log (trace, debug, info, warn, error, fatal) +# +class changeprop( +$port, +$log_level = undef, +) { + +service::node { 'changeprop': +port => $port, +log_level => $log_level, +git_remote => 'https://github.com/wikimedia/change-propagation.git', +config => template('changeprop/config.yaml.erb'), +} + +} diff --git a/puppet/modules/changeprop/templates/config.yaml.erb b/puppet/modules/changeprop/templates/config.yaml.erb new file mode 100644 index 000..488e9b2 --- /dev/null +++ b/puppet/modules/changeprop/templates/config.yaml.erb @@ -0,0 +1,9 @@ +spec: + title: The Change Propagation root + paths: +/{domain:a}/{api:sys}/queue: + x-modules: +- path: sys/kafka.js + options: +uri: 127.0.0.1:2181 +templates: {} diff --git a/puppet/modules/role/manifests/eventbus.pp b/puppet/modules/role/manifests/eventbus.pp index 49d99e3..036f545 100644 --- a/puppet/modules/role/manifests/eventbus.pp +++ b/puppet/modules/role/manifests/eventbus.pp @@ -9,6 +9,7 @@ require ::kafka require ::eventlogging require ::eventschemas +include ::changeprop mediawiki::extension { 'EventBus': priority => $::LOAD_EARLY, -- To view, visit https://gerrit.wikimedia.org/r/278741 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I013b4d76a4d8047dce88d7568f1d0b90bb409c75 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: MobrovacGerrit-Reviewer: BryanDavis Gerrit-Reviewer: Dduvall Gerrit-Reviewer: Ottomata Gerrit-Reviewer: Ppchelko Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Encrypt password when stored in user session - change (mediawiki...OATHAuth)
Dpatrick has submitted this change and it was merged. Change subject: Encrypt password when stored in user session .. Encrypt password when stored in user session During the two-step login, users with OATH enabled need to have their login details saved into their session while we prompt them for their OATH code. This encrypts that data, so we don't write their user's password into our session storage. Change-Id: I9969871205ac5c438706df41ef1519cb4cd7a964 --- M OATHAuth.hooks.php A OATHAuthUtils.php M extension.json M special/SpecialOATH.php M special/SpecialOATHLogin.php 5 files changed, 120 insertions(+), 3 deletions(-) Approvals: Dpatrick: Looks good to me, approved jenkins-bot: Verified diff --git a/OATHAuth.hooks.php b/OATHAuth.hooks.php index 4e78c0a..0fd551c 100644 --- a/OATHAuth.hooks.php +++ b/OATHAuth.hooks.php @@ -81,7 +81,12 @@ $oathuser = $oathrepo->findByUser( $user ); if ( $oathuser->getKey() !== null && !$request->getCheck( 'token' ) ) { - $request->setSessionData( 'oath_login', $request->getValues() ); + $encData = OATHAuthUtils::encryptSessionData( + $request->getValues(), + $user->getId() + ); + $request->setSessionData( 'oath_login', $encData ); + $request->setSessionData( 'oath_uid', $user->getId() ); $output->redirect( SpecialPage::getTitleFor( 'OATH' )->getFullURL( '', false, PROTO_CURRENT ) ); return false; } else { diff --git a/OATHAuthUtils.php b/OATHAuthUtils.php new file mode 100644 index 000..9d8b401 --- /dev/null +++ b/OATHAuthUtils.php @@ -0,0 +1,105 @@ + substr( $keymats, 0, 32 ), + 'hmac' => substr( $keymats, 32, 32 ), + ); + } + + /** +* Actually encrypt the data, using a new random IV, and prepend the hmac +* of the encrypted data + IV, using a separate hmac key. +* @return $hmac.$iv.$ciphertext, each component b64 encoded +*/ + private static function seal( $data, $encKey, $hmacKey ) { + $iv = MWCryptRand::generate( 16, true ); + $ciphertext = openssl_encrypt( + $data, + 'aes-256-ctr', + $encKey, + OPENSSL_RAW_DATA, + $iv + ); + $sealed = base64_encode( $iv ) . '.' . base64_encode( $ciphertext ); + $hmac = hash_hmac( 'sha256', $sealed, $hmacKey, true ); + return base64_encode( $hmac ) . '.' . $sealed; + } + + /** +* Decrypt data sealed using seal(). First checks the hmac to prevent various +* attacks. +* @return plaintext +*/ + private static function unseal( $encrypted, $encKey, $hmacKey ) { + $pieces = explode( '.', $encrypted ); + if ( count( $pieces ) !== 3 ) { + throw new InvalidArgumentException( 'Invalid sealed-secret format' ); + } + + list( $hmac, $iv, $ciphertext ) = $pieces; + $integCalc = hash_hmac( 'sha256', $iv . '.' . $ciphertext, $hmacKey, true ); + if ( !hash_equals( $integCalc, base64_decode( $hmac ) ) ) { + throw new Exception( 'Sealed secret has been tampered with, aborting.' ); + } + + return openssl_decrypt( + base64_decode( $ciphertext ), + 'aes-256-ctr', + $encKey, + OPENSSL_RAW_DATA, + base64_decode( $iv ) + ); + } + +} diff --git a/extension.json b/extension.json index 29151b2..d028cff 100644 --- a/extension.json +++ b/extension.json @@ -8,6 +8,7 @@ "AutoloadClasses": { "OATHAuthHooks": "OATHAuth.hooks.php", "OATHAuthKey": "OATHAuthKey.php", + "OATHAuthUtils": "OATHAuthUtils.php", "OATHUserRepository": "OATHUserRepository.php", "HOTP": "lib/hotp.php", "HOTPResult": "lib/hotp.php", @@ -46,7 +47,8 @@ }, "config": { "OATHAuthWindowRadius": 4, - "OATHAuthDatabase": false + "OATHAuthDatabase": false, + "OATHAuthSecret": false }, "ResourceModules": { "ext.oathauth": { diff --git a/special/SpecialOATH.php b/special/SpecialOATH.php index 7f8a580..ae99c39 100644 --- a/special/SpecialOATH.php +++ b/special/SpecialOATH.php @@ -20,8 +20,12 @@ $page = null; if ( $this->getUser()->isAnon() && $loginInfo !== null ) { // User is anonymous, so
[MediaWiki-commits] [Gerrit] [JsonData] Add npm test and composer-test - change (integration/config)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/280772 Change subject: [JsonData] Add npm test and composer-test .. [JsonData] Add npm test and composer-test Also move jsonlint to check: for non-whitelisted users and add jshint to check: Requires I32793d13d7d7686da58048dbadb5fd7bcacdb61a Change-Id: I8e99068febb68ff24aa818adabf0f5daefe04854 --- M zuul/layout.yaml 1 file changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/72/280772/1 diff --git a/zuul/layout.yaml b/zuul/layout.yaml index 26d2752..bd0ec1a 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -4810,8 +4810,12 @@ - name: mediawiki/extensions/JsonData template: - - name: jsonlint + - name: composer-test - name: extension-unittests-generic + - name: npm +check: + - jsonlint + - jshint - name: mediawiki/extensions/LanguageSelector template: -- To view, visit https://gerrit.wikimedia.org/r/280772 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8e99068febb68ff24aa818adabf0f5daefe04854 Gerrit-PatchSet: 1 Gerrit-Project: integration/config 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] [WIP] Add new scap::source define to ease bootstrapping of r... - change (operations/puppet)
Ottomata has uploaded a new change for review. https://gerrit.wikimedia.org/r/280771 Change subject: [WIP] Add new scap::source define to ease bootstrapping of repositories on deploy servers .. [WIP] Add new scap::source define to ease bootstrapping of repositories on deploy servers scap::source will clone your source repo, and if set, a scap repo expected to be at scap/$title into /srv/deployment/$title/scap. This allows for scap/ directories to be separated from source repositories, and allows scap repos to bootstrap themselves on deploy servers, instead of relying on trebuchet. eventlogging/eventbus is the guinea pig here, so this is applied to it. Bug: T118772 Change-Id: Id0feadb4e0b274a879ec831891e52f0f70c299c1 --- A modules/eventlogging/manifests/deployment/keys.pp M modules/eventlogging/manifests/deployment/source.pp M modules/git/manifests/clone.pp M modules/role/manifests/deployment/server.pp A modules/role/manifests/eventbus/deployment/source.pp A modules/scap/manifests/source.pp 6 files changed, 174 insertions(+), 36 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/71/280771/1 diff --git a/modules/eventlogging/manifests/deployment/keys.pp b/modules/eventlogging/manifests/deployment/keys.pp new file mode 100644 index 000..673bd72 --- /dev/null +++ b/modules/eventlogging/manifests/deployment/keys.pp @@ -0,0 +1,43 @@ +# == Class eventlogging::deployment::keys +# +# Include this class on a scap3 deployment server, +# e.g. tin, deployment-tin, etc. +# It sets up private keys and adds them to keyholder, +# allowing certain groups to deploy via ssh using +# the configured ssh key for the deploy user. +# +# You likely don't need to include this class directly. +# Instead, use the eventlogging::deployment::source define. +# +class eventlogging::deployment::keys { +require ::keyholder +require ::keyholder::monitoring + +$key_fingerprint = $::realm ? { +'labs' => $::labsproject ? { +'deployment-prep' => '02:9b:99:e2:f0:16:70:a3:d2:5a:e6:02:a3:73:0e:b0', +default => undef, +}, +'production' => 'b6:4e:1a:1b:4b:70:ef:91:31:cd:a3:18:9a:ca:41:44', +default => undef, +} + +if !$key_fingerprint { +fail('Could not determine keyholder key_fingerprint for scap when setting up eventlogging deployment source for eventlogging.') +} + +# Use eventlogging-admins group for deployment in production, +# and just the current labs project group in labs. +$trusted_group = $::realm ? { +'labs' => "project-${::labsproject}", +default => 'eventlogging-admins', +} + +# For betalabs/deployment-prep, the eventlogging private key has been +# added to deployment-puppetmaster:/var/lib/git/private/labs/files/ssh/tin. +keyholder::agent { 'eventlogging': +trusted_group => $trusted_group, +key_fingerprint => $key_fingerprint, +key_file=> 'eventlogging_rsa', +} +} diff --git a/modules/eventlogging/manifests/deployment/source.pp b/modules/eventlogging/manifests/deployment/source.pp index 35420e9..c9baad8 100644 --- a/modules/eventlogging/manifests/deployment/source.pp +++ b/modules/eventlogging/manifests/deployment/source.pp @@ -1,39 +1,27 @@ -# == Class eventlogging::deployment::source -# Include this class on a scap3 deployment server, -# e.g. tin, deployment-tin, etc. -# It sets up private keys and adds them to keyholder, -# allowing certain groups to deploy via ssh using -# the configured ssh key for the deploy user. +# == Define eventlogging::deployment::source # -class eventlogging::deployment::source { -require ::keyholder -require ::keyholder::monitoring +# Sets up scap3 deployment source on a deploy server for the eventlogging +# source repository. +# +# This expects that your scap directory is hosted in a repository +# at scap/eventlogging/$title. This repository will be cloned +# alongside of the eventlogging source repo on the deploy server. +# +# == Usage +# +# # Make sure both of 'eventlogging' and 'scap/eventlogging/eventbus' +# # are both repositories in gerrit. +# eventlogging::deployment::source { 'eventbus': } +# +define eventlogging::deployment::source() +include ::eventlogging::deployment::keys -$key_fingerprint = $::realm ? { -'labs' => $::labsproject ? { -'deployment-prep' => '02:9b:99:e2:f0:16:70:a3:d2:5a:e6:02:a3:73:0e:b0', -default => undef, -}, -'production' => 'b6:4e:1a:1b:4b:70:ef:91:31:cd:a3:18:9a:ca:41:44', -default => undef, -} - -if !$key_fingerprint { -fail('Could not determine keyholder key_fingerprint for scap when setting up eventlogging deployment source for eventlogging.') -} - -# Use eventlogging-admins group for deployment in production, -# and just the
[MediaWiki-commits] [Gerrit] Revert "Deprecation notice" - change (mediawiki...FundraisingChart)
jenkins-bot has submitted this change and it was merged. Change subject: Revert "Deprecation notice" .. Revert "Deprecation notice" I mistook this for another extension... This reverts commit 0cbe835a8b807280822ac74bf9e84b5beef76d48. Change-Id: Ida80978d23eed7c60ec0102245da1aaa50873fdf --- D README 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Awight: Looks good to me, approved jenkins-bot: Verified diff --git a/README b/README deleted file mode 100644 index 72c094a..000 --- a/README +++ /dev/null @@ -1 +0,0 @@ -This extension is deprecated! -- To view, visit https://gerrit.wikimedia.org/r/280770 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ida80978d23eed7c60ec0102245da1aaa50873fdf Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/FundraisingChart Gerrit-Branch: master Gerrit-Owner: AwightGerrit-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] Revert "Deprecation notice" - change (mediawiki...FundraisingChart)
Awight has uploaded a new change for review. https://gerrit.wikimedia.org/r/280770 Change subject: Revert "Deprecation notice" .. Revert "Deprecation notice" I mistook this for another extension... This reverts commit 0cbe835a8b807280822ac74bf9e84b5beef76d48. Change-Id: Ida80978d23eed7c60ec0102245da1aaa50873fdf --- D README 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/FundraisingChart refs/changes/70/280770/1 diff --git a/README b/README deleted file mode 100644 index 72c094a..000 --- a/README +++ /dev/null @@ -1 +0,0 @@ -This extension is deprecated! -- To view, visit https://gerrit.wikimedia.org/r/280770 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ida80978d23eed7c60ec0102245da1aaa50873fdf Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/FundraisingChart Gerrit-Branch: master Gerrit-Owner: Awight___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] snapshots: fix up all variable refs to dump dirs in templates - change (operations/puppet)
ArielGlenn has uploaded a new change for review. https://gerrit.wikimedia.org/r/280769 Change subject: snapshots: fix up all variable refs to dump dirs in templates .. snapshots: fix up all variable refs to dump dirs in templates Change-Id: Ibc1027b69289793a621937a65544268c1ed313fa --- M modules/snapshot/manifests/dumps/configs.pp M modules/snapshot/manifests/dumps/dblists.pp M modules/snapshot/manifests/dumps/dirs.pp M modules/snapshot/templates/create-mediadir-list.sh.erb M modules/snapshot/templates/dumpcentralauth.sh.erb M modules/snapshot/templates/dumpcirrussearch.sh.erb M modules/snapshot/templates/initscripts/dumps-monitor.upstart.erb M modules/snapshot/templates/list-last-good-dumps.sh.erb M modules/snapshot/templates/wikidatadumps-shared.sh.erb M modules/snapshot/templates/wikidump.conf.erb M modules/snapshot/templates/wq.conf.erb M modules/snapshot/templates/wq.conf.media.erb 12 files changed, 72 insertions(+), 67 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/69/280769/1 diff --git a/modules/snapshot/manifests/dumps/configs.pp b/modules/snapshot/manifests/dumps/configs.pp index ebd58f7..db97daf 100644 --- a/modules/snapshot/manifests/dumps/configs.pp +++ b/modules/snapshot/manifests/dumps/configs.pp @@ -5,16 +5,18 @@ include snapshot::dumps::dirs +$dblistsdir = $snapshot::dumps::dirs::dumpsdir::dblistsdir + $config = { smallwikis => { dblist=> "${snapshot::dumps::dirs::apachedir}/dblists/all.dblist", -skipdblist=> "${snapshot::dumps::dirs::dumpsdir}/dblists/skip.dblist", +skipdblist=> "${dblistsdir}/skip.dblist", keep => '12', chunksEnabled => '0', }, bigwikis => { -dblist => "${snapshot::dumps::dirs::dumpsdir}/dblists/bigwikis.dblist", -skipdblist => "${snapshot::dumps::dirs::dumpsdir}/dblists/skipnone.dblist", +dblist => "${dblistsdir}/bigwikis.dblist", +skipdblist => "${dblistsdir}/skipnone.dblist", keep => '10', chunksEnabled=> '1', recombineHistory => '0', @@ -93,8 +95,8 @@ }, }, hugewikis => { -dblist => "${snapshot::dumps::dirs::dumpsdir}/dblists/hugewikis.dblist", -skipdblist => "${snapshot::dumps::dirs::dumpsdir}/dblists/skipnone.dblist", +dblist => "${dblistsdir}/hugewikis.dblist", +skipdblist => "${dblistsdir}/skipnone.dblist", keep => '9', chunksEnabled=> '1', recombineHistory => '0', @@ -108,13 +110,13 @@ }, monitor => { dblist=> "${snapshot::dumps::dirs::apachedir}/dblists/all.dblist", -skipdblist=> "${snapshot::dumps::dirs::dumpsdir}/dblists/skipmonitor.dblist", +skipdblist=> "${dblistsdir}/skipmonitor.dblist", keep => '30', chunksEnabled => '0', }, media => { dblist=> "${snapshot::dumps::dirs::apachedir}/dblists/all.dblist", -skipdblist=> "${snapshot::dumps::dirs::dumpsdir}/dblists/globalusage.dblist", +skipdblist=> "${dblistsdir}/globalusage.dblist", keep => '30', chunksEnabled => '0', }, diff --git a/modules/snapshot/manifests/dumps/dblists.pp b/modules/snapshot/manifests/dumps/dblists.pp index 2ba8dc3..426833c 100644 --- a/modules/snapshot/manifests/dumps/dblists.pp +++ b/modules/snapshot/manifests/dumps/dblists.pp @@ -20,52 +20,54 @@ include snapshot::dumps::dirs +$dblistsdir = "$snapshot::dumps::dirs::dumpsdir::dblists" + if ($hugewikis_enable) { # this host will run enwiki dumps -file { "${snapshot::dumps::dirs::dumpsdir}/dblists/hugewikis.dblist": +file { "${dblistsdir}/hugewikis.dblist": ensure => 'present', -path=> "${snapshot::dumps::dirs::dumpsdir}/dblists/hugewikis.dblist", +path=> "${dblistsdir}/hugewikis.dblist", mode=> '0644', owner => 'root', group => 'root', content => "${hugewikis_dblist}\n", } } -file { "${snapshot::dumps::dirs::dumpsdir}/dblists/bigwikis.dblist": +file { "${dblistsdir}/bigwikis.dblist": ensure => 'present', -path=> "${snapshot::dumps::dirs::dumpsdir}/dblists/bigwikis.dblist", +path=> "${dblistsdir}/bigwikis.dblist", mode=> '0644', owner => 'root', group => 'root', content => "${bigwikis_dblist}\n", } -file {
[MediaWiki-commits] [Gerrit] labs: Do Public DNS translation for telnet project too - change (operations/puppet)
Yuvipanda has submitted this change and it was merged. Change subject: labs: Do Public DNS translation for telnet project too .. labs: Do Public DNS translation for telnet project too Change-Id: If161fed48d333bac23f0558fa77463c932de4a6d --- M modules/role/manifests/labs/dnsrecursor.pp 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Yuvipanda: Verified; Looks good to me, approved diff --git a/modules/role/manifests/labs/dnsrecursor.pp b/modules/role/manifests/labs/dnsrecursor.pp index 2cfe3ac..2186ca6 100644 --- a/modules/role/manifests/labs/dnsrecursor.pp +++ b/modules/role/manifests/labs/dnsrecursor.pp @@ -67,6 +67,7 @@ 'deployment-prep', 'toolserver-legacy', 'project-proxy', +'telnet', ], nova_api_url => "http://${nova_controller_hostname}:35357/v2.0;, alias_file => $alias_file, -- To view, visit https://gerrit.wikimedia.org/r/280768 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If161fed48d333bac23f0558fa77463c932de4a6d Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: YuvipandaGerrit-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] labs: Do Public DNS translation for telnet project too - change (operations/puppet)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/280768 Change subject: labs: Do Public DNS translation for telnet project too .. labs: Do Public DNS translation for telnet project too Change-Id: If161fed48d333bac23f0558fa77463c932de4a6d --- M modules/role/manifests/labs/dnsrecursor.pp 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/68/280768/1 diff --git a/modules/role/manifests/labs/dnsrecursor.pp b/modules/role/manifests/labs/dnsrecursor.pp index 2cfe3ac..2186ca6 100644 --- a/modules/role/manifests/labs/dnsrecursor.pp +++ b/modules/role/manifests/labs/dnsrecursor.pp @@ -67,6 +67,7 @@ 'deployment-prep', 'toolserver-legacy', 'project-proxy', +'telnet', ], nova_api_url => "http://${nova_controller_hostname}:35357/v2.0;, alias_file => $alias_file, -- To view, visit https://gerrit.wikimedia.org/r/280768 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If161fed48d333bac23f0558fa77463c932de4a6d 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] Deprecation notice - change (mediawiki...FundraisingChart)
jenkins-bot has submitted this change and it was merged. Change subject: Deprecation notice .. Deprecation notice Change-Id: Iadab694930a69a4f71bde982dafb53218eb501b5 --- A README 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Awight: Looks good to me, approved jenkins-bot: Verified diff --git a/README b/README new file mode 100644 index 000..72c094a --- /dev/null +++ b/README @@ -0,0 +1 @@ +This extension is deprecated! -- To view, visit https://gerrit.wikimedia.org/r/280767 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iadab694930a69a4f71bde982dafb53218eb501b5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/FundraisingChart Gerrit-Branch: master Gerrit-Owner: AwightGerrit-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] Deprecation notice - change (mediawiki...FundraisingChart)
Awight has uploaded a new change for review. https://gerrit.wikimedia.org/r/280767 Change subject: Deprecation notice .. Deprecation notice Change-Id: Iadab694930a69a4f71bde982dafb53218eb501b5 --- A README 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/FundraisingChart refs/changes/67/280767/1 diff --git a/README b/README new file mode 100644 index 000..72c094a --- /dev/null +++ b/README @@ -0,0 +1 @@ +This extension is deprecated! -- To view, visit https://gerrit.wikimedia.org/r/280767 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iadab694930a69a4f71bde982dafb53218eb501b5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/FundraisingChart Gerrit-Branch: master Gerrit-Owner: Awight___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Compress PNGs using zopflipng - change (mediawiki...DonationInterface)
Awight has uploaded a new change for review. https://gerrit.wikimedia.org/r/280766 Change subject: Compress PNGs using zopflipng .. Compress PNGs using zopflipng Squeezes a few bytes out... Prepared using, git ls-files --exclude-per-directory=.gitignore -- '*.png' | \ parallel zopflipng -m -y {} {} Bug: T127608 Change-Id: I8a72ffea7297cb4e95dc4bf873b631eaac17938b --- M gateway_forms/includes/alipay.png M gateway_forms/includes/bank-banco_de_chile.png M gateway_forms/includes/bank-banco_do_brasil.png M gateway_forms/includes/bank-bradesco.png M gateway_forms/includes/bank-caixa.png M gateway_forms/includes/bank-hsbc.png M gateway_forms/includes/bank-itau.png M gateway_forms/includes/bank-santander.png M gateway_forms/includes/bank-webpay.png M gateway_forms/includes/card-amex-lg.png M gateway_forms/includes/card-argencard.png M gateway_forms/includes/card-cabal.png M gateway_forms/includes/card-cmr.png M gateway_forms/includes/card-magna.png M gateway_forms/includes/card-mc-lg.png M gateway_forms/includes/card-mercadolivre.png M gateway_forms/includes/card-naranja.png M gateway_forms/includes/card-nativa.png M gateway_forms/includes/card-presto.png M gateway_forms/includes/card-servipag.png M gateway_forms/includes/card-shopping.png M gateway_forms/includes/cash-banamex.png M gateway_forms/includes/cash-bancomer.png M gateway_forms/includes/cash-davivienda.png M gateway_forms/includes/cash-efecty.png M gateway_forms/includes/cash-oxxo.png M gateway_forms/includes/cash-pago-efectivo.png M gateway_forms/includes/cash-pago-facil.png M gateway_forms/includes/cash-provencia-pagos.png M gateway_forms/includes/cash-rapipago.png M gateway_forms/includes/cash-red-pagos.png M gateway_forms/includes/paypal.png M gateway_forms/includes/questionmark.png M gateway_forms/includes/wmlogo_blue.png M gateway_forms/includes/yandex.png M gateway_forms/rapidhtml/css/images/button-disabled.png M gateway_forms/rapidhtml/css/images/button-down.png M gateway_forms/rapidhtml/css/images/button-off-green.png M gateway_forms/rapidhtml/css/images/close.png M gateway_forms/rapidhtml/css/images/ui-bg_highlight-soft_100_ff_1x100.png 40 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface refs/changes/66/280766/1 diff --git a/gateway_forms/includes/alipay.png b/gateway_forms/includes/alipay.png index f770f66..2dbc3ec 100644 --- a/gateway_forms/includes/alipay.png +++ b/gateway_forms/includes/alipay.png Binary files differ diff --git a/gateway_forms/includes/bank-banco_de_chile.png b/gateway_forms/includes/bank-banco_de_chile.png index 9e6500c..a5089ea 100644 --- a/gateway_forms/includes/bank-banco_de_chile.png +++ b/gateway_forms/includes/bank-banco_de_chile.png Binary files differ diff --git a/gateway_forms/includes/bank-banco_do_brasil.png b/gateway_forms/includes/bank-banco_do_brasil.png index a39e477..68ea402 100644 --- a/gateway_forms/includes/bank-banco_do_brasil.png +++ b/gateway_forms/includes/bank-banco_do_brasil.png Binary files differ diff --git a/gateway_forms/includes/bank-bradesco.png b/gateway_forms/includes/bank-bradesco.png index c80f2b1..40c056f 100644 --- a/gateway_forms/includes/bank-bradesco.png +++ b/gateway_forms/includes/bank-bradesco.png Binary files differ diff --git a/gateway_forms/includes/bank-caixa.png b/gateway_forms/includes/bank-caixa.png index 411a736..70df4e7 100644 --- a/gateway_forms/includes/bank-caixa.png +++ b/gateway_forms/includes/bank-caixa.png Binary files differ diff --git a/gateway_forms/includes/bank-hsbc.png b/gateway_forms/includes/bank-hsbc.png index 9ebb386..17f6765 100644 --- a/gateway_forms/includes/bank-hsbc.png +++ b/gateway_forms/includes/bank-hsbc.png Binary files differ diff --git a/gateway_forms/includes/bank-itau.png b/gateway_forms/includes/bank-itau.png index d3b1ed8..2c618b4 100644 --- a/gateway_forms/includes/bank-itau.png +++ b/gateway_forms/includes/bank-itau.png Binary files differ diff --git a/gateway_forms/includes/bank-santander.png b/gateway_forms/includes/bank-santander.png index 6f58942..8051544 100644 --- a/gateway_forms/includes/bank-santander.png +++ b/gateway_forms/includes/bank-santander.png Binary files differ diff --git a/gateway_forms/includes/bank-webpay.png b/gateway_forms/includes/bank-webpay.png index ab03ba3..a9308cd 100644 --- a/gateway_forms/includes/bank-webpay.png +++ b/gateway_forms/includes/bank-webpay.png Binary files differ diff --git a/gateway_forms/includes/card-amex-lg.png b/gateway_forms/includes/card-amex-lg.png index 6ea5e6a..3eb0cb0 100644 --- a/gateway_forms/includes/card-amex-lg.png +++ b/gateway_forms/includes/card-amex-lg.png Binary files differ diff --git a/gateway_forms/includes/card-argencard.png b/gateway_forms/includes/card-argencard.png index 1681254..10a6867 100644 --- a/gateway_forms/includes/card-argencard.png +++
[MediaWiki-commits] [Gerrit] plugin: cleanup settings.d/composer on destroy - change (mediawiki/vagrant)
jenkins-bot has submitted this change and it was merged. Change subject: plugin: cleanup settings.d/composer on destroy .. plugin: cleanup settings.d/composer on destroy Keep confusion and stale config down by removing the Puppet generated settings.d/composer directory when `vagrant destroy` is used to delete the VM. Change-Id: I8707051a3edc141b5a2d305f6c4ae8958ab8901a --- M lib/mediawiki-vagrant/environment.rb M lib/mediawiki-vagrant/version.rb 2 files changed, 2 insertions(+), 1 deletion(-) Approvals: Dduvall: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/mediawiki-vagrant/environment.rb b/lib/mediawiki-vagrant/environment.rb index d9ec046..9ece5fa 100644 --- a/lib/mediawiki-vagrant/environment.rb +++ b/lib/mediawiki-vagrant/environment.rb @@ -234,6 +234,7 @@ FileUtils.rm_f Dir[path('settings.d/puppet-managed/*.php')] FileUtils.rm_rf path('settings.d/multiwiki') FileUtils.rm_rf path('settings.d/wikis') + FileUtils.rm_rf path('settings.d/composer') FileUtils.rm_rf path('vagrant.d') FileUtils.rm_f path('mediawiki/LocalSettings.php') end diff --git a/lib/mediawiki-vagrant/version.rb b/lib/mediawiki-vagrant/version.rb index 93797c0..147aeba 100644 --- a/lib/mediawiki-vagrant/version.rb +++ b/lib/mediawiki-vagrant/version.rb @@ -1,3 +1,3 @@ module MediaWikiVagrant - VERSION = '0.13.0' + VERSION = '0.13.1' end -- To view, visit https://gerrit.wikimedia.org/r/276914 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8707051a3edc141b5a2d305f6c4ae8958ab8901a Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: BryanDavisGerrit-Reviewer: Dduvall Gerrit-Reviewer: Gergő Tisza Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] fss only needed for php5 wikis - change (mediawiki/vagrant)
jenkins-bot has submitted this change and it was merged. Change subject: fss only needed for php5 wikis .. fss only needed for php5 wikis Change-Id: I3d0a70982096d41430daf1073b12369ddaf43a8a --- M puppet/modules/role/manifests/fss.pp M puppet/modules/role/manifests/simple_performant.pp 2 files changed, 2 insertions(+), 1 deletion(-) Approvals: Dduvall: Looks good to me, approved jenkins-bot: Verified diff --git a/puppet/modules/role/manifests/fss.pp b/puppet/modules/role/manifests/fss.pp index 36dab82..58f0579 100644 --- a/puppet/modules/role/manifests/fss.pp +++ b/puppet/modules/role/manifests/fss.pp @@ -6,6 +6,8 @@ # Chinese script conversion is one of those cases. This extension uses a # Commentz-Walter style algorithm for multiple search terms, or a Boyer-Moore # algorithm for single search terms. +# +# Only needed for php5-based wikis class role::fss { require_package('php5-fss') } diff --git a/puppet/modules/role/manifests/simple_performant.pp b/puppet/modules/role/manifests/simple_performant.pp index b658f75..a7d9852 100644 --- a/puppet/modules/role/manifests/simple_performant.pp +++ b/puppet/modules/role/manifests/simple_performant.pp @@ -7,7 +7,6 @@ # See https://www.mediawiki.org/wiki/Manual:Performance_tuning class role::simple_performant { require ::role::mediawiki -include ::role::fss include ::role::thumb_on_404 include ::role::wikidiff2 include ::apache::mod::expires -- To view, visit https://gerrit.wikimedia.org/r/276406 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3d0a70982096d41430daf1073b12369ddaf43a8a Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: BryanDavisGerrit-Reviewer: Dduvall 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 role for WikimediaMaintenance - change (mediawiki/vagrant)
jenkins-bot has submitted this change and it was merged. Change subject: Add role for WikimediaMaintenance .. Add role for WikimediaMaintenance Change-Id: I065468ef775ffa99e02ceb7a274f1b6982495929 --- A puppet/modules/role/manifests/wikimediamaintenance.pp 1 file changed, 7 insertions(+), 0 deletions(-) Approvals: Dduvall: Looks good to me, approved jenkins-bot: Verified diff --git a/puppet/modules/role/manifests/wikimediamaintenance.pp b/puppet/modules/role/manifests/wikimediamaintenance.pp new file mode 100644 index 000..3deda6c --- /dev/null +++ b/puppet/modules/role/manifests/wikimediamaintenance.pp @@ -0,0 +1,7 @@ +# == Class: role::wikimediamaintenance +# +# Provision the WikimediaMaintenance extension +# +class role::wikimediamaintenance { +mediawiki::extension { 'WikimediaMaintenance': } +} -- To view, visit https://gerrit.wikimedia.org/r/275572 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I065468ef775ffa99e02ceb7a274f1b6982495929 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: BryanDavisGerrit-Reviewer: Dduvall Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Complete GlobalBlocking role - change (mediawiki/vagrant)
jenkins-bot has submitted this change and it was merged. Change subject: Complete GlobalBlocking role .. Complete GlobalBlocking role Add the required databases and run update.php. Bug: T69104 Change-Id: Ibf87a6f5ce879d48f3c21c3e7782f4c945897a2b --- M puppet/hieradata/common.yaml M puppet/modules/role/manifests/globalblocking.pp 2 files changed, 52 insertions(+), 2 deletions(-) Approvals: Dduvall: Looks good to me, approved jenkins-bot: Verified diff --git a/puppet/hieradata/common.yaml b/puppet/hieradata/common.yaml index 48e5167..e0e0665 100644 --- a/puppet/hieradata/common.yaml +++ b/puppet/hieradata/common.yaml @@ -279,6 +279,11 @@ payments::branch: fundraising/REL1_25 payments::dir: /vagrant/mediawiki-fr +role::globalblocking::db_host: "%{hiera('mysql::grant_host_name')}" +role::globalblocking::db_user: "%{hiera('mediawiki::multiwiki::db_user')}" +role::globalblocking::db_pass: "%{hiera('mediawiki::multiwiki::db_pass')}" +role::globalblocking::db_name: globalblocking + role::ldapauth::proxy_agent_password: vagrant_agent role::ldapauth::writer_password: vagrant_writer role::ldapauth::admin_password: vagrant_admin diff --git a/puppet/modules/role/manifests/globalblocking.pp b/puppet/modules/role/manifests/globalblocking.pp index 0fc7a33..37ebcdb 100644 --- a/puppet/modules/role/manifests/globalblocking.pp +++ b/puppet/modules/role/manifests/globalblocking.pp @@ -1,6 +1,51 @@ # == Class: role::globalblocking # Configures a MediaWiki instance with # GlobalBlocking[https://www.mediawiki.org/wiki/Extension:GlobalBlocking] -class role::globalblocking { -mediawiki::extension { 'GlobalBlocking': } +# [*db_host*] +# Database host used to connect to GlobalBlocking database +# +# [*db_user*] +# Database user used for GlobalBlocking database +# +# [*db_pass*] +# Database password used for GlobalBlocking database +# +# [*db_name*] +# Database password used for GlobalBlocking database +# +class role::globalblocking( +$db_host, +$db_user, +$db_pass, +$db_name, +) { +require ::role::mediawiki + +mysql::db { $db_name: +ensure => present, +} + +mysql::sql { "GRANT ALL PRIVILEGES ON ${db_name}.* TO ${db_user}@${db_host}": +unless => "SELECT 1 FROM INFORMATION_SCHEMA.SCHEMA_PRIVILEGES WHERE TABLE_SCHEMA = '${db_name}' AND GRANTEE = \"'${db_user}'@'${db_host}'\" LIMIT 1", +require => Mysql::User[$db_user], +} + +mysql::sql { 'Create GlobalBlocking tables': +sql => "USE ${db_name}; SOURCE ${::mediawiki::dir}/extensions/GlobalBlocking/globalblocking.sql;", +unless => "SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE table_schema = '${db_name}' AND table_name = 'globalblocks';", +require => [ +Mysql::Db[$db_name], +Mediawiki::Extension['GlobalBlocking'] +], +before => Exec['update_all_databases'], +} + +mediawiki::extension { 'GlobalBlocking': +needs_update => true, +settings => { +# We're not changing it, but this causes them all to get +# the name from the same place. +wgGlobalBlockingDatabase => $db_name, +} +} } -- To view, visit https://gerrit.wikimedia.org/r/279423 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibf87a6f5ce879d48f3c21c3e7782f4c945897a2b Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: MattflaschenGerrit-Reviewer: BryanDavis Gerrit-Reviewer: Dduvall Gerrit-Reviewer: Luke081515 Gerrit-Reviewer: Mattflaschen 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 dir creation and make executable engineScore.py - change (wikimedia...relevanceForge)
Tjones has uploaded a new change for review. https://gerrit.wikimedia.org/r/280765 Change subject: Fix dir creation and make executable engineScore.py .. Fix dir creation and make executable engineScore.py Change engineScore.py to create full dir path for SQL caching if needed. Also make it executable. Change-Id: I089d9b3dc7069b3b970319af0f3b20031548785d --- M engineScore.py 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/relevanceForge refs/changes/65/280765/1 diff --git a/engineScore.py b/engineScore.py old mode 100644 new mode 100755 index b273527..379446f --- a/engineScore.py +++ b/engineScore.py @@ -71,7 +71,7 @@ if not os.path.isdir(self._cache_dir): try: -os.mkdir(self._cache_dir) +os.makedirs(self._cache_dir) except OSError: # directory created since checking pass -- To view, visit https://gerrit.wikimedia.org/r/280765 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I089d9b3dc7069b3b970319af0f3b20031548785d Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/discovery/relevanceForge Gerrit-Branch: master Gerrit-Owner: Tjones___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [SemanticImageInput] Add npm test and composer-test - change (integration/config)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/280764 Change subject: [SemanticImageInput] Add npm test and composer-test .. [SemanticImageInput] Add npm test and composer-test Also move jsonlint to check: for non-whitelisted users and add jshint to check: Also add dependence on SemanticMediaWiki Per https://integration.wikimedia.org/ci/job/mwext-testextension-hhvm/8080/console 21:34:16 Error: You need to have http://semantic-mediawiki.org/wiki/Semantic_MediaWiki;>Semantic MediaWiki installed in order to use Semantic Image Input.Recording test results Requires I3f1d307d8a89a1e4245918e91a1953c4c131d8d1 Change-Id: Ifcbf5017f929f89fc8c197efa6f9f8dd5b3d881e --- M zuul/layout.yaml M zuul/parameter_functions.py 2 files changed, 6 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/64/280764/1 diff --git a/zuul/layout.yaml b/zuul/layout.yaml index 5f4bdad..7f3332b 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -6980,8 +6980,12 @@ - name: mediawiki/extensions/SemanticImageInput template: - - name: jsonlint + - name: composer-test - name: mw-checks-test + - name: npm +check: + - jsonlint + - jshint - name: mediawiki/extensions/SemanticInternalObjects template: diff --git a/zuul/parameter_functions.py b/zuul/parameter_functions.py index e3cc79f..9c00aed 100644 --- a/zuul/parameter_functions.py +++ b/zuul/parameter_functions.py @@ -92,6 +92,7 @@ 'RelatedArticles': ['BetaFeatures', 'Cards', 'MobileFrontend'], 'Score': ['VisualEditor'], 'SemanticFormsInputs': ['SemanticForms'], +'SemanticImageInput': ['SemanticMediaWiki'], 'SemanticSifter': ['SemanticMediaWiki'], 'SimpleSurvey': ['PrefSwitch'], 'SolrStore': ['SemanticMediaWiki'], -- To view, visit https://gerrit.wikimedia.org/r/280764 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifcbf5017f929f89fc8c197efa6f9f8dd5b3d881e Gerrit-PatchSet: 1 Gerrit-Project: integration/config 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] hold off full dumps cron starting til the 4th of this month - change (operations/puppet)
ArielGlenn has submitted this change and it was merged. Change subject: hold off full dumps cron starting til the 4th of this month .. hold off full dumps cron starting til the 4th of this month hopefully we'll be ready sooner, this gives time to get scap3 and all changes set up properly on the new hardware Change-Id: Idbe988ba41fdd6fe724f2f72f0ff3f156bf9dc38 --- M modules/snapshot/manifests/dumps/cron/huge.pp M modules/snapshot/manifests/dumps/cron/rest.pp 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: ArielGlenn: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/snapshot/manifests/dumps/cron/huge.pp b/modules/snapshot/manifests/dumps/cron/huge.pp index 396a869..8c0af51 100644 --- a/modules/snapshot/manifests/dumps/cron/huge.pp +++ b/modules/snapshot/manifests/dumps/cron/huge.pp @@ -14,6 +14,6 @@ command => '/usr/local/bin/fulldumps.sh 01 14 hugewikis >/dev/null', minute => '05', hour=> '02', -monthday=> '01-14', +monthday=> '04-14', } } diff --git a/modules/snapshot/manifests/dumps/cron/rest.pp b/modules/snapshot/manifests/dumps/cron/rest.pp index db608ea..3591511 100644 --- a/modules/snapshot/manifests/dumps/cron/rest.pp +++ b/modules/snapshot/manifests/dumps/cron/rest.pp @@ -14,6 +14,6 @@ command => '/usr/local/bin/fulldumps.sh 01 14 regular > /dev/null', minute => '05', hour=> '02', -monthday=> '01-14', +monthday=> '04-14', } } -- To view, visit https://gerrit.wikimedia.org/r/280762 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idbe988ba41fdd6fe724f2f72f0ff3f156bf9dc38 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: ArielGlennGerrit-Reviewer: ArielGlenn Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] hold off full dumps cron starting til the 4th of this month - change (operations/puppet)
ArielGlenn has uploaded a new change for review. https://gerrit.wikimedia.org/r/280762 Change subject: hold off full dumps cron starting til the 4th of this month .. hold off full dumps cron starting til the 4th of this month hopefully we'll be ready sooner, this gives time to get scap3 and all changes set up properly on the new hardware Change-Id: Idbe988ba41fdd6fe724f2f72f0ff3f156bf9dc38 --- M modules/snapshot/manifests/dumps/cron/huge.pp M modules/snapshot/manifests/dumps/cron/rest.pp 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/62/280762/1 diff --git a/modules/snapshot/manifests/dumps/cron/huge.pp b/modules/snapshot/manifests/dumps/cron/huge.pp index 396a869..8c0af51 100644 --- a/modules/snapshot/manifests/dumps/cron/huge.pp +++ b/modules/snapshot/manifests/dumps/cron/huge.pp @@ -14,6 +14,6 @@ command => '/usr/local/bin/fulldumps.sh 01 14 hugewikis >/dev/null', minute => '05', hour=> '02', -monthday=> '01-14', +monthday=> '04-14', } } diff --git a/modules/snapshot/manifests/dumps/cron/rest.pp b/modules/snapshot/manifests/dumps/cron/rest.pp index db608ea..3591511 100644 --- a/modules/snapshot/manifests/dumps/cron/rest.pp +++ b/modules/snapshot/manifests/dumps/cron/rest.pp @@ -14,6 +14,6 @@ command => '/usr/local/bin/fulldumps.sh 01 14 regular > /dev/null', minute => '05', hour=> '02', -monthday=> '01-14', +monthday=> '04-14', } } -- To view, visit https://gerrit.wikimedia.org/r/280762 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idbe988ba41fdd6fe724f2f72f0ff3f156bf9dc38 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: ArielGlenn___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [WIP] Try to fix missing exchange rate fixtures - change (wikimedia...crm)
Awight has uploaded a new change for review. https://gerrit.wikimedia.org/r/280763 Change subject: [WIP] Try to fix missing exchange rate fixtures .. [WIP] Try to fix missing exchange rate fixtures There's still a problem, however. Lazily committing to see what CI says. Change-Id: Ib58276d516fc2c5ea3727865585bfcbf6e6a7161 --- M sites/all/modules/wmf_civicrm/tests/phpunit/RefundTest.php 1 file changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/63/280763/1 diff --git a/sites/all/modules/wmf_civicrm/tests/phpunit/RefundTest.php b/sites/all/modules/wmf_civicrm/tests/phpunit/RefundTest.php index 92c0c6e..50b296c 100644 --- a/sites/all/modules/wmf_civicrm/tests/phpunit/RefundTest.php +++ b/sites/all/modules/wmf_civicrm/tests/phpunit/RefundTest.php @@ -219,6 +219,10 @@ * Make a lesser refund in the wrong currency */ public function testLesserWrongCurrencyRefund() { + $strtime = '04/03/2000'; + $dbtime = '2000-04-03'; + $epochtime = wmf_common_date_parse_string( $dbtime ); + $this->setExchangeRates( $epochtime, array( 'USD' => 1, 'COP' => 100 ) ); $result = $this->callAPISuccess('contribution', 'create', array( 'contact_id' => $this->contact_id, @@ -232,7 +236,7 @@ $result['id'], 'refund', TRUE, -date('Y-m-d'), +$dbtime, NULL, 'COP', 5000 @@ -246,7 +250,7 @@ $this->assertEquals(5.95, $contributions['values'][1]['total_amount']); $this->assertEquals('USD', $contributions['values'][2]['currency']); // Exchange rates might move a bit but hopefully it stays less than the original amount. - $this->assertTRUE($contributions['values'][2]['total_amount'] < exchange_rate_convert('COP', 5.95, wmf_common_date_parse_string('now'))); + $this->assertEquals($contributions['values'][2]['total_amount'], 5.95 * 100); } } -- To view, visit https://gerrit.wikimedia.org/r/280763 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib58276d516fc2c5ea3727865585bfcbf6e6a7161 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: Awight___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add LdapAuthentication role - change (mediawiki/vagrant)
jenkins-bot has submitted this change and it was merged. Change subject: Add LdapAuthentication role .. Add LdapAuthentication role Add a role to provision an openldap server and "ldapauth" wiki. The module that adds the LDAP server is pretty basic and tuned to work with ::role::ldapauth. It shouldn't be mistaken for a general purpose Puppet module. Bug: T128501 Change-Id: I11eb9e8ae9dc26ba9ea52219b770d9736cb914b3 --- M puppet/hieradata/common.yaml A puppet/modules/openldap/manifests/init.pp A puppet/modules/openldap/templates/default.erb A puppet/modules/openldap/templates/ldap.conf.erb A puppet/modules/openldap/templates/slapd.erb A puppet/modules/role/manifests/ldapauth.pp A puppet/modules/role/templates/ldapauth/LdapAuthentication.php.erb A puppet/modules/role/templates/ldapauth/check_db.erb A puppet/modules/role/templates/ldapauth/create_db.erb 9 files changed, 387 insertions(+), 0 deletions(-) Approvals: Dduvall: Looks good to me, approved jenkins-bot: Verified diff --git a/puppet/hieradata/common.yaml b/puppet/hieradata/common.yaml index 30c5b2e..48e5167 100644 --- a/puppet/hieradata/common.yaml +++ b/puppet/hieradata/common.yaml @@ -279,6 +279,10 @@ payments::branch: fundraising/REL1_25 payments::dir: /vagrant/mediawiki-fr +role::ldapauth::proxy_agent_password: vagrant_agent +role::ldapauth::writer_password: vagrant_writer +role::ldapauth::admin_password: vagrant_admin + role::mediawiki::hostname: "dev%{hiera('mediawiki::multiwiki::base_domain')}" role::quips::vhost_name: "quips%{hiera('mwv::tld')}%{::port_fragment}" diff --git a/puppet/modules/openldap/manifests/init.pp b/puppet/modules/openldap/manifests/init.pp new file mode 100644 index 000..f80d3f3 --- /dev/null +++ b/puppet/modules/openldap/manifests/init.pp @@ -0,0 +1,94 @@ +# == Class: openldap +# +# This class installs slapd and configures it with a single suffix hdb +# database. The implementation here is tuned to work with ::role::ldapauth and +# should not be mistaken for a reusable Puppet module. +# +# Based loosely on the openldap class from +# https://phabricator.wikimedia.org/diffusion/OPUP/ +# +# === Parameters +# +# [*suffix*] +# Distinguished name of the root of the subtree managed by this server. +# +# [*datadir*] +# The datadir this suffix will be installed, e.g. "/var/lib/ldap" +# +# [*admin_dn*] +# Distinguished name of admin user. +# +# [*admin_password*] +# Password for admin user. +# +# [*logging*] +# Specify the kind of logging desired. Defaults to "sync stats" And it is +# not named loglevel cause that's a puppet metaparameter +# +class openldap( +$suffix, +$datadir, +$admin_dn, +$admin_password, +$logging = 'sync stats', +) { +require_package('slapd', 'ldap-utils', 'python-ldap') + +# Remove the package provided ldap-based config system so that we can just +# hardcode the config in /etc/ldap/slapd.conf +exec { 'rm_slapd.d': +onlyif => '/usr/bin/test -d /etc/ldap/slapd.d', +command => '/bin/rm -rf /etc/ldap/slapd.d', +require => Package['slapd'], +} + +file { $datadir: +ensure => directory, +recurse => false, +owner => 'openldap', +group => 'openldap', +mode=> '0750', +force => true, +require => Package['slapd'], +} + +file { '/etc/ldap/slapd.conf' : +ensure => present, +owner => 'openldap', +group => 'openldap', +mode=> '0440', +content => template('openldap/slapd.erb'), +require => Package['slapd'], +notify => Service['slapd'] +} + +file { '/etc/default/slapd' : +ensure => present, +owner => 'root', +group => 'root', +mode=> '0444', +content => template('openldap/default.erb'), +require => Package['slapd'], +notify => Service['slapd'] +} + +file { '/etc/ldap/ldap.conf': +ensure => present, +owner => 'root', +group => 'root', +mode=> '0444', +content => template('openldap/ldap.conf.erb'), +require => Package['slapd'], +} + +service { 'slapd': +ensure => running, +hasstatus => true, +hasrestart => true, +require=> [ +Exec['rm_slapd.d'], +File[$datadir], +File['/etc/ldap/ldap.conf'], +] +} +} diff --git a/puppet/modules/openldap/templates/default.erb b/puppet/modules/openldap/templates/default.erb new file mode 100644 index 000..ec6e8d4 --- /dev/null +++ b/puppet/modules/openldap/templates/default.erb @@ -0,0 +1,53 @@ +# +### THIS FILE IS MANAGED BY PUPPET +### puppet:///modules/openldap/templates/default.erb +### + +# Bump the fd limit,
[MediaWiki-commits] [Gerrit] snapshots: update location of dumps cron script in jobs call... - change (operations/puppet)
ArielGlenn has submitted this change and it was merged. Change subject: snapshots: update location of dumps cron script in jobs calling it .. snapshots: update location of dumps cron script in jobs calling it Change-Id: Ib438807623f506b9595b4486356bab0c740d053a --- M modules/snapshot/manifests/dumps/cron/huge.pp M modules/snapshot/manifests/dumps/cron/rest.pp 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: ArielGlenn: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/snapshot/manifests/dumps/cron/huge.pp b/modules/snapshot/manifests/dumps/cron/huge.pp index c8b1a4f..396a869 100644 --- a/modules/snapshot/manifests/dumps/cron/huge.pp +++ b/modules/snapshot/manifests/dumps/cron/huge.pp @@ -11,7 +11,7 @@ ensure => 'present', environment => 'MAILTO=ops-du...@wikimedia.org', user=> $user, -command => "${snapshot::dumps::dirs::dumpsdir}/fulldumps.sh 01 14 hugewikis >/dev/null", +command => '/usr/local/bin/fulldumps.sh 01 14 hugewikis >/dev/null', minute => '05', hour=> '02', monthday=> '01-14', diff --git a/modules/snapshot/manifests/dumps/cron/rest.pp b/modules/snapshot/manifests/dumps/cron/rest.pp index 8f04520..db608ea 100644 --- a/modules/snapshot/manifests/dumps/cron/rest.pp +++ b/modules/snapshot/manifests/dumps/cron/rest.pp @@ -11,7 +11,7 @@ ensure => 'present', environment => 'MAILTO=ops-du...@wikimedia.org', user=> $user, -command => "${snapshot::dumps::dirs::dumpsdir}/fulldumps.sh 01 14 regular > /dev/null", +command => '/usr/local/bin/fulldumps.sh 01 14 regular > /dev/null', minute => '05', hour=> '02', monthday=> '01-14', -- To view, visit https://gerrit.wikimedia.org/r/280761 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib438807623f506b9595b4486356bab0c740d053a Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: ArielGlennGerrit-Reviewer: ArielGlenn Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Rename EngineScore to PaulScore - change (wikimedia...relevanceForge)
Tjones has submitted this change and it was merged. Change subject: Rename EngineScore to PaulScore .. Rename EngineScore to PaulScore This needs a less generic name, and PaulScore for Paul Nelson who presented the idea is as good as any. Change-Id: I7c0460dc82b7c7cd52fdc468cc597a49f7217495 --- M engineScore.py 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Tjones: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/engineScore.py b/engineScore.py index 6f25be3..b273527 100644 --- a/engineScore.py +++ b/engineScore.py @@ -173,7 +173,7 @@ # Formula from talk given by Paul Nelson at ElasticON 2016 # TODO: This needs a proper name -class EngineScore: +class PaulScore: def __init__(self, sessions, results, factor): self.results = results self.sessions = sessions @@ -239,7 +239,7 @@ results = load_results(results_dir) print('Calculating engine score') -scorer = EngineScore(sessions, results, config.get('settings', 'factor')) +scorer = PaulScore(sessions, results, config.get('settings', 'factor')) score = scorer.engine_score() return score, scorer.histogram -- To view, visit https://gerrit.wikimedia.org/r/279616 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7c0460dc82b7c7cd52fdc468cc597a49f7217495 Gerrit-PatchSet: 2 Gerrit-Project: wikimedia/discovery/relevanceForge Gerrit-Branch: master Gerrit-Owner: EBernhardsonGerrit-Reviewer: DCausse Gerrit-Reviewer: EBernhardson Gerrit-Reviewer: Tjones Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] snapshots: update location of dumps cron script in jobs call... - change (operations/puppet)
ArielGlenn has uploaded a new change for review. https://gerrit.wikimedia.org/r/280761 Change subject: snapshots: update location of dumps cron script in jobs calling it .. snapshots: update location of dumps cron script in jobs calling it Change-Id: Ib438807623f506b9595b4486356bab0c740d053a --- M modules/snapshot/manifests/dumps/cron/huge.pp M modules/snapshot/manifests/dumps/cron/rest.pp 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/61/280761/1 diff --git a/modules/snapshot/manifests/dumps/cron/huge.pp b/modules/snapshot/manifests/dumps/cron/huge.pp index c8b1a4f..986b4c6 100644 --- a/modules/snapshot/manifests/dumps/cron/huge.pp +++ b/modules/snapshot/manifests/dumps/cron/huge.pp @@ -11,7 +11,7 @@ ensure => 'present', environment => 'MAILTO=ops-du...@wikimedia.org', user=> $user, -command => "${snapshot::dumps::dirs::dumpsdir}/fulldumps.sh 01 14 hugewikis >/dev/null", +command => "/usr/local/bin/fulldumps.sh 01 14 hugewikis >/dev/null", minute => '05', hour=> '02', monthday=> '01-14', diff --git a/modules/snapshot/manifests/dumps/cron/rest.pp b/modules/snapshot/manifests/dumps/cron/rest.pp index 8f04520..db3f180 100644 --- a/modules/snapshot/manifests/dumps/cron/rest.pp +++ b/modules/snapshot/manifests/dumps/cron/rest.pp @@ -11,7 +11,7 @@ ensure => 'present', environment => 'MAILTO=ops-du...@wikimedia.org', user=> $user, -command => "${snapshot::dumps::dirs::dumpsdir}/fulldumps.sh 01 14 regular > /dev/null", +command => "/usr/local/bin/fulldumps.sh 01 14 regular > /dev/null", minute => '05', hour=> '02', monthday=> '01-14', -- To view, visit https://gerrit.wikimedia.org/r/280761 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib438807623f506b9595b4486356bab0c740d053a Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: ArielGlenn___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] CRM-18178 exclude _bak & _backup tables from trigger creation - change (wikimedia...civicrm)
jenkins-bot has submitted this change and it was merged. Change subject: CRM-18178 exclude _bak & _backup tables from trigger creation .. CRM-18178 exclude _bak & _backup tables from trigger creation Bug: T131221 Change-Id: Id492beaa5990971be265da425c0b8a37dd313332 --- M CRM/Logging/Schema.php 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Awight: Looks good to me, approved jenkins-bot: Verified diff --git a/CRM/Logging/Schema.php b/CRM/Logging/Schema.php index d920d11..7455961 100644 --- a/CRM/Logging/Schema.php +++ b/CRM/Logging/Schema.php @@ -135,6 +135,9 @@ $this->tables = preg_grep('/^civicrm_queue_/', $this->tables, PREG_GREP_INVERT); $this->tables = preg_grep('/^civicrm_menu/', $this->tables, PREG_GREP_INVERT); //CRM-14672 $this->tables = preg_grep('/_temp_/', $this->tables, PREG_GREP_INVERT); +// CRM-18178 +$this->tables = preg_grep('/_bak$/', $this->tables, PREG_GREP_INVERT); +$this->tables = preg_grep('/_backup$/', $this->tables, PREG_GREP_INVERT); // do not log civicrm_mailing_event* tables, CRM-12300 $this->tables = preg_grep('/^civicrm_mailing_event_/', $this->tables, PREG_GREP_INVERT); -- To view, visit https://gerrit.wikimedia.org/r/277441 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id492beaa5990971be265da425c0b8a37dd313332 Gerrit-PatchSet: 4 Gerrit-Project: wikimedia/fundraising/crm/civicrm Gerrit-Branch: master Gerrit-Owner: EileenGerrit-Reviewer: Awight Gerrit-Reviewer: Ejegg Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Shorter selector for .hidden - change (mediawiki...DonationInterface)
jenkins-bot has submitted this change and it was merged. Change subject: Shorter selector for .hidden .. Shorter selector for .hidden Use !important instead of trying to be the most specific. Change-Id: Ibe7905fb9a719c907800e932822f51a01029246f --- M gateway_forms/mustache/forms.css 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Awight: Looks good to me, approved jenkins-bot: Verified diff --git a/gateway_forms/mustache/forms.css b/gateway_forms/mustache/forms.css index 1f8e34c..e06069d 100644 --- a/gateway_forms/mustache/forms.css +++ b/gateway_forms/mustache/forms.css @@ -367,8 +367,8 @@ -webkit-box-shadow: inset 0 1px 4px rgba(0,0,1,.5); box-shadow: inset 0 1px 4px rgba(0,0,1,.5); } -.amount_header span.hidden, input.hidden, .amount_header select.hidden { - display: none; +.hidden { + display: none !important; } #overlay { z-index: 999; -- To view, visit https://gerrit.wikimedia.org/r/280270 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibe7905fb9a719c907800e932822f51a01029246f Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/DonationInterface Gerrit-Branch: master Gerrit-Owner: EjeggGerrit-Reviewer: AndyRussG Gerrit-Reviewer: Awight Gerrit-Reviewer: Cdentinger Gerrit-Reviewer: Ssmith Gerrit-Reviewer: XenoRyet Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Send failmail when TY job can't find contribution - change (wikimedia...crm)
jenkins-bot has submitted this change and it was merged. Change subject: Send failmail when TY job can't find contribution .. Send failmail when TY job can't find contribution This should come to our attention. Bug: T131200 Change-Id: If2493a62b432fa7c1c1af2f47f2630fcc497066c --- M sites/all/modules/thank_you/thank_you.module 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Awight: Looks good to me, approved jenkins-bot: Verified diff --git a/sites/all/modules/thank_you/thank_you.module b/sites/all/modules/thank_you/thank_you.module index 8bb36eb..582777a 100644 --- a/sites/all/modules/thank_you/thank_you.module +++ b/sites/all/modules/thank_you/thank_you.module @@ -241,7 +241,8 @@ // check that the API result is a valid contribution result if( !WMFCiviAPICheck::check_api_contribution( $contribution, $contribution_id ) ){ // the API result is bad - watchdog('thank_you', 'Could not retrieve contribution record for: ' . $contribution_id . '' . print_r( $contribution, true ) . '', array(), WATCHDOG_ERROR); + $msg = 'Could not retrieve contribution record for: ' . $contribution_id . '' . print_r( $contribution, true ) . ''; + wmf_common_failmail( 'thank_you', $msg ); return false; } // go ahead and remove the extra layer of indirection to make it easier to use -- To view, visit https://gerrit.wikimedia.org/r/280580 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If2493a62b432fa7c1c1af2f47f2630fcc497066c Gerrit-PatchSet: 2 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: EjeggGerrit-Reviewer: Awight Gerrit-Reviewer: Cdentinger Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] CRM-18193 add routine for converting log tables to support n... - change (wikimedia...civicrm)
jenkins-bot has submitted this change and it was merged. Change subject: CRM-18193 add routine for converting log tables to support new log_conn_id format & hook spec .. CRM-18193 add routine for converting log tables to support new log_conn_id format & hook spec Bug: T131222 Change-Id: I354d095ce0dc648641d08d9ecf9758b1665f6a0d --- M CRM/Logging/Schema.php M api/v3/System.php 2 files changed, 103 insertions(+), 4 deletions(-) Approvals: Awight: Looks good to me, approved jenkins-bot: Verified diff --git a/CRM/Logging/Schema.php b/CRM/Logging/Schema.php index d920d11..2d5ea36 100644 --- a/CRM/Logging/Schema.php +++ b/CRM/Logging/Schema.php @@ -56,6 +56,8 @@ /** * Specifications of all log table including * - engine (default is archive, if not set.) + * - engine_config, a string appended to the engine type. + *For INNODB space can be saved with 'ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4' * - indexes (default is none and they cannot be added unless engine is innodb. If they are added and *engine is not set to innodb an exception will be thrown since quiet acquiescence is easier to miss). * - exceptions (by default those stored in $this->exceptions are included). These are @@ -279,6 +281,82 @@ } /** + * Update log tables structure. + * + * This function updates log tables to have the log_conn_id type of varchar + * and also implements any engine change to INNODB defined by the hooks. + * + * Note changing engine & adding hook-defined indexes, but not changing back + * to ARCHIVE if engine has not been deliberately set (by hook) and not dropping + * indexes. Sysadmin will need to manually intervene to revert to defaults. + */ + public function updateLogTableSchema() { +$updateLogConn = FALSE; +foreach ($this->logs as $mainTable => $logTable) { + $alterSql = array(); + $tableSpec = $this->logTableSpec[$mainTable]; + if (isset($tableSpec['engine']) && strtoupper($tableSpec['engine']) != $this->getEngineForLogTable($logTable)) { +$alterSql[] = "ENGINE=" . $tableSpec['engine'] . " " . CRM_Utils_Array::value('engine_config', $tableSpec); +if (!empty($tableSpec['indexes'])) { + $indexes = $this->getIndexesForTable($logTable); + foreach ($tableSpec['indexes'] as $indexName => $indexSpec) { +if (!in_array($indexName, $indexes)) { + if (is_array($indexSpec)) { +$indexSpec = implode(" , ", $indexSpec); + } + $alterSql[] = "ADD INDEX {$indexName}($indexSpec)"; +} + } +} + } + $columns = $this->columnSpecsOf($logTable); + if (empty($columns['log_conn_id'])) { +throw new Exception($logTable . print_r($columns, TRUE)); + } + if ($columns['log_conn_id']['DATA_TYPE'] != 'varchar' || $columns['log_conn_id']['LENGTH'] != 17) { +$alterSql[] = "MODIFY log_conn_id VARCHAR(17)"; +$updateLogConn = TRUE; + } + if (!empty($alterSql)) { +CRM_Core_DAO::executeQuery("ALTER TABLE {$this->db}.{$logTable} " . implode(', ', $alterSql)); + } +} +if ($updateLogConn) { + civicrm_api3('Setting', 'create', array('logging_uniqueid_date' => date('Y-m-d H:i:s'))); +} + } + + /** + * Get the engine for the given table. + * + * @param string $table + * + * @return string + */ + public function getEngineForLogTable($table) { +return strtoupper(CRM_Core_DAO::singleValueQuery(" + SELECT ENGINE FROM information_schema.tables WHERE TABLE_NAME = %1 + AND table_schema = %2 +", array(1 => array($table, 'String'), 2 => array($this->db, 'String'; + } + + /** + * Get all the indexes in the table. + * + * @param string $table + * + * @return array + */ + public function getIndexesForTable($table) { +return CRM_Core_DAO::executeQuery(" + SELECT constraint_name + FROM information_schema.key_column_usage + WHERE table_schema = %2 AND table_name = %1", + array(1 => array($table, 'String'), 2 => array($this->db, 'String')) +)->fetchAll(); + } + + /** * Add missing (potentially specified) log table columns for the given table. * * @param string $table @@ -456,7 +534,7 @@ private function columnSpecsOf($table) { static $columnSpecs = array(), $civiDB = NULL; -if (empty($columnSpecs)) { +if (empty($columnSpecs) || !isset($columnSpecs[$table])) { if (!$civiDB) { $dao = new CRM_Contact_DAO_Contact(); $civiDB = $dao->_database; @@ -553,6 +631,15 @@ } /** + * Getter for logTableSpec. + * + * @return array + */ + public function getLogTableSpec() { +return $this->logTableSpec; + } + + /** * Create a log table with schema mirroring the given table’s structure and seeding it with the given table’s contents. */ private
[MediaWiki-commits] [Gerrit] [UnitTest] Archive extension - change (integration/config)
jenkins-bot has submitted this change and it was merged. Change subject: [UnitTest] Archive extension .. [UnitTest] Archive extension Per https://gerrit.wikimedia.org/r/#/c/280755/ Change-Id: If84dc36b4cf07f243794e3043349e69f04461549 --- M zuul/layout.yaml 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/zuul/layout.yaml b/zuul/layout.yaml index 5f4bdad..26d2752 100644 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -5956,7 +5956,7 @@ - name: mediawiki/extensions/UnitTest template: - - name: extension-unittests-non-voting + - name: archived - name: mediawiki/extensions/UpdateMediaWiki template: -- To view, visit https://gerrit.wikimedia.org/r/280756 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If84dc36b4cf07f243794e3043349e69f04461549 Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: PaladoxGerrit-Reviewer: Hashar Gerrit-Reviewer: JanZerebecki 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] Move dp.src handlers to their respective dom handlers - change (mediawiki...parsoid)
Arlolra has uploaded a new change for review. https://gerrit.wikimedia.org/r/280760 Change subject: Move dp.src handlers to their respective dom handlers .. Move dp.src handlers to their respective dom handlers * That these cases still remain in the encapsulated content handler looks like a relic of 8939c692. * This permits better fallback behaviour when the reuse test fails. (see the entity encoding change in the blacklisted test). * The newly failing test is because the case now falls to the figure handler, which doesn't know about dp.src. That seems acceptable though, since the output is the same as the html2wt test, where we've removed the dp.src. Also, we're only adding the placeholder marking so the content is uneditable. Presumably that means selser will take care of it. Change-Id: I430ee902a80dda199683937eae6dca02d50c3606 --- M lib/html2wt/DOMHandlers.js M tests/parserTests-blacklist.js 2 files changed, 127 insertions(+), 141 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid refs/changes/60/280760/1 diff --git a/lib/html2wt/DOMHandlers.js b/lib/html2wt/DOMHandlers.js index e9edd17..ea153be 100644 --- a/lib/html2wt/DOMHandlers.js +++ b/lib/html2wt/DOMHandlers.js @@ -528,6 +528,21 @@ !(/^mw:Includes\//.test(node.getAttribute('typeof'; } +// Uneditable forms wrapped with mw:Placeholder tags OR unedited nowikis +function emitPlaceholderSrc(node, state) { + var dp = DU.getDataParsoid(node); + if (//.test(dp.src)) { + state.hasSelfClosingNowikis = true; + } + // FIXME: Should this also check for tabs and plain space + // chars interspersed with newlines? + if (dp.src.match(/^\n+$/)) { + state.setSep((state.sep.src || '') + dp.src); + } else { + state.serializer.emitWikitext(dp.src, node); + } +} + /** * A map of `domHandler`s keyed on nodeNames. * @@ -964,6 +979,11 @@ var property = node.getAttribute('property'); var dp = DU.getDataParsoid(node); + if (dp.src !== undefined && + /(^|\s)mw:Placeholder(\/\w*)?$/.test(type)) { + return emitPlaceholderSrc(node, state); + } + // Check for property before type so that page properties with // templated attrs roundtrip properly. // Ex: {{DEFAULTSORT:{{echo|foo}} }} @@ -1065,9 +1085,14 @@ }, span: { handle: Promise.method(function(node, state, wrapperUnmodified) { + var dp = DU.getDataParsoid(node); var type = node.getAttribute('typeof'); + var contentSrc = node.textContent || node.innerHTML; if (isRecognizedSpanWrapper(type)) { if (type === 'mw:Nowiki') { + if (dp.src !== undefined && contentSrc === dp.src) { + return emitPlaceholderSrc(node, state); + } state.emitChunk('', node); return Promise.reduce(Array.from(node.childNodes), function(_, child) { if (DU.isElt(child)) { @@ -1094,7 +1119,9 @@ } else if (/(?:^|\s)mw\:Entity/.test(type) && node.childNodes.length === 1) { // handle a new mw:Entity (not handled by selser) by // serializing its children - if (DU.isText(node.firstChild)) { + if (dp.src !== undefined && contentSrc === dp.srcContent) { + state.serializer.emitWikitext(dp.src, node); + } else if (DU.isText(node.firstChild)) { state.emitChunk( Util.entityEncodeAll(node.firstChild.nodeValue), node.firstChild); @@ -1103,7 +1130,9 @@ return state.serializeChildren(node); } } else if (/(^|\s)mw:Placeholder(\/\w*)?/.test(type)) { - if (/(^|\s)mw:Placeholder(\s|$)/ && + if (dp.src !== undefined) { + return emitPlaceholderSrc(node, state); + } else if
[MediaWiki-commits] [Gerrit] Remove commenting - change (wikimedia...civicrm)
jenkins-bot has submitted this change and it was merged. Change subject: Remove commenting .. Remove commenting This wmf customisation is no longer required Bug: T131224 Change-Id: I62d5e3ae9bd30fbd1fde7c492d26bd462d7448cc --- M CRM/Logging/Schema.php 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Awight: Looks good to me, approved jenkins-bot: Verified diff --git a/CRM/Logging/Schema.php b/CRM/Logging/Schema.php index 5efa2ed..d920d11 100644 --- a/CRM/Logging/Schema.php +++ b/CRM/Logging/Schema.php @@ -219,7 +219,7 @@ else { $tableNames = $this->tables; } -/* + foreach ($tableNames as $table) { $validName = CRM_Core_DAO::shortenSQLName($table, 48, TRUE); @@ -233,7 +233,7 @@ $dao->executeTriggerQuery("DROP TRIGGER IF EXISTS {$validName}_after_update"); $dao->executeTriggerQuery("DROP TRIGGER IF EXISTS {$validName}_after_delete"); } -*/ + // now lets also be safe and drop all triggers that start with // civicrm_ if we are dropping all triggers // we need to do this to capture all the leftover triggers since -- To view, visit https://gerrit.wikimedia.org/r/280160 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I62d5e3ae9bd30fbd1fde7c492d26bd462d7448cc Gerrit-PatchSet: 5 Gerrit-Project: wikimedia/fundraising/crm/civicrm Gerrit-Branch: master Gerrit-Owner: EileenGerrit-Reviewer: Awight Gerrit-Reviewer: Ejegg Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] CRM-18212 allow triggers to be managed offline. - change (wikimedia...civicrm)
jenkins-bot has submitted this change and it was merged. Change subject: CRM-18212 allow triggers to be managed offline. .. CRM-18212 allow triggers to be managed offline. This commit adds a setting which when set (in civicrm.settings.php or through the api or drush - not through the UI) allows you to designate the site as having it's triggers managed offline. This is good for when it really is not appropriate to give the web use that mysql permission. ie when replication is in play because it can allow privilige escalation https://github.com/civicrm/civicrm-core/pull/8036 Bug: T131224 Change-Id: Iedc8dfca17be38a9ea2b5848bb069e7c84805bf8 --- M CRM/Core/DAO.php M CRM/Core/Error.php M CRM/Logging/Schema.php 3 files changed, 113 insertions(+), 20 deletions(-) Approvals: Awight: Looks good to me, approved jenkins-bot: Verified diff --git a/CRM/Core/DAO.php b/CRM/Core/DAO.php index 3657d07..15a0417 100644 --- a/CRM/Core/DAO.php +++ b/CRM/Core/DAO.php @@ -1288,6 +1288,92 @@ } /** + * Execute a query altering triggers. + * + * As this requires a high permission level we funnel the queries through here to + * facilitate them being taken 'offline'. + * + * @param string $triggerSQL + * The sql to run to create or drop the triggers. + * @param array $params + * Optional parameters to interpolate into the string. + */ + public static function executeTriggerQuery($triggerSQL, $params = array()) { +if (civicrm_api3('Setting', 'getvalue', array('name' => 'logging_no_trigger_permission', 'group' => 'CiviCRM Preferences'))) { + $prefix = 'trigger' . CRM_Utils_Request::id(); + CRM_Core_DAO::logQuery("DELIMITER //", $params, TRUE, FALSE, $prefix, TRUE); + CRM_Core_DAO::logQuery($triggerSQL . '//', $params, TRUE, FALSE, $prefix, TRUE); + CRM_Core_Session::setStatus(ts('The mysql commands you need to run are stored in %1', array( +1 => CRM_Core_Error::getDebugLoggerFileName($prefix))) + ); + CRM_Core_DAO::logQuery("DELIMITER ;", $params, TRUE, FALSE, $prefix, TRUE); +} +else { + // Multilingual needs to be false. + CRM_Core_DAO::executeQuery($triggerSQL, $params, TRUE, NULL, FALSE, FALSE); +} + } + + /** + * Get the query that would be generated. + * + * This could be used in tests or where it is desirable to log the query rather than run it. + * + * @param string $query + * Query to be executed. + * + * @param array $params + * @param bool $abort + * @param bool $i18nRewrite + * + * @return string + * The resolved mysql query. + */ + public static function getQuery( +$query, +$params = array(), +$abort = TRUE, +$i18nRewrite = TRUE + ) { +$queryStr = self::composeQuery($query, $params, $abort); +global $dbLocale; +if ($i18nRewrite and $dbLocale) { + $queryStr = CRM_Core_I18n_Schema::rewriteQuery($query); +} +return $queryStr; + } + + /** + * Log the query that would be generated. + * + * @param string $query + * Query to be executed. + * + * @param array $params + * @param bool $abort + * @param bool $i18nRewrite + * @param string $outputFilePrefix + * @param bool $raw + * Should we omit data like timestamp and debug level? + */ + public static function logQuery( +$query, +$params = array(), +$abort = TRUE, +$i18nRewrite = TRUE, +$outputFilePrefix = '', +$raw = FALSE + ) { +$queryStr = self::getQuery($query, $params, $abort, $i18nRewrite); +if ($raw) { + CRM_Core_Error::debug_raw_message($queryStr, FALSE, $outputFilePrefix) ; +} +else { + CRM_Core_Error::debug_log_message($queryStr, FALSE, $outputFilePrefix); +} + } + + /** * Execute a query and get the single result. * * @param string $query @@ -1890,7 +1976,7 @@ // test for create view and trigger permissions and if allowed, add the option to go multilingual // and logging // I'm not sure why we use the getStaticProperty for an error, rather than checking for DB_Error -$errorScope = CRM_Core_TemporaryErrorScope::ignoreException(); +CRM_Core_TemporaryErrorScope::ignoreException(); $dao = new CRM_Core_DAO(); if ($view) { $dao->query('CREATE OR REPLACE VIEW civicrm_domain_view AS SELECT * FROM civicrm_domain'); @@ -2103,17 +2189,8 @@ $triggerName = "{$validName}_{$whenName}_{$eventName}"; $triggerSQL = "CREATE TRIGGER $triggerName $whenName $eventName ON $tableName FOR EACH ROW BEGIN $varString $sqlString END"; - /* - CRM_Core_DAO::executeQuery("DROP TRIGGER IF EXISTS $triggerName"); - CRM_Core_DAO::executeQuery( -$triggerSQL, -array(), -TRUE, -NULL, -FALSE, -FALSE - ); - */ +
[MediaWiki-commits] [Gerrit] snapshots: move dumps cron job script to same location as th... - change (operations/puppet)
ArielGlenn has submitted this change and it was merged. Change subject: snapshots: move dumps cron job script to same location as the rest .. snapshots: move dumps cron job script to same location as the rest also fix up the variables for the dirs it references, as they have changed, and add placeholders for the scap repo dirs and associated vars add back the /srv/dumps script dir for now until scap is set and going fix up a couple cron jobs that were referencing the wrong script dir Change-Id: Id2e32765ecb80acd1fd45258aad61cba7e25ac20 --- A modules/snapshot/manifests/deployment/common.pp M modules/snapshot/manifests/dumps/cron.pp M modules/snapshot/manifests/dumps/dirs.pp M modules/snapshot/manifests/dumps/pagetitles.pp M modules/snapshot/templates/fulldumps.sh.erb 5 files changed, 33 insertions(+), 7 deletions(-) Approvals: ArielGlenn: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/snapshot/manifests/deployment/common.pp b/modules/snapshot/manifests/deployment/common.pp new file mode 100644 index 000..45508b8 --- /dev/null +++ b/modules/snapshot/manifests/deployment/common.pp @@ -0,0 +1,14 @@ +class snapshot::deployment::common ( +$owner = undef, +$group = undef, +) { +$repodir = '/srv/deployment/dumps' +file { $repodir: +ensure => 'directory', +path => $repodir, +mode => '0755', +owner => $owner, +group => $group, +} +$scriptsdir = '/srv/deployment/dumps/dumps' +} diff --git a/modules/snapshot/manifests/dumps/cron.pp b/modules/snapshot/manifests/dumps/cron.pp index 04b236b..2c7b29f 100644 --- a/modules/snapshot/manifests/dumps/cron.pp +++ b/modules/snapshot/manifests/dumps/cron.pp @@ -11,9 +11,9 @@ $ensure = 'absent' } -file { "${snapshot::dumps::dirs::dumpsdir}/fulldumps.sh": +file { '/usr/local/bin/fulldumps.sh': ensure => 'present', -path=> "${snapshot::dumps::dirs::dumpsdir}/fulldumps.sh", +path=> '/usr/local/bin/fulldumps.sh', mode=> '0755', owner => $user, group => root, diff --git a/modules/snapshot/manifests/dumps/dirs.pp b/modules/snapshot/manifests/dumps/dirs.pp index 753c934..cbef219 100644 --- a/modules/snapshot/manifests/dumps/dirs.pp +++ b/modules/snapshot/manifests/dumps/dirs.pp @@ -73,4 +73,14 @@ owner => 'root', group => 'root', } + + +$scriptsdir = '/srv/dumps' +file { $scriptsdir: + ensure => 'directory', + path => $scriptsdir, + mode => '0755', + owner => 'root', + group => 'root', +} } diff --git a/modules/snapshot/manifests/dumps/pagetitles.pp b/modules/snapshot/manifests/dumps/pagetitles.pp index 9ff5809..a2373a9 100644 --- a/modules/snapshot/manifests/dumps/pagetitles.pp +++ b/modules/snapshot/manifests/dumps/pagetitles.pp @@ -41,7 +41,7 @@ ensure => $ensure, environment => 'MAILTO=ops-du...@wikimedia.org', user=> $user, -command => "cd ${snapshot::dumps::dirs::dumpsdir}; python onallwikis.py --configfile confs/wikidump.conf.monitor --filenameformat '{w}-{d}-all-titles-in-ns-0.gz' --outdir '${snapshot::dumps::dirs::datadir}/public/other/pagetitles/{d}' --query \"'select page_title from page where page_namespace=0;'\"", +command => "cd ${snapshot::dumps::dirs::scriptsdir}; python onallwikis.py --configfile confs/wikidump.conf.monitor --filenameformat '{w}-{d}-all-titles-in-ns-0.gz' --outdir '${snapshot::dumps::dirs::datadir}/public/other/pagetitles/{d}' --query \"'select page_title from page where page_namespace=0;'\"", minute => '10', hour=> '8', require => File["${snapshot::dumps::dirs::datadir}/public/other/pagetitles"], @@ -51,7 +51,7 @@ ensure => $ensure, environment => 'MAILTO=ops-du...@wikimedia.org', user=> $user, -command => "cd ${snapshot::dumps::dirs::dumpsdir}; python onallwikis.py --configfile confs/wikidump.conf.monitor --filenameformat '{w}-{d}-all-media-titles.gz' --outdir '${snapshot::dumps::dirs::datadir}/public/other/mediatitles/{d}' --query \"'select page_title from page where page_namespace=6;'\"", +command => "cd ${snapshot::dumps::dirs::scriptsdir}; python onallwikis.py --configfile confs/wikidump.conf.monitor --filenameformat '{w}-{d}-all-media-titles.gz' --outdir '${snapshot::dumps::dirs::datadir}/public/other/mediatitles/{d}' --query \"'select page_title from page where page_namespace=6;'\"", minute => '50', hour=> '8', require => File["${snapshot::dumps::dirs::datadir}/public/other/mediatitles"], diff --git a/modules/snapshot/templates/fulldumps.sh.erb b/modules/snapshot/templates/fulldumps.sh.erb index 0070bea..f01a6dd 100644 --- a/modules/snapshot/templates/fulldumps.sh.erb
[MediaWiki-commits] [Gerrit] Discontinued, empty the repository - change (mediawiki...UnitTest)
jenkins-bot has submitted this change and it was merged. Change subject: Discontinued, empty the repository .. Discontinued, empty the repository Change-Id: I26dca4ef65e1d60a01d6ad3e8414d38446116e0c --- D Debug.constants.php D Debug.php D ExtensionsSeleniumSlideshow.php D ExtensionsSeleniumSlideshowTemplate.php D ExtensionsSeleniumTestCase.php D ExtensionsTestCase.php A UnitTest.php D tests/AllTests.php D tests/TestConfiguration.php.dist D tests/TestHelper.php D tests/UnitTest/AllTests.php D tests/UnitTest/DebugTestCase.php D tests/UnitTest/TemplateTestCase.php D tests/UnitTest/VerifySeleniumTestCase.php D tests/UnitTestSeleniumTestCase.php D tests/UnitTestTestCase.php D tests/phpunit.xml D tests/selenium.ini.dst D tests/unittest.conf.dist D tests/unittest.sh D tools/tests-template/AllTests.php D tools/tests-template/TestConfiguration.php.dist D tools/tests-template/TestHelper.php D tools/tests-template/phpunit.xml D tools/tests-template/selenium.ini.dst D tools/tests-template/unittest.conf.dist D tools/tests-template/unittest.sh 27 files changed, 3 insertions(+), 3,546 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/Debug.constants.php b/Debug.constants.php deleted file mode 100644 index 1061c5e..000 --- a/Debug.constants.php +++ /dev/null @@ -1,107 +0,0 @@ - - */ - -/*{/ - -/** - * COMMA - * - * A comma - */ -define( 'COMMA', "," ); - -/** - * NL - * - * The UNIX new line - */ -define( 'NL', "\n" ); - -/** - * TAB - * - * A horizontal tab - * - */ -define( 'TAB', "\t" ); - -/** - * BR - * - * The html new line - */ -define( 'BR', '' ); - -/** - * PREo - * - * The html open pre tag - */ -define( 'PREo', '' ); - -/** - * PREc - * - * The html close pre tag - */ -define( 'PREc', '' ); - -/** - * HR - * - * The html Horizontal Rule - */ -define( 'HR', '' ); - -/** - * _ - * - * A space - */ -define( '_', ' ' ); - -/** - * DS - * - * The directory separator. - */ -define( 'DS', DIRECTORY_SEPARATOR ); - -/** - * PS - * - * Path Separator - */ -define( 'PS', PATH_SEPARATOR ); - -/** - * PN - * - * Paamayim Nekudotayim - */ -define( 'PN', '::' ); - -/** - * DUMP - * - * This is used bu Debug:dump() in an eval() call. This causes the variable dump - * to output line and file information. - */ -define( 'DUMP', 'return__FILE__ . _ . PN . _ . date(\'r\') . _ . NL;' ); - diff --git a/Debug.php b/Debug.php deleted file mode 100644 index aa22de7..000 --- a/Debug.php +++ /dev/null @@ -1,124 +0,0 @@ - - */ - -/** - * Constants used by the debugging statements. - */ -require_once 'Debug.constants.php'; - -/** - * Debug - * - * This class contains methods to dump variables to the screen and to optionally - * terminate the application with a stack trace. - */ -class Debug -{ - - - # - # utility - # - - - /** -* Formatted variable dumper with option to terminate script. -* -* Including eval(DUMP) in your label will allow you to see line and file -* information during debugging. -* -* -* -* -* -* @param mixed $variable The variable to dump. -* @param string $label The label to pass to the output. -* @param boolean $dieIf true, script will terminate. -*/ - public static function dump( $variable, $label, $die = false ) - { - global $wgCommandLineMode; - - // An 80 character rule. - $rule80 = ''; - - // Pre dump formatting - $pre = ( $wgCommandLineMode ) ? PHP_EOL . $rule80 . PHP_EOL . $label . PHP_EOL . PHP_EOL : '' . HR . PHP_EOL . $label . PHP_EOL . HR . PREo . PHP_EOL; - - // Post dump formatting - $post = ( $wgCommandLineMode ) ? PHP_EOL : PHP_EOL . PREc . _ . HR . '' . PHP_EOL; - - echo $pre; - if ( is_string( $variable ) ) { - print_r( $variable ); - } - else { - var_dump( $variable ); - } - echo $post; - - // @codeCoverageIgnoreStart - if ( $die === true ) { - die( 'Terminating at: ' . eval( DUMP ) . 'From: ' . $label . PHP_EOL ); - } - // @codeCoverageIgnoreEnd - } - - /** -* Puke a stack trace. -* -* By default, calling puke will make the application die. -
[MediaWiki-commits] [Gerrit] Introduce foreachwikiwithextension - change (mediawiki/vagrant)
jenkins-bot has submitted this change and it was merged. Change subject: Introduce foreachwikiwithextension .. Introduce foreachwikiwithextension Follow up to I2ad8cc3. Now that it is possible for a wiki to opt-out of enabling a globally installed extension we need a way to also exclude those wikis from `foreachwiki` scripts. In the Wikimedia production environment, this would be done using `foreachwikiindblist` and manually curated dblist files. In MediaWiki-Vagrant we'd like thing to be a bit more automated. This change introduces a new `wikihasextension` helper script that can generate a dblist of wikis with a given extension enabled. This is paired with the new `foreachwikiwithextension` script which is a `foreachwiki` work-alike that takes an extension, a maintenance script and optional additional arguments. The extensions active for a wiki are tracked in a new `$wmvActiveExtensions` global variable as part of the actions of the mediawiki::extension Puppet module. Existing uses of `foreachwiki` that depend on a particular extension being installed have been updated to use `foreachwikiwithextension` instead. All of this will fix problems found when combining role::centralauth and role::ldapauth in a single MediaWiki-Vagrant VM. Bug: T128501 Change-Id: I7b2bf3d25ec148a0e949159178bf2616b5739c82 --- M puppet/modules/mediawiki/manifests/multiwiki.pp M puppet/modules/mediawiki/templates/extension.php.erb M puppet/modules/mediawiki/templates/multiwiki/CommonSettings.php.erb M puppet/modules/mediawiki/templates/multiwiki/LoadWgConf.php.erb M puppet/modules/mediawiki/templates/multiwiki/foreachwiki.erb A puppet/modules/mediawiki/templates/multiwiki/foreachwikiwithextension.erb A puppet/modules/mediawiki/templates/multiwiki/wikihasextension.erb M puppet/modules/mediawiki/templates/wiki/dbConf.php.erb M puppet/modules/role/manifests/antispoof.pp M puppet/modules/role/manifests/centralauth.pp M puppet/modules/role/manifests/cirrussearch.pp M puppet/modules/role/manifests/commons.pp M puppet/modules/role/manifests/echo.pp M puppet/modules/role/manifests/geodata_elastic.pp M puppet/modules/role/manifests/wikidata.pp M puppet/modules/role/templates/centralauth/is-centralauth-migratePass0-needed.bash.erb A puppet/modules/role/templates/cirrussearch/build_search_index.erb A puppet/modules/role/templates/cirrussearch/is-cirrussearch-forceindex-needed.erb 18 files changed, 167 insertions(+), 22 deletions(-) Approvals: Anomie: Looks good to me, but someone else must approve Dduvall: Looks good to me, approved jenkins-bot: Verified diff --git a/puppet/modules/mediawiki/manifests/multiwiki.pp b/puppet/modules/mediawiki/manifests/multiwiki.pp index cbb76f4..73fe929 100644 --- a/puppet/modules/mediawiki/manifests/multiwiki.pp +++ b/puppet/modules/mediawiki/manifests/multiwiki.pp @@ -248,6 +248,22 @@ content => template('mediawiki/multiwiki/foreachwiki.erb'), } +file { '/usr/local/bin/foreachwikiwithextension': +ensure => present, +owner => 'root', +group => 'root', +mode=> '0755', +content => template('mediawiki/multiwiki/foreachwikiwithextension.erb'), +} + +file { '/usr/local/bin/wikihasextension': +ensure => present, +owner => 'root', +group => 'root', +mode=> '0755', +content => template('mediawiki/multiwiki/wikihasextension.erb'), +} + file { '/usr/local/bin/sql': ensure => link, target => '/usr/bin/mysql', diff --git a/puppet/modules/mediawiki/templates/extension.php.erb b/puppet/modules/mediawiki/templates/extension.php.erb index e648e74..bd5a956 100644 --- a/puppet/modules/mediawiki/templates/extension.php.erb +++ b/puppet/modules/mediawiki/templates/extension.php.erb @@ -13,3 +13,6 @@ include_once "$IP/extensions/<%= @ext_name %>/<%= @ext_entrypoint %>"; } + // Keep track of what extensions are loaded to make `wikihasextension` work + // Why in the hell doesn't MediaWiki already do this for us? + $wmvActiveExtensions[] = '<%= @ext_name %>'; diff --git a/puppet/modules/mediawiki/templates/multiwiki/CommonSettings.php.erb b/puppet/modules/mediawiki/templates/multiwiki/CommonSettings.php.erb index d7c518f..e310212 100644 --- a/puppet/modules/mediawiki/templates/multiwiki/CommonSettings.php.erb +++ b/puppet/modules/mediawiki/templates/multiwiki/CommonSettings.php.erb @@ -60,6 +60,13 @@ $wgServer = preg_replace( '#^[^\/]+#', '', WebRequest::detectServer() ); } +/** + * @var array $wmvActiveExtensions List of extensions enabled for the wiki + * Populated by settings.d files generated by ::mediawiki::extension and + * used to power the `wikihasextension` script. + */ +$wmvActiveExtensions = array(); + foreach( array_merge( // Settings from default wiki diff --git