[MediaWiki-commits] [Gerrit] Change i18n message to allow non-Wikipedia projects - change (labs...heritage)
jenkins-bot has submitted this change and it was merged. Change subject: Change i18n message to allow non-Wikipedia projects .. Change i18n message to allow non-Wikipedia projects This goes together with the message change in https://github.com/Krinkle/intuition/pull/56 but it is unclear to me in which order these should be merged/deployed Change-Id: I13a8cb933acb8afbb1c6ea0527a381dc53dc8fe8 --- M api/includes/FormatHtmllist.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Lokal Profil: Looks good to me, approved jenkins-bot: Verified diff --git a/api/includes/FormatHtmllist.php b/api/includes/FormatHtmllist.php index 69d24fe..4b4a898 100644 --- a/api/includes/FormatHtmllist.php +++ b/api/includes/FormatHtmllist.php @@ -123,7 +123,7 @@ if ( isset($row->source) and $row->source ) { if (preg_match("/^(.+?)&/", $row->source, $matches) ) { $wikiListUrl = $matches[1]; - $desc .= '' . $I18N->msg('source-monuments-list-on-wikipedia') . ''; + $desc .= '' . $I18N->msg('source-monuments-list') . ''; } } -- To view, visit https://gerrit.wikimedia.org/r/286796 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I13a8cb933acb8afbb1c6ea0527a381dc53dc8fe8 Gerrit-PatchSet: 3 Gerrit-Project: labs/tools/heritage Gerrit-Branch: master Gerrit-Owner: Lokal ProfilGerrit-Reviewer: Jean-Frédéric Gerrit-Reviewer: Lokal Profil Gerrit-Reviewer: Multichill 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 progressive rendering of JPEGs - change (apps...wikipedia)
jenkins-bot has submitted this change and it was merged. Change subject: Enable progressive rendering of JPEGs .. Enable progressive rendering of JPEGs I haven't actually noticed a difference but it seems like a good thing to enable. Change-Id: I8cf52578d6ea08dc8e3b0a508f3c5fd6686ae45b --- M app/src/main/java/org/wikipedia/page/gallery/ImagePipelineBitmapGetter.java M app/src/main/java/org/wikipedia/page/leadimages/ImageViewWithFace.java 2 files changed, 4 insertions(+), 1 deletion(-) Approvals: Krinkle: Looks good to me, but someone else must approve BearND: Looks good to me, but someone else must approve Mholloway: Looks good to me, approved jenkins-bot: Verified diff --git a/app/src/main/java/org/wikipedia/page/gallery/ImagePipelineBitmapGetter.java b/app/src/main/java/org/wikipedia/page/gallery/ImagePipelineBitmapGetter.java index a953e03..8b60b01 100644 --- a/app/src/main/java/org/wikipedia/page/gallery/ImagePipelineBitmapGetter.java +++ b/app/src/main/java/org/wikipedia/page/gallery/ImagePipelineBitmapGetter.java @@ -34,7 +34,9 @@ } public void get() { -ImageRequest request = ImageRequestBuilder.newBuilderWithSource(Uri.parse(imageUrl)).build(); +ImageRequest request = ImageRequestBuilder.newBuilderWithSource(Uri.parse(imageUrl)) +.setProgressiveRenderingEnabled(true) +.build(); ImagePipeline imagePipeline = Fresco.getImagePipeline(); DataSourcedataSource = imagePipeline.fetchDecodedImage(request, context); dataSource.subscribe(new BitmapDataSubscriber(), UiThreadImmediateExecutorService.getInstance()); diff --git a/app/src/main/java/org/wikipedia/page/leadimages/ImageViewWithFace.java b/app/src/main/java/org/wikipedia/page/leadimages/ImageViewWithFace.java index 499420b..ec261f9 100644 --- a/app/src/main/java/org/wikipedia/page/leadimages/ImageViewWithFace.java +++ b/app/src/main/java/org/wikipedia/page/leadimages/ImageViewWithFace.java @@ -54,6 +54,7 @@ public void loadImage(String url) { ImageRequest request = ImageRequestBuilder.newBuilderWithSource(Uri.parse(url)) +.setProgressiveRenderingEnabled(true) .setPostprocessor(facePostprocessor) .build(); PipelineDraweeController controller = (PipelineDraweeController) -- To view, visit https://gerrit.wikimedia.org/r/288121 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8cf52578d6ea08dc8e3b0a508f3c5fd6686ae45b Gerrit-PatchSet: 2 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Niedzielski Gerrit-Reviewer: BearND Gerrit-Reviewer: Brion VIBBER Gerrit-Reviewer: Dbrant Gerrit-Reviewer: Krinkle Gerrit-Reviewer: Mholloway Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add /wiki/WP* to landing page patterns - change (wikimedia...DjangoBannerStats)
Cdentinger has submitted this change and it was merged. Change subject: Add /wiki/WP* to landing page patterns .. Add /wiki/WP* to landing page patterns To match WP-Video-2016. TODO: document the patterns on https://www.mediawiki.org/wiki/Fundraising_tech/tools Bug: T132500 Change-Id: I6f114ac2c1cdbbee934d4d81e5793ff31e430d81 --- M fundraiser/analytics/regex.py 1 file changed, 5 insertions(+), 1 deletion(-) Approvals: Cdentinger: Verified; Looks good to me, approved diff --git a/fundraiser/analytics/regex.py b/fundraiser/analytics/regex.py index 27170fd..eccfde9 100644 --- a/fundraiser/analytics/regex.py +++ b/fundraiser/analytics/regex.py @@ -134,6 +134,9 @@ ), ] +# For the benefit of fr-non-tech people creating links to landing pages, please +# keep https://www.mediawiki.org/w/index.php?title=Fundraising_tech/tools up to +# date with any changes you make to the patterns below! landingpages = [ re.compile( r""" @@ -159,7 +162,7 @@ ), re.compile( r""" -# match all of the landing page patterns on wmfwiki +# match all of the landing page patterns on donatewiki (http|https) :// (?Pdonate.wikimedia.org)/ @@ -171,6 +174,7 @@ | L2011 # potential landing page naming scheme for 2011 | L2012 # potential landing page naming scheme for 2012 | WMF # eg WMFJA085 + | WP # eg WP-Video-2016 ) (?:(?!\?|&)[\S])* # this will give us the landing page up to the next ? or & ) -- To view, visit https://gerrit.wikimedia.org/r/289255 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6f114ac2c1cdbbee934d4d81e5793ff31e430d81 Gerrit-PatchSet: 2 Gerrit-Project: wikimedia/fundraising/tools/DjangoBannerStats Gerrit-Branch: master Gerrit-Owner: EjeggGerrit-Reviewer: Awight Gerrit-Reviewer: Cdentinger ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix cookies and user options - change (apps...wikipedia)
jenkins-bot has submitted this change and it was merged. Change subject: Fix cookies and user options .. Fix cookies and user options • The cookie jar was only being used for old Api requests. Use the same OkHttpClient and cookie manager everywhere. • HttpCookie.getDomain() now seems to return a top level domain like wikipedia.org instead of en.wikipedia.org. This appears to affect only the user option cookie loosening around meta.wikimedia.org. Make the check slightly looser. • There is a race condition with obtaining the edit token used to preserve user options. For now, catch the error and handle it like a network issue. Change-Id: Ibf3985f1fcf0b349c9d8ec799adf8d2587d854a0 --- M app/src/main/java/org/wikipedia/OkHttpConnectionFactory.java M app/src/main/java/org/wikipedia/SharedPreferenceCookieManager.java M app/src/main/java/org/wikipedia/dataclient/retrofit/RetrofitFactory.java M app/src/main/java/org/wikipedia/useroption/dataclient/DefaultUserOptionDataClient.java 4 files changed, 37 insertions(+), 36 deletions(-) Approvals: BearND: Looks good to me, but someone else must approve Mholloway: Looks good to me, approved jenkins-bot: Verified diff --git a/app/src/main/java/org/wikipedia/OkHttpConnectionFactory.java b/app/src/main/java/org/wikipedia/OkHttpConnectionFactory.java index 65428a4..abe8adb 100644 --- a/app/src/main/java/org/wikipedia/OkHttpConnectionFactory.java +++ b/app/src/main/java/org/wikipedia/OkHttpConnectionFactory.java @@ -1,13 +1,11 @@ package org.wikipedia; import android.content.Context; +import android.support.annotation.NonNull; + import com.github.kevinsawicki.http.HttpRequest; -import okhttp3.Cache; -import okhttp3.CookieJar; -import okhttp3.JavaNetCookieJar; -import okhttp3.OkHttpClient; -import okhttp3.OkUrlFactory; -import okhttp3.Protocol; + +import org.wikipedia.settings.Prefs; import java.io.IOException; import java.net.HttpURLConnection; @@ -16,13 +14,21 @@ import java.util.ArrayList; import java.util.List; +import okhttp3.Cache; +import okhttp3.CookieJar; +import okhttp3.JavaNetCookieJar; +import okhttp3.OkHttpClient; +import okhttp3.OkUrlFactory; +import okhttp3.Protocol; +import okhttp3.logging.HttpLoggingInterceptor; + public class OkHttpConnectionFactory implements HttpRequest.ConnectionFactory { private static final long HTTP_CACHE_SIZE = 16 * 1024 * 1024; private final OkHttpClient client; -public OkHttpConnectionFactory(Context context) { -client = createClient(context); +public OkHttpConnectionFactory(@NonNull Context context) { +client = createClient(context).build(); } @Override @@ -36,7 +42,7 @@ "Per-connection proxy is not supported. Use OkHttpClient's setProxy instead."); } -public static OkHttpClient createClient(Context context) { +public static OkHttpClient.Builder createClient(@NonNull Context context) { // Create a custom set of protocols that excludes HTTP/2, since OkHttp doesn't play // nicely with nginx over HTTP/2. // TODO: Remove when https://github.com/square/okhttp/issues/2543 is fixed. @@ -49,10 +55,13 @@ // TODO: consider using okhttp3.CookieJar implementation instead of JavaNetCookieJar wrapper CookieJar cookieJar = new JavaNetCookieJar(cookieManager); +HttpLoggingInterceptor loggingInterceptor = new HttpLoggingInterceptor(); +loggingInterceptor.setLevel(Prefs.getRetrofitLogLevel()); + return new OkHttpClient.Builder() .cookieJar(cookieJar) .cache(new Cache(context.getCacheDir(), HTTP_CACHE_SIZE)) .protocols(protocolList) -.build(); +.addInterceptor(loggingInterceptor); } } diff --git a/app/src/main/java/org/wikipedia/SharedPreferenceCookieManager.java b/app/src/main/java/org/wikipedia/SharedPreferenceCookieManager.java index b6c8c18..b127031 100644 --- a/app/src/main/java/org/wikipedia/SharedPreferenceCookieManager.java +++ b/app/src/main/java/org/wikipedia/SharedPreferenceCookieManager.java @@ -47,7 +47,7 @@ // en.wikipedia.org and *.wikimedia.org // FIXME: Whitelist the domains we accept cookies from/send cookies to. SECURITY!!!1 if (domain.endsWith(domainSpec) -|| (domain.endsWith(".wikimedia.org") && domainSpec.endsWith(".wikipedia.org"))) { +|| (domain.endsWith(".wikimedia.org") && domainSpec.endsWith("wikipedia.org"))) { cookiesList.addAll(makeCookieList(cookieJar.get(domainSpec))); } } @@ -86,7 +86,6 @@ } else { cookieJar.get(domainSpec).put(cookie.getName(), cookie.getValue()); } - domainsModified.add(domainSpec); } }
[MediaWiki-commits] [Gerrit] Replace passCaptcha with passCaptchaFromRequest - change (mediawiki...ContactPageFundraiser)
jenkins-bot has submitted this change and it was merged. Change subject: Replace passCaptcha with passCaptchaFromRequest .. Replace passCaptcha with passCaptchaFromRequest See I47b2e2fbe3e063cd86e8a2d6bc17ca939472dbe1. Bug: T135477 Change-Id: I14cf152e2c4f648988677fec013a81472114eab7 --- M SpecialContactFundraiser.php 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: BryanDavis: Looks good to me, approved jenkins-bot: Verified diff --git a/SpecialContactFundraiser.php b/SpecialContactFundraiser.php index cab6d47..a88a596 100644 --- a/SpecialContactFundraiser.php +++ b/SpecialContactFundraiser.php @@ -251,10 +251,10 @@ } function passCaptcha() { - global $wgCaptcha; + global $wgCaptcha, $wgRequest, $wgUser; if ( !$this->useCaptcha() ) return true; - return $wgCaptcha->passCaptcha(); + return $wgCaptcha->passCaptchaFromRequest( $wgRequest, $wgUser ); } function doSubmit( ) { -- To view, visit https://gerrit.wikimedia.org/r/289263 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I14cf152e2c4f648988677fec013a81472114eab7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContactPageFundraiser Gerrit-Branch: master Gerrit-Owner: Gergő TiszaGerrit-Reviewer: BryanDavis Gerrit-Reviewer: Gergő Tisza Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Replace passCaptcha with passCaptchaFromRequest - change (mediawiki...ContactPageFundraiser)
Gergő Tisza has uploaded a new change for review. https://gerrit.wikimedia.org/r/289263 Change subject: Replace passCaptcha with passCaptchaFromRequest .. Replace passCaptcha with passCaptchaFromRequest See I47b2e2fbe3e063cd86e8a2d6bc17ca939472dbe1. Bug: T135477 Change-Id: I14cf152e2c4f648988677fec013a81472114eab7 --- M SpecialContactFundraiser.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContactPageFundraiser refs/changes/63/289263/1 diff --git a/SpecialContactFundraiser.php b/SpecialContactFundraiser.php index cab6d47..a88a596 100644 --- a/SpecialContactFundraiser.php +++ b/SpecialContactFundraiser.php @@ -251,10 +251,10 @@ } function passCaptcha() { - global $wgCaptcha; + global $wgCaptcha, $wgRequest, $wgUser; if ( !$this->useCaptcha() ) return true; - return $wgCaptcha->passCaptcha(); + return $wgCaptcha->passCaptchaFromRequest( $wgRequest, $wgUser ); } function doSubmit( ) { -- To view, visit https://gerrit.wikimedia.org/r/289263 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I14cf152e2c4f648988677fec013a81472114eab7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContactPageFundraiser Gerrit-Branch: master Gerrit-Owner: Gergő Tisza___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Hygiene: break layout into separate XML files - change (apps...wikipedia)
jenkins-bot has submitted this change and it was merged. Change subject: Hygiene: break layout into separate XML files .. Hygiene: break layout into separate XML files The Reading List onboarding is a static billboard experience and quite independent. Break the onboarding out into a separate file and include it instead. No functional changes intended. Change-Id: Ia934894a91d4a7618b9c0efdb0144cd0667973ba --- M app/src/main/res/layout/dialog_add_to_reading_list.xml A app/src/main/res/layout/include_add_to_reading_list_onboarding.xml 2 files changed, 115 insertions(+), 109 deletions(-) Approvals: BearND: Looks good to me, but someone else must approve Mholloway: Looks good to me, approved jenkins-bot: Verified diff --git a/app/src/main/res/layout/dialog_add_to_reading_list.xml b/app/src/main/res/layout/dialog_add_to_reading_list.xml index 5850611..2fd0ea8 100644 --- a/app/src/main/res/layout/dialog_add_to_reading_list.xml +++ b/app/src/main/res/layout/dialog_add_to_reading_list.xml @@ -98,115 +98,8 @@ - +layout="@layout/include_add_to_reading_list_onboarding" /> - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/include_add_to_reading_list_onboarding.xml b/app/src/main/res/layout/include_add_to_reading_list_onboarding.xml new file mode 100644 index 000..3a211a0 --- /dev/null +++ b/app/src/main/res/layout/include_add_to_reading_list_onboarding.xml @@ -0,0 +1,113 @@ +http://schemas.android.com/apk/res/android; +xmlns:app="http://schemas.android.com/apk/res-auto; +android:layout_width="match_parent" +android:layout_height="wrap_content" +android:orientation="vertical" +android:paddingLeft="16dp" +android:paddingRight="16dp" +android:paddingTop="16dp" +android:paddingBottom="16dp" +android:background="?attr/link_preview_background_color"> + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/288699 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia934894a91d4a7618b9c0efdb0144cd0667973ba Gerrit-PatchSet: 2 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: NiedzielskiGerrit-Reviewer: BearND Gerrit-Reviewer: Brion VIBBER Gerrit-Reviewer: Dbrant Gerrit-Reviewer: Mholloway Gerrit-Reviewer: Niedzielski 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 stash hit rate for logged-out users - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Improve edit stash hit rate for logged-out users .. Improve edit stash hit rate for logged-out users Check whether they made intervening edits just like logged-in users. Bug: T134620 Change-Id: Id1e0808caee0e474570c4f2e4b1cf845572e17e0 --- M includes/api/ApiStashEdit.php 1 file changed, 26 insertions(+), 3 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 3539eed..93003cc 100644 --- a/includes/api/ApiStashEdit.php +++ b/includes/api/ApiStashEdit.php @@ -294,9 +294,17 @@ $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; // use made no local upload/template edits in the meantime + 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; } $dbr = wfGetDB( DB_SLAVE ); @@ -360,6 +368,21 @@ } /** +* @param User $user +* @return string|null TS_MW timestamp or null +*/ + private static function lastEditTime( User $user ) { + $time = wfGetDB( DB_SLAVE )->selectField( + 'recentchanges', + 'MAX(rc_timestamp)', + [ 'rc_user_text' => $user->getName() ], + __METHOD__ + ); + + return wfTimestampOrNull( TS_MW, $time ); + } + + /** * Get the temporary prepared edit stash key for a user * * This key can be used for caching prepared edits provided: @@ -371,7 +394,7 @@ * @param User $user User to get parser options from * @return string */ - protected static function getStashKey( Title $title, Content $content, User $user ) { + private static function getStashKey( Title $title, Content $content, User $user ) { $hash = sha1( implode( ':', [ $content->getModel(), $content->getDefaultFormat(), @@ -394,7 +417,7 @@ * @param User $user * @return array (stash info array, TTL in seconds) or (null, 0) */ - protected static function buildStashValue( + private static function buildStashValue( Content $pstContent, ParserOutput $parserOutput, $timestamp, User $user ) { // If an item is renewed, mind the cache TTL determined by config and parser functions. -- To view, visit https://gerrit.wikimedia.org/r/288753 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id1e0808caee0e474570c4f2e4b1cf845572e17e0 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master 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] INSERT IGNORE into donatewiki_unique - change (wikimedia...DjangoBannerStats)
Ejegg has uploaded a new change for review. https://gerrit.wikimedia.org/r/289262 Change subject: INSERT IGNORE into donatewiki_unique .. INSERT IGNORE into donatewiki_unique Dang, have we been rolling back and retrying one by one every time a donor clicks on an email for the second time? Change-Id: Iee831eaeed30e8e95da241f00abb7f961647e11e --- M fundraiser/analytics/management/commands/LoadLPImpressions.py 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/tools/DjangoBannerStats refs/changes/62/289262/1 diff --git a/fundraiser/analytics/management/commands/LoadLPImpressions.py b/fundraiser/analytics/management/commands/LoadLPImpressions.py index 4b4ef11..15f22c0 100644 --- a/fundraiser/analytics/management/commands/LoadLPImpressions.py +++ b/fundraiser/analytics/management/commands/LoadLPImpressions.py @@ -54,7 +54,7 @@ help = 'Parses the specified squid log file and stores the impression in the database.' impression_sql = "INSERT INTO `landingpageimpression_raw%s` (timestamp, squid_id, squid_sequence, utm_source, utm_campaign, utm_key, utm_medium, landingpage, project_id, language_id, country_id) VALUES %s" -unique_sql = "INSERT INTO `donatewiki_unique` (timestamp, utm_source, utm_campaign, contact_id, link_id) VALUES %s" +unique_sql = "INSERT IGNORE INTO `donatewiki_unique` (timestamp, utm_source, utm_campaign, contact_id, link_id) VALUES %s" pending_impressions = [] pending_uniques = [] -- To view, visit https://gerrit.wikimedia.org/r/289262 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iee831eaeed30e8e95da241f00abb7f961647e11e Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/tools/DjangoBannerStats Gerrit-Branch: master Gerrit-Owner: Ejegg___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Upgrade Android Support libraries to v23.4.0 - change (apps...wikipedia)
jenkins-bot has submitted this change and it was merged. Change subject: Upgrade Android Support libraries to v23.4.0 .. Upgrade Android Support libraries to v23.4.0 Notes on the upgrade[0,1]. You may have to build twice initially to download the new library dependencies. I think it's this bug[2] in the SDK Manager plugin. [0] http://developer.android.com/tools/support-library/index.html#rev23-4-0 [1] https://medium.com/@chrisbanes/appcompat-v23-2-age-of-the-vectors-91cbafa87c88 [2] https://github.com/JakeWharton/sdk-manager-plugin/issues/101 Change-Id: I2c966a3066b9ceb873eec4bfa7053664e95f9fca --- M app/build.gradle M app/src/main/java/org/wikipedia/WikipediaApp.java M app/src/main/res/layout/dialog_add_to_reading_list.xml 3 files changed, 19 insertions(+), 2 deletions(-) Approvals: BearND: Looks good to me, but someone else must approve Mholloway: Looks good to me, approved jenkins-bot: Verified diff --git a/app/build.gradle b/app/build.gradle index 0043898..6b7a586 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -158,7 +158,7 @@ String retrofitVersion = '2.0.2' String okHttpVersion = '3.2.0' -String supportVersion = '23.3.0' +String supportVersion = '23.4.0' String espressoVersion = '2.2.2' String butterKnifeVersion = '8.0.1' String frescoVersion = '0.10.0' diff --git a/app/src/main/java/org/wikipedia/WikipediaApp.java b/app/src/main/java/org/wikipedia/WikipediaApp.java index d8cfc91..137c6bf 100644 --- a/app/src/main/java/org/wikipedia/WikipediaApp.java +++ b/app/src/main/java/org/wikipedia/WikipediaApp.java @@ -10,6 +10,7 @@ import android.support.annotation.IntRange; import android.support.annotation.NonNull; import android.support.annotation.Nullable; +import android.support.v7.app.AppCompatDelegate; import android.view.Window; import android.webkit.WebView; @@ -163,6 +164,9 @@ super.onCreate(); initExceptionHandling(); +// See Javadocs and http://developer.android.com/tools/support-library/index.html#rev23-4-0 +AppCompatDelegate.setCompatVectorFromResourcesEnabled(true); + Fresco.initialize(this); bus = new Bus(); diff --git a/app/src/main/res/layout/dialog_add_to_reading_list.xml b/app/src/main/res/layout/dialog_add_to_reading_list.xml index d5d72e1..5850611 100644 --- a/app/src/main/res/layout/dialog_add_to_reading_list.xml +++ b/app/src/main/res/layout/dialog_add_to_reading_list.xml @@ -126,7 +126,20 @@ https://gerrit.wikimedia.org/r/288698 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2c966a3066b9ceb873eec4bfa7053664e95f9fca Gerrit-PatchSet: 2 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: NiedzielskiGerrit-Reviewer: BearND Gerrit-Reviewer: Brion VIBBER Gerrit-Reviewer: Dbrant Gerrit-Reviewer: Mholloway Gerrit-Reviewer: Niedzielski 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 experimental videojs player on test2wiki - change (operations/mediawiki-config)
TheDJ has uploaded a new change for review. https://gerrit.wikimedia.org/r/289261 Change subject: Enable experimental videojs player on test2wiki .. Enable experimental videojs player on test2wiki Change-Id: I31ab1053dc5fa40258c830efdb77bcf57862aaec --- M wmf-config/CommonSettings.php M wmf-config/InitialiseSettings.php 2 files changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/61/289261/1 diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php index 72cf3dd..84c13bc 100644 --- a/wmf-config/CommonSettings.php +++ b/wmf-config/CommonSettings.php @@ -822,6 +822,9 @@ // use new ffmpeg build w/ VP9 & Opus support $wgFFmpegLocation = '/usr/bin/ffmpeg'; + + // The type of HTML5 player to use + $wgTmhWebPlayer = $wmgTmhWebPlayer; } if ( $wmgUseUploadsLink ) { diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index d20c02c..18b6237 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -12503,6 +12503,11 @@ 'foundationwiki' => true, ], +'wmgTmhWebPlayer' => [ + 'default' => 'mwembed', + 'test2wiki' => 'videojs', +], + 'wmgMinimumVideoPlayerSize' => [ 'default' => 800, ], -- To view, visit https://gerrit.wikimedia.org/r/289261 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I31ab1053dc5fa40258c830efdb77bcf57862aaec Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: TheDJ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add whitespace rules to stylelint - change (oojs/ui)
VolkerE has uploaded a new change for review. https://gerrit.wikimedia.org/r/289260 Change subject: Add whitespace rules to stylelint .. Add whitespace rules to stylelint See https://www.mediawiki.org/wiki/Manual:Coding_conventions/CSS#Whitespace Change-Id: I3724365dfa335d27cbb31740cc30a77d7fe06dd8 --- M .stylelintrc 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/60/289260/1 diff --git a/.stylelintrc b/.stylelintrc index b10435c..495cf72 100644 --- a/.stylelintrc +++ b/.stylelintrc @@ -3,6 +3,9 @@ "color-hex-case": [ "lower" ], "color-hex-length": [ "short" ], "color-named": [ "never" ], - "color-no-invalid-hex": true + "color-no-invalid-hex": true, + + "font-family-name-quotes": [ "single-unless-keyword" ], + "font-weight-notation": [ "named-where-possible" ] } } \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/289260 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3724365dfa335d27cbb31740cc30a77d7fe06dd8 Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: VolkerE___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] V4 XFF Fixup 3/3 - change (operations/puppet)
BBlack has uploaded a new change for review. https://gerrit.wikimedia.org/r/289258 Change subject: V4 XFF Fixup 3/3 .. V4 XFF Fixup 3/3 This moves varnish3 set_xff above fe_ip_processing, so that v3 and v4 cases are identical on entry (XFF has already been created or appended-to), and then re-factors the logic within to handle the fact that XFF has already been locally appended-to. Change-Id: I1572c9d30b54ba7315b90a794f1a825c07078b77 --- M modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb 1 file changed, 54 insertions(+), 58 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/58/289258/1 diff --git a/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb b/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb index 33562eb..b147e53 100644 --- a/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb +++ b/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb @@ -109,71 +109,68 @@ unset req.http.X-Connection-Properties; } - if (req.http.X-Forwarded-For) { - // To make further parsing/sanitizing simpler, convert all whitespace - // in XFF to single spaces, and make sure all commas have a space - // suffix but no space prefix. - set req.http.X-Forwarded-For = regsuball(req.http.X-Forwarded-For, "[ \t]+", " "); - set req.http.X-Forwarded-For = regsuball(req.http.X-Forwarded-For, " ?, ?", ", "); + // To make further parsing/sanitizing simpler, convert all whitespace + // in XFF to single spaces, and make sure all commas have a space + // suffix but no space prefix. + set req.http.X-Forwarded-For = regsuball(req.http.X-Forwarded-For, "[ \t]+", " "); + set req.http.X-Forwarded-For = regsuball(req.http.X-Forwarded-For, " ?, ?", ", "); - // Now fully-sanitize it to only the strict form "X(, X)*", where X is - // a string of legal characters in IPv[46] addresses. Note - // that injections can still leave well-formed junk on the - // left, but it's up to the trusted proxy code to ignore that, - // e.g.: - // "junk2, 123.123.123.123" -> "2, 123.123.123.123" - set req.http.X-Forwarded-For = regsub(req.http.X-Forwarded-For, - "^.*?([0-9A-Fa-f:.]+(, [0-9A-Fa-f:.]+)*)? ?$", "\1"); - - // Clear header if empty after all the above, to avoid messing - // up our normal XFF-append code later - if (req.http.X-Forwarded-For == "") { - unset req.http.X-Forwarded-For; - } - } + // Now fully-sanitize it to only the strict form "X(, X)*", where X is + // a string of legal characters in IPv[46] addresses. Note + // that injections can still leave well-formed junk on the + // left, but it's up to the trusted proxy code to ignore that, + // e.g.: + // "junk2, 123.123.123.123" -> "2, 123.123.123.123" + set req.http.X-Forwarded-For = regsub(req.http.X-Forwarded-For, + "^.*?([0-9A-Fa-f:.]+(, [0-9A-Fa-f:.]+)*)? ?$", "\1"); // There are two possible cases here: either nginx acted as our TLS // proxy and already set X-Client-IP (as well as appended the same value - // to XFF), or the traffic was direct to varnish-fe, in which case - // XCIP is not yet set and XFF is directly from external. + // to XFF, and we appended nginx's IP to XFF already as well...), or the + // traffic was direct to varnish-fe, in which case XCIP is not yet set + // and XFF is external + our addition of client.ip. + if (!req.http.X-Client-IP) { - // direct-to-port-80 case, set XCIP ourselves set req.http.X-Client-IP = client.ip; - set req.http.X-Trusted-Proxy = netmapper.map("proxies", req.http.X-Client-IP); - // normalize to boolean post-netmapper (varnish-3.0.4...) - if (req.http.X-Trusted-Proxy == "") { - unset req.http.X-Trusted-Proxy; - } - if (req.http.X-Trusted-Proxy && req.http.X-Forwarded-For) { - // get last from trusted-proxy-supplied XFF - set req.http.maybe-xcip = regsub(req.http.X-Forwarded-For, "^([^,]+, )+", ""); - if(<%= @std_ipcast %>.ip(req.http.maybe-xcip, "127.0.0.1") !~ wikimedia_nets) { - set req.http.X-Client-IP = req.http.maybe-xcip; - } - unset req.http.maybe-xcip; - } + unset req.http.via-nginx; } else { - // XCIP from nginx, XFF set/appended by nginx and contains at - // least XCIP at the end, possibly prepended by other addrs -
[MediaWiki-commits] [Gerrit] V4 XFF Fixup 2/3 - change (operations/puppet)
BBlack has uploaded a new change for review. https://gerrit.wikimedia.org/r/289257 Change subject: V4 XFF Fixup 2/3 .. V4 XFF Fixup 2/3 set_xff: Move the req.restarts==0 part out to the caller Change-Id: Ief13871d7fee35de28da8b38f50567f9749041ef --- M modules/varnish/templates/vcl/wikimedia-backend.vcl.erb M modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb M modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb 3 files changed, 13 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/57/289257/1 diff --git a/modules/varnish/templates/vcl/wikimedia-backend.vcl.erb b/modules/varnish/templates/vcl/wikimedia-backend.vcl.erb index c3da042..8d1690c 100644 --- a/modules/varnish/templates/vcl/wikimedia-backend.vcl.erb +++ b/modules/varnish/templates/vcl/wikimedia-backend.vcl.erb @@ -19,7 +19,9 @@ } <% if not @varnish_version4 -%> - call wm_common_recv_set_xff; + if (req.restarts == 0) { + call wm_common_recv_set_xff; + } <% end -%> call wm_common_recv_early; diff --git a/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb b/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb index 0ddf287..54c76fd 100644 --- a/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb +++ b/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb @@ -243,15 +243,13 @@ <% if not @varnish_version4 -%> sub wm_common_recv_set_xff { - // XFF-appending is non-idempotent for restart purposes.. - if (req.restarts == 0) { - // All layers need to update XFF with client.ip hop-by-hop so that it - // looks right to layers beneath, including the app layer - if (req.http.X-Forwarded-For) { - set req.http.X-Forwarded-For = req.http.X-Forwarded-For + ", " + client.ip; - } else { - set req.http.X-Forwarded-For = client.ip; - } + // XFF-appending is non-idempotent for restart purposes, should be in req.restarts == 0 block + // All layers need to update XFF with client.ip hop-by-hop so that it + // looks right to layers beneath, including the app layer + if (req.http.X-Forwarded-For) { + set req.http.X-Forwarded-For = req.http.X-Forwarded-For + ", " + client.ip; + } else { + set req.http.X-Forwarded-For = client.ip; } } <% end -%> diff --git a/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb b/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb index 4910265..33562eb 100644 --- a/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb +++ b/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb @@ -239,11 +239,12 @@ // IP processing is req->req mangling that shouldn't be re-done on restart call recv_fe_ip_processing; - } <% if not @varnish_version4 -%> - call wm_common_recv_set_xff; + call wm_common_recv_set_xff; <% end -%> + } + call wm_common_recv_early; <% if @varnish_version4 -%> -- To view, visit https://gerrit.wikimedia.org/r/289257 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ief13871d7fee35de28da8b38f50567f9749041ef 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] V4 XFF Fixup 1/3 - change (operations/puppet)
BBlack has uploaded a new change for review. https://gerrit.wikimedia.org/r/289256 Change subject: V4 XFF Fixup 1/3 .. V4 XFF Fixup 1/3 This separates XFF-setting from common_recv_early, and omits it on Varnish4 (which does XFF-setting before vcl_recv inside varnish code itself). Change-Id: Ib00294c93367532672dd7a333f2738015400ab63 --- M modules/varnish/templates/vcl/wikimedia-backend.vcl.erb M modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb M modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb 3 files changed, 13 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/56/289256/1 diff --git a/modules/varnish/templates/vcl/wikimedia-backend.vcl.erb b/modules/varnish/templates/vcl/wikimedia-backend.vcl.erb index 5515694..c3da042 100644 --- a/modules/varnish/templates/vcl/wikimedia-backend.vcl.erb +++ b/modules/varnish/templates/vcl/wikimedia-backend.vcl.erb @@ -18,6 +18,9 @@ <%= error_synth(403, "Access denied") -%> } +<% if not @varnish_version4 -%> + call wm_common_recv_set_xff; +<% end -%> call wm_common_recv_early; <% if @cache_route == 'direct' -%> diff --git a/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb b/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb index 48604aa..0ddf287 100644 --- a/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb +++ b/modules/varnish/templates/vcl/wikimedia-common.inc.vcl.erb @@ -241,9 +241,8 @@ } } -sub wm_common_recv_early { - unset req.http.X-CDIS; // clear internal cache-disposition header - +<% if not @varnish_version4 -%> +sub wm_common_recv_set_xff { // XFF-appending is non-idempotent for restart purposes.. if (req.restarts == 0) { // All layers need to update XFF with client.ip hop-by-hop so that it @@ -254,6 +253,11 @@ set req.http.X-Forwarded-For = client.ip; } } +} +<% end -%> + +sub wm_common_recv_early { + unset req.http.X-CDIS; // clear internal cache-disposition header // To pass this check, the method must be in allowed_methods (even OPTIONS must be there to be supported), // Additionally, if OPTIONS is allowed, it must be accompanied by Origin: diff --git a/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb b/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb index 5693874..4910265 100644 --- a/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb +++ b/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb @@ -241,6 +241,9 @@ call recv_fe_ip_processing; } +<% if not @varnish_version4 -%> + call wm_common_recv_set_xff; +<% end -%> call wm_common_recv_early; <% if @varnish_version4 -%> -- To view, visit https://gerrit.wikimedia.org/r/289256 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib00294c93367532672dd7a333f2738015400ab63 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] Expose equivalent functionality for passCaptcha - change (mediawiki...ConfirmEdit)
jenkins-bot has submitted this change and it was merged. Change subject: Expose equivalent functionality for passCaptcha .. Expose equivalent functionality for passCaptcha passCaptcha was made protected in I0da671a546700110d789b79a3089460abd9cce3b, but some other extensions used it, provide passCaptchaFromRequest as a replacement. Bug: T135477 Change-Id: I47b2e2fbe3e063cd86e8a2d6bc17ca939472dbe1 --- M ReCaptcha/ReCaptcha.class.php M ReCaptchaNoCaptcha/ReCaptchaNoCaptcha.class.php M SimpleCaptcha/Captcha.php 3 files changed, 26 insertions(+), 7 deletions(-) Approvals: Anomie: Looks good to me, approved jenkins-bot: Verified diff --git a/ReCaptcha/ReCaptcha.class.php b/ReCaptcha/ReCaptcha.class.php index 9e6cffb..e92791a 100644 --- a/ReCaptcha/ReCaptcha.class.php +++ b/ReCaptcha/ReCaptcha.class.php @@ -27,13 +27,12 @@ recaptcha_get_html( $wgReCaptchaPublicKey, $this->recaptcha_error, $useHttps ); } - function passCaptchaLimitedFromRequest( WebRequest $request, User $user ) { + protected function getCaptchaParamsFromRequest( WebRequest $request ) { // API is hardwired to return captchaId and captchaWord, // so use that if the standard two are empty $challenge = $request->getVal( 'recaptcha_challenge_field', $request->getVal( 'captchaId' ) ); $response = $request->getVal( 'recaptcha_response_field', $request->getVal( 'captchaWord' ) ); - - return $this->passCaptchaLimited( $challenge, $response, $user ); + return [ $challenge, $response ]; } /** diff --git a/ReCaptchaNoCaptcha/ReCaptchaNoCaptcha.class.php b/ReCaptchaNoCaptcha/ReCaptchaNoCaptcha.class.php index 759c5da..1d9130b 100644 --- a/ReCaptchaNoCaptcha/ReCaptchaNoCaptcha.class.php +++ b/ReCaptchaNoCaptcha/ReCaptchaNoCaptcha.class.php @@ -70,11 +70,11 @@ wfDebugLog( 'captcha', 'Unable to validate response: ' . $error ); } - public function passCaptchaLimitedFromRequest( WebRequest $request, User $user ) { + protected function getCaptchaParamsFromRequest( WebRequest $request ) { $index = 'not used'; // ReCaptchaNoCaptcha combines captcha ID + solution into a single value // API is hardwired to return captchaWord, so use that if the standard isempty $response = $request->getVal( 'g-recaptcha-response', $request->getVal( 'captchaWord' ) ); - return $this->passCaptchaLimited( $index, $response, $user ); + return [ $index, $response ]; } /** diff --git a/SimpleCaptcha/Captcha.php b/SimpleCaptcha/Captcha.php index 9b58259..63ed6d6 100755 --- a/SimpleCaptcha/Captcha.php +++ b/SimpleCaptcha/Captcha.php @@ -1059,10 +1059,18 @@ * @return bool */ public function passCaptchaLimitedFromRequest( WebRequest $request, User $user ) { + list( $index, $word ) = $this->getCaptchaParamsFromRequest( $request ); + return $this->passCaptchaLimited( $index, $word, $user ); + } + + /** +* @param WebRequest $request +* @return array [ captcha ID, captcha solution ] +*/ + protected function getCaptchaParamsFromRequest( WebRequest $request ) { $index = $request->getVal( 'wpCaptchaId' ); $word = $request->getVal( 'wpCaptchaWord' ); - - return $this->passCaptchaLimited( $index, $word, $user ); + return [ $index, $word ]; } /** @@ -1095,6 +1103,18 @@ /** * Given a required captcha run, test form input for correct * input on the open session. +* @param WebRequest $request +* @param User $user +* @return bool if passed, false if failed or new session +*/ + public function passCaptchaFromRequest( WebRequest $request, User $user ) { + list( $index, $word ) = $this->getCaptchaParamsFromRequest( $request ); + return $this->passCaptcha( $index, $word, $user ); + } + + /** +* Given a required captcha run, test form input for correct +* input on the open session. * @param string $index Captcha idenitifier * @param string $word Captcha solution * @return bool if passed, false if failed or new session -- To view, visit https://gerrit.wikimedia.org/r/289250 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I47b2e2fbe3e063cd86e8a2d6bc17ca939472dbe1 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/ConfirmEdit Gerrit-Branch: master Gerrit-Owner: Gergő TiszaGerrit-Reviewer: Anomie Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list
[MediaWiki-commits] [Gerrit] Fix "Sessions are disabled for this entry point" in GoogleLo... - change (mediawiki...GoogleLogin)
jenkins-bot has submitted this change and it was merged. Change subject: Fix "Sessions are disabled for this entry point" in GoogleLogin.hooks.php .. Fix "Sessions are disabled for this entry point" in GoogleLogin.hooks.php GoogleLogin currently replaces Special:UserLogin depending on if the user is logged in and if GoogleLogin should overwrite the userlogin special page. This results in problems, if someone (e.g. another extension) calls a function that calls the SpecialPage_initList hook from an entry point, which doesn't have sessions (e.g. load.php). If this happens, an exception would be thrown. To avoid this, this change checks, if the current Request is a request for an entry point without sessions (GoogleLogin generally doesn't need to replace the userlogin special page for requests without sessions), and if so, doesn't check replace the userlogin special page at all (and doesn't call the user object). This should be considered as a hack until the extension is converted to AuthManager (see T110294), where our own special page isn't needed anymore (hopefully) or a better approach could be implemented. Bug: T135445 Change-Id: I909ff5e7ef105b864516c3444ebe5bee650e3818 --- M includes/GoogleLogin.hooks.php 1 file changed, 8 insertions(+), 1 deletion(-) Approvals: MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/GoogleLogin.hooks.php b/includes/GoogleLogin.hooks.php index d060bb5..e1bb19f 100644 --- a/includes/GoogleLogin.hooks.php +++ b/includes/GoogleLogin.hooks.php @@ -75,7 +75,14 @@ $glConfig = ConfigFactory::getDefaultInstance()->makeConfig( 'googlelogin' ); // Replaces the UserLogin special page if configured and user isn't logged in - if ( !$wgUser->isLoggedIn() && $glConfig->get( 'GLReplaceMWLogin' ) ) { + // TODO: The check for the MW_NO_SESSION constant is an ugly workaround for T135445 + // given, that the replacement of the user login special page isn't needed after GoogleLogin + // was converted to to AuthManager (and the own Special page isn't needed anymore). Task T110294 + if ( + !defined( 'MW_NO_SESSION' ) && + !$wgUser->isLoggedIn() && + $glConfig->get( 'GLReplaceMWLogin' ) + ) { $list['Userlogin'] = 'SpecialGoogleLogin'; } } -- To view, visit https://gerrit.wikimedia.org/r/289070 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I909ff5e7ef105b864516c3444ebe5bee650e3818 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/GoogleLogin Gerrit-Branch: master Gerrit-Owner: FlorianschmidtwelzowGerrit-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] 4.1.2-1wm6: update 0005-handle-eof-http1.1.patch - change (operations...varnish4)
Ema has submitted this change and it was merged. Change subject: 4.1.2-1wm6: update 0005-handle-eof-http1.1.patch .. 4.1.2-1wm6: update 0005-handle-eof-http1.1.patch Bug: T135515 Change-Id: I14700ba59ab92ed46168d60116cdea5c9de414c3 --- M debian/changelog M debian/patches/0005-handle-eof-http1.1.patch 2 files changed, 10 insertions(+), 2 deletions(-) Approvals: Ema: Verified; Looks good to me, approved diff --git a/debian/changelog b/debian/changelog index d55b393..5e0bbdb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +varnish (4.1.2-1wm6) jessie-wikimedia; urgency=medium + + * Update 0005-handle-eof-http1.1.patch (Bug: T135515). + + -- Emanuele RoccaTue, 17 May 2016 19:41:43 +0200 + varnish (4.1.2-1wm5) jessie-wikimedia; urgency=medium * 0007-revert-grace-hits-hit-for-pass-objs.patch: revert diff --git a/debian/patches/0005-handle-eof-http1.1.patch b/debian/patches/0005-handle-eof-http1.1.patch index 54a8e94..2814962 100644 --- a/debian/patches/0005-handle-eof-http1.1.patch +++ b/debian/patches/0005-handle-eof-http1.1.patch @@ -22,7 +22,7 @@ } - if (hp->protover == 11) -+ if (hp->protover == 11 && (request || !http_HdrIs(hp, H_Connection, "close"))) ++ if (hp->protover == 11 && request) return (BS_NONE); if (http_HdrIs(hp, H_Connection, "keep-alive")) { @@ -55,6 +55,8 @@ +server s1 { + rxreq + txresp -nolen -bodylen 10 ++ close ++ accept + rxreq + txresp -hdr "Connection: close" -nolen -bodylen 10 +} -start @@ -66,7 +68,7 @@ + txreq -url /1 + rxresp + expect resp.status == 200 -+ expect resp.bodylen == 0 ++ expect resp.bodylen == 10 + txreq -url /2 + rxresp + expect resp.status == 200 -- To view, visit https://gerrit.wikimedia.org/r/289254 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I14700ba59ab92ed46168d60116cdea5c9de414c3 Gerrit-PatchSet: 1 Gerrit-Project: operations/debs/varnish4 Gerrit-Branch: debian-wmf Gerrit-Owner: Ema Gerrit-Reviewer: Ema ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Replace passCaptcha with passCaptchaFromRequest - change (mediawiki...ContactPage)
jenkins-bot has submitted this change and it was merged. Change subject: Replace passCaptcha with passCaptchaFromRequest .. Replace passCaptcha with passCaptchaFromRequest See I47b2e2fbe3e063cd86e8a2d6bc17ca939472dbe1. Also replace wfSetupSession while we are at it. Bug: Bug: T135477 Change-Id: I51915c7a65be61348bb62653292430782500bb42 --- M ContactPage_body.php 1 file changed, 4 insertions(+), 4 deletions(-) Approvals: Anomie: Looks good to me, approved jenkins-bot: Verified diff --git a/ContactPage_body.php b/ContactPage_body.php index bd96968..f853716 100644 --- a/ContactPage_body.php +++ b/ContactPage_body.php @@ -401,7 +401,7 @@ } /* @var SimpleCaptcha $wgCaptcha */ - if ( $this->useCaptcha() && !$wgCaptcha->passCaptcha() ) { + if ( $this->useCaptcha() && !$wgCaptcha->passCaptchaFromRequest( $request, $user ) ) { return wfMessage( 'contactpage-captcha-error' )->plain(); } @@ -484,11 +484,11 @@ */ private function getCaptcha() { // NOTE: make sure we have a session. May be required for CAPTCHAs to work. - wfSetupSession(); + \MediaWiki\Session\SessionManager::getGlobalSession()->persist(); $captcha = ConfirmEditHooks::getInstance(); - $captcha->trigger = 'contactpage'; - $captcha->action = 'contact'; + $captcha->setTrigger( 'contactpage' ); + $captcha->setAction( 'contact' ); return '' . $captcha->getForm( $this->getOutput() ) . -- To view, visit https://gerrit.wikimedia.org/r/289251 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I51915c7a65be61348bb62653292430782500bb42 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContactPage Gerrit-Branch: master Gerrit-Owner: Gergő TiszaGerrit-Reviewer: Anomie Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add support for backgroud colors in terminal - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: Add support for backgroud colors in terminal .. Add support for backgroud colors in terminal Add support for green/red background colors. Modify diff lib to benefit from this improvement. Bug: T135344 Change-Id: I6d125e46ba35abcd9603c54f39b52a532cb5f8d2 --- M pywikibot/diff.py M pywikibot/userinterfaces/terminal_interface_base.py M pywikibot/userinterfaces/terminal_interface_unix.py M pywikibot/userinterfaces/terminal_interface_win32.py 4 files changed, 17 insertions(+), 3 deletions(-) Approvals: John Vandenberg: Looks good to me, approved Xqt: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/pywikibot/diff.py b/pywikibot/diff.py index cc55fd9..7ef2914 100644 --- a/pywikibot/diff.py +++ b/pywikibot/diff.py @@ -58,6 +58,10 @@ '+': 'lightgreen', '-': 'lightred', } +self.bg_colors = { +'+': 'Blightgreen', +'-': 'Blightred', +} self.diff = list(self.create_diff()) self.diff_plain_text = u''.join(self.diff) @@ -155,8 +159,12 @@ char_tagged = char if color_closed: if char_ref != ' ': +if char != ' ': +apply_color = self.colors[color] +else: +apply_color = self.bg_colors[color] char_tagged = color_format('{color}{0}', - char, color=self.colors[color]) + char, color=apply_color) color_closed = False else: if char_ref == ' ': diff --git a/pywikibot/userinterfaces/terminal_interface_base.py b/pywikibot/userinterfaces/terminal_interface_base.py index 6aa3d2b..dbae726 100755 --- a/pywikibot/userinterfaces/terminal_interface_base.py +++ b/pywikibot/userinterfaces/terminal_interface_base.py @@ -47,6 +47,8 @@ 'lightpurple', 'lightyellow', 'white', +'Blightgreen', +'Blightred', ] colorTagR = re.compile('\03{(?P%s|previous)}' % '|'.join(colors)) diff --git a/pywikibot/userinterfaces/terminal_interface_unix.py b/pywikibot/userinterfaces/terminal_interface_unix.py index f9ba31e..9f37d58 100755 --- a/pywikibot/userinterfaces/terminal_interface_unix.py +++ b/pywikibot/userinterfaces/terminal_interface_unix.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """User interface for unix terminals.""" # -# (C) Pywikibot team, 2003-2015 +# (C) Pywikibot team, 2003-2016 # # Distributed under the terms of the MIT license. # @@ -31,6 +31,8 @@ 'lightpurple': chr(27) + '[95m',# Light Purple tag (Magenta) 'lightaqua': chr(27) + '[96m',# Light Aqua tag (Cyan) 'white': chr(27) + '[97m',# White start tag (Bright White) +'Blightgreen': chr(27) + '[102m', # Background Light Red tag +'Blightred': chr(27) + '[101m', # Background Light Green tag } diff --git a/pywikibot/userinterfaces/terminal_interface_win32.py b/pywikibot/userinterfaces/terminal_interface_win32.py index 43db049..5ce98e8 100755 --- a/pywikibot/userinterfaces/terminal_interface_win32.py +++ b/pywikibot/userinterfaces/terminal_interface_win32.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """User interface for Win32 terminals.""" # -# (C) Pywikibot team, 2003-2015 +# (C) Pywikibot team, 2003-2016 # # Distributed under the terms of the MIT license. # @@ -40,6 +40,8 @@ 'lightpurple': 13, 'lightyellow': 14, 'white': 15, +'Blightgreen': 32, # background color green. +'Blightred': 64, # background color red. } colorTagR = re.compile('\03{(?P%s)}' % '|'.join(list(windowsColors.keys( -- To view, visit https://gerrit.wikimedia.org/r/288821 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6d125e46ba35abcd9603c54f39b52a532cb5f8d2 Gerrit-PatchSet: 2 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: MpaaGerrit-Reviewer: John Vandenberg Gerrit-Reviewer: Mpaa Gerrit-Reviewer: Xqt Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add /wiki/WP* to landing page patterns - change (wikimedia...DjangoBannerStats)
Ejegg has uploaded a new change for review. https://gerrit.wikimedia.org/r/289255 Change subject: Add /wiki/WP* to landing page patterns .. Add /wiki/WP* to landing page patterns To match WP-Video-2016. TODO: document the patterns on https://www.mediawiki.org/wiki/Fundraising_tech/tools Bug: T132500 Change-Id: I6f114ac2c1cdbbee934d4d81e5793ff31e430d81 --- M fundraiser/analytics/regex.py 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/tools/DjangoBannerStats refs/changes/55/289255/1 diff --git a/fundraiser/analytics/regex.py b/fundraiser/analytics/regex.py index 27170fd..e8dda95 100644 --- a/fundraiser/analytics/regex.py +++ b/fundraiser/analytics/regex.py @@ -159,7 +159,7 @@ ), re.compile( r""" -# match all of the landing page patterns on wmfwiki +# match all of the landing page patterns on donatewiki (http|https) :// (?Pdonate.wikimedia.org)/ @@ -171,6 +171,7 @@ | L2011 # potential landing page naming scheme for 2011 | L2012 # potential landing page naming scheme for 2012 | WMF # eg WMFJA085 + | WP # eg WP-Video-2016 ) (?:(?!\?|&)[\S])* # this will give us the landing page up to the next ? or & ) -- To view, visit https://gerrit.wikimedia.org/r/289255 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6f114ac2c1cdbbee934d4d81e5793ff31e430d81 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/tools/DjangoBannerStats Gerrit-Branch: master Gerrit-Owner: Ejegg___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] 4.1.2-1wm6: update 0005-handle-eof-http1.1.patch - change (operations...varnish4)
Ema has uploaded a new change for review. https://gerrit.wikimedia.org/r/289254 Change subject: 4.1.2-1wm6: update 0005-handle-eof-http1.1.patch .. 4.1.2-1wm6: update 0005-handle-eof-http1.1.patch Bug: T135515 Change-Id: I14700ba59ab92ed46168d60116cdea5c9de414c3 --- M debian/changelog M debian/patches/0005-handle-eof-http1.1.patch 2 files changed, 10 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/debs/varnish4 refs/changes/54/289254/1 diff --git a/debian/changelog b/debian/changelog index d55b393..5e0bbdb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +varnish (4.1.2-1wm6) jessie-wikimedia; urgency=medium + + * Update 0005-handle-eof-http1.1.patch (Bug: T135515). + + -- Emanuele RoccaTue, 17 May 2016 19:41:43 +0200 + varnish (4.1.2-1wm5) jessie-wikimedia; urgency=medium * 0007-revert-grace-hits-hit-for-pass-objs.patch: revert diff --git a/debian/patches/0005-handle-eof-http1.1.patch b/debian/patches/0005-handle-eof-http1.1.patch index 54a8e94..2814962 100644 --- a/debian/patches/0005-handle-eof-http1.1.patch +++ b/debian/patches/0005-handle-eof-http1.1.patch @@ -22,7 +22,7 @@ } - if (hp->protover == 11) -+ if (hp->protover == 11 && (request || !http_HdrIs(hp, H_Connection, "close"))) ++ if (hp->protover == 11 && request) return (BS_NONE); if (http_HdrIs(hp, H_Connection, "keep-alive")) { @@ -55,6 +55,8 @@ +server s1 { + rxreq + txresp -nolen -bodylen 10 ++ close ++ accept + rxreq + txresp -hdr "Connection: close" -nolen -bodylen 10 +} -start @@ -66,7 +68,7 @@ + txreq -url /1 + rxresp + expect resp.status == 200 -+ expect resp.bodylen == 0 ++ expect resp.bodylen == 10 + txreq -url /2 + rxresp + expect resp.status == 200 -- To view, visit https://gerrit.wikimedia.org/r/289254 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I14700ba59ab92ed46168d60116cdea5c9de414c3 Gerrit-PatchSet: 1 Gerrit-Project: operations/debs/varnish4 Gerrit-Branch: debian-wmf Gerrit-Owner: Ema ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Bump delays in uw.ConcurrentQueue's "Adding a new item when ... - change (mediawiki...UploadWizard)
jenkins-bot has submitted this change and it was merged. Change subject: Bump delays in uw.ConcurrentQueue's "Adding a new item when almost done" test .. Bump delays in uw.ConcurrentQueue's "Adding a new item when almost done" test This test seems extra flaky and is occasionally failing. Increasing the timeouts should help. I tried writing down what is causing it to fail, then I tried making ASCII diagrams, then I gave up and decided to just draw it: https://phabricator.wikimedia.org/F4024185 Change-Id: Ib7eb50f0a2b62eb2f8acb221481858c2bf7f4567 --- M tests/qunit/uw.ConcurrentQueue.test.js 1 file changed, 5 insertions(+), 4 deletions(-) Approvals: MarkTraceur: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/qunit/uw.ConcurrentQueue.test.js b/tests/qunit/uw.ConcurrentQueue.test.js index c5b137b..418b559 100644 --- a/tests/qunit/uw.ConcurrentQueue.test.js +++ b/tests/qunit/uw.ConcurrentQueue.test.js @@ -22,14 +22,14 @@ // each call of the returned function, the Promise it returns will take 10 ms longer to resolve. // This ensures that actions in ConcurrentQueue don't all finish at the same instant, which would // break tests (they make stronger assumptions about the order than ConcurrentQueue guarantees). - function incrementallyDelayedPromise() { - var delay = 20; + function incrementallyDelayedPromise( multiplier ) { + var delay = 20 * ( multiplier || 1 ); return function () { var deferred = $.Deferred(); setTimeout( function () { deferred.resolve(); }, delay ); - delay += 10; + delay += 10 * ( multiplier || 1 ); return deferred.promise(); }; } @@ -371,7 +371,8 @@ QUnit.test( 'Adding a new item when almost done', function ( assert ) { var done, action, changeHandler, progressHandler, completeHandler, queue, onProgress; done = assert.async(); - action = sinon.spy( incrementallyDelayedPromise() ); + // This test seems extra flaky and was occasionally failing, double the delays + action = sinon.spy( incrementallyDelayedPromise( 2 ) ); changeHandler = sinon.stub(); progressHandler = sinon.stub(); completeHandler = sinon.stub(); -- To view, visit https://gerrit.wikimedia.org/r/289238 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib7eb50f0a2b62eb2f8acb221481858c2bf7f4567 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UploadWizard Gerrit-Branch: master Gerrit-Owner: Bartosz DziewońskiGerrit-Reviewer: MarkTraceur Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Put UI in a tag in apihelp-clientlogin-example-login2 - change (mediawiki/core)
Amire80 has uploaded a new change for review. https://gerrit.wikimedia.org/r/289253 Change subject: Put UI in a tag in apihelp-clientlogin-example-login2 .. Put UI in a tag in apihelp-clientlogin-example-login2 To make it clear that it's literal output. Change-Id: I1a790f660bdcf9064a85e6d48aaa67b1b614c717 --- M includes/api/i18n/en.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/53/289253/1 diff --git a/includes/api/i18n/en.json b/includes/api/i18n/en.json index a802cc7..0a464fe 100644 --- a/includes/api/i18n/en.json +++ b/includes/api/i18n/en.json @@ -48,7 +48,7 @@ "apihelp-clientlogin-description": "Log in to the wiki using the interactive flow.", "apihelp-clientlogin-example-login": "Start the process of logging in to the wiki as user Example with password ExamplePassword.", - "apihelp-clientlogin-example-login2": "Continue logging in after a UI response for two-factor auth, supplying an OATHToken of 987654.", + "apihelp-clientlogin-example-login2": "Continue logging in after a UI response for two-factor auth, supplying an OATHToken of 987654.", "apihelp-compare-description": "Get the difference between 2 pages.\n\nA revision number, a page title, or a page ID for both \"from\" and \"to\" must be passed.", "apihelp-compare-param-fromtitle": "First title to compare.", -- To view, visit https://gerrit.wikimedia.org/r/289253 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1a790f660bdcf9064a85e6d48aaa67b1b614c717 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Amire80___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Rev 0.5 Pedagigical step - projet.py - change (labs...fr-wikiversity-ns)
Youni Verciti has uploaded a new change for review. https://gerrit.wikimedia.org/r/289252 Change subject: Rev 0.5 Pedagigical step - projet.py .. Rev 0.5 Pedagigical step - projet.py Change-Id: I80397a4050453f011665bace4c959274961a3039 --- M document.py M namespaceLib.py M ns4.py M projet.py 4 files changed, 111 insertions(+), 118 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/labs/tools/fr-wikiversity-ns refs/changes/52/289252/1 diff --git a/document.py b/document.py index f243f06..7024c89 100755 --- a/document.py +++ b/document.py @@ -7,25 +7,37 @@ family = 'wikiversity' site = pywikibot.Site(lang, family) -title = u'Projet:Laboratoire/Propositions/Espace_de_noms_Département/Documents' -page = pywikibot.Page(site, title) -gen_links = page.linkedPages(namespaces=0) -c1,c2 = 0, 0 -for link in gen_links: - link = str(link) - resep = re.compile('/') - gen = re.findall(resep, link) - # print x - nb = len(gen) - print nb - if nb==1: -print link -c1 = c1+1 - elif nb>1: -print link -c2 = c2+1 -print c1 -print c2 - +ns_id = 12 +ns_label = site.namespace(ns_id) # Label local du namespace - +### document.py +# cf dernière étape exp. dpt. +##title = u'Projet:Laboratoire/Propositions/Espace_de_noms_Département/Documents' +#page = pywikibot.Page(site, title) +#gen_links = page.linkedPages(namespaces=ns_id) +#c1,c2 = 0, 0 +#for link in gen_links: + #link = str(link) + #resep = re.compile('/') + #gen = re.findall(resep, link) + ## print x + #nb = len(gen) + #print nb + #if nb==1: +#print link +#c1 = c1+1 + #elif nb>1: +#print link +#c2 = c2+1 +#print c1 +#print c2 + + +print '-' +print ns_id + + +gen_hlp = site.allpages(namespace=ns_id) + +label = site.namespace(ns_id) +print label \ No newline at end of file diff --git a/namespaceLib.py b/namespaceLib.py index 15dc6ac..f9489f6 100644 --- a/namespaceLib.py +++ b/namespaceLib.py @@ -13,7 +13,7 @@ ### return total pages, redirections number, rootpages number, subpages numbers by level 1,2,more ### scan pages properties: number of separators, redirection_target ; returned in a dict def ns_prop(ns_id): - gen_hlp = site.allpages(namespace=ns_id) + gen_hlp = site.allpages(namespace=ns_id) #VARNAME gen_all c, c_redir, c_racine, c1, c2, c3= 0, 0, 0, 0, 0, 0 resep = re.compile('/') dict_page = {} @@ -40,7 +40,7 @@ page_prop = [nb_sep, cible] dict_page[page] = page_prop verif = (c-c_racine-c1-c2-c3) - prop=[c, c_redir, c_racine, c1,c2, c3, verif, dict_page] + prop=[c, c_redir, c_racine, c1,c2, c3, verif, dict_page, ns_id] return prop ### ns_list_page() reçoit le dictionnaire des pages associé aux propriétés # retourne le wikitexte contenant diff --git a/ns4.py b/ns4.py index 0ef3517..27ab31e 100755 --- a/ns4.py +++ b/ns4.py @@ -26,44 +26,6 @@ title = u' Projet:Laboratoire/Espaces de noms/Wikiversité/' - L fonction liste_racine () -## Isole les pages racines dans dict_racine - les sous-pages dans dict_sub -#dict_racine = {} -#dict_sub = {} -#def get_racine(dict_page): - #for page in dict_page: -#page_prop = dict_page[page] -#nb_sep = page_prop[0] -#page = unicode(page) -#if nb_sep == 0: - #dict_racine[page] = page_prop -#else: - #dict_sub[page] = page_prop - #for racine in dict_racine: -#list_sub = [] -#prefix = racine[:-2] # retire les crochets ]] -#for sub in dict_sub: - #if prefix in sub: -#list_sub.append(sub) -#dict_racine[racine] = list_sub - #for racine in dict_racine: -#list_sub = dict_racine[racine] -##print len(list_sub) -##for sub in list_sub: - ##print sub - #return dict_racine - -#def ns_list_racine(dict_racine): - #index = 0 - #witxt = '{|class="wikitable sortable"\n!Index\n!Nom\n!Nombre de sous-pages' #\n!Cible - #for racine in sorted(dict_racine): -#index = index + 1 -#list_sub = dict_racine[racine] -#witxt = witxt + u'\n|-\n|' + str(index) + '\n|' + unicode(racine) + '\n|' + str(len(list_sub)) #+ '\n|' + unicode(cible) - #witxt = witxt + '\n|}' - #return witxt - dict_racine = get_root(dict_page) witxt = write_list_root(dict_racine) print witxt diff --git a/projet.py b/projet.py index 45c998a..056564b 100755 --- a/projet.py +++ b/projet.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -import pywikibot, re, sys +import pywikibot, re #Rev.5#, sys from namespaceLib import * ### Outil d'analyse et report de données sur l'espace de noms numero 4 Project-Wikiversité @@ -9,67 +9,86 @@ lang = 'fr' family = 'wikiversity' -site = pywikibot.Site(lang, family) +site = pywikibot.Site(lang, family) -prop = ns_prop(sys.argv[1]) -[c, c_redir, c_racine, c1,c2, c3, verif, dict_page] = prop -print prop[0] -print prop[1] -print prop[2] -print prop[3] -print prop[4] -print prop[5] +ns_id = 102 #Rev.5 +ns_label =
[MediaWiki-commits] [Gerrit] Replace passCaptcha with passCaptchaFromRequest - change (mediawiki...ContactPage)
Gergő Tisza has uploaded a new change for review. https://gerrit.wikimedia.org/r/289251 Change subject: Replace passCaptcha with passCaptchaFromRequest .. Replace passCaptcha with passCaptchaFromRequest See I47b2e2fbe3e063cd86e8a2d6bc17ca939472dbe1. Also replace wfSetupSession while we are at it. Bug: Bug: T135477 Change-Id: I51915c7a65be61348bb62653292430782500bb42 --- M ContactPage_body.php 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContactPage refs/changes/51/289251/1 diff --git a/ContactPage_body.php b/ContactPage_body.php index bd96968..f853716 100644 --- a/ContactPage_body.php +++ b/ContactPage_body.php @@ -401,7 +401,7 @@ } /* @var SimpleCaptcha $wgCaptcha */ - if ( $this->useCaptcha() && !$wgCaptcha->passCaptcha() ) { + if ( $this->useCaptcha() && !$wgCaptcha->passCaptchaFromRequest( $request, $user ) ) { return wfMessage( 'contactpage-captcha-error' )->plain(); } @@ -484,11 +484,11 @@ */ private function getCaptcha() { // NOTE: make sure we have a session. May be required for CAPTCHAs to work. - wfSetupSession(); + \MediaWiki\Session\SessionManager::getGlobalSession()->persist(); $captcha = ConfirmEditHooks::getInstance(); - $captcha->trigger = 'contactpage'; - $captcha->action = 'contact'; + $captcha->setTrigger( 'contactpage' ); + $captcha->setAction( 'contact' ); return '' . $captcha->getForm( $this->getOutput() ) . -- To view, visit https://gerrit.wikimedia.org/r/289251 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I51915c7a65be61348bb62653292430782500bb42 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContactPage Gerrit-Branch: master Gerrit-Owner: Gergő Tisza___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] horizon: make the "Totp token" field a little more clear - change (operations/puppet)
Andrew Bogott has submitted this change and it was merged. Change subject: horizon: make the "Totp token" field a little more clear .. horizon: make the "Totp token" field a little more clear TOTP is a technicality most users don't know or should be concerned about. Having the form's label being called like that is not great for UX, as it might confuse even the technical users who might not be aware of the exact mechanics of 2FA. I personally prefer "2-Step Verification code", but I've renamed it to "Two-factor authentication code" to make it consistent with what we expose to Wikitech's userprefs. I'm not feeling strong about any of our options, as long as it's something not /too/ technical :) While at it, I cleared up a couple of descriptions under keystoneclient as well. Change-Id: I13c0ebaf46d982fa7d850b7fdb6e841dce259dd2 --- M modules/openstack/files/liberty/horizon/forms.py M modules/openstack/files/liberty/keystoneclient/wmtotp.py 2 files changed, 5 insertions(+), 5 deletions(-) Approvals: Andrew Bogott: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/openstack/files/liberty/horizon/forms.py b/modules/openstack/files/liberty/horizon/forms.py index f7197cf..5383ff2 100644 --- a/modules/openstack/files/liberty/horizon/forms.py +++ b/modules/openstack/files/liberty/horizon/forms.py @@ -56,10 +56,10 @@ "to log in at wikitech.wikimedia.org.") password = forms.CharField(label=_("Password"), widget=forms.PasswordInput(render_value=False)) -totptoken = forms.CharField(label=_("Totp Token"), +totptoken = forms.CharField(label=_("Two-factor authentication code"), widget=forms.TextInput(), help_text="Login requires two-factor " - "authentication. To enable 2fa, " + "authentication. To enable it, " "visit Preferences->User " "Profile in your Wikitech account") diff --git a/modules/openstack/files/liberty/keystoneclient/wmtotp.py b/modules/openstack/files/liberty/keystoneclient/wmtotp.py index cc52f93..bc4f21b 100644 --- a/modules/openstack/files/liberty/keystoneclient/wmtotp.py +++ b/modules/openstack/files/liberty/keystoneclient/wmtotp.py @@ -27,7 +27,7 @@ """Construct a User/Password/totp based authentication method. :param string password: Password for authentication. -:param string totp: Totp token for authentication. +:param string totp: 2FA (TOTP) token for authentication. :param string username: Username for authentication. :param string user_id: User ID for authentication. :param string user_domain_id: User's domain ID for authentication. @@ -91,7 +91,7 @@ cfg.StrOpt('user-domain-id', help="User's domain id"), cfg.StrOpt('user-domain-name', help="User's domain name"), cfg.StrOpt('password', secret=True, help="User's password"), -cfg.StrOpt('totp', secret=True, help="Totp token"), +cfg.StrOpt('totp', secret=True, help="2FA (TOTP) token"), ]) return options @@ -104,7 +104,7 @@ if not kwargs.get('totp') and (hasattr(sys.stdin, 'isatty') and sys.stdin.isatty()): try: -kwargs['totp'] = getpass.getpass('Totp token: ') +kwargs['totp'] = getpass.getpass('2FA (TOTP) token: ') except EOFError: pass -- To view, visit https://gerrit.wikimedia.org/r/289249 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I13c0ebaf46d982fa7d850b7fdb6e841dce259dd2 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Faidon LiambotisGerrit-Reviewer: Alex Monk Gerrit-Reviewer: Andrew Bogott Gerrit-Reviewer: BryanDavis Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Expose equivalent functionality for passCaptcha - change (mediawiki...ConfirmEdit)
Gergő Tisza has uploaded a new change for review. https://gerrit.wikimedia.org/r/289250 Change subject: Expose equivalent functionality for passCaptcha .. Expose equivalent functionality for passCaptcha passCaptcha was made protected in I0da671a546700110d789b79a3089460abd9cce3b, but some other extensions used it, provide passCaptchaFromRequest as a replacement. Bug: T135477 Change-Id: I47b2e2fbe3e063cd86e8a2d6bc17ca939472dbe1 --- M ReCaptcha/ReCaptcha.class.php M ReCaptchaNoCaptcha/ReCaptchaNoCaptcha.class.php M SimpleCaptcha/Captcha.php 3 files changed, 26 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ConfirmEdit refs/changes/50/289250/1 diff --git a/ReCaptcha/ReCaptcha.class.php b/ReCaptcha/ReCaptcha.class.php index 9e6cffb..e92791a 100644 --- a/ReCaptcha/ReCaptcha.class.php +++ b/ReCaptcha/ReCaptcha.class.php @@ -27,13 +27,12 @@ recaptcha_get_html( $wgReCaptchaPublicKey, $this->recaptcha_error, $useHttps ); } - function passCaptchaLimitedFromRequest( WebRequest $request, User $user ) { + protected function getCaptchaParamsFromRequest( WebRequest $request ) { // API is hardwired to return captchaId and captchaWord, // so use that if the standard two are empty $challenge = $request->getVal( 'recaptcha_challenge_field', $request->getVal( 'captchaId' ) ); $response = $request->getVal( 'recaptcha_response_field', $request->getVal( 'captchaWord' ) ); - - return $this->passCaptchaLimited( $challenge, $response, $user ); + return [ $challenge, $response ]; } /** diff --git a/ReCaptchaNoCaptcha/ReCaptchaNoCaptcha.class.php b/ReCaptchaNoCaptcha/ReCaptchaNoCaptcha.class.php index 759c5da..1d9130b 100644 --- a/ReCaptchaNoCaptcha/ReCaptchaNoCaptcha.class.php +++ b/ReCaptchaNoCaptcha/ReCaptchaNoCaptcha.class.php @@ -70,11 +70,11 @@ wfDebugLog( 'captcha', 'Unable to validate response: ' . $error ); } - public function passCaptchaLimitedFromRequest( WebRequest $request, User $user ) { + protected function getCaptchaParamsFromRequest( WebRequest $request ) { $index = 'not used'; // ReCaptchaNoCaptcha combines captcha ID + solution into a single value // API is hardwired to return captchaWord, so use that if the standard isempty $response = $request->getVal( 'g-recaptcha-response', $request->getVal( 'captchaWord' ) ); - return $this->passCaptchaLimited( $index, $response, $user ); + return [ $index, $response ]; } /** diff --git a/SimpleCaptcha/Captcha.php b/SimpleCaptcha/Captcha.php index 9b58259..1f795d6 100755 --- a/SimpleCaptcha/Captcha.php +++ b/SimpleCaptcha/Captcha.php @@ -1059,10 +1059,18 @@ * @return bool */ public function passCaptchaLimitedFromRequest( WebRequest $request, User $user ) { + list( $index, $word ) = $this->getCaptchaParamsFromRequest( $request ); + return $this->passCaptchaLimited( $index, $word, $user ); + } + + /** +* @param WebRequest $request +* @return array [ captcha ID, captcha solution ] +*/ + protected function getCaptchaParamsFromRequest( WebRequest $request ) { $index = $request->getVal( 'wpCaptchaId' ); $word = $request->getVal( 'wpCaptchaWord' ); - - return $this->passCaptchaLimited( $index, $word, $user ); + return [ $index, $word ]; } /** @@ -1095,6 +1103,18 @@ /** * Given a required captcha run, test form input for correct * input on the open session. +* @param WebRequest $request +* @param User $user +* @return bool if passed, false if failed or new session +*/ + public function passCaptchaFromRequest( WebRequest $request, User $user ) { + list( $index, $word ) = $this->getCaptchaParamsFromRequest( $request ); + return $this->passCaptchaLimited( $index, $word, $user ); + } + + /** +* Given a required captcha run, test form input for correct +* input on the open session. * @param string $index Captcha idenitifier * @param string $word Captcha solution * @return bool if passed, false if failed or new session -- To view, visit https://gerrit.wikimedia.org/r/289250 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I47b2e2fbe3e063cd86e8a2d6bc17ca939472dbe1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ConfirmEdit Gerrit-Branch: master Gerrit-Owner: Gergő Tisza___ MediaWiki-commits mailing list
[MediaWiki-commits] [Gerrit] Make map optionally responsive using only CSS - change (mediawiki...Kartographer)
jenkins-bot has submitted this change and it was merged. Change subject: Make map optionally responsive using only CSS .. Make map optionally responsive using only CSS Using a couple of extra wrappers we can make the map shrink to fit its container, and maintain its original aspect ratio. For now only do this in MobileFrontend, but there's no reason we couldn't do this on desktop if desired. Bug: T133619 Change-Id: Ic96ef6e88e4042068c6541d65c951857b331e30b --- M modules/kartographer.js M modules/ve-maps/ve.dm.MWMapsNode.js M styles/kartographer.less 3 files changed, 116 insertions(+), 10 deletions(-) Approvals: Yurik: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/kartographer.js b/modules/kartographer.js index 9782318..793d996 100644 --- a/modules/kartographer.js +++ b/modules/kartographer.js @@ -75,17 +75,26 @@ */ mw.kartographer.createMap = function ( container, data ) { var map, - style = data.style || mw.config.get( 'wgKartographerDfltStyle' ); + $container = $( container ), + style = data.style || mw.config.get( 'wgKartographerDfltStyle' ), + width, height; + + $container.addClass( 'mw-kartographer-map' ); map = L.map( container ); + if ( !container.clientWidth ) { + // Get `max` properties in case the container was wrapped + // with {@link #responsiveContainerWrap}. + width = $container.css( 'max-width' ); + height = $container.css( 'max-height' ); + width = ( !width || width === 'none' ) ? $container.width() : width; + height = ( !height || height === 'none' ) ? $container.height() : height; + // HACK: If the container is not naturally measurable, try jQuery // which will pick up CSS dimensions. T125263 /*jscs:disable disallowDanglingUnderscores */ - map._size = new L.Point( - $( container ).width(), - $( container ).height() - ); + map._size = new L.Point( width, height ); /*jscs:enable disallowDanglingUnderscores */ } map.setView( [ data.latitude, data.longitude ], data.zoom ); @@ -320,8 +329,82 @@ return deferred.promise(); } + /** +* Wraps a map container to make it (and its map) responsive on +* mobile (MobileFrontend). +* +* The initial `mapContainer`: +* +* +* +* +* +* Becomes : +* +* +* +* +* +* +* +* +* +* **Note:** the container that carries the map data remains the initial +* `mapContainer` passed in arguments. Its selector remains `.mw-kartographer-interactive`. +* However it is now a sub-child that carries the map. +* +* **Note 2:** the CSS applied to these elements vary whether the map width +* is absolute (px) or relative (%). The example above describes the absolute +* width case. +* +* @param {HTMLElement} mapContainer Initial component to carry the map. +* @return {HTMLElement} New map container to carry the map. +*/ + function responsiveContainerWrap( mapContainer ) { + var $container = $( mapContainer ), + $responder, $map, + width = mapContainer.style.width, + isRelativeWidth = width.slice( -1 ) === '%', + height = +( mapContainer.style.height.slice( 0, -2 ) ), + containerCss, responderCss; + + // Convert the value to a string. + width = isRelativeWidth ? width : +( width.slice( 0, -2 ) ); + + if ( isRelativeWidth ) { + containerCss = {}; + responderCss = { + // The inner container must occupy the full height + height: height + }; + } else { + containerCss = { + // Remove explicitly set dimensions + width: '', + height: '', + // Prevent over-sizing + 'max-width': width, + 'max-height': height + }; + responderCss = { +
[MediaWiki-commits] [Gerrit] Fix central logout - change (mediawiki...CentralAuth)
jenkins-bot has submitted this change and it was merged. Change subject: Fix central logout .. Fix central logout Fixes I995bb7ee16abe94c4ffbff0330a1acb2721115cd which pushed creating the centraluser from the local user (for central token reset) after the point where the local user is logged out. Bug: T135525 Bug: T92357 Change-Id: I1a174f76d343e7e6a26ba5e5df7c5edda21a3c01 Co-Authored-By: Anomie--- M includes/CentralAuthHooks.php 1 file changed, 3 insertions(+), 2 deletions(-) Approvals: Anomie: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/CentralAuthHooks.php b/includes/CentralAuthHooks.php index 36d37f2..76e3352 100644 --- a/includes/CentralAuthHooks.php +++ b/includes/CentralAuthHooks.php @@ -706,8 +706,9 @@ return true; } - DeferredUpdates::addCallableUpdate( function() use ( $user ) { - $centralUser = CentralAuthUser::getMasterInstance( $user ); + $username = $user->getName(); + DeferredUpdates::addCallableUpdate( function() use ( $username ) { + $centralUser = CentralAuthUser::getMasterInstanceByName( $username ); if ( $centralUser->exists() ) { $centralUser->resetAuthToken(); } -- To view, visit https://gerrit.wikimedia.org/r/289248 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1a174f76d343e7e6a26ba5e5df7c5edda21a3c01 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CentralAuth Gerrit-Branch: master Gerrit-Owner: Gergő Tisza Gerrit-Reviewer: Anomie Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] horizon: make the "Totp token" field a little more clear - change (operations/puppet)
Faidon Liambotis has uploaded a new change for review. https://gerrit.wikimedia.org/r/289249 Change subject: horizon: make the "Totp token" field a little more clear .. horizon: make the "Totp token" field a little more clear TOTP is a technicality most users don't know or should be concerned about. Having the form's label being called like that is not great for UX, as it might confuse even the technical users who might not be aware of the exact mechanics of 2FA. I personally prefer "2-Step Verification code", but I've renamed it to "Two-factor authentication code" to make it consistent with what we expose to Wikitech's userprefs. I'm not feeling strong about any of our options, as long as it's something not /too/ technical :) While at it, I cleared up a couple of descriptions under keystoneclient as well. Change-Id: I13c0ebaf46d982fa7d850b7fdb6e841dce259dd2 --- M modules/openstack/files/liberty/horizon/forms.py M modules/openstack/files/liberty/keystoneclient/wmtotp.py 2 files changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/49/289249/1 diff --git a/modules/openstack/files/liberty/horizon/forms.py b/modules/openstack/files/liberty/horizon/forms.py index f7197cf..5383ff2 100644 --- a/modules/openstack/files/liberty/horizon/forms.py +++ b/modules/openstack/files/liberty/horizon/forms.py @@ -56,10 +56,10 @@ "to log in at wikitech.wikimedia.org.") password = forms.CharField(label=_("Password"), widget=forms.PasswordInput(render_value=False)) -totptoken = forms.CharField(label=_("Totp Token"), +totptoken = forms.CharField(label=_("Two-factor authentication code"), widget=forms.TextInput(), help_text="Login requires two-factor " - "authentication. To enable 2fa, " + "authentication. To enable it, " "visit Preferences->User " "Profile in your Wikitech account") diff --git a/modules/openstack/files/liberty/keystoneclient/wmtotp.py b/modules/openstack/files/liberty/keystoneclient/wmtotp.py index cc52f93..bc4f21b 100644 --- a/modules/openstack/files/liberty/keystoneclient/wmtotp.py +++ b/modules/openstack/files/liberty/keystoneclient/wmtotp.py @@ -27,7 +27,7 @@ """Construct a User/Password/totp based authentication method. :param string password: Password for authentication. -:param string totp: Totp token for authentication. +:param string totp: 2FA (TOTP) token for authentication. :param string username: Username for authentication. :param string user_id: User ID for authentication. :param string user_domain_id: User's domain ID for authentication. @@ -91,7 +91,7 @@ cfg.StrOpt('user-domain-id', help="User's domain id"), cfg.StrOpt('user-domain-name', help="User's domain name"), cfg.StrOpt('password', secret=True, help="User's password"), -cfg.StrOpt('totp', secret=True, help="Totp token"), +cfg.StrOpt('totp', secret=True, help="2FA (TOTP) token"), ]) return options @@ -104,7 +104,7 @@ if not kwargs.get('totp') and (hasattr(sys.stdin, 'isatty') and sys.stdin.isatty()): try: -kwargs['totp'] = getpass.getpass('Totp token: ') +kwargs['totp'] = getpass.getpass('2FA (TOTP) token: ') except EOFError: pass -- To view, visit https://gerrit.wikimedia.org/r/289249 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I13c0ebaf46d982fa7d850b7fdb6e841dce259dd2 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] Fix central logout - change (mediawiki...CentralAuth)
Gergő Tisza has uploaded a new change for review. https://gerrit.wikimedia.org/r/289248 Change subject: Fix central logout .. Fix central logout Fixes I995bb7ee16abe94c4ffbff0330a1acb2721115cd which pushed creating the centraluser from the local user (for central token reset) after the point where the local user is logged out. Bug: T135525 Bug: T92357 Change-Id: I1a174f76d343e7e6a26ba5e5df7c5edda21a3c01 Co-Authored-By: Anomie--- M includes/CentralAuthHooks.php 1 file changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth refs/changes/48/289248/1 diff --git a/includes/CentralAuthHooks.php b/includes/CentralAuthHooks.php index 36d37f2..76e3352 100644 --- a/includes/CentralAuthHooks.php +++ b/includes/CentralAuthHooks.php @@ -706,8 +706,9 @@ return true; } - DeferredUpdates::addCallableUpdate( function() use ( $user ) { - $centralUser = CentralAuthUser::getMasterInstance( $user ); + $username = $user->getName(); + DeferredUpdates::addCallableUpdate( function() use ( $username ) { + $centralUser = CentralAuthUser::getMasterInstanceByName( $username ); if ( $centralUser->exists() ) { $centralUser->resetAuthToken(); } -- To view, visit https://gerrit.wikimedia.org/r/289248 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1a174f76d343e7e6a26ba5e5df7c5edda21a3c01 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CentralAuth Gerrit-Branch: master Gerrit-Owner: Gergő Tisza ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix encoding and paging on unsubscribe table - change (wikimedia...tools)
Ejegg has uploaded a new change for review. https://gerrit.wikimedia.org/r/289247 Change subject: Fix encoding and paging on unsubscribe table .. Fix encoding and paging on unsubscribe table Make collation match other tables, give it an int ID to page on. FIXME: export.py always writes the order_by column to the csv. Bug: T135204 Change-Id: I2b4ff0f5949b11d6bc5f7f9bdc2442bcc04a7785 --- M silverpop_export/export.py M silverpop_export/update_table.sql 2 files changed, 5 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/tools refs/changes/47/289247/1 diff --git a/silverpop_export/export.py b/silverpop_export/export.py index f70a151..e4cbd9d 100644 --- a/silverpop_export/export.py +++ b/silverpop_export/export.py @@ -89,12 +89,12 @@ log.info("Starting unsubscribe data export") exportq = DbQuery() exportq.tables.append('silverpop_excluded') -exportq.columns.append('email') +exportq.columns.append('*') run_export_query( db=db, query=exportq, output=output_path, -sort_by_index="email" +sort_by_index="id" ) diff --git a/silverpop_export/update_table.sql b/silverpop_export/update_table.sql index ba294e0..5019eef 100755 --- a/silverpop_export/update_table.sql +++ b/silverpop_export/update_table.sql @@ -299,13 +299,14 @@ DROP TABLE IF EXISTS silverpop_excluded; CREATE TABLE IF NOT EXISTS silverpop_excluded( + id int AUTO_INCREMENT PRIMARY KEY, email varchar(255), INDEX sx_email (email), CONSTRAINT sx_email_u UNIQUE (email) -); +) COLLATE 'utf8_unicode_ci' AUTO_INCREMENT=1; -INSERT IGNORE INTO silverpop_excluded +INSERT IGNORE INTO silverpop_excluded (email) SELECT email FROM log_civicrm.log_civicrm_email e; -- To view, visit https://gerrit.wikimedia.org/r/289247 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2b4ff0f5949b11d6bc5f7f9bdc2442bcc04a7785 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/tools Gerrit-Branch: master Gerrit-Owner: Ejegg___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Aggregate contact ID in select (MySQL 5.7 fix) - change (wikimedia...tools)
Ejegg has submitted this change and it was merged. Change subject: Aggregate contact ID in select (MySQL 5.7 fix) .. Aggregate contact ID in select (MySQL 5.7 fix) We want the latest contact ID - this makes that deterministic and makes stricter 5.7 defaults happy. Change-Id: Ifc902597d89801695f05f0175806a267427093a1 --- M silverpop_export/update_table.sql 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Ejegg: Verified Awight: Looks good to me, approved diff --git a/silverpop_export/update_table.sql b/silverpop_export/update_table.sql index d796db1..ba294e0 100755 --- a/silverpop_export/update_table.sql +++ b/silverpop_export/update_table.sql @@ -198,7 +198,7 @@ INSERT INTO silverpop_export_stat (email, exid, max_amount_usd, total_usd, cnt_total, has_recurred_donation) SELECT -e.email, ex.id, MAX(ct.total_amount), SUM(ct.total_amount), +e.email, MAX(ex.id), MAX(ct.total_amount), SUM(ct.total_amount), count(*), MAX(IF(SUBSTRING(ct.trxn_id, 1, 9) = 'RECURRING', 1, 0)) FROM civicrm.civicrm_email e FORCE INDEX(UI_email) -- To view, visit https://gerrit.wikimedia.org/r/288030 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifc902597d89801695f05f0175806a267427093a1 Gerrit-PatchSet: 3 Gerrit-Project: wikimedia/fundraising/tools Gerrit-Branch: master Gerrit-Owner: EjeggGerrit-Reviewer: Awight Gerrit-Reviewer: Ejegg Gerrit-Reviewer: Springle Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Revert "Avoid DBPerformance log warnings in onUserLogout()" - change (mediawiki...CentralAuth)
Gergő Tisza has uploaded a new change for review. https://gerrit.wikimedia.org/r/289246 Change subject: Revert "Avoid DBPerformance log warnings in onUserLogout()" .. Revert "Avoid DBPerformance log warnings in onUserLogout()" This reverts commit 7935ca7fef62342e96ffd0b0d86168686ebeaabb. This was breaking central logout on beta. Bug: T135525 Bug: T92357 Change-Id: Iaa568849c88f2d8801606d5def821e9a1b56a311 --- M includes/CentralAuthHooks.php 1 file changed, 5 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth refs/changes/46/289246/1 diff --git a/includes/CentralAuthHooks.php b/includes/CentralAuthHooks.php index b84bcae..58364d4 100644 --- a/includes/CentralAuthHooks.php +++ b/includes/CentralAuthHooks.php @@ -674,18 +674,17 @@ */ static function onUserLogout( &$user ) { global $wgCentralAuthCookies; - if ( !$wgCentralAuthCookies ) { // Use local sessions only. return true; } + $centralUser = CentralAuthUser::getMasterInstance( $user ); - DeferredUpdates::addCallableUpdate( function() use ( $user ) { - $centralUser = CentralAuthUser::getMasterInstance( $user ); - if ( $centralUser->exists() ) { + if ( $centralUser->exists() ) { + DeferredUpdates::addCallableUpdate( function() use ( $centralUser ) { $centralUser->resetAuthToken(); - } - } ); + } ); + } // Clean up any possible forced rename markers $user->getRequest()->setSessionData( 'CentralAuthForcedRename', null ); -- To view, visit https://gerrit.wikimedia.org/r/289246 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iaa568849c88f2d8801606d5def821e9a1b56a311 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/CentralAuth Gerrit-Branch: master Gerrit-Owner: Gergő Tisza___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update VE core submodule to master (eeaf1e2) - change (mediawiki...VisualEditor)
Jforrester has uploaded a new change for review. https://gerrit.wikimedia.org/r/289245 Change subject: Update VE core submodule to master (eeaf1e2) .. Update VE core submodule to master (eeaf1e2) New changes: c54a48a build: Fix watch list (csslint -> stylelint) 58ba3d9 Add stylelint rules for @-rules 3f8c75a Stylelint: Add rule for unsupported browser features 3b96ff3 Fix minimum Opera version (15 -> 12) 9a1110b Stylelint: No ID selectors 9800bb8 build: Remove remaining references to csslint b6ab14a stylelint: Re-enable features by names 6cc1f3c Move stylelint to npm 1d15fa0 build: Bump stylelint version to v0.2.0 ccc1724 stylelint: Use the preset rather than extending Change-Id: I22fa8098592338a5e912aba9ad21131b21d9c0ea --- M lib/ve 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/45/289245/1 diff --git a/lib/ve b/lib/ve index 12ad256..eeaf1e2 16 --- a/lib/ve +++ b/lib/ve -Subproject commit 12ad256600d8d91ff2df7a082d3d0df231f5411a +Subproject commit eeaf1e235949346d86cc948e273513ad8917f2ab -- To view, visit https://gerrit.wikimedia.org/r/289245 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I22fa8098592338a5e912aba9ad21131b21d9c0ea Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Jforrester___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Merge master into deployment - change (wikimedia...crm)
jenkins-bot has submitted this change and it was merged. Change subject: Merge master into deployment .. Merge master into deployment 8aebfd2 Update Spanish TY letter Change-Id: I5729341d967f22657c9d1dca95cd3d9cc618506c --- 0 files changed, 0 insertions(+), 0 deletions(-) Approvals: Ejegg: Verified; Looks good to me, approved jenkins-bot: Verified -- To view, visit https://gerrit.wikimedia.org/r/289243 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5729341d967f22657c9d1dca95cd3d9cc618506c Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: deployment Gerrit-Owner: EjeggGerrit-Reviewer: Ejegg Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update to DataModel Services 3.6 - change (mediawiki...WikibaseMediaInfo)
jenkins-bot has submitted this change and it was merged. Change subject: Update to DataModel Services 3.6 .. Update to DataModel Services 3.6 Change-Id: I764b02622186462b07dc6b632c31ab520c0647f8 --- M composer.json M src/DataModel/Serialization/MediaInfoSerializer.php M src/DataModel/Services/Diff/MediaInfoDiffer.php M src/DataModel/Services/Diff/MediaInfoPatcher.php 4 files changed, 20 insertions(+), 48 deletions(-) Approvals: Adrian Heine: Looks good to me, approved jenkins-bot: Verified diff --git a/composer.json b/composer.json index aae5452..a2c6e54 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ "serialization/serialization": "~3.2", "wikibase/data-model": "~6.0", "wikibase/data-model-serialization": "~2.0", - "wikibase/data-model-services": "~3.5" + "wikibase/data-model-services": "~3.6" }, "require-dev": { "jakub-onderka/php-parallel-lint": "0.9.2", diff --git a/src/DataModel/Serialization/MediaInfoSerializer.php b/src/DataModel/Serialization/MediaInfoSerializer.php index f77f892..7e6b1a8 100644 --- a/src/DataModel/Serialization/MediaInfoSerializer.php +++ b/src/DataModel/Serialization/MediaInfoSerializer.php @@ -41,7 +41,7 @@ * * @param mixed $object * -* @return boolean +* @return bool */ public function isSerializerFor( $object ) { return $object instanceof MediaInfo; diff --git a/src/DataModel/Services/Diff/MediaInfoDiffer.php b/src/DataModel/Services/Diff/MediaInfoDiffer.php index 3149a54..ccc413a 100644 --- a/src/DataModel/Services/Diff/MediaInfoDiffer.php +++ b/src/DataModel/Services/Diff/MediaInfoDiffer.php @@ -7,7 +7,7 @@ use Wikibase\DataModel\Entity\EntityDocument; use Wikibase\DataModel\Services\Diff\EntityDiff; use Wikibase\DataModel\Services\Diff\EntityDifferStrategy; -use Wikibase\DataModel\Services\Diff\Internal\StatementListDiffer; +use Wikibase\DataModel\Services\Diff\StatementListDiffer; use Wikibase\MediaInfo\DataModel\MediaInfo; /** diff --git a/src/DataModel/Services/Diff/MediaInfoPatcher.php b/src/DataModel/Services/Diff/MediaInfoPatcher.php index 0da3026..67a4550 100644 --- a/src/DataModel/Services/Diff/MediaInfoPatcher.php +++ b/src/DataModel/Services/Diff/MediaInfoPatcher.php @@ -6,10 +6,8 @@ use Wikibase\DataModel\Entity\EntityDocument; use Wikibase\DataModel\Services\Diff\EntityDiff; use Wikibase\DataModel\Services\Diff\EntityPatcherStrategy; -use Wikibase\DataModel\Services\Diff\Internal\FingerprintPatcher; -use Wikibase\DataModel\Services\Diff\Internal\StatementListPatcher; -use Wikibase\DataModel\Term\Fingerprint; -use Wikibase\DataModel\Term\TermList; +use Wikibase\DataModel\Services\Diff\StatementListPatcher; +use Wikibase\DataModel\Services\Diff\TermListPatcher; use Wikibase\MediaInfo\DataModel\MediaInfo; /** @@ -22,9 +20,9 @@ class MediaInfoPatcher implements EntityPatcherStrategy { /** -* @var FingerprintPatcher +* @var TermListPatcher */ - private $fingerprintPatcher; + private $termListPatcher; /** * @var StatementListPatcher @@ -32,14 +30,14 @@ private $statementListPatcher; public function __construct() { - $this->fingerprintPatcher = new FingerprintPatcher(); + $this->termListPatcher = new TermListPatcher(); $this->statementListPatcher = new StatementListPatcher(); } /** * @param string $entityType * -* @return boolean +* @return bool */ public function canPatchEntityType( $entityType ) { return $entityType === 'mediainfo'; @@ -49,52 +47,26 @@ * @param EntityDocument $entity * @param EntityDiff $patch * -* @return MediaInfo * @throws InvalidArgumentException */ public function patchEntity( EntityDocument $entity, EntityDiff $patch ) { - $this->assertIsMediaInfo( $entity ); - - $this->patchMediaInfo( $entity, $patch ); - } - - private function assertIsMediaInfo( EntityDocument $mediaInfo ) { - if ( !( $mediaInfo instanceof MediaInfo ) ) { - throw new InvalidArgumentException( '$mediaInfo must be an instance of MediaInfo' ); + if ( !( $entity instanceof MediaInfo ) ) { + throw new InvalidArgumentException( '$entity must be an instance of MediaInfo' ); } - } - private function patchMediaInfo( MediaInfo $mediaInfo, EntityDiff $patch ) { - // TODO: Introduce and use TermListPatcher. - $fingerprint = new Fingerprint( - $mediaInfo->getLabels(), - $mediaInfo->getDescriptions() +
[MediaWiki-commits] [Gerrit] Remove unused index feature from ClaimsChanger.js - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Remove unused index feature from ClaimsChanger.js .. Remove unused index feature from ClaimsChanger.js I found a single usage in https://www.wikidata.org/wiki/MediaWiki:Gadget-DuplicateReferences.js but not with this index feature. I do not know if other user-land code uses this. How to find out? Bug: T134887 Change-Id: I4eaa2c13a290d0b1901859a25f0ba9a17d308221 --- M view/resources/wikibase/entityChangers/ClaimsChanger.js M view/tests/qunit/wikibase/entityChangers/ClaimsChanger.tests.js 2 files changed, 13 insertions(+), 26 deletions(-) Approvals: Adrian Heine: Looks good to me, approved jenkins-bot: Verified diff --git a/view/resources/wikibase/entityChangers/ClaimsChanger.js b/view/resources/wikibase/entityChangers/ClaimsChanger.js index 22fd4b4..6a72434 100644 --- a/view/resources/wikibase/entityChangers/ClaimsChanger.js +++ b/view/resources/wikibase/entityChangers/ClaimsChanger.js @@ -93,21 +93,19 @@ /** * @param {wikibase.datamodel.Claim} claim -* @param {number} [index] * @return {jQuery.Promise} * Resolved parameters: * - {wikibase.datamodel.Claim} The saved claim * Rejected parameters: * - {wikibase.api.RepoApiError} */ - setClaim: function( claim, index ) { + setClaim: function( claim ) { var self = this, deferred = $.Deferred(); this._api.setClaim( this._claimSerializer.serialize( claim ), - this._revisionStore.getClaimRevision( claim.getGuid() ), - index + this._revisionStore.getClaimRevision( claim.getGuid() ) ) .done( function( result ) { var savedClaim = self._claimDeserializer.deserialize( result.claim ), @@ -129,21 +127,19 @@ /** * @param {wikibase.datamodel.Statement} statement -* @param {number} [index] * @return {Object} jQuery.Promise * Resolved parameters: * - {wikibase.datamodel.Statement} The saved statement * Rejected parameters: * - {wikibase.api.RepoApiError} */ - setStatement: function( statement, index ) { + setStatement: function( statement ) { var self = this, deferred = $.Deferred(); this._api.setClaim( this._statementSerializer.serialize( statement ), - this._revisionStore.getClaimRevision( statement.getClaim().getGuid() ), - index + this._revisionStore.getClaimRevision( statement.getClaim().getGuid() ) ) .done( function( result ) { var savedStatement = self._statementDeserializer.deserialize( result.claim ), diff --git a/view/tests/qunit/wikibase/entityChangers/ClaimsChanger.tests.js b/view/tests/qunit/wikibase/entityChangers/ClaimsChanger.tests.js index b7148e7..d3fe8e8 100644 --- a/view/tests/qunit/wikibase/entityChangers/ClaimsChanger.tests.js +++ b/view/tests/qunit/wikibase/entityChangers/ClaimsChanger.tests.js @@ -39,8 +39,7 @@ claimsChanger.removeStatement( new wb.datamodel.Statement( new wb.datamodel.Claim( new wb.datamodel.PropertyNoValueSnak( 'P1' ) - ) ), - 'index' + ) ) ); assert.ok( api.removeClaim.calledOnce ); @@ -70,8 +69,7 @@ claimsChanger.removeStatement( new wb.datamodel.Statement( new wb.datamodel.Claim( new wb.datamodel.PropertyNoValueSnak( 'P1' ) - ) ), - 'index' + ) ) ) .done( function() { assert.ok( true, 'removeStatement succeeded' ); @@ -107,8 +105,7 @@ claimsChanger.removeStatement( new wb.datamodel.Statement( new wb.datamodel.Claim( new wb.datamodel.PropertyNoValueSnak( 'P1' ) - ) ), - 'index' + ) ) ) .done( function() { assert.ok( false, 'removeStatement should have failed' ); @@ -141,8 +138,7 @@ ); claimsChanger.setClaim( - new wb.datamodel.Claim( new wb.datamodel.PropertyNoValueSnak( 'P1' ) ), - 'index' + new wb.datamodel.Claim( new wb.datamodel.PropertyNoValueSnak( 'P1' ) )
[MediaWiki-commits] [Gerrit] stylelint: Use the preset rather than extending - change (VisualEditor/VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: stylelint: Use the preset rather than extending .. stylelint: Use the preset rather than extending Change-Id: I69f5204db217bc2ed6a14649925599ef9efcdeb6 --- M .stylelintrc M package.json 2 files changed, 5 insertions(+), 100 deletions(-) Approvals: Esanders: Looks good to me, approved jenkins-bot: Verified diff --git a/.stylelintrc b/.stylelintrc index 81b0a78..87325ff 100644 --- a/.stylelintrc +++ b/.stylelintrc @@ -1,18 +1,6 @@ { + "extends": "stylelint-config-wikimedia", "rules": { - - "indentation": [ "tab" ], - "max-empty-lines": 1, - "no-eol-whitespace": true, - "no-missing-eof-newline": true, - - "no-duplicate-selectors": true, - "no-descending-specificity": true, - "declaration-no-important": true, - "selector-no-id": true, - - "no-unknown-animations": true, - "no-browser-hacks": [ true, { "browsers": [ ">5%", "Chrome >= 1", "Firefox >= 15", "Explorer >= 9", "Edge >= 1", "iOS >= 7", "Opera >= 12", "Safari >= 7", "ExplorerMobile >= 10", "Android >= 3", "not BlackBerry >= 1", "ChromeAndroid >= 1", "FirefoxAndroid >= 1", "OperaMobile >= 12", "not OperaMini >= 1" ] } ], @@ -20,89 +8,5 @@ "no-unsupported-browser-features": [ true, { "browsers": [ ">5%", "Chrome >= 1", "Firefox >= 15", "Explorer >= 9", "Edge >= 12", "iOS >= 7", "Opera >= 12", "Safari >= 7", "ExplorerMobile >= 10", "Android >= 4", "not BlackBerry >= 1", "ChromeAndroid >= 1", "FirefoxAndroid >= 1", "OperaMobile >= 12", "not OperaMini >= 1" ] } ], - - "color-hex-case": [ "lower" ], - "color-hex-length": [ "short" ], - "color-named": [ "never" ], - "color-no-invalid-hex": true, - - "font-family-name-quotes": [ "single-unless-keyword" ], - "font-weight-notation": [ "named-where-possible" ], - - "function-calc-no-unspaced-operator": true, - "function-comma-newline-after": "never-multi-line", - "function-comma-newline-before": "never-multi-line", - "function-comma-space-after": [ "always" ], - "function-comma-space-before": [ "never" ], - "function-parentheses-newline-inside": [ "never-multi-line" ], - "function-parentheses-space-inside": [ "always" ], - "function-url-quotes": [ "none" ], - "function-whitespace-after": [ "always" ], - - "value-list-comma-newline-after": [ "never-multi-line" ], - "value-list-comma-newline-before": [ "always-multi-line" ], - "value-list-comma-space-after": [ "always-single-line" ], - "value-list-comma-space-before": [ "never" ], - - "declaration-bang-space-after": [ "never" ], - "declaration-bang-space-before": [ "always" ], - "declaration-colon-space-after": [ "always" ], - "declaration-colon-space-before": [ "never" ], - - "string-no-newline": true, - "string-quotes": [ "single" ], - - "declaration-block-no-duplicate-properties": [ true, { ignore: [ "consecutive-duplicates" ] } ], - "declaration-block-no-shorthand-property-overrides": true, - - "declaration-block-semicolon-newline-after": [ "always" ], - "declaration-block-semicolon-newline-before": [ "never-multi-line" ], - "declaration-block-semicolon-space-after": [ "always-single-line" ], - "declaration-block-semicolon-space-before": [ "never" ], - "declaration-block-single-line-max-declarations": 1, - "declaration-block-trailing-semicolon": [ "always" ], - - "block-closing-brace-newline-after": [ "always" ], - "block-closing-brace-newline-before": [ "always-multi-line" ], - "block-closing-brace-space-after": [ "always-single-line" ], - "block-closing-brace-space-before": [ "always-single-line" ], - "block-no-empty": true, - "block-no-single-line": true, - "block-opening-brace-newline-after": [ "always-multi-line" ], - "block-opening-brace-space-after": [ "always-single-line" ], - "block-opening-brace-space-before": [ "always" ], - - "selector-combinator-space-after": [ "always" ], - "selector-combinator-space-before": [ "always" ], - "selector-no-vendor-prefix": true, - "selector-root-no-composition": true, - "selector-pseudo-element-colon-notation": [ "double" ], - -
[MediaWiki-commits] [Gerrit] Add stylelint and make required style fixes - change (mediawiki...Cite)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/289244 Change subject: Add stylelint and make required style fixes .. Add stylelint and make required style fixes Change-Id: I8a9def8056a72c3da0c066413e94311a1d839f5b --- M Gruntfile.js M modules/ext.cite.a11y.css M modules/ext.cite.style.css M modules/ext.cite.style.fa.css M modules/ext.cite.styles.css M modules/ve-cite/ve.ui.MWReferenceGroupInputWidget.css M modules/ve-cite/ve.ui.MWReferenceIcons.css M package.json 8 files changed, 101 insertions(+), 57 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cite refs/changes/44/289244/1 diff --git a/Gruntfile.js b/Gruntfile.js index bcccbea..4161ce9 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -11,6 +11,7 @@ grunt.loadNpmTasks( 'grunt-jscs' ); grunt.loadNpmTasks( 'grunt-jsonlint' ); grunt.loadNpmTasks( 'grunt-banana-checker' ); + grunt.loadNpmTasks( 'grunt-stylelint' ); grunt.initConfig( { jshint: { options: { @@ -38,6 +39,23 @@ src: '<%= jshint.all %>' } }, + stylelint: { + core: { + src: [ + '**/*.css', + '!modules/ve-cite/**', + '!node_modules/**' + ] + }, + 've-cite': { + options: { + configFile: 'modules/ve-cite/.stylelintrc' + }, + src: [ + 'modules/ve-cite/**/*.css' + ] + } + }, jsonlint: { all: [ '**/*.json', @@ -46,6 +64,6 @@ } } ); - grunt.registerTask( 'test', [ 'jshint', 'jscs:main', 'jsonlint', 'banana' ] ); + grunt.registerTask( 'test', [ 'jshint', 'jscs:main', 'stylelint', 'jsonlint', 'banana' ] ); grunt.registerTask( 'default', 'test' ); }; diff --git a/modules/ext.cite.a11y.css b/modules/ext.cite.a11y.css index 4ea7a81..c267815 100644 --- a/modules/ext.cite.a11y.css +++ b/modules/ext.cite.a11y.css @@ -3,14 +3,16 @@ * and https://en.wikipedia.org/w/index.php?oldid=572888139#Scrolling_past_the_bottom_of_the_page... */ .cite-accessibility-label { - position: absolute !important; /* Workaround a Webkit/Blink bug about positioning within columns as many wikis format references with several columns */ top: -9px; - clip: rect(1px 1px 1px 1px); /* IE6, IE7 */ - clip: rect(1px, 1px, 1px, 1px); + clip: rect( 1px 1px 1px 1px ); /* IE6, IE7 */ + clip: rect( 1px, 1px, 1px, 1px ); + /* stylelint-disable declaration-no-important */ + position: absolute !important; padding: 0 !important; border: 0 !important; height: 1px !important; width: 1px !important; + /* stylelint-enable declaration-no-important */ overflow: hidden; } diff --git a/modules/ext.cite.style.css b/modules/ext.cite.style.css index 6a5e7b8..55f3e4f 100644 --- a/modules/ext.cite.style.css +++ b/modules/ext.cite.style.css @@ -11,39 +11,41 @@ /* With a group set */ span.mw-ref a[data-mw-group]::after { - content: "[" attr(data-mw-group) " " counter(mw-Ref, decimal) "]"} + content: '[' attr( data-mw-group ) ' ' counter( mw-Ref, decimal ) ']'; +} /* Groups with special appearance */ -span.mw-ref a[data-mw-group="decimal"]::after { - content: "[" counter(mw-Ref, decimal) "]"; +span.mw-ref a[data-mw-group='decimal']::after { + content: '[' counter( mw-Ref, decimal ) ']'; } -span.mw-ref a[data-mw-group="lower-alpha"]::after { - content: "[" counter(mw-Ref, lower-alpha) "]"; +span.mw-ref a[data-mw-group='lower-alpha']::after { + content: '[' counter( mw-Ref, lower-alpha ) ']'; } -span.mw-ref a[data-mw-group="upper-alpha"]::after { - content: "[" counter(mw-Ref, upper-alpha) "]"; +span.mw-ref a[data-mw-group='upper-alpha']::after { + content: '[' counter( mw-Ref, upper-alpha ) ']'; } -span.mw-ref a[data-mw-group="lower-greek"]::after { - content: "[" counter(mw-Ref, lower-greek) "]"; +span.mw-ref a[data-mw-group='lower-greek']::after { + content: '[' counter( mw-Ref, lower-greek ) ']'; } -span.mw-ref a[data-mw-group="lower-roman"]::after { - content: "[" counter(mw-Ref, lower-roman) "]"; +span.mw-ref a[data-mw-group='lower-roman']::after { + content: '[' counter( mw-Ref, lower-roman ) ']'; } -span.mw-ref a[data-mw-group="upper-roman"]::after { - content: "["
[MediaWiki-commits] [Gerrit] Merge master into deployment - change (wikimedia...crm)
Ejegg has uploaded a new change for review. https://gerrit.wikimedia.org/r/289243 Change subject: Merge master into deployment .. Merge master into deployment 8aebfd2 Update Spanish TY letter Change-Id: I5729341d967f22657c9d1dca95cd3d9cc618506c --- 0 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/43/289243/1 -- To view, visit https://gerrit.wikimedia.org/r/289243 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5729341d967f22657c9d1dca95cd3d9cc618506c Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: deployment Gerrit-Owner: Ejegg___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] stylelint: Use the preset rather than extending - change (VisualEditor/VisualEditor)
Jforrester has uploaded a new change for review. https://gerrit.wikimedia.org/r/289242 Change subject: stylelint: Use the preset rather than extending .. stylelint: Use the preset rather than extending Change-Id: I69f5204db217bc2ed6a14649925599ef9efcdeb6 --- M .stylelintrc M package.json 2 files changed, 5 insertions(+), 100 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor refs/changes/42/289242/1 diff --git a/.stylelintrc b/.stylelintrc index 81b0a78..87325ff 100644 --- a/.stylelintrc +++ b/.stylelintrc @@ -1,18 +1,6 @@ { + "extends": "stylelint-config-wikimedia", "rules": { - - "indentation": [ "tab" ], - "max-empty-lines": 1, - "no-eol-whitespace": true, - "no-missing-eof-newline": true, - - "no-duplicate-selectors": true, - "no-descending-specificity": true, - "declaration-no-important": true, - "selector-no-id": true, - - "no-unknown-animations": true, - "no-browser-hacks": [ true, { "browsers": [ ">5%", "Chrome >= 1", "Firefox >= 15", "Explorer >= 9", "Edge >= 1", "iOS >= 7", "Opera >= 12", "Safari >= 7", "ExplorerMobile >= 10", "Android >= 3", "not BlackBerry >= 1", "ChromeAndroid >= 1", "FirefoxAndroid >= 1", "OperaMobile >= 12", "not OperaMini >= 1" ] } ], @@ -20,89 +8,5 @@ "no-unsupported-browser-features": [ true, { "browsers": [ ">5%", "Chrome >= 1", "Firefox >= 15", "Explorer >= 9", "Edge >= 12", "iOS >= 7", "Opera >= 12", "Safari >= 7", "ExplorerMobile >= 10", "Android >= 4", "not BlackBerry >= 1", "ChromeAndroid >= 1", "FirefoxAndroid >= 1", "OperaMobile >= 12", "not OperaMini >= 1" ] } ], - - "color-hex-case": [ "lower" ], - "color-hex-length": [ "short" ], - "color-named": [ "never" ], - "color-no-invalid-hex": true, - - "font-family-name-quotes": [ "single-unless-keyword" ], - "font-weight-notation": [ "named-where-possible" ], - - "function-calc-no-unspaced-operator": true, - "function-comma-newline-after": "never-multi-line", - "function-comma-newline-before": "never-multi-line", - "function-comma-space-after": [ "always" ], - "function-comma-space-before": [ "never" ], - "function-parentheses-newline-inside": [ "never-multi-line" ], - "function-parentheses-space-inside": [ "always" ], - "function-url-quotes": [ "none" ], - "function-whitespace-after": [ "always" ], - - "value-list-comma-newline-after": [ "never-multi-line" ], - "value-list-comma-newline-before": [ "always-multi-line" ], - "value-list-comma-space-after": [ "always-single-line" ], - "value-list-comma-space-before": [ "never" ], - - "declaration-bang-space-after": [ "never" ], - "declaration-bang-space-before": [ "always" ], - "declaration-colon-space-after": [ "always" ], - "declaration-colon-space-before": [ "never" ], - - "string-no-newline": true, - "string-quotes": [ "single" ], - - "declaration-block-no-duplicate-properties": [ true, { ignore: [ "consecutive-duplicates" ] } ], - "declaration-block-no-shorthand-property-overrides": true, - - "declaration-block-semicolon-newline-after": [ "always" ], - "declaration-block-semicolon-newline-before": [ "never-multi-line" ], - "declaration-block-semicolon-space-after": [ "always-single-line" ], - "declaration-block-semicolon-space-before": [ "never" ], - "declaration-block-single-line-max-declarations": 1, - "declaration-block-trailing-semicolon": [ "always" ], - - "block-closing-brace-newline-after": [ "always" ], - "block-closing-brace-newline-before": [ "always-multi-line" ], - "block-closing-brace-space-after": [ "always-single-line" ], - "block-closing-brace-space-before": [ "always-single-line" ], - "block-no-empty": true, - "block-no-single-line": true, - "block-opening-brace-newline-after": [ "always-multi-line" ], - "block-opening-brace-space-after": [ "always-single-line" ], - "block-opening-brace-space-before": [ "always" ], - - "selector-combinator-space-after": [ "always" ], - "selector-combinator-space-before": [ "always" ], - "selector-no-vendor-prefix": true, - "selector-root-no-composition": true, - "selector-pseudo-element-colon-notation": [
[MediaWiki-commits] [Gerrit] Fix crash when trying to save a page with a colon - change (apps...wikipedia)
Niedzielski has uploaded a new change for review. https://gerrit.wikimedia.org/r/289241 Change subject: Fix crash when trying to save a page with a colon .. Fix crash when trying to save a page with a colon • Request namespace in the MediaWiki page query. In the Content Service and whenever the property is unavailable, continue to derive it. For distinct namespace (not namespace localized name) logic, use Namespace. The previous implementation attempted to convert the localized name to a number which failed when the article's title contained a colon. • Move some of the legacy namespace code into the Namespace class for reusability. Bug: T135523 Change-Id: I0e858b5d456bad150b2ae3313acda1369bd7abb9 --- M app/src/main/java/org/wikipedia/page/Namespace.java M app/src/main/java/org/wikipedia/page/Page.java M app/src/main/java/org/wikipedia/page/PageFragment.java M app/src/main/java/org/wikipedia/page/PageProperties.java M app/src/main/java/org/wikipedia/page/PageTitle.java M app/src/main/java/org/wikipedia/readinglist/page/database/ReadingListDaoProxy.java M app/src/main/java/org/wikipedia/server/PageLeadProperties.java M app/src/main/java/org/wikipedia/server/mwapi/MwPageLead.java M app/src/main/java/org/wikipedia/server/mwapi/MwPageService.java M app/src/main/java/org/wikipedia/server/restbase/RbPageCombo.java M app/src/main/java/org/wikipedia/server/restbase/RbPageLead.java 11 files changed, 108 insertions(+), 46 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/41/289241/1 diff --git a/app/src/main/java/org/wikipedia/page/Namespace.java b/app/src/main/java/org/wikipedia/page/Namespace.java index 900f337..d17e9cf 100644 --- a/app/src/main/java/org/wikipedia/page/Namespace.java +++ b/app/src/main/java/org/wikipedia/page/Namespace.java @@ -3,15 +3,21 @@ import android.support.annotation.NonNull; import android.support.annotation.Nullable; +import org.wikipedia.Site; import org.wikipedia.model.CodeEnum; import org.wikipedia.model.EnumCode; import org.wikipedia.model.EnumCodeMap; +import org.wikipedia.staticdata.FileAliasData; +import org.wikipedia.staticdata.SpecialAliasData; import org.wikipedia.util.StringUtil; -// https://en.wikipedia.org/wiki/Wikipedia:Namespace -// https://www.mediawiki.org/wiki/Extension_default_namespaces -// https://github.com/wikimedia/wikipedia-ios/blob/master/Wikipedia/Code/NSNumber+MWKTitleNamespace.h -// https://www.mediawiki.org/wiki/Manual:Namespace#Built-in_namespaces +/** An enumeration describing the different possible namespace codes. Do not attempt to use this + * class to preserve URL path information such as Talk: or User: or localization. + * @see Wikipedia:Namespace + * @see Extension default namespaces + * @see NSNumber+MWKTitleNamespace.h (iOS implementation) + * @see Manual:Namespace + */ public enum Namespace implements EnumCode { MEDIA(-2), SPECIAL(-1) { @@ -65,6 +71,8 @@ private final int code; +/** Warning: this method returns an English translation for the current namespace. */ +@Deprecated @Nullable public String toLegacyString() { String string = this == MAIN ? null : this.name(); @@ -72,6 +80,22 @@ StringUtil.capitalizeFirstChar(string.toLowerCase()); } return string; +} + +/** Warning: this method is localized only for File and Special pages. */ +@Deprecated @NonNull public static Namespace fromLegacyString(@NonNull Site site, + @Nullable String name) { +String filePageAlias = FileAliasData.valueFor(site.languageCode()); +if (filePageAlias.equals(name)) { +return Namespace.FILE; +} + +String specialPageAlias = SpecialAliasData.valueFor(site.languageCode()); +if (specialPageAlias.equals(name)) { +return Namespace.SPECIAL; +} + +return Namespace.MAIN; } @NonNull @@ -103,4 +127,4 @@ Namespace(int code) { this.code = code; } -} \ No newline at end of file +} diff --git a/app/src/main/java/org/wikipedia/page/Page.java b/app/src/main/java/org/wikipedia/page/Page.java index 24cb13f..89f13d9 100755 --- a/app/src/main/java/org/wikipedia/page/Page.java +++ b/app/src/main/java/org/wikipedia/page/Page.java @@ -99,7 +99,7 @@ } public boolean couldHaveReadMoreSection() { -return (!isFilePage() && !getTitle().isSpecial() && getTitle().getNamespace() == null); +return getTitle().namespace() == Namespace.MAIN; } @Override @@ -141,7 +141,7 @@ } public boolean isArticle() { -return !isMainPage() && getTitle().getNamespace() == null; +return !isMainPage() && getTitle().namespace() == Namespace.MAIN; } public JSONObject toJSON() { diff --git
[MediaWiki-commits] [Gerrit] Add myself to the aqs-admin group. - change (operations/puppet)
Elukey has uploaded a new change for review. https://gerrit.wikimedia.org/r/289240 Change subject: Add myself to the aqs-admin group. .. Add myself to the aqs-admin group. Change-Id: Id2703596f694408027f997e23182b255bcb40361 --- M modules/admin/data/data.yaml 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/40/289240/1 diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml index ea6ad11..ca598d8 100644 --- a/modules/admin/data/data.yaml +++ b/modules/admin/data/data.yaml @@ -412,7 +412,7 @@ aqs-admins: description: Group of admins for the Analytics Query Service gid: 764 -members: [joal, milimetric, gwicke, eevans, mobrovac, otto] +members: [joal, milimetric, gwicke, eevans, mobrovac, otto, elukey] privileges: ['ALL = NOPASSWD: /usr/sbin/service cassandra *', 'ALL = (cassandra) NOPASSWD: ALL', 'ALL = NOPASSWD: /usr/sbin/service restbase *', -- To view, visit https://gerrit.wikimedia.org/r/289240 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id2703596f694408027f997e23182b255bcb40361 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Elukey___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] build: Use stylelint instead of csslint - change (oojs/ui)
jenkins-bot has submitted this change and it was merged. Change subject: build: Use stylelint instead of csslint .. build: Use stylelint instead of csslint With just a few rules on colour right now. Change-Id: I4086fae1ea9b48f95dca84504a8edca72b7b41e5 --- D .csslintrc A .stylelintrc M Gruntfile.js M demos/styles/demo.css M package.json M src/themes/apex/elements.less M src/themes/apex/tools.less M src/themes/apex/widgets.less 8 files changed, 26 insertions(+), 28 deletions(-) Approvals: Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/.csslintrc b/.csslintrc deleted file mode 100644 index e777c7f..000 --- a/.csslintrc +++ /dev/null @@ -1,11 +0,0 @@ -{ - "adjoining-classes": false, - "box-model": false, - "box-sizing": false, - "fallback-colors": false, - "important": false, - "outline-none": false, - "qualified-headings": false, - "universal-selector": false, - "unqualified-attributes": false -} diff --git a/.stylelintrc b/.stylelintrc new file mode 100644 index 000..b10435c --- /dev/null +++ b/.stylelintrc @@ -0,0 +1,8 @@ +{ + "rules": { + "color-hex-case": [ "lower" ], + "color-hex-length": [ "short" ], + "color-named": [ "never" ], + "color-no-invalid-hex": true + } +} \ No newline at end of file diff --git a/Gruntfile.js b/Gruntfile.js index e9cc1b4..377bdce 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -26,7 +26,6 @@ grunt.loadNpmTasks( 'grunt-contrib-clean' ); grunt.loadNpmTasks( 'grunt-contrib-concat' ); grunt.loadNpmTasks( 'grunt-contrib-copy' ); - grunt.loadNpmTasks( 'grunt-contrib-csslint' ); grunt.loadNpmTasks( 'grunt-contrib-cssmin' ); grunt.loadNpmTasks( 'grunt-contrib-jshint' ); grunt.loadNpmTasks( 'grunt-contrib-less' ); @@ -40,6 +39,7 @@ grunt.loadNpmTasks( 'grunt-jscs' ); grunt.loadNpmTasks( 'grunt-jsonlint' ); grunt.loadNpmTasks( 'grunt-karma' ); + grunt.loadNpmTasks( 'grunt-stylelint' ); grunt.loadNpmTasks( 'grunt-svg2png' ); grunt.loadNpmTasks( 'grunt-tyops' ); grunt.loadTasks( 'build/tasks' ); @@ -360,12 +360,13 @@ }, // Lint – Styling - csslint: { + stylelint: { options: { - csslintrc: '.csslintrc' + syntax: 'less' }, - all: [ + src: [ '{demos,src}/**/*.css', + '{demos,src}/**/*.less', '!demos/dist/**' ] }, @@ -434,10 +435,10 @@ watch: { files: [ '<%= jshint.dev %>', - '<%= csslint.all %>', + '<%= stylelint.all %>', 'src/**/*.less', 'php/**/*.php', - '.{csslintrc,jscsrc,jshintignore,jshintrc}' + '.{stylelintrc,jscsrc,jshintignore,jshintrc}' ], tasks: 'quick-build' } @@ -516,7 +517,7 @@ grunt.registerTask( 'minify', [ 'uglify', 'image', 'cssmin' ] ); grunt.registerTask( 'publish-build', [ 'build', 'minify' ] ); - grunt.registerTask( 'lint', [ 'jshint', 'jscs', 'csslint', 'jsonlint', 'banana' ] ); + grunt.registerTask( 'lint', [ 'jshint', 'jscs', 'stylelint', 'jsonlint', 'banana' ] ); grunt.registerTask( 'test', [ 'lint', 'git-build', 'build-tests', 'karma:main', 'karma:other' ] ); grunt.registerTask( 'demos', [ 'clean:demos', 'copy:demos', 'exec:demos' ] ); diff --git a/demos/styles/demo.css b/demos/styles/demo.css index 5b3fed0..be9dc89 100644 --- a/demos/styles/demo.css +++ b/demos/styles/demo.css @@ -184,7 +184,7 @@ } .oo-ui-demo-console-log-line-error { - color: red; + color: #f00; } .oo-ui-demo-console-label { @@ -209,7 +209,7 @@ width: 20px; text-align: center; content: '→'; - color: blue; + color: #00f; } .oo-ui-demo-console-input { diff --git a/package.json b/package.json index ba3f220..96d985e 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,6 @@ "grunt-contrib-clean": "1.0.0", "grunt-contrib-concat": "1.0.0", "grunt-contrib-copy": "1.0.0", -"grunt-contrib-csslint": "1.0.0", "grunt-contrib-cssmin": "1.0.1", "grunt-contrib-jshint": "1.0.0", "grunt-contrib-less": "1.2.0", @@ -46,6 +45,7 @@ "grunt-jsonlint": "1.0.7", "grunt-karma": "0.12.2", "grunt-promise-q": "0.1.1", +"grunt-stylelint": "0.2.0",
[MediaWiki-commits] [Gerrit] WIP: Use ArticleRevisionUndeleted instead of ArticleUndelete - change (mediawiki...Flow)
Mattflaschen has uploaded a new change for review. https://gerrit.wikimedia.org/r/289239 Change subject: WIP: Use ArticleRevisionUndeleted instead of ArticleUndelete .. WIP: Use ArticleRevisionUndeleted instead of ArticleUndelete ArticleUndelete was broken in the following scenario (but possibly also others) 1. Create page as wikitext. 2. Delete wikitext 3. Use Special:EnableFlow to create as Flow 4. Delete Flow 5. Restore just the wikitext 6. Restore Flow using revision checkbox This was partly because of Ia0ed86a9c24809256215418673e9ee8e263d1349 (it didn't recognize that the new top-level revision would be Flow, so it didn't know to update the Flow workflows). However, fixing that then causes it to reject the change, since the current Title's ID (from the wikitext revision) is different from the old page ID. It's actually Flow on top of wikitext, but it wrongly detects it. This needs more testing, but I think processing every revision will avoid inconsistent states. Bug: T122262 Change-Id: I552c119b47268a7888cf78d2fd1d5a9d98d51856 --- M Flow.php M Hooks.php 2 files changed, 6 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/39/289239/1 diff --git a/Flow.php b/Flow.php index b380656..ea36504 100644 --- a/Flow.php +++ b/Flow.php @@ -151,7 +151,7 @@ $wgHooks['ArticleConfirmDelete'][] = 'FlowHooks::onArticleConfirmDelete'; $wgHooks['ArticleDelete'][] = 'FlowHooks::onArticleDelete'; $wgHooks['ArticleDeleteComplete'][] = 'FlowHooks::onArticleDeleteComplete'; -$wgHooks['ArticleUndelete'][] = 'FlowHooks::onArticleUndelete'; +$wgHooks['ArticleRevisionUndeleted'][] = 'FlowHooks::onArticleRevisionUndeleted'; $wgHooks['SearchableNamespaces'][] = 'FlowHooks::onSearchableNamespaces'; $wgHooks['ImportHandleToplevelXMLTag'][] = 'FlowHooks::onImportHandleToplevelXMLTag'; diff --git a/Hooks.php b/Hooks.php index 2bb4d5f..0ac6e39 100644 --- a/Hooks.php +++ b/Hooks.php @@ -1586,24 +1586,19 @@ /** * @param Title $title Title corresponding to the article restored -* @param bool $created Whether or not the restoration caused the page to be created (i.e. it didn't exist before). -* @param string $comment The comment associated with the undeletion. -* @param int $oldPageId ID of page previously deleted (from archive table) +* @param Revision $revision Revision just undeleted +* @param string $oldPageId Old page ID stored with that revision when it was in the archive table * @throws InvalidUndeleteException * @return bool */ - public static function onArticleUndelete( Title $title, $created, $comment, $oldPageId ) { - if ( $title->getContentModel() === CONTENT_MODEL_FLOW_BOARD ) { - if ( $title->getArticleID() !== $oldPageId ) { - throw new InvalidUndeleteException( 'Failed to move ' . $oldPageId . ' over ' . $title->getArticleID() ); - } - + public static function onArticleRevisionUndeleted( Title $title, Revision $revision, $oldPageId ) { + if ( $revision->getContentModel() === CONTENT_MODEL_FLOW_BOARD ) { // complete hack to make sure that when the page is saved to new // location and rendered it doesn't throw an error about the wrong title Container::get( 'factory.loader.workflow' )->pageMoveInProgress(); // open a database transaction and prepare everything for the move & commit $boardMover = Container::get( 'board_mover' ); - $boardMover->prepareMove( $oldPageId, $title ); + $boardMover->prepareMove( intval( $oldPageId ), $title ); $boardMover->commit(); } -- To view, visit https://gerrit.wikimedia.org/r/289239 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I552c119b47268a7888cf78d2fd1d5a9d98d51856 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] Bump delays in uw.ConcurrentQueue's "Adding a new item when ... - change (mediawiki...UploadWizard)
Bartosz Dziewoński has uploaded a new change for review. https://gerrit.wikimedia.org/r/289238 Change subject: Bump delays in uw.ConcurrentQueue's "Adding a new item when almost done" test .. Bump delays in uw.ConcurrentQueue's "Adding a new item when almost done" test This test seems extra flaky and is occasionally failing. Increasing the timeouts should help. I tried writing down what is causing it to fail, then I tried making ASCII diagrams, then I gave up and decided to just draw it: https://phabricator.wikimedia.org/F4024185 Change-Id: Ib7eb50f0a2b62eb2f8acb221481858c2bf7f4567 --- M tests/qunit/uw.ConcurrentQueue.test.js 1 file changed, 5 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UploadWizard refs/changes/38/289238/1 diff --git a/tests/qunit/uw.ConcurrentQueue.test.js b/tests/qunit/uw.ConcurrentQueue.test.js index c5b137b..418b559 100644 --- a/tests/qunit/uw.ConcurrentQueue.test.js +++ b/tests/qunit/uw.ConcurrentQueue.test.js @@ -22,14 +22,14 @@ // each call of the returned function, the Promise it returns will take 10 ms longer to resolve. // This ensures that actions in ConcurrentQueue don't all finish at the same instant, which would // break tests (they make stronger assumptions about the order than ConcurrentQueue guarantees). - function incrementallyDelayedPromise() { - var delay = 20; + function incrementallyDelayedPromise( multiplier ) { + var delay = 20 * ( multiplier || 1 ); return function () { var deferred = $.Deferred(); setTimeout( function () { deferred.resolve(); }, delay ); - delay += 10; + delay += 10 * ( multiplier || 1 ); return deferred.promise(); }; } @@ -371,7 +371,8 @@ QUnit.test( 'Adding a new item when almost done', function ( assert ) { var done, action, changeHandler, progressHandler, completeHandler, queue, onProgress; done = assert.async(); - action = sinon.spy( incrementallyDelayedPromise() ); + // This test seems extra flaky and was occasionally failing, double the delays + action = sinon.spy( incrementallyDelayedPromise( 2 ) ); changeHandler = sinon.stub(); progressHandler = sinon.stub(); completeHandler = sinon.stub(); -- To view, visit https://gerrit.wikimedia.org/r/289238 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib7eb50f0a2b62eb2f8acb221481858c2bf7f4567 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UploadWizard Gerrit-Branch: master Gerrit-Owner: Bartosz Dziewoński___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] dhcp: add MAC for planet2001 - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: dhcp: add MAC for planet2001 .. dhcp: add MAC for planet2001 Bug:T134507 Change-Id: Iab646b08062a51db3e1c021af3f8682f897dc2f9 --- M modules/install_server/files/dhcpd/linux-host-entries.ttyS0-115200 1 file changed, 7 insertions(+), 0 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS0-115200 b/modules/install_server/files/dhcpd/linux-host-entries.ttyS0-115200 index eb95720..7866124 100644 --- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS0-115200 +++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS0-115200 @@ -145,6 +145,13 @@ filename "jessie-installer/debian-installer/amd64/pxelinux.0"; } +host planet2001 { +hardware ethernet aa:00:00:76:5e:11; +fixed-address planet2001.codfw.wmnet; +option pxelinux.pathprefix "jessie-installer/"; +filename "jessie-installer/debian-installer/amd64/pxelinux.0"; +} + host pollux { hardware ethernet aa:00:00:2d:a2:76; fixed-address pollux.wikimedia.org; -- To view, visit https://gerrit.wikimedia.org/r/289237 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iab646b08062a51db3e1c021af3f8682f897dc2f9 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: DzahnGerrit-Reviewer: Dzahn Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] dhcp: add MAC for planet2001 - change (operations/puppet)
Dzahn has uploaded a new change for review. https://gerrit.wikimedia.org/r/289237 Change subject: dhcp: add MAC for planet2001 .. dhcp: add MAC for planet2001 Bug:T134507 Change-Id: Iab646b08062a51db3e1c021af3f8682f897dc2f9 --- M modules/install_server/files/dhcpd/linux-host-entries.ttyS0-115200 1 file changed, 7 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/37/289237/1 diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS0-115200 b/modules/install_server/files/dhcpd/linux-host-entries.ttyS0-115200 index eb95720..7866124 100644 --- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS0-115200 +++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS0-115200 @@ -145,6 +145,13 @@ filename "jessie-installer/debian-installer/amd64/pxelinux.0"; } +host planet2001 { +hardware ethernet aa:00:00:76:5e:11; +fixed-address planet2001.codfw.wmnet; +option pxelinux.pathprefix "jessie-installer/"; +filename "jessie-installer/debian-installer/amd64/pxelinux.0"; +} + host pollux { hardware ethernet aa:00:00:2d:a2:76; fixed-address pollux.wikimedia.org; -- To view, visit https://gerrit.wikimedia.org/r/289237 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iab646b08062a51db3e1c021af3f8682f897dc2f9 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Bring back messages used by old email formatter system - change (mediawiki...Echo)
jenkins-bot has submitted this change and it was merged. Change subject: Bring back messages used by old email formatter system .. Bring back messages used by old email formatter system Bug: T135446 Change-Id: I235db93c0f50424da8bc30bcafd717c50a6b0b62 --- M i18n/en.json M i18n/qqq.json M includes/EmailFormatter.php 3 files changed, 6 insertions(+), 2 deletions(-) Approvals: Catrope: Looks good to me, approved jenkins-bot: Verified diff --git a/i18n/en.json b/i18n/en.json index 49a020b..16a99e2 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -194,6 +194,8 @@ "echo-email-subject-default": "New notification at {{SITENAME}}", "echo-email-body-default": "You have a new notification at {{SITENAME}}:\n\n$1", "echo-email-batch-body-default": "You have a new notification.", + "echo-email-footer-default-html": "To control which emails we send you, check your preferences.\n$1", + "echo-email-footer-default": "$2\n\nTo control which emails we send you, check your preferences:\n{{canonicalurl:{{#special:Preferences}}#mw-prefsection-echo}}\n\n$1", "echo-email-plain-footer": "To control which emails we send you, check your preferences:", "echo-email-html-footer": "To control which emails we send you, check your preferences.\n$1", "echo-notification-alert": "{{PLURAL:$1|Alert ($1)|Alerts ($1)|100=Alerts (99+)}}", diff --git a/i18n/qqq.json b/i18n/qqq.json index 7ab8302..c5a88e3 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -185,6 +185,8 @@ "echo-email-subject-default": "Default subject for Echo e-mail notifications", "echo-email-body-default": "Default message content for Echo email notifications. Parameters:\n* $1 - a plain text description of the notification", "echo-email-batch-body-default": "Default message for Echo e-mail digest notifications", + "echo-email-footer-default": "Default footer content for Echo text e-mail notifications. Parameters:\n* $1 - the address of the organization that sent the email\n* $2 - \"---...\" ({{msg-mw|echo-email-batch-separator}})\n\nFor HTML version, see {{msg-mw|echo-email-footer-default-html}}.", + "echo-email-footer-default-html": "Default footer content for Echo html e-mail notifications. Parameters:\n* $1 - the address of the organization that sent the email\n* $2 - the URL to the notification preference page\nFor plain-text version, see {{msg-mw|Echo-email-footer-default}}.", "echo-email-plain-footer": "Footer content for Echo text e-mail notifications.\n\nFor HTML version, see {{msg-mw|echo-email-html-footer}}.", "echo-email-html-footer": "Default footer content for Echo html e-mail notifications. Parameters:\n* $1 - the address of the organization that sent the email\n* $2 - the URL to the notification preference page\nFor plain-text version, see {{msg-mw|Echo-email-footer-default}}.", "echo-notification-alert": "Label for alert notifications (= non discussion notifications) tab in Echo overlay. Parameters:\n* $1 - the number of unread alerts. The number cannot be higher than 100.\nSee also:\n* {{msg-mw|Echo-notification-message}}\n{{Identical|Alert}}", diff --git a/includes/EmailFormatter.php b/includes/EmailFormatter.php index 21bed12..2b79bd1 100644 --- a/includes/EmailFormatter.php +++ b/includes/EmailFormatter.php @@ -667,7 +667,7 @@ * {@inheritDoc} */ public function decorateFooter( $address, User $user ) { - return EchoEmailMode::message( 'echo-email-plain-footer', $user ) + return EchoEmailMode::message( 'echo-email-footer-default', $user ) ->params( $address, EchoEmailMode::message( 'echo-email-batch-separator', $user )->text() @@ -770,7 +770,7 @@ $title = SpecialPage::getTitleFor( 'Preferences' ); $title->setFragment( "#mw-prefsection-echo" ); - return EchoEmailMode::message( 'echo-email-html-footer', $user ) + return EchoEmailMode::message( 'echo-email-footer-default-html', $user ) ->params( $address ) ->rawParams( $title->getFullURL( '', false, PROTO_HTTPS ) ) ->text(); -- To view, visit https://gerrit.wikimedia.org/r/289217 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I235db93c0f50424da8bc30bcafd717c50a6b0b62 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Echo Gerrit-Branch: master Gerrit-Owner: SbissonGerrit-Reviewer: Catrope Gerrit-Reviewer: Siebrand Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org
[MediaWiki-commits] [Gerrit] WIP: keyholder key cleanup - change (operations/puppet)
20after4 has uploaded a new change for review. https://gerrit.wikimedia.org/r/289236 Change subject: WIP: keyholder key cleanup .. WIP: keyholder key cleanup Bug: T132747 Change-Id: Id298a3e0f12e31afd7ea83970e192330ffbd4243 --- M hieradata/common/scap/server.yaml M hieradata/labs/deployment-prep/common.yaml M modules/eventlogging/manifests/deployment/target.pp M modules/keyholder/files/keyholder M modules/keyholder/files/ssh-agent-proxy M modules/keyholder/manifests/agent.pp D modules/keyholder/manifests/private_key.pp D modules/phabricator/manifests/deployment/target.pp M modules/phabricator/manifests/init.pp M modules/role/manifests/deployment/mediawiki.pp M modules/role/manifests/snapshot/deployment.pp M modules/scap/manifests/target.pp M modules/service/manifests/node.pp M modules/zotero/manifests/init.pp 14 files changed, 103 insertions(+), 157 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/36/289236/1 diff --git a/hieradata/common/scap/server.yaml b/hieradata/common/scap/server.yaml index 4568ed2..cf17508 100644 --- a/hieradata/common/scap/server.yaml +++ b/hieradata/common/scap/server.yaml @@ -12,24 +12,18 @@ phabricator: trusted_group: deploy-phabricator -key_fingerprint: 39:b3:2c:a7:b2:80:65:ff:0c:97:e1:22:88:6c:59:10 -key_secret: phabricator/phab_deploy_private_key eventlogging: trusted_group: eventlogging-admins -key_fingerprint: b6:4e:1a:1b:4b:70:ef:91:31:cd:a3:18:9a:ca:41:44 deploy-service: trusted_group: - deploy-service - aqs-admins -key_fingerprint: 6d:54:92:8b:39:10:f5:9b:84:40:36:ef:3c:9a:6d:d8 -key_file: servicedeploy_rsa dumpsdeploy: trusted_group: ops -key_fingerprint: 86:c9:17:ab:b7:00:79:b5:8a:c5:b5:ee:29:24:c9:2f - +key_name: dumps # scap::source declarations. These are created # by the scap::server class. Each source listed here @@ -61,4 +55,3 @@ # cxserver is the ContentTranslation server. cxserver/deploy: repository: cxserver/deploy - diff --git a/hieradata/labs/deployment-prep/common.yaml b/hieradata/labs/deployment-prep/common.yaml index 6a1ae68..f5c4d3d 100644 --- a/hieradata/labs/deployment-prep/common.yaml +++ b/hieradata/labs/deployment-prep/common.yaml @@ -205,18 +205,13 @@ phabricator: trusted_group: project-%{::labsproject} -key_fingerprint: 39:b3:2c:a7:b2:80:65:ff:0c:97:e1:22:88:6c:59:10 -key_secret: phabricator/phab_deploy_private_key eventlogging: trusted_group: project-%{::labsproject} -key_fingerprint: 02:9b:99:e2:f0:16:70:a3:d2:5a:e6:02:a3:73:0e:b0 deploy-service: trusted_group: deploy-service -key_fingerprint: 6d:54:92:8b:39:10:f5:9b:84:40:36:ef:3c:9a:6d:d8 -key_file: servicedeploy_rsa - +key_name: servicedeploy # deployment-prep scap::source declarations. These are created # by the scap::server class. Each source listed here diff --git a/modules/eventlogging/manifests/deployment/target.pp b/modules/eventlogging/manifests/deployment/target.pp index 07a46ea..6ecd1ae 100644 --- a/modules/eventlogging/manifests/deployment/target.pp +++ b/modules/eventlogging/manifests/deployment/target.pp @@ -41,11 +41,10 @@ include eventlogging::dependencies scap::target { "eventlogging/${title}": -package_name => $package_name, -deploy_user => 'eventlogging', -public_key_source => "puppet:///modules/eventlogging/deployment/eventlogging_rsa.pub.${::realm}", -service_name => $service_name, -sudo_rules=> $sudo_rules, -manage_user => false, +package_name => $package_name, +deploy_user => 'eventlogging', +service_name => $service_name, +sudo_rules => $sudo_rules, +manage_user => false, } } diff --git a/modules/keyholder/files/keyholder b/modules/keyholder/files/keyholder index 942bbc1..77c39a1 100755 --- a/modules/keyholder/files/keyholder +++ b/modules/keyholder/files/keyholder @@ -25,8 +25,15 @@ exit 1 } +#is_private_key() { +#[ -f "$1" ] && /usr/bin/openssl rsa -in "$1" -text -noout | \ +# /bin/grep -o "[0-9]* bit" 1>/dev/null 2>&1 +#} is_valid_private_key() { - # Check that $1 is a passphrase-protected private key file. + # on deployment-prep we allow unencrypted keys: + [ -f "$1" ] && [ -f "/etc/wmflabs-project" ] && return 0; + + # on production, check that $1 is a password-protected rsa private key file. [ -f "$1" ] && /usr/bin/openssl rsa -in "$1" -check -pubout -passin pass: 2>&1 | \ /bin/grep -q "bad password" } @@ -51,10 +58,12 @@ ;; arm) requires_root +KEYS="" for key in /etc/keyholder.d/*; do is_valid_private_key "$key" || ( echo "$key is not an acceptable key. Does it have a passphrase?"; continue ) - $0 add "$key" + KEYS="$KEYS $key" done +$0 add $KEYS ;; disarm)
[MediaWiki-commits] [Gerrit] planet: node regex to cover 2001 in codfw as well - change (operations/puppet)
Dzahn has submitted this change and it was merged. Change subject: planet: node regex to cover 2001 in codfw as well .. planet: node regex to cover 2001 in codfw as well In preparation of installing the equivalent of planet1001 in codfw, planet2001, adjust which nodes are covered in site.pp. Same for the installserver setting and hiera cluster. Bug:T134507 Change-Id: I1b738883505e27c4fbee184b55db0cb779e9e2f4 --- A hieradata/hosts/planet2001.yaml M manifests/site.pp M modules/install_server/files/autoinstall/netboot.cfg 3 files changed, 4 insertions(+), 3 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/hieradata/hosts/planet2001.yaml b/hieradata/hosts/planet2001.yaml new file mode 100644 index 000..b0eb223 --- /dev/null +++ b/hieradata/hosts/planet2001.yaml @@ -0,0 +1 @@ +cluster: "misc" diff --git a/manifests/site.pp b/manifests/site.pp index e59fa76..cad218f 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -2395,8 +2395,8 @@ include base::firewall } -# virtual machine hosting https://wikitech.wikimedia.org/wiki/Planet.wikimedia.org -node 'planet1001.eqiad.wmnet' { +# virtual machines hosting https://wikitech.wikimedia.org/wiki/Planet.wikimedia.org +node /^planet[12]001\.(eqiad|codfw)\.wmnet$/ { role planet::venus } diff --git a/modules/install_server/files/autoinstall/netboot.cfg b/modules/install_server/files/autoinstall/netboot.cfg index 0370d96..9189813 100755 --- a/modules/install_server/files/autoinstall/netboot.cfg +++ b/modules/install_server/files/autoinstall/netboot.cfg @@ -72,7 +72,7 @@ eeden|bast3001|maerlant|multatuli|nescio) echo partman/raid1-1partition.cfg ;; \ elastic10[0-2][0-9]|elastic103[0-1]) echo partman/elasticsearch-raid0.cfg ;; \ elastic103[2-9]|elastic104[0-9]|elastic20[0-2][0-9]|elastic203[0-1]) echo partman/elasticsearch-raid1.cfg ;; \ - bromine|bohrium|dubnium|etherpad[12]001|fermium|hassaleh|hassium|krypton|meitnerium|mendelevium|planet1001|pollux|rutherfordium|seaborgium|serpens|alsafi|furud|kraz|install1001|ununpentium) echo partman/flat.cfg virtual.cfg ;; \ + bromine|bohrium|dubnium|etherpad[12]001|fermium|hassaleh|hassium|krypton|meitnerium|mendelevium|planet[12]001|pollux|rutherfordium|seaborgium|serpens|alsafi|furud|kraz|install1001|ununpentium) echo partman/flat.cfg virtual.cfg ;; \ eventlog[1-2]001|ocg100[1-2]|sc[ab]100[1-2]) echo partman/raid1.cfg ;; \ francium|nobelium|tegmen) echo partman/raid10-gpt.cfg ;; \ ganeti100[1-9]) echo partman/ganeti-raid1.cfg ;; \ -- To view, visit https://gerrit.wikimedia.org/r/289108 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1b738883505e27c4fbee184b55db0cb779e9e2f4 Gerrit-PatchSet: 5 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: DzahnGerrit-Reviewer: Dzahn Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [WIP] Add more stylelint rules - change (oojs/ui)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/289235 Change subject: [WIP] Add more stylelint rules .. [WIP] Add more stylelint rules Change-Id: I081473cf2e826cb9aa2c08a0b404c32370d9a95b --- M .stylelintrc M demos/styles/demo.css M src/styles/layouts/FieldLayout.less M src/styles/widgets/NumberInputWidget.less M src/styles/widgets/SelectFileWidget.less M src/styles/widgets/TextInputWidget.less M src/themes/apex/widgets.less M src/themes/mediawiki/common.less M src/themes/mediawiki/widgets.less M src/themes/mediawiki/windows.less 10 files changed, 156 insertions(+), 58 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/35/289235/1 diff --git a/.stylelintrc b/.stylelintrc index b10435c..5707f13 100644 --- a/.stylelintrc +++ b/.stylelintrc @@ -1,8 +1,96 @@ { "rules": { + + "indentation": [ "tab" ], + "max-empty-lines": 1, + "no-eol-whitespace": true, + "no-missing-eof-newline": true, + + "no-duplicate-selectors": true, + "declaration-no-important": true, + "selector-no-id": true, + + "no-unknown-animations": true, + "color-hex-case": [ "lower" ], "color-hex-length": [ "short" ], "color-named": [ "never" ], - "color-no-invalid-hex": true + "color-no-invalid-hex": true, + + "font-family-name-quotes": [ "single-unless-keyword" ], + "font-weight-notation": [ "named-where-possible" ], + + "function-calc-no-unspaced-operator": true, + "function-comma-newline-after": "never-multi-line", + "function-comma-newline-before": "never-multi-line", + "function-comma-space-after": [ "always" ], + "function-comma-space-before": [ "never" ], + "function-parentheses-newline-inside": [ "never-multi-line" ], + "function-parentheses-space-inside": [ "always" ], + "function-url-quotes": [ "none" ], + "function-whitespace-after": [ "always" ], + + "value-list-comma-newline-after": [ "never-multi-line" ], + "value-list-comma-newline-before": [ "always-multi-line" ], + "value-list-comma-space-after": [ "always-single-line" ], + "value-list-comma-space-before": [ "never" ], + + "declaration-bang-space-after": [ "never" ], + "declaration-bang-space-before": [ "always" ], + "declaration-colon-space-after": [ "always" ], + "declaration-colon-space-before": [ "never" ], + + "string-no-newline": true, + "string-quotes": [ "single" ], + + "declaration-block-no-duplicate-properties": [ true, { ignore: [ "consecutive-duplicates" ] } ], + "declaration-block-no-shorthand-property-overrides": true, + + "declaration-block-semicolon-newline-after": [ "always" ], + "declaration-block-semicolon-newline-before": [ "never-multi-line" ], + "declaration-block-semicolon-space-after": [ "always-single-line" ], + "declaration-block-semicolon-space-before": [ "never" ], + "declaration-block-single-line-max-declarations": 1, + "declaration-block-trailing-semicolon": [ "always" ], + + "block-closing-brace-newline-after": [ "always" ], + "block-closing-brace-newline-before": [ "always-multi-line" ], + "block-closing-brace-space-before": [ "always-single-line" ], + "block-opening-brace-newline-after": [ "always-multi-line" ], + "block-opening-brace-space-after": [ "always-single-line" ], + "block-opening-brace-space-before": [ "always" ], + + "selector-combinator-space-after": [ "always" ], + "selector-combinator-space-before": [ "always" ], + "selector-no-vendor-prefix": true, + "selector-root-no-composition": true, + "selector-pseudo-element-colon-notation": [ "double" ], + + "selector-list-comma-newline-after": [ "always" ], + "selector-list-comma-newline-before": [ "never-multi-line" ], + "selector-list-comma-space-after": [ "always-single-line" ], + "selector-list-comma-space-before": [ "never" ], + + "media-feature-colon-space-after": [ "always" ], + "media-feature-colon-space-before": [ "never" ], + "media-feature-name-no-vendor-prefix": true, + "media-feature-no-missing-punctuation": true, + "media-feature-range-operator-space-after": [ "always" ], + "media-feature-range-operator-space-before": [ "always" ], + +
[MediaWiki-commits] [Gerrit] Use force to clean scap directory - change (operations/puppet)
Jcrespo has submitted this change and it was merged. Change subject: Use force to clean scap directory .. Use force to clean scap directory Change-Id: If36c10ced68d4d76d1e76a01a806c81a8d0ee3f9 --- M modules/scap/manifests/clean.pp 1 file changed, 5 insertions(+), 1 deletion(-) Approvals: Jcrespo: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/scap/manifests/clean.pp b/modules/scap/manifests/clean.pp index bbf5d03..cfa2431 100644 --- a/modules/scap/manifests/clean.pp +++ b/modules/scap/manifests/clean.pp @@ -13,10 +13,14 @@ '/usr/local/bin/scap-rebuild-cdbs', '/usr/local/bin/scap-recompile', '/usr/local/bin/sync-common', -'/srv/deployment/scap', ] file { $old_binstubs: ensure => absent, } + +file { '/srv/deployment/scap': +ensure => absent, +force => true, +} } -- To view, visit https://gerrit.wikimedia.org/r/289234 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If36c10ced68d4d76d1e76a01a806c81a8d0ee3f9 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: ThciprianiGerrit-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] Use force to clean scap directory - change (operations/puppet)
Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/289234 Change subject: Use force to clean scap directory .. Use force to clean scap directory Change-Id: If36c10ced68d4d76d1e76a01a806c81a8d0ee3f9 --- M modules/scap/manifests/clean.pp 1 file changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/34/289234/1 diff --git a/modules/scap/manifests/clean.pp b/modules/scap/manifests/clean.pp index bbf5d03..cfa2431 100644 --- a/modules/scap/manifests/clean.pp +++ b/modules/scap/manifests/clean.pp @@ -13,10 +13,14 @@ '/usr/local/bin/scap-rebuild-cdbs', '/usr/local/bin/scap-recompile', '/usr/local/bin/sync-common', -'/srv/deployment/scap', ] file { $old_binstubs: ensure => absent, } + +file { '/srv/deployment/scap': +ensure => absent, +force => true, +} } -- To view, visit https://gerrit.wikimedia.org/r/289234 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If36c10ced68d4d76d1e76a01a806c81a8d0ee3f9 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Thcipriani___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] service::update: Tell pip to upgrade the packages if possible - change (mediawiki/vagrant)
jenkins-bot has submitted this change and it was merged. Change subject: service::update: Tell pip to upgrade the packages if possible .. service::update: Tell pip to upgrade the packages if possible I was running into the problem of the eventbus proxy service not being up and running after a vagrant git-update. It turns out that it was failing because the requirements weren't updated, while the code was counting on dependencies being there. To avoid that, pip needs also to try to upgrade the dependencies when possible. Change-Id: I63aabdf893f57656fb7c74762c25063cb748c5ac --- M puppet/modules/service/manifests/gitupdate.pp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: BryanDavis: Looks good to me, approved Ottomata: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/puppet/modules/service/manifests/gitupdate.pp b/puppet/modules/service/manifests/gitupdate.pp index c37de45..485d68e 100644 --- a/puppet/modules/service/manifests/gitupdate.pp +++ b/puppet/modules/service/manifests/gitupdate.pp @@ -87,7 +87,7 @@ $up_cmd = $type ? { 'php'=> 'composer update --no-interaction --optimize-autoloader', 'nodejs' => 'sudo rm -rf node_modules && npm install --no-bin-links', -'python' => './virtualenv/bin/pip install -e .', +'python' => './virtualenv/bin/pip install -Ue .', default => 'invalid' } if $update and $up_cmd == 'invalid' { -- To view, visit https://gerrit.wikimedia.org/r/288363 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I63aabdf893f57656fb7c74762c25063cb748c5ac Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: MobrovacGerrit-Reviewer: BryanDavis Gerrit-Reviewer: Dduvall Gerrit-Reviewer: Ottomata Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Install timidity, freepats for Score extension role - change (mediawiki/vagrant)
jenkins-bot has submitted this change and it was merged. Change subject: Install timidity, freepats for Score extension role .. Install timidity, freepats for Score extension role Required to generate vorbis audio output. Bug: T135517 Change-Id: I2b8ae9f62a47bd61e40307f50b65b0cc876c53df --- M puppet/modules/role/manifests/score.pp 1 file changed, 3 insertions(+), 1 deletion(-) Approvals: BryanDavis: Looks good to me, approved jenkins-bot: Verified diff --git a/puppet/modules/role/manifests/score.pp b/puppet/modules/role/manifests/score.pp index a060f9a..9c13fdc 100644 --- a/puppet/modules/role/manifests/score.pp +++ b/puppet/modules/role/manifests/score.pp @@ -6,12 +6,14 @@ class role::score { include ::role::multimedia -require_package('lilypond') +require_package('lilypond', 'timidity', 'freepats') mediawiki::extension { 'Score': needs_update => true, require => [ Package['lilypond'], +Package['timidity'], +Package['freepats'], ], } } -- To view, visit https://gerrit.wikimedia.org/r/289233 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2b8ae9f62a47bd61e40307f50b65b0cc876c53df Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: Brion VIBBERGerrit-Reviewer: BryanDavis Gerrit-Reviewer: Dduvall Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Clean old scap code - change (operations/puppet)
Jcrespo has submitted this change and it was merged. Change subject: Clean old scap code .. Clean old scap code Removes old binstubs and the old /srv/deployment/scap directory. Bug: T128386 Bug: T135206 Change-Id: Id33fbb510b1c9b6561a770810e9a611cea2129c6 --- M hieradata/common/role/deployment.yaml A modules/scap/manifests/clean.pp M modules/scap/manifests/init.pp 3 files changed, 24 insertions(+), 2 deletions(-) Approvals: Jcrespo: Looks good to me, approved jenkins-bot: Verified diff --git a/hieradata/common/role/deployment.yaml b/hieradata/common/role/deployment.yaml index fc94bf4..5b3137b 100644 --- a/hieradata/common/role/deployment.yaml +++ b/hieradata/common/role/deployment.yaml @@ -74,8 +74,6 @@ upstream: https://gerrit.wikimedia.org/r/operations/software/librenms kibana/kibana: upstream: https://gerrit.wikimedia.org/r/operations/software/kibana - scap/scap: -upstream: https://phabricator.wikimedia.org/diffusion/MSCA/scap servermon/servermon: service_name: gunicorn iegreview/iegreview: diff --git a/modules/scap/manifests/clean.pp b/modules/scap/manifests/clean.pp new file mode 100644 index 000..bbf5d03 --- /dev/null +++ b/modules/scap/manifests/clean.pp @@ -0,0 +1,22 @@ +# == Class scap::clean +# +# This is a class that removes any vestiges of legacy scap from production +# systems that may cause issues. This class can be removed after it is +# run in production. +# +# Scap has a long history, let's make sure we hide that. + +class scap::clean { +$old_binstubs = [ +'/usr/local/bin/mwversionsinuse', +'/usr/local/bin/refreshCdbJsonFiles', +'/usr/local/bin/scap-rebuild-cdbs', +'/usr/local/bin/scap-recompile', +'/usr/local/bin/sync-common', +'/srv/deployment/scap', +] + +file { $old_binstubs: +ensure => absent, +} +} diff --git a/modules/scap/manifests/init.pp b/modules/scap/manifests/init.pp index 86fd34f..5fc42e5 100644 --- a/modules/scap/manifests/init.pp +++ b/modules/scap/manifests/init.pp @@ -3,6 +3,8 @@ # Common role for scap masters and targets class scap ($deployment_server = 'deployment') { +# Temporarily included to clean legacy code, should be removed once run +include scap::clean package { 'scap': ensure => '3.2.0-1', -- To view, visit https://gerrit.wikimedia.org/r/288630 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id33fbb510b1c9b6561a770810e9a611cea2129c6 Gerrit-PatchSet: 4 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: ThciprianiGerrit-Reviewer: 20after4 Gerrit-Reviewer: BryanDavis Gerrit-Reviewer: Chad Gerrit-Reviewer: Faidon Liambotis Gerrit-Reviewer: Filippo Giunchedi Gerrit-Reviewer: Jcrespo Gerrit-Reviewer: Thcipriani Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Install timidity, freepats for Score extension role - change (mediawiki/vagrant)
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/289233 Change subject: Install timidity, freepats for Score extension role .. Install timidity, freepats for Score extension role Required to generate vorbis audio output. Bug: T135517 Change-Id: I2b8ae9f62a47bd61e40307f50b65b0cc876c53df --- M puppet/modules/role/manifests/score.pp 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/33/289233/1 diff --git a/puppet/modules/role/manifests/score.pp b/puppet/modules/role/manifests/score.pp index a060f9a..9c13fdc 100644 --- a/puppet/modules/role/manifests/score.pp +++ b/puppet/modules/role/manifests/score.pp @@ -6,12 +6,14 @@ class role::score { include ::role::multimedia -require_package('lilypond') +require_package('lilypond', 'timidity', 'freepats') mediawiki::extension { 'Score': needs_update => true, require => [ Package['lilypond'], +Package['timidity'], +Package['freepats'], ], } } -- To view, visit https://gerrit.wikimedia.org/r/289233 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2b8ae9f62a47bd61e40307f50b65b0cc876c53df Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: Brion VIBBER___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix uncontroversial phpcs errors - change (mediawiki...Scribunto)
Anomie has uploaded a new change for review. https://gerrit.wikimedia.org/r/289232 Change subject: Fix uncontroversial phpcs errors .. Fix uncontroversial phpcs errors The following continue to be ignored: * Generic.Arrays.DisallowLongArraySyntax.Found, because I'm not sure Scribunto is ready to abandon old version support in master. * MediaWiki.ControlStructures.AssignmentInControlStructures.AssignmentInControlStructures, because it's overly strict for its purpose. Squiz.Classes.ValidClassName.NotCamelCaps isn't ignored globally, we just ignore it explicitly every place it's needed. Change-Id: I307668da6ef7b3e23da19b1fd1e08914239b99b3 --- M Scribunto.i18n.php M Scribunto.php M common/Common.php M common/Hooks.php M common/ScribuntoContent.php M common/ScribuntoContentHandler.php M engines/LuaCommon/HtmlLibrary.php M engines/LuaCommon/LanguageLibrary.php M engines/LuaCommon/LibraryBase.php M engines/LuaCommon/LuaCommon.php M engines/LuaCommon/LuaInterpreter.php M engines/LuaCommon/MessageLibrary.php M engines/LuaCommon/SiteLibrary.php M engines/LuaCommon/TextLibrary.php M engines/LuaCommon/TitleLibrary.php M engines/LuaCommon/UriLibrary.php M engines/LuaCommon/UstringLibrary.php M engines/LuaCommon/lualib/ustring/make-normalization-table.php M engines/LuaCommon/lualib/ustring/make-tables.php M engines/LuaSandbox/Engine.php M engines/LuaStandalone/LuaStandaloneEngine.php M phpcs.xml M tests/engines/LuaCommon/CommonTest.php M tests/engines/LuaCommon/HtmlLibraryTest.php M tests/engines/LuaCommon/LanguageLibraryTest.php M tests/engines/LuaCommon/LibraryUtilTest.php M tests/engines/LuaCommon/LuaDataProvider.php M tests/engines/LuaCommon/LuaEngineTestBase.php M tests/engines/LuaCommon/LuaEnvironmentComparisonTest.php M tests/engines/LuaCommon/LuaInterpreterTest.php M tests/engines/LuaCommon/MessageLibraryTest.php M tests/engines/LuaCommon/SiteLibraryTest.php M tests/engines/LuaCommon/TextLibraryTest.php M tests/engines/LuaCommon/TitleLibraryTest.php M tests/engines/LuaCommon/UriLibraryTest.php M tests/engines/LuaCommon/UstringLibraryPureLuaTest.php M tests/engines/LuaCommon/UstringLibraryTest.php M tests/engines/LuaSandbox/LuaSandboxInterpreterTest.php M tests/engines/LuaSandbox/SandboxTest.php M tests/engines/LuaStandalone/LuaStandaloneInterpreterTest.php M tests/engines/LuaStandalone/StandaloneTest.php 41 files changed, 259 insertions(+), 186 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Scribunto refs/changes/32/289232/1 diff --git a/Scribunto.i18n.php b/Scribunto.i18n.php index 5b59e71..838da4e 100644 --- a/Scribunto.i18n.php +++ b/Scribunto.i18n.php @@ -15,7 +15,7 @@ function wfJsonI18nShimc5d9278c8d74fbc1( $cache, $code, &$cachedData ) { $codeSequence = array_merge( array( $code ), $cachedData['fallbackSequence'] ); foreach ( $codeSequence as $csCode ) { - $fileName = dirname( __FILE__ ) . "/i18n/$csCode.json"; + $fileName = __DIR__ . "/i18n/$csCode.json"; if ( is_readable( $fileName ) ) { $data = FormatJson::decode( file_get_contents( $fileName ), true ); foreach ( array_keys( $data ) as $key ) { diff --git a/Scribunto.php b/Scribunto.php index 49961cf..4d934c8 100644 --- a/Scribunto.php +++ b/Scribunto.php @@ -20,8 +20,9 @@ * http://www.gnu.org/copyleft/gpl.html */ -if ( !defined( 'MEDIAWIKI' ) ) +if ( !defined( 'MEDIAWIKI' ) ) { die(); +} $wgExtensionCredits['parserhook']['Scribunto'] = array( 'path' => __FILE__, @@ -33,26 +34,28 @@ define( 'CONTENT_MODEL_SCRIBUNTO', 'Scribunto' ); -$dir = __DIR__ . '/'; $wgMessagesDirs['Scribunto'] = __DIR__ . '/i18n'; -$wgExtensionMessagesFiles['Scribunto'] = $dir . 'Scribunto.i18n.php'; -$wgExtensionMessagesFiles['ScribuntoMagic'] = $dir . 'Scribunto.magic.php'; -$wgExtensionMessagesFiles['ScribuntoNamespaces'] = $dir . 'Scribunto.namespaces.php'; +$wgExtensionMessagesFiles['Scribunto'] = __DIR__ . '/Scribunto.i18n.php'; +$wgExtensionMessagesFiles['ScribuntoMagic'] = __DIR__ . '/Scribunto.magic.php'; +$wgExtensionMessagesFiles['ScribuntoNamespaces'] = __DIR__ . '/Scribunto.namespaces.php'; -$wgAutoloadClasses['ScribuntoEngineBase'] = $dir.'common/Base.php'; -$wgAutoloadClasses['ScribuntoModuleBase'] = $dir.'common/Base.php'; -$wgAutoloadClasses['ScribuntoHooks'] = $dir.'common/Hooks.php'; -$wgAutoloadClasses['ScribuntoException'] = $dir.'common/Common.php'; -$wgAutoloadClasses['Scribunto'] = $dir.'common/Common.php'; -$wgAutoloadClasses['ApiScribuntoConsole'] = $dir.'common/ApiScribuntoConsole.php'; -$wgAutoloadClasses['ScribuntoContentHandler'] = $dir.'common/ScribuntoContentHandler.php'; -$wgAutoloadClasses['ScribuntoContent'] = $dir.'common/ScribuntoContent.php'; -$wgAutoloadClasses['Scribunto_LuaError'] =
[MediaWiki-commits] [Gerrit] Fix fatal for TimedMediaHandler previews without files. - change (mediawiki...TimedMediaHandler)
jenkins-bot has submitted this change and it was merged. Change subject: Fix fatal for TimedMediaHandler previews without files. .. Fix fatal for TimedMediaHandler previews without files. The TimedMediaHandler extension is used to create playback thumbnails for ogg files rendered by the Score extension. In this case, the TimedMediaHandler has no file connected to it, so code inside the thumbnail renderer and any code called from that renderer, should not depend on the presence of a source file. Follow-up to: I4227b88 Bug: T135491 Change-Id: I62b02a73679b82b0feae92fa244b57e782c51385 --- M TimedMediaTransformOutput.php 1 file changed, 6 insertions(+), 2 deletions(-) Approvals: Brion VIBBER: Looks good to me, approved jenkins-bot: Verified diff --git a/TimedMediaTransformOutput.php b/TimedMediaTransformOutput.php index 927dcb2..31008e4 100644 --- a/TimedMediaTransformOutput.php +++ b/TimedMediaTransformOutput.php @@ -286,7 +286,11 @@ /** * Call mediaWiki xml helper class to build media tag output from -* supplied arrays +* supplied arrays. +* +* This function is also called by the Score extension, in which case +* there is no connection to a file object. +* * @param $sizeOverride array * @param $autoPlay boolean sets the autoplay attribute * @return string @@ -327,7 +331,7 @@ } } } - $mediaTracks = $this->getTextHandler()->getTracks(); + $mediaTracks = $this->file ? $this->getTextHandler()->getTracks() : null; foreach ( $mediaTracks as &$track ) { foreach ( $track as $attr => $val ) { if ( $attr === 'title' || $attr === 'provider' ) { -- To view, visit https://gerrit.wikimedia.org/r/289197 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I62b02a73679b82b0feae92fa244b57e782c51385 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/TimedMediaHandler Gerrit-Branch: master Gerrit-Owner: TheDJGerrit-Reviewer: Brion VIBBER Gerrit-Reviewer: TheDJ Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Moritz is owner of selenium-Math Jenkins job - change (integration/config)
Zfilipin has uploaded a new change for review. https://gerrit.wikimedia.org/r/289231 Change subject: Moritz is owner of selenium-Math Jenkins job .. Moritz is owner of selenium-Math Jenkins job Bug: T134492 Change-Id: Ie577a4a4c3a8889ea4355e0225f247a7d9def038 --- M jjb/selenium.yaml 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/31/289231/1 diff --git a/jjb/selenium.yaml b/jjb/selenium.yaml index f2d4893..60c4898 100644 --- a/jjb/selenium.yaml +++ b/jjb/selenium.yaml @@ -69,7 +69,7 @@ - project: name: Math -recipients: *emails-default +recipients: qa-ale...@lists.wikimedia.org w...@physikerwelt.de repository: mediawiki/extensions/Math jobs: -- To view, visit https://gerrit.wikimedia.org/r/289231 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie577a4a4c3a8889ea4355e0225f247a7d9def038 Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Zfilipin___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Normalize file extension for uploaded files - change (mediawiki...UploadWizard)
jenkins-bot has submitted this change and it was merged. Change subject: Normalize file extension for uploaded files .. Normalize file extension for uploaded files The extension is made lowercase and, in case an extension has several possible variants, turned into an arbitrarily chosen common form (in particular, this changes jpeg->jpg, tiff->tif, ogv->ogg). Bug: T36703 Change-Id: I315bc67d30f8b8754632a8c0bf810086f2d77b35 --- M resources/mw.UploadWizardDetails.js 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: MarkTraceur: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/mw.UploadWizardDetails.js b/resources/mw.UploadWizardDetails.js index dcf8c90..143c468 100644 --- a/resources/mw.UploadWizardDetails.js +++ b/resources/mw.UploadWizardDetails.js @@ -46,7 +46,8 @@ this.mainFields.push( this.descriptionsDetailsField ); this.titleDetails = new uw.TitleDetailsWidget( { - extension: this.upload.title.getExtension() + // Normalize file extension, e.g. 'JPEG' to 'jpg' + extension: mw.Title.normalizeExtension( this.upload.title.getExtension() ) } ); this.titleDetailsField = new uw.FieldLayout( this.titleDetails, { label: mw.message( 'mwe-upwiz-title' ).text(), -- To view, visit https://gerrit.wikimedia.org/r/289136 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I315bc67d30f8b8754632a8c0bf810086f2d77b35 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UploadWizard Gerrit-Branch: master Gerrit-Owner: Bartosz DziewońskiGerrit-Reviewer: Bartosz Dziewoński Gerrit-Reviewer: MarkTraceur Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] uw.CopyMetadataWidget: Correct sequential numbering - change (mediawiki...UploadWizard)
jenkins-bot has submitted this change and it was merged. Change subject: uw.CopyMetadataWidget: Correct sequential numbering .. uw.CopyMetadataWidget: Correct sequential numbering `sourceValue.title.title` changes with every loop iteration, which means that we generated titles based on the previous one, rather than the first one. Follow-up to 189a5572cc08ac46dc0dba1f7293d5967ee8c7ba. Bug: T135396 Change-Id: Ic1a647d9a1ef0e9933a521f3a5ebe305f2301192 --- M resources/uw.CopyMetadataWidget.js 1 file changed, 9 insertions(+), 6 deletions(-) Approvals: MarkTraceur: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/uw.CopyMetadataWidget.js b/resources/uw.CopyMetadataWidget.js index af88778..1c12f71 100644 --- a/resources/uw.CopyMetadataWidget.js +++ b/resources/uw.CopyMetadataWidget.js @@ -166,15 +166,18 @@ sourceValue.campaigns = serialized.campaigns; } + if ( copyingTitle ) { + titleZero = sourceValue.title.title; + // Add number suffix to first title if no numbering present + matches = titleZero.match( /(\D+)(\d{1,3})(\D*)$/ ); + if ( matches === null ) { + titleZero = titleZero + ' 01'; + } + } + // And apply for ( i = 0; i < uploads.length; i++ ) { if ( copyingTitle ) { - // Add number suffix to first title if no numbering present - titleZero = sourceValue.title.title; - matches = titleZero.match( /(\D+)(\d{1,3})(\D*)$/ ); - if ( matches === null ) { - titleZero = titleZero + ' 01'; - } // Overwrite remaining title inputs with first title + increment of rightmost // number in the title. Note: We ignore numbers with more than three digits, because these // are more likely to be years ("Wikimania 2011 Celebration") or other non-sequence -- To view, visit https://gerrit.wikimedia.org/r/289139 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic1a647d9a1ef0e9933a521f3a5ebe305f2301192 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UploadWizard Gerrit-Branch: master Gerrit-Owner: Bartosz DziewońskiGerrit-Reviewer: Bartosz Dziewoński Gerrit-Reviewer: MarkTraceur Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Revert "Revert "cache_misc: do not deliver expired cached ob... - change (operations/puppet)
BBlack has submitted this change and it was merged. Change subject: Revert "Revert "cache_misc: do not deliver expired cached objects"" .. Revert "Revert "cache_misc: do not deliver expired cached objects"" This reverts commit e5e43a3a3a7cd594856da4bac79b5d4c78bcf16b. Change-Id: Ib0cf50f44fc689cde352e2c39aa3384f463f7738 --- M templates/varnish/misc-backend.inc.vcl.erb M templates/varnish/misc-frontend.inc.vcl.erb 2 files changed, 16 insertions(+), 2 deletions(-) Approvals: Ema: Looks good to me, but someone else must approve BBlack: Looks good to me, approved jenkins-bot: Verified diff --git a/templates/varnish/misc-backend.inc.vcl.erb b/templates/varnish/misc-backend.inc.vcl.erb index 322e86c..3127c8c 100644 --- a/templates/varnish/misc-backend.inc.vcl.erb +++ b/templates/varnish/misc-backend.inc.vcl.erb @@ -33,7 +33,14 @@ } sub cluster_be_hash { } -sub cluster_be_hit { } + +sub cluster_be_hit { +# XXX debugging v4 CL:0 issues +if (obj.ttl < 0s) { +return (miss); +} +} + sub cluster_be_miss { } sub cluster_be_pass { } diff --git a/templates/varnish/misc-frontend.inc.vcl.erb b/templates/varnish/misc-frontend.inc.vcl.erb index 85e882d..f951f37 100644 --- a/templates/varnish/misc-frontend.inc.vcl.erb +++ b/templates/varnish/misc-frontend.inc.vcl.erb @@ -31,7 +31,14 @@ } sub cluster_fe_hash { } -sub cluster_fe_hit { } + +sub cluster_fe_hit { +# XXX debugging v4 CL:0 issues +if (obj.ttl < 0s) { +return (miss); +} +} + sub cluster_fe_miss { } sub cluster_fe_pass { } sub cluster_fe_backend_response { } -- To view, visit https://gerrit.wikimedia.org/r/289230 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib0cf50f44fc689cde352e2c39aa3384f463f7738 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BBlackGerrit-Reviewer: BBlack Gerrit-Reviewer: Ema Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Revert "Revert "cache_misc: do not deliver expired cached ob... - change (operations/puppet)
BBlack has uploaded a new change for review. https://gerrit.wikimedia.org/r/289230 Change subject: Revert "Revert "cache_misc: do not deliver expired cached objects"" .. Revert "Revert "cache_misc: do not deliver expired cached objects"" This reverts commit e5e43a3a3a7cd594856da4bac79b5d4c78bcf16b. Change-Id: Ib0cf50f44fc689cde352e2c39aa3384f463f7738 --- M templates/varnish/misc-backend.inc.vcl.erb M templates/varnish/misc-frontend.inc.vcl.erb 2 files changed, 16 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/30/289230/1 diff --git a/templates/varnish/misc-backend.inc.vcl.erb b/templates/varnish/misc-backend.inc.vcl.erb index 322e86c..3127c8c 100644 --- a/templates/varnish/misc-backend.inc.vcl.erb +++ b/templates/varnish/misc-backend.inc.vcl.erb @@ -33,7 +33,14 @@ } sub cluster_be_hash { } -sub cluster_be_hit { } + +sub cluster_be_hit { +# XXX debugging v4 CL:0 issues +if (obj.ttl < 0s) { +return (miss); +} +} + sub cluster_be_miss { } sub cluster_be_pass { } diff --git a/templates/varnish/misc-frontend.inc.vcl.erb b/templates/varnish/misc-frontend.inc.vcl.erb index 85e882d..f951f37 100644 --- a/templates/varnish/misc-frontend.inc.vcl.erb +++ b/templates/varnish/misc-frontend.inc.vcl.erb @@ -31,7 +31,14 @@ } sub cluster_fe_hash { } -sub cluster_fe_hit { } + +sub cluster_fe_hit { +# XXX debugging v4 CL:0 issues +if (obj.ttl < 0s) { +return (miss); +} +} + sub cluster_fe_miss { } sub cluster_fe_pass { } sub cluster_fe_backend_response { } -- To view, visit https://gerrit.wikimedia.org/r/289230 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib0cf50f44fc689cde352e2c39aa3384f463f7738 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] Syncronize VisualEditor: d2c9955..1dc780b - change (mediawiki/extensions)
Jenkins-mwext-sync has uploaded a new change for review. https://gerrit.wikimedia.org/r/289229 Change subject: Syncronize VisualEditor: d2c9955..1dc780b .. Syncronize VisualEditor: d2c9955..1dc780b Change-Id: I6cb6fd48e2c09125b415b5f35554f365a664b7a7 --- M VisualEditor 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions refs/changes/29/289229/1 diff --git a/VisualEditor b/VisualEditor index d2c9955..1dc780b 16 --- a/VisualEditor +++ b/VisualEditor -Subproject commit d2c995594a9b472425c665159b3e4be7ed55e9e7 +Subproject commit 1dc780bcbdfa3fb1834504fd08d8c62936bde6e6 -- To view, visit https://gerrit.wikimedia.org/r/289229 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6cb6fd48e2c09125b415b5f35554f365a664b7a7 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] Syncronize VisualEditor: d2c9955..1dc780b - change (mediawiki/extensions)
Jenkins-mwext-sync has submitted this change and it was merged. Change subject: Syncronize VisualEditor: d2c9955..1dc780b .. Syncronize VisualEditor: d2c9955..1dc780b Change-Id: I6cb6fd48e2c09125b415b5f35554f365a664b7a7 --- 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 d2c9955..1dc780b 16 --- a/VisualEditor +++ b/VisualEditor -Subproject commit d2c995594a9b472425c665159b3e4be7ed55e9e7 +Subproject commit 1dc780bcbdfa3fb1834504fd08d8c62936bde6e6 -- To view, visit https://gerrit.wikimedia.org/r/289229 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6cb6fd48e2c09125b415b5f35554f365a664b7a7 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] build: Use grunt-stylelint from npm - change (mediawiki...VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: build: Use grunt-stylelint from npm .. build: Use grunt-stylelint from npm Add .stylelintrc as a symlink Change-Id: I3c6d3f7f988f59b12655627e67ffb61fc7f882cd --- A .stylelintrc M Gruntfile.js M package.json 3 files changed, 3 insertions(+), 3 deletions(-) Approvals: Jforrester: Looks good to me, approved Esanders: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/.stylelintrc b/.stylelintrc new file mode 12 index 000..6f91992 --- /dev/null +++ b/.stylelintrc @@ -0,0 +1 @@ +lib/ve/.stylelintrc \ No newline at end of file diff --git a/Gruntfile.js b/Gruntfile.js index cf41979..ab4b8f9 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -16,6 +16,7 @@ grunt.loadNpmTasks( 'grunt-jsonlint' ); grunt.loadNpmTasks( 'grunt-banana-checker' ); grunt.loadNpmTasks( 'grunt-jscs' ); + grunt.loadNpmTasks( 'grunt-stylelint' ); grunt.loadNpmTasks( 'grunt-tyops' ); grunt.loadTasks( 'lib/ve/build/tasks' ); grunt.loadTasks( 'build/tasks' ); @@ -87,9 +88,6 @@ } }, stylelint: { - options: { - stylelintrc: 'lib/ve/.stylelintrc' - }, src: [ '**/*.css', '!coverage/**', diff --git a/package.json b/package.json index ea075d3..25bf777 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "grunt-contrib-watch": "1.0.0", "grunt-jscs": "2.8.0", "grunt-jsonlint": "1.0.7", +"grunt-stylelint": "0.2.0", "grunt-tyops": "0.1.0", "stylelint": "6.3.3" } -- To view, visit https://gerrit.wikimedia.org/r/289210 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3c6d3f7f988f59b12655627e67ffb61fc7f882cd Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: EsandersGerrit-Reviewer: Esanders Gerrit-Reviewer: Jforrester Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix installer issues introduces by MediaWikiServices - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Fix installer issues introduces by MediaWikiServices .. Fix installer issues introduces by MediaWikiServices This fixes three issues with the installer: 1) Make sure LocalizationCache can find the installer's i18n files. 2) Make sure we don't try to use an SqlBagOStuff for caching before we have a functioning database. 3) Don't try to output HTML when redirecting (this is unrelated to MediaWikiServices, but came up during testing) Bug: T135169 Change-Id: I7caa932024cd771d6fa226a3ac6001c3148ecc9c --- M autoload.php M includes/MediaWikiServices.php M includes/cache/CacheDependency.php M includes/cache/localisation/LocalisationCache.php M includes/installer/Installer.php M includes/installer/WebInstallerOutput.php M includes/objectcache/ObjectCache.php 7 files changed, 73 insertions(+), 8 deletions(-) Approvals: BryanDavis: Looks good to me, approved Aaron Schulz: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/autoload.php b/autoload.php index f79bace..cf0e417 100644 --- a/autoload.php +++ b/autoload.php @@ -772,6 +772,7 @@ 'MagicWord' => __DIR__ . '/includes/MagicWord.php', 'MagicWordArray' => __DIR__ . '/includes/MagicWordArray.php', 'MailAddress' => __DIR__ . '/includes/mail/MailAddress.php', + 'MainConfigDependency' => __DIR__ . '/includes/cache/CacheDependency.php', 'Maintenance' => __DIR__ . '/maintenance/Maintenance.php', 'MaintenanceFormatInstallDoc' => __DIR__ . '/maintenance/formatInstallDoc.php', 'MakeTestEdits' => __DIR__ . '/maintenance/makeTestEdits.php', diff --git a/includes/MediaWikiServices.php b/includes/MediaWikiServices.php index 891f426..71e58af 100644 --- a/includes/MediaWikiServices.php +++ b/includes/MediaWikiServices.php @@ -13,6 +13,7 @@ use LoadBalancer; use MediaWiki\Services\ServiceContainer; use MWException; +use ObjectCache; use ResourceLoader; use SearchEngine; use SearchEngineConfig; @@ -222,6 +223,8 @@ foreach ( $destroy as $name ) { $services->disableService( $name ); } + + ObjectCache::clear(); } /** diff --git a/includes/cache/CacheDependency.php b/includes/cache/CacheDependency.php index 2d29d86..a59ba97 100644 --- a/includes/cache/CacheDependency.php +++ b/includes/cache/CacheDependency.php @@ -20,6 +20,7 @@ * @file * @ingroup Cache */ +use MediaWiki\MediaWikiServices; /** * This class stores an arbitrary value along with its dependencies. @@ -247,6 +248,34 @@ /** * @ingroup Cache */ +class MainConfigDependency extends CacheDependency { + private $name; + private $value; + + function __construct( $name ) { + $this->name = $name; + $this->value = $this->getConfig()->get( $this->name ); + } + + private function getConfig() { + return MediaWikiServices::getInstance()->getMainConfig(); + } + + /** +* @return bool +*/ + function isExpired() { + if ( !$this->getConfig()->has( $this->name ) ) { + return true; + } + + return $this->getConfig()->get( $this->name ) != $this->value; + } +} + +/** + * @ingroup Cache + */ class ConstantDependency extends CacheDependency { private $name; private $value; diff --git a/includes/cache/localisation/LocalisationCache.php b/includes/cache/localisation/LocalisationCache.php index dd7d81a..0fb9ed8 100644 --- a/includes/cache/localisation/LocalisationCache.php +++ b/includes/cache/localisation/LocalisationCache.php @@ -23,6 +23,7 @@ use Cdb\Reader as CdbReader; use Cdb\Writer as CdbWriter; use CLDRPluralRuleParser\Evaluator; +use MediaWiki\MediaWikiServices; /** * Class for caching the contents of localisation files, Messages*.php @@ -802,12 +803,15 @@ * @return array */ public function getMessagesDirs() { - global $wgMessagesDirs, $IP; + global $IP; + + $config = MediaWikiServices::getInstance()->getMainConfig(); + $messagesDirs = $config->get( 'MessagesDirs' ); return [ 'core' => "$IP/languages/i18n", 'api' => "$IP/includes/api/i18n", 'oojs-ui' => "$IP/resources/lib/oojs-ui/i18n", - ] + $wgMessagesDirs; + ] + $messagesDirs; } /** @@ -958,8 +962,9 @@ # Add cache dependencies for any referenced globals $deps['wgExtensionMessagesFiles'] = new GlobalDependency( 'wgExtensionMessagesFiles' ); - // $wgMessagesDirs is used in LocalisationCache::getMessagesDirs() - $deps['wgMessagesDirs'] = new GlobalDependency(
[MediaWiki-commits] [Gerrit] mirrors: mirror Tails as well - change (operations/puppet)
Faidon Liambotis has submitted this change and it was merged. Change subject: mirrors: mirror Tails as well .. mirrors: mirror Tails as well Change-Id: I7d7f4e0a645c2168436bd01c2ac4c53f4f025b87 --- M manifests/role/installserver.pp M modules/mirrors/files/index.html A modules/mirrors/manifests/tails.pp 3 files changed, 40 insertions(+), 2 deletions(-) Approvals: Faidon Liambotis: Looks good to me, approved jenkins-bot: Verified diff --git a/manifests/role/installserver.pp b/manifests/role/installserver.pp index 7686649..88bd6a4 100644 --- a/manifests/role/installserver.pp +++ b/manifests/role/installserver.pp @@ -47,6 +47,8 @@ nrpe_command => '/usr/local/lib/nagios/plugins/check_apt_mirror /srv/mirrors/debian', } +include mirrors::tails + include install_server::tftp_server ferm::rule { 'tftp': rule => 'proto udp dport tftp { saddr $ALL_NETWORKS ACCEPT; }' diff --git a/modules/mirrors/files/index.html b/modules/mirrors/files/index.html index 7c27997..d72f8c2 100644 --- a/modules/mirrors/files/index.html +++ b/modules/mirrors/files/index.html @@ -95,9 +95,11 @@ Contents Debian -Mirror of the Debian project. +Mirror of the https://www.debian.org/;>Debian project. Ubuntu -Mirror of the Ubuntu operating system. +Mirror of the http://www.ubuntu.com/;>Ubuntu operating system. + Tails +Mirror of the https://tails.boum.org/;>Tails amnesic incognito live system. diff --git a/modules/mirrors/manifests/tails.pp b/modules/mirrors/manifests/tails.pp new file mode 100644 index 000..2187166 --- /dev/null +++ b/modules/mirrors/manifests/tails.pp @@ -0,0 +1,34 @@ +# Class: mirrors::tails +# +# This class sets up a Tails mirror +# +# Parameters: +# +# Actions: +# Populate Tails mirror configuration directory +# +# Requires: +# +# Sample Usage: +# include mirrors::tails + +class mirrors::tails { +require mirrors + +file { '/srv/mirrors/tails': +ensure => directory, +owner => 'mirror', +group => 'mirror', +mode => '0755', +} + +$rsync_cmd = '/usr/bin/rsync -rt --delete rsync.torproject.org::amnesia-archive/tails/ /srv/mirrors/tails/' + +cron { 'update-tails-mirror': +ensure => present, +command => "${rsync_cmd} 1>/dev/null 2>/dev/null", +user=> 'mirror', +hour=> '*', +minute => '15', +} +} -- To view, visit https://gerrit.wikimedia.org/r/289228 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7d7f4e0a645c2168436bd01c2ac4c53f4f025b87 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Faidon LiambotisGerrit-Reviewer: Faidon Liambotis Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Improve some documentation of AuthManager's additions - change (mediawiki/core)
Anomie has uploaded a new change for review. https://gerrit.wikimedia.org/r/288998 Change subject: Improve some documentation of AuthManager's additions .. Improve some documentation of AuthManager's additions Change-Id: I3d0742b4d8e683f9b1cf65e6a883e9804aeea676 --- M includes/DefaultSettings.php M includes/auth/AbstractPasswordPrimaryAuthenticationProvider.php 2 files changed, 46 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/98/288998/1 diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 5c7eef5..3f76027 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -4477,9 +4477,40 @@ ]; /** - * If it has been this long since the last authentication, recommend - * re-authentication before security-sensitive operations (e.g. password or - * email changes). Set negative to disable. + * Time frame for re-authentication. + * + * With only password-based authentication, you'd just ask the user to re-enter + * their password to verify certain operations like changing the password or + * changing the account's email address. But under AuthManager, the user might + * not have a password (you might even have to redirect the browser to a + * third-party service or something complex like that), you might want to have + * both factors of a two-factor authentication, and so on. So, the options are: + * - Incorporate the whole multi-step authentication flow within everything + * that needs to do this. + * - Consider it good if they used Special:UserLogin during this session within + * the last X seconds. + * - Come up with a third option. + * + * MediaWiki currently takes the second option. This setting configures the + * "X seconds". + * + * This allows for configuring different time frames for different + * "operations". The operations used in MediaWiki core include: + * - LinkAccounts + * - UnlinkAccount + * - ChangeCredentials + * - RemoveCredentials + * - ChangeEmail + * + * Additional operations may be used by extensions, either explicitly by + * calling AuthManager::securitySensitiveOperationStatus(), + * ApiAuthManagerHelper::securitySensitiveOperation() or + * SpecialPage::checkLoginSecurityLevel(), or implicitly by overriding + * SpecialPage::getLoginSecurityLevel() or by subclassing + * AuthManagerSpecialPage. + * + * The key 'default' is used if a requested operation isn't defined in the array. + * * @since 1.27 * @var int[] operation => time in seconds. A 'default' key must always be provided. */ @@ -4488,8 +4519,18 @@ ]; /** - * Whether to allow security-sensitive operations when authentication is not possible. + * Whether to allow security-sensitive operations when re-authentication is not possible. + * + * If AuthManager::canAuthenticateNow() is false (e.g. the current + * SessionProvider is not able to change users, such as when OAuth is in use), + * AuthManager::securitySensitiveOperationStatus() cannot sensibly return + * SEC_REAUTH. Setting an operation true here will have it return SEC_OK in + * that case, while setting it false will have it return SEC_FAIL. + * + * The key 'default' is used if a requested operation isn't defined in the array. + * * @since 1.27 + * @see $wgReauthenticateTime * @var bool[] operation => boolean. A 'default' key must always be provided. */ $wgAllowSecuritySensitiveOperationIfCannotReauthenticate = [ diff --git a/includes/auth/AbstractPasswordPrimaryAuthenticationProvider.php b/includes/auth/AbstractPasswordPrimaryAuthenticationProvider.php index 900d2e5..f5bfc2a 100644 --- a/includes/auth/AbstractPasswordPrimaryAuthenticationProvider.php +++ b/includes/auth/AbstractPasswordPrimaryAuthenticationProvider.php @@ -34,7 +34,7 @@ extends AbstractPrimaryAuthenticationProvider { /** @var bool Whether this provider should ABSTAIN (false) or FAIL (true) on password failure */ - protected $authoritative = true; + protected $authoritative; private $passwordFactory = null; -- To view, visit https://gerrit.wikimedia.org/r/288998 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3d0742b4d8e683f9b1cf65e6a883e9804aeea676 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core 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] mirrors: mirror Tails as well - change (operations/puppet)
Faidon Liambotis has uploaded a new change for review. https://gerrit.wikimedia.org/r/289228 Change subject: mirrors: mirror Tails as well .. mirrors: mirror Tails as well Change-Id: I7d7f4e0a645c2168436bd01c2ac4c53f4f025b87 --- M manifests/role/installserver.pp M modules/mirrors/files/index.html A modules/mirrors/manifests/tails.pp 3 files changed, 40 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/28/289228/1 diff --git a/manifests/role/installserver.pp b/manifests/role/installserver.pp index 7686649..88bd6a4 100644 --- a/manifests/role/installserver.pp +++ b/manifests/role/installserver.pp @@ -47,6 +47,8 @@ nrpe_command => '/usr/local/lib/nagios/plugins/check_apt_mirror /srv/mirrors/debian', } +include mirrors::tails + include install_server::tftp_server ferm::rule { 'tftp': rule => 'proto udp dport tftp { saddr $ALL_NETWORKS ACCEPT; }' diff --git a/modules/mirrors/files/index.html b/modules/mirrors/files/index.html index 7c27997..d72f8c2 100644 --- a/modules/mirrors/files/index.html +++ b/modules/mirrors/files/index.html @@ -95,9 +95,11 @@ Contents Debian -Mirror of the Debian project. +Mirror of the https://www.debian.org/;>Debian project. Ubuntu -Mirror of the Ubuntu operating system. +Mirror of the http://www.ubuntu.com/;>Ubuntu operating system. + Tails +Mirror of the https://tails.boum.org/;>Tails amnesic incognito live system. diff --git a/modules/mirrors/manifests/tails.pp b/modules/mirrors/manifests/tails.pp new file mode 100644 index 000..2187166 --- /dev/null +++ b/modules/mirrors/manifests/tails.pp @@ -0,0 +1,34 @@ +# Class: mirrors::tails +# +# This class sets up a Tails mirror +# +# Parameters: +# +# Actions: +# Populate Tails mirror configuration directory +# +# Requires: +# +# Sample Usage: +# include mirrors::tails + +class mirrors::tails { +require mirrors + +file { '/srv/mirrors/tails': +ensure => directory, +owner => 'mirror', +group => 'mirror', +mode => '0755', +} + +$rsync_cmd = '/usr/bin/rsync -rt --delete rsync.torproject.org::amnesia-archive/tails/ /srv/mirrors/tails/' + +cron { 'update-tails-mirror': +ensure => present, +command => "${rsync_cmd} 1>/dev/null 2>/dev/null", +user=> 'mirror', +hour=> '*', +minute => '15', +} +} -- To view, visit https://gerrit.wikimedia.org/r/289228 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7d7f4e0a645c2168436bd01c2ac4c53f4f025b87 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] [bugfix] LogEntry is not a valid logtype class - change (pywikibot/core)
Xqt has uploaded a new change for review. https://gerrit.wikimedia.org/r/289227 Change subject: [bugfix] LogEntry is not a valid logtype class .. [bugfix] LogEntry is not a valid logtype class - LogEntry is not a valid logtype class but a generic super class. Raise an exception if logtype doesn't match any of registered _logtypes. Bug: T135505 Change-Id: I096cf636c6da1d65fe578e053594a5203d4dceb8 --- M pywikibot/logentries.py 1 file changed, 1 insertion(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/27/289227/1 diff --git a/pywikibot/logentries.py b/pywikibot/logentries.py index a12715d..9a946db 100644 --- a/pywikibot/logentries.py +++ b/pywikibot/logentries.py @@ -422,10 +422,7 @@ @return: specified subclass of LogEntry, or LogEntry @rtype: class """ -try: -return cls._logtypes[logtype] -except KeyError: -return LogEntry +return cls._logtypes[logtype] def _createFromData(self, logdata): """ -- To view, visit https://gerrit.wikimedia.org/r/289227 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I096cf636c6da1d65fe578e053594a5203d4dceb8 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Xqt___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Exchange the addresses of labs-recursor0 and labs-recursor1 ... - change (operations/dns)
Andrew Bogott has submitted this change and it was merged. Change subject: Exchange the addresses of labs-recursor0 and labs-recursor1 (reverse dns) .. Exchange the addresses of labs-recursor0 and labs-recursor1 (reverse dns) This is a followup to f798f48a549ba379a83460d94256a439333a3c92 Bug: T135447 Change-Id: I54783d4d521d7f132805eb864a91f9090ee8 --- M templates/154.80.208.in-addr.arpa M templates/155.80.208.in-addr.arpa 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Andrew Bogott: Looks good to me, approved jenkins-bot: Verified diff --git a/templates/154.80.208.in-addr.arpa b/templates/154.80.208.in-addr.arpa index e393504..798a52e 100644 --- a/templates/154.80.208.in-addr.arpa +++ b/templates/154.80.208.in-addr.arpa @@ -32,7 +32,7 @@ 16 1H IN PTR ms1001.wikimedia.org. 18 1H IN PTR virt1000.wikimedia.org. -20 1H IN PTR labs-recursor0.wikimedia.org. +20 1H IN PTR labs-recursor1.wikimedia.org. 39 1H IN PTR radium.wikimedia.org. 42 1H IN PTR cp1008.wikimedia.org. diff --git a/templates/155.80.208.in-addr.arpa b/templates/155.80.208.in-addr.arpa index 9ceca87..cd107f6 100644 --- a/templates/155.80.208.in-addr.arpa +++ b/templates/155.80.208.in-addr.arpa @@ -64,7 +64,7 @@ 115 1H IN PTR vl1004-eth3.lvs1011.eqiad.wmnet. 116 1H IN PTR vl1004-eth3.lvs1012.eqiad.wmnet. 117 1H IN PTR labservices1001.wikimedia.org. -118 1H IN PTR labs-recursor1.wikimedia.org. +118 1H IN PTR labs-recursor0.wikimedia.org. 119 1H IN PTR einsteinium.wikimedia.org. ; 208.80.155.128/25 Eqiad Labs virtualization subnet -- To view, visit https://gerrit.wikimedia.org/r/289226 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I54783d4d521d7f132805eb864a91f9090ee8 Gerrit-PatchSet: 2 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: Andrew BogottGerrit-Reviewer: Andrew Bogott Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Exchange the addresses of labs-recursor0 and labs-recursor1 ... - change (operations/dns)
Andrew Bogott has uploaded a new change for review. https://gerrit.wikimedia.org/r/289226 Change subject: Exchange the addresses of labs-recursor0 and labs-recursor1 (reverse dns) .. Exchange the addresses of labs-recursor0 and labs-recursor1 (reverse dns) This is a followup to f798f48a549ba379a83460d94256a439333a3c92 Change-Id: I54783d4d521d7f132805eb864a91f9090ee8 --- M templates/154.80.208.in-addr.arpa M templates/155.80.208.in-addr.arpa 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dns refs/changes/26/289226/1 diff --git a/templates/154.80.208.in-addr.arpa b/templates/154.80.208.in-addr.arpa index e393504..798a52e 100644 --- a/templates/154.80.208.in-addr.arpa +++ b/templates/154.80.208.in-addr.arpa @@ -32,7 +32,7 @@ 16 1H IN PTR ms1001.wikimedia.org. 18 1H IN PTR virt1000.wikimedia.org. -20 1H IN PTR labs-recursor0.wikimedia.org. +20 1H IN PTR labs-recursor1.wikimedia.org. 39 1H IN PTR radium.wikimedia.org. 42 1H IN PTR cp1008.wikimedia.org. diff --git a/templates/155.80.208.in-addr.arpa b/templates/155.80.208.in-addr.arpa index 9ceca87..cd107f6 100644 --- a/templates/155.80.208.in-addr.arpa +++ b/templates/155.80.208.in-addr.arpa @@ -64,7 +64,7 @@ 115 1H IN PTR vl1004-eth3.lvs1011.eqiad.wmnet. 116 1H IN PTR vl1004-eth3.lvs1012.eqiad.wmnet. 117 1H IN PTR labservices1001.wikimedia.org. -118 1H IN PTR labs-recursor1.wikimedia.org. +118 1H IN PTR labs-recursor0.wikimedia.org. 119 1H IN PTR einsteinium.wikimedia.org. ; 208.80.155.128/25 Eqiad Labs virtualization subnet -- To view, visit https://gerrit.wikimedia.org/r/289226 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I54783d4d521d7f132805eb864a91f9090ee8 Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: Andrew Bogott___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] install-server: fix dhcp file - change (operations/puppet)
Giuseppe Lavagetto has submitted this change and it was merged. Change subject: install-server: fix dhcp file .. install-server: fix dhcp file Change-Id: Ib074cca494b3d655f6b3d6041d85e998a3bd33c0 --- M modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Giuseppe Lavagetto: Verified; Looks good to me, approved diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 index 2500670..86b289e 100644 --- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 +++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 @@ -5005,6 +5005,7 @@ fixed-address mw1295.eqiad.wmnet; } +host mw1296 { hardware ethernet 14:18:77:61:34:8F; fixed-address mw1296.eqiad.wmnet; } -- To view, visit https://gerrit.wikimedia.org/r/289225 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib074cca494b3d655f6b3d6041d85e998a3bd33c0 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Giuseppe LavagettoGerrit-Reviewer: Giuseppe Lavagetto ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] install-server: fix dhcp file - change (operations/puppet)
Giuseppe Lavagetto has uploaded a new change for review. https://gerrit.wikimedia.org/r/289225 Change subject: install-server: fix dhcp file .. install-server: fix dhcp file Change-Id: Ib074cca494b3d655f6b3d6041d85e998a3bd33c0 --- 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/25/289225/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 2500670..86b289e 100644 --- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 +++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 @@ -5005,6 +5005,7 @@ fixed-address mw1295.eqiad.wmnet; } +host mw1296 { hardware ethernet 14:18:77:61:34:8F; fixed-address mw1296.eqiad.wmnet; } -- To view, visit https://gerrit.wikimedia.org/r/289225 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib074cca494b3d655f6b3d6041d85e998a3bd33c0 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Giuseppe Lavagetto___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add aqs100[456] to the list of production hosts. - change (analytics...deploy)
Elukey has submitted this change and it was merged. Change subject: Add aqs100[456] to the list of production hosts. .. Add aqs100[456] to the list of production hosts. Bug: T135145 Change-Id: Ibd1506ce38da34b772399e969f66959d455e4045 --- M scap/aqs-prod 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Elukey: Verified; Looks good to me, approved Ottomata: Looks good to me, but someone else must approve diff --git a/scap/aqs-prod b/scap/aqs-prod index 1707810..4ae1754 100644 --- a/scap/aqs-prod +++ b/scap/aqs-prod @@ -1,3 +1,6 @@ aqs1001.eqiad.wmnet aqs1002.eqiad.wmnet aqs1003.eqiad.wmnet +aqs1004.eqiad.wmnet +aqs1005.eqiad.wmnet +aqs1006.eqiad.wmnet -- To view, visit https://gerrit.wikimedia.org/r/289224 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibd1506ce38da34b772399e969f66959d455e4045 Gerrit-PatchSet: 1 Gerrit-Project: analytics/aqs/deploy Gerrit-Branch: master Gerrit-Owner: ElukeyGerrit-Reviewer: Elukey Gerrit-Reviewer: Joal Gerrit-Reviewer: Mobrovac Gerrit-Reviewer: Ottomata ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add aqs100[456] to the list of production hosts. - change (analytics...deploy)
Elukey has uploaded a new change for review. https://gerrit.wikimedia.org/r/289224 Change subject: Add aqs100[456] to the list of production hosts. .. Add aqs100[456] to the list of production hosts. Bug: T135145 Change-Id: Ibd1506ce38da34b772399e969f66959d455e4045 --- M scap/aqs-prod 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/aqs/deploy refs/changes/24/289224/1 diff --git a/scap/aqs-prod b/scap/aqs-prod index 1707810..4ae1754 100644 --- a/scap/aqs-prod +++ b/scap/aqs-prod @@ -1,3 +1,6 @@ aqs1001.eqiad.wmnet aqs1002.eqiad.wmnet aqs1003.eqiad.wmnet +aqs1004.eqiad.wmnet +aqs1005.eqiad.wmnet +aqs1006.eqiad.wmnet -- To view, visit https://gerrit.wikimedia.org/r/289224 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibd1506ce38da34b772399e969f66959d455e4045 Gerrit-PatchSet: 1 Gerrit-Project: analytics/aqs/deploy Gerrit-Branch: master Gerrit-Owner: Elukey___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Exchange labs-recursor0 and labs-recursor1 - change (operations/puppet)
Andrew Bogott has submitted this change and it was merged. Change subject: Exchange labs-recursor0 and labs-recursor1 .. Exchange labs-recursor0 and labs-recursor1 This is for consistency. After this change, one system is labservices1001 labs-ns0 labs-recursor0 and another is holmium (soon to be labservices1002) labs-ns1 labs-recursor1 Bug: T135447 Depends-on: I6cf7666d4c95fe413d0fd5a0b6dfcdfbcaf245c6 Change-Id: I9ce414930ddb8e62aa959e7d0fd80c17f8dbf9a5 --- M hieradata/eqiad.yaml M hieradata/hosts/holmium.yaml 2 files changed, 4 insertions(+), 4 deletions(-) Approvals: Andrew Bogott: Looks good to me, approved jenkins-bot: Verified diff --git a/hieradata/eqiad.yaml b/hieradata/eqiad.yaml index 89f72e3..8d31383 100644 --- a/hieradata/eqiad.yaml +++ b/hieradata/eqiad.yaml @@ -103,8 +103,8 @@ host: 'labs-ns0.wikimedia.org' host_secondary: 'labs-ns1.wikimedia.org' dbserver: 'localhost' - recursor: 'labs-recursor1.wikimedia.org' - recursor_secondary: 'labs-recursor0.wikimedia.org' + recursor: 'labs-recursor0.wikimedia.org' + recursor_secondary: 'labs-recursor1.wikimedia.org' novaconfig: db_host: 'm5-master.eqiad.wmnet' diff --git a/hieradata/hosts/holmium.yaml b/hieradata/hosts/holmium.yaml index e6edd3b..781125d 100644 --- a/hieradata/hosts/holmium.yaml +++ b/hieradata/hosts/holmium.yaml @@ -3,5 +3,5 @@ labsdnsconfig: host: 'labs-ns1.wikimedia.org' host_secondary: 'labs-ns0.wikimedia.org' - recursor: 'labs-recursor0.wikimedia.org' - recursor_secondary: 'labs-recursor1.wikimedia.org' + recursor: 'labs-recursor1.wikimedia.org' + recursor_secondary: 'labs-recursor0.wikimedia.org' -- To view, visit https://gerrit.wikimedia.org/r/289081 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9ce414930ddb8e62aa959e7d0fd80c17f8dbf9a5 Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Andrew BogottGerrit-Reviewer: Andrew Bogott Gerrit-Reviewer: Rush Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] T134512 Bumping portals to master. Updating survey banner. - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: T134512 Bumping portals to master. Updating survey banner. .. T134512 Bumping portals to master. Updating survey banner. Bug: T134512 Change-Id: Id7e88c85c7c79441e4d6138d75b11e667358b313 --- M portals 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Thcipriani: Looks good to me, approved jenkins-bot: Verified diff --git a/portals b/portals index 7426907..5912029 16 --- a/portals +++ b/portals -Subproject commit 7426907fc22abe27386ef6bf6c69d5cacbae7c7d +Subproject commit 5912029740d90ce28cfbff615d4e3929d10ca061 -- To view, visit https://gerrit.wikimedia.org/r/289218 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id7e88c85c7c79441e4d6138d75b11e667358b313 Gerrit-PatchSet: 2 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: JdrewniakGerrit-Reviewer: Thcipriani Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] caches: refactor around cache::cluster - change (operations/puppet)
BBlack has submitted this change and it was merged. Change subject: caches: refactor around cache::cluster .. caches: refactor around cache::cluster This adds a new per-cache-cluster-role hiera key 'cache::cluster', which is the short cache cluster name (e.g. 'text' for 'cache_text'), and then moves the common code for system::role, webrequest, and reqstats out of the per-cluster roles and into role::cache::base using the new hieradata (since all clusters share these, and they only differ on the cluster name's use in strings). Change-Id: Ib9539891069c8f667d94922d6fb81da19bbddd7b --- M hieradata/role/common/cache/maps.yaml M hieradata/role/common/cache/misc.yaml M hieradata/role/common/cache/text.yaml M hieradata/role/common/cache/upload.yaml M modules/role/manifests/cache/base.pp M modules/role/manifests/cache/maps.pp M modules/role/manifests/cache/misc.pp M modules/role/manifests/cache/text.pp M modules/role/manifests/cache/upload.pp 9 files changed, 22 insertions(+), 64 deletions(-) Approvals: BBlack: Looks good to me, approved jenkins-bot: Verified diff --git a/hieradata/role/common/cache/maps.yaml b/hieradata/role/common/cache/maps.yaml index adf8c77..1554a96 100644 --- a/hieradata/role/common/cache/maps.yaml +++ b/hieradata/role/common/cache/maps.yaml @@ -1,4 +1,5 @@ cluster: cache_maps +cache::cluster: maps # The contents of this hash control our DC->DC routing for varnish backend # daemons. There should be a key for every cache datacenter, and the # values can be another datacenter or 'direct', which means contact the diff --git a/hieradata/role/common/cache/misc.yaml b/hieradata/role/common/cache/misc.yaml index 48ca1af..6ef96d4 100644 --- a/hieradata/role/common/cache/misc.yaml +++ b/hieradata/role/common/cache/misc.yaml @@ -1,4 +1,5 @@ cluster: cache_misc +cache::cluster: misc # The contents of this hash control our DC->DC routing for varnish backend # daemons. There should be a key for every cache datacenter, and the # values can be another datacenter or 'direct', which means contact the diff --git a/hieradata/role/common/cache/text.yaml b/hieradata/role/common/cache/text.yaml index 0616360..ae2fe39 100644 --- a/hieradata/role/common/cache/text.yaml +++ b/hieradata/role/common/cache/text.yaml @@ -1,4 +1,5 @@ cluster: cache_text +cache::cluster: text admin::groups: - perf-roots # The contents of this hash control our DC->DC routing for varnish backend diff --git a/hieradata/role/common/cache/upload.yaml b/hieradata/role/common/cache/upload.yaml index bfde655..3b09e28 100644 --- a/hieradata/role/common/cache/upload.yaml +++ b/hieradata/role/common/cache/upload.yaml @@ -1,4 +1,5 @@ cluster: cache_upload +cache::cluster: upload admin::groups: - perf-roots # The contents of this hash control our DC->DC routing for varnish backend diff --git a/modules/role/manifests/cache/base.pp b/modules/role/manifests/cache/base.pp index c103fa2..026e9ad 100644 --- a/modules/role/manifests/cache/base.pp +++ b/modules/role/manifests/cache/base.pp @@ -14,6 +14,12 @@ include network::constants include conftool::scripts +$cache_cluster = hiera('cache::cluster') + +system::role { "role::cache::${cache_cluster}": +description => "${cache_cluster} Varnish cache server", +} + # Client connection stats from the 'X-Connection-Properties' # header set by the SSL terminators. ::varnish::logging::xcps { 'xcps': @@ -25,6 +31,18 @@ key_prefix=> "varnish.${::site}.backends", } +# Install a varnishkafka producer to send +# varnish webrequest logs to Kafka. +class { 'role::cache::kafka::webrequest': +topic => "webrequest_${cache_cluster}", +} + +# Parse varnishlogs for request statistics and send to statsd. +varnish::logging::reqstats { 'frontend': +metric_prefix => "varnish.${::site}.${cache_cluster}.frontend.request", +statsd=> hiera('statsd'), +} + # Only production needs system perf tweaks and NFS client disable if $::realm == 'production' { include role::cache::perf diff --git a/modules/role/manifests/cache/maps.pp b/modules/role/manifests/cache/maps.pp index 80cc7e6..adb6889 100644 --- a/modules/role/manifests/cache/maps.pp +++ b/modules/role/manifests/cache/maps.pp @@ -1,8 +1,4 @@ class role::cache::maps { -system::role { 'role::cache::maps': -description => 'maps Varnish cache server', -} - include role::cache::2layer include role::cache::ssl::unified if $::standard::has_ganglia { @@ -68,17 +64,5 @@ fe_cache_be_opts => $fe_cache_be_opts, be_cache_be_opts => $be_cache_be_opts, cluster_nodes=> hiera('cache::maps::nodes'), -} - -# Install a varnishkafka producer to send -# varnish webrequest logs to Kafka. -class { 'role::cache::kafka::webrequest': -topic => 'webrequest_maps', -} - -
[MediaWiki-commits] [Gerrit] "values from property/concept" params only displayed if SMW ... - change (mediawiki...SemanticForms)
Yaron Koren has submitted this change and it was merged. Change subject: "values from property/concept" params only displayed if SMW is used .. "values from property/concept" params only displayed if SMW is used Change-Id: I4ceb14ffa27cb64d573c83e220e83d661707ceac --- M includes/forminputs/SF_EnumInput.php 1 file changed, 14 insertions(+), 10 deletions(-) Approvals: Yaron Koren: Checked; Looks good to me, approved jenkins-bot: Verified diff --git a/includes/forminputs/SF_EnumInput.php b/includes/forminputs/SF_EnumInput.php index aea47ba..3027213 100644 --- a/includes/forminputs/SF_EnumInput.php +++ b/includes/forminputs/SF_EnumInput.php @@ -30,11 +30,13 @@ 'type' => 'string', 'description' => wfMessage( 'sf_forminputs_values' )->text() ); - $params[] = array( - 'name' => 'values from property', - 'type' => 'string', - 'description' => wfMessage( 'sf_forminputs_valuesfromproperty' )->text() - ); + if ( defined( 'SMW_VERSION' ) ) { + $params[] = array( + 'name' => 'values from property', + 'type' => 'string', + 'description' => wfMessage( 'sf_forminputs_valuesfromproperty' )->text() + ); + } $params[] = array( 'name' => 'values from category', 'type' => 'string', @@ -45,11 +47,13 @@ 'type' => 'string', 'description' => wfMessage( 'sf_forminputs_valuesfromnamespace' )->text() ); - $params[] = array( - 'name' => 'values from concept', - 'type' => 'string', - 'description' => wfMessage( 'sf_forminputs_valuesfromconcept' )->text() - ); + if ( defined( 'SMW_VERSION' ) ) { + $params[] = array( + 'name' => 'values from concept', + 'type' => 'string', + 'description' => wfMessage( 'sf_forminputs_valuesfromconcept' )->text() + ); + } return $params; } -- To view, visit https://gerrit.wikimedia.org/r/289223 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4ceb14ffa27cb64d573c83e220e83d661707ceac Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SemanticForms Gerrit-Branch: master Gerrit-Owner: Yaron KorenGerrit-Reviewer: Yaron Koren Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Enable VisualEditor for IP users on the Japanese Wikipedia - change (operations/mediawiki-config)
jenkins-bot has submitted this change and it was merged. Change subject: Enable VisualEditor for IP users on the Japanese Wikipedia .. Enable VisualEditor for IP users on the Japanese Wikipedia Change-Id: I0913e8fe6b03d59f93808e0ad6a49e2b790a34b8 --- M wmf-config/InitialiseSettings.php 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Thcipriani: Looks good to me, approved Jforrester: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/wmf-config/InitialiseSettings.php b/wmf-config/InitialiseSettings.php index 2e3f1b9..d20c02c 100644 --- a/wmf-config/InitialiseSettings.php +++ b/wmf-config/InitialiseSettings.php @@ -13557,7 +13557,6 @@ 'default' => false, 'enwiki' => true, 'eswiki' => true, - 'jawiki' => true, ], // Whether VisualEditor should be enabled for a proportion of new accounts on a -- To view, visit https://gerrit.wikimedia.org/r/287646 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0913e8fe6b03d59f93808e0ad6a49e2b790a34b8 Gerrit-PatchSet: 2 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: JforresterGerrit-Reviewer: Florianschmidtwelzow Gerrit-Reviewer: Jforrester Gerrit-Reviewer: Thcipriani Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] "values from property/concept" params only displayed if SMW ... - change (mediawiki...SemanticForms)
Yaron Koren has uploaded a new change for review. https://gerrit.wikimedia.org/r/289223 Change subject: "values from property/concept" params only displayed if SMW is used .. "values from property/concept" params only displayed if SMW is used Change-Id: I4ceb14ffa27cb64d573c83e220e83d661707ceac --- M includes/forminputs/SF_EnumInput.php 1 file changed, 14 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticForms refs/changes/23/289223/1 diff --git a/includes/forminputs/SF_EnumInput.php b/includes/forminputs/SF_EnumInput.php index aea47ba..3027213 100644 --- a/includes/forminputs/SF_EnumInput.php +++ b/includes/forminputs/SF_EnumInput.php @@ -30,11 +30,13 @@ 'type' => 'string', 'description' => wfMessage( 'sf_forminputs_values' )->text() ); - $params[] = array( - 'name' => 'values from property', - 'type' => 'string', - 'description' => wfMessage( 'sf_forminputs_valuesfromproperty' )->text() - ); + if ( defined( 'SMW_VERSION' ) ) { + $params[] = array( + 'name' => 'values from property', + 'type' => 'string', + 'description' => wfMessage( 'sf_forminputs_valuesfromproperty' )->text() + ); + } $params[] = array( 'name' => 'values from category', 'type' => 'string', @@ -45,11 +47,13 @@ 'type' => 'string', 'description' => wfMessage( 'sf_forminputs_valuesfromnamespace' )->text() ); - $params[] = array( - 'name' => 'values from concept', - 'type' => 'string', - 'description' => wfMessage( 'sf_forminputs_valuesfromconcept' )->text() - ); + if ( defined( 'SMW_VERSION' ) ) { + $params[] = array( + 'name' => 'values from concept', + 'type' => 'string', + 'description' => wfMessage( 'sf_forminputs_valuesfromconcept' )->text() + ); + } return $params; } -- To view, visit https://gerrit.wikimedia.org/r/289223 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4ceb14ffa27cb64d573c83e220e83d661707ceac Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SemanticForms Gerrit-Branch: master Gerrit-Owner: Yaron Koren___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] caches: refactor around cache::cluster - change (operations/puppet)
BBlack has uploaded a new change for review. https://gerrit.wikimedia.org/r/289222 Change subject: caches: refactor around cache::cluster .. caches: refactor around cache::cluster This adds a new per-cache-cluster-role hiera key 'cache::cluster', which is the short cache cluster name (e.g. 'text' for 'cache_text'), and then moves the common code for system::role, webrequest, and reqstats out of the per-cluster roles and into role::cache::base using the new hieradata (since all clusters share these, and they only differ on the cluster name's use in strings). Change-Id: Ib9539891069c8f667d94922d6fb81da19bbddd7b --- M hieradata/role/common/cache/maps.yaml M hieradata/role/common/cache/misc.yaml M hieradata/role/common/cache/text.yaml M hieradata/role/common/cache/upload.yaml M modules/role/manifests/cache/base.pp M modules/role/manifests/cache/maps.pp M modules/role/manifests/cache/misc.pp M modules/role/manifests/cache/text.pp M modules/role/manifests/cache/upload.pp 9 files changed, 22 insertions(+), 64 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/22/289222/1 diff --git a/hieradata/role/common/cache/maps.yaml b/hieradata/role/common/cache/maps.yaml index adf8c77..1554a96 100644 --- a/hieradata/role/common/cache/maps.yaml +++ b/hieradata/role/common/cache/maps.yaml @@ -1,4 +1,5 @@ cluster: cache_maps +cache::cluster: maps # The contents of this hash control our DC->DC routing for varnish backend # daemons. There should be a key for every cache datacenter, and the # values can be another datacenter or 'direct', which means contact the diff --git a/hieradata/role/common/cache/misc.yaml b/hieradata/role/common/cache/misc.yaml index 48ca1af..6ef96d4 100644 --- a/hieradata/role/common/cache/misc.yaml +++ b/hieradata/role/common/cache/misc.yaml @@ -1,4 +1,5 @@ cluster: cache_misc +cache::cluster: misc # The contents of this hash control our DC->DC routing for varnish backend # daemons. There should be a key for every cache datacenter, and the # values can be another datacenter or 'direct', which means contact the diff --git a/hieradata/role/common/cache/text.yaml b/hieradata/role/common/cache/text.yaml index 0616360..ae2fe39 100644 --- a/hieradata/role/common/cache/text.yaml +++ b/hieradata/role/common/cache/text.yaml @@ -1,4 +1,5 @@ cluster: cache_text +cache::cluster: text admin::groups: - perf-roots # The contents of this hash control our DC->DC routing for varnish backend diff --git a/hieradata/role/common/cache/upload.yaml b/hieradata/role/common/cache/upload.yaml index bfde655..3b09e28 100644 --- a/hieradata/role/common/cache/upload.yaml +++ b/hieradata/role/common/cache/upload.yaml @@ -1,4 +1,5 @@ cluster: cache_upload +cache::cluster: upload admin::groups: - perf-roots # The contents of this hash control our DC->DC routing for varnish backend diff --git a/modules/role/manifests/cache/base.pp b/modules/role/manifests/cache/base.pp index c103fa2..026e9ad 100644 --- a/modules/role/manifests/cache/base.pp +++ b/modules/role/manifests/cache/base.pp @@ -14,6 +14,12 @@ include network::constants include conftool::scripts +$cache_cluster = hiera('cache::cluster') + +system::role { "role::cache::${cache_cluster}": +description => "${cache_cluster} Varnish cache server", +} + # Client connection stats from the 'X-Connection-Properties' # header set by the SSL terminators. ::varnish::logging::xcps { 'xcps': @@ -25,6 +31,18 @@ key_prefix=> "varnish.${::site}.backends", } +# Install a varnishkafka producer to send +# varnish webrequest logs to Kafka. +class { 'role::cache::kafka::webrequest': +topic => "webrequest_${cache_cluster}", +} + +# Parse varnishlogs for request statistics and send to statsd. +varnish::logging::reqstats { 'frontend': +metric_prefix => "varnish.${::site}.${cache_cluster}.frontend.request", +statsd=> hiera('statsd'), +} + # Only production needs system perf tweaks and NFS client disable if $::realm == 'production' { include role::cache::perf diff --git a/modules/role/manifests/cache/maps.pp b/modules/role/manifests/cache/maps.pp index 80cc7e6..adb6889 100644 --- a/modules/role/manifests/cache/maps.pp +++ b/modules/role/manifests/cache/maps.pp @@ -1,8 +1,4 @@ class role::cache::maps { -system::role { 'role::cache::maps': -description => 'maps Varnish cache server', -} - include role::cache::2layer include role::cache::ssl::unified if $::standard::has_ganglia { @@ -68,17 +64,5 @@ fe_cache_be_opts => $fe_cache_be_opts, be_cache_be_opts => $be_cache_be_opts, cluster_nodes=> hiera('cache::maps::nodes'), -} - -# Install a varnishkafka producer to send -# varnish webrequest logs to Kafka. -class { 'role::cache::kafka::webrequest': -
[MediaWiki-commits] [Gerrit] James is owner of selenium-VisualEditor Jenkins job - change (integration/config)
jenkins-bot has submitted this change and it was merged. Change subject: James is owner of selenium-VisualEditor Jenkins job .. James is owner of selenium-VisualEditor Jenkins job Bug: T134492 Change-Id: I8a3ad8809bef55cb46a93229fb38aa0ed7bfe21e --- M jjb/selenium.yaml 1 file changed, 1 insertion(+), 4 deletions(-) Approvals: Zfilipin: Looks good to me, approved Jforrester: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/jjb/selenium.yaml b/jjb/selenium.yaml index 7b6b66f..f2d4893 100644 --- a/jjb/selenium.yaml +++ b/jjb/selenium.yaml @@ -11,9 +11,6 @@ - growth: mflasc...@wikimedia.org qa-ale...@lists.wikimedia.org rm...@wikimedia.org samsm...@wikimedia.org - - visualeditor: -jforres...@wikimedia.org qa-ale...@lists.wikimedia.org - - project: name: CentralAuth recipients: *emails-default @@ -141,7 +138,7 @@ - project: name: VisualEditor path_to_ci_yml: modules/ve-mw/tests/browser/ci.yml -recipients: *emails-visualeditor +recipients: jforres...@wikimedia.org qa-ale...@lists.wikimedia.org repository: mediawiki/extensions/VisualEditor jobs: -- To view, visit https://gerrit.wikimedia.org/r/289220 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8a3ad8809bef55cb46a93229fb38aa0ed7bfe21e Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: ZfilipinGerrit-Reviewer: Hashar Gerrit-Reviewer: Jforrester Gerrit-Reviewer: Zfilipin Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add a new AQS testing environment to play with Cassandra set... - change (operations/puppet)
Elukey has submitted this change and it was merged. Change subject: Add a new AQS testing environment to play with Cassandra settings before production. .. Add a new AQS testing environment to play with Cassandra settings before production. Not sure if this is the best way to do it but the idea is to use the aqs role for aqs100[456] and to override the cassandra/restbase hieradata settings with host level specific ones. This should allow a testing replica of AQS without affecting the existing cluster. Bug: T124314 Change-Id: I504a9536c28ee839ea9a11f2f5950f0742bb94b0 --- A hieradata/hosts/aqs1004.yaml A hieradata/hosts/aqs1005.yaml A hieradata/hosts/aqs1006.yaml M manifests/site.pp 4 files changed, 111 insertions(+), 0 deletions(-) Approvals: Elukey: Looks good to me, approved jenkins-bot: Verified diff --git a/hieradata/hosts/aqs1004.yaml b/hieradata/hosts/aqs1004.yaml new file mode 100644 index 000..d1e400e --- /dev/null +++ b/hieradata/hosts/aqs1004.yaml @@ -0,0 +1,35 @@ +# Analytics Query Service - Testing node + +cassandra::seeds: +- aqs1004-a.eqiad.wmnet +- aqs1004-b.eqiad.wmnet +- aqs1005-a.eqiad.wmnet +- aqs1005-b.eqiad.wmnet +- aqs1006-a.eqiad.wmnet +- aqs1006-b.eqiad.wmnet + +cassandra::instances: + a: +jmx_port: 7189 +listen_address: 10.64.0.126 #aqs1004-a.eqiad.wmnet +rpc_address: 10.64.0.126 +rpc_interface: eth0 + b: +jmx_port: 7190 +listen_address: 10.64.0.127 #aqs1004-b.eqiad.wmnet +rpc_address: 10.64.0.127 +rpc_interface: eth0 + +cassandra::cluster_name: "Analytics Query Service Test" + +# +# AQS service +# +aqs::seeds: +- aqs1004-a.eqiad.wmnet +- aqs1004-b.eqiad.wmnet +- aqs1005-a.eqiad.wmnet +- aqs1005-b.eqiad.wmnet +- aqs1006-a.eqiad.wmnet +- aqs1006-b.eqiad.wmnet + diff --git a/hieradata/hosts/aqs1005.yaml b/hieradata/hosts/aqs1005.yaml new file mode 100644 index 000..3debbd2 --- /dev/null +++ b/hieradata/hosts/aqs1005.yaml @@ -0,0 +1,34 @@ +# Analytics Query Service - Testing node + +cassandra::seeds: +- aqs1004-a.eqiad.wmnet +- aqs1004-b.eqiad.wmnet +- aqs1005-a.eqiad.wmnet +- aqs1005-b.eqiad.wmnet +- aqs1006-a.eqiad.wmnet +- aqs1006-b.eqiad.wmnet + +cassandra::instances: + a: +jmx_port: 7189 +listen_address: 10.64.32.189 #aqs1005-a.eqiad.wmnet +rpc_address: 110.64.32.189 +rpc_interface: eth0 + b: +jmx_port: 7190 +listen_address: 10.64.32.190 #aqs1005-b.eqiad.wmnet +rpc_address: 10.64.32.190 +rpc_interface: eth0 + +cassandra::cluster_name: "Analytics Query Service Test" + +# +# AQS service +# +aqs::seeds: +- aqs1004-a.eqiad.wmnet +- aqs1004-b.eqiad.wmnet +- aqs1005-a.eqiad.wmnet +- aqs1005-b.eqiad.wmnet +- aqs1006-a.eqiad.wmnet +- aqs1006-b.eqiad.wmnet diff --git a/hieradata/hosts/aqs1006.yaml b/hieradata/hosts/aqs1006.yaml new file mode 100644 index 000..65589d7 --- /dev/null +++ b/hieradata/hosts/aqs1006.yaml @@ -0,0 +1,34 @@ +# Analytics Query Service - Testing node + +cassandra::seeds: +- aqs1004-a.eqiad.wmnet +- aqs1004-b.eqiad.wmnet +- aqs1005-a.eqiad.wmnet +- aqs1005-b.eqiad.wmnet +- aqs1006-a.eqiad.wmnet +- aqs1006-b.eqiad.wmnet + +cassandra::instances: + a: +jmx_port: 7189 +listen_address: 10.64.48.148 #aqs1006-a.eqiad.wmnet +rpc_address: 10.64.48.148 +rpc_interface: eth0 + b: +jmx_port: 7190 +listen_address: 10.64.48.149 #aqs1006-b.eqiad.wmnet +rpc_address: 10.64.48.149 +rpc_interface: eth0 + +cassandra::cluster_name: "Analytics Query Service Test" + +# +# AQS service +# +aqs::seeds: +- aqs1004-a.eqiad.wmnet +- aqs1004-b.eqiad.wmnet +- aqs1005-a.eqiad.wmnet +- aqs1005-b.eqiad.wmnet +- aqs1006-a.eqiad.wmnet +- aqs1006-b.eqiad.wmnet diff --git a/manifests/site.pp b/manifests/site.pp index d1ddffb..e59fa76 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -136,6 +136,14 @@ role aqs } +# Analytics Query Service - Testing +# These nodes are not part of the official AQS cluster now because we are +# currently testing Cassandra configurations on top of them. Hiera variables +# have been placed for each host to override the role's default values. +node /aqs100[456]\.eqiad\.wmnet/ { +role aqs +} + # git.wikimedia.org node 'antimony.wikimedia.org' { -- To view, visit https://gerrit.wikimedia.org/r/288373 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I504a9536c28ee839ea9a11f2f5950f0742bb94b0 Gerrit-PatchSet: 5 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: ElukeyGerrit-Reviewer: Elukey Gerrit-Reviewer: Mobrovac Gerrit-Reviewer: Ottomata Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing
[MediaWiki-commits] [Gerrit] Title->getContentModel: Get new content model with GAID_FOR_... - change (mediawiki/core)
Mattflaschen has uploaded a new change for review. https://gerrit.wikimedia.org/r/289221 Change subject: Title->getContentModel: Get new content model with GAID_FOR_UPDATE .. Title->getContentModel: Get new content model with GAID_FOR_UPDATE If a new revision has been inserted (e.g. with updateRevisionOn), the content model may have changed. This happens with e.g. undeletion. Bug: T122262 Change-Id: Ia0ed86a9c24809256215418673e9ee8e263d1349 --- M includes/Title.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/21/289221/1 diff --git a/includes/Title.php b/includes/Title.php index 25fbce3..ce5466a 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -908,7 +908,7 @@ * @return string Content model id */ public function getContentModel( $flags = 0 ) { - if ( !$this->mContentModel && $this->getArticleID( $flags ) ) { + if ( ( !$this->mContentModel || $flags === Title::GAID_FOR_UPDATE ) && $this->getArticleID( $flags ) ) { $linkCache = LinkCache::singleton(); $linkCache->addLinkObj( $this ); # in case we already had an article ID $this->mContentModel = $linkCache->getGoodLinkFieldObj( $this, 'model' ); -- To view, visit https://gerrit.wikimedia.org/r/289221 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia0ed86a9c24809256215418673e9ee8e263d1349 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core 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] build: Bump stylelint version to v0.2.0 - change (VisualEditor/VisualEditor)
jenkins-bot has submitted this change and it was merged. Change subject: build: Bump stylelint version to v0.2.0 .. build: Bump stylelint version to v0.2.0 Change-Id: I38df119a81cd63b4616fa163ef0b9b16336075ca --- M Gruntfile.js M package.json 2 files changed, 1 insertion(+), 4 deletions(-) Approvals: Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/Gruntfile.js b/Gruntfile.js index 81bc54e..e29d2f9 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -264,9 +264,6 @@ main: '.' }, stylelint: { - options: { - stylelintrc: '.stylelintrc' - }, src: [ '**/*.css', '!coverage/**', diff --git a/package.json b/package.json index 3d1164b..623ba82 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "grunt-jscs": "2.8.0", "grunt-jsonlint": "1.0.7", "grunt-karma": "1.0.0", -"grunt-stylelint": "0.1.0", +"grunt-stylelint": "0.2.0", "grunt-tyops": "0.1.0", "karma-chrome-launcher": "1.0.1", "karma-coverage": "1.0.0", -- To view, visit https://gerrit.wikimedia.org/r/289214 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I38df119a81cd63b4616fa163ef0b9b16336075ca Gerrit-PatchSet: 4 Gerrit-Project: VisualEditor/VisualEditor Gerrit-Branch: master Gerrit-Owner: EsandersGerrit-Reviewer: Jforrester Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] James is owner of selenium-VisualEditor Jenkins job - change (integration/config)
Zfilipin has uploaded a new change for review. https://gerrit.wikimedia.org/r/289220 Change subject: James is owner of selenium-VisualEditor Jenkins job .. James is owner of selenium-VisualEditor Jenkins job Bug: T134492 Change-Id: I8a3ad8809bef55cb46a93229fb38aa0ed7bfe21e --- M jjb/selenium.yaml 1 file changed, 1 insertion(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/config refs/changes/20/289220/1 diff --git a/jjb/selenium.yaml b/jjb/selenium.yaml index 7b6b66f..f2d4893 100644 --- a/jjb/selenium.yaml +++ b/jjb/selenium.yaml @@ -11,9 +11,6 @@ - growth: mflasc...@wikimedia.org qa-ale...@lists.wikimedia.org rm...@wikimedia.org samsm...@wikimedia.org - - visualeditor: -jforres...@wikimedia.org qa-ale...@lists.wikimedia.org - - project: name: CentralAuth recipients: *emails-default @@ -141,7 +138,7 @@ - project: name: VisualEditor path_to_ci_yml: modules/ve-mw/tests/browser/ci.yml -recipients: *emails-visualeditor +recipients: jforres...@wikimedia.org qa-ale...@lists.wikimedia.org repository: mediawiki/extensions/VisualEditor jobs: -- To view, visit https://gerrit.wikimedia.org/r/289220 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8a3ad8809bef55cb46a93229fb38aa0ed7bfe21e Gerrit-PatchSet: 1 Gerrit-Project: integration/config Gerrit-Branch: master Gerrit-Owner: Zfilipin___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] HTML email footer shows raw HTML - change (mediawiki...Echo)
Sbisson has uploaded a new change for review. https://gerrit.wikimedia.org/r/289219 Change subject: HTML email footer shows raw HTML .. HTML email footer shows raw HTML Change-Id: I45b8aa2b951c155a3f8c3c7be006604113cbc2ee --- M includes/formatters/EchoHtmlEmailFormatter.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/19/289219/1 diff --git a/includes/formatters/EchoHtmlEmailFormatter.php b/includes/formatters/EchoHtmlEmailFormatter.php index 54d268d..ac463ad 100644 --- a/includes/formatters/EchoHtmlEmailFormatter.php +++ b/includes/formatters/EchoHtmlEmailFormatter.php @@ -127,7 +127,7 @@ return $this->msg( 'echo-email-html-footer' ) ->params( $wgEchoEmailFooterAddress, $prefsUrl ) - ->parse(); + ->text(); } private function renderLink( $link, $style ) { -- To view, visit https://gerrit.wikimedia.org/r/289219 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I45b8aa2b951c155a3f8c3c7be006604113cbc2ee 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] T134512 Bumping portals to master. Updating survey banner. - change (operations/mediawiki-config)
Jdrewniak has uploaded a new change for review. https://gerrit.wikimedia.org/r/289218 Change subject: T134512 Bumping portals to master. Updating survey banner. .. T134512 Bumping portals to master. Updating survey banner. Bug: T134512 Change-Id: Id7e88c85c7c79441e4d6138d75b11e667358b313 --- M portals 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/18/289218/1 diff --git a/portals b/portals index 7426907..5912029 16 --- a/portals +++ b/portals -Subproject commit 7426907fc22abe27386ef6bf6c69d5cacbae7c7d +Subproject commit 5912029740d90ce28cfbff615d4e3929d10ca061 -- To view, visit https://gerrit.wikimedia.org/r/289218 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id7e88c85c7c79441e4d6138d75b11e667358b313 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Jdrewniak___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Bring back messages used by old email formatter system - change (mediawiki...Echo)
Sbisson has uploaded a new change for review. https://gerrit.wikimedia.org/r/289217 Change subject: Bring back messages used by old email formatter system .. Bring back messages used by old email formatter system Bug: T135446 Change-Id: I235db93c0f50424da8bc30bcafd717c50a6b0b62 --- M i18n/en.json M i18n/qqq.json M includes/EmailFormatter.php 3 files changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo refs/changes/17/289217/1 diff --git a/i18n/en.json b/i18n/en.json index 49a020b..16a99e2 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -194,6 +194,8 @@ "echo-email-subject-default": "New notification at {{SITENAME}}", "echo-email-body-default": "You have a new notification at {{SITENAME}}:\n\n$1", "echo-email-batch-body-default": "You have a new notification.", + "echo-email-footer-default-html": "To control which emails we send you, check your preferences.\n$1", + "echo-email-footer-default": "$2\n\nTo control which emails we send you, check your preferences:\n{{canonicalurl:{{#special:Preferences}}#mw-prefsection-echo}}\n\n$1", "echo-email-plain-footer": "To control which emails we send you, check your preferences:", "echo-email-html-footer": "To control which emails we send you, check your preferences.\n$1", "echo-notification-alert": "{{PLURAL:$1|Alert ($1)|Alerts ($1)|100=Alerts (99+)}}", diff --git a/i18n/qqq.json b/i18n/qqq.json index 7ab8302..c5a88e3 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -185,6 +185,8 @@ "echo-email-subject-default": "Default subject for Echo e-mail notifications", "echo-email-body-default": "Default message content for Echo email notifications. Parameters:\n* $1 - a plain text description of the notification", "echo-email-batch-body-default": "Default message for Echo e-mail digest notifications", + "echo-email-footer-default": "Default footer content for Echo text e-mail notifications. Parameters:\n* $1 - the address of the organization that sent the email\n* $2 - \"---...\" ({{msg-mw|echo-email-batch-separator}})\n\nFor HTML version, see {{msg-mw|echo-email-footer-default-html}}.", + "echo-email-footer-default-html": "Default footer content for Echo html e-mail notifications. Parameters:\n* $1 - the address of the organization that sent the email\n* $2 - the URL to the notification preference page\nFor plain-text version, see {{msg-mw|Echo-email-footer-default}}.", "echo-email-plain-footer": "Footer content for Echo text e-mail notifications.\n\nFor HTML version, see {{msg-mw|echo-email-html-footer}}.", "echo-email-html-footer": "Default footer content for Echo html e-mail notifications. Parameters:\n* $1 - the address of the organization that sent the email\n* $2 - the URL to the notification preference page\nFor plain-text version, see {{msg-mw|Echo-email-footer-default}}.", "echo-notification-alert": "Label for alert notifications (= non discussion notifications) tab in Echo overlay. Parameters:\n* $1 - the number of unread alerts. The number cannot be higher than 100.\nSee also:\n* {{msg-mw|Echo-notification-message}}\n{{Identical|Alert}}", diff --git a/includes/EmailFormatter.php b/includes/EmailFormatter.php index 21bed12..2b79bd1 100644 --- a/includes/EmailFormatter.php +++ b/includes/EmailFormatter.php @@ -667,7 +667,7 @@ * {@inheritDoc} */ public function decorateFooter( $address, User $user ) { - return EchoEmailMode::message( 'echo-email-plain-footer', $user ) + return EchoEmailMode::message( 'echo-email-footer-default', $user ) ->params( $address, EchoEmailMode::message( 'echo-email-batch-separator', $user )->text() @@ -770,7 +770,7 @@ $title = SpecialPage::getTitleFor( 'Preferences' ); $title->setFragment( "#mw-prefsection-echo" ); - return EchoEmailMode::message( 'echo-email-html-footer', $user ) + return EchoEmailMode::message( 'echo-email-footer-default-html', $user ) ->params( $address ) ->rawParams( $title->getFullURL( '', false, PROTO_HTTPS ) ) ->text(); -- To view, visit https://gerrit.wikimedia.org/r/289217 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I235db93c0f50424da8bc30bcafd717c50a6b0b62 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] Modifying survey banner bucketing - change (wikimedia/portals)
jenkins-bot has submitted this change and it was merged. Change subject: Modifying survey banner bucketing .. Modifying survey banner bucketing Change-Id: I58ccf192d76f559e8b527a4a5702ea5a75ccd5f9 --- M dev/wikipedia.org/assets/js/wm-test.js M dev/wikipedia.org/assets/rev-manifest.json R prod/wikipedia.org/assets/js/index-25047ca0f0.js M prod/wikipedia.org/index.html 4 files changed, 6 insertions(+), 6 deletions(-) Approvals: Jdrewniak: Looks good to me, approved jenkins-bot: Verified diff --git a/dev/wikipedia.org/assets/js/wm-test.js b/dev/wikipedia.org/assets/js/wm-test.js index c578c29..7185f79 100644 --- a/dev/wikipedia.org/assets/js/wm-test.js +++ b/dev/wikipedia.org/assets/js/wm-test.js @@ -111,7 +111,7 @@ /** * Qaultrics Survey Banner * --- -* Display survey banner to 1 in 500 users in the 'rejected' group. +* Display survey banner to 1 in 30 users in the 'rejected' group. * We only target rejected users because our schema doesn't have a * 'survey-banner' clickthrough group, and thus clickthough events * for these users would not be logged. @@ -119,8 +119,8 @@ */ function surveyBanner() { - // only display banner to 1 in 500 users in the 'rejected' group - if ( ( oneIn( sessionId, 50 ) && group === 'rejected' ) || testOnly ) { + // only display banner to 1 in 30 users in the 'rejected' group + if ( ( oneIn( sessionId, 30 ) && group === 'rejected' ) || testOnly ) { // see if existing cookie to hide banner exists. if ( document.cookie.match( /hideBanner/ ) && testOnly === false ) { diff --git a/dev/wikipedia.org/assets/rev-manifest.json b/dev/wikipedia.org/assets/rev-manifest.json index e6f9b21..f8dc768 100644 --- a/dev/wikipedia.org/assets/rev-manifest.json +++ b/dev/wikipedia.org/assets/rev-manifest.json @@ -1,4 +1,4 @@ { "portal/wikipedia.org/assets/js/gt-ie9.js": "portal/wikipedia.org/assets/js/gt-ie9-c84bf66d33.js", - "portal/wikipedia.org/assets/js/index.js": "portal/wikipedia.org/assets/js/index-4ca9781cc0.js" + "portal/wikipedia.org/assets/js/index.js": "portal/wikipedia.org/assets/js/index-25047ca0f0.js" } \ No newline at end of file diff --git a/prod/wikipedia.org/assets/js/index-4ca9781cc0.js b/prod/wikipedia.org/assets/js/index-25047ca0f0.js similarity index 99% rename from prod/wikipedia.org/assets/js/index-4ca9781cc0.js rename to prod/wikipedia.org/assets/js/index-25047ca0f0.js index 1dd8a14..3678e61 100644 --- a/prod/wikipedia.org/assets/js/index-4ca9781cc0.js +++ b/prod/wikipedia.org/assets/js/index-25047ca0f0.js @@ -1 +1 @@ -function addEvent(e,t,n){e&&(e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent&&(attachedEvents.push([e,t,n]),e.attachEvent("on"+t,n)))}function removeEvent(e,t,n){e&&(e.removeEventListener?e.removeEventListener(t,n):e.detachEvent&("on"+t,n))}function doWhenReady(e){var t=function(){removeEvent(document,"DOMContentLoaded",t),removeEvent(window,"load",t),e()};"complete"===document.readyState?e():(addEvent(document,"DOMContentLoaded",t),addEvent(window,"load",t))}function getIso639(e){var t=e&(/^\w+/);if(t)return t="nb"===t[0]?"no":t[0]}function getDevicePixelRatio(){return void 0!==window.devicePixelRatio?window.devicePixelRatio:void 0!==window.msMatchMedia?window.msMatchMedia("(min-resolution: 192dpi)").matches?2:window.msMatchMedia("(min-resolution: 144dpi)").matches?1.5:1:1}window.JSON||(window.JSON={parse:function(sJSON){return eval("("+sJSON+")")},stringify:function(){var e=Object.prototype.toString,t=Array.isArray||function(t){return"[object Array]"===e.call(t)},n={'"':'\\"',"\\":"","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t"},r=function(e){return n[e]||"\\u"+(e.charCodeAt(0)+65536).toString(16).substr(1)},o=/[\\"\u-\u001F\u2028\u2029]/g;return function i(n){if(null==n)return"null";if("number"==typeof n)return isFinite(n)?n.toString():"null";if("boolean"==typeof n)return n.toString();if("object"==typeof n){if("function"==typeof n.toJSON)return i(n.toJSON());if(t(n)){for(var a="[",s=0;s>>0;if(0===o)return-1;var i=+t||0;if(Math.abs(i)===1/0&&(i=0),i>=o)return-1;for(n=Math.max(i>=0?i:o-Math.abs(i),0);o>n;){if(n in r&[n]===e)return n;n++}return-1}),function(){window.document.querySelectorAll||(document.querySelectorAll=document.body.querySelectorAll=Object.querySelectorAll=function(e,t,n,r,o){var
[MediaWiki-commits] [Gerrit] Update change-propagation to d7fb3e7 - change (mediawiki...deploy)
Mobrovac has submitted this change and it was merged. Change subject: Update change-propagation to d7fb3e7 .. Update change-propagation to d7fb3e7 List of changes: 2fbb41a Various stability improvements 00e21f5 Improved a regex checking regex 339290e Bump version and rename timeout to interval 196032d Removed self, replaced with this xxx Update node module dependencies Change-Id: If15a70c60354b37e8e0c1e4d52d96a45b66e8b7b --- M node_modules/hyperswitch/lib/filters/ratelimit_route.js M node_modules/hyperswitch/node_modules/json-stable-stringify/package.json M node_modules/hyperswitch/node_modules/swagger-ui/package.json M node_modules/hyperswitch/package.json M node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json M node_modules/service-runner/node_modules/limitation/node_modules/readable-stream/node_modules/inherits/package.json M node_modules/wmf-kafka-node/node_modules/snappy/build/Release/obj.target/deps/snappy/snappy.a M node_modules/wmf-kafka-node/node_modules/snappy/build/Release/snappy.a M node_modules/wmf-kafka-node/node_modules/snappy/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json M node_modules/wmf-kafka-node/node_modules/snappy/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json M src 11 files changed, 39 insertions(+), 30 deletions(-) Approvals: Mobrovac: Verified; Looks good to me, approved diff --git a/node_modules/hyperswitch/lib/filters/ratelimit_route.js b/node_modules/hyperswitch/lib/filters/ratelimit_route.js index 2513a59..a145b9d 100644 --- a/node_modules/hyperswitch/lib/filters/ratelimit_route.js +++ b/node_modules/hyperswitch/lib/filters/ratelimit_route.js @@ -1,5 +1,7 @@ 'use strict'; +var HTTPError = require('../exports').HTTPError; + // Simple per-route rate limiter. module.exports = function(hyper, req, next, options, specInfo) { @@ -19,13 +21,23 @@ var key = pathKey + '|' + hyper._rootReq.headers['x-client-ip']; if (hyper.ratelimiter.isAboveLimit(key, options.limits[requestClass])) { -// TODO: Actually throw an HTTPError once we have verified limits to -// work well. -hyper.log('warn/ratelimit/' + pathKey, { -key: key, -limit: options.limits[requestClass], -message: 'Rate limit exceeded' -}); +if (options.log_only) { +hyper.log('warn/ratelimit/' + pathKey, { +key: key, +rate_limit_per_second: options.limits[requestClass], +message: 'Rate limit exceeded' +}); +} else { +throw new HTTPError({ +status: 429, +body: { +type: 'request_rate_exceeded', +title: 'HyperSwitch request rate limit exceeded', +key: key, +rate_limit_per_second: options.limits[requestClass], +} +}); +} } return next(hyper, req); }; diff --git a/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json b/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json index a34d1d1..fcb6f92 100644 --- a/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json +++ b/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json @@ -50,7 +50,7 @@ "url": "https://github.com/substack/json-stable-stringify/issues; }, "_id": "json-stable-stringify@1.0.0", - "_shasum": "3f9f166364a7e51f09eed3b2996698c9fb5848e4", + "_shasum": "87334793ad9df929f6dab885a07b780336c66b9a", "_from": "git+https://github.com/wikimedia/json-stable-stringify.git#master;, "_resolved": "git+https://github.com/wikimedia/json-stable-stringify.git#c05178e4dfc3834017f017732934c1c52ba3dd8f; } diff --git a/node_modules/hyperswitch/node_modules/swagger-ui/package.json b/node_modules/hyperswitch/node_modules/swagger-ui/package.json index 738e9d4..9c3a81d 100644 --- a/node_modules/hyperswitch/node_modules/swagger-ui/package.json +++ b/node_modules/hyperswitch/node_modules/swagger-ui/package.json @@ -60,7 +60,7 @@ "url": "https://github.com/swagger-api/swagger-ui/issues; }, "_id": "swagger-ui@2.1.4", - "_shasum": "6386a760f4dd860332807fbe8d4421dc39adabd4", + "_shasum": "4b6a3c850d12ad5aa0088025a5100afdf78a7582", "_from": "git+https://github.com/wikimedia/swagger-ui.git#master;, "_resolved": "git+https://github.com/wikimedia/swagger-ui.git#7bef30a93a3b81c55cb95d3ce9e0f9f53d5d8262; } diff --git a/node_modules/hyperswitch/package.json b/node_modules/hyperswitch/package.json index 5617bd0..2f5060b 100644 --- a/node_modules/hyperswitch/package.json +++ b/node_modules/hyperswitch/package.json @@ -1,6 +1,6 @@ { "name": "hyperswitch", - "version":
[MediaWiki-commits] [Gerrit] Update change-propagation to d7fb3e7 - change (mediawiki...deploy)
Mobrovac has uploaded a new change for review. https://gerrit.wikimedia.org/r/289216 Change subject: Update change-propagation to d7fb3e7 .. Update change-propagation to d7fb3e7 List of changes: 2fbb41a Various stability improvements 00e21f5 Improved a regex checking regex 339290e Bump version and rename timeout to interval 196032d Removed self, replaced with this xxx Update node module dependencies Change-Id: If15a70c60354b37e8e0c1e4d52d96a45b66e8b7b --- M node_modules/hyperswitch/lib/filters/ratelimit_route.js M node_modules/hyperswitch/node_modules/json-stable-stringify/package.json M node_modules/hyperswitch/node_modules/swagger-ui/package.json M node_modules/hyperswitch/package.json M node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json M node_modules/service-runner/node_modules/limitation/node_modules/readable-stream/node_modules/inherits/package.json M node_modules/wmf-kafka-node/node_modules/snappy/build/Release/obj.target/deps/snappy/snappy.a M node_modules/wmf-kafka-node/node_modules/snappy/build/Release/snappy.a M node_modules/wmf-kafka-node/node_modules/snappy/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json M node_modules/wmf-kafka-node/node_modules/snappy/node_modules/node-gyp/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json M src 11 files changed, 39 insertions(+), 30 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/change-propagation/deploy refs/changes/16/289216/1 diff --git a/node_modules/hyperswitch/lib/filters/ratelimit_route.js b/node_modules/hyperswitch/lib/filters/ratelimit_route.js index 2513a59..a145b9d 100644 --- a/node_modules/hyperswitch/lib/filters/ratelimit_route.js +++ b/node_modules/hyperswitch/lib/filters/ratelimit_route.js @@ -1,5 +1,7 @@ 'use strict'; +var HTTPError = require('../exports').HTTPError; + // Simple per-route rate limiter. module.exports = function(hyper, req, next, options, specInfo) { @@ -19,13 +21,23 @@ var key = pathKey + '|' + hyper._rootReq.headers['x-client-ip']; if (hyper.ratelimiter.isAboveLimit(key, options.limits[requestClass])) { -// TODO: Actually throw an HTTPError once we have verified limits to -// work well. -hyper.log('warn/ratelimit/' + pathKey, { -key: key, -limit: options.limits[requestClass], -message: 'Rate limit exceeded' -}); +if (options.log_only) { +hyper.log('warn/ratelimit/' + pathKey, { +key: key, +rate_limit_per_second: options.limits[requestClass], +message: 'Rate limit exceeded' +}); +} else { +throw new HTTPError({ +status: 429, +body: { +type: 'request_rate_exceeded', +title: 'HyperSwitch request rate limit exceeded', +key: key, +rate_limit_per_second: options.limits[requestClass], +} +}); +} } return next(hyper, req); }; diff --git a/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json b/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json index a34d1d1..fcb6f92 100644 --- a/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json +++ b/node_modules/hyperswitch/node_modules/json-stable-stringify/package.json @@ -50,7 +50,7 @@ "url": "https://github.com/substack/json-stable-stringify/issues; }, "_id": "json-stable-stringify@1.0.0", - "_shasum": "3f9f166364a7e51f09eed3b2996698c9fb5848e4", + "_shasum": "87334793ad9df929f6dab885a07b780336c66b9a", "_from": "git+https://github.com/wikimedia/json-stable-stringify.git#master;, "_resolved": "git+https://github.com/wikimedia/json-stable-stringify.git#c05178e4dfc3834017f017732934c1c52ba3dd8f; } diff --git a/node_modules/hyperswitch/node_modules/swagger-ui/package.json b/node_modules/hyperswitch/node_modules/swagger-ui/package.json index 738e9d4..9c3a81d 100644 --- a/node_modules/hyperswitch/node_modules/swagger-ui/package.json +++ b/node_modules/hyperswitch/node_modules/swagger-ui/package.json @@ -60,7 +60,7 @@ "url": "https://github.com/swagger-api/swagger-ui/issues; }, "_id": "swagger-ui@2.1.4", - "_shasum": "6386a760f4dd860332807fbe8d4421dc39adabd4", + "_shasum": "4b6a3c850d12ad5aa0088025a5100afdf78a7582", "_from": "git+https://github.com/wikimedia/swagger-ui.git#master;, "_resolved": "git+https://github.com/wikimedia/swagger-ui.git#7bef30a93a3b81c55cb95d3ce9e0f9f53d5d8262; } diff --git a/node_modules/hyperswitch/package.json b/node_modules/hyperswitch/package.json index 5617bd0..2f5060b 100644 --- a/node_modules/hyperswitch/package.json +++
[MediaWiki-commits] [Gerrit] Bump styleline version - change (mediawiki...VisualEditor)
Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/289215 Change subject: Bump styleline version .. Bump styleline version Change-Id: I85206b6f8912dee011bf670a5651e11b7c403fa8 --- M Gruntfile.js M package.json 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/15/289215/1 diff --git a/Gruntfile.js b/Gruntfile.js index d7fc1df..473ef76 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -88,7 +88,7 @@ }, stylelint: { options: { - stylelintrc: 'lib/ve/.stylelintrc' + configFile: 'lib/ve/.stylelintrc' }, src: [ '**/*.css', diff --git a/package.json b/package.json index fbb83e8..25bf777 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "grunt-contrib-watch": "1.0.0", "grunt-jscs": "2.8.0", "grunt-jsonlint": "1.0.7", -"grunt-stylelint": "0.1.0", +"grunt-stylelint": "0.2.0", "grunt-tyops": "0.1.0", "stylelint": "6.3.3" } -- To view, visit https://gerrit.wikimedia.org/r/289215 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I85206b6f8912dee011bf670a5651e11b7c403fa8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits