Title: [238329] trunk/Websites/perf.webkit.org
- Revision
- 238329
- Author
- rn...@webkit.org
- Date
- 2018-11-16 17:14:26 -0800 (Fri, 16 Nov 2018)
Log Message
Manifest file can contain a test metric which references a non-existent test
https://bugs.webkit.org/show_bug.cgi?id=191796
Reviewed by Dewei Zhu.
The bug was caused by a race condition between the manifest file fetching the list of tests and test metrics
and new tests and test metrics being added. Because we would fetch tests before test metrics, it was possible
for new test metrics which references a test not included in the fetched tests to be present in the test metrics.
Fixed the bug by changing the order of the queries so that test metrics are fetched before tests. This guarantees
that any test referenced by a test metric always exists and thefore included in the manifest file.
Unfortunately no new tests beucase this involes a race condition.
* public/include/manifest-generator.php:
Modified Paths
Diff
Modified: trunk/Websites/perf.webkit.org/ChangeLog (238328 => 238329)
--- trunk/Websites/perf.webkit.org/ChangeLog 2018-11-17 01:10:48 UTC (rev 238328)
+++ trunk/Websites/perf.webkit.org/ChangeLog 2018-11-17 01:14:26 UTC (rev 238329)
@@ -1,3 +1,21 @@
+2018-11-16 Ryosuke Niwa <rn...@webkit.org>
+
+ Manifest file can contain a test metric which references a non-existent test
+ https://bugs.webkit.org/show_bug.cgi?id=191796
+
+ Reviewed by Dewei Zhu.
+
+ The bug was caused by a race condition between the manifest file fetching the list of tests and test metrics
+ and new tests and test metrics being added. Because we would fetch tests before test metrics, it was possible
+ for new test metrics which references a test not included in the fetched tests to be present in the test metrics.
+
+ Fixed the bug by changing the order of the queries so that test metrics are fetched before tests. This guarantees
+ that any test referenced by a test metric always exists and thefore included in the manifest file.
+
+ Unfortunately no new tests beucase this involes a race condition.
+
+ * public/include/manifest-generator.php:
+
2018-11-13 Dewei Zhu <dewei_...@apple.com>
Add cache for CommitLog objects to avoid refetching same commit.
Modified: trunk/Websites/perf.webkit.org/public/include/manifest-generator.php (238328 => 238329)
--- trunk/Websites/perf.webkit.org/public/include/manifest-generator.php 2018-11-17 01:10:48 UTC (rev 238328)
+++ trunk/Websites/perf.webkit.org/public/include/manifest-generator.php 2018-11-17 01:14:26 UTC (rev 238329)
@@ -26,8 +26,10 @@
foreach ($repositories_with_commit as &$row)
$row = $row['commit_repository'];
+ // Query test metrics before tests so that every test a test metric references is guaranteed to exist
+ // even if there were new test metrics added by the time we fetched tests.
+ $metrics = (object)$this->metrics();
$tests = (object)$this->tests();
- $metrics = (object)$this->metrics();
$platforms = (object)$this->platforms($platform_table, false);
$dashboard = (object)$this->platforms($platform_table, true);
$repositories = (object)$this->repositories($repositories_table, $repositories_with_commit);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes