fluent-plugin-s3 1.3.4 → 1.4.0
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/.travis.yml +4 -6
- data/ChangeLog +5 -0
- data/Gemfile +0 -2
- data/README.md +1 -1
- data/VERSION +1 -1
- data/lib/fluent/plugin/in_s3.rb +1 -1
- data/lib/fluent/plugin/out_s3.rb +2 -12
- data/test/test_out_s3.rb +1 -8
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 592d53153cbf95a1134849af1fa27baf14f86f74a8af0e7737ec94a1317ca1a6
|
4
|
+
data.tar.gz: d2c0f9b0d40ae43f885c6840133621d0f9685340f1e8e74302934a19488b7d59
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a7ac8b2606ca7ab6506ed7bb467cbe63b720ec6a333f894772919dba348ceed70c4044a276d1df80e94c6cda583f6ddc7dfa7f8d3f36f5b0290f43303878eb1
|
7
|
+
data.tar.gz: '082ebb2c021a5dc38554ede86fe9179fdc666fdd1a427dee9c4a0a13f707c9f59eac3688574675549c8406172d3ad870dd243c15c3e7e19e93d2d099e31e0e72'
|
data/.travis.yml
CHANGED
@@ -1,11 +1,10 @@
|
|
1
1
|
language: ruby
|
2
2
|
|
3
3
|
rvm:
|
4
|
-
- 2.
|
5
|
-
- 2.
|
6
|
-
- 2.
|
7
|
-
- 2.
|
8
|
-
- 2.5.0
|
4
|
+
- 2.4
|
5
|
+
- 2.5
|
6
|
+
- 2.6
|
7
|
+
- 2.7
|
9
8
|
- ruby-head
|
10
9
|
|
11
10
|
gemfile:
|
@@ -14,7 +13,6 @@ gemfile:
|
|
14
13
|
branches:
|
15
14
|
only:
|
16
15
|
- master
|
17
|
-
- v0.12
|
18
16
|
|
19
17
|
before_install: gem update bundler
|
20
18
|
script: bundle exec rake test
|
data/ChangeLog
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -342,7 +342,7 @@ E.g., "logs/" in the example configuration above.
|
|
342
342
|
time-slice in text that are formatted with **time_slice_format**.
|
343
343
|
* %{index} is the sequential number starts from 0, increments when multiple files are uploaded to S3 in the same time slice.
|
344
344
|
* %{file_extension} depends on **store_as** parameter.
|
345
|
-
* %{uuid_flush} a uuid that is replaced everytime the buffer will be flushed.
|
345
|
+
* %{uuid_flush} a uuid that is replaced everytime the buffer will be flushed.
|
346
346
|
* %{hostname} is replaced with `Socket.gethostname` result.
|
347
347
|
* %{hex_random} a random hex string that is replaced for each buffer chunk, not
|
348
348
|
assured to be unique. This is used to follow a way of performance tuning, `Add
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.4.0
|
data/lib/fluent/plugin/in_s3.rb
CHANGED
@@ -192,7 +192,7 @@ module Fluent::Plugin
|
|
192
192
|
end
|
193
193
|
end
|
194
194
|
rescue => e
|
195
|
-
log.warn("SQS Polling Failed. Retry in #{@sqs.retry_error_interval} seconds")
|
195
|
+
log.warn("SQS Polling Failed. Retry in #{@sqs.retry_error_interval} seconds", error: e)
|
196
196
|
sleep(@sqs.retry_error_interval)
|
197
197
|
retry
|
198
198
|
end
|
data/lib/fluent/plugin/out_s3.rb
CHANGED
@@ -5,6 +5,7 @@ require 'aws-sdk-s3'
|
|
5
5
|
require 'zlib'
|
6
6
|
require 'time'
|
7
7
|
require 'tempfile'
|
8
|
+
require 'securerandom'
|
8
9
|
|
9
10
|
module Fluent::Plugin
|
10
11
|
class S3Output < Output
|
@@ -384,7 +385,7 @@ module Fluent::Plugin
|
|
384
385
|
end
|
385
386
|
|
386
387
|
def uuid_random
|
387
|
-
|
388
|
+
SecureRandom.uuid
|
388
389
|
end
|
389
390
|
|
390
391
|
# This is stolen from Fluentd
|
@@ -441,17 +442,6 @@ module Fluent::Plugin
|
|
441
442
|
}
|
442
443
|
|
443
444
|
if @s3_object_key_format.include?('%{uuid_flush}')
|
444
|
-
# test uuidtools works or not
|
445
|
-
begin
|
446
|
-
require 'uuidtools'
|
447
|
-
rescue LoadError
|
448
|
-
raise Fluent::ConfigError, "uuidtools gem not found. Install uuidtools gem first"
|
449
|
-
end
|
450
|
-
begin
|
451
|
-
uuid_random
|
452
|
-
rescue => e
|
453
|
-
raise Fluent::ConfigError, "Generating uuid doesn't work. Can't use %{uuid_flush} on this environment. #{e}"
|
454
|
-
end
|
455
445
|
@uuid_flush_enabled = true
|
456
446
|
end
|
457
447
|
|
data/test/test_out_s3.rb
CHANGED
@@ -9,7 +9,6 @@ require 'test/unit/rr'
|
|
9
9
|
require 'zlib'
|
10
10
|
require 'fileutils'
|
11
11
|
require 'timecop'
|
12
|
-
require 'uuidtools'
|
13
12
|
require 'ostruct'
|
14
13
|
|
15
14
|
include Fluent::Test::Helpers
|
@@ -349,17 +348,11 @@ EOC
|
|
349
348
|
|
350
349
|
def test_write_with_custom_s3_object_key_format_containing_uuid_flush_placeholder
|
351
350
|
|
352
|
-
begin
|
353
|
-
require 'uuidtools'
|
354
|
-
rescue LoadError
|
355
|
-
pend("uuidtools not found. skip this test")
|
356
|
-
end
|
357
|
-
|
358
351
|
# Partial mock the S3Bucket, not to make an actual connection to Amazon S3
|
359
352
|
setup_mocks(true)
|
360
353
|
|
361
354
|
uuid = "5755e23f-9b54-42d8-8818-2ea38c6f279e"
|
362
|
-
stub(::
|
355
|
+
stub(::SecureRandom).uuid{ uuid }
|
363
356
|
|
364
357
|
s3_local_file_path = "/tmp/s3-test.txt"
|
365
358
|
s3path = "log/events/ts=20110102-13/events_0-#{uuid}.gz"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-s3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sadayuki Furuhashi
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-
|
12
|
+
date: 2020-08-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: fluentd
|