lib/configgin.rb in configgin-0.18.7 vs lib/configgin.rb in configgin-0.18.8
- old
+ new
@@ -124,15 +124,15 @@
# Given the active jobs, and a hash of the expected annotations for each,
# return the annotations we expect to be on each pod based on what properties
# each job imports.
def expected_annotations(job_configs, job_digests)
instance_groups_to_examine = Hash.new { |h, k| h[k] = {} }
- job_configs.values.each do |job_config|
+ job_configs.each_pair do |job_name, job_config|
base_config = JSON.parse(File.read(job_config['base']))
- base_config.fetch('consumed_by', {}).each_pair do |provider_name, consumer_jobs|
+ base_config.fetch('consumed_by', {}).values.each do |consumer_jobs|
consumer_jobs.each do |consumer_job|
- digest_key = "skiff-in-props-#{instance_group}-#{provider_name}"
- instance_groups_to_examine[consumer_job['role']][digest_key] = job_digests[provider_name]
+ digest_key = "skiff-in-props-#{instance_group}-#{job_name}"
+ instance_groups_to_examine[consumer_job['role']][digest_key] = job_digests[job_name]
end
end
end
instance_groups_to_examine
end