[ARVADOS] updated: 22233bfa18060d000e303d7734ec3016f7e80c8e
git at public.curoverse.com
git at public.curoverse.com
Fri May 2 21:40:10 EDT 2014
Summary of changes:
.../app/controllers/websocket_controller.rb | 10 +
apps/workbench/app/models/pipeline_instance.rb | 2 +-
apps/workbench/app/views/websocket/index.html.erb | 34 ++
apps/workbench/config/routes.rb | 1 +
doc/api/methods.html.textile.liquid | 10 +-
sdk/cli/bin/arv-run-pipeline-instance | 47 ++-
services/api/Gemfile | 2 +
services/api/Gemfile.lock | 8 +
.../api/app/controllers/application_controller.rb | 220 ++-------
.../app/controllers/arvados/v1/jobs_controller.rb | 2 +-
.../arvados/v1/repositories_controller.rb | 6 +
.../controllers/arvados/v1/schema_controller.rb | 16 +
services/api/app/middlewares/arvados_api_token.rb | 61 +++
services/api/app/middlewares/rack_socket.rb | 86 +++
services/api/app/models/arvados_model.rb | 78 ++-
services/api/app/models/blob.rb | 19 +-
services/api/app/models/log.rb | 8 +-
services/api/app/models/pipeline_instance.rb | 44 +-
services/api/config/application.yml.example | 7 +
services/api/config/initializers/authorization.rb | 5 +
services/api/config/initializers/eventbus.rb | 18 +
.../20140423132913_add_object_owner_to_logs.rb | 27 +
services/api/db/schema.rb | 1 +
services/api/lib/eventbus.rb | 226 ++++++++
services/api/lib/load_param.rb | 128 +++++
services/api/lib/record_filters.rb | 75 +++
services/api/test/fixtures/authorized_keys.yml | 15 +
services/api/test/fixtures/links.yml | 14 +
services/api/test/fixtures/logs.yml | 31 +-
services/api/test/fixtures/repositories.yml | 7 +-
.../arvados/v1/repositories_controller_test.rb | 42 ++
services/api/test/integration/select_test.rb | 82 +++
services/api/test/integration/websocket_test.rb | 570 ++++++++++++++++++++
services/api/test/test_helper.rb | 4 +-
services/api/test/unit/blob_test.rb | 27 +
services/api/test/unit/log_test.rb | 21 +
services/api/test/websocket_runner.rb | 42 ++
services/keep/src/keep/keep.go | 271 +++-------
services/keep/src/keep/keep_test.go | 162 +++---
services/keep/src/keep/volume.go | 129 +++++
services/keep/src/keep/volume_unix.go | 295 ++++++++++
services/keep/src/keep/volume_unix_test.go | 245 +++++++++
42 files changed, 2576 insertions(+), 522 deletions(-)
create mode 100644 apps/workbench/app/controllers/websocket_controller.rb
create mode 100644 apps/workbench/app/views/websocket/index.html.erb
create mode 100644 services/api/app/middlewares/arvados_api_token.rb
create mode 100644 services/api/app/middlewares/rack_socket.rb
create mode 100644 services/api/config/initializers/authorization.rb
create mode 100644 services/api/config/initializers/eventbus.rb
create mode 100644 services/api/db/migrate/20140423132913_add_object_owner_to_logs.rb
create mode 100644 services/api/lib/eventbus.rb
create mode 100644 services/api/lib/load_param.rb
create mode 100644 services/api/lib/record_filters.rb
create mode 100644 services/api/test/fixtures/authorized_keys.yml
create mode 100644 services/api/test/integration/select_test.rb
create mode 100644 services/api/test/integration/websocket_test.rb
create mode 100644 services/api/test/websocket_runner.rb
create mode 100644 services/keep/src/keep/volume.go
create mode 100644 services/keep/src/keep/volume_unix.go
create mode 100644 services/keep/src/keep/volume_unix_test.go
via 22233bfa18060d000e303d7734ec3016f7e80c8e (commit)
via ebddfbe7fbca80ecf852bbb20af9c6b584394691 (commit)
via 6c8ba53502c29dc9174291c04f3c7bc84777f9cc (commit)
via 307cf5007269a069b8c80dc14da134ec145cd292 (commit)
via 1d5a33d2af1e39041177681c8d66007b40b20df4 (commit)
via dca6cfe9750d8d1be4f3b63895b8cb73cc6c4cfe (commit)
via 0ed6856e2dd4c057e34ba5b2079cef0158ebc53f (commit)
via 415347a3354031b48c22cae56c7bbfdcb76d607c (commit)
via de54cdcea8dca015e3b08bb23f7221faa4814ef0 (commit)
via 0df7a1c38affbc50a9c7d8834f9822e398860d91 (commit)
via b4a9aaa3d68129d6e948dde46cee63cd66597aba (commit)
via 7ce745d5645dc49c2833c1c617fd488bf3a62307 (commit)
via fb72864bb6f2ee3ca702b914c97d06a76e01ab0d (commit)
via cd08497d1c914cd75fd8be08f9f3ef3bc75485f2 (commit)
via 681496f40864418fc1ee46277941a40d3445107c (commit)
via c6068bbeea3ea9bfee45204c2990caef0d4ec1ae (commit)
via 33b49fa0be7d8e0774c80ec315985dcdf8535962 (commit)
via 83781a4f423a3671a5ec6d4b1cd6a0bbeacef3a6 (commit)
via 73d73c7b799ddb60363ddf409d8d301b27c82c00 (commit)
via 02377152d7e368b6b73b2a94ceb68c99f9d55959 (commit)
via a6439c7ddc3407193889386051f06df2a1e74ea9 (commit)
via 57b46f9b292e561739fde3ea098c366db8f4bc23 (commit)
via 943feeec776bb75c685cbdee9466f8db3cdf5da7 (commit)
via 1433693e08e2d4052cc94f6a5902523b08bbc1ac (commit)
via e20c9587ad703ae8e1f81251a6e209834a52d448 (commit)
via a4724fe92e651abb06acf8c5e75184561a55c854 (commit)
via 208e172287aba3be7cb988a2c416e4281a2e5f60 (commit)
via b0c30631bceb2d1837b52d1d3475e52aee4c9c43 (commit)
via b421d5c4754315cdd8b70b6bbea5b5f23fb425de (commit)
via fe78b629dc39298c5990a093e73b7c6231f387b0 (commit)
via 7a73008bcd015300461c34ce852d660f8244e11f (commit)
via 30f834eef8916c0d613c098a4897ac932a2e0b37 (commit)
via 4ab25f3b39de88d6d2382bb91af9d67bd6de3bd3 (commit)
via 2ea7a68942928d1d37166726be5114cb7fbdb75b (commit)
via f74cbd153b5cbe4e3678c9b86178019f593b553d (commit)
via f37f7c068b8d59934c7b0632d531c08470323123 (commit)
via e05f165ac12cb54faad707548b8b8f2005f2eef6 (commit)
via b860994fa83b9f11b7243220efb8f2fe9b2e2917 (commit)
via e537bd8dd1ac786164f192374e0d076bdc0327f3 (commit)
via 995dd33ec5bc9ebb7cc4ff075a1f5e1a4e7db20c (commit)
via 4eb42fd91dc5e50840e0d3db5d5201561602a508 (commit)
via 7c12fc4d989dd2b4c47a174280a4f9526ecb0798 (commit)
via dbce533271fca5a106ab8a00ad2621177445131f (commit)
via 0a72fd5c9f764eba4fc295d8beb24ac3d01885c5 (commit)
via 87f17f28080eef37ad940a039fd1623e72e3058e (commit)
via c72f1de32f688690d1161a1852e471e88919e057 (commit)
via f0ca76acaa3a4e3713f7aef6a6bb778e6e71e562 (commit)
via 1f9df3c7140d4eacf58d4e19a7ddc81260296229 (commit)
via 78b5bfcb1fa832e4460cfaa41f7815ce1d07a9a4 (commit)
via 93db9aecb724964a37474104243a6d619b56769f (commit)
via da3e84a0984d60a2f4bec00672eb766e2e978859 (commit)
via aaa65e9d351284278ccb6d3e803fd3dd4f748c31 (commit)
via 73cf2bb90245787fbbd7c18da51329524c40f6af (commit)
via da1614ac6d9b1b2aeba6267b304ce70c1726b608 (commit)
via 7130989e6493555eba3491cfc9c8dddd1e1a545a (commit)
via 923e2bd7d962f1a0feefc73ae4f4531c8235a591 (commit)
via eca0d3d0a6938e08dde6067c4565754c45f5ebb7 (commit)
via 04cc77648cc62c73433801475c27ede4ceb76c8b (commit)
via fa257c28461627fe6700dd8fd2152e380f8725d4 (commit)
via cb52a672642bdec7c6a97868a68bbb9b8daa0efb (commit)
via d07a96a0f0c11b98ecc927f0b3e0b052f8ef99f7 (commit)
via b66ad0b212a80c117b5b344a715331962d0bfe2d (commit)
via e484a466d78c87114779b596d6ecd79f22088ee2 (commit)
via aa920f1659aa830861c196617fe664f35b5c12ef (commit)
via c283713dc8762c396407f68129fb276dc4a746fc (commit)
via 4e047434f0c6958db039cf9ab55e3f7f44da44c9 (commit)
via 8202cb5f1682588e35dcf90519f53d74c06d4aa6 (commit)
from e8f81804c24307b6702b1897c80b4be832254454 (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 22233bfa18060d000e303d7734ec3016f7e80c8e
Author: radhika <radhika at curoverse.com>
Date: Fri May 2 21:38:20 2014 -0400
2352: Getting null pointer exception after merging in master!!
diff --git a/apps/workbench/app/models/pipeline_instance.rb b/apps/workbench/app/models/pipeline_instance.rb
index ccb8835..d435ad4 100644
--- a/apps/workbench/app/models/pipeline_instance.rb
+++ b/apps/workbench/app/models/pipeline_instance.rb
@@ -18,7 +18,7 @@ class PipelineInstance < ArvadosBase
end
def attribute_editable?(attr)
- attr.to_sym == :name || (attr.to_sym == :components and self.active == nil)
+ attr && (attr.to_sym == :name || (attr.to_sym == :components and self.active == nil))
end
def attributes_for_display
commit ebddfbe7fbca80ecf852bbb20af9c6b584394691
Merge: 415347a 6c8ba53
Author: radhika <radhika at curoverse.com>
Date: Fri May 2 21:06:23 2014 -0400
Merge branch 'master' into 2352-use-state
commit 415347a3354031b48c22cae56c7bbfdcb76d607c
Author: radhika <radhika at curoverse.com>
Date: Fri May 2 12:09:31 2014 -0400
2352: Update arv-run-pipeline-instance to handle RunningOnClient and Paused states
diff --git a/sdk/cli/bin/arv-run-pipeline-instance b/sdk/cli/bin/arv-run-pipeline-instance
index 0b0553c..2751c08 100755
--- a/sdk/cli/bin/arv-run-pipeline-instance
+++ b/sdk/cli/bin/arv-run-pipeline-instance
@@ -413,15 +413,25 @@ class WhRunPipelineInstance
end
def setup_instance
- @instance ||= PipelineInstance.
- create(:components => @components,
+ if $options[:submit]
+ @instance ||= PipelineInstance.
+ create(:components => @components,
:pipeline_template_uuid => @template[:uuid],
:active => true)
+ else
+ @instance ||= PipelineInstance.
+ create(:components => @components,
+ :pipeline_template_uuid => @template[:uuid],
+ :state => 'RunningOnClient',
+ :active => false)
+ end
self
end
def run
moretodo = true
+ interrupted = false
+
while moretodo
moretodo = false
@components.each do |cname, c|
@@ -544,7 +554,9 @@ class WhRunPipelineInstance
sleep 10
rescue Interrupt
debuglog "interrupt", 0
- abort
+ interrupted = true
+ break
+ #abort
end
end
end
@@ -565,11 +577,30 @@ class WhRunPipelineInstance
end
end
- if ended == @components.length or failed > 0
- @instance[:active] = false
- @instance[:success] = (succeeded == @components.length)
+ success = (succeeded == @components.length)
+
+ if interrupted
+ if success
+ @instance[:active] = false
+ @instance[:success] = success
+ @instance[:state] = "Complete"
+ else
+ @instance[:active] = nil
+ @instance[:success] = nil
+ @instance[:state] = 'Paused'
+ end
+ else
+ if ended == @components.length or failed > 0
+ @instance[:active] = false
+ @instance[:success] = success
+ @instance[:state] = success ? "Complete" : "Failed"
+ end
end
+ # set components_summary
+ components_summary = {"todo" => @components.length - ended, "done" => succeeded, "failed" => failed}
+ @instance[:components_summary] = components_summary
+
@instance.save
end
diff --git a/services/api/app/models/pipeline_instance.rb b/services/api/app/models/pipeline_instance.rb
index ca4b69c..73f56d1 100644
--- a/services/api/app/models/pipeline_instance.rb
+++ b/services/api/app/models/pipeline_instance.rb
@@ -139,28 +139,12 @@ class PipelineInstance < ArvadosModel
end
def verify_status
- if active_changed?
- if self.active
- self.state = RunningOnServer
- else
- if self.components_look_ready?
- self.state = Ready
- else
- self.state = New
- end
- end
- elsif success_changed?
- if self.success
- self.active = false
- self.state = Complete
- else
- self.active = false
- self.state = Failed
- end
- elsif state_changed?
+ changed_attributes = self.changed
+
+ if 'state'.in? changed_attributes
case self.state
when New, Ready, Paused
- self.active = false
+ self.active = nil
self.success = nil
when RunningOnServer
self.active = true
@@ -178,7 +162,25 @@ class PipelineInstance < ArvadosModel
else
return false
end
- elsif components_changed?
+ elsif 'success'.in? changed_attributes
+ if self.success
+ self.active = false
+ self.state = Complete
+ else
+ self.active = false
+ self.state = Failed
+ end
+ elsif 'active'.in? changed_attributes
+ if self.active
+ self.state = RunningOnServer
+ else
+ if self.components_look_ready?
+ self.state = Ready
+ else
+ self.state = New
+ end
+ end
+ elsif 'components'.in? changed_attributes
if !self.state || self.state == New || !self.active
if self.components_look_ready?
self.state = Ready
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list