fluent-plugin-s3 1.3.4 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ebfd58f8ceb4878fc504cf04a829a7434b28fb872a58da0335178d37752d9b1e
4
- data.tar.gz: d1623ee5f6e82fa2739e2ff5acde34d3e5aa52e38ac870fde997db738f27e508
3
+ metadata.gz: 592d53153cbf95a1134849af1fa27baf14f86f74a8af0e7737ec94a1317ca1a6
4
+ data.tar.gz: d2c0f9b0d40ae43f885c6840133621d0f9685340f1e8e74302934a19488b7d59
5
5
  SHA512:
6
- metadata.gz: bd8dee9e930f7f70ac130945ce77a1cdaffb5169fb0ca8711cb98eda1ddc6af2ab4bc8b1fb15490cfbec9dbf0e176528b58eb3aec8fc613050d8c135fde299fe
7
- data.tar.gz: 499828ad8c8197235e3d8ee426f265e33f69e0cc65ae4a643cc5a01ff0bc9546f56006fbb339d61d06c6f641f43f94a4494c519ad8378fe155edab1f6fd0a083
6
+ metadata.gz: 2a7ac8b2606ca7ab6506ed7bb467cbe63b720ec6a333f894772919dba348ceed70c4044a276d1df80e94c6cda583f6ddc7dfa7f8d3f36f5b0290f43303878eb1
7
+ data.tar.gz: '082ebb2c021a5dc38554ede86fe9179fdc666fdd1a427dee9c4a0a13f707c9f59eac3688574675549c8406172d3ad870dd243c15c3e7e19e93d2d099e31e0e72'
@@ -1,11 +1,10 @@
1
1
  language: ruby
2
2
 
3
3
  rvm:
4
- - 2.1.10
5
- - 2.2.9
6
- - 2.3.6
7
- - 2.4.3
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
@@ -1,3 +1,8 @@
1
+ Release 1.4.0 - 2020/08/02
2
+
3
+ * Remove uuidtools dependency
4
+ * in_s3: Add error info to polloing retry log
5
+
1
6
  Release 1.3.4 - 2020/07/07
2
7
 
3
8
  * Add sts_http_proxy and sts_endpoint_url to assume_role_credentials
data/Gemfile CHANGED
@@ -1,5 +1,3 @@
1
1
  source "http://rubygems.org"
2
2
 
3
- gem 'uuidtools'
4
-
5
3
  gemspec
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. If you want to use this placeholder, install `uuidtools` gem first.
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.3.4
1
+ 1.4.0
@@ -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
@@ -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
- ::UUIDTools::UUID.random_create.to_s
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
 
@@ -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(::UUIDTools::UUID).random_create{ uuid }
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.3.4
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-07-07 00:00:00.000000000 Z
12
+ date: 2020-08-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fluentd