[MediaWiki-commits] [Gerrit] Add COPYING file - change (mediawiki...luasandbox)
jenkins-bot has submitted this change and it was merged. Change subject: Add COPYING file .. Add COPYING file Based on the license in debian/copyright. Bug: T57898 Change-Id: I9d82bc2ac2395fc667f59806db16f6804ef6679a --- A COPYING 1 file changed, 21 insertions(+), 0 deletions(-) Approvals: MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/COPYING b/COPYING new file mode 100644 index 000..fe9bd71 --- /dev/null +++ b/COPYING @@ -0,0 +1,21 @@ +(C) 2011-2014 Tim Starling +(C) 2011-2014 Wikimedia Foundation + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- To view, visit https://gerrit.wikimedia.org/r/295018 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9d82bc2ac2395fc667f59806db16f6804ef6679a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/php/luasandbox Gerrit-Branch: master Gerrit-Owner: LegoktmGerrit-Reviewer: Anomie Gerrit-Reviewer: Jackmcbarn Gerrit-Reviewer: MaxSem Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Prevent setting link text to empty string. - change (mediawiki...SemanticTitle)
Cicalese has submitted this change and it was merged. Change subject: Prevent setting link text to empty string. .. Prevent setting link text to empty string. Change-Id: Ie79c9e9045b8c0082e9c90d95a999ced05cd42a9 --- M SemanticTitle.class.php M SemanticTitle.php 2 files changed, 5 insertions(+), 2 deletions(-) Approvals: Cicalese: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/SemanticTitle.class.php b/SemanticTitle.class.php index cd47e6f..311faf2 100644 --- a/SemanticTitle.class.php +++ b/SemanticTitle.class.php @@ -316,7 +316,10 @@ if ( $result->numRows() > 0 ) { $row = $result->fetchRow(); - $displayTitle = $row['pp_value']; + $dt = trim( str_replace( '', '', strip_tags( $row['pp_value'] ) ) ); + if ( $dt !== '' ) { + $displayTitle = $row['pp_value']; + } return true; } diff --git a/SemanticTitle.php b/SemanticTitle.php index a579e70..fffce72 100644 --- a/SemanticTitle.php +++ b/SemanticTitle.php @@ -29,7 +29,7 @@ $GLOBALS['wgExtensionCredits']['semantic'][] = array( 'path' => __FILE__, 'name' => 'Semantic Title', - 'version' => '3.1', + 'version' => '3.2', 'author' => array( '[https://www.mediawiki.org/wiki/User:Cindy.cicalese Cindy Cicalese]', '[https://www.mediawiki.org/wiki/User:Van_de_Bugger Van de Bugger]' -- To view, visit https://gerrit.wikimedia.org/r/295030 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie79c9e9045b8c0082e9c90d95a999ced05cd42a9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SemanticTitle Gerrit-Branch: master Gerrit-Owner: CicaleseGerrit-Reviewer: Cicalese Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Prevent setting link text to empty string. - change (mediawiki...SemanticTitle)
Cicalese has uploaded a new change for review. https://gerrit.wikimedia.org/r/295030 Change subject: Prevent setting link text to empty string. .. Prevent setting link text to empty string. Change-Id: Ie79c9e9045b8c0082e9c90d95a999ced05cd42a9 --- M SemanticTitle.class.php M SemanticTitle.php 2 files changed, 5 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticTitle refs/changes/30/295030/1 diff --git a/SemanticTitle.class.php b/SemanticTitle.class.php index cd47e6f..311faf2 100644 --- a/SemanticTitle.class.php +++ b/SemanticTitle.class.php @@ -316,7 +316,10 @@ if ( $result->numRows() > 0 ) { $row = $result->fetchRow(); - $displayTitle = $row['pp_value']; + $dt = trim( str_replace( '', '', strip_tags( $row['pp_value'] ) ) ); + if ( $dt !== '' ) { + $displayTitle = $row['pp_value']; + } return true; } diff --git a/SemanticTitle.php b/SemanticTitle.php index a579e70..fffce72 100644 --- a/SemanticTitle.php +++ b/SemanticTitle.php @@ -29,7 +29,7 @@ $GLOBALS['wgExtensionCredits']['semantic'][] = array( 'path' => __FILE__, 'name' => 'Semantic Title', - 'version' => '3.1', + 'version' => '3.2', 'author' => array( '[https://www.mediawiki.org/wiki/User:Cindy.cicalese Cindy Cicalese]', '[https://www.mediawiki.org/wiki/User:Van_de_Bugger Van de Bugger]' -- To view, visit https://gerrit.wikimedia.org/r/295030 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie79c9e9045b8c0082e9c90d95a999ced05cd42a9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SemanticTitle Gerrit-Branch: master Gerrit-Owner: Cicalese___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] labstore: Fix home directory calculation for user accounts - change (operations/puppet)
Yuvipanda has submitted this change and it was merged. Change subject: labstore: Fix home directory calculation for user accounts .. labstore: Fix home directory calculation for user accounts Currently, for user accounts, create-dbusers calculates the home directory with the wiki user name instead of the shell user name, i. e. for the user account "scfc", it tries to create a file at "/srv/project/tools/home/Tim Landscheidt/replica.my.cnf" which will fail for all user accounts where wiki and shell user name differ. This change instead uses the shell user name. Bug: T138103 Change-Id: I061ee880c050c4cbf3913120edbeaa9ed73dd801 --- M modules/labstore/files/create-dbusers 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Yuvipanda: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/labstore/files/create-dbusers b/modules/labstore/files/create-dbusers index a867580..3469e64 100755 --- a/modules/labstore/files/create-dbusers +++ b/modules/labstore/files/create-dbusers @@ -91,7 +91,7 @@ 'ou=people,dc=wikimedia,dc=org', '(%s)' % search_string, ldap3.SEARCH_SCOPE_WHOLE_SUBTREE, -attributes=['uidNumber', 'cn'] +attributes=['uid', 'uidNumber'] ) if len(conn.response) == 0: logging.error( @@ -104,7 +104,7 @@ attrs = conn.response[0]['attributes'] users.append(cls( projectname, -attrs['cn'][0], +attrs['uid'][0], attrs['uidNumber'][0], 'user' )) -- To view, visit https://gerrit.wikimedia.org/r/295029 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I061ee880c050c4cbf3913120edbeaa9ed73dd801 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Tim LandscheidtGerrit-Reviewer: Tim Landscheidt 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] Make sure PageAssessments extension is automatically branched - change (mediawiki...release)
jenkins-bot has submitted this change and it was merged. Change subject: Make sure PageAssessments extension is automatically branched .. Make sure PageAssessments extension is automatically branched Bug: T120219 Change-Id: Ie303c7ad49b97235407ac0a7b76286a5027fd618 --- M make-wmf-branch/config.json 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: 20after4: Looks good to me, approved jenkins-bot: Verified diff --git a/make-wmf-branch/config.json b/make-wmf-branch/config.json index 64147fe..5aeb9db 100644 --- a/make-wmf-branch/config.json +++ b/make-wmf-branch/config.json @@ -92,6 +92,7 @@ "ORES", "OpenStackManager", "PagedTiffHandler", + "PageAssessments", "PageImages", "PageTriage", "ParserFunctions", -- To view, visit https://gerrit.wikimedia.org/r/294656 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie303c7ad49b97235407ac0a7b76286a5027fd618 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/tools/release Gerrit-Branch: master Gerrit-Owner: KaldariGerrit-Reviewer: 20after4 Gerrit-Reviewer: Aaron Schulz Gerrit-Reviewer: Greg Grossmeier Gerrit-Reviewer: Legoktm Gerrit-Reviewer: Reedy Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] labstore: Fix home directory calculation for user accounts - change (operations/puppet)
Tim Landscheidt has uploaded a new change for review. https://gerrit.wikimedia.org/r/295029 Change subject: labstore: Fix home directory calculation for user accounts .. labstore: Fix home directory calculation for user accounts Currently, for user accounts, create-dbusers calculates the home directory with the wiki user name instead of the shell user name, i. e. for the user account "scfc", it tries to create a file at "/srv/project/tools/home/Tim Landscheidt/replica.my.cnf" which will fail for all user accounts where wiki and shell user name differ. This change instead uses the shell user name. Bug: T138103 Change-Id: I061ee880c050c4cbf3913120edbeaa9ed73dd801 --- M modules/labstore/files/create-dbusers 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/29/295029/1 diff --git a/modules/labstore/files/create-dbusers b/modules/labstore/files/create-dbusers index a867580..3469e64 100755 --- a/modules/labstore/files/create-dbusers +++ b/modules/labstore/files/create-dbusers @@ -91,7 +91,7 @@ 'ou=people,dc=wikimedia,dc=org', '(%s)' % search_string, ldap3.SEARCH_SCOPE_WHOLE_SUBTREE, -attributes=['uidNumber', 'cn'] +attributes=['uid', 'uidNumber'] ) if len(conn.response) == 0: logging.error( @@ -104,7 +104,7 @@ attrs = conn.response[0]['attributes'] users.append(cls( projectname, -attrs['cn'][0], +attrs['uid'][0], attrs['uidNumber'][0], 'user' )) -- To view, visit https://gerrit.wikimedia.org/r/295029 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I061ee880c050c4cbf3913120edbeaa9ed73dd801 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Tim Landscheidt___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make BoardMover transactions start implicitly, then commit i... - change (mediawiki...Flow)
Mattflaschen has uploaded a new change for review. https://gerrit.wikimedia.org/r/295028 Change subject: Make BoardMover transactions start implicitly, then commit if needed .. Make BoardMover transactions start implicitly, then commit if needed While working on T135852, I found another issue with BoardMover. For undeletion, I was starting the transaction in UndeleteForm::undelete, then commiting in ArticleUndelete. However, if no revisions were restored, which happens in edge cases, it will never commit, triggering an exception: "Got COMMIT while atomic sections Flow\BoardMover are still open" from the preOutputCommit in core. It now starts a transaction automatically when you make the first move call. You still need to call commit from a hook (to keep all moves in a single transaction). However, since you don't know if any Flow workflows were moved (and thus if the transaction started), if will only commit if BoardMover knows a transaction is open. Change-Id: I3013b065dbb7e015ced8ff0e41774f2b1de3685b --- M Flow.php M Hooks.php M includes/BoardMover.php 3 files changed, 3 insertions(+), 20 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/28/295028/1 diff --git a/Flow.php b/Flow.php index 0daf09f..8d85c12 100644 --- a/Flow.php +++ b/Flow.php @@ -154,7 +154,6 @@ $wgHooks['ArticleConfirmDelete'][] = 'FlowHooks::onArticleConfirmDelete'; $wgHooks['ArticleDelete'][] = 'FlowHooks::onArticleDelete'; $wgHooks['ArticleDeleteComplete'][] = 'FlowHooks::onArticleDeleteComplete'; -$wgHooks['UndeleteForm::undelete'][] = 'FlowHooks::onUndeleteFormUndelete'; $wgHooks['ArticleRevisionUndeleted'][] = 'FlowHooks::onArticleRevisionUndeleted'; $wgHooks['ArticleUndelete'][] = 'FlowHooks::onArticleUndelete'; $wgHooks['SearchableNamespaces'][] = 'FlowHooks::onSearchableNamespaces'; diff --git a/Hooks.php b/Hooks.php index 24cf97a..75107a2 100644 --- a/Hooks.php +++ b/Hooks.php @@ -1590,17 +1590,6 @@ } /** -* Starts the transaction for the undelete operation -* -* @param PageArchive $archive Undeletion helper class -* @param Title $title Title of page about to be (partially) undeleted -*/ - public static function onUndeleteFormUndelete( $archive, $title ) { - $boardMover = Container::get( 'board_mover' ); - $boardMover->begin(); - } - - /** * @param Title $title Title corresponding to the article restored * @param Revision $revision Revision just undeleted * @param string $oldPageId Old page ID stored with that revision when it was in the archive table @@ -1657,7 +1646,6 @@ // open a database transaction and prepare everything for the move, but // don't commit yet. That is done below in self::onTitleMoveCompleting $boardMover =Container::get( 'board_mover' ); - $boardMover->begin(); $boardMover->move( $oldTitle->getArticleID(), $bogusTitle ); } diff --git a/includes/BoardMover.php b/includes/BoardMover.php index 4b2d591..0c7bbf2 100644 --- a/includes/BoardMover.php +++ b/includes/BoardMover.php @@ -42,11 +42,7 @@ /** * Starts a transaction on the Flow database. */ - public function begin() { - if ( $this->dbw !== null ) { - throw new FlowException( "Already started transaction" ); - } - + protected function begin() { // All reads must go through master to help ensure consistency $this->dbFactory->forceMaster(); @@ -69,7 +65,7 @@ */ public function move( $oldPageId, Title $newPage ) { if ( $this->dbw === null ) { - throw new FlowException( "You must call BoardMover->begin() before calling BoardMover->move()" ); + $this->begin(); } // @todo this loads every topic workflow this board has ever seen, @@ -124,7 +120,7 @@ */ public function commit() { if ( $this->dbw === null ) { - throw new FlowException( 'Board move not prepared.'); + return; } try { -- To view, visit https://gerrit.wikimedia.org/r/295028 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3013b065dbb7e015ced8ff0e41774f2b1de3685b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow 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] Improve edit stashing when vary-revision is used - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Improve edit stashing when vary-revision is used .. Improve edit stashing when vary-revision is used At least avoid the first parse in doEditContent()/filters which never has the revision set either. The second parse cannot be avoided in doEditUpdates() however. Bug: T136678 Change-Id: I12d2c3bbe1b21ad2ed9a484745d976ad62475e0d --- M includes/api/ApiStashEdit.php 1 file changed, 13 insertions(+), 8 deletions(-) Approvals: Ori.livneh: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/api/ApiStashEdit.php b/includes/api/ApiStashEdit.php index 67939a0..c8a330a 100644 --- a/includes/api/ApiStashEdit.php +++ b/includes/api/ApiStashEdit.php @@ -234,27 +234,34 @@ $age = time() - wfTimestamp( TS_UNIX, $editInfo->output->getCacheTime() ); if ( $age <= self::PRESUME_FRESH_TTL_SEC ) { + // Assume nothing changed in this time $stats->increment( 'editstash.cache_hits.presumed_fresh' ); $logger->debug( "Timestamp-based cache hit for key '$key' (age: $age sec)." ); - return $editInfo; // assume nothing changed } elseif ( isset( $editInfo->edits ) && $editInfo->edits === $user->getEditCount() ) { // Logged-in user made no local upload/template edits in the meantime $stats->increment( 'editstash.cache_hits.presumed_fresh' ); $logger->debug( "Edit count based cache hit for key '$key' (age: $age sec)." ); - return $editInfo; } elseif ( $user->isAnon() && self::lastEditTime( $user ) < $editInfo->output->getCacheTime() ) { // Logged-out user made no local upload/template edits in the meantime $stats->increment( 'editstash.cache_hits.presumed_fresh' ); $logger->debug( "Edit check based cache hit for key '$key' (age: $age sec)." ); - return $editInfo; + } else { + // User may have changed included content + $editInfo = false; } - $stats->increment( 'editstash.cache_misses.proven_stale' ); - $logger->info( "Stale cache for key '$key'; old key with outside edits. (age: $age sec)" ); + if ( !$editInfo ) { + $stats->increment( 'editstash.cache_misses.proven_stale' ); + $logger->info( "Stale cache for key '$key'; old key with outside edits. (age: $age sec)" ); + } elseif ( $editInfo->output->getFlag( 'vary-revision' ) ) { + // This can be used for the initial parse, e.g. for filters or doEditContent(), + // but a second parse will be triggered in doEditUpdates(). This is not optimal. + $logger->info( "Partially usable cache for key '$key' ('$title') [vary_revision]." ); + } - return false; + return $editInfo; } /** @@ -318,8 +325,6 @@ $ttl = min( $parserOutput->getCacheExpiry() - $since, self::MAX_CACHE_TTL ); if ( $ttl <= 0 ) { return [ null, 0, 'no_ttl' ]; - } elseif ( $parserOutput->getFlag( 'vary-revision' ) ) { - return [ null, 0, 'vary_revision' ]; } // Only store what is actually needed -- To view, visit https://gerrit.wikimedia.org/r/295024 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I12d2c3bbe1b21ad2ed9a484745d976ad62475e0d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.28.0-wmf.6 Gerrit-Owner: Aaron SchulzGerrit-Reviewer: Anomie Gerrit-Reviewer: Ori.livneh Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] For discussion: Reduce purge volume by moving dependent purg... - change (mediawiki/core)
GWicke has uploaded a new change for review. https://gerrit.wikimedia.org/r/295027 Change subject: For discussion: Reduce purge volume by moving dependent purges to RefreshLinksJob .. For discussion: Reduce purge volume by moving dependent purges to RefreshLinksJob On edit, we currently create a) a HTMLCacheUpdateJob, which - updates page_touched for all pages transcluded by a page, and - performs a CDN purge of all those pages. b) a RefreshLinksJob, which will re-render the same set of pages, but won't purge them. RefreshLinksJob is significantly more expensive than HTMLCacheUpdateJob, and takes a while when a template used in millions of pages was edited. HTMLCacheUpdateJob on the other hand only performs relatively cheap database queries, and quickly sends out a lot of CDN purges. The chief advantage of this scheme is timely CDN purges, which ensures that anonymous users quickly pick up template edits across the site. Disadvantages are: - The quick processing of CDN purges can result in bursts of very high purge rates, and minimizes the chances of coalescing purges from several quick edits into a single CDN purge. - High-volume anonymous traffic will trigger parser cache misses after the HTMLCacheUpdateJob has executed. This leads to higher latency for users, and can create spikes in the load of app servers, databases, memcached etc. This patch addresses these issues by moving CDN purges from HTMLCacheUpdateJob to RefreshLinksJob. As a consequence, the following changes are expected: - CDN purges should be less bursty, as RefreshLinksJob processing rates are more limited. - Multiple edits to the same popular template should result in only a single CDN purge for the vast majority of pages using the template, as subsequent page_touched increments will abort earlier refreshlinks jobs & purges. It is expected that this should reduce the overall rate of CDN purges signficantly. - By purging the CDN only after the page cache has been updated, anonymous traffic is no longer going to hit parser cache misses with the associated latency increase, and won't cause a spike in load on the infrastructure from a high rate of re-renders. However, the downside is clearly that the purging of dependent pages is going to be delayed, in line with the pace of RefreshLinksJob processing. This will only affect anonymous users, as authenticated users will still trigger immediate re-renders based on page_touched. It will also not affect the edited pages themselves, as those are still purged immediately. I believe that considering the performance and stability benefits of this change, this is a reasonable trade-off to make. However, this is a judgment call, which is why I am posting this patch for discussion. Change-Id: Idb2867e2d90b11aa1bf2f249058b24c0c0a92036 --- M includes/jobqueue/jobs/HTMLCacheUpdateJob.php M includes/jobqueue/jobs/RefreshLinksJob.php 2 files changed, 9 insertions(+), 18 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/27/295027/1 diff --git a/includes/jobqueue/jobs/HTMLCacheUpdateJob.php b/includes/jobqueue/jobs/HTMLCacheUpdateJob.php index 7acbdf2..14cd38b 100644 --- a/includes/jobqueue/jobs/HTMLCacheUpdateJob.php +++ b/includes/jobqueue/jobs/HTMLCacheUpdateJob.php @@ -131,24 +131,6 @@ __METHOD__ ); } - // Get the list of affected pages (races only mean something else did the purge) - $titleArray = TitleArray::newFromResult( $dbw->select( - 'page', - [ 'page_namespace', 'page_title' ], - [ 'page_id' => $pageIds, 'page_touched' => $dbw->timestamp( $touchTimestamp ) ], - __METHOD__ - ) ); - - // Update CDN - $u = CdnCacheUpdate::newFromTitles( $titleArray ); - $u->doUpdate(); - - // Update file cache - if ( $wgUseFileCache ) { - foreach ( $titleArray as $title ) { - HTMLFileCache::clearFileCache( $title ); - } - } } public function workItemCount() { diff --git a/includes/jobqueue/jobs/RefreshLinksJob.php b/includes/jobqueue/jobs/RefreshLinksJob.php index 8870569..495d648 100644 --- a/includes/jobqueue/jobs/RefreshLinksJob.php +++ b/includes/jobqueue/jobs/RefreshLinksJob.php @@ -264,6 +264,15 @@ InfoAction::invalidateCache( $title ); + // Update CDN + $u = CdnCacheUpdate::newSimplePurge( $title ); + $u->doUpdate(); + + // Update file cache + if ( $wgUseFileCache ) { + HTMLFileCache::clearFileCache( $title ); + } + return true; } --
[MediaWiki-commits] [Gerrit] T96195: Deprecate node 0.8 support - change (mediawiki...parsoid)
Arlolra has uploaded a new change for review. https://gerrit.wikimedia.org/r/295026 Change subject: T96195: Deprecate node 0.8 support .. T96195: Deprecate node 0.8 support Change-Id: I8a2282df96ec06fc3e4d706d731a63d7d6dbf365 --- M .travis.yml M HISTORY.md M bin/server.js M lib/api/apiUtils.js M package.json 5 files changed, 4 insertions(+), 15 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid refs/changes/26/295026/1 diff --git a/.travis.yml b/.travis.yml index 75e4993..f4e00f1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,18 +1,12 @@ language: node_js node_js: -# Your days are numbered. -- "0.8" # Current production value. - "0.10.25" # Aspiring contender. See T119228. - "4.3.0" # From the nvm docs, "this installs the latest version of node". - "node" - -before_install: -- NODE_VERSION=$(node -e 'console.log(process.version.replace(/[.][0-9]+$/, ""))') -- if [ "v0.8" = "$NODE_VERSION" ]; then npm install -g npm@2.7.3 ; fi script: travis_wait npm run-script coverage && (npm run-script coveralls || exit 0) diff --git a/HISTORY.md b/HISTORY.md index 76bd87c..83f0787 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -9,6 +9,7 @@ * T125419: Fix selser issues serializing first table row * T114413: Provide HTML2HTML endpoint in Parsoid * T137406: Emit |- between thead/tbody/tfoot + * T96195: Deprecate node 0.8 support 0.5.1 / 2015-05-02 == diff --git a/bin/server.js b/bin/server.js index 2a38f83..eae5e22 100755 --- a/bin/server.js +++ b/bin/server.js @@ -228,8 +228,7 @@ // Enable heap dumps in /tmp on kill -USR2. // See https://github.com/bnoordhuis/node-heapdump/ - // For node 0.6/0.8: npm install heapdump@0.1.0 - // For 0.10: npm install heapdump + // npm install heapdump process.on('SIGUSR2', function() { var heapdump = require('heapdump'); processLogger.log("warning", "SIGUSR2 received! Writing snapshot."); diff --git a/lib/api/apiUtils.js b/lib/api/apiUtils.js index d64b383..57f8454 100644 --- a/lib/api/apiUtils.js +++ b/lib/api/apiUtils.js @@ -4,7 +4,6 @@ var cluster = require('cluster'); var domino = require('domino'); var util = require('util'); -var semver = require('semver'); var qs = require('querystring'); var Diff = require('../utils/Diff.js').Diff; @@ -154,9 +153,6 @@ }; }; -// Cluster support was very experimental and missing methods in v0.8.x -var sufficientNodeVersion = semver.gte(process.version, '0.10.0'); - /** * @method * @param {Promise} p @@ -170,7 +166,7 @@ (res.locals.oldid ? '?oldid=' + res.locals.oldid : '') ); return new Promise(function(resolve, reject) { - if (cluster.isMaster || !sufficientNodeVersion) { + if (cluster.isMaster) { return p.then(resolve, reject); } // Notify the cluster master that a request has started diff --git a/package.json b/package.json index 1aea493..6152301 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,6 @@ }, "scripts": { "lint": "npm run dump-tokenizer && npm run jscs && npm run jshint", -"no-0.8": "node -e 'process.exit(/v0[.][0-8][.]/.test(process.version) ? 0 : 1)' || (npm run nsp && npm run lint)", "start": "node bin/server.js", "jshint": "jshint bin lib tests tools core-upgrade.js", "jscs": "jscs bin lib tests tools core-upgrade.js", @@ -58,7 +57,7 @@ "mocha": "mocha --opts tests/mocha/mocha.opts tests/mocha", "parserTests": "node bin/parserTests.js --wt2html --wt2wt --html2wt --html2html --selser --no-color --quiet --blacklist", "roundtrip": "node bin/roundtrip-test.js 'Barack Obama' && node bin/roundtrip-test.js 'Parkour'", -"test": "npm run no-0.8 && npm run parserTests && npm run mocha", +"test": "npm run nsp && npm run lint && npm run parserTests && npm run mocha", "cover-mocha": "istanbul cover _mocha --dir ./coverage/mocha -- --opts tests/mocha/mocha.opts tests/mocha", "cover-parserTests": "istanbul cover bin/parserTests.js --dir ./coverage/parserTests -- --wt2html --wt2wt --html2wt --html2html --selser --no-color --quiet --blacklist", "coverage": "npm run cover-mocha && npm run cover-parserTests && istanbul report", -- To view, visit https://gerrit.wikimedia.org/r/295026 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8a2282df96ec06fc3e4d706d731a63d7d6dbf365 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] Remember textual representation visibility state with cookie - change (wikidata...gui)
jenkins-bot has submitted this change and it was merged. Change subject: Remember textual representation visibility state with cookie .. Remember textual representation visibility state with cookie Change-Id: Ic99e0c6d662bc97c873d1027a977b1357ca33921 --- M style.css M wikibase/queryService/ui/App.js 2 files changed, 18 insertions(+), 6 deletions(-) Approvals: Smalyshev: Looks good to me, approved jenkins-bot: Verified diff --git a/style.css b/style.css index c153be1..800e199 100644 --- a/style.css +++ b/style.css @@ -131,8 +131,6 @@ margin-right: 0; } - - .label { font-size: 100%; } @@ -378,6 +376,11 @@ background: rgba(255,255,255,0.9); } +.visual-editor .panel-heading { + background: rgba(255, 255, 255, 0.9); + padding: 8px 10px; +} + .visual-editor .panel-body { font-size: 120%; } diff --git a/wikibase/queryService/ui/App.js b/wikibase/queryService/ui/App.js index 76ea4be..24e78d3 100644 --- a/wikibase/queryService/ui/App.js +++ b/wikibase/queryService/ui/App.js @@ -3,7 +3,7 @@ wikibase.queryService.ui = wikibase.queryService.ui || {}; window.mediaWiki = window.mediaWiki || {}; -wikibase.queryService.ui.App = ( function( $, mw, download, EXPLORER, window, _ ) { +wikibase.queryService.ui.App = ( function( $, mw, download, EXPLORER, window, _, Cookies ) { 'use strict'; var SHORTURL_API = '//tinyurl.com/api-create.php?url='; @@ -195,7 +195,9 @@ * @private */ SELF.prototype._initVisualEditor = function() { - var self = this; + var self = this, + cookieHide = 'visual-editor-hide'; + if ( !this._visualEditor ) { this._visualEditor = new wikibase.queryService.ui.visualEditor.VisualEditor(); } @@ -203,18 +205,24 @@ self._editor.setValue( ve.getQuery() ); } ); + if ( Cookies.get( cookieHide ) === 'true' ) { + $( '.visual-editor-trigger' ).show(); + } + if ( this._editor ) { this._editor.registerCallback( 'change', _.debounce( function() { if ( $( '.visual-editor-trigger' ).is( ':visible' ) || self._editor.getValue() === self._visualEditor.getQuery() ) { return; } + $( '.visual-editor' ).hide(); self._drawVisualEditor(); - }, 500 ) ); + }, 1500 ) ); } $( '.visual-editor .panel-heading .close' ).click( function() { + Cookies.set( cookieHide, true ); $( '.visual-editor' ).hide(); $( '.visual-editor-trigger' ).show(); return false; @@ -222,6 +230,7 @@ $( '.visual-editor-trigger' ).click( function() { $( '.visual-editor-trigger' ).hide(); + Cookies.set( cookieHide, false ); self._drawVisualEditor(); return false; } ); @@ -690,4 +699,4 @@ }; return SELF; -}( jQuery, mediaWiki, download, EXPLORER, window, _ ) ); +}( jQuery, mediaWiki, download, EXPLORER, window, _, Cookies ) ); -- To view, visit https://gerrit.wikimedia.org/r/294903 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic99e0c6d662bc97c873d1027a977b1357ca33921 Gerrit-PatchSet: 1 Gerrit-Project: wikidata/query/gui Gerrit-Branch: master Gerrit-Owner: Jonas Kress (WMDE)Gerrit-Reviewer: Smalyshev Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Improve edit stashing when vary-revision is used - change (mediawiki/core)
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/295023 Change subject: Improve edit stashing when vary-revision is used .. Improve edit stashing when vary-revision is used At least avoid the first parse in doEditContent()/filters which never has the revision set either. The second parse cannot be avoided in doEditUpdates() however. Bug: T136678 Change-Id: I12d2c3bbe1b21ad2ed9a484745d976ad62475e0d --- M includes/api/ApiStashEdit.php 1 file changed, 13 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/23/295023/1 diff --git a/includes/api/ApiStashEdit.php b/includes/api/ApiStashEdit.php index 67939a0..c8a330a 100644 --- a/includes/api/ApiStashEdit.php +++ b/includes/api/ApiStashEdit.php @@ -234,27 +234,34 @@ $age = time() - wfTimestamp( TS_UNIX, $editInfo->output->getCacheTime() ); if ( $age <= self::PRESUME_FRESH_TTL_SEC ) { + // Assume nothing changed in this time $stats->increment( 'editstash.cache_hits.presumed_fresh' ); $logger->debug( "Timestamp-based cache hit for key '$key' (age: $age sec)." ); - return $editInfo; // assume nothing changed } elseif ( isset( $editInfo->edits ) && $editInfo->edits === $user->getEditCount() ) { // Logged-in user made no local upload/template edits in the meantime $stats->increment( 'editstash.cache_hits.presumed_fresh' ); $logger->debug( "Edit count based cache hit for key '$key' (age: $age sec)." ); - return $editInfo; } elseif ( $user->isAnon() && self::lastEditTime( $user ) < $editInfo->output->getCacheTime() ) { // Logged-out user made no local upload/template edits in the meantime $stats->increment( 'editstash.cache_hits.presumed_fresh' ); $logger->debug( "Edit check based cache hit for key '$key' (age: $age sec)." ); - return $editInfo; + } else { + // User may have changed included content + $editInfo = false; } - $stats->increment( 'editstash.cache_misses.proven_stale' ); - $logger->info( "Stale cache for key '$key'; old key with outside edits. (age: $age sec)" ); + if ( !$editInfo ) { + $stats->increment( 'editstash.cache_misses.proven_stale' ); + $logger->info( "Stale cache for key '$key'; old key with outside edits. (age: $age sec)" ); + } elseif ( $editInfo->output->getFlag( 'vary-revision' ) ) { + // This can be used for the initial parse, e.g. for filters or doEditContent(), + // but a second parse will be triggered in doEditUpdates(). This is not optimal. + $logger->info( "Partially usable cache for key '$key' ('$title') [vary_revision]." ); + } - return false; + return $editInfo; } /** @@ -318,8 +325,6 @@ $ttl = min( $parserOutput->getCacheExpiry() - $since, self::MAX_CACHE_TTL ); if ( $ttl <= 0 ) { return [ null, 0, 'no_ttl' ]; - } elseif ( $parserOutput->getFlag( 'vary-revision' ) ) { - return [ null, 0, 'vary_revision' ]; } // Only store what is actually needed -- To view, visit https://gerrit.wikimedia.org/r/295023 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I12d2c3bbe1b21ad2ed9a484745d976ad62475e0d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Improve edit stashing when vary-revision is used - change (mediawiki/core)
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/295024 Change subject: Improve edit stashing when vary-revision is used .. Improve edit stashing when vary-revision is used At least avoid the first parse in doEditContent()/filters which never has the revision set either. The second parse cannot be avoided in doEditUpdates() however. Bug: T136678 Change-Id: I12d2c3bbe1b21ad2ed9a484745d976ad62475e0d --- M includes/api/ApiStashEdit.php 1 file changed, 13 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/24/295024/1 diff --git a/includes/api/ApiStashEdit.php b/includes/api/ApiStashEdit.php index 67939a0..c8a330a 100644 --- a/includes/api/ApiStashEdit.php +++ b/includes/api/ApiStashEdit.php @@ -234,27 +234,34 @@ $age = time() - wfTimestamp( TS_UNIX, $editInfo->output->getCacheTime() ); if ( $age <= self::PRESUME_FRESH_TTL_SEC ) { + // Assume nothing changed in this time $stats->increment( 'editstash.cache_hits.presumed_fresh' ); $logger->debug( "Timestamp-based cache hit for key '$key' (age: $age sec)." ); - return $editInfo; // assume nothing changed } elseif ( isset( $editInfo->edits ) && $editInfo->edits === $user->getEditCount() ) { // Logged-in user made no local upload/template edits in the meantime $stats->increment( 'editstash.cache_hits.presumed_fresh' ); $logger->debug( "Edit count based cache hit for key '$key' (age: $age sec)." ); - return $editInfo; } elseif ( $user->isAnon() && self::lastEditTime( $user ) < $editInfo->output->getCacheTime() ) { // Logged-out user made no local upload/template edits in the meantime $stats->increment( 'editstash.cache_hits.presumed_fresh' ); $logger->debug( "Edit check based cache hit for key '$key' (age: $age sec)." ); - return $editInfo; + } else { + // User may have changed included content + $editInfo = false; } - $stats->increment( 'editstash.cache_misses.proven_stale' ); - $logger->info( "Stale cache for key '$key'; old key with outside edits. (age: $age sec)" ); + if ( !$editInfo ) { + $stats->increment( 'editstash.cache_misses.proven_stale' ); + $logger->info( "Stale cache for key '$key'; old key with outside edits. (age: $age sec)" ); + } elseif ( $editInfo->output->getFlag( 'vary-revision' ) ) { + // This can be used for the initial parse, e.g. for filters or doEditContent(), + // but a second parse will be triggered in doEditUpdates(). This is not optimal. + $logger->info( "Partially usable cache for key '$key' ('$title') [vary_revision]." ); + } - return false; + return $editInfo; } /** @@ -318,8 +325,6 @@ $ttl = min( $parserOutput->getCacheExpiry() - $since, self::MAX_CACHE_TTL ); if ( $ttl <= 0 ) { return [ null, 0, 'no_ttl' ]; - } elseif ( $parserOutput->getFlag( 'vary-revision' ) ) { - return [ null, 0, 'vary_revision' ]; } // Only store what is actually needed -- To view, visit https://gerrit.wikimedia.org/r/295024 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I12d2c3bbe1b21ad2ed9a484745d976ad62475e0d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.28.0-wmf.6 Gerrit-Owner: Aaron Schulz___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Unbreak travis-ci on 5.3.3. - change (at-ease)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/295022 Change subject: Unbreak travis-ci on 5.3.3. .. Unbreak travis-ci on 5.3.3. And shut up the xdebug warning while we're at it too. Change-Id: I03677e5c9c26cba075ed4f6e811aa0b01660c6bf --- M .travis.yml 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/at-ease refs/changes/22/295022/1 diff --git a/.travis.yml b/.travis.yml index 3d4019f..5b4fcc5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,11 @@ - "5.6" - "hhvm" sudo: false +env: + global: +- COMPOSER_DISABLE_XDEBUG_WARN=1 +before_install: + - if [ "$TRAVIS_PHP_VERSION" = "5.3.3" ]; then composer config disable-tls true; composer config secure-http false; fi install: - composer install script: -- To view, visit https://gerrit.wikimedia.org/r/295022 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I03677e5c9c26cba075ed4f6e811aa0b01660c6bf Gerrit-PatchSet: 1 Gerrit-Project: at-ease 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] Unassign items in the scoring queue that have been abandoned - change (wikimedia...discernatron)
EBernhardson has submitted this change and it was merged. Change subject: Unassign items in the scoring queue that have been abandoned .. Unassign items in the scoring queue that have been abandoned Adds a console command for triggering the unassign handling. This should be put into a cronjob or something to ensure it regularly happens. Change-Id: I3f7228bbd3aa08f54879bc6074752ea838b2026c --- A src/RelevanceScoring/Console/ScoringQueueUnassignOld.php M src/RelevanceScoring/Console/UpdateScoringQueue.php M src/RelevanceScoring/RelevanceScoringProvider.php 3 files changed, 55 insertions(+), 1 deletion(-) Approvals: EBernhardson: Verified; Looks good to me, approved diff --git a/src/RelevanceScoring/Console/ScoringQueueUnassignOld.php b/src/RelevanceScoring/Console/ScoringQueueUnassignOld.php new file mode 100644 index 000..e156456 --- /dev/null +++ b/src/RelevanceScoring/Console/ScoringQueueUnassignOld.php @@ -0,0 +1,47 @@ +scoringQueueRepo = $scoringQueueRepo; +} + +protected function configure() +{ +$this->setDescription('Unassign abandoned items in the scoring queue'); +$this->addOption( +'age', +null, +InputOption::VALUE_OPTIONAL, +'Age, in seconds, to consider a queue item old enough to unassign. Defaults to 900' +); +} + +protected function execute(InputInterface $input, OutputInterface $output) +{ +$age = $input->getOption('age') ?: 900; +if (!ctype_digit($age)) { +$output->writeln('age must be a positive integer'); + +return 1; +} + +$count = $this->scoringQueueRepo->unassignOld($age); +$output->writeln("Unassigned $count items."); + +return 0; +} +} diff --git a/src/RelevanceScoring/Console/UpdateScoringQueue.php b/src/RelevanceScoring/Console/UpdateScoringQueue.php index 87057f2..0baa170 100644 --- a/src/RelevanceScoring/Console/UpdateScoringQueue.php +++ b/src/RelevanceScoring/Console/UpdateScoringQueue.php @@ -25,7 +25,7 @@ ScoringQueueRepository $scoringQueueRepo, ScoresRepository $scoresRepo ) { -parent::__construct('update-scoring-queue'); +parent::__construct('scoring-queue:update'); $this->queriesRepo = $queriesRepo; $this->scoringQueueRepo = $scoringQueueRepo; $this->scoresRepo = $scoresRepo; diff --git a/src/RelevanceScoring/RelevanceScoringProvider.php b/src/RelevanceScoring/RelevanceScoringProvider.php index 06c36a9..139fa73 100644 --- a/src/RelevanceScoring/RelevanceScoringProvider.php +++ b/src/RelevanceScoring/RelevanceScoringProvider.php @@ -9,6 +9,7 @@ use WikiMedia\RelevanceScoring\Console\Import; use WikiMedia\RelevanceScoring\Console\ImportPending; use WikiMedia\RelevanceScoring\Console\PurgeQuery; +use WikiMedia\RelevanceScoring\Console\ScoringQueueUnassignOld; use WikiMedia\RelevanceScoring\Console\UpdateScoringQueue; use WikiMedia\RelevanceScoring\Controller\ImportController; use WikiMedia\RelevanceScoring\Controller\QueriesController; @@ -222,6 +223,11 @@ $app['search.repository.scores'] ); }; +$app['search.console.scoringQueueUnassignOld'] = function () use ($app) { +return new ScoringQueueUnassignOld( +$app['search.repository.scoring_queue'] +); +}; $app['search.console'] = [ 'search.console.cache-clear', @@ -229,6 +235,7 @@ 'search.console.importPending', 'search.console.purgeQuery', 'search.console.updateScoringQueue', +'search.console.scoringQueueUnassignOld', ]; } -- To view, visit https://gerrit.wikimedia.org/r/295020 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3f7228bbd3aa08f54879bc6074752ea838b2026c Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/discovery/discernatron Gerrit-Branch: master Gerrit-Owner: EBernhardsonGerrit-Reviewer: EBernhardson ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add phan and cleanup some found warnings - change (wikimedia...discernatron)
EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/295021 Change subject: Add phan and cleanup some found warnings .. Add phan and cleanup some found warnings This still ends up complaining a bunch about OAuthProvider and RelevanceScoringProvider. Unfortunately because of how the Pimple DI container works it's not really possible to fix these without throwing a bunch of supress annotations arround. Annoyingly there is also the problem that phan @suppress annotations only work on the closest function definition, which means each service would have to be marked with the annotations which is just too verbose. For the moment they are just throwing errors. Change-Id: Ic16905576311717ff957f5e3c62c02e240778304 --- A scripts/postprocess-phan.php A scripts/run-phan.sh M src/OAuth/MediaWiki.php M src/RelevanceScoring/Assert/MinimumSubmittedValidator.php M src/RelevanceScoring/Console/CacheClear.php M src/RelevanceScoring/Controller/QueriesController.php M src/RelevanceScoring/Import/Importer.php M src/RelevanceScoring/RelevanceScoringProvider.php M src/RelevanceScoring/Repository/QueriesRepository.php M src/RelevanceScoring/Repository/ResultsRepository.php M src/RelevanceScoring/Repository/ScoresRepository.php M src/RelevanceScoring/Repository/ScoringQueueRepository.php 12 files changed, 160 insertions(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/discernatron refs/changes/21/295021/1 diff --git a/scripts/postprocess-phan.php b/scripts/postprocess-phan.php new file mode 100644 index 000..e11cd25 --- /dev/null +++ b/scripts/postprocess-phan.php @@ -0,0 +1,29 @@ + $error, + // convert from 1 indexed to 0 indexed + 'lineno' => $lineno - 1, + 'type' => $type, + ); +} + +foreach ( $errors as $file => $errors ) { + $source = file( $file ); + foreach ( $errors as $error ) { + if ( $error['lineno'] === 0 || !preg_match( + "|/\* @suppress {$error["type"]} |", + $source[$error['lineno'] - 1] + ) ) { + echo $error['orig']; + } + } +} + diff --git a/scripts/run-phan.sh b/scripts/run-phan.sh new file mode 100755 index 000..9220b15 --- /dev/null +++ b/scripts/run-phan.sh @@ -0,0 +1,86 @@ +#!/bin/bash + +# Some systems, like mediawiki-vagrant, don't have realpath +if ! which realpath > /dev/null; then + realpath() { + php -r "echo realpath('$*');" + } +fi + +PROJECT_ROOT=$(realpath "${PROJECT_ROOT:-$(dirname "$0")/..}") +PROJECT="src/" # tests/ +DEPS="vendor/" + +set -e + +if [ ! -f "$PROJECT_ROOT/app.php" ]; then + echo "Could not find installation at $PROJECT_ROOT" + echo "Please specify with PROJECT_ROOT environment variable" + echo + exit 1 +fi + +if ! which docker > /dev/null; then + echo "Docker not installed. Press any key to install docker or Ctrl-C to quit" + read -n 1 + sudo apt-get -y install docker.io + if [ -d /vagrant ]; then + # May also be required elsewhere..but not comfortable just installing + # cgroup-lite to random peoples machines. + sudo apt-get -y install cgroup-lite + fi +fi + +if ! id -Gn | grep docker > /dev/null; then + sudo adduser $(id -un) docker + echo "User added to docker group. You need to log out and log back in to continue." + echo + exit 1 +fi + +if ! docker images | grep cloudflare/phan > /dev/null; then + git clone https://github.com/cloudflare/docker-phan.git /tmp/docker-phan.$$ + pushd /tmp/docker-phan.$$ + ./build + popd + # Once build we can safely remove this repo + rm -rf /tmp/docker-phan.$$ +fi + +for i in $PROJECT; do + ALL_DIRS="$ALL_DIRS $PROJECT_ROOT/$i" +done +for i in $DEPS; do + SKIP_ANALYSIS="$SKIP_ANALYSIS,/mnt/src/$i" + ALL_DIRS="$ALL_DIRS $PROJECT_ROOT/$i" +done +# Strip leading comma +SKIP_ANALYSIS="${SKIP_ANALYSIS:1}" + +PHAN_IN=$PROJECT_ROOT/phan.in.$$ +SED_PATTERN=$(echo $PROJECT_ROOT | sed 's/[\/&]/\\&/g') +find $ALL_DIRS -iname '*.php' | sed "s/${SED_PATTERN}/\/mnt\/src/" > $PHAN_IN + +docker run \ + --volume="$PROJECT_ROOT:/mnt/src" \ + --rm \ + --user "$(id -u):$(id -g)" \ + cloudflare/phan:latest \ + --file-list "/mnt/src/phan.in.$$" \ + --exclude-directory-list "$SKIP_ANALYSIS" \ + --output "php://stdout" \ + | sed "s/\/mnt\/src/$SED_PATTERN/" \ + | php $(dirname $0)/postprocess-phan.php \ + | sed "s/$SED_PATTERN//" \ + > /tmp/phan.out + + +RETVAL=0 +if [ "$(wc -l < /tmp/phan.out)" -ne 0 ]; then + RETVAL=1 +fi + +cat /tmp/phan.out +rm "$PHAN_IN" /tmp/phan.out +exit $RETVAL + diff --git a/src/OAuth/MediaWiki.php b/src/OAuth/MediaWiki.php index b916b26..6bc50fb 100644 ---
[MediaWiki-commits] [Gerrit] Unassign items in the scoring queue that have been abandoned - change (wikimedia...discernatron)
EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/295020 Change subject: Unassign items in the scoring queue that have been abandoned .. Unassign items in the scoring queue that have been abandoned Adds a console command for triggering the unassign handling. This should be put into a cronjob or something to ensure it regularly happens. Change-Id: I3f7228bbd3aa08f54879bc6074752ea838b2026c --- A src/RelevanceScoring/Console/ScoringQueueUnassignOld.php M src/RelevanceScoring/Console/UpdateScoringQueue.php M src/RelevanceScoring/RelevanceScoringProvider.php 3 files changed, 55 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/discernatron refs/changes/20/295020/1 diff --git a/src/RelevanceScoring/Console/ScoringQueueUnassignOld.php b/src/RelevanceScoring/Console/ScoringQueueUnassignOld.php new file mode 100644 index 000..e156456 --- /dev/null +++ b/src/RelevanceScoring/Console/ScoringQueueUnassignOld.php @@ -0,0 +1,47 @@ +scoringQueueRepo = $scoringQueueRepo; +} + +protected function configure() +{ +$this->setDescription('Unassign abandoned items in the scoring queue'); +$this->addOption( +'age', +null, +InputOption::VALUE_OPTIONAL, +'Age, in seconds, to consider a queue item old enough to unassign. Defaults to 900' +); +} + +protected function execute(InputInterface $input, OutputInterface $output) +{ +$age = $input->getOption('age') ?: 900; +if (!ctype_digit($age)) { +$output->writeln('age must be a positive integer'); + +return 1; +} + +$count = $this->scoringQueueRepo->unassignOld($age); +$output->writeln("Unassigned $count items."); + +return 0; +} +} diff --git a/src/RelevanceScoring/Console/UpdateScoringQueue.php b/src/RelevanceScoring/Console/UpdateScoringQueue.php index 87057f2..0baa170 100644 --- a/src/RelevanceScoring/Console/UpdateScoringQueue.php +++ b/src/RelevanceScoring/Console/UpdateScoringQueue.php @@ -25,7 +25,7 @@ ScoringQueueRepository $scoringQueueRepo, ScoresRepository $scoresRepo ) { -parent::__construct('update-scoring-queue'); +parent::__construct('scoring-queue:update'); $this->queriesRepo = $queriesRepo; $this->scoringQueueRepo = $scoringQueueRepo; $this->scoresRepo = $scoresRepo; diff --git a/src/RelevanceScoring/RelevanceScoringProvider.php b/src/RelevanceScoring/RelevanceScoringProvider.php index 06c36a9..139fa73 100644 --- a/src/RelevanceScoring/RelevanceScoringProvider.php +++ b/src/RelevanceScoring/RelevanceScoringProvider.php @@ -9,6 +9,7 @@ use WikiMedia\RelevanceScoring\Console\Import; use WikiMedia\RelevanceScoring\Console\ImportPending; use WikiMedia\RelevanceScoring\Console\PurgeQuery; +use WikiMedia\RelevanceScoring\Console\ScoringQueueUnassignOld; use WikiMedia\RelevanceScoring\Console\UpdateScoringQueue; use WikiMedia\RelevanceScoring\Controller\ImportController; use WikiMedia\RelevanceScoring\Controller\QueriesController; @@ -222,6 +223,11 @@ $app['search.repository.scores'] ); }; +$app['search.console.scoringQueueUnassignOld'] = function () use ($app) { +return new ScoringQueueUnassignOld( +$app['search.repository.scoring_queue'] +); +}; $app['search.console'] = [ 'search.console.cache-clear', @@ -229,6 +235,7 @@ 'search.console.importPending', 'search.console.purgeQuery', 'search.console.updateScoringQueue', +'search.console.scoringQueueUnassignOld', ]; } -- To view, visit https://gerrit.wikimedia.org/r/295020 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3f7228bbd3aa08f54879bc6074752ea838b2026c Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/discovery/discernatron Gerrit-Branch: master Gerrit-Owner: EBernhardson___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make the http connect timeout configurable - change (mediawiki...parsoid)
jenkins-bot has submitted this change and it was merged. Change subject: Make the http connect timeout configurable .. Make the http connect timeout configurable * No longer do we set the global httpAgents, but instead only pass the ones we've constructed to the mw api requests. * Only construct the agents once we have a parsoid config so that we can make this knob configurable. * Set the http connect timeout to 10s while testing. Change-Id: I212364070a58c72ae6fd35fb78b506cc58e8b3ff --- M bin/parserTests.js M lib/config/ParsoidConfig.js M lib/mw/ApiRequest.js M tests/mocha/api.js M tests/mocha/apitest.localsettings.js M tests/mocha/templatedata.js M tests/mockAPI.js 7 files changed, 29 insertions(+), 15 deletions(-) Approvals: Subramanya Sastry: Looks good to me, approved jenkins-bot: Verified diff --git a/bin/parserTests.js b/bin/parserTests.js index 788942c..970d074 100755 --- a/bin/parserTests.js +++ b/bin/parserTests.js @@ -1696,6 +1696,8 @@ parsoidConfig.loggerSampling = [ [/^warning(\/|$)/, 100], ]; + + parsoidConfig.timeouts.mwApi.connect = 1; }; var parsoidConfig = new ParsoidConfig({ setup: setup }, options); diff --git a/lib/config/ParsoidConfig.js b/lib/config/ParsoidConfig.js index 4cce7fb..82db32a 100644 --- a/lib/config/ParsoidConfig.js +++ b/lib/config/ParsoidConfig.js @@ -49,8 +49,13 @@ imgInfo: 40 * 1000, // action=query=siteinfo configInfo: 40 * 1000, + // Connection timeout setting for the http agent + connect: 5 * 1000, }, }, + + // Max concurrency level for accessing the Mediawiki API + maxSockets: 15, retries: { mwApi: { @@ -109,6 +114,7 @@ this.timeouts = Util.clone(CONFIG_DEFAULTS.timeouts); this.retries = Util.clone(CONFIG_DEFAULTS.retries); this.limits = Util.clone(CONFIG_DEFAULTS.limits); + this.maxSockets = Util.clone(CONFIG_DEFAULTS.maxSockets); this._uniq = 0; if (localSettings && localSettings.setup) { diff --git a/lib/mw/ApiRequest.js b/lib/mw/ApiRequest.js index 1e1a7b7..3faf2de 100644 --- a/lib/mw/ApiRequest.js +++ b/lib/mw/ApiRequest.js @@ -9,14 +9,8 @@ var Promise = require('../utils/promise.js'); -// Max concurrency level for accessing the Mediawiki API -var HTTP_MAX_SOCKETS = 15; -// Connection timeout setting for the http agent -var HTTP_CONNECT_TIMEOUT = 5 * 1000; // 5 seconds - - -function setupConnectionTimeout(protocol) { +function setupConnectionTimeout(env, protocol) { var http = require(protocol); var Agent = http.Agent; @@ -73,14 +67,11 @@ } }; - http.globalAgent = new ConnectTimeoutAgent({ - connectTimeout: HTTP_CONNECT_TIMEOUT, - maxSockets: HTTP_MAX_SOCKETS, + return new ConnectTimeoutAgent({ + connectTimeout: env.conf.parsoid.timeouts.mwApi.connect, + maxSockets: env.conf.parsoid.maxSockets, }); } -setupConnectionTimeout('http'); -setupConnectionTimeout('https'); - var latestSerial = 0; @@ -287,12 +278,22 @@ // Inherit from EventEmitter util.inherits(ApiRequest, events.EventEmitter); +var httpAgent = null; +var httpsAgent = null; + ApiRequest.prototype.request = function(options, callback) { var env = this.env; var proxy = this.proxy; + // this is a good place to put debugging statements // if you want to watch network requests. // console.log('ApiRequest', options); + + if (httpAgent === null) { + httpAgent = setupConnectionTimeout(env, 'http'); + httpsAgent = setupConnectionTimeout(env, 'https'); + } + options.agent = /^https[:]/.test(options.uri) ? httpsAgent : httpAgent; // Forward the request id if (!options.headers) { options.headers = {}; } @@ -307,12 +308,13 @@ // Proxy options should only be applied to MW API endpoints. // Allow subclasses to manually set proxy to `null` or to a different // proxy to override MW API proxy. - if (proxy && options.proxy === undefined) { + if (proxy && proxy.uri && options.proxy === undefined) { options.proxy = proxy.uri; + options.agent = /^https[:]/.test(proxy.uri) ? httpsAgent : httpAgent; if (proxy.headers) { Object.assign(options.headers, proxy.headers); } - if (proxy.strip_https && options.proxy && /^https[:]/.test(options.uri)) { + if (proxy.strip_https && /^https[:]/.test(options.uri)) { // When proxying, strip TLS and lie to the appserver to indicate // unwrapping has
[MediaWiki-commits] [Gerrit] Add COPYING file - change (mediawiki...luasandbox)
Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/295018 Change subject: Add COPYING file .. Add COPYING file Based on the license in debian/copyright. Bug: T57898 Change-Id: I9d82bc2ac2395fc667f59806db16f6804ef6679a --- A COPYING 1 file changed, 21 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/php/luasandbox refs/changes/18/295018/1 diff --git a/COPYING b/COPYING new file mode 100644 index 000..fe9bd71 --- /dev/null +++ b/COPYING @@ -0,0 +1,21 @@ +(C) 2011-2014 Tim Starling +(C) 2011-2014 Wikimedia Foundation + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- To view, visit https://gerrit.wikimedia.org/r/295018 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9d82bc2ac2395fc667f59806db16f6804ef6679a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/php/luasandbox 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] Lint files before a jscs bump - change (mediawiki...parsoid)
Subramanya Sastry has submitted this change and it was merged. Change subject: Lint files before a jscs bump .. Lint files before a jscs bump * Indentation in switches * Return outside of functions * Whitespace in jsapi.js Change-Id: I27bda35e6208d057e5e5831db03880639990ebd3 --- M bin/domdiff.test.js M bin/roundtrip-test.js M lib/api/routes.js M lib/html2wt/DOMHandlers.js M lib/html2wt/LinkHandler.js M lib/html2wt/WTSUtils.js M lib/html2wt/WikitextSerializer.js M lib/html2wt/escapeWikitext.js M lib/jsapi.js M lib/logger/Logger.js M lib/utils/Util.js M lib/wt2html/XMLSerializer.js M lib/wt2html/tokenizer.utils.js M lib/wt2html/tt/ParagraphWrapper.js M lib/wt2html/tt/ParserFunctions.js M tools/fetch-wt.js M tools/regression-testing.js M tools/sync-parserTests.js 18 files changed, 897 insertions(+), 827 deletions(-) Approvals: Arlolra: Looks good to me, approved Subramanya Sastry: Verified; Looks good to me, approved diff --git a/bin/domdiff.test.js b/bin/domdiff.test.js index 14ccb82..94219b9 100755 --- a/bin/domdiff.test.js +++ b/bin/domdiff.test.js @@ -37,42 +37,44 @@ }, }); -var argv = opts.argv; -var oldhtml = argv.oldhtml; -var newhtml = argv.newhtml; +(function() { + var argv = opts.argv; + var oldhtml = argv.oldhtml; + var newhtml = argv.newhtml; -if (!oldhtml && argv._[0]) { - oldhtml = fs.readFileSync(argv._[0], 'utf8'); - newhtml = fs.readFileSync(argv._[1], 'utf8'); -} + if (!oldhtml && argv._[0]) { + oldhtml = fs.readFileSync(argv._[0], 'utf8'); + newhtml = fs.readFileSync(argv._[1], 'utf8'); + } -if (Util.booleanOption(argv.help) || !oldhtml || !newhtml) { - opts.showHelp(); - return; -} + if (Util.booleanOption(argv.help) || !oldhtml || !newhtml) { + opts.showHelp(); + return; + } -var oldDOM = DU.parseHTML(oldhtml).body; -var newDOM = DU.parseHTML(newhtml).body; + var oldDOM = DU.parseHTML(oldhtml).body; + var newDOM = DU.parseHTML(newhtml).body; -var dummyEnv = { - conf: { parsoid: { debug: Util.booleanOption(argv.debug) }, wiki: {} }, - page: { id: null }, -}; + var dummyEnv = { + conf: { parsoid: { debug: Util.booleanOption(argv.debug) }, wiki: {} }, + page: { id: null }, + }; -if (argv.debug) { - var logger = new ParsoidLogger(dummyEnv); - logger.registerBackend(/^(trace|debug)(\/|$)/, logger.getDefaultTracerBackend()); - dummyEnv.log = logger.log.bind(logger); -} else { - dummyEnv.log = function() {}; -} + if (argv.debug) { + var logger = new ParsoidLogger(dummyEnv); + logger.registerBackend(/^(trace|debug)(\/|$)/, logger.getDefaultTracerBackend()); + dummyEnv.log = logger.log.bind(logger); + } else { + dummyEnv.log = function() {}; + } -(new DOMDiff(dummyEnv)).diff(oldDOM, newDOM); + (new DOMDiff(dummyEnv)).diff(oldDOM, newDOM); -DU.dumpDOM(newDOM, 'DIFF-marked DOM', { - quiet: !!Util.booleanOption(argv.quiet), - storeDiffMark: true, - env: dummyEnv, -}); + DU.dumpDOM(newDOM, 'DIFF-marked DOM', { + quiet: !!Util.booleanOption(argv.quiet), + storeDiffMark: true, + env: dummyEnv, + }); -process.exit(0); + process.exit(0); +}()); diff --git a/bin/roundtrip-test.js b/bin/roundtrip-test.js index cc1aca2..58fba92 100755 --- a/bin/roundtrip-test.js +++ b/bin/roundtrip-test.js @@ -713,36 +713,38 @@ }, }; - var opts = yargs.usage( - 'Usage: $0 [options] \n\n', options - ).strict(); + (function() { + var opts = yargs.usage( + 'Usage: $0 [options] \n\n', options + ).strict(); - var argv = opts.argv; - if (!argv._.length) { - return opts.showHelp(); - } - var title = String(argv._[0]); - - Promise.resolve().then(function() { - if (argv.parsoidURL) { return; } - // Start our own Parsoid server - var apiServer = require('../tests/apiServer.js'); - var parsoidOptions = { quiet: true }; - if (argv.apiURL) { - parsoidOptions.mockUrl = argv.apiURL; - argv.domain = 'customwiki'; + var argv = opts.argv; + if (!argv._.length) { + return opts.showHelp(); } - apiServer.exitOnProcessTerm(); - return apiServer.startParsoidServer(parsoidOptions).then(function(ret) { - argv.parsoidURL = ret.url; - }); - }).then(function() { - var formatter = Util.booleanOption(argv.xml) ? xmlFormat : plainFormat; - return
[MediaWiki-commits] [Gerrit] Don't use $wgContentNamespaces directly - change (mediawiki...VIKI)
jenkins-bot has submitted this change and it was merged. Change subject: Don't use $wgContentNamespaces directly .. Don't use $wgContentNamespaces directly Change-Id: I834ac71ae94f6821c291617d83a4d1fcc4b2a686 --- M ApiGetContentNamespaces.php 1 file changed, 2 insertions(+), 3 deletions(-) Approvals: MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/ApiGetContentNamespaces.php b/ApiGetContentNamespaces.php index 6866b4c..2495ab7 100644 --- a/ApiGetContentNamespaces.php +++ b/ApiGetContentNamespaces.php @@ -26,8 +26,7 @@ parent::__construct( $main, $action ); } public function execute() { - global $wgContentNamespaces; - $this->getResult()->addValue( null, $this->getModuleName(), $wgContentNamespaces ); + $this->getResult()->addValue( null, $this->getModuleName(), MWNamespace::getContentNamespaces() ); return true; } @@ -45,4 +44,4 @@ public function getHelpUrls() { return ''; } -} \ No newline at end of file +} -- To view, visit https://gerrit.wikimedia.org/r/291275 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I834ac71ae94f6821c291617d83a4d1fcc4b2a686 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VIKI Gerrit-Branch: master Gerrit-Owner: LegoktmGerrit-Reviewer: MaxSem Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Don't use $wgContentNamespaces directly - change (mediawiki...EditSimilar)
jenkins-bot has submitted this change and it was merged. Change subject: Don't use $wgContentNamespaces directly .. Don't use $wgContentNamespaces directly Change-Id: I965201d331b3b04cbbf470248baef1d357286c22 --- M EditSimilar.class.php 1 file changed, 2 insertions(+), 4 deletions(-) Approvals: MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/EditSimilar.class.php b/EditSimilar.class.php index 49155c7..8f97290 100644 --- a/EditSimilar.class.php +++ b/EditSimilar.class.php @@ -251,8 +251,6 @@ * @return array Array of Title objects */ function idsToTitles( $idArray ) { - global $wgContentNamespaces; - $dbr = wfGetDB( DB_SLAVE ); $stringedNames = implode( ',', $idArray ); $res = $dbr->select( @@ -267,7 +265,7 @@ // so for now, to speed things up, just discard results from other namespaces (and subpages) while ( ( $x = $dbr->fetchObject( $res ) ) && - ( in_array( $x->page_namespace, $wgContentNamespaces ) ) && + ( MWNamespace::isContent( $x->page_namespace ) ) && strpos( $x->page_title, '/' ) === false ) { @@ -369,4 +367,4 @@ } } -} \ No newline at end of file +} -- To view, visit https://gerrit.wikimedia.org/r/291269 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I965201d331b3b04cbbf470248baef1d357286c22 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/EditSimilar Gerrit-Branch: master Gerrit-Owner: LegoktmGerrit-Reviewer: MaxSem Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Don't use $wgContentNamespaces directly - change (mediawiki...DuskToDawn)
jenkins-bot has submitted this change and it was merged. Change subject: Don't use $wgContentNamespaces directly .. Don't use $wgContentNamespaces directly Change-Id: I193c51e527501efea0fa0f84614ff0f67f69b115 --- M DuskToDawn.skin.php 1 file changed, 1 insertion(+), 3 deletions(-) Approvals: MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/DuskToDawn.skin.php b/DuskToDawn.skin.php index 4f84e15..ed6323c 100644 --- a/DuskToDawn.skin.php +++ b/DuskToDawn.skin.php @@ -54,12 +54,10 @@ * Almost verbatim copypasta from Aurora (/skins/Aurora/Aurora.skin.php) */ private function getLastEdited() { - global $wgContentNamespaces; - $title = $this->getSkin()->getTitle(); $msg = ''; - if ( $title->exists() && in_array( $title->getNamespace(), $wgContentNamespaces ) ) { + if ( $title->exists() && $title->isContentPage() ) { // First construct a Revision object from the current Title... $revision = Revision::newFromTitle( $title ); if ( $revision instanceof Revision ) { -- To view, visit https://gerrit.wikimedia.org/r/291267 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I193c51e527501efea0fa0f84614ff0f67f69b115 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/DuskToDawn Gerrit-Branch: master Gerrit-Owner: LegoktmGerrit-Reviewer: MaxSem Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Don't use $wgContentNamespaces directly - change (mediawiki...PureWikiDeletion)
jenkins-bot has submitted this change and it was merged. Change subject: Don't use $wgContentNamespaces directly .. Don't use $wgContentNamespaces directly Change-Id: Ib00b794d8c198e31471b6d6b5d0b6723b1f4d8ae --- M SpecialPureWikiDeletion.php 1 file changed, 1 insertion(+), 3 deletions(-) Approvals: MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/SpecialPureWikiDeletion.php b/SpecialPureWikiDeletion.php index 708c9df..9180ce7 100644 --- a/SpecialPureWikiDeletion.php +++ b/SpecialPureWikiDeletion.php @@ -12,9 +12,7 @@ class RandomExcludeBlank extends RandomPage { private $namespaces; // namespaces to select pages from function __construct( $name = 'RandomExcludeBlank' ){ - global $wgContentNamespaces; - - $this->namespaces = $wgContentNamespaces; + $this->namespaces = MWNamespace::getContentNamespaces(); parent::__construct( $name ); } -- To view, visit https://gerrit.wikimedia.org/r/291276 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib00b794d8c198e31471b6d6b5d0b6723b1f4d8ae Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/PureWikiDeletion Gerrit-Branch: master Gerrit-Owner: LegoktmGerrit-Reviewer: MaxSem Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Don't use $wgContentNamespaces directly - change (mediawiki...BlueSky)
jenkins-bot has submitted this change and it was merged. Change subject: Don't use $wgContentNamespaces directly .. Don't use $wgContentNamespaces directly Change-Id: I93fa3da6368206eff695c409773bda22e6ea73b5 --- M BlueSky.skin.php 1 file changed, 1 insertion(+), 3 deletions(-) Approvals: MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/BlueSky.skin.php b/BlueSky.skin.php index efa034d..5657eb0 100644 --- a/BlueSky.skin.php +++ b/BlueSky.skin.php @@ -1515,11 +1515,9 @@ * @return string "edited X ago" string on success, empty string on failure */ public function getPageLastEdit( Title $title ) { - global $wgContentNamespaces; - $msg = ''; - if ( $title->exists() && in_array( $title->getNamespace(), $wgContentNamespaces ) ) { + if ( $title->exists() && $title->isContentPage() ) { // First construct a Revision object from the current Title... $revision = Revision::newFromTitle( $title ); if ( $revision instanceof Revision ) { -- To view, visit https://gerrit.wikimedia.org/r/291266 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I93fa3da6368206eff695c409773bda22e6ea73b5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/BlueSky Gerrit-Branch: master Gerrit-Owner: LegoktmGerrit-Reviewer: MaxSem Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] chmod -x TitleBlacklist.list.php - change (mediawiki...TitleBlacklist)
MaxSem has submitted this change and it was merged. Change subject: chmod -x TitleBlacklist.list.php .. chmod -x TitleBlacklist.list.php Change-Id: Ifa7fb3c887328fff4175f923fba67eac1ab7aa95 (cherry picked from commit 86889ec6841aa0b285c992b716efc993ff2d0892) --- M TitleBlacklist.list.php 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Legoktm: Looks good to me, approved MaxSem: Verified; Looks good to me, approved diff --git a/TitleBlacklist.list.php b/TitleBlacklist.list.php old mode 100755 new mode 100644 -- To view, visit https://gerrit.wikimedia.org/r/294655 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifa7fb3c887328fff4175f923fba67eac1ab7aa95 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TitleBlacklist Gerrit-Branch: REL1_27 Gerrit-Owner: LegoktmGerrit-Reviewer: Jackmcbarn Gerrit-Reviewer: Legoktm Gerrit-Reviewer: MaxSem ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use the plaintext GPL - change (at-ease)
jenkins-bot has submitted this change and it was merged. Change subject: Use the plaintext GPL .. Use the plaintext GPL Change-Id: I3d6db754cefdc1a14ec1c9524c476159fdc13a67 --- M COPYING 1 file changed, 88 insertions(+), 91 deletions(-) Approvals: MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/COPYING b/COPYING index 019694a..d159169 100644 --- a/COPYING +++ b/COPYING @@ -1,65 +1,65 @@ -== GNU GENERAL PUBLIC LICENSE == +GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 -Version 2, June 1991 + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. -Copyright (C) 1989, 1991 Free Software Foundation, Inc. -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA -Everyone is permitted to copy and distribute verbatim copies -of this license document, but changing it is not allowed. +Preamble -=== Preamble === - -The licenses for most software are designed to take away your + The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to +the GNU Lesser General Public License instead.) You can apply it to your programs, too. -When we speak of free software, we are referring to freedom, not + When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. -To protect your rights, we need to make restrictions that forbid + To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. -For example, if you distribute copies of such a program, whether + For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. -We protect your rights with two steps: (1) copyright the software, and + We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. -Also, for each author's protection and ours, we want to make certain + Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. -Finally, any free program is threatened constantly by software + Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. -The precise terms and conditions for copying, distribution and + The precise terms and conditions for copying, distribution and modification follow. -== TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION == +GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION -'''0.''' This License applies to any program or other work which contains + 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" @@ -76,7 +76,7 @@ Program (independent of having been made by running the Program).
[MediaWiki-commits] [Gerrit] Use lower priority for already scored queries - change (wikimedia...discernatron)
EBernhardson has submitted this change and it was merged. Change subject: Use lower priority for already scored queries .. Use lower priority for already scored queries When adding priorities with the update-scoring-queue console command all queries would have a priority of 1 to $numSlots, even though some of these queries already have scores. Adjust handling so the priorities are lower for queries that already have scores. Change-Id: Icf0075761c51ba4435b0b20c151df6079d0d95a6 --- M src/RelevanceScoring/Console/UpdateScoringQueue.php M src/RelevanceScoring/Repository/ScoringQueueRepository.php 2 files changed, 16 insertions(+), 10 deletions(-) Approvals: EBernhardson: Verified; Looks good to me, approved diff --git a/src/RelevanceScoring/Console/UpdateScoringQueue.php b/src/RelevanceScoring/Console/UpdateScoringQueue.php index 2e60e09..87057f2 100644 --- a/src/RelevanceScoring/Console/UpdateScoringQueue.php +++ b/src/RelevanceScoring/Console/UpdateScoringQueue.php @@ -68,14 +68,21 @@ $pending = $this->scoringQueueRepo->getNumberPending($queryIds); foreach ($queryIds as $queryId) { $needed = $num; +$have = 0; if (isset($scores[$queryId])) { -$needed -= $scores[$queryId]; +$have += $scores[$queryId]; } if (isset($pending[$queryId])) { -$needed -= $pending[$queryId]; +$have += $pending[$queryId]; } -if ($needed > 0) { -$count += $this->scoringQueueRepo->insert($queryId, $needed); +if ($needed > $have) { +$count += $this->scoringQueueRepo->insert( +$queryId, +$needed - $have, +// shifts the priority so ungraded queries still have +// higher priority +$have +); } } diff --git a/src/RelevanceScoring/Repository/ScoringQueueRepository.php b/src/RelevanceScoring/Repository/ScoringQueueRepository.php index f564bf1..723edf0 100644 --- a/src/RelevanceScoring/Repository/ScoringQueueRepository.php +++ b/src/RelevanceScoring/Repository/ScoringQueueRepository.php @@ -10,7 +10,6 @@ use Psr\Log\NullLogger; use WikiMedia\OAuth\User; use WikiMedia\RelevanceScoring\Util\Calendar; -use WikiMedia\RelevanceScoring\Exception\RuntimeException; /** * Maintains a queue of queries that need to be scored. Is somewhat @@ -71,9 +70,6 @@ [$queryIds], [Connection::PARAM_INT_ARRAY] ); -if (!$res) { -throw new RuntimeException('Failed querying database'); -} $byQueryId = []; foreach ($res as $row) { $byQueryId[$row['query_id']] = $row['count']; @@ -87,8 +83,11 @@ * * @param int $queryId * @param int $numSlots + * @param int $priorityOffset By default priority will go from 1 to $numSlots. + *The value here will be used to shift priority by the specified amount. Note + *that priority is unsigned, so this must be a positive value. */ -public function insert($queryId, $numSlots = null) +public function insert($queryId, $numSlots = null, $priorityOffset = 0) { if ($numSlots === null) { $numSlots = $this->defaultNumSlots; @@ -100,7 +99,7 @@ // that 0 is the highest priority. for (;$numSlots > 0; --$numSlots) { $rows[] = "(:queryId, :priority$numSlots)"; -$params["priority$numSlots"] = $numSlots; +$params["priority$numSlots"] = $numSlots + $priorityOffset; } $sql = 'INSERT INTO scoring_queue (query_id, priority) VALUES '. -- To view, visit https://gerrit.wikimedia.org/r/295017 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icf0075761c51ba4435b0b20c151df6079d0d95a6 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/discovery/discernatron Gerrit-Branch: master Gerrit-Owner: EBernhardsonGerrit-Reviewer: EBernhardson ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use lower priority for already scored queries - change (wikimedia...discernatron)
EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/295017 Change subject: Use lower priority for already scored queries .. Use lower priority for already scored queries When adding priorities with the update-scoring-queue console command all queries would have a priority of 1 to $numSlots, even though some of these queries already have scores. Adjust handling so the priorities are lower for queries that already have scores. Change-Id: Icf0075761c51ba4435b0b20c151df6079d0d95a6 --- M src/RelevanceScoring/Console/UpdateScoringQueue.php M src/RelevanceScoring/Repository/ScoringQueueRepository.php 2 files changed, 16 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/discernatron refs/changes/17/295017/1 diff --git a/src/RelevanceScoring/Console/UpdateScoringQueue.php b/src/RelevanceScoring/Console/UpdateScoringQueue.php index 2e60e09..87057f2 100644 --- a/src/RelevanceScoring/Console/UpdateScoringQueue.php +++ b/src/RelevanceScoring/Console/UpdateScoringQueue.php @@ -68,14 +68,21 @@ $pending = $this->scoringQueueRepo->getNumberPending($queryIds); foreach ($queryIds as $queryId) { $needed = $num; +$have = 0; if (isset($scores[$queryId])) { -$needed -= $scores[$queryId]; +$have += $scores[$queryId]; } if (isset($pending[$queryId])) { -$needed -= $pending[$queryId]; +$have += $pending[$queryId]; } -if ($needed > 0) { -$count += $this->scoringQueueRepo->insert($queryId, $needed); +if ($needed > $have) { +$count += $this->scoringQueueRepo->insert( +$queryId, +$needed - $have, +// shifts the priority so ungraded queries still have +// higher priority +$have +); } } diff --git a/src/RelevanceScoring/Repository/ScoringQueueRepository.php b/src/RelevanceScoring/Repository/ScoringQueueRepository.php index f564bf1..723edf0 100644 --- a/src/RelevanceScoring/Repository/ScoringQueueRepository.php +++ b/src/RelevanceScoring/Repository/ScoringQueueRepository.php @@ -10,7 +10,6 @@ use Psr\Log\NullLogger; use WikiMedia\OAuth\User; use WikiMedia\RelevanceScoring\Util\Calendar; -use WikiMedia\RelevanceScoring\Exception\RuntimeException; /** * Maintains a queue of queries that need to be scored. Is somewhat @@ -71,9 +70,6 @@ [$queryIds], [Connection::PARAM_INT_ARRAY] ); -if (!$res) { -throw new RuntimeException('Failed querying database'); -} $byQueryId = []; foreach ($res as $row) { $byQueryId[$row['query_id']] = $row['count']; @@ -87,8 +83,11 @@ * * @param int $queryId * @param int $numSlots + * @param int $priorityOffset By default priority will go from 1 to $numSlots. + *The value here will be used to shift priority by the specified amount. Note + *that priority is unsigned, so this must be a positive value. */ -public function insert($queryId, $numSlots = null) +public function insert($queryId, $numSlots = null, $priorityOffset = 0) { if ($numSlots === null) { $numSlots = $this->defaultNumSlots; @@ -100,7 +99,7 @@ // that 0 is the highest priority. for (;$numSlots > 0; --$numSlots) { $rows[] = "(:queryId, :priority$numSlots)"; -$params["priority$numSlots"] = $numSlots; +$params["priority$numSlots"] = $numSlots + $priorityOffset; } $sql = 'INSERT INTO scoring_queue (query_id, priority) VALUES '. -- To view, visit https://gerrit.wikimedia.org/r/295017 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icf0075761c51ba4435b0b20c151df6079d0d95a6 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/discovery/discernatron Gerrit-Branch: master Gerrit-Owner: EBernhardson___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Missing use statement - change (wikimedia...discernatron)
EBernhardson has submitted this change and it was merged. Change subject: Missing use statement .. Missing use statement Change-Id: I19a47fe555ee764ce5d9216b584345a89ea2d4ac --- M src/RelevanceScoring/Repository/ScoringQueueRepository.php 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: EBernhardson: Verified; Looks good to me, approved diff --git a/src/RelevanceScoring/Repository/ScoringQueueRepository.php b/src/RelevanceScoring/Repository/ScoringQueueRepository.php index ac54a0b..f564bf1 100644 --- a/src/RelevanceScoring/Repository/ScoringQueueRepository.php +++ b/src/RelevanceScoring/Repository/ScoringQueueRepository.php @@ -10,6 +10,7 @@ use Psr\Log\NullLogger; use WikiMedia\OAuth\User; use WikiMedia\RelevanceScoring\Util\Calendar; +use WikiMedia\RelevanceScoring\Exception\RuntimeException; /** * Maintains a queue of queries that need to be scored. Is somewhat -- To view, visit https://gerrit.wikimedia.org/r/295016 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I19a47fe555ee764ce5d9216b584345a89ea2d4ac Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/discovery/discernatron Gerrit-Branch: master Gerrit-Owner: EBernhardsonGerrit-Reviewer: EBernhardson ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Missing use statement - change (wikimedia...discernatron)
EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/295016 Change subject: Missing use statement .. Missing use statement Change-Id: I19a47fe555ee764ce5d9216b584345a89ea2d4ac --- M src/RelevanceScoring/Repository/ScoringQueueRepository.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/discernatron refs/changes/16/295016/1 diff --git a/src/RelevanceScoring/Repository/ScoringQueueRepository.php b/src/RelevanceScoring/Repository/ScoringQueueRepository.php index ac54a0b..f564bf1 100644 --- a/src/RelevanceScoring/Repository/ScoringQueueRepository.php +++ b/src/RelevanceScoring/Repository/ScoringQueueRepository.php @@ -10,6 +10,7 @@ use Psr\Log\NullLogger; use WikiMedia\OAuth\User; use WikiMedia\RelevanceScoring\Util\Calendar; +use WikiMedia\RelevanceScoring\Exception\RuntimeException; /** * Maintains a queue of queries that need to be scored. Is somewhat -- To view, visit https://gerrit.wikimedia.org/r/295016 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I19a47fe555ee764ce5d9216b584345a89ea2d4ac Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/discovery/discernatron Gerrit-Branch: master Gerrit-Owner: EBernhardson___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add monolog to composer.json - change (wikimedia...discernatron)
EBernhardson has submitted this change and it was merged. Change subject: Add monolog to composer.json .. Add monolog to composer.json Change-Id: I3b240e7c1fc643bbf66d2810db551ab4cfdd5701 --- M composer.json 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: EBernhardson: Verified; Looks good to me, approved diff --git a/composer.json b/composer.json index 6bdb357..6b54c75 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,7 @@ { "name": "ebernhardson/search-result-ranker", "require": { +"monolog/monolog": "^1.19.0", "silex/silex": "^1.3", "doctrine/orm": "^2.5", "symfony/form": "~2.3", -- To view, visit https://gerrit.wikimedia.org/r/295015 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3b240e7c1fc643bbf66d2810db551ab4cfdd5701 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/discovery/discernatron Gerrit-Branch: master Gerrit-Owner: EBernhardsonGerrit-Reviewer: EBernhardson ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add monolog to composer.json - change (wikimedia...discernatron)
EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/295015 Change subject: Add monolog to composer.json .. Add monolog to composer.json Change-Id: I3b240e7c1fc643bbf66d2810db551ab4cfdd5701 --- M composer.json 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/discernatron refs/changes/15/295015/1 diff --git a/composer.json b/composer.json index 6bdb357..6b54c75 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,7 @@ { "name": "ebernhardson/search-result-ranker", "require": { +"monolog/monolog": "^1.19.0", "silex/silex": "^1.3", "doctrine/orm": "^2.5", "symfony/form": "~2.3", -- To view, visit https://gerrit.wikimedia.org/r/295015 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3b240e7c1fc643bbf66d2810db551ab4cfdd5701 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/discovery/discernatron Gerrit-Branch: master Gerrit-Owner: EBernhardson___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make scoring visible - change (wikimedia...discernatron)
EBernhardson has submitted this change and it was merged. Change subject: Make scoring visible .. Make scoring visible Very basic implementation to show scores to the user. The pagination is very bare bones, not sure if worth doing more. Might want to consider if users should see all scored queries, or only the ones they have personally scored. Change-Id: I093478c9ad3171af56e002c071e6967a53fa183f --- M public/js/scoring.js M src/RelevanceScoring/Controller/ScoresController.php M src/RelevanceScoring/RelevanceScoringProvider.php M src/RelevanceScoring/Repository/ScoresRepository.php A views/query_scores.twig A views/scored_queries.twig M views/scores.twig 7 files changed, 192 insertions(+), 25 deletions(-) Approvals: EBernhardson: Verified; Looks good to me, approved diff --git a/public/js/scoring.js b/public/js/scoring.js index 0fd03ee..805eb18 100644 --- a/public/js/scoring.js +++ b/public/js/scoring.js @@ -4,7 +4,7 @@ var $this = $(this), value = parseInt($this.val()), $row = $this.closest('.row'); - + $row.removeClass(valueToClass.join(' ')); if (!isNaN(value)) { $row.addClass(valueToClass[value]); @@ -18,14 +18,20 @@ var next, row = $(this).closest('.row'), selected = parseInt(row.find('input:checked').val()), -skip = 'label, input, a, .glyphicon'; - +skip = 'label, input, a, .glyphicon', +// is there a better way? evt.toElement was missing in some FF +// versions. this is the element the event was bound to, not the +// one that was clicked. +$target = $(evt.toElement || +(evt.originalEvent && evt.originalEvent.target) || +this); + // Don't override real clicks. We have to check originalEvent because toElement // isn't populated in firefox 46 -if ($(evt.toElement).is(skip) || $(evt.originalEvent.target).is(skip)) { +if ($target.is(skip)) { return; } - + // if nothing selected default to last so we wrap to beginning if (isNaN(selected)) { selected = 4; @@ -49,7 +55,7 @@ $target.siblings('.show-snippet').removeClass('hidden').toggle(true); $target.closest('.result').find('.snippet').toggle(false); }; - + $(document).ready(function () { $('input:checked').each(onChange); $('input[type=radio]').change(onChange); diff --git a/src/RelevanceScoring/Controller/ScoresController.php b/src/RelevanceScoring/Controller/ScoresController.php index 6c99229..b5ec1be 100644 --- a/src/RelevanceScoring/Controller/ScoresController.php +++ b/src/RelevanceScoring/Controller/ScoresController.php @@ -2,42 +2,118 @@ namespace WikiMedia\RelevanceScoring\Controller; +use Closure; use Twig_Environment; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; +use WikiMedia\OAuth\User; use WikiMedia\RelevanceScoring\Application; +use WikiMedia\RelevanceScoring\Repository\QueriesRepository; use WikiMedia\RelevanceScoring\Repository\ScoresRepository; class ScoresController { /** @var Application */ private $app; +/** @var User */ +private $user; /** @var Twig_Environment */ private $twig; +/** @var QueriesRepository */ +private $queriesRepo; /** @var ScoresRepository */ private $scoresRepo; public function __construct( Application $app, +User $user, Twig_Environment $twig, +QueriesRepository $queriesRepo, ScoresRepository $scoresRepo ) { $this->app = $app; +$this->user = $user; $this->twig = $twig; +$this->queriesRepo = $queriesRepo; $this->scoresRepo = $scoresRepo; +} + +// This is a very sad pagination mechanic, only offering forward pagination. +// Better solutions get increasingly more complicated though. +private function paginate(Request $request, Closure $fn, $defaultLimit = 20) +{ +// Collect data and do basic validation +$startingAtId = $request->query->get('offset', '0'); +if (!ctype_digit($startingAtId) || $startingAtId < 0) { +throw new \Exception('Invalid offset: '.$startingAtId); +} +$limit = $request->query->get('limit', $defaultLimit); +if (!ctype_digit($limit)) { +$limit = $defaultLimit; +} + +$found = $fn((int) $startingAtId, (int) $limit + 1); +if (count($found) > $limit) { +$last = array_pop($found); + +return [$found, ['offset' => $last['id'], 'limit' => $limit]]; +} else { +return [$found, null]; +
[MediaWiki-commits] [Gerrit] Keep track of snippet highlighting - change (wikimedia...discernatron)
EBernhardson has submitted this change and it was merged. Change subject: Keep track of snippet highlighting .. Keep track of snippet highlighting It might be easier for judges if we make the grading interface look more like a search result page they are used to. Part of that is highlighting relevant pieces of the snippet. Rather than try and integrate our own highlighter, which would need to know about spelling corrections and such, keep track of what was highlighted by the search engine that provided the snippet and re-highlight when sending out the scoring form. Change-Id: I52bf2129beba07c76557604fcd7c2daa7ad84f60 --- M public/css/scoring.css M src/RelevanceScoring/Import/HtmlResultGetter.php M src/RelevanceScoring/Import/ImportedResult.php M src/RelevanceScoring/Import/MediaWikiResultGetter.php M src/RelevanceScoring/RelevanceScoringProvider.php A src/RelevanceScoring/RelevanceScoringTwigExtension.php M tests/unit/RelevanceScoring/Import/HtmlResultGetterTest.php A tests/unit/RelevanceScoring/RelevanceScoringTwigExtensionTest.php M views/score_query.twig 9 files changed, 180 insertions(+), 27 deletions(-) Approvals: EBernhardson: Verified; Looks good to me, approved diff --git a/public/css/scoring.css b/public/css/scoring.css index d4b919e..14c95b7 100644 --- a/public/css/scoring.css +++ b/public/css/scoring.css @@ -21,6 +21,9 @@ .snippet { padding-left: 1em; } +.snippet em { + font-weight: bold; +} @media (max-width: 768px) { .border-xs { border: 1px solid black; diff --git a/src/RelevanceScoring/Import/HtmlResultGetter.php b/src/RelevanceScoring/Import/HtmlResultGetter.php index ed94bf7..f404e05 100644 --- a/src/RelevanceScoring/Import/HtmlResultGetter.php +++ b/src/RelevanceScoring/Import/HtmlResultGetter.php @@ -15,6 +15,8 @@ private $source; private $url; private $selectors; +private $highlightStart; +private $highlightEnd; private $extraQueryParams; /** @@ -23,6 +25,10 @@ * @param string$source * @param string$url * @param array$selectors + * @param string$highlightStart Marker that signifies the beginning of + *highlighted snippet text. + * @param string$highlightEnd Marker that signifies the end of + *highlighted snippet text. * @param array $extraQueryParams */ public function __construct( @@ -31,6 +37,8 @@ $source, $url, array $selectors, +$highlightStart, +$highlightEnd, array $extraQueryParams = array() ) { $this->http = $http; @@ -38,6 +46,8 @@ $this->source = $source; $this->url = $url; $this->selectors = $selectors; +$this->highlightStart = $highlightStart; +$this->highlightEnd = $highlightEnd; $this->extraQueryParams = $extraQueryParams; } @@ -86,13 +96,13 @@ } $results = []; -$crawler->filter($this->selectors['results'])->each(function ($result) use (&$results, $wiki) { +$crawler->filter($this->selectors['results'])->each(function ($result) use (&$results, $wiki, $contentType) { $url = $result->filter($this->selectors['url'])->attr('href'); if ($this->isValidWikiArticle($wiki, $url)) { $results[] = ImportedResult::createFromURL( $this->source, $url, -trim($result->filter($this->selectors['snippet'])->text()), +$this->extractSnippet($result, $contentType), count($results) ); } @@ -112,9 +122,11 @@ } /** - * @param string $url + * @param string $wiki The wiki the url should belong to + * @param string $url The url to check * - * @return bool + * @return bool True is the provided URL looks like a url + * for an article on the provided wiki */ private function isValidWikiArticle($wiki, $url) { @@ -138,4 +150,31 @@ return !empty($query['title']); } + +/** + * @param DOMCrawler $result Crawler instance containing a single + *search result. + * @param string $contentType The content type of the result + * + * @return string Sanitized HTML string containing only tags for bold + *open and close + */ +private function extractSnippet(Crawler $result, $contentType) +{ +// Pull html from the result +$html = $result->filter($this->selectors['snippet'])->html(); +// Replace start and end of bolded portions with custom markers +$replaced = strtr($html, [ +
[MediaWiki-commits] [Gerrit] Using a queue for what gets scored next - change (wikimedia...discernatron)
EBernhardson has submitted this change and it was merged. Change subject: Using a queue for what gets scored next .. Using a queue for what gets scored next Randomized scoring seems sub-optimal. The problem is that we can't get the desired number of queries scored and can end up with some queries scored many more times than others. By using a queue we have much more control over how many times each query gets scored. Gives queue items a priority such that we will score everything once, then everything a second time, until the queue is empty. Change-Id: I84f70674100b7a1cf37c8db7051298c523241a52 --- M app.php M schema.mysql.sql A src/RelevanceScoring/Console/UpdateScoringQueue.php M src/RelevanceScoring/Controller/QueriesController.php M src/RelevanceScoring/Import/Importer.php M src/RelevanceScoring/RelevanceScoringProvider.php M src/RelevanceScoring/Repository/QueriesRepository.php M src/RelevanceScoring/Repository/ScoresRepository.php A src/RelevanceScoring/Repository/ScoringQueueRepository.php A src/RelevanceScoring/Util/Calendar.php M tests/unit/RelevanceScoring/Import/HtmlResultGetterTest.php M tests/unit/RelevanceScoring/Repository/BaseRepositoryTest.php M tests/unit/RelevanceScoring/Repository/ResultsRepositoryTest.php M tests/unit/RelevanceScoring/Repository/ScoresRepositoryTest.php A tests/unit/RelevanceScoring/Repository/ScoringQueueRepositoryTest.php M views/instructions.twig M views/layout.twig 17 files changed, 873 insertions(+), 35 deletions(-) Approvals: EBernhardson: Verified; Looks good to me, approved diff --git a/app.php b/app.php index dc50c5c..97b3290 100644 --- a/app.php +++ b/app.php @@ -70,6 +70,7 @@ 'search.wikis' => [ 'enwiki' => 'https://en.wikipedia.org/w/api.php', ], +'search.scores_per_query' => 5, ]); $app->mount('/', $relevanceScoringProvider); @@ -141,11 +142,15 @@ }); $app->get('/', function () use ($app) { -return $app->redirect($app->path('random_query')); +return $app->redirect($app->path('next_query')); }) ->bind('root'); $app->get('/login', function () use ($app) { +if ($app['session']->has('user')) { +return $app->redirect($app->path('next_query')); +} + return $app['twig']->render('splash.twig', [ 'domain' => parse_url($app['oauth.base_url'], PHP_URL_HOST), ]); diff --git a/schema.mysql.sql b/schema.mysql.sql index 4b49596..826d56f 100644 --- a/schema.mysql.sql +++ b/schema.mysql.sql @@ -61,3 +61,14 @@ FOREIGN KEY `queries_skipped_query_id` (query_id) REFERENCES queries(id), UNIQUE KEY `queries_skipped_user_query` (`user_id`, `query_id`) ) CHARSET=utf8mb4; +CREATE TABLE IF NOT EXISTS `scoring_queue` ( +id INTEGER UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, +user_id INTEGER UNSIGNED, +query_id INTEGER UNSIGNED NOT NULL, +priority INTEGER UNSIGNED NOT NULL, +last_assigned INTEGER UNSIGNED, +FOREIGN KEY `queries_skipped_user_id` (user_id) REFERENCES users(id), +FOREIGN KEY `queries_skipped_query_id` (query_id) REFERENCES queries(id), +KEY `last_assigned_sort_key` (`last_assigned`, `query_id`), +KEY `scoring_queue_priority` (`priority`, `query_id`) +) CHARSET=utf8mb4; diff --git a/src/RelevanceScoring/Console/UpdateScoringQueue.php b/src/RelevanceScoring/Console/UpdateScoringQueue.php new file mode 100644 index 000..2e60e09 --- /dev/null +++ b/src/RelevanceScoring/Console/UpdateScoringQueue.php @@ -0,0 +1,122 @@ +queriesRepo = $queriesRepo; +$this->scoringQueueRepo = $scoringQueueRepo; +$this->scoresRepo = $scoresRepo; +} + +protected function configure() +{ +$this->setDescription('Manage the scoring queue'); +$this->addOption( +'num', +null, +InputOption::VALUE_OPTIONAL, +'Total number of scores desired' +); +$this->addArgument( +'wiki', +InputArgument::OPTIONAL, +'Only update the specified wiki' +); +$this->addArgument( +'query', +InputArgument::OPTIONAL, +'Only update the specified query. Wiki must be provided.' +); +} + +protected function execute(InputInterface $input, OutputInterface $output) +{ +$num = $input->getOption('num') ?: $this->scoringQueueRepo->getDefaultNumSlots(); +$wiki = $input->getArgument('wiki'); +$query = $input->getArgument('query'); + +$queryIds = $this->getQueryIds($output, $wiki, $query); +if ($queryIds === null) { +return 1; +} + +$count = 0; +$scores = $this->scoresRepo->getNumberOfScores($queryIds); +$pending = $this->scoringQueueRepo->getNumberPending($queryIds); +foreach ($queryIds as $queryId) { +$needed = $num; +if (isset($scores[$queryId])) { +$needed -= $scores[$queryId]; +
[MediaWiki-commits] [Gerrit] Make snippet open/close hit box larger - change (wikimedia...discernatron)
EBernhardson has submitted this change and it was merged. Change subject: Make snippet open/close hit box larger .. Make snippet open/close hit box larger Bug: T135660 Change-Id: I73b28b78d430b22c81a6a5cc624c40838d547e9a --- M public/css/scoring.css 1 file changed, 6 insertions(+), 0 deletions(-) Approvals: EBernhardson: Verified; Looks good to me, approved diff --git a/public/css/scoring.css b/public/css/scoring.css index 14c95b7..6904501 100644 --- a/public/css/scoring.css +++ b/public/css/scoring.css @@ -24,6 +24,12 @@ .snippet em { font-weight: bold; } +.result h5 { +margin: 0 +} +.result .glyphicon { +margin: 10px +} @media (max-width: 768px) { .border-xs { border: 1px solid black; -- To view, visit https://gerrit.wikimedia.org/r/295014 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I73b28b78d430b22c81a6a5cc624c40838d547e9a Gerrit-PatchSet: 2 Gerrit-Project: wikimedia/discovery/discernatron Gerrit-Branch: master Gerrit-Owner: EBernhardsonGerrit-Reviewer: EBernhardson ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make snippet open/close hit box larger - change (wikimedia...discernatron)
EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/295014 Change subject: Make snippet open/close hit box larger .. Make snippet open/close hit box larger Bug: T135660 Change-Id: I73b28b78d430b22c81a6a5cc624c40838d547e9a --- M public/css/scoring.css 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/discernatron refs/changes/14/295014/1 diff --git a/public/css/scoring.css b/public/css/scoring.css index 14c95b7..6904501 100644 --- a/public/css/scoring.css +++ b/public/css/scoring.css @@ -24,6 +24,12 @@ .snippet em { font-weight: bold; } +.result h5 { +margin: 0 +} +.result .glyphicon { +margin: 10px +} @media (max-width: 768px) { .border-xs { border: 1px solid black; -- To view, visit https://gerrit.wikimedia.org/r/295014 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I73b28b78d430b22c81a6a5cc624c40838d547e9a Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/discovery/discernatron Gerrit-Branch: master Gerrit-Owner: EBernhardson___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Query examples preview formatting - change (wikidata...gui)
jenkins-bot has submitted this change and it was merged. Change subject: Query examples preview formatting .. Query examples preview formatting Bug: T137589 Change-Id: I3d73370d22ddc055949e4f264c33725a06fde281 --- M wikibase/queryService/ui/QueryExampleDialog.js 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Smalyshev: Looks good to me, approved jenkins-bot: Verified diff --git a/wikibase/queryService/ui/QueryExampleDialog.js b/wikibase/queryService/ui/QueryExampleDialog.js index 8f38cc4..b280183 100644 --- a/wikibase/queryService/ui/QueryExampleDialog.js +++ b/wikibase/queryService/ui/QueryExampleDialog.js @@ -222,7 +222,7 @@ trigger: 'hover', container: 'body', title: 'Preview', - content: $( '' ).text( query ), + content: $( '' ).text( query ), html: true } ); -- To view, visit https://gerrit.wikimedia.org/r/294898 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3d73370d22ddc055949e4f264c33725a06fde281 Gerrit-PatchSet: 1 Gerrit-Project: wikidata/query/gui Gerrit-Branch: master Gerrit-Owner: Jonas Kress (WMDE)Gerrit-Reviewer: Smalyshev 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 wikibase descriptions for beta, even if disabled for ... - change (mediawiki...MobileFrontend)
Jhobs has uploaded a new change for review. https://gerrit.wikimedia.org/r/295012 Change subject: Enable wikibase descriptions for beta, even if disabled for production .. Enable wikibase descriptions for beta, even if disabled for production * To be removed upon enabling in production * Also fix a minor hygiene problem Bug: T127250 Change-Id: Ic6324788c6e04eeb9b65d63eff042d7755f759d9 --- M includes/MobileFrontend.hooks.php M includes/skins/SkinMinerva.php 2 files changed, 4 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/12/295012/1 diff --git a/includes/MobileFrontend.hooks.php b/includes/MobileFrontend.hooks.php index 9c1b09c..8883d52 100644 --- a/includes/MobileFrontend.hooks.php +++ b/includes/MobileFrontend.hooks.php @@ -1266,7 +1266,8 @@ $outputPage->enableTOC( false ); $outputPage->setProperty( 'MFTOC', $po->getTOCHTML() !== '' ); - if ( $mfUseWikibaseDescription ) { + // FIXME: Remove beta check once enabled in production + if ( $mfUseWikibaseDescription || $context->isBetaGroupMember() ) { $item = $po->getProperty( 'wikibase_item' ); if ( $item ) { $desc = ExtMobileFrontend::getWikibaseDescription( $item ); diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php index 1e2e044..3c6ed58 100644 --- a/includes/skins/SkinMinerva.php +++ b/includes/skins/SkinMinerva.php @@ -957,8 +957,8 @@ $vars = [ 'wgMinervaMenuData' => $this->getMenuData(), // Expose for skins.minerva.tablet.scripts - 'wgMinervaTocEnabled' => $this->getOutput()->getProperty( 'MFTOC' ), - 'wgMFDescription' => $this->getOutput()->getProperty( 'wgMFDescription' ), + 'wgMinervaTocEnabled' => $out->getProperty( 'MFTOC' ), + 'wgMFDescription' => $out->getProperty( 'wgMFDescription' ), ]; if ( $this->isAuthenticatedUser() ) { -- To view, visit https://gerrit.wikimedia.org/r/295012 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic6324788c6e04eeb9b65d63eff042d7755f759d9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Jhobs___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Only mirror refs/heads/ and refs/tags/ for mw core and opera... - change (operations/puppet)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/295011 Change subject: Only mirror refs/heads/ and refs/tags/ for mw core and operations/puppet .. Only mirror refs/heads/ and refs/tags/ for mw core and operations/puppet These repos are too big to mirror refs/changes let's just mirror refs/heads/ and refs/tags/. Change-Id: I5d5764780f45ef7aace9d8cd54c334e827029253 --- M modules/phabricator/templates/system.gitconfig.erb 1 file changed, 11 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/11/295011/1 diff --git a/modules/phabricator/templates/system.gitconfig.erb b/modules/phabricator/templates/system.gitconfig.erb index c49e0ac..64c4ade 100644 --- a/modules/phabricator/templates/system.gitconfig.erb +++ b/modules/phabricator/templates/system.gitconfig.erb @@ -2,6 +2,17 @@ fetch = +refs/changes/*:refs/changes/* fetch = +refs/meta/*:refs/meta/* +[remote "https://github.com/wikimedia/mediawiki;] +url = https://github.com/wikimedia/mediawiki +push = +refs/heads/*:refs/heads/* +push = +refs/tags/*:refs/tags/* +threads = 3 + +[remote "https://github.com/wikimedia/operations-puppet.git;] +url = https://github.com/wikimedia/operations-puppet.git +push = +refs/heads/*:refs/heads/* +push = +refs/tags/*:refs/tags/* +threads = 3 [http "https://github.com;] proxy = <%= @proxy %> -- To view, visit https://gerrit.wikimedia.org/r/295011 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5d5764780f45ef7aace9d8cd54c334e827029253 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Paladox___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Set the http connect timeout to 10s while testing - change (mediawiki...parsoid)
Arlolra has uploaded a new change for review. https://gerrit.wikimedia.org/r/295010 Change subject: Set the http connect timeout to 10s while testing .. Set the http connect timeout to 10s while testing Change-Id: I212364070a58c72ae6fd35fb78b506cc58e8b3ff --- M bin/parserTests.js M lib/config/ParsoidConfig.js M lib/mw/ApiRequest.js M tests/mocha/api.js M tests/mocha/apitest.localsettings.js M tests/mocha/templatedata.js M tests/mockAPI.js 7 files changed, 29 insertions(+), 15 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid refs/changes/10/295010/1 diff --git a/bin/parserTests.js b/bin/parserTests.js index 788942c..970d074 100755 --- a/bin/parserTests.js +++ b/bin/parserTests.js @@ -1696,6 +1696,8 @@ parsoidConfig.loggerSampling = [ [/^warning(\/|$)/, 100], ]; + + parsoidConfig.timeouts.mwApi.connect = 1; }; var parsoidConfig = new ParsoidConfig({ setup: setup }, options); diff --git a/lib/config/ParsoidConfig.js b/lib/config/ParsoidConfig.js index 4cce7fb..82db32a 100644 --- a/lib/config/ParsoidConfig.js +++ b/lib/config/ParsoidConfig.js @@ -49,8 +49,13 @@ imgInfo: 40 * 1000, // action=query=siteinfo configInfo: 40 * 1000, + // Connection timeout setting for the http agent + connect: 5 * 1000, }, }, + + // Max concurrency level for accessing the Mediawiki API + maxSockets: 15, retries: { mwApi: { @@ -109,6 +114,7 @@ this.timeouts = Util.clone(CONFIG_DEFAULTS.timeouts); this.retries = Util.clone(CONFIG_DEFAULTS.retries); this.limits = Util.clone(CONFIG_DEFAULTS.limits); + this.maxSockets = Util.clone(CONFIG_DEFAULTS.maxSockets); this._uniq = 0; if (localSettings && localSettings.setup) { diff --git a/lib/mw/ApiRequest.js b/lib/mw/ApiRequest.js index 1e1a7b7..3faf2de 100644 --- a/lib/mw/ApiRequest.js +++ b/lib/mw/ApiRequest.js @@ -9,14 +9,8 @@ var Promise = require('../utils/promise.js'); -// Max concurrency level for accessing the Mediawiki API -var HTTP_MAX_SOCKETS = 15; -// Connection timeout setting for the http agent -var HTTP_CONNECT_TIMEOUT = 5 * 1000; // 5 seconds - - -function setupConnectionTimeout(protocol) { +function setupConnectionTimeout(env, protocol) { var http = require(protocol); var Agent = http.Agent; @@ -73,14 +67,11 @@ } }; - http.globalAgent = new ConnectTimeoutAgent({ - connectTimeout: HTTP_CONNECT_TIMEOUT, - maxSockets: HTTP_MAX_SOCKETS, + return new ConnectTimeoutAgent({ + connectTimeout: env.conf.parsoid.timeouts.mwApi.connect, + maxSockets: env.conf.parsoid.maxSockets, }); } -setupConnectionTimeout('http'); -setupConnectionTimeout('https'); - var latestSerial = 0; @@ -287,12 +278,22 @@ // Inherit from EventEmitter util.inherits(ApiRequest, events.EventEmitter); +var httpAgent = null; +var httpsAgent = null; + ApiRequest.prototype.request = function(options, callback) { var env = this.env; var proxy = this.proxy; + // this is a good place to put debugging statements // if you want to watch network requests. // console.log('ApiRequest', options); + + if (httpAgent === null) { + httpAgent = setupConnectionTimeout(env, 'http'); + httpsAgent = setupConnectionTimeout(env, 'https'); + } + options.agent = /^https[:]/.test(options.uri) ? httpsAgent : httpAgent; // Forward the request id if (!options.headers) { options.headers = {}; } @@ -307,12 +308,13 @@ // Proxy options should only be applied to MW API endpoints. // Allow subclasses to manually set proxy to `null` or to a different // proxy to override MW API proxy. - if (proxy && options.proxy === undefined) { + if (proxy && proxy.uri && options.proxy === undefined) { options.proxy = proxy.uri; + options.agent = /^https[:]/.test(proxy.uri) ? httpsAgent : httpAgent; if (proxy.headers) { Object.assign(options.headers, proxy.headers); } - if (proxy.strip_https && options.proxy && /^https[:]/.test(options.uri)) { + if (proxy.strip_https && /^https[:]/.test(options.uri)) { // When proxying, strip TLS and lie to the appserver to indicate // unwrapping has just occurred. The appserver isn't listening on // port 443 but a site setting may require a secure connection, diff --git a/tests/mocha/api.js b/tests/mocha/api.js index 461aecd..742edd3 100644 ---
[MediaWiki-commits] [Gerrit] 0.2.3-SNAPSHOT next - change (wikidata...rdf)
jenkins-bot has submitted this change and it was merged. Change subject: 0.2.3-SNAPSHOT next .. 0.2.3-SNAPSHOT next Change-Id: I12e16f728af9e139efc118f2fdff34f9519ae8c4 --- M blazegraph/pom.xml M common/pom.xml M dist/pom.xml M pom.xml M testTools/pom.xml M tools/pom.xml M war/pom.xml 7 files changed, 7 insertions(+), 7 deletions(-) Approvals: Smalyshev: Looks good to me, approved jenkins-bot: Verified diff --git a/blazegraph/pom.xml b/blazegraph/pom.xml index d486f1e..1ea5436 100644 --- a/blazegraph/pom.xml +++ b/blazegraph/pom.xml @@ -4,7 +4,7 @@ org.wikidata.query.rdf parent -0.2.2 +0.2.3-SNAPSHOT blazegraph jar diff --git a/common/pom.xml b/common/pom.xml index 08bd203..fdf79d6 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -4,7 +4,7 @@ org.wikidata.query.rdf parent -0.2.2 +0.2.3-SNAPSHOT common jar diff --git a/dist/pom.xml b/dist/pom.xml index 1c5d763..5e06b63 100644 --- a/dist/pom.xml +++ b/dist/pom.xml @@ -4,7 +4,7 @@ org.wikidata.query.rdf parent -0.2.2 +0.2.3-SNAPSHOT service pom diff --git a/pom.xml b/pom.xml index 7d4715a..dca00c6 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ org.wikidata.query.rdf parent - 0.2.2 + 0.2.3-SNAPSHOT pom diff --git a/testTools/pom.xml b/testTools/pom.xml index 4ea690e..28f096c 100644 --- a/testTools/pom.xml +++ b/testTools/pom.xml @@ -4,7 +4,7 @@ org.wikidata.query.rdf parent -0.2.2 +0.2.3-SNAPSHOT testTools jar diff --git a/tools/pom.xml b/tools/pom.xml index 194cd5c..3d486a1 100644 --- a/tools/pom.xml +++ b/tools/pom.xml @@ -4,7 +4,7 @@ org.wikidata.query.rdf parent -0.2.2 +0.2.3-SNAPSHOT tools jar diff --git a/war/pom.xml b/war/pom.xml index 6cd93b0..098b8f9 100644 --- a/war/pom.xml +++ b/war/pom.xml @@ -4,7 +4,7 @@ org.wikidata.query.rdf parent -0.2.2 +0.2.3-SNAPSHOT blazegraph-service pom -- To view, visit https://gerrit.wikimedia.org/r/295009 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I12e16f728af9e139efc118f2fdff34f9519ae8c4 Gerrit-PatchSet: 1 Gerrit-Project: wikidata/query/rdf Gerrit-Branch: master Gerrit-Owner: SmalyshevGerrit-Reviewer: Smalyshev Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] 0.2.3-SNAPSHOT next - change (wikidata...rdf)
Smalyshev has uploaded a new change for review. https://gerrit.wikimedia.org/r/295009 Change subject: 0.2.3-SNAPSHOT next .. 0.2.3-SNAPSHOT next Change-Id: I12e16f728af9e139efc118f2fdff34f9519ae8c4 --- M blazegraph/pom.xml M common/pom.xml M dist/pom.xml M pom.xml M testTools/pom.xml M tools/pom.xml M war/pom.xml 7 files changed, 7 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/rdf refs/changes/09/295009/1 diff --git a/blazegraph/pom.xml b/blazegraph/pom.xml index d486f1e..1ea5436 100644 --- a/blazegraph/pom.xml +++ b/blazegraph/pom.xml @@ -4,7 +4,7 @@ org.wikidata.query.rdf parent -0.2.2 +0.2.3-SNAPSHOT blazegraph jar diff --git a/common/pom.xml b/common/pom.xml index 08bd203..fdf79d6 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -4,7 +4,7 @@ org.wikidata.query.rdf parent -0.2.2 +0.2.3-SNAPSHOT common jar diff --git a/dist/pom.xml b/dist/pom.xml index 1c5d763..5e06b63 100644 --- a/dist/pom.xml +++ b/dist/pom.xml @@ -4,7 +4,7 @@ org.wikidata.query.rdf parent -0.2.2 +0.2.3-SNAPSHOT service pom diff --git a/pom.xml b/pom.xml index 7d4715a..dca00c6 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ org.wikidata.query.rdf parent - 0.2.2 + 0.2.3-SNAPSHOT pom diff --git a/testTools/pom.xml b/testTools/pom.xml index 4ea690e..28f096c 100644 --- a/testTools/pom.xml +++ b/testTools/pom.xml @@ -4,7 +4,7 @@ org.wikidata.query.rdf parent -0.2.2 +0.2.3-SNAPSHOT testTools jar diff --git a/tools/pom.xml b/tools/pom.xml index 194cd5c..3d486a1 100644 --- a/tools/pom.xml +++ b/tools/pom.xml @@ -4,7 +4,7 @@ org.wikidata.query.rdf parent -0.2.2 +0.2.3-SNAPSHOT tools jar diff --git a/war/pom.xml b/war/pom.xml index 6cd93b0..098b8f9 100644 --- a/war/pom.xml +++ b/war/pom.xml @@ -4,7 +4,7 @@ org.wikidata.query.rdf parent -0.2.2 +0.2.3-SNAPSHOT blazegraph-service pom -- To view, visit https://gerrit.wikimedia.org/r/295009 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I12e16f728af9e139efc118f2fdff34f9519ae8c4 Gerrit-PatchSet: 1 Gerrit-Project: wikidata/query/rdf Gerrit-Branch: master Gerrit-Owner: Smalyshev___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update tilerator to 4a0c515 - change (maps...deploy)
Yurik has uploaded a new change for review. https://gerrit.wikimedia.org/r/295008 Change subject: Update tilerator to 4a0c515 .. Update tilerator to 4a0c515 List of changes: 8c0eb61 Process all files since last call 4a0c515 Validate stateful upload params xxx Update node module dependencies Change-Id: I691058948831310264e0ea79e5d1b60c6aa066fd --- R node_modules/accepts/LICENSE R node_modules/accepts/index.js R node_modules/accepts/node_modules/negotiator/LICENSE R node_modules/accepts/node_modules/negotiator/index.js R node_modules/accepts/node_modules/negotiator/lib/charset.js R node_modules/accepts/node_modules/negotiator/lib/encoding.js R node_modules/accepts/node_modules/negotiator/lib/language.js R node_modules/accepts/node_modules/negotiator/lib/mediaType.js R node_modules/accepts/node_modules/negotiator/package.json R node_modules/accepts/package.json M node_modules/bluebird/js/browser/bluebird.core.js M node_modules/bluebird/js/browser/bluebird.core.min.js M node_modules/bluebird/js/browser/bluebird.js M node_modules/bluebird/js/browser/bluebird.min.js M node_modules/bluebird/js/release/promise.js M node_modules/bluebird/package.json M node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/package.json M node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/minimatch.js D node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.npmignore D node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/example.js M node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json M node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/package.json M node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/once/package.json M node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/package.json D node_modules/compression/node_modules/accepts/LICENSE D node_modules/compression/node_modules/accepts/index.js D node_modules/compression/node_modules/accepts/node_modules/mime-types/LICENSE D node_modules/compression/node_modules/accepts/node_modules/mime-types/index.js D node_modules/compression/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/db.json D node_modules/compression/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/index.js D node_modules/compression/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/package.json D node_modules/compression/node_modules/accepts/node_modules/mime-types/package.json D node_modules/compression/node_modules/accepts/node_modules/negotiator/LICENSE M node_modules/express/lib/middleware/query.js M node_modules/express/lib/request.js M node_modules/express/lib/response.js M node_modules/express/lib/router/index.js M node_modules/express/lib/utils.js D node_modules/express/node_modules/accepts/node_modules/mime-types/LICENSE D node_modules/express/node_modules/accepts/node_modules/mime-types/index.js D node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/LICENSE D node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/db.json D node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/index.js D node_modules/express/node_modules/accepts/node_modules/mime-types/node_modules/mime-db/package.json D node_modules/express/node_modules/accepts/node_modules/negotiator/index.js D node_modules/express/node_modules/accepts/node_modules/negotiator/lib/charset.js D node_modules/express/node_modules/accepts/node_modules/negotiator/lib/encoding.js D node_modules/express/node_modules/accepts/node_modules/negotiator/lib/language.js D node_modules/express/node_modules/accepts/node_modules/negotiator/lib/mediaType.js D node_modules/express/node_modules/accepts/node_modules/negotiator/package.json D node_modules/express/node_modules/accepts/package.json M node_modules/express/node_modules/cookie/LICENSE M node_modules/express/node_modules/cookie/index.js M node_modules/express/node_modules/cookie/package.json R node_modules/express/node_modules/encodeurl/LICENSE A node_modules/express/node_modules/encodeurl/index.js A node_modules/express/node_modules/encodeurl/package.json M node_modules/express/node_modules/finalhandler/index.js M node_modules/express/node_modules/finalhandler/package.json M node_modules/express/node_modules/proxy-addr/LICENSE M node_modules/express/node_modules/proxy-addr/index.js M node_modules/express/node_modules/proxy-addr/node_modules/ipaddr.js/bower.json M
[MediaWiki-commits] [Gerrit] cache_upload: experiment with 4h fe ttl cap - change (operations/puppet)
BBlack has submitted this change and it was merged. Change subject: cache_upload: experiment with 4h fe ttl cap .. cache_upload: experiment with 4h fe ttl cap upload has traditionally capped the frontend at 1h. Other caches were historically much higher and have been slowly brought down to 1d. Experimenting with how much of a limitation 1h really is on fe hitrate (the limit may be set-size more than time). Bug: T124954 Bug: T135384 Change-Id: I24dfc6dcddfc5dbf4d324272322c47a88a0ced01 --- M modules/role/manifests/cache/upload.pp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: BBlack: Verified; Looks good to me, approved diff --git a/modules/role/manifests/cache/upload.pp b/modules/role/manifests/cache/upload.pp index 918d38a..e5acf4b 100644 --- a/modules/role/manifests/cache/upload.pp +++ b/modules/role/manifests/cache/upload.pp @@ -75,7 +75,7 @@ }) $fe_vcl_config = merge($common_vcl_config, { -'ttl_cap' => '1h', +'ttl_cap' => '4h', 'pass_random' => false, }) -- To view, visit https://gerrit.wikimedia.org/r/295007 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I24dfc6dcddfc5dbf4d324272322c47a88a0ced01 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlackGerrit-Reviewer: BBlack ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] cache_upload: experiment with 4h fe ttl cap - change (operations/puppet)
BBlack has uploaded a new change for review. https://gerrit.wikimedia.org/r/295007 Change subject: cache_upload: experiment with 4h fe ttl cap .. cache_upload: experiment with 4h fe ttl cap upload has traditionally capped the frontend at 1h. Other caches were historically much higher and have been slowly brought down to 1d. Experimenting with how much of a limitation 1h really is on fe hitrate (the limit may be set-size more than time). Bug: T124954 Bug: T135384 Change-Id: I24dfc6dcddfc5dbf4d324272322c47a88a0ced01 --- M modules/role/manifests/cache/upload.pp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/07/295007/1 diff --git a/modules/role/manifests/cache/upload.pp b/modules/role/manifests/cache/upload.pp index 918d38a..e5acf4b 100644 --- a/modules/role/manifests/cache/upload.pp +++ b/modules/role/manifests/cache/upload.pp @@ -75,7 +75,7 @@ }) $fe_vcl_config = merge($common_vcl_config, { -'ttl_cap' => '1h', +'ttl_cap' => '4h', 'pass_random' => false, }) -- To view, visit https://gerrit.wikimedia.org/r/295007 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I24dfc6dcddfc5dbf4d324272322c47a88a0ced01 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlack___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] tlsproxy: drop ssl cache size back to 1G - change (operations/puppet)
BBlack has submitted this change and it was merged. Change subject: tlsproxy: drop ssl cache size back to 1G .. tlsproxy: drop ssl cache size back to 1G We've had a good long run on the 4G setting for comparison, now dropping back to a more-reasonable value (while leaving expiry at 25h) as the next experiment. We needed to reset the caches again soon due to FS fears anyways. Change-Id: I0470f9adccc591b9b0396c2d57798239d2b4a155 --- M modules/tlsproxy/templates/nginx.conf.erb 1 file changed, 3 insertions(+), 7 deletions(-) Approvals: BBlack: Verified; Looks good to me, approved diff --git a/modules/tlsproxy/templates/nginx.conf.erb b/modules/tlsproxy/templates/nginx.conf.erb index 3c5a8b1..7f5fd6d 100644 --- a/modules/tlsproxy/templates/nginx.conf.erb +++ b/modules/tlsproxy/templates/nginx.conf.erb @@ -70,16 +70,12 @@ gzip off; gzip_disable "MSIE [1-6]\.(?!.*SV1)"; -# Enable a shared cache, since it is defined at this level -# it will be used for all virtual hosts. 1m = 4000 active sessions, -# so we are allowing 800,000 active sessions. Any fixed value here is -# probably less than ideal, as we'll want to vary it based on cluster -# traffic levels and pybal node weightings, but for now we're just -# experimenting with the fixed value to get ballpark ideas. +# SSL sessionid caching. 1m is ~4000 sessions. +# Still experimenting! <% if realm == 'labs' then -%> ssl_session_cache shared:SSL:32m; <% else -%> -ssl_session_cache shared:SSL:4096m; +ssl_session_cache shared:SSL:1024m; <% end -%> ssl_session_timeout 25h; -- To view, visit https://gerrit.wikimedia.org/r/295006 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0470f9adccc591b9b0396c2d57798239d2b4a155 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlackGerrit-Reviewer: BBlack ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] tlsproxy: drop ssl cache size back to 1G - change (operations/puppet)
BBlack has uploaded a new change for review. https://gerrit.wikimedia.org/r/295006 Change subject: tlsproxy: drop ssl cache size back to 1G .. tlsproxy: drop ssl cache size back to 1G We've had a good long run on the 4G setting for comparison, now dropping back to a more-reasonable value (while leaving expiry at 25h) as the next experiment. We needed to reset the caches again soon due to FS fears anyways. Change-Id: I0470f9adccc591b9b0396c2d57798239d2b4a155 --- M modules/tlsproxy/templates/nginx.conf.erb 1 file changed, 3 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/06/295006/1 diff --git a/modules/tlsproxy/templates/nginx.conf.erb b/modules/tlsproxy/templates/nginx.conf.erb index 3c5a8b1..7f5fd6d 100644 --- a/modules/tlsproxy/templates/nginx.conf.erb +++ b/modules/tlsproxy/templates/nginx.conf.erb @@ -70,16 +70,12 @@ gzip off; gzip_disable "MSIE [1-6]\.(?!.*SV1)"; -# Enable a shared cache, since it is defined at this level -# it will be used for all virtual hosts. 1m = 4000 active sessions, -# so we are allowing 800,000 active sessions. Any fixed value here is -# probably less than ideal, as we'll want to vary it based on cluster -# traffic levels and pybal node weightings, but for now we're just -# experimenting with the fixed value to get ballpark ideas. +# SSL sessionid caching. 1m is ~4000 sessions. +# Still experimenting! <% if realm == 'labs' then -%> ssl_session_cache shared:SSL:32m; <% else -%> -ssl_session_cache shared:SSL:4096m; +ssl_session_cache shared:SSL:1024m; <% end -%> ssl_session_timeout 25h; -- To view, visit https://gerrit.wikimedia.org/r/295006 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0470f9adccc591b9b0396c2d57798239d2b4a155 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlack___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] 0.2.2 - change (wikidata...rdf)
jenkins-bot has submitted this change and it was merged. Change subject: 0.2.2 .. 0.2.2 Change-Id: I9aac14930dd4ca3a20c7f07f7968a5171eb9969c --- M blazegraph/pom.xml M common/pom.xml M dist/pom.xml M docs/ChangeLog M pom.xml M testTools/pom.xml M tools/pom.xml M war/pom.xml 8 files changed, 8 insertions(+), 7 deletions(-) Approvals: Smalyshev: Looks good to me, approved jenkins-bot: Verified diff --git a/blazegraph/pom.xml b/blazegraph/pom.xml index 0c18a50..d486f1e 100644 --- a/blazegraph/pom.xml +++ b/blazegraph/pom.xml @@ -4,7 +4,7 @@ org.wikidata.query.rdf parent -0.2.2-SNAPSHOT +0.2.2 blazegraph jar diff --git a/common/pom.xml b/common/pom.xml index ac5dd1f..08bd203 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -4,7 +4,7 @@ org.wikidata.query.rdf parent -0.2.2-SNAPSHOT +0.2.2 common jar diff --git a/dist/pom.xml b/dist/pom.xml index 0f6232e..1c5d763 100644 --- a/dist/pom.xml +++ b/dist/pom.xml @@ -4,7 +4,7 @@ org.wikidata.query.rdf parent -0.2.2-SNAPSHOT +0.2.2 service pom diff --git a/docs/ChangeLog b/docs/ChangeLog index d8069b8..5415b0e 100644 --- a/docs/ChangeLog +++ b/docs/ChangeLog @@ -5,6 +5,7 @@ Bugfixes for Blazegraph deadlock bug. Start Jolokia together with Updater. GUI improvements. +Blazegraph 2.1.1 0.2.1 - diff --git a/pom.xml b/pom.xml index 5f4053e..7d4715a 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ org.wikidata.query.rdf parent - 0.2.2-SNAPSHOT + 0.2.2 pom diff --git a/testTools/pom.xml b/testTools/pom.xml index 46381c3..4ea690e 100644 --- a/testTools/pom.xml +++ b/testTools/pom.xml @@ -4,7 +4,7 @@ org.wikidata.query.rdf parent -0.2.2-SNAPSHOT +0.2.2 testTools jar diff --git a/tools/pom.xml b/tools/pom.xml index 975e16e..194cd5c 100644 --- a/tools/pom.xml +++ b/tools/pom.xml @@ -4,7 +4,7 @@ org.wikidata.query.rdf parent -0.2.2-SNAPSHOT +0.2.2 tools jar diff --git a/war/pom.xml b/war/pom.xml index d798b4f..6cd93b0 100644 --- a/war/pom.xml +++ b/war/pom.xml @@ -4,7 +4,7 @@ org.wikidata.query.rdf parent -0.2.2-SNAPSHOT +0.2.2 blazegraph-service pom -- To view, visit https://gerrit.wikimedia.org/r/294942 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9aac14930dd4ca3a20c7f07f7968a5171eb9969c Gerrit-PatchSet: 2 Gerrit-Project: wikidata/query/rdf Gerrit-Branch: master Gerrit-Owner: SmalyshevGerrit-Reviewer: Smalyshev Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 7810dd7..3f9c96d - change (mediawiki/extensions)
Jenkins-mwext-sync has submitted this change and it was merged. Change subject: Syncronize VisualEditor: 7810dd7..3f9c96d .. Syncronize VisualEditor: 7810dd7..3f9c96d Change-Id: I3f5de3728adb0bb3c6b419bcfea865a04727d7e8 --- M VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Jenkins-mwext-sync: Verified; Looks good to me, approved diff --git a/VisualEditor b/VisualEditor index 7810dd7..3f9c96d 16 --- a/VisualEditor +++ b/VisualEditor -Subproject commit 7810dd74a164afaaf5af5de38ce6bef8caa3f987 +Subproject commit 3f9c96d891a5369dfd2630941790bb0e0bae4ce3 -- To view, visit https://gerrit.wikimedia.org/r/295004 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3f5de3728adb0bb3c6b419bcfea865a04727d7e8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions Gerrit-Branch: master Gerrit-Owner: Jenkins-mwext-syncGerrit-Reviewer: Jenkins-mwext-sync ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 7810dd7..3f9c96d - change (mediawiki/extensions)
Jenkins-mwext-sync has uploaded a new change for review. https://gerrit.wikimedia.org/r/295004 Change subject: Syncronize VisualEditor: 7810dd7..3f9c96d .. Syncronize VisualEditor: 7810dd7..3f9c96d Change-Id: I3f5de3728adb0bb3c6b419bcfea865a04727d7e8 --- M VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions refs/changes/04/295004/1 diff --git a/VisualEditor b/VisualEditor index 7810dd7..3f9c96d 16 --- a/VisualEditor +++ b/VisualEditor -Subproject commit 7810dd74a164afaaf5af5de38ce6bef8caa3f987 +Subproject commit 3f9c96d891a5369dfd2630941790bb0e0bae4ce3 -- To view, visit https://gerrit.wikimedia.org/r/295004 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3f5de3728adb0bb3c6b419bcfea865a04727d7e8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions Gerrit-Branch: master Gerrit-Owner: Jenkins-mwext-sync___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Switch to 2.1.1 - change (wikidata...rdf)
jenkins-bot has submitted this change and it was merged. Change subject: Switch to 2.1.1 .. Switch to 2.1.1 Change-Id: Id44a625b97f53b6dee2a8339a02e51d9c8316794 --- M gui M pom.xml M tools/src/main/java/org/wikidata/query/rdf/tool/wikibase/WikibaseRepository.java M tools/src/test/java/org/wikidata/query/rdf/tool/wikibase/WikibaseRepositoryIntegrationTest.java 4 files changed, 4 insertions(+), 2 deletions(-) Approvals: Smalyshev: Looks good to me, approved jenkins-bot: Verified diff --git a/gui b/gui index 49141bf..424d8bf 16 --- a/gui +++ b/gui -Subproject commit 49141bf0bff041d7f258b5a79cd1c94d3dd7c414 +Subproject commit 424d8bf3e3fb6ed9865623ed91f42d94c0050568 diff --git a/pom.xml b/pom.xml index b9a2ef5..5f4053e 100644 --- a/pom.xml +++ b/pom.xml @@ -57,7 +57,7 @@ UTF-8 -2.1.1-SNAPSHOT +2.1.1 2.8.1 9.2.9.v20150224 diff --git a/tools/src/main/java/org/wikidata/query/rdf/tool/wikibase/WikibaseRepository.java b/tools/src/main/java/org/wikidata/query/rdf/tool/wikibase/WikibaseRepository.java index fbcd267..6023fb4 100644 --- a/tools/src/main/java/org/wikidata/query/rdf/tool/wikibase/WikibaseRepository.java +++ b/tools/src/main/java/org/wikidata/query/rdf/tool/wikibase/WikibaseRepository.java @@ -80,7 +80,9 @@ .setMaxConnPerRoute(100).setMaxConnTotal(100) .setRetryHandler(getRetryHandler(RETRIES)) .setServiceUnavailableRetryStrategy(new DefaultServiceUnavailableRetryStrategy(RETRIES, 500)) +.setUserAgent("Wikidata Query Service Updater") .build(); + /** * Builds uris to get stuff from wikibase. */ diff --git a/tools/src/test/java/org/wikidata/query/rdf/tool/wikibase/WikibaseRepositoryIntegrationTest.java b/tools/src/test/java/org/wikidata/query/rdf/tool/wikibase/WikibaseRepositoryIntegrationTest.java index 1ea4212..e92ab74 100644 --- a/tools/src/test/java/org/wikidata/query/rdf/tool/wikibase/WikibaseRepositoryIntegrationTest.java +++ b/tools/src/test/java/org/wikidata/query/rdf/tool/wikibase/WikibaseRepositoryIntegrationTest.java @@ -35,7 +35,7 @@ */ public class WikibaseRepositoryIntegrationTest extends RandomizedTest { private static final String HOST = "test.wikidata.org"; -private final WikibaseRepository repo = new WikibaseRepository("http", HOST); +private final WikibaseRepository repo = new WikibaseRepository("https", HOST); private final WikibaseUris uris = new WikibaseUris(HOST); @Test -- To view, visit https://gerrit.wikimedia.org/r/294938 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id44a625b97f53b6dee2a8339a02e51d9c8316794 Gerrit-PatchSet: 3 Gerrit-Project: wikidata/query/rdf Gerrit-Branch: master Gerrit-Owner: SmalyshevGerrit-Reviewer: Smalyshev Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Set maxKeys on $wgObjectCaches[hash] for sanity - change (mediawiki/core)
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/294959 Change subject: Set maxKeys on $wgObjectCaches[hash] for sanity .. Set maxKeys on $wgObjectCaches[hash] for sanity Change-Id: Ib534f4d0f4492502eb343e204365393731b13449 --- M includes/DefaultSettings.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/59/294959/1 diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index f176556..2004c1e 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -2279,7 +2279,7 @@ 'wincache' => [ 'class' => 'WinCacheBagOStuff', 'reportDupes' => false ], 'memcached-php' => [ 'class' => 'MemcachedPhpBagOStuff', 'loggroup' => 'memcached' ], 'memcached-pecl' => [ 'class' => 'MemcachedPeclBagOStuff', 'loggroup' => 'memcached' ], - 'hash' => [ 'class' => 'HashBagOStuff', 'reportDupes' => false ], + 'hash' => [ 'class' => 'HashBagOStuff', 'reportDupes' => false, 'maxKeys' => 1 ], ]; /** -- To view, visit https://gerrit.wikimedia.org/r/294959 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib534f4d0f4492502eb343e204365393731b13449 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix schema name - change (mediawiki...WikimediaEvents)
MaxSem has uploaded a new change for review. https://gerrit.wikimedia.org/r/294958 Change subject: Fix schema name .. Fix schema name Bug: T138078 Change-Id: Iab089a28d35a3c1a049136d807cdb06435e179a3 (cherry picked from commit 70b5099f939d6bc13b2ec19a6642bab0c3d2a282) --- M modules/ext.wikimediaEvents.geoFeatures.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaEvents refs/changes/58/294958/1 diff --git a/modules/ext.wikimediaEvents.geoFeatures.js b/modules/ext.wikimediaEvents.geoFeatures.js index 5376ca1..7ef11e3 100644 --- a/modules/ext.wikimediaEvents.geoFeatures.js +++ b/modules/ext.wikimediaEvents.geoFeatures.js @@ -59,7 +59,7 @@ * @param {string|undefined} [url] URL to follow once event has been logged */ function doTrack( feature, action, titleCoordinate, url ) { - mw.loader.using( 'schema.geoFeatures' ).then( function () { + mw.loader.using( 'schema.GeoFeatures' ).then( function () { mw.eventLog.logEvent( 'GeoFeatures', { feature: feature, action: action, -- To view, visit https://gerrit.wikimedia.org/r/294958 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iab089a28d35a3c1a049136d807cdb06435e179a3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikimediaEvents Gerrit-Branch: wmf/1.28.0-wmf.6 Gerrit-Owner: MaxSem___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Temporarily ignore advisory before upgrading - change (mediawiki...parsoid)
jenkins-bot has submitted this change and it was merged. Change subject: Temporarily ignore advisory before upgrading .. Temporarily ignore advisory before upgrading * We aren't affected anywayas ... Change-Id: I90ea0140c6e361148e7c3e0f0aac5f5ad4252d37 --- M .nsprc 1 file changed, 3 insertions(+), 1 deletion(-) Approvals: Subramanya Sastry: Looks good to me, approved jenkins-bot: Verified diff --git a/.nsprc b/.nsprc index af066d4..60aa4f8 100644 --- a/.nsprc +++ b/.nsprc @@ -7,6 +7,8 @@ "https://nodesecurity.io/advisories/76;, // Affects request.js > hawk, which should be (and is) an optional // dependency. We don't use it. - "https://nodesecurity.io/advisories/77; + "https://nodesecurity.io/advisories/77;, + // We aren't using `acceptsLanguages`. + "https://nodesecurity.io/advisories/106; ] } -- To view, visit https://gerrit.wikimedia.org/r/294951 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I90ea0140c6e361148e7c3e0f0aac5f5ad4252d37 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/parsoid Gerrit-Branch: master Gerrit-Owner: ArlolraGerrit-Reviewer: Cscott Gerrit-Reviewer: Subramanya Sastry Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix schema name - change (mediawiki...WikimediaEvents)
jenkins-bot has submitted this change and it was merged. Change subject: Fix schema name .. Fix schema name Bug: T138078 Change-Id: Iab089a28d35a3c1a049136d807cdb06435e179a3 (cherry picked from commit 70b5099f939d6bc13b2ec19a6642bab0c3d2a282) --- M modules/ext.wikimediaEvents.geoFeatures.js 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: MaxSem: Looks good to me, approved Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ext.wikimediaEvents.geoFeatures.js b/modules/ext.wikimediaEvents.geoFeatures.js index 5376ca1..7ef11e3 100644 --- a/modules/ext.wikimediaEvents.geoFeatures.js +++ b/modules/ext.wikimediaEvents.geoFeatures.js @@ -59,7 +59,7 @@ * @param {string|undefined} [url] URL to follow once event has been logged */ function doTrack( feature, action, titleCoordinate, url ) { - mw.loader.using( 'schema.geoFeatures' ).then( function () { + mw.loader.using( 'schema.GeoFeatures' ).then( function () { mw.eventLog.logEvent( 'GeoFeatures', { feature: feature, action: action, -- To view, visit https://gerrit.wikimedia.org/r/294958 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iab089a28d35a3c1a049136d807cdb06435e179a3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikimediaEvents Gerrit-Branch: wmf/1.28.0-wmf.6 Gerrit-Owner: MaxSemGerrit-Reviewer: Hashar Gerrit-Reviewer: MaxSem Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix schema name - change (mediawiki...WikimediaEvents)
jenkins-bot has submitted this change and it was merged. Change subject: Fix schema name .. Fix schema name Bug: T138078 Change-Id: Iab089a28d35a3c1a049136d807cdb06435e179a3 --- M modules/ext.wikimediaEvents.geoFeatures.js 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Yurik: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ext.wikimediaEvents.geoFeatures.js b/modules/ext.wikimediaEvents.geoFeatures.js index 5376ca1..7ef11e3 100644 --- a/modules/ext.wikimediaEvents.geoFeatures.js +++ b/modules/ext.wikimediaEvents.geoFeatures.js @@ -59,7 +59,7 @@ * @param {string|undefined} [url] URL to follow once event has been logged */ function doTrack( feature, action, titleCoordinate, url ) { - mw.loader.using( 'schema.geoFeatures' ).then( function () { + mw.loader.using( 'schema.GeoFeatures' ).then( function () { mw.eventLog.logEvent( 'GeoFeatures', { feature: feature, action: action, -- To view, visit https://gerrit.wikimedia.org/r/294950 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iab089a28d35a3c1a049136d807cdb06435e179a3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikimediaEvents Gerrit-Branch: master Gerrit-Owner: MaxSemGerrit-Reviewer: Yurik Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Temporarily ignore advisory before upgrading - change (mediawiki...parsoid)
Arlolra has uploaded a new change for review. https://gerrit.wikimedia.org/r/294951 Change subject: Temporarily ignore advisory before upgrading .. Temporarily ignore advisory before upgrading * We aren't affected anywayas ... Change-Id: I90ea0140c6e361148e7c3e0f0aac5f5ad4252d37 --- M .nsprc 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid refs/changes/51/294951/1 diff --git a/.nsprc b/.nsprc index af066d4..60aa4f8 100644 --- a/.nsprc +++ b/.nsprc @@ -7,6 +7,8 @@ "https://nodesecurity.io/advisories/76;, // Affects request.js > hawk, which should be (and is) an optional // dependency. We don't use it. - "https://nodesecurity.io/advisories/77; + "https://nodesecurity.io/advisories/77;, + // We aren't using `acceptsLanguages`. + "https://nodesecurity.io/advisories/106; ] } -- To view, visit https://gerrit.wikimedia.org/r/294951 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I90ea0140c6e361148e7c3e0f0aac5f5ad4252d37 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] Fix schema name - change (mediawiki...WikimediaEvents)
MaxSem has uploaded a new change for review. https://gerrit.wikimedia.org/r/294950 Change subject: Fix schema name .. Fix schema name Bug: T138078 Change-Id: Iab089a28d35a3c1a049136d807cdb06435e179a3 --- M modules/ext.wikimediaEvents.geoFeatures.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaEvents refs/changes/50/294950/1 diff --git a/modules/ext.wikimediaEvents.geoFeatures.js b/modules/ext.wikimediaEvents.geoFeatures.js index 5376ca1..7ef11e3 100644 --- a/modules/ext.wikimediaEvents.geoFeatures.js +++ b/modules/ext.wikimediaEvents.geoFeatures.js @@ -59,7 +59,7 @@ * @param {string|undefined} [url] URL to follow once event has been logged */ function doTrack( feature, action, titleCoordinate, url ) { - mw.loader.using( 'schema.geoFeatures' ).then( function () { + mw.loader.using( 'schema.GeoFeatures' ).then( function () { mw.eventLog.logEvent( 'GeoFeatures', { feature: feature, action: action, -- To view, visit https://gerrit.wikimedia.org/r/294950 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iab089a28d35a3c1a049136d807cdb06435e179a3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikimediaEvents Gerrit-Branch: master Gerrit-Owner: MaxSem___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Lint files before a jscs bump - change (mediawiki...parsoid)
Arlolra has uploaded a new change for review. https://gerrit.wikimedia.org/r/294948 Change subject: Lint files before a jscs bump .. Lint files before a jscs bump * Indentation in switches * Return outside of functions * Whitespace in jsapi.js Change-Id: I27bda35e6208d057e5e5831db03880639990ebd3 --- M bin/domdiff.test.js M bin/roundtrip-test.js M lib/api/routes.js M lib/html2wt/DOMHandlers.js M lib/html2wt/LinkHandler.js M lib/html2wt/WTSUtils.js M lib/html2wt/WikitextSerializer.js M lib/html2wt/escapeWikitext.js M lib/jsapi.js M lib/logger/Logger.js M lib/utils/Util.js M lib/wt2html/XMLSerializer.js M lib/wt2html/tokenizer.utils.js M lib/wt2html/tt/ParagraphWrapper.js M lib/wt2html/tt/ParserFunctions.js M tools/fetch-wt.js M tools/regression-testing.js M tools/sync-parserTests.js 18 files changed, 897 insertions(+), 827 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid refs/changes/48/294948/1 diff --git a/bin/domdiff.test.js b/bin/domdiff.test.js index 14ccb82..94219b9 100755 --- a/bin/domdiff.test.js +++ b/bin/domdiff.test.js @@ -37,42 +37,44 @@ }, }); -var argv = opts.argv; -var oldhtml = argv.oldhtml; -var newhtml = argv.newhtml; +(function() { + var argv = opts.argv; + var oldhtml = argv.oldhtml; + var newhtml = argv.newhtml; -if (!oldhtml && argv._[0]) { - oldhtml = fs.readFileSync(argv._[0], 'utf8'); - newhtml = fs.readFileSync(argv._[1], 'utf8'); -} + if (!oldhtml && argv._[0]) { + oldhtml = fs.readFileSync(argv._[0], 'utf8'); + newhtml = fs.readFileSync(argv._[1], 'utf8'); + } -if (Util.booleanOption(argv.help) || !oldhtml || !newhtml) { - opts.showHelp(); - return; -} + if (Util.booleanOption(argv.help) || !oldhtml || !newhtml) { + opts.showHelp(); + return; + } -var oldDOM = DU.parseHTML(oldhtml).body; -var newDOM = DU.parseHTML(newhtml).body; + var oldDOM = DU.parseHTML(oldhtml).body; + var newDOM = DU.parseHTML(newhtml).body; -var dummyEnv = { - conf: { parsoid: { debug: Util.booleanOption(argv.debug) }, wiki: {} }, - page: { id: null }, -}; + var dummyEnv = { + conf: { parsoid: { debug: Util.booleanOption(argv.debug) }, wiki: {} }, + page: { id: null }, + }; -if (argv.debug) { - var logger = new ParsoidLogger(dummyEnv); - logger.registerBackend(/^(trace|debug)(\/|$)/, logger.getDefaultTracerBackend()); - dummyEnv.log = logger.log.bind(logger); -} else { - dummyEnv.log = function() {}; -} + if (argv.debug) { + var logger = new ParsoidLogger(dummyEnv); + logger.registerBackend(/^(trace|debug)(\/|$)/, logger.getDefaultTracerBackend()); + dummyEnv.log = logger.log.bind(logger); + } else { + dummyEnv.log = function() {}; + } -(new DOMDiff(dummyEnv)).diff(oldDOM, newDOM); + (new DOMDiff(dummyEnv)).diff(oldDOM, newDOM); -DU.dumpDOM(newDOM, 'DIFF-marked DOM', { - quiet: !!Util.booleanOption(argv.quiet), - storeDiffMark: true, - env: dummyEnv, -}); + DU.dumpDOM(newDOM, 'DIFF-marked DOM', { + quiet: !!Util.booleanOption(argv.quiet), + storeDiffMark: true, + env: dummyEnv, + }); -process.exit(0); + process.exit(0); +}()); diff --git a/bin/roundtrip-test.js b/bin/roundtrip-test.js index cc1aca2..58fba92 100755 --- a/bin/roundtrip-test.js +++ b/bin/roundtrip-test.js @@ -713,36 +713,38 @@ }, }; - var opts = yargs.usage( - 'Usage: $0 [options] \n\n', options - ).strict(); + (function() { + var opts = yargs.usage( + 'Usage: $0 [options] \n\n', options + ).strict(); - var argv = opts.argv; - if (!argv._.length) { - return opts.showHelp(); - } - var title = String(argv._[0]); - - Promise.resolve().then(function() { - if (argv.parsoidURL) { return; } - // Start our own Parsoid server - var apiServer = require('../tests/apiServer.js'); - var parsoidOptions = { quiet: true }; - if (argv.apiURL) { - parsoidOptions.mockUrl = argv.apiURL; - argv.domain = 'customwiki'; + var argv = opts.argv; + if (!argv._.length) { + return opts.showHelp(); } - apiServer.exitOnProcessTerm(); - return apiServer.startParsoidServer(parsoidOptions).then(function(ret) { - argv.parsoidURL = ret.url; - }); - }).then(function() { - var formatter = Util.booleanOption(argv.xml) ? xmlFormat : plainFormat; -
[MediaWiki-commits] [Gerrit] Move only ES entries about the current wiki - change (mediawiki...Flow)
Mattflaschen has uploaded a new change for review. https://gerrit.wikimedia.org/r/294947 Change subject: Move only ES entries about the current wiki .. Move only ES entries about the current wiki This doesn't affect MediaWiki-Vagrant or Beta Cluster, since they don't have a shared flowdb. But in general (and in production) it should only run on the specified wiki. Change-Id: Ib0716cd05fc19ffe9a2aa1426c4bbf9d63f15f4a --- M maintenance/FlowExternalStoreMoveCluster.php 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/47/294947/1 diff --git a/maintenance/FlowExternalStoreMoveCluster.php b/maintenance/FlowExternalStoreMoveCluster.php index 62abe61..4134c99 100644 --- a/maintenance/FlowExternalStoreMoveCluster.php +++ b/maintenance/FlowExternalStoreMoveCluster.php @@ -76,6 +76,7 @@ $clusterConditions[] = $schema['content'] . $dbr->buildLike( "DB://$cluster/", $dbr->anyString() ); } $iterator->addConditions( array( + $schema['wiki'] => wfWikiID(), $schema['flags'] . $dbr->buildLike( $dbr->anyString(), 'external', $dbr->anyString() ), $dbr->makeList( $clusterConditions, LIST_OR ), ) ); @@ -276,6 +277,7 @@ 'pk' => 'rev_id', 'content' => 'rev_content', 'flags' => 'rev_flags', + 'wiki' => 'rev_user_wiki', ); } } -- To view, visit https://gerrit.wikimedia.org/r/294947 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib0716cd05fc19ffe9a2aa1426c4bbf9d63f15f4a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow 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] DO NOT MERGE: Extra external store for testing migration - change (mediawiki/vagrant)
Mattflaschen has uploaded a new change for review. https://gerrit.wikimedia.org/r/294946 Change subject: DO NOT MERGE: Extra external store for testing migration .. DO NOT MERGE: Extra external store for testing migration Change-Id: I59822da7cbc7b26407e66269c44cbc13eda39099 --- M puppet/modules/role/manifests/externalstore.pp M puppet/modules/role/templates/externalstore/conf.php.erb 2 files changed, 24 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/46/294946/1 diff --git a/puppet/modules/role/manifests/externalstore.pp b/puppet/modules/role/manifests/externalstore.pp index c37168f..904deb7 100644 --- a/puppet/modules/role/manifests/externalstore.pp +++ b/puppet/modules/role/manifests/externalstore.pp @@ -15,7 +15,7 @@ include ::mediawiki mysql::db { 'external store db': -dbname => 'external', +dbname => $db_name, } mysql::sql { "GRANT ALL PRIVILEGES ON ${db_name}.* TO ${db_user}@${grant_db_host}": @@ -29,6 +29,17 @@ require => Mysql::Db['external store db'], } +mysql::db { 'external store db 2': +dbname => "${db_name}2", +} + +mysql::sql { 'create ExternalStore table 2': +sql => "USE ${db_name}2; SOURCE ${::mediawiki::dir}/maintenance/storage/blobs.sql;", +unless => "SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE table_schema = '${db_name}2' AND table_name = 'blobs';", +require => Mysql::Db['external store db'], +} + + mediawiki::settings { 'external store settings': values => template('role/externalstore/conf.php.erb'), } diff --git a/puppet/modules/role/templates/externalstore/conf.php.erb b/puppet/modules/role/templates/externalstore/conf.php.erb index 7fa8a2c..f31b47e 100644 --- a/puppet/modules/role/templates/externalstore/conf.php.erb +++ b/puppet/modules/role/templates/externalstore/conf.php.erb @@ -10,5 +10,17 @@ ), ); +$wgExternalServers['external2'] = array( +array( +'host' => '<%= @db_host %>', +'user' => '<%= @db_user %>', +'password' => '<%= @db_pass %>', +'dbname' => '<%= @db_name %>2', +'type' => 'mysql', +'load' => 1, +'flags' => DBO_DEBUG | DBO_DEFAULT, +), +); + $wgExternalStores = array( 'DB' ); $wgDefaultExternalStore = array( 'DB://external' ); // = $wgExternalServers['external'] -- To view, visit https://gerrit.wikimedia.org/r/294946 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I59822da7cbc7b26407e66269c44cbc13eda39099 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] Phabricator: remove remote 'origin' from system-wide gitconfig - change (operations/puppet)
20after4 has uploaded a new change for review. https://gerrit.wikimedia.org/r/294945 Change subject: Phabricator: remove remote 'origin' from system-wide gitconfig .. Phabricator: remove remote 'origin' from system-wide gitconfig Having a remote defined in the system gitconfig causes git to fail when manipulating the remote settings via `git remote` command. E.g. ``` git remote remove origin git remote add origin https://some.remote.url ``` Result: !!fatal: remote origin already exists.!! Change-Id: If1d7a51e488ad542b227b090c599bb160eb2e4f3 --- M modules/phabricator/templates/system.gitconfig.erb 1 file changed, 0 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/45/294945/1 diff --git a/modules/phabricator/templates/system.gitconfig.erb b/modules/phabricator/templates/system.gitconfig.erb index c49e0ac..e40b5e3 100644 --- a/modules/phabricator/templates/system.gitconfig.erb +++ b/modules/phabricator/templates/system.gitconfig.erb @@ -1,8 +1,3 @@ -[remote "origin"] -fetch = +refs/changes/*:refs/changes/* -fetch = +refs/meta/*:refs/meta/* - - [http "https://github.com;] proxy = <%= @proxy %> -- To view, visit https://gerrit.wikimedia.org/r/294945 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If1d7a51e488ad542b227b090c599bb160eb2e4f3 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: 20after4___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add .arcconfig - change (mediawiki/vagrant)
Mattflaschen has uploaded a new change for review. https://gerrit.wikimedia.org/r/294944 Change subject: Add .arcconfig .. Add .arcconfig Change-Id: I245bba272d9bb0b8546c41a2162ac6bec818f350 --- A .arcconfig 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/44/294944/1 diff --git a/.arcconfig b/.arcconfig new file mode 100644 index 000..285a0a2 --- /dev/null +++ b/.arcconfig @@ -0,0 +1,4 @@ +{ + "project.name": "mediawiki-vagrant", + "phabricator.uri": "https://phabricator.wikimedia.org; +} -- To view, visit https://gerrit.wikimedia.org/r/294944 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I245bba272d9bb0b8546c41a2162ac6bec818f350 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] Make full screen control a real link so users can open it in... - change (mediawiki...Kartographer)
JGirault has uploaded a new change for review. https://gerrit.wikimedia.org/r/294943 Change subject: Make full screen control a real link so users can open it in a new tab/window. .. Make full screen control a real link so users can open it in a new tab/window. Bug: T133787 Change-Id: I2daa1acd30f8d34bb91f0a7ef7ee20d7021b08a4 --- M modules/kartographer.js 1 file changed, 24 insertions(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Kartographer refs/changes/43/294943/1 diff --git a/modules/kartographer.js b/modules/kartographer.js index 371791a..2be7b13 100644 --- a/modules/kartographer.js +++ b/modules/kartographer.js @@ -56,33 +56,41 @@ }, onAdd: function ( map ) { - var container = L.DomUtil.create( 'div', 'leaflet-bar' ), - link = L.DomUtil.create( 'a', 'oo-ui-icon-fullScreen', container ); + var container = L.DomUtil.create( 'div', 'leaflet-bar' ); - this.href = link.href = '#' + mw.kartographer.getMapHash( this.options.mapData, this.map ); - link.title = mw.msg( 'kartographer-fullscreen-text' ); + this.link = L.DomUtil.create( 'a', 'oo-ui-icon-fullScreen', container ); + this.link.title = mw.msg( 'kartographer-fullscreen-text' ); this.map = map; - L.DomEvent.addListener( link, 'click', this.onShowFullScreen, this ); + this.map.on( 'moveend', this.onMapMove, this ); + if ( !router.isSupported() ) { + L.DomEvent.addListener( this.link, 'click', this.onShowFullScreen, this ); + } L.DomEvent.disableClickPropagation( container ); + this.updateHash(); return container; }, - onShowFullScreen: function ( e ) { - var hash = mw.kartographer.getMapHash( this.options.mapData, this.map ); - L.DomEvent.stop( e ); - - this.href = '#' + hash; - - if ( router.isSupported() ) { - router.navigate( hash ); - } else { - mw.kartographer.openFullscreenMap( this.map, getMapPosition( this.map ) ); + onMapMove: function () { + /*jscs:disable disallowDanglingUnderscores */ + if ( !this.map._loaded ) { + return false; } + /*jscs:enable disallowDanglingUnderscores */ + this.updateHash(); + }, + + updateHash: function() { + var hash = mw.kartographer.getMapHash( this.options.mapData, this.map ); + this.link.href = '#' + hash; + }, + + onShowFullScreen: function ( e ) { + L.DomEvent.stop( e ); + mw.kartographer.openFullscreenMap( this.map, getMapPosition( this.map ) ); } } ); - /** * Create a new interactive map * -- To view, visit https://gerrit.wikimedia.org/r/294943 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2daa1acd30f8d34bb91f0a7ef7ee20d7021b08a4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Kartographer Gerrit-Branch: master Gerrit-Owner: JGirault___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] 0.2.2 - change (wikidata...rdf)
Smalyshev has uploaded a new change for review. https://gerrit.wikimedia.org/r/294942 Change subject: 0.2.2 .. 0.2.2 Change-Id: I9aac14930dd4ca3a20c7f07f7968a5171eb9969c --- M blazegraph/pom.xml M common/pom.xml M dist/pom.xml M docs/ChangeLog M pom.xml M testTools/pom.xml M tools/pom.xml M war/pom.xml 8 files changed, 8 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/rdf refs/changes/42/294942/1 diff --git a/blazegraph/pom.xml b/blazegraph/pom.xml index 0c18a50..d486f1e 100644 --- a/blazegraph/pom.xml +++ b/blazegraph/pom.xml @@ -4,7 +4,7 @@ org.wikidata.query.rdf parent -0.2.2-SNAPSHOT +0.2.2 blazegraph jar diff --git a/common/pom.xml b/common/pom.xml index ac5dd1f..08bd203 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -4,7 +4,7 @@ org.wikidata.query.rdf parent -0.2.2-SNAPSHOT +0.2.2 common jar diff --git a/dist/pom.xml b/dist/pom.xml index 0f6232e..1c5d763 100644 --- a/dist/pom.xml +++ b/dist/pom.xml @@ -4,7 +4,7 @@ org.wikidata.query.rdf parent -0.2.2-SNAPSHOT +0.2.2 service pom diff --git a/docs/ChangeLog b/docs/ChangeLog index d8069b8..5415b0e 100644 --- a/docs/ChangeLog +++ b/docs/ChangeLog @@ -5,6 +5,7 @@ Bugfixes for Blazegraph deadlock bug. Start Jolokia together with Updater. GUI improvements. +Blazegraph 2.1.1 0.2.1 - diff --git a/pom.xml b/pom.xml index 5f4053e..7d4715a 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ org.wikidata.query.rdf parent - 0.2.2-SNAPSHOT + 0.2.2 pom diff --git a/testTools/pom.xml b/testTools/pom.xml index 46381c3..4ea690e 100644 --- a/testTools/pom.xml +++ b/testTools/pom.xml @@ -4,7 +4,7 @@ org.wikidata.query.rdf parent -0.2.2-SNAPSHOT +0.2.2 testTools jar diff --git a/tools/pom.xml b/tools/pom.xml index 975e16e..194cd5c 100644 --- a/tools/pom.xml +++ b/tools/pom.xml @@ -4,7 +4,7 @@ org.wikidata.query.rdf parent -0.2.2-SNAPSHOT +0.2.2 tools jar diff --git a/war/pom.xml b/war/pom.xml index d798b4f..6cd93b0 100644 --- a/war/pom.xml +++ b/war/pom.xml @@ -4,7 +4,7 @@ org.wikidata.query.rdf parent -0.2.2-SNAPSHOT +0.2.2 blazegraph-service pom -- To view, visit https://gerrit.wikimedia.org/r/294942 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9aac14930dd4ca3a20c7f07f7968a5171eb9969c Gerrit-PatchSet: 1 Gerrit-Project: wikidata/query/rdf Gerrit-Branch: master Gerrit-Owner: Smalyshev___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add UserIsLocked and UserIsHidden hook handlers - change (mediawiki...CentralAuth)
jenkins-bot has submitted this change and it was merged. Change subject: Add UserIsLocked and UserIsHidden hook handlers .. Add UserIsLocked and UserIsHidden hook handlers Bug: T137923 Change-Id: I4a0eca2e4fc543ac484d5088a1587d06591152c1 --- M extension.json M includes/CentralAuthHooks.php 2 files changed, 38 insertions(+), 0 deletions(-) Approvals: Anomie: Looks good to me, approved jenkins-bot: Verified diff --git a/extension.json b/extension.json index c8746f4..769b703 100644 --- a/extension.json +++ b/extension.json @@ -356,6 +356,8 @@ "UserSetEmailAuthenticationTimestamp": "CentralAuthHooks::onUserSetEmailAuthenticationTimestamp", "UserGetRights": "CentralAuthHooks::onUserGetRights", "UserIsBot": "CentralAuthHooks::onUserIsBot", + "UserIsLocked": "CentralAuthHooks::onUserIsLocked", + "UserIsHidden": "CentralAuthHooks::onUserIsHidden", "getUserPermissionsErrorsExpensive": "CentralAuthHooks::onGetUserPermissionsErrorsExpensive", "MakeGlobalVariablesScript": "CentralAuthHooks::onMakeGlobalVariablesScript", "SpecialPasswordResetOnSubmit": "CentralAuthHooks::onSpecialPasswordResetOnSubmit", diff --git a/includes/CentralAuthHooks.php b/includes/CentralAuthHooks.php index 65d7cca..c01945a 100644 --- a/includes/CentralAuthHooks.php +++ b/includes/CentralAuthHooks.php @@ -839,6 +839,42 @@ /** * @param User $user +* @param bool &$isLocked +* @return bool +*/ + static function onUserIsLocked( User $user, &$isLocked ) { + $centralUser = CentralAuthUser::getInstance( $user ); + if ( $centralUser->exists() + && ( $centralUser->isAttached() || $user->isAnon() ) + && $centralUser->isLocked() + ) { + $isLocked = true; + return false; + } + + return true; + } + + /** +* @param User $user +* @param bool &$$isHidden +* @return bool +*/ + static function onUserIsHidden( User $user, &$isHidden ) { + $centralUser = CentralAuthUser::getInstance( $user ); + if ( $centralUser->exists() + && ( $centralUser->isAttached() || $user->isAnon() ) + && $centralUser->isHidden() + ) { + $isHidden = true; + return false; + } + + return true; + } + + /** +* @param User $user * @param bool &$isBot * @return bool */ -- To view, visit https://gerrit.wikimedia.org/r/294912 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4a0eca2e4fc543ac484d5088a1587d06591152c1 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/CentralAuth Gerrit-Branch: master Gerrit-Owner: GlaisherGerrit-Reviewer: Anomie Gerrit-Reviewer: Gergő Tisza Gerrit-Reviewer: Glaisher 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] Update GUI - change (wikidata...rdf)
Smalyshev has uploaded a new change for review. https://gerrit.wikimedia.org/r/294941 Change subject: Update GUI .. Update GUI Change-Id: I271cb8670c9c447b0bc60c67872137792f3d5e17 --- M gui 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/rdf refs/changes/41/294941/1 diff --git a/gui b/gui index 49141bf..424d8bf 16 --- a/gui +++ b/gui -Subproject commit 49141bf0bff041d7f258b5a79cd1c94d3dd7c414 +Subproject commit 424d8bf3e3fb6ed9865623ed91f42d94c0050568 -- To view, visit https://gerrit.wikimedia.org/r/294941 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I271cb8670c9c447b0bc60c67872137792f3d5e17 Gerrit-PatchSet: 1 Gerrit-Project: wikidata/query/rdf Gerrit-Branch: master Gerrit-Owner: Smalyshev___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Repool db1073 with low weight after reimage - change (operations/mediawiki-config)
Jcrespo has submitted this change and it was merged. Change subject: Repool db1073 with low weight after reimage .. Repool db1073 with low weight after reimage Change-Id: Ia2180257dc32464bb814e2a5e628eb7875d1b09e --- M wmf-config/db-eqiad.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jcrespo: Looks good to me, approved jenkins-bot: Verified diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php index c76b2b7..a05f569 100644 --- a/wmf-config/db-eqiad.php +++ b/wmf-config/db-eqiad.php @@ -96,7 +96,7 @@ 'db1065' => 50, # 2.8TB 160GB, api 'db1066' => 50, # 2.8TB 160GB, api 'db1072' => 450, # 2.8TB 160GB -# 'db1073' => 500, # 2.8TB 160GB, down for maintenance + 'db1073' => 50, # 2.8TB 160GB, low weight 'db1080' => 300, # 3.6TB 512GB 'db1083' => 300, # 3.6TB 512GB 'db1089' => 300, # 3.6TB 512GB -- To view, visit https://gerrit.wikimedia.org/r/294931 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia2180257dc32464bb814e2a5e628eb7875d1b09e Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: JcrespoGerrit-Reviewer: Florianschmidtwelzow Gerrit-Reviewer: Jcrespo Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Make a real link so users can open it in a new tab... - change (mediawiki...Kartographer)
JGirault has uploaded a new change for review. https://gerrit.wikimedia.org/r/294940 Change subject: Make a real link so users can open it in a new tab/window. .. Make a real link so users can open it in a new tab/window. Bug: T137910 Change-Id: I48f60846107f1a313cab509e7fc73910a88f62cd --- M modules/kartographer.MapDialog.js M modules/kartographer.js M styles/kartographer.less 3 files changed, 77 insertions(+), 28 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Kartographer refs/changes/40/294940/1 diff --git a/modules/kartographer.MapDialog.js b/modules/kartographer.MapDialog.js index 798f144..2bb774c 100644 --- a/modules/kartographer.MapDialog.js +++ b/modules/kartographer.MapDialog.js @@ -53,8 +53,8 @@ // Check whether it is the same map. if ( existing && - typeof existing.articleMapId === 'number' && - existing.articleMapId === mapData.articleMapId ) { + typeof existing.maptagId === 'number' && + existing.maptagId === mapData.maptagId ) { fullScreenState = mapData.fullScreenState; extendedData = {}; @@ -149,7 +149,7 @@ this.map.setView( new L.LatLng( extendedData.latitude, extendedData.longitude ), extendedData.zoom, true ); } - if ( typeof mapData.articleMapId === 'number' ) { + if ( typeof mapData.maptagId === 'number' ) { this.map.on( 'moveend', this.onMapMove, this ); } diff --git a/modules/kartographer.js b/modules/kartographer.js index 206ca96..371791a 100644 --- a/modules/kartographer.js +++ b/modules/kartographer.js @@ -42,6 +42,13 @@ */ mw.kartographer.maps = []; + /** +* References the maplinks of the page. +* +* @type {HTMLElement[]} +*/ + mw.kartographer.maplinks = []; + mw.kartographer.FullScreenControl = L.Control.extend( { options: { // Do not switch for RTL because zoom also stays in place @@ -280,8 +287,8 @@ if ( mapData instanceof L.Map ) { map = mapData; mapData = getMapData( $( map.getContainer() ).closest( '.mw-kartographer-interactive' ) ); - } else if ( $.type( mapData.articleMapId ) === 'number' ) { - map = mw.kartographer.maps[ mapData.articleMapId ]; + } else if ( mapData && mapData.isMapframe ) { + map = mw.kartographer.maps[ mapData.maptagId ]; } $.extend( dialogData, mapData, { @@ -312,7 +319,7 @@ /** * Formats the full screen route of the map, such as: -* `/map/:articleMapId(/:zoom/:longitude/:latitude)` +* `/map/:maptagId(/:zoom/:longitude/:latitude)` * * The hash will contain the portion between parenthesis if and only if * one of these 3 values differs from the initial setting. @@ -323,10 +330,13 @@ * @return {string} The route to open the map in full screen mode. */ mw.kartographer.getMapHash = function ( data, map ) { - var hash = '/map/' + data.articleMapId, + + var hash = '/' + ( data.isMapframe ? 'map' : 'maplink' ), mapPosition, newHash, initialHash = getScaleCoords( data.zoom, data.latitude, data.longitude ).join( '/' ); + + hash += '/' + data.maptagId; if ( map ) { mapPosition = getMapPosition( map ); @@ -388,24 +398,49 @@ */ function getMapData( element ) { var $el = $( element ), - articleMapId = null; + maptagId = null; // Prevent users from adding map divs directly via wikitext if ( $el.attr( 'mw-data' ) !== 'interface' ) { return null; } - if ( $.type( $el.data( 'article-map-id' ) ) !== 'undefined' ) { - articleMapId = +$el.data( 'article-map-id' ); + if ( $.type( $el.data( 'maptag-id' ) ) !== 'undefined' ) { + maptagId = +$el.data( 'maptag-id' ); } return { - articleMapId: articleMapId, + isMapframe: $el.hasClass( 'mw-kartographer-interactive' ), + maptagId: maptagId, latitude: +$el.data( 'lat' ), longitude: +$el.data( 'lon' ),
[MediaWiki-commits] [Gerrit] otrs: add check_procs for clamd/freshclam - change (operations/puppet)
Faidon Liambotis has uploaded a new change for review. https://gerrit.wikimedia.org/r/294939 Change subject: otrs: add check_procs for clamd/freshclam .. otrs: add check_procs for clamd/freshclam The role class is a misnomer (this sets up everything, not just the webserver) and the lines between the clamav module, the otrs module and the role class are very blurry. Add the checks to the role class for now. Bug: T137188 Change-Id: I9907565d36fc8356f7596703273e78bb8fe4e417 --- M modules/role/manifests/otrs/webserver.pp 1 file changed, 9 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/39/294939/1 diff --git a/modules/role/manifests/otrs/webserver.pp b/modules/role/manifests/otrs/webserver.pp index d79d689..4fda246 100644 --- a/modules/role/manifests/otrs/webserver.pp +++ b/modules/role/manifests/otrs/webserver.pp @@ -59,6 +59,15 @@ check_command => 'check_smtp', } +nrpe::monitor_service{ 'clamd': +description => 'clamd running', +nrpe_command => '/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1:1 -u clamav -C clamd' +} +nrpe::monitor_service{ 'freshclam': +description => 'freshclam running', +nrpe_command => '/usr/lib/nagios/plugins/check_procs -w 1:1 -c 1:1 -u clamav -C freshclam' +} + # can conflict with ferm module if ! defined(Package['libnet-dns-perl']){ package { 'libnet-dns-perl': -- To view, visit https://gerrit.wikimedia.org/r/294939 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9907565d36fc8356f7596703273e78bb8fe4e417 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Faidon Liambotis___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] https submodules - change (mediawiki...deploy)
Ladsgroup has submitted this change and it was merged. Change subject: https submodules .. https submodules change http to https Change-Id: I7a844a3bb11ea447b649f49a3f694465e6067ef9 --- M .gitmodules 1 file changed, 4 insertions(+), 4 deletions(-) Approvals: Ladsgroup: Verified; Looks good to me, approved diff --git a/.gitmodules b/.gitmodules index 5436b63..aa41495 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,12 +1,12 @@ [submodule "submodules/wheels"] path = submodules/wheels - url = http://phabricator.wikimedia.org/diffusion/1915/research-ores-deploy-wheels.git + url = https://phabricator.wikimedia.org/diffusion/1915/research-ores-deploy-wheels.git [submodule "submodules/ores"] path = submodules/ores - url = http://phabricator.wikimedia.org/diffusion/1912/research-ores-ores.git + url = https://phabricator.wikimedia.org/diffusion/1912/research-ores-ores.git [submodule "submodules/editquality"] path = submodules/editquality - url = http://phabricator.wikimedia.org/diffusion/1913/research-ores-editquality.git + url = https://phabricator.wikimedia.org/diffusion/1913/research-ores-editquality.git [submodule "submodules/wikiclass"] path = submodules/wikiclass - url = http://phabricator.wikimedia.org/diffusion/1914/research-ores-wikiclass.git + url = https://phabricator.wikimedia.org/diffusion/1914/research-ores-wikiclass.git -- To view, visit https://gerrit.wikimedia.org/r/294937 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7a844a3bb11ea447b649f49a3f694465e6067ef9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/ores/deploy Gerrit-Branch: master Gerrit-Owner: 20after4Gerrit-Reviewer: Ladsgroup ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Switch to 2.1.1 - change (wikidata...rdf)
Smalyshev has uploaded a new change for review. https://gerrit.wikimedia.org/r/294938 Change subject: Switch to 2.1.1 .. Switch to 2.1.1 Change-Id: Id44a625b97f53b6dee2a8339a02e51d9c8316794 --- M pom.xml 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/rdf refs/changes/38/294938/1 diff --git a/pom.xml b/pom.xml index b9a2ef5..5f4053e 100644 --- a/pom.xml +++ b/pom.xml @@ -57,7 +57,7 @@ UTF-8 -2.1.1-SNAPSHOT +2.1.1 2.8.1 9.2.9.v20150224 -- To view, visit https://gerrit.wikimedia.org/r/294938 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id44a625b97f53b6dee2a8339a02e51d9c8316794 Gerrit-PatchSet: 1 Gerrit-Project: wikidata/query/rdf Gerrit-Branch: master Gerrit-Owner: Smalyshev___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] https submodules - change (mediawiki...deploy)
20after4 has uploaded a new change for review. https://gerrit.wikimedia.org/r/294937 Change subject: https submodules .. https submodules change http to https Change-Id: I7a844a3bb11ea447b649f49a3f694465e6067ef9 --- M .gitmodules 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/ores/deploy refs/changes/37/294937/1 diff --git a/.gitmodules b/.gitmodules index 5436b63..aa41495 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,12 +1,12 @@ [submodule "submodules/wheels"] path = submodules/wheels - url = http://phabricator.wikimedia.org/diffusion/1915/research-ores-deploy-wheels.git + url = https://phabricator.wikimedia.org/diffusion/1915/research-ores-deploy-wheels.git [submodule "submodules/ores"] path = submodules/ores - url = http://phabricator.wikimedia.org/diffusion/1912/research-ores-ores.git + url = https://phabricator.wikimedia.org/diffusion/1912/research-ores-ores.git [submodule "submodules/editquality"] path = submodules/editquality - url = http://phabricator.wikimedia.org/diffusion/1913/research-ores-editquality.git + url = https://phabricator.wikimedia.org/diffusion/1913/research-ores-editquality.git [submodule "submodules/wikiclass"] path = submodules/wikiclass - url = http://phabricator.wikimedia.org/diffusion/1914/research-ores-wikiclass.git + url = https://phabricator.wikimedia.org/diffusion/1914/research-ores-wikiclass.git -- To view, visit https://gerrit.wikimedia.org/r/294937 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7a844a3bb11ea447b649f49a3f694465e6067ef9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/ores/deploy Gerrit-Branch: master Gerrit-Owner: 20after4___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] WIP: Create annotations on file page - change (mediawiki...FileAnnotations)
MarkTraceur has uploaded a new change for review. https://gerrit.wikimedia.org/r/294936 Change subject: WIP: Create annotations on file page .. WIP: Create annotations on file page Change-Id: I9c21f5ec890d6100cf722350248328844bd20574 --- M extension.json M resources/src/fileannotations.js M resources/src/fileannotations.less 3 files changed, 106 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/FileAnnotations refs/changes/36/294936/1 diff --git a/extension.json b/extension.json index a2fda22..b3e0421 100644 --- a/extension.json +++ b/extension.json @@ -34,7 +34,15 @@ ], "dependencies": [ - "mediawiki.Title" + "mediawiki.Title", + "jquery.ui.draggable", + "jquery.ui.resizable", + "oojs-ui" + ], + + "messages": [ + "fileannotation-create", + "file-has-annotations" ] } }, diff --git a/resources/src/fileannotations.js b/resources/src/fileannotations.js index 919e78d..a4f9275 100644 --- a/resources/src/fileannotations.js +++ b/resources/src/fileannotations.js @@ -1,17 +1,38 @@ ( function ( $, mw ) { - var api = new mw.Api(), + var createButton, imageInfo, $filePageAnnotationWrapper, $mainImage, + api = new mw.Api(), pageTitle = mw.Title.newFromText( mw.config.get( 'wgPageName' ) ), - isFilePage = pageTitle.getNamespaceId() === 6; + isFilePage = pageTitle.getNamespaceId() === 6, + $fileLink = $( '#file' ); + + if ( isFilePage ) { + $annotationInfo = $( '' ) + .addClass( 'fileannotation-info' ) + .append( + $( '' ).text( mw.message( 'file-has-annotations' ).text() ) + ); + + $fileLink.after( $annotationInfo ); + } $( '.annotated-file' ).each( function () { var imgTitle, imageInfoPromise, offset, imgh, imgw, + thisIsMainFile = false, $annotations = $( this ), $annotationWrapper = $( '' ).addClass( 'annotation-wrapper' ), $img = $annotations.find( 'img' ); if ( !$img || $img.length < 1 && isFilePage ) { // Assume we're annotating the file whose page we're on. - $img = $( '#file img' ); + $img = $fileLink.find( 'img' ); + + // If we need to support annotation creation, we'll need this + // later. + $filePageAnnotationWrapper = $annotationWrapper; + $mainImage = $img; + + // Indicate to later code that this is the main file. + thisIsMainFile = true; } if ( !$img || $img.length < 1 ) { @@ -62,6 +83,11 @@ adjustedY = y * adjustRatioY, adjustedHeight = height * adjustRatioY; + if ( thisIsMainFile ) { + // Cached imageinfo - only gets used if we're on a file page anyway + imageInfo = ii; + } + $annotationBox.css( { top: adjustedY, left: adjustedX, @@ -80,4 +106,68 @@ } ); } ); } ); + + if ( isFilePage ) { + // Make it possible to create new annotations graphically. + createButton = new OO.ui.ButtonWidget( { + label: mw.message( 'fileannotation-create' ).text(), + icon: 'add', + flags: [ 'constructive' ] + } ); + + createButton.on( 'click', function () { + // Turn on click-to-initiate... + $filePageAnnotationWrapper + .addClass( 'click-to-create' ); + + $filePageAnnotationWrapper + .one( 'click', function ( e ) { + // Add outline and edit interface + var x = e.offsetX, + y = e.offsetY, + imgw = $mainImage.width(), + imgh =
[MediaWiki-commits] [Gerrit] Add editquality, ores, wikiclass submodules from diffusion. - change (mediawiki...deploy)
Ladsgroup has submitted this change and it was merged. Change subject: Add editquality, ores, wikiclass submodules from diffusion. .. Add editquality, ores, wikiclass submodules from diffusion. Bug: T137819 Change-Id: I098568a0c92d6b6665e101bea0e44839c3650a5b --- M .gitmodules A submodules/editquality A submodules/ores A submodules/wikiclass 4 files changed, 10 insertions(+), 1 deletion(-) Approvals: Ladsgroup: Verified; Looks good to me, approved diff --git a/.gitmodules b/.gitmodules index 72017cc..5436b63 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,12 @@ [submodule "submodules/wheels"] path = submodules/wheels - url = https://gerrit.wikimedia.org/r/research/ores/wheels.git + url = http://phabricator.wikimedia.org/diffusion/1915/research-ores-deploy-wheels.git +[submodule "submodules/ores"] + path = submodules/ores + url = http://phabricator.wikimedia.org/diffusion/1912/research-ores-ores.git +[submodule "submodules/editquality"] + path = submodules/editquality + url = http://phabricator.wikimedia.org/diffusion/1913/research-ores-editquality.git +[submodule "submodules/wikiclass"] + path = submodules/wikiclass + url = http://phabricator.wikimedia.org/diffusion/1914/research-ores-wikiclass.git diff --git a/submodules/editquality b/submodules/editquality new file mode 16 index 000..f1c517c --- /dev/null +++ b/submodules/editquality +Subproject commit f1c517c35a1a6bfc852b74cd6f4c6c6eb8f367ed diff --git a/submodules/ores b/submodules/ores new file mode 16 index 000..ecd1729 --- /dev/null +++ b/submodules/ores +Subproject commit ecd17297ff7b13e65abfa65a74b148a33e6f78b6 diff --git a/submodules/wikiclass b/submodules/wikiclass new file mode 16 index 000..428e206 --- /dev/null +++ b/submodules/wikiclass +Subproject commit 428e2064f0f337c20b71c9ba89b235cf85b4a81d -- To view, visit https://gerrit.wikimedia.org/r/294935 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I098568a0c92d6b6665e101bea0e44839c3650a5b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/ores/deploy Gerrit-Branch: master Gerrit-Owner: LadsgroupGerrit-Reviewer: Ladsgroup ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add editquality, ores, wikiclass submodules from diffusion. - change (mediawiki...deploy)
Ladsgroup has uploaded a new change for review. https://gerrit.wikimedia.org/r/294935 Change subject: Add editquality, ores, wikiclass submodules from diffusion. .. Add editquality, ores, wikiclass submodules from diffusion. Bug: T137819 Change-Id: I098568a0c92d6b6665e101bea0e44839c3650a5b --- M .gitmodules A submodules/editquality A submodules/ores A submodules/wikiclass 4 files changed, 10 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/ores/deploy refs/changes/35/294935/1 diff --git a/.gitmodules b/.gitmodules index 72017cc..5436b63 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,12 @@ [submodule "submodules/wheels"] path = submodules/wheels - url = https://gerrit.wikimedia.org/r/research/ores/wheels.git + url = http://phabricator.wikimedia.org/diffusion/1915/research-ores-deploy-wheels.git +[submodule "submodules/ores"] + path = submodules/ores + url = http://phabricator.wikimedia.org/diffusion/1912/research-ores-ores.git +[submodule "submodules/editquality"] + path = submodules/editquality + url = http://phabricator.wikimedia.org/diffusion/1913/research-ores-editquality.git +[submodule "submodules/wikiclass"] + path = submodules/wikiclass + url = http://phabricator.wikimedia.org/diffusion/1914/research-ores-wikiclass.git diff --git a/submodules/editquality b/submodules/editquality new file mode 16 index 000..f1c517c --- /dev/null +++ b/submodules/editquality +Subproject commit f1c517c35a1a6bfc852b74cd6f4c6c6eb8f367ed diff --git a/submodules/ores b/submodules/ores new file mode 16 index 000..ecd1729 --- /dev/null +++ b/submodules/ores +Subproject commit ecd17297ff7b13e65abfa65a74b148a33e6f78b6 diff --git a/submodules/wikiclass b/submodules/wikiclass new file mode 16 index 000..428e206 --- /dev/null +++ b/submodules/wikiclass +Subproject commit 428e2064f0f337c20b71c9ba89b235cf85b4a81d -- To view, visit https://gerrit.wikimedia.org/r/294935 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I098568a0c92d6b6665e101bea0e44839c3650a5b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/ores/deploy Gerrit-Branch: master Gerrit-Owner: Ladsgroup___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Removing wikiclass, editquality and ores submodules - change (mediawiki...deploy)
Ladsgroup has submitted this change and it was merged. Change subject: Removing wikiclass, editquality and ores submodules .. Removing wikiclass, editquality and ores submodules We will add proper ones very soon Bug: T137819 Change-Id: I857346bb0560540b66d1357fedc1ab9313bb0cc3 --- M .gitmodules D submodules/editquality D submodules/ores D submodules/wikiclass 4 files changed, 0 insertions(+), 12 deletions(-) Approvals: Ladsgroup: Verified; Looks good to me, approved diff --git a/.gitmodules b/.gitmodules index 0fe396d..72017cc 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,15 +1,3 @@ -[submodule "wb-vandalism"] - path = submodules/wb-vandalism - url = https://github.com/wiki-ai/wb-vandalism -[submodule "submodules/wikiclass"] - path = submodules/wikiclass - url = https://gerrit.wikimedia.org/r/mediawiki/services/ores/wikiclass.git -[submodule "submodules/editquality"] - path = submodules/editquality - url = https://gerrit.wikimedia.org/r/mediawiki/services/ores/editquality.git [submodule "submodules/wheels"] path = submodules/wheels url = https://gerrit.wikimedia.org/r/research/ores/wheels.git -[submodule "submodules/ores"] - path = submodules/ores - url = https://gerrit.wikimedia.org/r/mediawiki/services/ores.git diff --git a/submodules/editquality b/submodules/editquality deleted file mode 16 index 5303f8e..000 --- a/submodules/editquality +++ /dev/null -Subproject commit 5303f8efbcc41f720b3199069b20e41b919d5089 diff --git a/submodules/ores b/submodules/ores deleted file mode 16 index 13be375..000 --- a/submodules/ores +++ /dev/null -Subproject commit 13be375f9aef4f90a3f8b82bd68812ca69c8dad1 diff --git a/submodules/wikiclass b/submodules/wikiclass deleted file mode 16 index 499bddf..000 --- a/submodules/wikiclass +++ /dev/null -Subproject commit 499bddfe4828456b6d081d9e4c40f303fbd80acc -- To view, visit https://gerrit.wikimedia.org/r/294934 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I857346bb0560540b66d1357fedc1ab9313bb0cc3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/ores/deploy Gerrit-Branch: master Gerrit-Owner: LadsgroupGerrit-Reviewer: Ladsgroup ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Removing wikiclass, editquality and ores submodules - change (mediawiki...deploy)
Ladsgroup has uploaded a new change for review. https://gerrit.wikimedia.org/r/294934 Change subject: Removing wikiclass, editquality and ores submodules .. Removing wikiclass, editquality and ores submodules We will add proper ones very soon Bug: T137819 Change-Id: I857346bb0560540b66d1357fedc1ab9313bb0cc3 --- M .gitmodules D submodules/editquality D submodules/ores D submodules/wikiclass 4 files changed, 0 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/ores/deploy refs/changes/34/294934/1 diff --git a/.gitmodules b/.gitmodules index 0fe396d..72017cc 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,15 +1,3 @@ -[submodule "wb-vandalism"] - path = submodules/wb-vandalism - url = https://github.com/wiki-ai/wb-vandalism -[submodule "submodules/wikiclass"] - path = submodules/wikiclass - url = https://gerrit.wikimedia.org/r/mediawiki/services/ores/wikiclass.git -[submodule "submodules/editquality"] - path = submodules/editquality - url = https://gerrit.wikimedia.org/r/mediawiki/services/ores/editquality.git [submodule "submodules/wheels"] path = submodules/wheels url = https://gerrit.wikimedia.org/r/research/ores/wheels.git -[submodule "submodules/ores"] - path = submodules/ores - url = https://gerrit.wikimedia.org/r/mediawiki/services/ores.git diff --git a/submodules/editquality b/submodules/editquality deleted file mode 16 index 5303f8e..000 --- a/submodules/editquality +++ /dev/null -Subproject commit 5303f8efbcc41f720b3199069b20e41b919d5089 diff --git a/submodules/ores b/submodules/ores deleted file mode 16 index 13be375..000 --- a/submodules/ores +++ /dev/null -Subproject commit 13be375f9aef4f90a3f8b82bd68812ca69c8dad1 diff --git a/submodules/wikiclass b/submodules/wikiclass deleted file mode 16 index 499bddf..000 --- a/submodules/wikiclass +++ /dev/null -Subproject commit 499bddfe4828456b6d081d9e4c40f303fbd80acc -- To view, visit https://gerrit.wikimedia.org/r/294934 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I857346bb0560540b66d1357fedc1ab9313bb0cc3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/ores/deploy Gerrit-Branch: master Gerrit-Owner: Ladsgroup___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] NotifUser: rename preloadKeys() to getPreloadKeys() and make... - change (mediawiki...Echo)
jenkins-bot has submitted this change and it was merged. Change subject: NotifUser: rename preloadKeys() to getPreloadKeys() and make it tolerate uncomputable keys .. NotifUser: rename preloadKeys() to getPreloadKeys() and make it tolerate uncomputable keys Change-Id: Id9a39a481533d39f99c9d7f43c573af81fe957cf --- M includes/NotifUser.php 1 file changed, 4 insertions(+), 4 deletions(-) Approvals: Sbisson: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/NotifUser.php b/includes/NotifUser.php index 1755c90..0bf 100644 --- a/includes/NotifUser.php +++ b/includes/NotifUser.php @@ -578,7 +578,7 @@ // Populate the instance cache if ( $this->cached === null ) { - $keys = $this->preloadKeys(); + $keys = $this->getPreloadKeys(); $this->cached = $this->cache->getMulti( $keys ); // also keep track of cache values that couldn't be found (getMulti // omits them...) @@ -618,7 +618,7 @@ * * @return array */ - protected function preloadKeys() { + protected function getPreloadKeys() { $keys = array( 'echo-notification-timestamp', 'echo-notification-timestamp-' . EchoAttributeManager::MESSAGE, @@ -628,10 +628,10 @@ 'echo-notification-count-' . EchoAttributeManager::ALERT, ); - return array_merge( + return array_filter( array_merge( array_map( array( $this, 'getMemcKey' ), $keys ), array_map( array( $this, 'getGlobalMemcKey' ), $keys ) - ); + ) ); } /** -- To view, visit https://gerrit.wikimedia.org/r/294926 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id9a39a481533d39f99c9d7f43c573af81fe957cf Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: CatropeGerrit-Reviewer: Sbisson Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Allow sysops to add to/remove from confirmed on ca.wikinews - change (operations/mediawiki-config)
Dereckson has uploaded a new change for review. https://gerrit.wikimedia.org/r/294933 Change subject: Allow sysops to add to/remove from confirmed on ca.wikinews .. Allow sysops to add to/remove from confirmed on ca.wikinews Bug: T138069 Change-Id: Ic06b710df80cd6a86ef490bf2822e82b32f66357 --- M wmf-config/InitialiseSettings.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/33/294933/1 diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 9f3630b..a42ec52 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -9038,7 +9038,7 @@ 'bureaucrat' => [ 'translationadmin' ], // T75394 ], '+cawikinews' => [ - 'sysop' => [ 'flood' ], // T98576 + 'sysop' => [ 'flood', 'confirmed' ], // T98576, T138069 ], '+cewiki' => [ 'sysop' => [ 'rollbacker', 'suppressredirect', 'uploader' ], // T128205, T129005 @@ -9715,7 +9715,7 @@ 'bureaucrat' => [ 'translationadmin' ], // T75394 ], '+cawikinews' => [ - 'sysop' => [ 'flood' ], // T98576 + 'sysop' => [ 'flood', 'confirmed' ], // T98576, T138069 ], '+cewiki' => [ 'sysop' => [ 'rollbacker', 'suppressredirect', 'uploader' ], // T128205, T129005 -- To view, visit https://gerrit.wikimedia.org/r/294933 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic06b710df80cd6a86ef490bf2822e82b32f66357 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Dereckson___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] adding production dns entries for ms-be202[2-7] - change (operations/dns)
RobH has submitted this change and it was merged. Change subject: adding production dns entries for ms-be202[2-7] .. adding production dns entries for ms-be202[2-7] seems when the mgmt entries were added earlier, the production entries were overlooked. T136630 Change-Id: I5a9f83dde3fbf6f3fd913c979288833fe11c4c44 --- M templates/10.in-addr.arpa M templates/wmnet 2 files changed, 12 insertions(+), 0 deletions(-) Approvals: RobH: Looks good to me, approved jenkins-bot: Verified diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa index 436f401..2f63780 100644 --- a/templates/10.in-addr.arpa +++ b/templates/10.in-addr.arpa @@ -3191,6 +3191,12 @@ 55 1H IN PTR restbase2009-b.codfw.wmnet. 56 1H IN PTR restbase2009-c.codfw.wmnet. 57 1H IN PTR maps2004.codfw.wmnet. +58 1H IN PTR ms-be2022.codfw.wmnet. +59 1H IN PTR ms-be2023.codfw.wmnet. +60 1H IN PTR ms-be2024.codfw.wmnet. +61 1H IN PTR ms-be2025.codfw.wmnet. +62 1H IN PTR ms-be2026.codfw.wmnet. +63 1H IN PTR ms-be2027.codfw.wmnet. $ORIGIN 49.192.{{ zonename }}. 1 1H IN PTR vl2020-eth3.lvs2001.codfw.wmnet. diff --git a/templates/wmnet b/templates/wmnet index cab0853..b0535a6 100644 --- a/templates/wmnet +++ b/templates/wmnet @@ -2553,6 +2553,12 @@ ms-be2019 1H IN A10.192.16.161 ms-be2020 1H IN A10.192.32.126 ms-be2021 1H IN A10.192.32.127 +ms-be2022 1H IN A10.192.48.58 +ms-be2023 1H IN A10.192.48.59 +ms-be2024 1H IN A10.192.48.60 +ms-be2025 1H IN A10.192.48.61 +ms-be2026 1H IN A10.192.48.62 +ms-be2027 1H IN A10.192.48.63 ms-fe2001 1H IN A10.192.0.23 ms-fe2002 1H IN A10.192.0.24 ms-fe2003 1H IN A10.192.16.25 -- To view, visit https://gerrit.wikimedia.org/r/294932 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5a9f83dde3fbf6f3fd913c979288833fe11c4c44 Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: RobHGerrit-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] cassandra: default to 2.2.6-wmf1 - change (operations/puppet)
Filippo Giunchedi has submitted this change and it was merged. Change subject: cassandra: default to 2.2.6-wmf1 .. cassandra: default to 2.2.6-wmf1 we are "past" 2.2.6 by now with the histogram fixes applied in 2.2.6-wmf1, default to that version instead. Bug: T137952 Change-Id: I170cc2af61211bd98394d60edaff82a84aa931ce --- M hieradata/regex.yaml M modules/cassandra/manifests/init.pp 2 files changed, 1 insertion(+), 3 deletions(-) Approvals: Filippo Giunchedi: Verified; Looks good to me, approved diff --git a/hieradata/regex.yaml b/hieradata/regex.yaml index e0925d2..813672e 100644 --- a/hieradata/regex.yaml +++ b/hieradata/regex.yaml @@ -77,7 +77,6 @@ cassandra_test_eqiad: __regex: !ruby/regexp /^(cerium|praseodymium|xenon)\.eqiad\.wmnet$/ cluster: restbase_test - cassandra::version: 2.2.6-wmf1 cassandra::seeds: - cerium.eqiad.wmnet - cerium-a.eqiad.wmnet @@ -164,7 +163,6 @@ cassandra_test_codfw: __regex: !ruby/regexp /^restbase-test200[1-3]\.codfw\.wmnet$/ cluster: restbase_test - cassandra::version: 2.2.6-wmf1 cassandra::seeds: - cerium.eqiad.wmnet - cerium-a.eqiad.wmnet diff --git a/modules/cassandra/manifests/init.pp b/modules/cassandra/manifests/init.pp index 1363c48..5aa8108 100644 --- a/modules/cassandra/manifests/init.pp +++ b/modules/cassandra/manifests/init.pp @@ -365,7 +365,7 @@ # We pin the version to a specific one $package_version = $target_version ? { '2.1' => hiera('cassandra::version', '2.1.13'), -'2.2' => hiera('cassandra::version', '2.2.6'), +'2.2' => hiera('cassandra::version', '2.2.6-wmf1'), } package { 'cassandra': ensure => $package_version, -- To view, visit https://gerrit.wikimedia.org/r/294924 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I170cc2af61211bd98394d60edaff82a84aa931ce Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Filippo GiunchediGerrit-Reviewer: Eevans Gerrit-Reviewer: Filippo Giunchedi Gerrit-Reviewer: Giuseppe Lavagetto Gerrit-Reviewer: Mobrovac Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] adding production dns entries for ms-be202[2-7] - change (operations/dns)
RobH has uploaded a new change for review. https://gerrit.wikimedia.org/r/294932 Change subject: adding production dns entries for ms-be202[2-7] .. adding production dns entries for ms-be202[2-7] seems when the mgmt entries were added earlier, the production entries were overlooked. T136630 Change-Id: I5a9f83dde3fbf6f3fd913c979288833fe11c4c44 --- M templates/10.in-addr.arpa M templates/wmnet 2 files changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dns refs/changes/32/294932/1 diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa index 436f401..2f63780 100644 --- a/templates/10.in-addr.arpa +++ b/templates/10.in-addr.arpa @@ -3191,6 +3191,12 @@ 55 1H IN PTR restbase2009-b.codfw.wmnet. 56 1H IN PTR restbase2009-c.codfw.wmnet. 57 1H IN PTR maps2004.codfw.wmnet. +58 1H IN PTR ms-be2022.codfw.wmnet. +59 1H IN PTR ms-be2023.codfw.wmnet. +60 1H IN PTR ms-be2024.codfw.wmnet. +61 1H IN PTR ms-be2025.codfw.wmnet. +62 1H IN PTR ms-be2026.codfw.wmnet. +63 1H IN PTR ms-be2027.codfw.wmnet. $ORIGIN 49.192.{{ zonename }}. 1 1H IN PTR vl2020-eth3.lvs2001.codfw.wmnet. diff --git a/templates/wmnet b/templates/wmnet index cab0853..b0535a6 100644 --- a/templates/wmnet +++ b/templates/wmnet @@ -2553,6 +2553,12 @@ ms-be2019 1H IN A10.192.16.161 ms-be2020 1H IN A10.192.32.126 ms-be2021 1H IN A10.192.32.127 +ms-be2022 1H IN A10.192.48.58 +ms-be2023 1H IN A10.192.48.59 +ms-be2024 1H IN A10.192.48.60 +ms-be2025 1H IN A10.192.48.61 +ms-be2026 1H IN A10.192.48.62 +ms-be2027 1H IN A10.192.48.63 ms-fe2001 1H IN A10.192.0.23 ms-fe2002 1H IN A10.192.0.24 ms-fe2003 1H IN A10.192.16.25 -- To view, visit https://gerrit.wikimedia.org/r/294932 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5a9f83dde3fbf6f3fd913c979288833fe11c4c44 Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: RobH___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Repool db1073 with low weight after reimage - change (operations/mediawiki-config)
Jcrespo has uploaded a new change for review. https://gerrit.wikimedia.org/r/294931 Change subject: Repool db1073 with low weight after reimage .. Repool db1073 with low weight after reimage Change-Id: Ia2180257dc32464bb814e2a5e628eb7875d1b09e --- M wmf-config/db-eqiad.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/31/294931/1 diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php index c76b2b7..a05f569 100644 --- a/wmf-config/db-eqiad.php +++ b/wmf-config/db-eqiad.php @@ -96,7 +96,7 @@ 'db1065' => 50, # 2.8TB 160GB, api 'db1066' => 50, # 2.8TB 160GB, api 'db1072' => 450, # 2.8TB 160GB -# 'db1073' => 500, # 2.8TB 160GB, down for maintenance + 'db1073' => 50, # 2.8TB 160GB, low weight 'db1080' => 300, # 3.6TB 512GB 'db1083' => 300, # 3.6TB 512GB 'db1089' => 300, # 3.6TB 512GB -- To view, visit https://gerrit.wikimedia.org/r/294931 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia2180257dc32464bb814e2a5e628eb7875d1b09e Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Jcrespo___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Move dataset ferm rules into the role - change (operations/puppet)
Muehlenhoff has uploaded a new change for review. https://gerrit.wikimedia.org/r/294930 Change subject: Move dataset ferm rules into the role .. Move dataset ferm rules into the role Ferm rules/services should be defined in the roles, not the modules. Change-Id: I1647c44b30861c47bba92d05d154acd7f2b18fe7 --- M modules/dataset/manifests/nfs.pp M modules/role/manifests/dataset/primary.pp M modules/role/manifests/dataset/secondary.pp 3 files changed, 48 insertions(+), 24 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/30/294930/1 diff --git a/modules/dataset/manifests/nfs.pp b/modules/dataset/manifests/nfs.pp index 8c8e2bf..3749f09 100644 --- a/modules/dataset/manifests/nfs.pp +++ b/modules/dataset/manifests/nfs.pp @@ -53,28 +53,4 @@ description => 'NFS', check_command => 'check_tcp!2049', } - -ferm::service { 'nfs_rpc_mountd': -proto => 'tcp', -port => '32767', -srange => '$INTERNAL', -} - -ferm::service { 'nfs_rpc_statd': -proto => 'tcp', -port => '32765', -srange => '$INTERNAL', -} - -ferm::service { 'nfs_portmapper_udp': -proto => 'udp', -port => '111', -srange => '$INTERNAL', -} - -ferm::service { 'nfs_portmapper_tcp': -proto => 'tcp', -port => '111', -srange => '$INTERNAL', -} } diff --git a/modules/role/manifests/dataset/primary.pp b/modules/role/manifests/dataset/primary.pp index 4d547e3..f21f876 100644 --- a/modules/role/manifests/dataset/primary.pp +++ b/modules/role/manifests/dataset/primary.pp @@ -112,5 +112,29 @@ destination => '/data/xmldatadumps/public/other/unique_devices', minute => '31', } + +ferm::service { 'nfs_rpc_mountd': +proto => 'tcp', +port => '32767', +srange => '$INTERNAL', +} + +ferm::service { 'nfs_rpc_statd': +proto => 'tcp', +port => '32765', +srange => '$INTERNAL', +} + +ferm::service { 'nfs_portmapper_udp': +proto => 'udp', +port => '111', +srange => '$INTERNAL', +} + +ferm::service { 'nfs_portmapper_tcp': +proto => 'tcp', +port => '111', +srange => '$INTERNAL', +} } diff --git a/modules/role/manifests/dataset/secondary.pp b/modules/role/manifests/dataset/secondary.pp index 37bdcf2..2e6fdfd 100644 --- a/modules/role/manifests/dataset/secondary.pp +++ b/modules/role/manifests/dataset/secondary.pp @@ -20,4 +20,28 @@ grabs => $grabs, uploads => $uploads, } + +ferm::service { 'nfs_rpc_mountd': +proto => 'tcp', +port => '32767', +srange => '$INTERNAL', +} + +ferm::service { 'nfs_rpc_statd': +proto => 'tcp', +port => '32765', +srange => '$INTERNAL', +} + +ferm::service { 'nfs_portmapper_udp': +proto => 'udp', +port => '111', +srange => '$INTERNAL', +} + +ferm::service { 'nfs_portmapper_tcp': +proto => 'tcp', +port => '111', +srange => '$INTERNAL', +} } -- To view, visit https://gerrit.wikimedia.org/r/294930 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1647c44b30861c47bba92d05d154acd7f2b18fe7 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Muehlenhoff___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] backfillUnreadWikis.php: Add rebuild mode - change (mediawiki...Echo)
jenkins-bot has submitted this change and it was merged. Change subject: backfillUnreadWikis.php: Add rebuild mode .. backfillUnreadWikis.php: Add rebuild mode In rebuild mode, we only process users who already have a row in the euw table. This reduces the number of users we have to process significantly. Thanks to Stephane for this idea. Also, don't force a recache of the alert and message counts, it's OK to fetch them from cache. We also don't need to invalidate any caches in this script, because the transition flag from Ibcc8ac102 will ensure that the cached global counts are correct. Change-Id: I69c54cac47468647df2778b2d82f1b5dd9e574d3 --- M maintenance/backfillUnreadWikis.php 1 file changed, 24 insertions(+), 11 deletions(-) Approvals: Sbisson: Looks good to me, approved jenkins-bot: Verified diff --git a/maintenance/backfillUnreadWikis.php b/maintenance/backfillUnreadWikis.php index b95fb5d..a230988 100644 --- a/maintenance/backfillUnreadWikis.php +++ b/maintenance/backfillUnreadWikis.php @@ -11,30 +11,43 @@ parent::__construct(); $this->mDescription = "Backfill echo_unread_wikis table"; - + $this->addOption( 'rebuild', 'Only recompute already-existing rows' ); $this->setBatchSize( 300 ); } public function execute() { - global $wgEchoSharedTrackingCluster; + $dbFactory = MWEchoDbFactory::newFromDefault(); + $lookup = CentralIdLookup::factory(); - $dbr = wfGetDB( DB_SLAVE ); - $iterator = new BatchRowIterator( $dbr, 'user', 'user_id', $this->mBatchSize ); - $iterator->setFetchColumns( User::selectFields() ); + $rebuild = $this->hasOption( 'rebuild' ); + if ( $rebuild ) { + $iterator = new BatchRowIterator( $dbFactory->getSharedDb( DB_SLAVE ), 'echo_unread_wikis', 'euw_user', $this->mBatchSize ); + $iterator->addConditions( array( 'euw_wiki' => wfWikiId() ) ); + } else { + $iterator = new BatchRowIterator( wfGetDB( DB_SLAVE ), 'user', 'user_id', $this->mBatchSize ); + $iterator->setFetchColumns( User::selectFields() ); + } $processed = 0; foreach ( $iterator as $batch ) { foreach ( $batch as $row ) { - $user = User::newFromRow( $row ); + if ( $rebuild ) { + $user = $lookup->localUserFromCentralId( $row->euw_user, CentralIdLookup::AUDIENCE_RAW ); + } else { + $user = User::newFromRow( $row ); + } + if ( !$user ) { + continue; + } $notifUser = MWEchoNotifUser::newFromUser( $user ); $uw = EchoUnreadWikis::newFromUser( $user ); if ( $uw ) { - $alertCount = $notifUser->getNotificationCount( false, DB_SLAVE, EchoAttributeManager::ALERT, false ); - $alertUnread = $notifUser->getLastUnreadNotificationTime( false, DB_SLAVE, EchoAttributeManager::ALERT, false ); + $alertCount = $notifUser->getNotificationCount( true, DB_SLAVE, EchoAttributeManager::ALERT, false ); + $alertUnread = $notifUser->getLastUnreadNotificationTime( true, DB_SLAVE, EchoAttributeManager::ALERT, false ); - $msgCount = $notifUser->getNotificationCount( false, DB_SLAVE, EchoAttributeManager::MESSAGE, false ); - $msgUnread = $notifUser->getLastUnreadNotificationTime( false, DB_SLAVE, EchoAttributeManager::MESSAGE, false ); + $msgCount = $notifUser->getNotificationCount( true, DB_SLAVE, EchoAttributeManager::MESSAGE, false ); + $msgUnread = $notifUser->getLastUnreadNotificationTime( true, DB_SLAVE, EchoAttributeManager::MESSAGE, false ); $uw->updateCount( wfWikiID(), $alertCount, $alertUnread, $msgCount, $msgUnread ); } @@ -42,7 +55,7 @@ $processed += count( $batch ); $this->output( "Updated $processed users.\n" ); - wfWaitForSlaves( false, false, $wgEchoSharedTrackingCluster ); + $dbFactory->waitForSlaves(); } } } -- To view, visit https://gerrit.wikimedia.org/r/294925 To unsubscribe, visit
[MediaWiki-commits] [Gerrit] Restart exim daily on Monday to Friday - change (operations/puppet)
Muehlenhoff has uploaded a new change for review. https://gerrit.wikimedia.org/r/294929 Change subject: Restart exim daily on Monday to Friday .. Restart exim daily on Monday to Friday This allows to pick up updated libraries automatically (e.g. in case of security updates or other bugfix updates in a stable release). Exim restarts are reliable and stateless. Bug: T135991 Change-Id: Iefc9517fe870a5a3e1ac1d448a17d6b65c569037 --- M modules/standard/manifests/mail/sender.pp 1 file changed, 11 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/29/294929/1 diff --git a/modules/standard/manifests/mail/sender.pp b/modules/standard/manifests/mail/sender.pp index b3cfbfb..d12b25e 100644 --- a/modules/standard/manifests/mail/sender.pp +++ b/modules/standard/manifests/mail/sender.pp @@ -3,4 +3,15 @@ queuerunner => 'queueonly', config => template("mail/exim4.minimal.${::realm}.erb"), } + +# Perform a daily restart on Monday to Friday to pick up updated +# versions in linked-in libraries etc. +cron { 'exim4_daily_restart': +ensure => present, +command => '/usr/sbin/service exim4 restart', +user=> 'root', +hour=> fqdn_rand(23, 'exim4_daily_restart'), +minute => fqdn_rand(59, 'exim4_daily_restart'), +weekday => '1-5', +} } -- To view, visit https://gerrit.wikimedia.org/r/294929 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iefc9517fe870a5a3e1ac1d448a17d6b65c569037 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Muehlenhoff___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Try to extract an excerpt from a revision - change (mediawiki...Echo)
Sbisson has uploaded a new change for review. https://gerrit.wikimedia.org/r/294928 Change subject: Try to extract an excerpt from a revision .. Try to extract an excerpt from a revision Bug: T120152 Change-Id: I91abb2dded9ab7f124aaa798dd07c52576ee791b --- M includes/DiscussionParser.php 1 file changed, 14 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/28/294928/1 diff --git a/includes/DiscussionParser.php b/includes/DiscussionParser.php index b52e58c..8e5dd3b 100644 --- a/includes/DiscussionParser.php +++ b/includes/DiscussionParser.php @@ -885,4 +885,18 @@ public static function htmlToText( $html ) { return trim( html_entity_decode( strip_tags( $html ), ENT_QUOTES ) ); } + + /** +* Extract an edit excerpt from a revision +* +* @param Revision $revision +* @param Language $lang +* @param int $length +* @return string +*/ + public static function getEditExcerpt( Revision $revision, Language $lang, $length = 150 ) { + $interpretation = self::getChangeInterpretationForRevision( $revision ); + $section = self::detectSectionTitleAndText( $interpretation ); + return $lang->truncate( $section['section-title'] . ' ' . $section['section-text'], $length ); + } } -- To view, visit https://gerrit.wikimedia.org/r/294928 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I91abb2dded9ab7f124aaa798dd07c52576ee791b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: Sbisson___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Normalize newline separators in table wikitext - change (mediawiki...parsoid)
Subramanya Sastry has submitted this change and it was merged. Change subject: Normalize newline separators in table wikitext .. Normalize newline separators in table wikitext * No reason to emit 2 newlines around tr/th/td/caption wikitext. * Updated html & wikitext for some parser tests + marked some tests wt2html only since we know the extra whitespace won't roundtrip. * In production deploys, this means that edited rows/cells might see occasional dirty diffs because of normalized whitespace. The expectation is that this is going to be really rare in practice since selser covers us in the common case. Change-Id: I4dd0e5f30b3c5e327544498964f351ce913cf64a --- M lib/html2wt/DOMHandlers.js M tests/parserTests-blacklist.js M tests/parserTests.txt 3 files changed, 108 insertions(+), 122 deletions(-) Approvals: Arlolra: Looks good to me, approved Subramanya Sastry: Verified; Looks good to me, approved diff --git a/lib/html2wt/DOMHandlers.js b/lib/html2wt/DOMHandlers.js index 4a6dfb9..dd55491 100644 --- a/lib/html2wt/DOMHandlers.js +++ b/lib/html2wt/DOMHandlers.js @@ -699,8 +699,8 @@ return { min: 0, max: 2 }; } }, - firstChild: id({ min: 1, max: 2 }), - lastChild: id({ min: 1, max: 2 }), + firstChild: id({ min: 1, max: 1 }), + lastChild: id({ min: 1, max: 1 }), }, }, tbody: justChildren, @@ -727,13 +727,13 @@ sepnls: { before: function(node, otherNode) { if (trWikitextNeeded(node, DU.getDataParsoid(node))) { - return { min: 1, max: 2 }; + return { min: 1, max: 1 }; } else { - return { min: 0, max: 2 }; + return { min: 0, max: 1 }; } }, after: function(node, otherNode) { - return { min: 0, max: 2 }; + return { min: 0, max: 1 }; }, }, }, @@ -760,17 +760,17 @@ if (otherNode.nodeName === 'TH' && DU.getDataParsoid(node).stx_v === 'row') { // force single line - return { min: 0, max: 2 }; + return { min: 0, max: 1 }; } else { - return { min: 1, max: 2 }; + return { min: 1, max: 1 }; } }, after: function(node, otherNode) { if (otherNode.nodeName === 'TD') { // Force a newline break - return { min: 1, max: 2 }; + return { min: 1, max: 1 }; } else { - return { min: 0, max: 2 }; + return { min: 0, max: 1 }; } }, }, @@ -799,12 +799,12 @@ if (otherNode.nodeName === 'TD' && DU.getDataParsoid(node).stx_v === 'row') { // force single line - return { min: 0, max: 2 }; + return { min: 0, max: 1 }; } else { - return { min: 1, max: 2 }; + return { min: 1, max: 1 }; } }, - after: id({ min: 0, max: 2 }), + after: id({ min: 0, max: 1 }), }, }, caption: { @@ -820,9 +820,9 @@ sepnls: { before: function(node, otherNode) { return otherNode.nodeName !== 'TABLE' ? - { min: 1, max: 2 } : { min: 0, max: 2 }; + { min: 1, max: 1 } : { min: 0, max: 1 }; }, - after: id({ min: 1, max: 2 }), + after: id({ min: 1, max: 1 }), }, }, // Insert the text handler here too? diff --git a/tests/parserTests-blacklist.js
[MediaWiki-commits] [Gerrit] Cleanup handling of unattached users in session and authn pr... - change (mediawiki...CentralAuth)
Anomie has uploaded a new change for review. https://gerrit.wikimedia.org/r/294927 Change subject: Cleanup handling of unattached users in session and authn providers .. Cleanup handling of unattached users in session and authn providers The SessionProviders' invalidateSessionsForUser() were invalidating even if the local user exists and is unattached. It should only invalidate if the local user is attached or doesn't yet exist. CentralAuthPrimaryAuthenticationProvider had the opposite problem when changing passwords: it would only change the password if the local account exists and is attached, while for maintenance script use it should also change the password when no local account exists for the named user. Change-Id: I67f8a9219eda9d1ae11381901ca642cf08a0cd0a --- M includes/CentralAuthPrimaryAuthenticationProvider.php M includes/session/CentralAuthSessionProvider.php M includes/session/CentralAuthTokenSessionProvider.php 3 files changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth refs/changes/27/294927/1 diff --git a/includes/CentralAuthPrimaryAuthenticationProvider.php b/includes/CentralAuthPrimaryAuthenticationProvider.php index a79e522..37efa16 100644 --- a/includes/CentralAuthPrimaryAuthenticationProvider.php +++ b/includes/CentralAuthPrimaryAuthenticationProvider.php @@ -305,7 +305,7 @@ $username = User::getCanonicalName( $req->username, 'usable' ); if ( $username !== false ) { $centralUser = CentralAuthUser::getInstanceByName( $username ); - if ( $centralUser && $centralUser->isAttached() ) { + if ( $centralUser->isAttached() || !User::idFromName( $username, User::READ_LATEST ) ) { $sv = StatusValue::newGood(); if ( $req->password !== null ) { if ( $req->password !== $req->retype ) { @@ -330,7 +330,7 @@ if ( get_class( $req ) === PasswordAuthenticationRequest::class ) { $centralUser = CentralAuthUser::getMasterInstanceByName( $username ); - if ( $centralUser && $centralUser->isAttached() ) { + if ( $centralUser->isAttached() || !User::idFromName( $username, User::READ_LATEST ) ) { $centralUser->setPassword( $req->password ); } } diff --git a/includes/session/CentralAuthSessionProvider.php b/includes/session/CentralAuthSessionProvider.php index 922c98d..75ced82 100644 --- a/includes/session/CentralAuthSessionProvider.php +++ b/includes/session/CentralAuthSessionProvider.php @@ -373,7 +373,7 @@ public function invalidateSessionsForUser( User $user ) { $centralUser = CentralAuthUser::getMasterInstance( $user ); - if ( $centralUser->exists() ) { + if ( $centralUser->isAttached() || $user->isAnon() ) { $centralUser->resetAuthToken(); } } diff --git a/includes/session/CentralAuthTokenSessionProvider.php b/includes/session/CentralAuthTokenSessionProvider.php index c2219d7..9ad5ec5 100644 --- a/includes/session/CentralAuthTokenSessionProvider.php +++ b/includes/session/CentralAuthTokenSessionProvider.php @@ -151,7 +151,7 @@ public function invalidateSessionsForUser( User $user ) { $centralUser = CentralAuthUser::getMasterInstance( $user ); - if ( $centralUser->exists() ) { + if ( $centralUser->isAttached() || $user->isAnon() ) { $centralUser->resetAuthToken(); } } -- To view, visit https://gerrit.wikimedia.org/r/294927 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I67f8a9219eda9d1ae11381901ca642cf08a0cd0a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CentralAuth Gerrit-Branch: master Gerrit-Owner: Anomie___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Remove nas1001-a.eqiad.wmnet, nas1001-b.eqiad.wmnet - change (operations/dns)
Alexandros Kosiaris has submitted this change and it was merged. Change subject: Remove nas1001-a.eqiad.wmnet, nas1001-b.eqiad.wmnet .. Remove nas1001-a.eqiad.wmnet, nas1001-b.eqiad.wmnet Remove references to nas1001-a.eqiad.wmnet and nas1001-b.eqiad.wmnet Bug: T124156 Change-Id: If8a3456a0419e77186b67062e08d87de05ead003 --- M templates/10.in-addr.arpa M templates/wmnet 2 files changed, 0 insertions(+), 15 deletions(-) Approvals: Alexandros Kosiaris: Looks good to me, approved jenkins-bot: Verified diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa index dd7bb0b..436f401 100644 --- a/templates/10.in-addr.arpa +++ b/templates/10.in-addr.arpa @@ -448,8 +448,6 @@ 1 1H IN PTR vrrp-gw-1018.eqiad.wmnet. 2 1H IN PTR ae2-1018.cr1-eqiad.wikimedia.org. 3 1H IN PTR ae2-1018.cr2-eqiad.wikimedia.org. -4 1H IN PTR nas1001-a.eqiad.wmnet. -5 1H IN PTR nas1001-b.eqiad.wmnet. 6 1H IN PTR graphite1002.eqiad.wmnet. 7 1H IN PTR db1018.eqiad.wmnet. 8 1H IN PTR db1019.eqiad.wmnet. @@ -481,8 +479,6 @@ 35 1H IN PTR db1046.eqiad.wmnet. 36 1H IN PTR db1047.eqiad.wmnet. 37 1H IN PTR db1048.eqiad.wmnet. -38 1H IN PTR e0M.nas1001-a.eqiad.wmnet. -39 1H IN PTR e0M.nas1001-b.eqiad.wmnet. 40 1H IN PTR ms-be1020.eqiad.wmnet. 41 1H IN PTR kafka1002.eqiad.wmnet. 42 1H IN PTR maps1002.eqiad.wmnet. @@ -1220,10 +1216,6 @@ 61 1H IN PTR ps1-d6-eqiad.mgmt.eqiad.wmnet. 62 1H IN PTR ps1-d7-eqiad.mgmt.eqiad.wmnet. 63 1H IN PTR ps1-d8-eqiad.mgmt.eqiad.wmnet. - -101 1H IN PTR nas1001-a.mgmt.eqiad.wmnet. -102 1H IN PTR nas1001-b.mgmt.eqiad.wmnet. - $ORIGIN 1.65.{{ zonename }}. diff --git a/templates/wmnet b/templates/wmnet index 089a9ec..cab0853 100644 --- a/templates/wmnet +++ b/templates/wmnet @@ -92,10 +92,6 @@ cam1-c-eqiad1H IN A10.64.32.82 cam2-c-eqiad1H IN A10.64.32.83 -; Netapps -nas1001-a 1H IN A10.64.16.4 -nas1001-b 1H IN A10.64.16.5 - ;Servers - listed alphabetically analytics1001 1H IN A 10.64.36.118 @@ -923,9 +919,6 @@ ps1-d6-eqiad1H IN A10.65.0.61 ps1-d7-eqiad1H IN A10.65.0.62 ps1-d8-eqiad1H IN A10.65.0.63 - -nas1001-a 1H IN A10.65.0.102 -nas1001-b 1H IN A10.65.0.101 WMF3134 1H IN A10.65.2.1 radium 1H IN A10.65.2.1 -- To view, visit https://gerrit.wikimedia.org/r/267056 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If8a3456a0419e77186b67062e08d87de05ead003 Gerrit-PatchSet: 2 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: Alexandros KosiarisGerrit-Reviewer: Alexandros Kosiaris Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] NotifUser: rename preloadKeys() to getPreloadKeys() and make... - change (mediawiki...Echo)
Catrope has uploaded a new change for review. https://gerrit.wikimedia.org/r/294926 Change subject: NotifUser: rename preloadKeys() to getPreloadKeys() and make it tolerate uncomputable keys .. NotifUser: rename preloadKeys() to getPreloadKeys() and make it tolerate uncomputable keys Change-Id: Id9a39a481533d39f99c9d7f43c573af81fe957cf --- M includes/NotifUser.php 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/26/294926/1 diff --git a/includes/NotifUser.php b/includes/NotifUser.php index 1755c90..0bf 100644 --- a/includes/NotifUser.php +++ b/includes/NotifUser.php @@ -578,7 +578,7 @@ // Populate the instance cache if ( $this->cached === null ) { - $keys = $this->preloadKeys(); + $keys = $this->getPreloadKeys(); $this->cached = $this->cache->getMulti( $keys ); // also keep track of cache values that couldn't be found (getMulti // omits them...) @@ -618,7 +618,7 @@ * * @return array */ - protected function preloadKeys() { + protected function getPreloadKeys() { $keys = array( 'echo-notification-timestamp', 'echo-notification-timestamp-' . EchoAttributeManager::MESSAGE, @@ -628,10 +628,10 @@ 'echo-notification-count-' . EchoAttributeManager::ALERT, ); - return array_merge( + return array_filter( array_merge( array_map( array( $this, 'getMemcKey' ), $keys ), array_map( array( $this, 'getGlobalMemcKey' ), $keys ) - ); + ) ); } /** -- To view, visit https://gerrit.wikimedia.org/r/294926 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id9a39a481533d39f99c9d7f43c573af81fe957cf Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: Catrope___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] cassandra: default to 2.2.6-wmf1 - change (operations/puppet)
Filippo Giunchedi has uploaded a new change for review. https://gerrit.wikimedia.org/r/294924 Change subject: cassandra: default to 2.2.6-wmf1 .. cassandra: default to 2.2.6-wmf1 we are "past" 2.2.6 by now with the histogram fixes applied in 2.2.6-wmf1, default to that version instead. Bug: T137952 Change-Id: I170cc2af61211bd98394d60edaff82a84aa931ce --- M modules/cassandra/manifests/init.pp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/24/294924/1 diff --git a/modules/cassandra/manifests/init.pp b/modules/cassandra/manifests/init.pp index 1363c48..5aa8108 100644 --- a/modules/cassandra/manifests/init.pp +++ b/modules/cassandra/manifests/init.pp @@ -365,7 +365,7 @@ # We pin the version to a specific one $package_version = $target_version ? { '2.1' => hiera('cassandra::version', '2.1.13'), -'2.2' => hiera('cassandra::version', '2.2.6'), +'2.2' => hiera('cassandra::version', '2.2.6-wmf1'), } package { 'cassandra': ensure => $package_version, -- To view, visit https://gerrit.wikimedia.org/r/294924 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I170cc2af61211bd98394d60edaff82a84aa931ce Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Filippo Giunchedi___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] backfillUnreadWikis.php: Add rebuild mode - change (mediawiki...Echo)
Catrope has uploaded a new change for review. https://gerrit.wikimedia.org/r/294925 Change subject: backfillUnreadWikis.php: Add rebuild mode .. backfillUnreadWikis.php: Add rebuild mode In rebuild mode, we only process users who already have a row in the euw table. This reduces the number of users we have to process significantly. Thanks to Stephane for this idea. Also, don't force a recache of the alert and message counts, it's OK to fetch them from cache. We also don't need to invalidate any caches in this script, because the transition flag from Ibcc8ac102 will ensure that the cached global counts are correct. Change-Id: I69c54cac47468647df2778b2d82f1b5dd9e574d3 --- M maintenance/backfillUnreadWikis.php 1 file changed, 24 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/25/294925/1 diff --git a/maintenance/backfillUnreadWikis.php b/maintenance/backfillUnreadWikis.php index b95fb5d..dba01b6 100644 --- a/maintenance/backfillUnreadWikis.php +++ b/maintenance/backfillUnreadWikis.php @@ -11,30 +11,43 @@ parent::__construct(); $this->mDescription = "Backfill echo_unread_wikis table"; - + $this->addOption( 'rebuild', 'Only recompute already-existing rows' ); $this->setBatchSize( 300 ); } public function execute() { - global $wgEchoSharedTrackingCluster; + $dbFactory = MWEchoDbFactory::newFromDefault(); + $lookup = CentralIdLookup::factory(); - $dbr = wfGetDB( DB_SLAVE ); - $iterator = new BatchRowIterator( $dbr, 'user', 'user_id', $this->mBatchSize ); - $iterator->setFetchColumns( User::selectFields() ); + $rebuild = $this->hasOption( 'rebuild' ); + if ( $rebuild ) { + $iterator = new BatchRowIterator( $dbFactory->getEchoDb( DB_SLAVE ), 'echo_unread_wikis', 'euw_user' ); + $iterator->addConditions( array( 'euw_wiki' => wfWikiId() ) ); + } else { + $iterator = new BatchRowIterator( wfGetDB( DB_SLAVE ), 'user', 'user_id', $this->mBatchSize ); + $iterator->setFetchColumns( User::selectFields() ); + } $processed = 0; foreach ( $iterator as $batch ) { foreach ( $batch as $row ) { - $user = User::newFromRow( $row ); + if ( $rebuild ) { + $user = $lookup->localUserFromCentralId( $row->euw_user, CentralIdLookup::AUDIENCE_RAW ); + } else { + $user = User::newFromRow( $row ); + } + if ( !$user ) { + continue; + } $notifUser = MWEchoNotifUser::newFromUser( $user ); $uw = EchoUnreadWikis::newFromUser( $user ); if ( $uw ) { - $alertCount = $notifUser->getNotificationCount( false, DB_SLAVE, EchoAttributeManager::ALERT, false ); - $alertUnread = $notifUser->getLastUnreadNotificationTime( false, DB_SLAVE, EchoAttributeManager::ALERT, false ); + $alertCount = $notifUser->getNotificationCount( true, DB_SLAVE, EchoAttributeManager::ALERT, false ); + $alertUnread = $notifUser->getLastUnreadNotificationTime( true, DB_SLAVE, EchoAttributeManager::ALERT, false ); - $msgCount = $notifUser->getNotificationCount( false, DB_SLAVE, EchoAttributeManager::MESSAGE, false ); - $msgUnread = $notifUser->getLastUnreadNotificationTime( false, DB_SLAVE, EchoAttributeManager::MESSAGE, false ); + $msgCount = $notifUser->getNotificationCount( true, DB_SLAVE, EchoAttributeManager::MESSAGE, false ); + $msgUnread = $notifUser->getLastUnreadNotificationTime( true, DB_SLAVE, EchoAttributeManager::MESSAGE, false ); $uw->updateCount( wfWikiID(), $alertCount, $alertUnread, $msgCount, $msgUnread ); } @@ -42,7 +55,7 @@ $processed += count( $batch ); $this->output( "Updated $processed users.\n" ); - wfWaitForSlaves( false, false, $wgEchoSharedTrackingCluster ); + $dbFactory->waitForSlaves(); } } } -- To view, visit
[MediaWiki-commits] [Gerrit] Revert "Revert "Change Prop: Disable transclusion update rul... - change (operations/puppet)
Mobrovac has uploaded a new change for review. https://gerrit.wikimedia.org/r/294922 Change subject: Revert "Revert "Change Prop: Disable transclusion update rules"" .. Revert "Revert "Change Prop: Disable transclusion update rules"" This reverts commit 90b1e84ae622d4be8e4853abc0b1aaca08530dcf. Change-Id: I1d5c3c8791afed23464dea1189f3ebafc8681573 --- M modules/changeprop/templates/config.yaml.erb 1 file changed, 21 insertions(+), 21 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/22/294922/1 diff --git a/modules/changeprop/templates/config.yaml.erb b/modules/changeprop/templates/config.yaml.erb index de6d8a3..2c2a202 100644 --- a/modules/changeprop/templates/config.yaml.erb +++ b/modules/changeprop/templates/config.yaml.erb @@ -194,24 +194,24 @@ if-unmodified-since: '{{date(message.meta.dt)}}' query: redirect: false - - transclusion_update: -topic: mediawiki.revision_create -exec: - method: 'post' - uri: '/sys/links/transcludes/{{message.page_title}}' - body: '{{globals.message}}' - - on_transclusion_update: -topic: resource_change -match: - meta: -uri: '/https?:\/\/[^\/]+\/wiki\/(?.+)/' - tags: [ 'change-prop', 'transcludes' ] -exec: - method: get - uri: '<%= @restbase_uri %>/{{message.meta.domain}}/v1/page/html/{{match.meta.uri.title}}' - headers: -cache-control: no-cache - query: -redirect: false +# +# transclusion_update: +#topic: mediawiki.revision_create +#exec: +# method: 'post' +# uri: '/sys/links/transcludes/{{message.page_title}}' +# body: '{{globals.message}}' +# +# on_transclusion_update: +#topic: resource_change +#match: +# meta: +#uri: '/https?:\/\/[^\/]+\/wiki\/(?.+)/' +# tags: [ 'change-prop', 'transcludes' ] +#exec: +# method: get +# uri: '<%= @restbase_uri %>/{{message.meta.domain}}/v1/page/html/{{match.meta.uri.title}}' +# headers: +#cache-control: no-cache +# query: +#redirect: false -- To view, visit https://gerrit.wikimedia.org/r/294922 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1d5c3c8791afed23464dea1189f3ebafc8681573 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mobrovac___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Revert "Revert "Change Prop: Disable transclusion update rul... - change (operations/puppet)
Giuseppe Lavagetto has submitted this change and it was merged. Change subject: Revert "Revert "Change Prop: Disable transclusion update rules"" .. Revert "Revert "Change Prop: Disable transclusion update rules"" This reverts commit 90b1e84ae622d4be8e4853abc0b1aaca08530dcf. Change-Id: I1d5c3c8791afed23464dea1189f3ebafc8681573 --- M modules/changeprop/templates/config.yaml.erb 1 file changed, 21 insertions(+), 21 deletions(-) Approvals: Giuseppe Lavagetto: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/changeprop/templates/config.yaml.erb b/modules/changeprop/templates/config.yaml.erb index de6d8a3..2c2a202 100644 --- a/modules/changeprop/templates/config.yaml.erb +++ b/modules/changeprop/templates/config.yaml.erb @@ -194,24 +194,24 @@ if-unmodified-since: '{{date(message.meta.dt)}}' query: redirect: false - - transclusion_update: -topic: mediawiki.revision_create -exec: - method: 'post' - uri: '/sys/links/transcludes/{{message.page_title}}' - body: '{{globals.message}}' - - on_transclusion_update: -topic: resource_change -match: - meta: -uri: '/https?:\/\/[^\/]+\/wiki\/(?.+)/' - tags: [ 'change-prop', 'transcludes' ] -exec: - method: get - uri: '<%= @restbase_uri %>/{{message.meta.domain}}/v1/page/html/{{match.meta.uri.title}}' - headers: -cache-control: no-cache - query: -redirect: false +# +# transclusion_update: +#topic: mediawiki.revision_create +#exec: +# method: 'post' +# uri: '/sys/links/transcludes/{{message.page_title}}' +# body: '{{globals.message}}' +# +# on_transclusion_update: +#topic: resource_change +#match: +# meta: +#uri: '/https?:\/\/[^\/]+\/wiki\/(?.+)/' +# tags: [ 'change-prop', 'transcludes' ] +#exec: +# method: get +# uri: '<%= @restbase_uri %>/{{message.meta.domain}}/v1/page/html/{{match.meta.uri.title}}' +# headers: +#cache-control: no-cache +# query: +#redirect: false -- To view, visit https://gerrit.wikimedia.org/r/294922 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1d5c3c8791afed23464dea1189f3ebafc8681573 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: MobrovacGerrit-Reviewer: Giuseppe Lavagetto Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix missing '}' after entry - change (operations/puppet)
Jcrespo has submitted this change and it was merged. Change subject: Fix missing '}' after entry .. Fix missing '}' after entry Change-Id: I7aedc8176978af792f0f9710f4251fc5243675b1 --- M modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Jcrespo: Looks good to me, approved jenkins-bot: Verified 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 ce11005..59ebc8d 100644 --- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 +++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 @@ -1306,6 +1306,7 @@ host db1068 { hardware ethernet C8:1F:66:E5:39:F5; fixed-address db1068.eqiad.wmnet; +} host db1069 { hardware ethernet C8:1F:66:E5:E5:B0; -- To view, visit https://gerrit.wikimedia.org/r/294921 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7aedc8176978af792f0f9710f4251fc5243675b1 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: JcrespoGerrit-Reviewer: Jcrespo 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 missing '}' after entry - change (operations/puppet)
Jcrespo has uploaded a new change for review. https://gerrit.wikimedia.org/r/294921 Change subject: Fix missing '}' after entry .. Fix missing '}' after entry Change-Id: I7aedc8176978af792f0f9710f4251fc5243675b1 --- M modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/21/294921/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 ce11005..59ebc8d 100644 --- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 +++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 @@ -1306,6 +1306,7 @@ host db1068 { hardware ethernet C8:1F:66:E5:39:F5; fixed-address db1068.eqiad.wmnet; +} host db1069 { hardware ethernet C8:1F:66:E5:E5:B0; -- To view, visit https://gerrit.wikimedia.org/r/294921 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7aedc8176978af792f0f9710f4251fc5243675b1 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Jcrespo___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits