[ARVADOS] updated: 1.1.4-323-g05f0008
Git user
git at public.curoverse.com
Fri May 25 16:06:31 EDT 2018
Summary of changes:
.licenseignore | 10 ++
AUTHORS | 1 +
apps/workbench/app/controllers/users_controller.rb | 9 +-
apps/workbench/app/models/user.rb | 41 +++++
apps/workbench/app/views/layouts/body.html.erb | 3 +-
apps/workbench/app/views/tests/mithril.html | 4 +
apps/workbench/app/views/users/inactive.html.erb | 5 +
.../app/views/users/link_account.html.erb | 112 ++++++++++++++
apps/workbench/config/routes.rb | 8 +-
.../test/integration/link_account_test.rb | 172 +++++++++++++++++++++
build/build.list | 4 +-
build/check-copyright-notices | 4 +-
build/run-build-packages.sh | 2 +-
doc/_config.yml | 2 +
doc/admin/migrating-providers.html.textile.liquid | 41 +++++
doc/css/images.css | 4 +
doc/user/topics/link-accounts.html.textile.liquid | 38 +++++
sdk/R/R/Arvados.R | 4 +
sdk/R/R/ArvadosFile.R | 4 +
sdk/R/R/Collection.R | 4 +
sdk/R/R/CollectionTree.R | 4 +
sdk/R/R/HttpParser.R | 4 +
sdk/R/R/HttpRequest.R | 4 +
sdk/R/R/RESTService.R | 36 +++--
sdk/R/R/Subcollection.R | 4 +
sdk/R/R/autoGenAPI.R | 4 +
sdk/R/R/util.R | 4 +
sdk/R/README.Rmd | 4 +
sdk/R/createDoc.R | 4 +
sdk/R/install_deps.R | 4 +
sdk/R/run_test.R | 4 +
sdk/R/tests/testthat.R | 4 +
sdk/R/tests/testthat/fakes/FakeArvados.R | 4 +
sdk/R/tests/testthat/fakes/FakeHttpParser.R | 4 +
sdk/R/tests/testthat/fakes/FakeHttpRequest.R | 8 +-
sdk/R/tests/testthat/fakes/FakeRESTService.R | 4 +
sdk/R/tests/testthat/test-ArvadosFile.R | 4 +
sdk/R/tests/testthat/test-Collection.R | 4 +
sdk/R/tests/testthat/test-CollectionTree.R | 4 +
sdk/R/tests/testthat/test-HttpParser.R | 4 +
sdk/R/tests/testthat/test-HttpRequest.R | 4 +
sdk/R/tests/testthat/test-RESTService.R | 4 +
sdk/R/tests/testthat/test-Subcollection.R | 4 +
sdk/R/tests/testthat/test-util.R | 4 +
sdk/cwl/arvados_cwl/arvtool.py | 1 +
sdk/cwl/setup.py | 2 +-
sdk/cwl/tests/12213-keepref-expr.cwl | 4 +
sdk/cwl/tests/12213-keepref-job.yml | 4 +
sdk/cwl/tests/12213-keepref-tool.cwl | 4 +
sdk/cwl/tests/12213-keepref-wf.cwl | 4 +
sdk/cwl/tests/12418-glob-empty-collection.cwl | 4 +
sdk/cwl/tests/secondary/ls.cwl | 4 +
sdk/cwl/tests/secondary/sub.cwl | 4 +
sdk/cwl/tests/secondary/wf-job.yml | 4 +
sdk/cwl/tests/secondary/wf.cwl | 4 +
sdk/cwl/tests/secondaryFiles/example1.cwl | 4 +
sdk/cwl/tests/secondaryFiles/example3.cwl | 4 +
sdk/cwl/tests/secondaryFiles/inp3.yml | 4 +
sdk/cwl/tests/secret_test_job.yml | 4 +
sdk/cwl/tests/test_job.py | 4 +-
sdk/cwl/tests/wf-defaults/default-dir1.cwl | 4 +
sdk/cwl/tests/wf-defaults/default-dir2.cwl | 4 +
sdk/cwl/tests/wf-defaults/default-dir3.cwl | 4 +
sdk/cwl/tests/wf-defaults/default-dir4.cwl | 4 +
sdk/cwl/tests/wf-defaults/default-dir5.cwl | 4 +
sdk/cwl/tests/wf-defaults/default-dir6.cwl | 4 +
sdk/cwl/tests/wf-defaults/default-dir6a.cwl | 4 +
sdk/cwl/tests/wf-defaults/default-dir7.cwl | 4 +
sdk/cwl/tests/wf-defaults/default-dir7a.cwl | 4 +
sdk/cwl/tests/wf-defaults/wf1.cwl | 4 +
sdk/cwl/tests/wf-defaults/wf2.cwl | 4 +
sdk/cwl/tests/wf-defaults/wf3.cwl | 4 +
sdk/cwl/tests/wf-defaults/wf4.cwl | 4 +
sdk/cwl/tests/wf-defaults/wf5.cwl | 4 +
sdk/cwl/tests/wf-defaults/wf6.cwl | 4 +
sdk/cwl/tests/wf-defaults/wf7.cwl | 4 +
sdk/cwl/tests/wf/check_mem.py | 4 +
sdk/cwl/tests/wf/echo-subwf.cwl | 4 +
sdk/cwl/tests/wf/echo-wf.cwl | 4 +
sdk/cwl/tests/wf/echo_a.cwl | 4 +
sdk/cwl/tests/wf/echo_b.cwl | 4 +
sdk/cwl/tests/wf/secret_job.cwl | 4 +
sdk/cwl/tests/wf/secret_wf.cwl | 4 +
sdk/go/arvados/fs_filehandle.go | 4 +
sdk/go/health/aggregator.go | 4 +
sdk/go/health/aggregator_test.go | 4 +
sdk/python/arvados/collection.py | 28 +++-
sdk/python/arvados/commands/put.py | 25 ++-
sdk/python/tests/test_arv_put.py | 17 ++
sdk/python/tests/test_collections.py | 16 +-
.../arvados/v1/containers_controller.rb | 9 +-
.../app/controllers/user_sessions_controller.rb | 2 +-
services/api/app/models/container.rb | 10 +-
services/api/app/models/container_request.rb | 21 ++-
services/api/app/models/user.rb | 2 +-
.../api/db/migrate/20170704160233_yaml_to_json.rb | 4 +
.../20170706141334_json_collection_properties.rb | 4 +
.../20171027183824_add_index_to_containers.rb | 4 +
.../20171208203841_fix_trash_flag_follow.rb | 4 +
...53352_add_gin_index_to_collection_properties.rb | 4 +
...180228220311_add_secret_mounts_to_containers.rb | 4 +
...80313180114_change_container_priority_bigint.rb | 4 +
...501182859_add_redirect_to_user_uuid_to_users.rb | 4 +
...20180514135529_add_container_auth_uuid_index.rb | 4 +
.../test/fixtures/api_client_authorizations.yml | 7 +
services/api/test/fixtures/users.yml | 34 ++++
.../api/test/integration/user_sessions_test.rb | 21 ++-
services/api/test/unit/container_request_test.rb | 24 +--
services/crunch-run/git_mount.go | 4 +
services/health/main.go | 4 +
services/keep-balance/main.go | 12 ++
services/keep-balance/usage.go | 8 +-
services/keep-web/webdav_test.go | 4 +
tools/arvbox/lib/arvbox/docker/runit/1 | 4 +
tools/arvbox/lib/arvbox/docker/runit/2 | 3 +
tools/arvbox/lib/arvbox/docker/runit/3 | 4 +
tools/arvbox/lib/arvbox/docker/runit/ctrlaltdel | 4 +
.../crunchstat_summary/synchronizer.js | 5 +-
118 files changed, 996 insertions(+), 75 deletions(-)
create mode 100644 apps/workbench/app/views/users/link_account.html.erb
create mode 100644 apps/workbench/test/integration/link_account_test.rb
create mode 100644 doc/admin/migrating-providers.html.textile.liquid
create mode 100644 doc/user/topics/link-accounts.html.textile.liquid
via 05f0008349efe56755c580e1e060115587aab352 (commit)
via 8afc85aabb9563da4de17b0b5f7d4fe574e9ad8d (commit)
via 3a7b90da8ac9b920d87eaf3a783b72c4bb94db14 (commit)
via ab3c608387378ef417fa620d85aebbb58a06f031 (commit)
via dfaa3a0ac7bdb11c074573c020b5bfeb75b8c9f9 (commit)
via c856e47c2a25dc6979ea07f2c3942687687c833a (commit)
via c0d0ff3208b27c7db879421053892b977ff7b0f1 (commit)
via 07e961b0d36fe51b967d271187b7c7fbc25d42b5 (commit)
via fc1fbeee43565bc2ce883ff387d56cd325a99b6f (commit)
via 215fe1cc2c7988b5267a6423dea559c9e85b15aa (commit)
via cc572d714646b424d70facff4feb6d36480e8f7c (commit)
via 02b02bfb39344eb28730646f645f1a335fcc6ae2 (commit)
via f6114b0f35638c3b5f96b3d87ec62f6b004cd6a7 (commit)
via 5cfb8182cd7af8cb022ef5f71ba66b7d625137e5 (commit)
via fe79aa4b3a889b6f91412f47af428a04e56dc3e4 (commit)
via 168bd197765f58b7f98fe7b2c448ae374a7b61dc (commit)
via 287d269fa0ea5740715bfa6d3e93b44bea3b8584 (commit)
via da7f8e2cfc9434f86bd7672aee5e3b3bcd513ba6 (commit)
via 51dfa2cac9daebe98da030bea84bfd64e70820fb (commit)
via 02f24a0c4a01a7ab46645c21630b9f48065b4b96 (commit)
via f0d40c15b43521997703ba081f8ebded80a6e948 (commit)
via 1471ad4b235e168ccee4fa351b0025b2b380d7ac (commit)
via 7f09dd101fd16830a6e7ebd6dee0df7aa023c9e6 (commit)
via 49bfee2a221bb050732935c240b981b7becd9aff (commit)
via e2632a25d3aab230bdc44936fa42a3d27ff15d30 (commit)
via bef433de900fbd0287f04cd21d615a6547f2fb76 (commit)
via 86138c185241b1a6c74dc83497293ef3e8abb6eb (commit)
via 6237a718e292de02dc06c2885e4a96260616ce03 (commit)
via 012677d2d3fb4571da4a48ea49eae156f28bf6af (commit)
via 076055cab16b637147d80f5bbc428434dd5b2497 (commit)
via 3f92c7068e94ee3a8f6bbe1907f2dd369c62cd7c (commit)
via 6e28c722b3662f6ea769487c47ec14398e805a82 (commit)
via 3b3794c7e0e026a6338165b9e171925e384e6502 (commit)
via 43b2200fd669c6eaa095c8adfd48462880aef551 (commit)
via 4aa2e9342254971e92b5836a56728015e9cfc714 (commit)
via 7046a30e466536a2e8c515b3d15f4f528c68ef7f (commit)
via 95c1923ae79a29bb8b6b9b4565b90fb95dbea363 (commit)
via cb913fbdfdf7a17fc01e28967281e03f371a4890 (commit)
via e5830f6744927c870a8c7a847c1b3400c373f646 (commit)
from 3950ffc9481c25262f2db2b08a0f74664c433734 (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 05f0008349efe56755c580e1e060115587aab352
Author: Lucas Di Pentima <ldipentima at veritasgenetics.com>
Date: Fri May 25 14:33:17 2018 -0300
7478: Scheduling parameters validation fixes.
* Set the preemptable parameter to child CRs by default separately from the
validations.
* Allow non-child CR to have the preemptable parameter set explicitly.
* Disallow the preemptable parameter when configuration is disabled.
* Updated tests.
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima at veritasgenetics.com>
diff --git a/services/api/app/models/container_request.rb b/services/api/app/models/container_request.rb
index 5c5a043..8f3f99e 100644
--- a/services/api/app/models/container_request.rb
+++ b/services/api/app/models/container_request.rb
@@ -28,11 +28,12 @@ class ContainerRequest < ArvadosModel
before_validation :fill_field_defaults, :if => :new_record?
before_validation :validate_runtime_constraints
- before_validation :validate_scheduling_parameters
before_validation :set_container
+ before_validation :set_default_preemptable_scheduling_parameter
validates :command, :container_image, :output_path, :cwd, :presence => true
validates :output_ttl, numericality: { only_integer: true, greater_than_or_equal_to: 0 }
validates :priority, numericality: { only_integer: true, greater_than_or_equal_to: 0, less_than_or_equal_to: 1000 }
+ validate :validate_scheduling_parameters
validate :validate_state_change
validate :check_update_whitelist
validate :secret_mounts_key_conflict
@@ -197,6 +198,16 @@ class ContainerRequest < ArvadosModel
end
end
+ def set_default_preemptable_scheduling_parameter
+ if self.state == Committed
+ # If preemptable instances (eg: AWS Spot Instances) are allowed,
+ # automatically ask them on non-child containers by default.
+ if Rails.configuration.preemptable_instances and !self.requesting_container_uuid.nil?
+ self.scheduling_parameters['preemptable'] ||= true
+ end
+ end
+ end
+
def validate_runtime_constraints
case self.state
when Committed
@@ -223,12 +234,8 @@ class ContainerRequest < ArvadosModel
scheduling_parameters['partitions'].size)
errors.add :scheduling_parameters, "partitions must be an array of strings"
end
- if !self.scheduling_parameters.include?('preemptable')
- if !self.requesting_container_uuid.nil? and Rails.configuration.preemptable_instances
- self.scheduling_parameters['preemptable'] = true
- end
- elsif scheduling_parameters['preemptable'] and self.requesting_container_uuid.nil?
- errors.add :scheduling_parameters, "only child containers can be preemptable"
+ if !Rails.configuration.preemptable_instances and scheduling_parameters['preemptable']
+ errors.add :scheduling_parameters, "preemptable instances are not allowed"
end
end
end
diff --git a/services/api/test/unit/container_request_test.rb b/services/api/test/unit/container_request_test.rb
index 5bca02a..6f76218 100644
--- a/services/api/test/unit/container_request_test.rb
+++ b/services/api/test/unit/container_request_test.rb
@@ -758,31 +758,23 @@ class ContainerRequestTest < ActiveSupport::TestCase
end
[
- [{"preemptable" => true}, nil, ActiveRecord::RecordInvalid],
- [{"preemptable" => false}, nil, nil],
- [{"preemptable" => true}, 'zzzzz-dz642-runningcontainr', nil],
- [{"preemptable" => false}, 'zzzzz-dz642-runningcontainr', nil],
- ].each do |sp, requesting_c, expected|
- test "create container request with scheduling_parameters #{sp} with requesting_container_uuid=#{requesting_c} and verify #{expected}" do
+ [false, ActiveRecord::RecordInvalid],
+ [true, nil],
+ ].each do |preemptable_conf, expected|
+ test "having Rails.configuration.preemptable_instances=#{preemptable_conf}, create preemptable container request and verify #{expected}" do
+ sp = {"preemptable" => true}
common_attrs = {cwd: "test",
priority: 1,
command: ["echo", "hello"],
output_path: "test",
scheduling_parameters: sp,
mounts: {"test" => {"kind" => "json"}}}
-
+ Rails.configuration.preemptable_instances = preemptable_conf
set_user_from_auth :active
- if requesting_c
- cr = with_container_auth(Container.find_by_uuid requesting_c) do
- create_minimal_req!(common_attrs)
- end
- assert_not_nil cr.requesting_container_uuid
- else
- cr = create_minimal_req!(common_attrs)
- end
-
+ cr = create_minimal_req!(common_attrs)
cr.state = ContainerRequest::Committed
+
if !expected.nil?
assert_raises(expected) do
cr.save!
commit 8afc85aabb9563da4de17b0b5f7d4fe574e9ad8d
Merge: 3950ffc 3a7b90d
Author: Lucas Di Pentima <ldipentima at veritasgenetics.com>
Date: Fri May 25 12:42:25 2018 -0300
Merge branch 'master' into 7478-anm-spot-instances
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima at veritasgenetics.com>
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list