results.webkit.org: Don't save configuration multiple times in upload
authorjbedard@apple.com <jbedard@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Aug 2019 18:05:23 +0000 (18:05 +0000)
committerjbedard@apple.com <jbedard@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Aug 2019 18:05:23 +0000 (18:05 +0000)
https://bugs.webkit.org/show_bug.cgi?id=200719

Reviewed by Aakash Jain.

* resultsdbpy/resultsdbpy/model/upload_context.py:
(UploadContext.upload_test_results): Move registering of the configuration out
of the branch loop.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248678 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/resultsdbpy/resultsdbpy/model/upload_context.py

index 7cf7558..62d73bb 100644 (file)
@@ -1,3 +1,14 @@
+2019-08-14  Jonathan Bedard  <jbedard@apple.com>
+
+        results.webkit.org: Don't save configuration multiple times in upload
+        https://bugs.webkit.org/show_bug.cgi?id=200719
+
+        Reviewed by Aakash Jain.
+
+        * resultsdbpy/resultsdbpy/model/upload_context.py:
+        (UploadContext.upload_test_results): Move registering of the configuration out
+        of the branch loop.
+
 2019-08-14  Youenn Fablet  <youenn@apple.com>
 
         Reenable Update ContentFiltering.LazilyLoadPlatformFrameworks test for NetworkExtension
index 62fa80e..7843875 100644 (file)
@@ -227,8 +227,9 @@ class UploadContext(object):
         branches = self.commit_context.branch_keys_for_commits(commits)
 
         with self:
+            self.configuration_context.register_configuration(configuration, timestamp=timestamp)
+
             for branch in branches:
-                self.configuration_context.register_configuration(configuration, timestamp=timestamp)
                 self.configuration_context.insert_row_with_configuration(
                     self.SuitesByConfiguration.__table_name__, configuration, suite=suite,
                     ttl=int((uuid // Commit.TIMESTAMP_TO_UUID_MULTIPLIER) + self.ttl_seconds - time.time()) if self.ttl_seconds else None,