[ARVADOS] updated: 0d8d1ff55e2ba154b396e1879928a126745c1089
git at public.curoverse.com
git at public.curoverse.com
Thu Feb 11 14:54:34 EST 2016
Summary of changes:
apps/workbench/Gemfile.lock | 3 -
.../app/controllers/application_controller.rb | 6 +-
apps/workbench/app/models/arvados_api_client.rb | 5 +-
.../views/application/_projects_tree_menu.html.erb | 2 +-
.../test/controllers/projects_controller_test.rb | 50 +++++++
backports/python-llfuse/fpm-info.sh | 3 +
crunch_scripts/crunchutil/subst.py | 2 +-
crunch_scripts/run-command | 17 ++-
.../install-compute-node.html.textile.liquid | 2 +-
.../install-crunch-dispatch.html.textile.liquid | 13 +-
doc/install/install-keepproxy.html.textile.liquid | 2 +-
.../install-shell-server.html.textile.liquid | 16 ++-
.../install-workbench-app.html.textile.liquid | 2 +-
sdk/cli/bin/crunch-job | 44 +++---
sdk/python/arvados/events.py | 63 +++++---
sdk/python/setup.py | 2 +-
services/api/Gemfile | 2 +-
services/api/Gemfile.lock | 4 +-
services/api/app/models/arvados_model.rb | 4 +
services/api/lib/crunch_dispatch.rb | 5 +-
services/api/lib/load_param.rb | 26 +++-
services/api/test/fixtures/groups.yml | 12 ++
services/api/test/fixtures/links.yml | 35 +++++
.../arvados/v1/groups_controller_test.rb | 55 +++++++
.../api/test/functional/arvados/v1/query_test.rb | 68 +++++++++
services/fuse/arvados_fuse/command.py | 106 +++++++-------
services/fuse/arvados_fuse/fusedir.py | 24 ++++
services/fuse/fpm-info.sh | 1 +
services/fuse/tests/integration_test.py | 4 +-
services/fuse/tests/mount_test_base.py | 31 ++--
services/fuse/tests/test_command_args.py | 28 +++-
services/fuse/tests/test_exec.py | 60 ++++++++
services/login-sync/bin/arvados-login-sync | 3 +-
services/nodemanager/arvnodeman/clientactor.py | 20 +--
.../nodemanager/arvnodeman/computenode/__init__.py | 64 +++++++++
.../arvnodeman/computenode/dispatch/__init__.py | 159 +++++++++++----------
.../arvnodeman/computenode/dispatch/slurm.py | 8 +-
.../arvnodeman/computenode/driver/__init__.py | 56 ++++++--
.../arvnodeman/computenode/driver/ec2.py | 3 +
.../arvnodeman/computenode/driver/gce.py | 1 +
services/nodemanager/arvnodeman/daemon.py | 103 ++++++++-----
services/nodemanager/arvnodeman/jobqueue.py | 3 +-
services/nodemanager/arvnodeman/launcher.py | 56 ++++----
services/nodemanager/arvnodeman/nodelist.py | 5 +-
services/nodemanager/tests/test_clientactor.py | 4 +-
.../nodemanager/tests/test_computenode_dispatch.py | 21 ++-
.../tests/test_computenode_driver_azure.py | 10 ++
.../tests/test_computenode_driver_gce.py | 10 ++
services/nodemanager/tests/test_daemon.py | 1 +
services/nodemanager/tests/testutil.py | 8 ++
tools/crunchstat-summary/MANIFEST.in | 1 +
.../crunchstat_summary/chartjs.py | 20 ++-
.../crunchstat_summary/command.py | 3 +-
.../crunchstat_summary/reader.py | 80 +++++++++++
.../crunchstat_summary/summarizer.py | 63 ++++----
.../tests/logfile_20151204190335.txt.gz.report | 22 +--
.../tests/logfile_20151210063411.txt.gz.report | 11 +-
.../tests/logfile_20151210063439.txt.gz.report | 11 +-
58 files changed, 1094 insertions(+), 349 deletions(-)
create mode 100644 services/api/test/functional/arvados/v1/query_test.rb
create mode 100644 services/fuse/fpm-info.sh
create mode 100644 services/fuse/tests/test_exec.py
create mode 100644 tools/crunchstat-summary/crunchstat_summary/reader.py
via 0d8d1ff55e2ba154b396e1879928a126745c1089 (commit)
via 92ac862af66a1c60fb4e7bf5c916552ab505ff49 (commit)
via 495a485ff8e7b8c548b943da10c6acfe3eb98165 (commit)
via 443f3228eb4c56849f77ae9c421dd1cc6fdbc5f1 (commit)
via d944cda7fc56ff31bc1bd1200648785e43bf0405 (commit)
via 7c893926186fec34727f29628dd587ae3cbe86a6 (commit)
via 6d788bb6ab248cf5aef02a049912fbcd42da514f (commit)
via e1385430ac8a650aca04e95abc451d81c2c88cf5 (commit)
via aabdbefd374565d5203d414f46eadc8345c022bf (commit)
via 49dbada3eb269212cdfb38bcae07781e141453fc (commit)
via 5522d7db6279de7b48fbb734107f7fcd4fed5152 (commit)
via 93fbce38ba033404b86236101e5491fa89e6abd1 (commit)
via 3360352ddbcbfa6d89e80f4aae0e20eddd96daf8 (commit)
via fdc9a9308c646d23ec50073833f141ceebf78613 (commit)
via 2b324ca45515fbf079afb15db821f437ee6b64a5 (commit)
via 74bfe6e5794b42d3158d9358245802e73942b909 (commit)
via d1c72b300d50f071106a320a807f465c251a812e (commit)
via baeb7dbe5929012dea22985b11ae4c5584f76891 (commit)
via 19199a75e41004ea776622c305c3ca43e5367bf2 (commit)
via ddd02b0a536cbc0e80b77df43939e30f294126b5 (commit)
via 090b515aa10dba597b20a96797f17688f582a529 (commit)
via fcbb743e3de63e93280f2fbeedea49f98430d26f (commit)
via e8b7fbbd711836c59824327364e15ef2253a5848 (commit)
via 1fc6d7713baabfe85b49191e156b6c093d22b69f (commit)
via d4807ea755bcd122388189815b0b6d5aaa295509 (commit)
via 3f5b70e78c4008e0de876e53fc7fbbc0671a6937 (commit)
via 1293a55ede38d16119b04a6584ca9da143ea3725 (commit)
via 6c950260b253d28e78579b493c8eb3eabe0add11 (commit)
via d7e8f7c787b7706937f95c3ed2a5086616d48514 (commit)
via 3e7037e6383f57b0d1b4b627cd9feb27f05af13d (commit)
via 5bda5bf3aedc0621abeed901a608adb7db6030e6 (commit)
via f6bb371a170d0a74db6abf9df0f65aabe08d7cf9 (commit)
via a13c14cfc7fabe4f4da48edd57a086d2d8953a03 (commit)
via 78b9f61dcab9bd571952b8c9e8052b643588c52b (commit)
via 66da04e142bb80ff25d65900292bf99c7e4252f2 (commit)
via 4186924dbc103d080c47ae85bcfcd38d87314767 (commit)
via 48369a1e78683cec26b7154d5edc5f3450fec245 (commit)
via 3a2802166901386eba4c3bc9bf877a18346ba03c (commit)
via b63c1041dd34fe496920fd035249e50edc88b095 (commit)
via 45f37fe38bd3cb7ca1ff9a7c47791ec73888f383 (commit)
via 8417bf754051966915b93c362624ebdcd492d660 (commit)
via 64e0a60330d73309c02e75d012249a28a32e1b9d (commit)
via 0d6070d3b62fc367dbb02e8ead5fe25dce012156 (commit)
via ea5a4de11a0f379c6fa78be288bc403da53995a1 (commit)
via 8709ef45c968e79b5e5978759484b994d4789aea (commit)
via fd5a11b21af83870c4122afdf94844dd4cf63cc6 (commit)
via cda9a7d3e3601a7a8bb721261c5b26210e9f629f (commit)
via ca4e92183dfca9f226898790a09239935e17eba9 (commit)
via be2197781a206ba7cbf5bbfbf61a70375fb10d68 (commit)
via e9901a3f94eab93f9482b7cb3d7e2c1b50216f08 (commit)
via 73812c5a32581a7f72922dcd2e448e4d4ba4d918 (commit)
via e0e0c312ddf1f60736cc1ca7488bb36f8618440c (commit)
via c7e3518e66369b931821b802160bd014cf82b218 (commit)
via ce8f8ab963a12ca7f89c79cb7d6f5d19fe15b03c (commit)
via a3dfad4606eb8cff8bb66533a38c47d0d8c158fa (commit)
via 1dbf2e031ecbe21aefebe8b297fb5d5e222234a7 (commit)
via 48f61a5af0d0e6617ea545d716c5e0b132790198 (commit)
via b26951c6f488f28cf1ea5aac65c65311d0b573a4 (commit)
via 95773bc4ac9e01126a80a96fdbe0bf37d1478767 (commit)
via 4ede474fb3be39474fdd2a075d81dd351e6afefc (commit)
via e9dcedd8dda3de8360e34bfca536dd606d558d34 (commit)
via b983edff6a9053b686275af980ce336283fd3c27 (commit)
via dd6bbea1497114eed99285753bc163972717dfbb (commit)
via aea45ff7ad85ec23a903faf16386d43e0d614f83 (commit)
via 6570eec0115d7973cce4df10857631cfe6bd11c5 (commit)
via 24d4409c087eeebe67ba54af7a6c19745a60365b (commit)
via 6d349aac4810e7b0039e519860d0eda8345c9dfe (commit)
via 40103b455d0df2bc47eaba422a72bf6ec4fd6808 (commit)
via 7b4f98f54598aefc54f88a491dba64793cf749ae (commit)
via 0171406e1dda9662e47c19ffabdd4eb66dd2fc61 (commit)
via b445db93ece1069c949f0c02d0564e578e453d12 (commit)
via 179b6580522095c6e190bd000c71002fc6564a2e (commit)
via 630eac929f942fa997a4efcb9e7cd2d88414d0c2 (commit)
via 85c71a36173550f14fb1d5f4092f2050ec8dc033 (commit)
via 9aa6066eef7a67809f33871447d4312af6f22749 (commit)
via 3a8714e6fcf41c46d1fde0a6a3e4beb1367d181d (commit)
from a6310e8b0eedce1323f02d285c0709516558f937 (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 0d8d1ff55e2ba154b396e1879928a126745c1089
Author: radhika <radhika at curoverse.com>
Date: Thu Feb 11 14:53:31 2016 -0500
8286: added test "unshare project and verify that it is no longer included in shared user's starred projects"
diff --git a/apps/workbench/app/controllers/application_controller.rb b/apps/workbench/app/controllers/application_controller.rb
index 5d8f1d8..61c57ae 100644
--- a/apps/workbench/app/controllers/application_controller.rb
+++ b/apps/workbench/app/controllers/application_controller.rb
@@ -453,7 +453,7 @@ class ApplicationController < ActionController::Base
if params['status'] == 'create'
# create 'star' link if one does not already exist
if !links.andand.any?
- dst = Link.new(owner_uuid: @object.uuid,
+ dst = Link.new(owner_uuid: current_user.uuid,
tail_uuid: current_user.uuid,
head_uuid: @object.uuid,
link_class: 'star',
@@ -870,9 +870,9 @@ class ApplicationController < ActionController::Base
end
helper_method :my_starred_projects
- def my_starred_projects
+ def my_starred_projects user
return if @starred_projects
- links = Link.filter([['tail_uuid', '=', current_user.uuid],
+ links = Link.filter([['tail_uuid', '=', user.uuid],
['link_class', '=', 'star'],
['head_uuid', 'is_a', 'arvados#group']]).select(%w(head_uuid))
uuids =links.collect { |x| x.head_uuid }
diff --git a/apps/workbench/app/views/application/_projects_tree_menu.html.erb b/apps/workbench/app/views/application/_projects_tree_menu.html.erb
index 7eefc66..221d9a2 100644
--- a/apps/workbench/app/views/application/_projects_tree_menu.html.erb
+++ b/apps/workbench/app/views/application/_projects_tree_menu.html.erb
@@ -6,7 +6,7 @@
<span style="padding-left: 0">Home</span>
<% end %>
</li>
-<% my_starred_projects.each do |pnode| %>
+<% (my_starred_projects current_user).each do |pnode| %>
<li>
<%= project_link_to.call({object: pnode, depth: 0}) do%>
<span style="padding-left: 0em"></span><%= pnode[:name] %>
diff --git a/apps/workbench/test/controllers/projects_controller_test.rb b/apps/workbench/test/controllers/projects_controller_test.rb
index 8fa9fe9..643aaae 100644
--- a/apps/workbench/test/controllers/projects_controller_test.rb
+++ b/apps/workbench/test/controllers/projects_controller_test.rb
@@ -418,4 +418,54 @@ class ProjectsControllerTest < ActionController::TestCase
}, session_for(:active)
assert_select "#projects-menu + ul li.divider ~ li a[href=/projects/#{project_uuid}]"
end
+
+ [
+ ["active", 1],
+ ["project_viewer", 1],
+ ["admin", 0],
+ ].each do |user, size|
+ test "starred projects for #{user}" do
+ use_token user
+ ctrl = ProjectsController.new
+ current_user = User.find(api_fixture('users')[user]['uuid'])
+ my_starred_project = ctrl.send :my_starred_projects, current_user
+ assert_equal(size, my_starred_project.andand.size)
+
+ ctrl2 = ProjectsController.new
+ current_user = User.find(api_fixture('users')[user]['uuid'])
+ my_starred_project = ctrl2.send :my_starred_projects, current_user
+ assert_equal(size, my_starred_project.andand.size)
+ end
+ end
+
+ test "unshare project and verify that it is no longer included in shared user's starred projects" do
+ # remove sharing link
+ use_token :system_user
+ Link.find(api_fixture('links')['share_starred_project_with_project_viewer']['uuid']).destroy
+
+ # verify that project is no longer included in starred projects
+ use_token :project_viewer
+ current_user = User.find(api_fixture('users')['project_viewer']['uuid'])
+ ctrl = ProjectsController.new
+ my_starred_project = ctrl.send :my_starred_projects, current_user
+ assert_equal(0, my_starred_project.andand.size)
+
+ # share it again
+ @controller = LinksController.new
+ post :create, {
+ link: {
+ link_class: 'permission',
+ name: 'can_read',
+ head_uuid: api_fixture('groups')['starred_and_shared_active_user_project']['uuid'],
+ tail_uuid: api_fixture('users')['project_viewer']['uuid'],
+ },
+ format: :json
+ }, session_for(:system_user)
+
+ # verify that the project is again included in starred projects
+ use_token :project_viewer
+ ctrl = ProjectsController.new
+ my_starred_project = ctrl.send :my_starred_projects, current_user
+ assert_equal(1, my_starred_project.andand.size)
+ end
end
diff --git a/services/api/test/fixtures/groups.yml b/services/api/test/fixtures/groups.yml
index f6b99a0..4029846 100644
--- a/services/api/test/fixtures/groups.yml
+++ b/services/api/test/fixtures/groups.yml
@@ -282,3 +282,15 @@ subproject_in_asubproject_with_same_name_as_one_in_active_user_home:
name: Subproject to test owner uuid and name unique key violation upon removal
description: "Removing this will result in name conflict with 'A project' in Home project and hence get renamed."
group_class: project
+
+starred_and_shared_active_user_project:
+ uuid: zzzzz-j7d0g-starredshared01
+ owner_uuid: zzzzz-tpzed-xurymjxw79nv3jz
+ created_at: 2014-04-21 15:37:48 -0400
+ modified_by_client_uuid: zzzzz-ozdt8-brczlopd8u8d0jr
+ modified_by_user_uuid: zzzzz-tpzed-xurymjxw79nv3jz
+ modified_at: 2014-04-21 15:37:48 -0400
+ updated_at: 2014-04-21 15:37:48 -0400
+ name: Starred and shared active user project
+ description: Starred and shared active user project
+ group_class: project
diff --git a/services/api/test/fixtures/links.yml b/services/api/test/fixtures/links.yml
index 925e466..7ed7f6b 100644
--- a/services/api/test/fixtures/links.yml
+++ b/services/api/test/fixtures/links.yml
@@ -920,3 +920,38 @@ empty_collection_name_in_fuse_user_home_project:
properties: {}
updated_at: 2014-08-06 22:11:51.242010312 Z
+star_project_for_active_user:
+ uuid: zzzzz-o0j2j-starredbyactive
+ owner_uuid: zzzzz-tpzed-xurymjxw79nv3jz
+ created_at: 2014-01-24 20:42:26 -0800
+ modified_by_client_uuid: zzzzz-ozdt8-brczlopd8u8d0jr
+ modified_by_user_uuid: zzzzz-tpzed-000000000000000
+ modified_at: 2014-01-24 20:42:26 -0800
+ updated_at: 2014-01-24 20:42:26 -0800
+ tail_uuid: zzzzz-tpzed-xurymjxw79nv3jz
+ link_class: star
+ name: zzzzz-j7d0g-starredshared01
+ head_uuid: zzzzz-j7d0g-starredshared01
+ properties: {}
+
+share_starred_project_with_project_viewer:
+ uuid: zzzzz-o0j2j-sharewithviewer
+ owner_uuid: zzzzz-tpzed-000000000000000
+ tail_uuid: zzzzz-tpzed-projectviewer1a
+ link_class: permission
+ name: can_read
+ head_uuid: zzzzz-j7d0g-starredshared01
+
+star_shared_project_for_project_viewer:
+ uuid: zzzzz-o0j2j-starredbyviewer
+ owner_uuid: zzzzz-tpzed-projectviewer1a
+ created_at: 2014-01-24 20:42:26 -0800
+ modified_by_client_uuid: zzzzz-ozdt8-brczlopd8u8d0jr
+ modified_by_user_uuid: zzzzz-tpzed-000000000000000
+ modified_at: 2014-01-24 20:42:26 -0800
+ updated_at: 2014-01-24 20:42:26 -0800
+ tail_uuid: zzzzz-tpzed-projectviewer1a
+ link_class: star
+ name: zzzzz-j7d0g-starredshared01
+ head_uuid: zzzzz-j7d0g-starredshared01
+ properties: {}
diff --git a/services/api/test/functional/arvados/v1/groups_controller_test.rb b/services/api/test/functional/arvados/v1/groups_controller_test.rb
index 1d7bb77..98c06ea 100644
--- a/services/api/test/functional/arvados/v1/groups_controller_test.rb
+++ b/services/api/test/functional/arvados/v1/groups_controller_test.rb
@@ -380,4 +380,59 @@ class Arvados::V1::GroupsControllerTest < ActionController::TestCase
'A Project (2)',
"new project name '#{new_project['name']}' was expected to be 'A Project (2)'")
end
+
+ test "unsharing a project results in hiding it from previously shared user" do
+ # remove sharing link for project
+ @controller = Arvados::V1::LinksController.new
+ authorize_with :admin
+ post :destroy, id: links(:share_starred_project_with_project_viewer).uuid
+ assert_response :success
+
+ # verify that the user can no longer see the project
+ @counter = 0 # Reset executed action counter
+ @controller = Arvados::V1::GroupsController.new
+ authorize_with :project_viewer
+ get :index, filters: [['group_class', '=', 'project']], format: :json
+ assert_response :success
+ found_projects = {}
+ json_response['items'].each do |g|
+ found_projects[g['uuid']] = g
+ end
+ assert_equal false, found_projects.include?(groups(:starred_and_shared_active_user_project).uuid)
+
+ # share the project
+ @counter = 0
+ @controller = Arvados::V1::LinksController.new
+ authorize_with :system_user
+ post :create, link: {
+ link_class: "permission",
+ name: "can_read",
+ head_uuid: groups(:starred_and_shared_active_user_project).uuid,
+ tail_uuid: users(:project_viewer).uuid,
+ }
+
+ # verify that project_viewer user can now see shared project again
+ @counter = 0
+ @controller = Arvados::V1::GroupsController.new
+ authorize_with :project_viewer
+ get :index, filters: [['group_class', '=', 'project']], format: :json
+ assert_response :success
+ found_projects = {}
+ json_response['items'].each do |g|
+ found_projects[g['uuid']] = g
+ end
+ assert_equal true, found_projects.include?(groups(:starred_and_shared_active_user_project).uuid)
+ end
+
+ test "deleting a project results in deleting it's star links" do
+ skip "Delete is not yet supported for groups with share and other links"
+
+ authorize_with :admin
+ post :destroy, id: groups(:starred_and_shared_active_user_project).uuid
+ assert_response :success
+
+ @controller = Arvados::V1::LinksController.new
+ get :show, {id: links(:star_shared_project_for_project_viewer).uuid}
+ assert_response 404
+ end
end
commit 92ac862af66a1c60fb4e7bf5c916552ab505ff49
Merge: 443f322 495a485
Author: radhika <radhika at curoverse.com>
Date: Wed Feb 10 13:55:40 2016 -0500
Merge branch 'master' into 8286-fav-projects
commit 443f3228eb4c56849f77ae9c421dd1cc6fdbc5f1
Merge: a6310e8 d944cda
Author: radhika <radhika at curoverse.com>
Date: Wed Feb 10 12:55:22 2016 -0500
Merge branch 'master' into 8286-fav-projects
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list