18562: Auto-enable preemptible when changing state to Committed.
authorTom Clegg <tom@curii.com>
Thu, 23 Dec 2021 15:54:07 +0000 (10:54 -0500)
committerTom Clegg <tom@curii.com>
Thu, 23 Dec 2021 15:54:07 +0000 (10:54 -0500)
commit534b7df510b99923a7dc273a2f8cacfd0c599800
tree3299b64a752554f48114f8b7b2f361779f9f8af0
parent63b40a5af92aef28d8416c945ffc7c9805ae8d7d
18562: Auto-enable preemptible when changing state to Committed.

(As opposed to during any update.)

Avoids a situation where a client creates a child CR with
preemptible=false, preemptible is automatically changed to true, but
then preemptible instances are removed from config, and the client
cannot change the CR state to committed without also explicitly
clearing the preemptible flag, because the automatically-enabled
preemptible flag is not allowed.

Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom@curii.com>
services/api/app/models/container_request.rb
services/api/test/unit/container_request_test.rb