1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: AGPL-3.0
5 def diff_hash base, final
16 if bk.to_yaml != fk.to_yaml
25 desc 'Print items that differ between legacy application.yml and system config.yml'
26 task diff: :environment do
27 diffed = diff_hash $arvados_config_global, $arvados_config
28 cfg = { "Clusters" => {}}
29 cfg["Clusters"][$arvados_config["ClusterID"]] = diffed.select {|k,v| k != "ClusterID"}
30 if cfg["Clusters"][$arvados_config["ClusterID"]].empty?
31 puts "No migrations required for /etc/arvados/config.yml"
37 desc 'Print config.yml after merging with legacy application.yml'
38 task migrate: :environment do
39 diffed = diff_hash $arvados_config_defaults, $arvados_config
40 cfg = { "Clusters" => {}}
41 cfg["Clusters"][$arvados_config["ClusterID"]] = diffed.select {|k,v| k != "ClusterID"}
45 desc 'Print configuration as accessed through Rails.configuration'
46 task dump: :environment do
47 combined = $arvados_config.deep_dup
48 combined.update $remaining_config
52 desc 'Legacy config check task -- it is a noop now'
53 task check: :environment do
54 # This exists so that build/rails-package-scripts/postinst.sh doesn't fail.