Commit f82bed31 authored by Mikołaj Wawrzyniak's avatar Mikołaj Wawrzyniak

Merge branch 'mwaw/add_aliases_to_aggregated_metrics_configs' into 'master'

Aggreagated Metrics add YAML anchors and aliases

See merge request gitlab-org/gitlab!53726
parents b2288f7c e0769dde
......@@ -148,7 +148,7 @@ module Gitlab
end
def load_yaml_from_path(path)
YAML.safe_load(File.read(path))&.map(&:with_indifferent_access)
YAML.safe_load(File.read(path), aliases: true)&.map(&:with_indifferent_access)
end
end
end
......
......@@ -222,6 +222,12 @@ RSpec.describe Gitlab::Usage::Metrics::Aggregates::Aggregate, :clean_gitlab_redi
end
end
it 'allows for YAML aliases in aggregated metrics configs' do
expect(YAML).to receive(:safe_load).with(kind_of(String), aliases: true)
described_class.new(recorded_at)
end
describe '.aggregated_metrics_weekly_data' do
subject(:aggregated_metrics_data) { described_class.new(recorded_at).weekly_data }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment