Title: [90504] trunk/Tools
Revision
90504
Author
[email protected]
Date
2011-07-06 14:57:56 -0700 (Wed, 06 Jul 2011)

Log Message

Clear TestFailures's getNumberOfFailingTests cache

Now that we support NRWT, we need to clear out old zero values for the NRWT bots that might
have been cached by old versions of TestFailures.

Fixes <http://webkit.org/b/64029> TestFailures page still doesn't show NRWT bots if you've
used it recently

Reviewed by Adam Barth.

* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Builder.js:
(Builder.prototype.getNumberOfFailingTests): Added a .version property to the cache data
that must match the current version. Otherwise we'll ignore the cached data.

Modified Paths

Diff

Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Builder.js (90503 => 90504)


--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Builder.js	2011-07-06 21:46:17 UTC (rev 90503)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Builder.js	2011-07-06 21:57:56 UTC (rev 90504)
@@ -100,17 +100,16 @@
 
     getNumberOfFailingTests: function(buildNumber, callback) {
         var cacheKey = this.name + '_getNumberOfFailingTests_' + buildNumber;
+        const currentCachedDataVersion = 1;
         if (PersistentCache.contains(cacheKey)) {
             var cachedData = PersistentCache.get(cacheKey);
-            // Old versions of this function used to cache a number instead of an object, so we have
-            // to check to see what type we have.
-            if (typeof cachedData === 'object') {
+            if (cachedData.version === currentCachedDataVersion) {
                 callback(cachedData.failureCount, cachedData.tooManyFailures);
                 return;
             }
         }
 
-        var result = { failureCount: -1, tooManyFailures: false };
+        var result = { failureCount: -1, tooManyFailures: false, version: currentCachedDataVersion };
 
         var self = this;
         self._getBuildJSON(buildNumber, function(data) {

Modified: trunk/Tools/ChangeLog (90503 => 90504)


--- trunk/Tools/ChangeLog	2011-07-06 21:46:17 UTC (rev 90503)
+++ trunk/Tools/ChangeLog	2011-07-06 21:57:56 UTC (rev 90504)
@@ -1,3 +1,19 @@
+2011-07-06  Adam Roben  <[email protected]>
+
+        Clear TestFailures's getNumberOfFailingTests cache
+
+        Now that we support NRWT, we need to clear out old zero values for the NRWT bots that might
+        have been cached by old versions of TestFailures.
+
+        Fixes <http://webkit.org/b/64029> TestFailures page still doesn't show NRWT bots if you've
+        used it recently
+
+        Reviewed by Adam Barth.
+
+        * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/Builder.js:
+        (Builder.prototype.getNumberOfFailingTests): Added a .version property to the cache data
+        that must match the current version. Otherwise we'll ignore the cached data.
+
 2011-06-24  Dirk Pranke  <[email protected]>
 
         Reviewed by Adam Barth.
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to