[ARVADOS] updated: 7049888ba3001baa7e6428c056f2d5d03789747a

Git user git at public.curoverse.com
Thu Aug 10 17:27:48 EDT 2017


Summary of changes:
 .gitignore                                         |   1 +
 .../app/controllers/collections_controller.rb      | 123 +++------------------
 apps/workbench/app/views/jobs/_show_log.html.erb   |   2 +-
 apps/workbench/config/application.default.yml      |   7 +-
 apps/workbench/config/application.yml.example      |   8 ++
 apps/workbench/config/load_config.rb               |  11 ++
 .../controllers/collections_controller_test.rb     | 100 ++++-------------
 .../test/integration/anonymous_access_test.rb      |  10 +-
 .../workbench/test/integration/collections_test.rb |  28 +++--
 apps/workbench/test/integration/jobs_test.rb       |  40 +++----
 apps/workbench/test/integration_helper.rb          |  17 ++-
 build/run-build-packages.sh                        |   1 +
 build/run-tests.sh                                 |  11 +-
 sdk/cwl/arvados_cwl/arvcontainer.py                |   3 +
 sdk/cwl/tests/test_submit.py                       |  25 +++++
 sdk/go/arvados/container.go                        |   2 +-
 sdk/go/arvados/error.go                            |   2 +-
 sdk/python/arvados/commands/put.py                 |  32 +++---
 sdk/python/tests/test_arv_put.py                   |   2 +-
 services/keep-web/handler.go                       |   1 +
 services/nodemanager/arvnodeman/baseactor.py       |   8 +-
 .../arvnodeman/computenode/dispatch/__init__.py    |   6 +
 .../arvnodeman/computenode/dispatch/slurm.py       |   2 +-
 services/nodemanager/arvnodeman/timedcallback.py   |   8 +-
 services/nodemanager/setup.py                      |   2 +-
 .../nodemanager/tests/test_computenode_dispatch.py |  13 ++-
 .../tests/test_computenode_dispatch_slurm.py       |  25 +++--
 services/nodemanager/tests/test_daemon.py          | 102 ++++++++---------
 services/nodemanager/tests/test_failure.py         |  35 +++---
 services/nodemanager/tests/test_jobqueue.py        |   2 +-
 services/nodemanager/tests/test_timedcallback.py   |  37 ++++---
 services/nodemanager/tests/testutil.py             |  11 +-
 services/ws/event_source.go                        |   3 +-
 services/ws/handler.go                             |  20 ++--
 services/ws/session_v0.go                          |   4 +
 35 files changed, 334 insertions(+), 370 deletions(-)

       via  7049888ba3001baa7e6428c056f2d5d03789747a (commit)
       via  2bef371e8429430942193fff02599ec51c081e70 (commit)
       via  a6607cd8ce8f22da697af64354cad54c1acce74f (commit)
       via  d0a4adabafa4d132ab2333338c941acc57ca82fb (commit)
       via  36b4355956d23f3b7402fba0e18318fc70e31e27 (commit)
       via  3224524c1a2d6790322448565cb5a16ea0bcb874 (commit)
       via  4c0dadce18cdc9fd2712b836100a4cf7b9c69188 (commit)
       via  0413abf93d7ee0cfd10222bf04aa88c4e7460303 (commit)
       via  651e87d8d97edebd8d3cd0325dbd15d6dac0cd1c (commit)
       via  47643ae4e47687aa985f0228771579bdc45aa076 (commit)
       via  e4a35f3914481226a2a4ff57618bc486839aa2ea (commit)
       via  c6b308956e35d2221bf0be39bea73528ad664041 (commit)
       via  02a0ac50b218e518c3ffbcd35c05ae7220450e2a (commit)
       via  82d2cce62202d2a17ee184ad2923492f3abaac56 (commit)
       via  b61a80b93308582b91e89561dc373a1ea33658a9 (commit)
       via  5b54a802c12f1bfd78fe08a3015870f85886032d (commit)
       via  e19efd044f4aa88af59f35f43c9b1118df36efc0 (commit)
       via  366381df5e5e7763e0621c1da5b7f773ec7702d6 (commit)
       via  61bde67a2ca4b49b1609336869c145c99abad7f6 (commit)
       via  57647945b08a74bab02fed6adf947eb9adb8321f (commit)
       via  5f215fab16860dfa066fcc4e35bc89337b1af7d9 (commit)
       via  cd94cea680540c12d4d6a44e4c528e7c44ad5268 (commit)
       via  323a439a98cec4d97989e42d8d365fc36338ae35 (commit)
       via  f007b09f1469e189ba1f459de03181df04ac4c5d (commit)
       via  3149e7de8530b592b366a62bc5563dac6b2d62ce (commit)
       via  597b742a61cfb50e80af16beb0971827fc9b5b71 (commit)
       via  e6cc23100178e5edc90f8e9d04e6c663944b5da9 (commit)
       via  ca4049e73a6a27ce2217cf8650f48c0e15e111e9 (commit)
       via  6706c6d46c6cfb080371b147b60fcaa191bd55a6 (commit)
       via  23546c221e32f08c866e498da8aadb35d904166a (commit)
       via  b02fc7b2227e923beb4d47daee7949c94b90da5f (commit)
       via  9bcdc4d79859742c44e09e606cbcdd64c7377e5f (commit)
       via  acd3d380bb636ca7ef324e0903e54e309b132dc7 (commit)
       via  7a78b6728122c56343d68502192445ae476d24b0 (commit)
       via  08b59c7e5670b139346b0412c8a8bb9f3d3bf9ee (commit)
       via  2918ed81152a1fe8607f433e36dceddc1cb78f74 (commit)
       via  12319740a7d95c099a5521fd85a3200528307de1 (commit)
       via  1dd3f0e144b5102128f18974f48f620aaf7b78b3 (commit)
       via  9997ada67ce36d2fbe831bce473aa61250727aff (commit)
       via  8f3070e16d4eaa581555f63e74ebe578927bfcce (commit)
       via  c7187ec723f28d676661ef4f44c9ddcef14b2546 (commit)
       via  058e06eb085bae6c72de28a6a88096a8643e7322 (commit)
       via  cd698336f2b7aebe78517993e0b3b07b45c16c87 (commit)
       via  f291a43f7154d634a417bff32b9b81c197feb461 (commit)
      from  7b93dc26eb285261a6a431daa511edfb7392a3a1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 7049888ba3001baa7e6428c056f2d5d03789747a
