[ARVADOS] created: 2.1.0-1296-gca109d685

Git user git at public.arvados.org
Tue Sep 7 21:20:41 UTC 2021


        at  ca109d685ba269ec82a433041cdcad6d229950c9 (commit)


commit ca109d685ba269ec82a433041cdcad6d229950c9
Author: Lucas Di Pentima <lucas.dipentima at curii.com>
Date:   Tue Sep 7 18:19:27 2021 -0300

    17989: Reduces the manifest size limit so that it doesn't fail on extreme cases
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima at curii.com>

diff --git a/tools/test-collection-create/test-collection-create.py b/tools/test-collection-create/test-collection-create.py
index 9a0274569..c8eae240d 100644
--- a/tools/test-collection-create/test-collection-create.py
+++ b/tools/test-collection-create/test-collection-create.py
@@ -16,6 +16,8 @@ import arvados.collection
 logger = logging.getLogger('arvados.test_collection_create')
 logger.setLevel(logging.INFO)
 
+max_manifest_size = 127*1024*1024
+
 opts = argparse.ArgumentParser(add_help=False)
 opts.add_argument('--min-files', type=int, default=30000, help="""
 Minimum number of files on each directory. Default: 30000.
@@ -381,7 +383,7 @@ def create_substreams(depth, base_stream_name, max_filesize, data_loc, args, cur
     current_size += len(current_stream)
     streams = [current_stream]
 
-    if current_size >= (128 * 1024 * 1024):
+    if current_size >= max_manifest_size:
         logger.debug("Maximum manifest size reached -- finishing early at {}".format(base_stream_name))
     elif depth == 0:
         logger.debug("Finished stream {}".format(base_stream_name))
@@ -391,7 +393,7 @@ def create_substreams(depth, base_stream_name, max_filesize, data_loc, args, cur
             substreams = create_substreams(depth-1, stream_name, max_filesize,
                 data_loc, args, current_size)
             current_size += sum([len(x) for x in substreams])
-            if current_size >= (128 * 1024 * 1024):
+            if current_size >= max_manifest_size:
                 break
             streams.extend(substreams)
     return streams
@@ -421,7 +423,7 @@ def main(arguments=None):
         '.', max_filesize, data_loc, args)
     manifest = ''
     for s in streams:
-        if len(manifest)+len(s) > (1024*1024*128)-2:
+        if len(manifest)+len(s) > max_manifest_size:
             logger.info("Skipping stream {} to avoid making a manifest bigger than 128MiB".format(s.split(' ')[0]))
             break
         manifest += s + '\n'

commit c2a90517b7c88306f9e43e697926b5c5807fc7ca
Author: Lucas Di Pentima <lucas.dipentima at curii.com>
Date:   Tue Sep 7 18:11:30 2021 -0300

    17989: Passes the given timeout value to api_from_config()
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima at curii.com>

diff --git a/sdk/python/arvados/api.py b/sdk/python/arvados/api.py
index 4fe3999f2..55b1e22b7 100644
--- a/sdk/python/arvados/api.py
+++ b/sdk/python/arvados/api.py
@@ -211,7 +211,8 @@ def api(version=None, cache=True, host=None, token=None, insecure=False,
         pass
     elif not host and not token:
         return api_from_config(
-            version=version, cache=cache, request_id=request_id, **kwargs)
+            version=version, cache=cache, timeout=timeout,
+            request_id=request_id, **kwargs)
     else:
         # Caller provided one but not the other
         if not host:

commit c9f8ae62c103554021371d83483ccd3cfbeb015f
Author: Lucas Di Pentima <lucas.dipentima at curii.com>
Date:   Tue Sep 7 18:10:34 2021 -0300

    17989: Adds test exposing the problem.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima at curii.com>

diff --git a/sdk/python/tests/test_api.py b/sdk/python/tests/test_api.py
index 60183e06a..9b944f6c5 100644
--- a/sdk/python/tests/test_api.py
+++ b/sdk/python/tests/test_api.py
@@ -107,6 +107,12 @@ class ArvadosApiTest(run_test_server.TestCaseWithServers):
         self.assertEqual(api._http.timeout, 10,
             "Default timeout value should be 10")
 
+    # Checks for bug #17989
+    def test_custom_request_timeout(self):
+        api = arvados.api('v1', timeout=1234)
+        self.assertEqual(api._http.timeout, 1234,
+            "Requested timeout value was 1234")
+
     def test_ordered_json_model(self):
         mock_responses = {
             'arvados.humans.get': (

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list