• Stan Hu's avatar
    Backup: Disable setting of ACL for Google uploads · 2efc0cc7
    Stan Hu authored
    Google Cloud Storage supports two types of access controls:
    
    1. Uniform bucket level access
    1. Fine-grained bucket level access
    
    When Google uniform bucket uniform bucket access is enabled, uploading a
    backup via object storage results in the error:
    
    ```
    Google::Apis::ClientError (invalid: Cannot use ACL API to set object
    policy when object policies are disabled.)
    ```
    
    This happened because previously the backup manager passed in `public:
    false`, which would cause fog-google to attempt to set the ACL of the
    object to `privateProject`. This must be omitted when uniform
    bucket-only policy is used. This is also the default level when
    fine-grained bucket level access is used, so specifying the ACL doesn't
    add anything.
    
    This mirrors what we did with
    https://gitlab.com/gitlab-org/gitlab-foss/merge_requests/26781.
    
    Closes https://gitlab.com/gitlab-org/gitlab/issues/35662
    2efc0cc7
manager_spec.rb 11.7 KB