Skip to content

Fix usage ping misreporting consolidated object storage settings

Stan Hu requested to merge sh-fix-usage-ping-consolidated-store into master

When consolidated object storage settings are in use, we internally modify Settings for all the object store types. However, Settingslogic currently assumes the data loaded from a YAML is fixed, so internally it stores data both as a Hash but also defines an accessor that wraps each key. This results in two different objects that store the same data. For example, with CI artifacts:

(byebug) Settings.artifacts.object_id
=> 233940
(byebug) Settings['artifacts'].object_id
=> 233960
(byebug) Settings['artifacts'].class
Hash
(byebug) Settings.artifacts.class
Settings

Our uploaders use the Settings.artifacts format, but the usage ping uses Settings['artifacts']. Both should be equivalent, so we make them consistent by having consolidated object storage parser assign both.

Relates to #212903 (comment 562162045)

Edited by Stan Hu

Merge request reports