• Stan Hu's avatar
    Don't require a bucket if object storage is disabled for a type · 841b7057
    Stan Hu authored
    Previously if a user enabled consolidated settings then selectively
    disabled some object storage types, they were still required to set a
    bucket name for that object type. For example:
    
    1. Enable consolidated object storage
    (https://docs.gitlab.com/ee/administration/object_storage.html).
    
    2. Configure the artifacts object storage with the below:
    
    ```
    gitlab_rails['object_store']['objects']['artifacts']['enabled'] = false
    
    gitlab_rails['artifacts_enabled'] = true
    ```
    
    Reconfigure GitLab and you see this error:
    
    ```
    Object storage for artifacts must have a bucket specified
    ```
    
    Since the previous workaround would be to set a dummy bucket name, this
    change skips assigning consolidated settings if object storage has been
    disabled for a specific type.
    
    Relates to https://gitlab.com/gitlab-org/gitlab/-/issues/233826
    841b7057
object_store_settings_spec.rb 7.21 KB