Author: Lucas Di Pentima <lucas at curoverse.com>
Date:   Thu Aug 10 18:26:23 2017 -0300

    8937: Refactored _cache_is_valid() to catch specific exceptions. Fixed
    related test.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas at curoverse.com>

diff --git a/sdk/python/arvados/commands/put.py b/sdk/python/arvados/commands/put.py
index 3a66929..4a36ef0 100644
--- a/sdk/python/arvados/commands/put.py
+++ b/sdk/python/arvados/commands/put.py
@@ -832,21 +832,27 @@ class ArvPutUploadJob(object):
             self._local_collection = arvados.collection.Collection(self._state['manifest'], replication_desired=self.replication_desired, put_threads=self.put_threads)
 
     def _cache_is_valid(self, filepath):
-        try:
-            with open(filepath, 'r') as cache_file:
+        with open(filepath, 'r') as cache_file:
+            try:
                 manifest = json.load(cache_file)['manifest']
-            kc = arvados.keep.KeepClient(api_client=api_client)
-            # Check that the first block's token (oldest) is valid
-            for line in manifest.split('\n'):
-                match = arvados.util.signed_locator_pattern.search(line)
-                if match is not None:
-                    loc = match.group(0)
-                    return kc.head(loc, num_retries=self.num_retries)
-            # No signed locator found, all ok.
+            except ValueError:
+                # Cache file is empty, all ok.
+                return True
+        if manifest is None:
+            # No cached manifest, all ok.
             return True
-        except Exception as e:
-            self.logger.info("Something wrong happened when checking cache file: {}".format(e))
-            return False
+        # Check that the first block's token (oldest) is valid
+        match = arvados.util.signed_locator_pattern.search(manifest)
+        if match is not None:
+            loc = match.group(0)
+            try:
+                kc = arvados.keep.KeepClient(api_client=api_client)
+                return kc.head(loc, num_retries=self.num_retries)
+            except arvados.errors.KeepRequestError as e:
+                self.logger.info("Cache validation: {}".format(e))
+                return False
+        # No signed locator found, all ok.
+        return True
 
     def collection_file_paths(self, col, path_prefix='.'):
         """Return a list of file paths by recursively go through the entire collection `col`"""
diff --git a/sdk/python/tests/test_arv_put.py b/sdk/python/tests/test_arv_put.py
index 9310318..ae7b7d1 100644
--- a/sdk/python/tests/test_arv_put.py
+++ b/sdk/python/tests/test_arv_put.py
@@ -863,7 +863,7 @@ class ArvPutIntegrationTest(run_test_server.TestCaseWithServers,
             cache = json.load(c)
         self.assertRegex(cache['manifest'], r'\+A\S+\@')
         cache['manifest'] = re.sub(r'\+A\S+\@',
-                                   '+Athistokendoesnotwork@',
+                                   '+Adeadbeefdeadbeefdeadbeefdeadbeefdeadbeef@',
                                    cache['manifest'])
         with open(cache_filepath, 'w') as c:
             c.write(json.dumps(cache))

commit 2bef371e8429430942193fff02599ec51c081e70
Merge: 7b93dc2 a6607cd
Author: Lucas Di Pentima <lucas at curoverse.com>
Date:   Thu Aug 10 17:03:29 2017 -0300

    8937: Merge branch 'master' into 8937-arvput-cached-tokens
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas at curoverse.com>


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


hooks/post-receive
-- 




More information about the arvados-commits mailing list