X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/924f8f6c13c06afc8a83168929b249e0e8fa7d18..6d1c41d6fd83824669cd1a6d714ea6da1ae7ab4c:/services/api/app/models/arvados_model.rb diff --git a/services/api/app/models/arvados_model.rb b/services/api/app/models/arvados_model.rb index 9c03c03a60..d910320ec0 100644 --- a/services/api/app/models/arvados_model.rb +++ b/services/api/app/models/arvados_model.rb @@ -156,7 +156,7 @@ class ArvadosModel < ApplicationRecord end def self.searchable_columns operator - textonly_operator = !operator.match(/[<=>]/) + textonly_operator = !operator.match(/[<=>]/) && !operator.in?(['in', 'not in']) self.columns.select do |col| case col.type when :string, :text @@ -520,7 +520,6 @@ class ArvadosModel < ApplicationRecord end end - conn.exec_query 'SAVEPOINT save_with_unique_name' retry end end @@ -951,6 +950,10 @@ class ArvadosModel < ApplicationRecord # value in the database to an implicit zero/false value in an update # request. def fill_container_defaults + # Make sure this is correctly sorted by key, because we merge in + # whatever is in the database on top of it, this will be the order + # that gets used downstream rather than the order the keys appear + # in the database. self.runtime_constraints = { 'API' => false, 'cuda' => { @@ -958,6 +961,7 @@ class ArvadosModel < ApplicationRecord 'driver_version' => '', 'hardware_capability' => '', }, + 'keep_cache_disk' => 0, 'keep_cache_ram' => 0, 'ram' => 0, 'vcpus' => 0, @@ -966,6 +970,7 @@ class ArvadosModel < ApplicationRecord 'max_run_time' => 0, 'partitions' => [], 'preemptible' => false, + 'supervisor' => false, }.merge(attributes['scheduling_parameters'] || {}) end