gooddata 2.3.1-java → 2.3.3-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gdc-ii-config.yaml +1 -1
- data/.github/workflows/build.yml +10 -16
- data/.github/workflows/check-extended.yaml +245 -0
- data/.github/workflows/check.yaml +190 -0
- data/.github/workflows/gate.yaml +200 -0
- data/.github/workflows/pre-merge.yml +23 -54
- data/.travis.yml +0 -35
- data/CHANGELOG.md +6 -0
- data/Dockerfile +4 -10
- data/Dockerfile.jruby +14 -2
- data/DockerfileOldImage +88 -0
- data/SDK_VERSION +1 -1
- data/VERSION +1 -1
- data/bin/provision.sh +1 -1
- data/bin/release.sh +1 -1
- data/bin/rollout.sh +1 -1
- data/bin/user_filters.sh +1 -1
- data/bin/users.sh +1 -1
- data/ci/bigquery/pom.xml +1 -1
- data/ci/postgresql/pom.xml +1 -1
- data/ci/snowflake/pom.xml +11 -1
- data/gooddata.gemspec +27 -11
- data/lib/gooddata/cloud_resources/mssql/mssql_client.rb +2 -1
- data/lib/gooddata/cloud_resources/mysql/mysql_client.rb +2 -1
- data/lib/gooddata/cloud_resources/postgresql/postgresql_client.rb +2 -1
- data/lib/gooddata/cloud_resources/redshift/redshift_client.rb +2 -1
- data/lib/gooddata/cloud_resources/snowflake/snowflake_client.rb +58 -3
- data/lib/gooddata/helpers/global_helpers.rb +1 -1
- data/lib/gooddata/lcm/actions/import_object_collections.rb +23 -2
- data/lib/gooddata/lcm/actions/synchronize_clients.rb +31 -3
- data/lib/gooddata/lcm/actions/synchronize_dataset_mappings.rb +6 -2
- data/lib/gooddata/lcm/actions/synchronize_etls_in_segment.rb +3 -3
- data/lib/gooddata/lcm/actions/synchronize_user_filters.rb +5 -1
- data/lib/gooddata/lcm/lcm2.rb +4 -0
- data/lib/gooddata/models/domain.rb +16 -4
- data/lib/gooddata/models/metadata/label.rb +21 -4
- data/lib/gooddata/models/model.rb +1 -1
- data/lib/gooddata/models/project.rb +17 -2
- data/lib/gooddata/models/segment.rb +3 -2
- data/lib/gooddata/models/user_filters/user_filter_builder.rb +4 -3
- data/lib/gooddata/rest/client.rb +6 -1
- data/lib/gooddata/rest/connection.rb +20 -5
- metadata +185 -150
|
@@ -58,6 +58,8 @@ module GoodData
|
|
|
58
58
|
RETRYABLE_ERRORS = [
|
|
59
59
|
Net::HTTPBadResponse,
|
|
60
60
|
RestClient::InternalServerError,
|
|
61
|
+
RestClient::Exceptions::OpenTimeout,
|
|
62
|
+
RestClient::Exceptions::ReadTimeout,
|
|
61
63
|
RestClient::RequestTimeout,
|
|
62
64
|
RestClient::MethodNotAllowed,
|
|
63
65
|
SystemCallError,
|
|
@@ -65,7 +67,7 @@ module GoodData
|
|
|
65
67
|
]
|
|
66
68
|
|
|
67
69
|
RETRY_TIME_INITIAL_VALUE = 1
|
|
68
|
-
RETRY_TIME_COEFFICIENT =
|
|
70
|
+
RETRY_TIME_COEFFICIENT = 2
|
|
69
71
|
RETRYABLE_ERRORS << Net::ReadTimeout if Net.const_defined?(:ReadTimeout)
|
|
70
72
|
|
|
71
73
|
RETRYABLE_ERRORS << OpenSSL::SSL::SSLErrorWaitReadable if OpenSSL::SSL.const_defined?(:SSLErrorWaitReadable)
|
|
@@ -94,7 +96,7 @@ module GoodData
|
|
|
94
96
|
|
|
95
97
|
# Retry block if exception thrown
|
|
96
98
|
def retryable(options = {}, &_block)
|
|
97
|
-
opts = { :tries =>
|
|
99
|
+
opts = { :tries => 14, :on => RETRYABLE_ERRORS }.merge(options)
|
|
98
100
|
|
|
99
101
|
retry_exception = opts[:on]
|
|
100
102
|
retries = opts[:tries]
|
|
@@ -110,6 +112,7 @@ module GoodData
|
|
|
110
112
|
raise e unless options[:refresh_token]
|
|
111
113
|
raise e if options[:dont_reauth]
|
|
112
114
|
|
|
115
|
+
logging_retry_error(e, retry_time)
|
|
113
116
|
options[:refresh_token].call # (dont_reauth: true)
|
|
114
117
|
if (retries -= 1) > 0
|
|
115
118
|
retry
|
|
@@ -117,11 +120,17 @@ module GoodData
|
|
|
117
120
|
fail e
|
|
118
121
|
end
|
|
119
122
|
rescue RestClient::TooManyRequests, RestClient::ServiceUnavailable, *retry_exception => e
|
|
120
|
-
|
|
123
|
+
logging_retry_error(e, retry_time)
|
|
121
124
|
sleep retry_time
|
|
122
|
-
|
|
123
|
-
|
|
125
|
+
if OpenSSL::SSL.const_defined?(:SSLErrorWaitReadable) && e.is_a?(OpenSSL::SSL::SSLErrorWaitReadable)
|
|
126
|
+
GoodData.gd_logger.warn "Refresh token status=start retry_time=#{retry_time}. Error: #{e.message}"
|
|
127
|
+
options[:refresh_token].call # (dont_reauth: true)
|
|
128
|
+
GoodData.gd_logger.warn "Refresh token status=success retry_time=#{retry_time}. Error: #{e.message}"
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Total 10 retry requests with 1.5 coefficent should take ~ 2 mins to finish
|
|
124
132
|
if (retries -= 1) > 0
|
|
133
|
+
retry_time *= RETRY_TIME_COEFFICIENT
|
|
125
134
|
retry
|
|
126
135
|
else
|
|
127
136
|
fail e
|
|
@@ -129,6 +138,12 @@ module GoodData
|
|
|
129
138
|
end
|
|
130
139
|
yield
|
|
131
140
|
end
|
|
141
|
+
|
|
142
|
+
def logging_retry_error(e, retry_time)
|
|
143
|
+
error_message = "#{e.message}, retrying in #{retry_time} seconds"
|
|
144
|
+
GoodData.logger.warn error_message
|
|
145
|
+
GoodData.gd_logger.warn error_message
|
|
146
|
+
end
|
|
132
147
|
end
|
|
133
148
|
|
|
134
149
|
attr_reader :request_params
|