fluent-plugin-bigquery 3.3.0 → 3.3.2
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 11737bd3e0d3110e5731f796488224debe573337dfde42b229f771510788f17a
|
4
|
+
data.tar.gz: 1f0978785f14d3da2d0e4ba10ee56cfe5cf33c00851259273e55b618beef344e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 140ed264e02efba0ccd507fc77d5c5b974a713d8fb77fb80231273f5255176426837297d47505de72a6d42a95830768bb5e0253dfea1c11c67491d8df55607df
|
7
|
+
data.tar.gz: 8e72baf896f7b9c8c0a66095b776b115335407c2075d9b2fbe0f80e37a06a0bbba788012da5ecf24bdda1b267a5cd8399e4d1ba27dbe3554801e3e2e839553a6
|
@@ -6,6 +6,7 @@ module Fluent
|
|
6
6
|
RETRYABLE_INSERT_ERRORS_REASON = %w(timeout backendError internalError rateLimitExceeded).freeze
|
7
7
|
RETRYABLE_STATUS_CODE = [500, 502, 503, 504]
|
8
8
|
REGION_NOT_WRITABLE_MESSAGE = -"is not writable in the region"
|
9
|
+
SSL_UNEXPECTED_EOF_MESSAGE = -"SSL_read: unexpected eof while reading"
|
9
10
|
|
10
11
|
class << self
|
11
12
|
# @param e [Google::Apis::Error]
|
@@ -20,7 +21,7 @@ module Fluent
|
|
20
21
|
|
21
22
|
# @param e [Google::Apis::Error]
|
22
23
|
def retryable_error?(e)
|
23
|
-
retryable_server_error?(e) || retryable_region_not_writable?(e)
|
24
|
+
retryable_server_error?(e) || retryable_region_not_writable?(e) || retryable_ssl_unexpected_eof?(e)
|
24
25
|
end
|
25
26
|
|
26
27
|
def retryable_server_error?(e)
|
@@ -39,6 +40,10 @@ module Fluent
|
|
39
40
|
e.is_a?(Google::Apis::ClientError) && e.status_code == 400 && e.message.include?(REGION_NOT_WRITABLE_MESSAGE)
|
40
41
|
end
|
41
42
|
|
43
|
+
def retryable_ssl_unexpected_eof?(e)
|
44
|
+
e.message.include?(SSL_UNEXPECTED_EOF_MESSAGE)
|
45
|
+
end
|
46
|
+
|
42
47
|
# Guard for instantiation
|
43
48
|
private :new
|
44
49
|
def inherited(subclass)
|
@@ -144,8 +144,8 @@ module Fluent
|
|
144
144
|
configuration.merge!({job_reference: {project_id: project, job_id: job_id}}) if job_id
|
145
145
|
|
146
146
|
begin
|
147
|
-
# Check table existance
|
148
|
-
client.get_table(project, dataset, table_id)
|
147
|
+
# Check table existance and use its location for the result when the load jobs is duplicated.
|
148
|
+
table = client.get_table(project, dataset, table_id)
|
149
149
|
rescue Google::Apis::ServerError, Google::Apis::ClientError, Google::Apis::AuthorizationError => e
|
150
150
|
if e.status_code == 404 && /Not Found: Table/i =~ e.message
|
151
151
|
raise Fluent::BigQuery::UnRetryableError.new("Table is not found") unless @options[:auto_create_table]
|
@@ -167,7 +167,9 @@ module Fluent
|
|
167
167
|
log.error "job.load API", project_id: project, dataset: dataset, table: table_id, code: e.status_code, message: e.message
|
168
168
|
|
169
169
|
if job_id && e.status_code == 409 && e.message =~ /Job/ # duplicate load job
|
170
|
-
|
170
|
+
# If a load job is duplicated, the API response may not be available to create the result.
|
171
|
+
# Therefore, we need to use the location of the table instead of the job's location to determine the result.
|
172
|
+
return JobReference.new(chunk_id, chunk_id_hex, project, dataset, table_id, job_id, table.location)
|
171
173
|
end
|
172
174
|
|
173
175
|
raise Fluent::BigQuery::Error.wrap(e)
|
metadata
CHANGED
@@ -1,15 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-bigquery
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.3.
|
4
|
+
version: 3.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Naoya Ito
|
8
8
|
- joker1007
|
9
|
-
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2025-05-26 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: rake
|
@@ -176,7 +175,6 @@ homepage: https://github.com/kaizenplatform/fluent-plugin-bigquery
|
|
176
175
|
licenses:
|
177
176
|
- Apache-2.0
|
178
177
|
metadata: {}
|
179
|
-
post_install_message:
|
180
178
|
rdoc_options: []
|
181
179
|
require_paths:
|
182
180
|
- lib
|
@@ -191,8 +189,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
191
189
|
- !ruby/object:Gem::Version
|
192
190
|
version: '0'
|
193
191
|
requirements: []
|
194
|
-
rubygems_version: 3.
|
195
|
-
signing_key:
|
192
|
+
rubygems_version: 3.6.2
|
196
193
|
specification_version: 4
|
197
194
|
summary: Fluentd plugin to store data on Google BigQuery
|
198
195
|
test_files:
|