Ori.livneh has submitted this change and it was merged.
Change subject: Next iteration of HTTPS support test
......................................................................
Next iteration of HTTPS support test
* Hit wikimediafoundation.org rather than performance.wikimedia.org, because
the latter is eqiad-only and configured differently from our production
Varnishes.
* Don't cache-bust with a timestamp, because the user is not likely to have
blank.gif cached locally.
* Increase the timeout threshold from 5 to 10 seconds.
* Log request timing.
* Bump schema version to 11437897.
Change-Id: Ic5314f9a9aa719c5a650b02c7ae98a3070fceb10
(cherry picked from commit 39f8fc302a8901e6775ea524aa540c0a09257141)
---
M WikimediaEvents.php
M modules/ext.wikimediaEvents.httpsSupport.js
2 files changed, 10 insertions(+), 7 deletions(-)
Approvals:
Ori.livneh: Verified; Looks good to me, approved
diff --git a/WikimediaEvents.php b/WikimediaEvents.php
index 20e5a08..0af4c83 100644
--- a/WikimediaEvents.php
+++ b/WikimediaEvents.php
@@ -77,7 +77,7 @@
'schema.HttpsSupport' => array(
'class' => 'ResourceLoaderSchemaModule',
'schema' => 'HttpsSupport',
- 'revision' => 11437897,
+ 'revision' => 11518527,
),
'ext.wikimediaEvents.statsd' => array(
'scripts' => array(
diff --git a/modules/ext.wikimediaEvents.httpsSupport.js
b/modules/ext.wikimediaEvents.httpsSupport.js
index d73927a..15da4c6 100644
--- a/modules/ext.wikimediaEvents.httpsSupport.js
+++ b/modules/ext.wikimediaEvents.httpsSupport.js
@@ -10,7 +10,8 @@
( function ( mw, $ ) {
'use strict';
- var pixelSrc = '//performance.wikimedia.org/blank.gif';
+ var pixelSrc = '//wikimediafoundation.org/misc/blank.gif',
+ requestTimeout = 10 * 1000;
function inSample() {
var factor = mw.config.get(
'wgHttpsFeatureDetectionSamplingFactor' );
@@ -29,19 +30,21 @@
return defer;
}
- function pingProtocol( proto, timeout ) {
+ function pingProtocol( proto ) {
var $beacon = $( '<img />' ),
- defer = $.Deferred();
+ defer = $.Deferred(),
+ start = mw.now();
$beacon.on( 'load error abort timeout', defer.resolveWith );
setTimeout( function () {
$beacon.trigger( $.Event( 'timeout' ) );
- }, timeout || 5000 );
- $beacon.attr( 'src', proto + ':' + pixelSrc + '?' + new Date()
);
+ }, requestTimeout );
+ $beacon.attr( 'src', proto + ':' + pixelSrc + '?' + proto );
return defer.then( function () {
var status = {}, ok = this.type === 'load' &&
$beacon.prop( 'width' ) === 1;
status[proto + 'Status'] = ok ? 'success' : this.type;
+ status[proto + 'Timing'] = Math.round( mw.now() - start
);
return status;
} );
}
@@ -60,7 +63,7 @@
$.when(
pingProtocol( protocols.pop() ),
pingProtocol( protocols.pop() ),
- sleep( 6000 )
+ sleep( requestTimeout * 1.1 )
).done( function ( firstStatus, secondStatus ) {
var event = $.extend( {
isAnon : mw.config.get( 'wgUserId'
) === null,
--
To view, visit https://gerrit.wikimedia.org/r/195828
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic5314f9a9aa719c5a650b02c7ae98a3070fceb10
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaEvents
Gerrit-Branch: wmf/1.25wmf19
Gerrit-Owner: Ori.livneh <[email protected]>
Gerrit-Reviewer: Ori.livneh <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits