Commit 47fe9772 authored by Kamil Trzciński's avatar Kamil Trzciński

Merge branch 'sh-enable-google-api-retries' into 'master'

Enable Google API retries for uploads

Closes #23452

See merge request gitlab-org/gitlab!18040
parents 5e21cc09 e818988f
---
title: Enable Google API retries for uploads
merge_request: 18040
author:
type: fixed
...@@ -10,6 +10,12 @@ ...@@ -10,6 +10,12 @@
# #
require 'google/apis/container_v1beta1' require 'google/apis/container_v1beta1'
require 'google/apis/options'
# As stated in https://github.com/googleapis/google-api-ruby-client#errors--retries,
# enabling retries is strongly encouraged but disabled by default. Large uploads
# that may hit timeouts will mainly benefit from this.
Google::Apis::RequestOptions.default.retries = 3 if Gitlab::Utils.to_boolean(ENV.fetch('ENABLE_GOOGLE_API_RETRIES', true))
Google::Apis::ContainerV1beta1::AddonsConfig::Representation.tap do |representation| Google::Apis::ContainerV1beta1::AddonsConfig::Representation.tap do |representation|
representation.hash :cloud_run_config, as: 'cloudRunConfig' representation.hash :cloud_run_config, as: 'cloudRunConfig'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment