results.webkit.org: Decrease ttl for archives
authorjbedard@apple.com <jbedard@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 5 Dec 2019 01:19:34 +0000 (01:19 +0000)
committerjbedard@apple.com <jbedard@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 5 Dec 2019 01:19:34 +0000 (01:19 +0000)
https://bugs.webkit.org/show_bug.cgi?id=204806
<rdar://problem/57527644>

Unreviewed infrastructure fix.

* resultsdbpy/resultsdbpy/controller/archive_controller_unittest.py:
(ArchiveControllerUnittest.setup_webserver): Disable time-to-live.
* resultsdbpy/resultsdbpy/model/mock_model_factory.py:
(MockModelFactory.create): Ensure time-to-live is longer than the oldest commit.

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

Tools/ChangeLog
Tools/resultsdbpy/resultsdbpy/controller/archive_controller_unittest.py
Tools/resultsdbpy/resultsdbpy/model/mock_model_factory.py

index ace151c..b9f775d 100644 (file)
@@ -1,5 +1,18 @@
 2019-12-04  Jonathan Bedard  <jbedard@apple.com>
 
+        results.webkit.org: Decrease ttl for archives
+        https://bugs.webkit.org/show_bug.cgi?id=204806
+        <rdar://problem/57527644>
+
+        Unreviewed infrastructure fix.
+
+        * resultsdbpy/resultsdbpy/controller/archive_controller_unittest.py:
+        (ArchiveControllerUnittest.setup_webserver): Disable time-to-live.
+        * resultsdbpy/resultsdbpy/model/mock_model_factory.py:
+        (MockModelFactory.create): Ensure time-to-live is longer than the oldest commit.
+
+2019-12-04  Jonathan Bedard  <jbedard@apple.com>
+
         results.webkit.org: Handle duplicate archives
         https://bugs.webkit.org/show_bug.cgi?id=204860
 
index ba209b9..a4dd876 100644 (file)
@@ -53,7 +53,13 @@ class ArchiveControllerUnittest(FlaskTestCase, WaitForDockerTestCase):
         cassandra.drop_keyspace(keyspace=cls.KEYSPACE)
         cassandra_instance = cassandra(keyspace=cls.KEYSPACE, create_keyspace=True)
 
-        app.register_blueprint(APIRoutes(Model(redis=redis_instance, cassandra=cassandra_instance, repositories=[safari, webkit])))
+        app.register_blueprint(APIRoutes(Model(
+            redis=redis_instance,
+            cassandra=cassandra_instance,
+            repositories=[safari, webkit],
+            default_ttl_seconds=None,
+            archive_ttl_seconds=None,
+        )))
 
     @classmethod
     def upload_file(cls, client, url, meta_data, content):
index 0689754..126bbe7 100644 (file)
@@ -75,6 +75,7 @@ class MockModelFactory(object):
                 MockSVNRepository.webkit(redis=redis),
             ],
             default_ttl_seconds=time.time() - oldest_commit + Model.TTL_WEEK,
+            archive_ttl_seconds=time.time() - oldest_commit + Model.TTL_WEEK,
             async_processing=async_processing,
         )
         with model.commit_context, model.commit_context.cassandra.batch_query_context():