[ARVADOS] created: 1.1.4-497-gb3f6c1442
Git user
git at public.curoverse.com
Wed Jun 20 19:27:40 EDT 2018
at b3f6c144210aa3ff4d19eb2b121aae1bb4bda556 (commit)
commit b3f6c144210aa3ff4d19eb2b121aae1bb4bda556
Author: Lucas Di Pentima <ldipentima at veritasgenetics.com>
Date: Wed Jun 20 20:12:56 2018 -0300
13649: New test that shows the bug.
When submitting a child container request with state=Committed, the
'set_container' callback is executed before the 'set_requesting_container_uuid'
and 'set_default_preemptible_scheduling_parameter' callbacks, so at that
point, the scheduling parameters being copied to its container don't
include the 'preemptible' parameter.
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima at veritasgenetics.com>
diff --git a/services/api/test/unit/container_request_test.rb b/services/api/test/unit/container_request_test.rb
index 0a21e15ec..fc872e1d0 100644
--- a/services/api/test/unit/container_request_test.rb
+++ b/services/api/test/unit/container_request_test.rb
@@ -900,6 +900,25 @@ class ContainerRequestTest < ActiveSupport::TestCase
end
end
+ test "Having preemptible_instances=true create a committed child container request and verify the scheduling parameter of its container" do
+ common_attrs = {cwd: "test",
+ priority: 1,
+ command: ["echo", "hello"],
+ output_path: "test",
+ state: ContainerRequest::Committed,
+ mounts: {"test" => {"kind" => "json"}}}
+ set_user_from_auth :active
+ Rails.configuration.preemptible_instances = true
+
+ cr = with_container_auth(Container.find_by_uuid 'zzzzz-dz642-runningcontainr') do
+ create_minimal_req!(common_attrs)
+ end
+ assert_equal true, cr.scheduling_parameters["preemptible"]
+
+ c = Container.find_by_uuid(cr.container_uuid)
+ assert_equal true, c.scheduling_parameters["preemptible"]
+ end
+
[['Committed', true, {name: "foobar", priority: 123}],
['Committed', false, {container_count: 2}],
['Committed', false, {container_count: 0}],
commit 35486672118d2d1e95e48e8b4b686e3e8a19a067
Merge: a200bee21 29e80f471
Author: Lucas Di Pentima <ldipentima at veritasgenetics.com>
Date: Wed Jun 20 20:09:02 2018 -0300
Merge branch '7478-auto-preemptible-cr-fix' into 13649-cds-preemptible-sbatch
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