[ActiveStorage] Feature proposal: support passing `user_project` argument to GCS bucket to support GCS buckets with "Requester pays" enabled

GCS has an option on buckets to make them a “Requester Pays” type of bucket: Requester Pays  |  Cloud Storage  |  Google Cloud. In short, this allows tracing of who/what is actually requesting an upload/download to be able to allocate the costs to the project used.

To query a bucket where “requester pays” is enabled, the userProject needs to be added in the URL. The GCS Ruby library provides this as an optional user_project keyword argument to Project#bucket: google-cloud-ruby/google-cloud-storage/lib/google/cloud/storage/project.rb at google-cloud-storage/v1.11.0 · googleapis/google-cloud-ruby · GitHub (took v1.11 explicitly here as this is the current version requirement on Rails.)

When this is not passed, an error is thrown when listing/uploading files in a requester-pays bucket: Bucket is a requester pays bucket but no user project provided. (Google::Cloud::InvalidArgumentError)

This feature would add support for “requester pays”-buckets by accepting a user_project parameter (defaults to nil) on the GCS service bucket call (rails/activestorage/lib/active_storage/service/gcs_service.rb at cd31b164b1975abfe6adb9af8e0edc8bea7ce1b0 · rails/rails · GitHub), set by a variable in the config config.fetch(:user_project, nil) .

MR with changes, a test and documentation created in: Support passing `user_project` argument to GCS bucket to support GCS buckets with “Requester pays” enabled by TomNaessens · Pull Request #51869 · rails/rails · GitHub