Skip to content

Fix consolidated storage settings

Stan Hu requested to merge sh-fix-consolidated-storage into master

!52750 (merged) broke consolidated storage settings because it was scanning storage-specific settings. For example, let's say you had:

object_store:
    enabled: true
    objects:
        artifacts:
            enabled: false

artifacts:
    enabled: true

In 1_settings.rb, ObjectStoreSettings#legacy_parse! will automatically add default object_store settings to the storage-specific settings:

artifacts:
    enabled: true
    object_store:
        enabled: false
        ...

As seen above, artifacts.object_store.enabled defaults to false, so the check introduced in !52750 (merged) would mean that object storage would never be enabled unless storage-specific settings were also enabled.

The right fix: skip parsing of consolidated settings only if the object type has explicitly disabled it in the consolidated settings. In the example above, this means we check the parameter in object_store.objects.artifacts.enabled, which overrides the default consolidated settings.

This should fix #233826 (closed).

Edited by Stan Hu

Merge request reports

Loading