• Stan Hu's avatar
    Fix usage ping misreporting consolidated object storage settings · 9863ad25
    Stan Hu authored
    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
    https://gitlab.com/gitlab-org/gitlab/-/issues/212903#note_562162045
    
    Changelog: fixed
    9863ad25
sh-fix-usage-ping-consolidated-store.yml 117 Bytes