Fix #4954: BigQuery exports not updating.

Fix BigQuery export jobs failing with:

    Google::Cloud::InvalidArgumentError: required: Bucket is requester pays
    bucket but no user project provided.

Caused by changing the storage bucket to requester pays. The
`user_project` param must be set to true on requester pays buckets to
bill usage to the current project.
This commit is contained in:
evazion
2022-01-14 00:12:20 -06:00
parent ba29794e89
commit fe18e37566

View File

@@ -96,7 +96,7 @@ class BigqueryExportService
# Find or create the Google Storage bucket.
def bucket
storage.bucket(dataset_name) || storage.create_bucket(dataset_name, acl: "public", default_acl: "public", storage_class: "standard", location: "us-east1")
storage.bucket(dataset_name, user_project: true) || storage.create_bucket(dataset_name, acl: "public", default_acl: "public", storage_class: "standard", location: "us-east1", requester_pays: true, user_project: true)
end
# The BigQuery API client.