[ARVADOS] updated: e6a720d548ea851e5db9970f013456c8daeb35fc

Git user git at public.curoverse.com
Thu Jun 22 12:28:56 EDT 2017


Summary of changes:
 apps/workbench/app/controllers/users_controller.rb |  30 +-
 .../app/views/users/_repositories.html.erb         |  96 +++----
 .../test/controllers/users_controller_test.rb      |   9 +-
 .../test/integration/user_settings_menu_test.rb    |  34 +--
 build/package-build-dockerfiles/Makefile           |   2 +-
 build/package-build-dockerfiles/centos7/Dockerfile |   2 +-
 build/package-build-dockerfiles/debian8/Dockerfile |   2 +-
 .../ubuntu1204/Dockerfile                          |   2 +-
 .../ubuntu1404/Dockerfile                          |   2 +-
 .../ubuntu1604/Dockerfile                          |   2 +-
 build/run-tests.sh                                 |   4 +-
 doc/_config.yml                                    |   1 +
 doc/_includes/_install_redhat_key.liquid           |   9 +-
 doc/images/trash-button-topnav.png                 | Bin 0 -> 3531 bytes
 ...nstall-manual-prerequisites.html.textile.liquid |  10 +-
 ...l-keep-collection-lifecycle.html.textile.liquid |  66 +++++
 sdk/cwl/arvados_cwl/arvjob.py                      |  20 +-
 sdk/cwl/test_with_arvbox.sh                        |  10 +-
 sdk/cwl/tests/test_job.py                          |   8 +
 sdk/go/arvados/collection_fs.go                    | 235 ++++++++++++++++
 sdk/go/arvados/collection_fs_test.go               | 125 +++++++++
 sdk/go/arvadostest/fixtures.go                     |   3 +
 sdk/go/keepclient/collectionreader.go              |  21 +-
 sdk/python/arvados/commands/put.py                 |  18 +-
 sdk/python/tests/test_arv_put.py                   |  38 ++-
 .../app/controllers/arvados/v1/users_controller.rb |  36 +--
 .../functional/arvados/v1/users_controller_test.rb |  20 --
 services/api/test/integration/users_test.rb        |   9 +-
 services/crunch-run/crunchrun.go                   |   4 +-
 services/crunch-run/crunchrun_test.go              |  13 +-
 services/keep-web/cache.go                         |  31 +--
 services/keep-web/cache_test.go                    |   8 +-
 services/keep-web/handler.go                       | 308 ++++++++++++++++-----
 services/keep-web/handler_test.go                  | 106 +++++++
 services/keep-web/server_test.go                   |   4 +-
 .../arvnodeman/computenode/driver/ec2.py           |  19 +-
 services/nodemanager/arvnodeman/daemon.py          |   2 +-
 .../nodemanager/arvnodeman/test/fake_driver.py     |  32 ++-
 services/nodemanager/setup.py                      |   6 +-
 .../tests/test_computenode_driver_ec2.py           |  50 ++++
 services/nodemanager/tests/testutil.py             |   3 +-
 tools/arvbox/lib/arvbox/docker/Dockerfile.base     |   2 +-
 42 files changed, 1106 insertions(+), 296 deletions(-)
 create mode 100644 doc/images/trash-button-topnav.png
 create mode 100644 doc/user/tutorials/tutorial-keep-collection-lifecycle.html.textile.liquid
 create mode 100644 sdk/go/arvados/collection_fs.go
 create mode 100644 sdk/go/arvados/collection_fs_test.go

       via  e6a720d548ea851e5db9970f013456c8daeb35fc (commit)
       via  e4cb545184144fa761aa9b692597df8d10e110a4 (commit)
       via  55459e4c87f2ff9a2975971cf73b420f8d30bfc2 (commit)
       via  d43dce642a9681a33a5259f5bde05c8d3f3b690e (commit)
       via  3f9fefd28e1da09f006b00406b4a156b8d87d72e (commit)
       via  b7cf3197e2f5823cc67c0d125a8841943dcb9b5c (commit)
       via  8c2b89cb6a34b2f1a4ed672e8a883c680ffca80a (commit)
       via  55063ad6fc06f74392338802dd70cd315abf3a1a (commit)
       via  b1f94004653da79774a8c9afd641ab7b492398a6 (commit)
       via  9318b234cbfae138524e45080f549c277e15776b (commit)
       via  f054bc3d7d3d26962e62c2ea7c27214b08e85bb6 (commit)
       via  9e575bce7c0757f270b584d434d2ada5bc98bc3d (commit)
       via  02c1d68ab5eeafffb09482d0432f8c4a6cb6dfca (commit)
       via  9c6aa66e38395f4ca658a258d27fee2c05c595e2 (commit)
       via  eca14e106a73ebe62f5aa0fc3060ade2d42f8e20 (commit)
       via  a249cd98f534ab0a1cba1345b33142f438b7d0f6 (commit)
       via  74b3ad1f061185ca695e8bbead723b5212bbb06a (commit)
       via  04efddf61ee4a0e5c65a72a538fe3f026ae94e8e (commit)
       via  e7dc406d4babf0fae50837c7f0040dc485242e36 (commit)
       via  5598bbc3c71da60b7b7a665b36495b957d6a3c52 (commit)
       via  e2cd53d9007d56e1de4816f6aeab4bd769271162 (commit)
       via  1883b07d5de707066bf996c1526073df323c3991 (commit)
       via  48f4c496e659bc28446bfd5aa2d469d5316d49cb (commit)
       via  9ca7acc39ed2e1e2100869e17be3e5cff7c835b6 (commit)
       via  e7672a0b679659d6ba90d23b4e102fba747fa9ef (commit)
       via  cf9874c59fa5a73d395743aaf71555b441161e3e (commit)
       via  62a1c9045b8313cc7e1b6be16ab922e3eff1bcfd (commit)
       via  4db4e97167a25b519581fb5f4ebef2169464333e (commit)
       via  04f9ccc7ca627d41175f44f515e4581b6937f43b (commit)
       via  f77d63e6cfaf7278c1cb0fb05e5a4e3f45320e3a (commit)
       via  a7240d9ad7e1bd676097665fe3fdc1727cbc2e1b (commit)
       via  312b1a86d1ec886f4baec15034ba1600a9cf1ec2 (commit)
       via  490895ac6ab70a5340b80e734b81a2250412635c (commit)
       via  c40b0299b306f2b508e178b2df210f8a3d9d10e7 (commit)
       via  01c692dd9d29436f98c8550aabd3eb3897ccadb1 (commit)
       via  1a86e126dcc5d60666d8233a1b458591a6632190 (commit)
       via  c38b769bd478214e8d70bc442505a502f501517d (commit)
       via  4b056c34fa04a3b611a0cf5f70e9b8d59b7ef632 (commit)
       via  510a92b885ff547dd7eecb34093f27a7245f021f (commit)
       via  abf007273ba68c2eb541763e40b19d1703132685 (commit)
       via  a4a1652b72a4fc0fb784f08152ef31f97534c76d (commit)
       via  08793025fb951153ce374f8eb4f984ee21f6a2bc (commit)
       via  5bace39d3a7054663ff8b8e79c5ca2a4c3502300 (commit)
      from  110b7d2f628aa9b60fc2beecb66ead15cc60660f (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 e6a720d548ea851e5db9970f013456c8daeb35fc
Author: Lucas Di Pentima <lucas at curoverse.com>
Date:   Thu Jun 22 13:27:25 2017 -0300

    11557: Fixeg bug introduced on those cases when reusing a job from a different
    project, the user has no "manage" permissions on it to create a sharing link.
    Added a test to cover the case.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas at curoverse.com>

diff --git a/sdk/cwl/arvados_cwl/arvjob.py b/sdk/cwl/arvados_cwl/arvjob.py
index ef9aba5..ab06386 100644
--- a/sdk/cwl/arvados_cwl/arvjob.py
+++ b/sdk/cwl/arvados_cwl/arvjob.py
@@ -16,6 +16,7 @@ from schema_salad.sourceline import SourceLine
 import ruamel.yaml as yaml
 
 import arvados.collection
+from arvados.errors import ApiError
 
 from .arvdocker import arv_docker_get_image
 from .runner import Runner, arvados_jobs_image, packed_workflow, upload_workflow_collection, trim_anonymous_location
@@ -147,12 +148,19 @@ class ArvadosJob(object):
                 logger.info("%s reused job %s", self.arvrunner.label(self), response["uuid"])
                 # Give read permission to the desired project on reused jobs
                 if response["owner_uuid"] != self.arvrunner.project_uuid:
-                    self.arvrunner.api.links().create(body={
-                        'link_class': 'permission',
-                        'name': 'can_read',
-                        'tail_uuid': self.arvrunner.project_uuid,
-                        'head_uuid': response["uuid"],
-                        }).execute(num_retries=self.arvrunner.num_retries)
+                    try:
+                        self.arvrunner.api.links().create(body={
+                            'link_class': 'permission',
+                            'name': 'can_read',
+                            'tail_uuid': self.arvrunner.project_uuid,
+                            'head_uuid': response["uuid"],
+                            }).execute(num_retries=self.arvrunner.num_retries)
+                    except ApiError as e:
+                        # The user might not have "manage" access on the job: log
+                        # a message and continue.
+                        logger.info("Creating read permission on job %s: %s",
+                                    response["uuid"],
+                                    e)
 
                 with Perf(metrics, "done %s" % self.name):
                     self.done(response)
diff --git a/sdk/cwl/tests/test_job.py b/sdk/cwl/tests/test_job.py
index fa043ba..a71d1d8 100644
--- a/sdk/cwl/tests/test_job.py
+++ b/sdk/cwl/tests/test_job.py
@@ -10,6 +10,7 @@ import StringIO
 import arvados
 import arvados_cwl
 import cwltool.process
+from arvados.errors import ApiError
 from schema_salad.ref_resolver import Loader
 from schema_salad.sourceline import cmap
 from .mock_discovery import get_rootDesc
@@ -92,6 +93,13 @@ class TestJob(unittest.TestCase):
                             "head_uuid": "zzzzz-819sb-yyyyyyyyyyyyyyy",
                         })
                     )
+                    # Simulate an API excepction when trying to create a
+                    # sharing link on the job
+                    runner.api.links().create.side_effect = ApiError(
+                        mock.MagicMock(return_value={'status': 403}),
+                        'Permission denied')
+                    j.run(enable_reuse=enable_reuse)
+                    j.output_callback.assert_called_with({}, 'success')
                 else:
                     assert not runner.api.links().create.called
 

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list