[MediaWiki-commits] [Gerrit] mediawiki...ORES[wmf/1.31.0-wmf.8]: Disable the filter if ORES says the threshold doesn't exist
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/393659 ) Change subject: Disable the filter if ORES says the threshold doesn't exist .. Disable the filter if ORES says the threshold doesn't exist Bug: T181006 Change-Id: I35b13e9546ffd19279288fd4e1594a381faa6c06 --- M includes/Stats.php 1 file changed, 7 insertions(+), 1 deletion(-) Approvals: jenkins-bot: Verified Awight: Looks good to me, approved diff --git a/includes/Stats.php b/includes/Stats.php index f53f968..5c8a4bf 100644 --- a/includes/Stats.php +++ b/includes/Stats.php @@ -240,6 +240,10 @@ $statsData ); + if ( $max === null ) { + continue; + } + if ( is_numeric( $min ) && is_numeric( $max ) ) { $thresholds[$levelName] = [ 'min' => $min, @@ -256,7 +260,9 @@ } $stat = $config; - if ( $bound === 'max' && isset( $statsData['false'][$stat]['threshold'] ) ) { + if ( $bound === 'max' && $statsData['false'][$stat] === null ) { + return null; + } elseif ( $bound === 'max' && isset( $statsData['false'][$stat]['threshold'] ) ) { $threshold = $statsData['false'][$stat]['threshold']; // Invert to turn a "false" threshold to "true". $threshold = 1 - $threshold; -- To view, visit https://gerrit.wikimedia.org/r/393659 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I35b13e9546ffd19279288fd4e1594a381faa6c06 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ORES Gerrit-Branch: wmf/1.31.0-wmf.8 Gerrit-Owner: AwightGerrit-Reviewer: Awight Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ORES[wmf/1.31.0-wmf.8]: Disable the filter if ORES says the threshold doesn't exist
Awight has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/393659 ) Change subject: Disable the filter if ORES says the threshold doesn't exist .. Disable the filter if ORES says the threshold doesn't exist Bug: T181006 Change-Id: I35b13e9546ffd19279288fd4e1594a381faa6c06 --- M includes/Stats.php 1 file changed, 7 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ORES refs/changes/59/393659/1 diff --git a/includes/Stats.php b/includes/Stats.php index f53f968..5c8a4bf 100644 --- a/includes/Stats.php +++ b/includes/Stats.php @@ -240,6 +240,10 @@ $statsData ); + if ( $max === null ) { + continue; + } + if ( is_numeric( $min ) && is_numeric( $max ) ) { $thresholds[$levelName] = [ 'min' => $min, @@ -256,7 +260,9 @@ } $stat = $config; - if ( $bound === 'max' && isset( $statsData['false'][$stat]['threshold'] ) ) { + if ( $bound === 'max' && $statsData['false'][$stat] === null ) { + return null; + } elseif ( $bound === 'max' && isset( $statsData['false'][$stat]['threshold'] ) ) { $threshold = $statsData['false'][$stat]['threshold']; // Invert to turn a "false" threshold to "true". $threshold = 1 - $threshold; -- To view, visit https://gerrit.wikimedia.org/r/393659 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I35b13e9546ffd19279288fd4e1594a381faa6c06 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ORES Gerrit-Branch: wmf/1.31.0-wmf.8 Gerrit-Owner: Awight___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits