Title: [130790] trunk/Tools
- Revision
- 130790
- Author
- o...@chromium.org
- Date
- 2012-10-09 12:16:59 -0700 (Tue, 09 Oct 2012)
Log Message
Don't duplicated build numbers when merging flakiness dashboard JSON
https://bugs.webkit.org/show_bug.cgi?id=98812
Reviewed by Dirk Pranke.
In general, build numbers are not unique, but we should basically never
get the same build number uploaded twice in a row. This is a workaround
for https://bugs.webkit.org/show_bug.cgi?id=97643, which frequently hits this
because we update results_small.json and timeout updating results.json and then
we retry the whole request.
* TestResultServer/model/jsonresults.py:
(JsonResults.merge):
* TestResultServer/model/jsonresults_unittest.py:
(JsonResultsTest.test_merge_duplicate_build_number):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (130789 => 130790)
--- trunk/Tools/ChangeLog 2012-10-09 19:16:22 UTC (rev 130789)
+++ trunk/Tools/ChangeLog 2012-10-09 19:16:59 UTC (rev 130790)
@@ -1,3 +1,21 @@
+2012-10-09 Ojan Vafai <o...@chromium.org>
+
+ Don't duplicated build numbers when merging flakiness dashboard JSON
+ https://bugs.webkit.org/show_bug.cgi?id=98812
+
+ Reviewed by Dirk Pranke.
+
+ In general, build numbers are not unique, but we should basically never
+ get the same build number uploaded twice in a row. This is a workaround
+ for https://bugs.webkit.org/show_bug.cgi?id=97643, which frequently hits this
+ because we update results_small.json and timeout updating results.json and then
+ we retry the whole request.
+
+ * TestResultServer/model/jsonresults.py:
+ (JsonResults.merge):
+ * TestResultServer/model/jsonresults_unittest.py:
+ (JsonResultsTest.test_merge_duplicate_build_number):
+
2012-10-09 Alexis Menard <ale...@webkit.org>
[GTK] Shadow builds are not working anymore.
Modified: trunk/Tools/TestResultServer/model/jsonresults.py (130789 => 130790)
--- trunk/Tools/TestResultServer/model/jsonresults.py 2012-10-09 19:16:22 UTC (rev 130789)
+++ trunk/Tools/TestResultServer/model/jsonresults.py 2012-10-09 19:16:59 UTC (rev 130790)
@@ -292,6 +292,10 @@
if not cls._check_json(builder, aggregated_json):
return incremental
+ if aggregated_json[builder][JSON_RESULTS_BUILD_NUMBERS][0] == incremental_json[builder][JSON_RESULTS_BUILD_NUMBERS][0]:
+ logging.error("Incremental JSON's build number is the latest build number in the aggregated JSON: %d." % aggregated_json[builder][JSON_RESULTS_BUILD_NUMBERS][0])
+ return aggregated
+
logging.info("Merging json results...")
try:
cls._merge_json(aggregated_json[builder], incremental_json[builder], num_runs)
Modified: trunk/Tools/TestResultServer/model/jsonresults_unittest.py (130789 => 130790)
--- trunk/Tools/TestResultServer/model/jsonresults_unittest.py 2012-10-09 19:16:22 UTC (rev 130789)
+++ trunk/Tools/TestResultServer/model/jsonresults_unittest.py 2012-10-09 19:16:59 UTC (rev 130790)
@@ -184,6 +184,24 @@
"results": [[200,"F"]],
"times": [[200,0]]}}})
+ def test_merge_duplicate_build_number(self):
+ self._test_merge(
+ # Aggregated results
+ {"builds": ["2", "1"],
+ "tests": {"001.html": {
+ "results": [[100, "F"]],
+ "times": [[100, 0]]}}},
+ # Incremental results
+ {"builds": ["2"],
+ "tests": {"001.html": {
+ "results": [[1, "F"]],
+ "times": [[1, 0]]}}},
+ # Expected results
+ {"builds": ["2", "1"],
+ "tests": {"001.html": {
+ "results": [[100, "F"]],
+ "times": [[100, 0]]}}})
+
def test_merge_incremental_single_test_single_run_same_result(self):
# Incremental results has the latest build and same test results for
# that run.
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes