fluent-plugin-s3 1.8.0 → 1.8.2

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: 8c72b8fcce805d79141dededa99e19fe802a27b169f4f39b6f842dfc2829daab
4
- data.tar.gz: eb62e090ec39010bf6f2598c827d875ae0032dccc14b71607dcd92fa80082d0e
3
+ metadata.gz: 217eb830b5223b315c3315bfe2eaa0e9ad177ad8b4f9fc90b0575ac6bd30dcfc
4
+ data.tar.gz: 77895d2eca5be5449db57d5a8d69e87b7b1e3da8cbee5bdffe2f0afa56d4fcb6
5
5
  SHA512:
6
- metadata.gz: 53e0911c336861aa4dddb73e9f0f5f58fa78d8d8434a217e55f2532fbb264c7ec7e894cc9f1cfd1abc0452f065954099658420bf435dd5bfe7a8a402ecab0e25
7
- data.tar.gz: 3916876756d629413c80a6a24f428ff6a453e284a235d0805853b4b01b7bfb6f7866426342c5a598d00a53fe3ee2daf46ac90f4ba04577f762bc3fbabfef1e7f
6
+ metadata.gz: 04557ccde6e3d9f3a2d3ab4a5cc8c87b7d1dedddc09baa858239be4d59d071b5b4afb43f5cf685c936d09a13208d916683fc298beb89f168f44fdad30a456f8a
7
+ data.tar.gz: bcc7742d25f8c7f2108ad77753fb5b864f8fb0d644ad0d832a6fe26143b5b938bd03436695c43181b7b66d0f538421454f87e87fa73aa3c4907fd86979aa6b01
data/ChangeLog CHANGED
@@ -1,3 +1,12 @@
1
+ Release 1.8.2 - 2024/12/18
2
+
3
+ * out_s3: Add more logging to identify unexpected error of Tempfile#close.
4
+ * out_s3: Support `checksum_algorithm` parameter to validate the data with checksum (CRC32, CRC32C, SHA1 and SHA256) during upload/download.
5
+
6
+ Release 1.8.1 - 2024/11/15
7
+
8
+ * dependency: Change zstd-ruby dependency optional. Install zstd-ruby manually if you want to enable Zstd compression feature.
9
+
1
10
  Release 1.8.0 - 2024/11/06
2
11
 
3
12
  * out_s3: Add zstd compression support
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.8.0
1
+ 1.8.2
data/docs/output.md CHANGED
@@ -430,6 +430,18 @@ Specifies the AWS KMS key ID to use for object encryption.
430
430
 
431
431
  Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
432
432
 
433
+ ## checksum_algorithm
434
+
435
+ AWS allows to calculate the integrity checksum server side. The additional checksum is
436
+ used to validate the data during upload or download. The following 4 SHA and CRC algorithms are supported:
437
+
438
+ * CRC32
439
+ * CRC32C
440
+ * SHA1
441
+ * SHA256
442
+
443
+ For more info refer to [object integrity](https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html).
444
+
433
445
  ## compute_checksums
434
446
 
435
447
  AWS SDK uses MD5 for API request/response by default. On FIPS enabled environment,
@@ -19,7 +19,6 @@ Gem::Specification.new do |gem|
19
19
  gem.add_dependency "fluentd", [">= 0.14.22", "< 2"]
20
20
  gem.add_dependency "aws-sdk-s3", "~> 1.60"
21
21
  gem.add_dependency "aws-sdk-sqs", "~> 1.23"
22
- gem.add_dependency 'zstd-ruby'
23
22
  gem.add_development_dependency "rake", ">= 0.9.2"
24
23
  gem.add_development_dependency "test-unit", ">= 3.0.8"
25
24
  gem.add_development_dependency "test-unit-rr", ">= 1.0.3"
@@ -27,4 +26,5 @@ Gem::Specification.new do |gem|
27
26
  # aws-sdk-core requires one of ox, oga, libxml, nokogiri or rexml,
28
27
  # and rexml is no longer default gem as of Ruby 3.0.
29
28
  gem.add_development_dependency "rexml"
29
+ gem.add_development_dependency "zstd-ruby"
30
30
  end
@@ -154,6 +154,8 @@ module Fluent::Plugin
154
154
  desc "Arbitrary S3 tag-set for the object"
155
155
  config_param :tagging, :string, default: nil
156
156
  desc "Arbitrary S3 metadata headers to set for the object"
157
+ config_param :checksum_algorithm, :string, default: nil
158
+ desc "Indicates the algorithm you want Amazon S3 to use to create the checksum for the object (CRC32,CRC32C,SHA1,SHA256)"
157
159
  config_param :s3_metadata, :hash, default: nil
158
160
  config_section :bucket_lifecycle_rule, param_name: :bucket_lifecycle_rules, multi: true do
159
161
  desc "A unique ID for this rule"
@@ -368,6 +370,7 @@ module Fluent::Plugin
368
370
  put_options[:grant_read] = @grant_read if @grant_read
369
371
  put_options[:grant_read_acp] = @grant_read_acp if @grant_read_acp
370
372
  put_options[:grant_write_acp] = @grant_write_acp if @grant_write_acp
373
+ put_options[:checksum_algorithm] = @checksum_algorithm if @checksum_algorithm
371
374
  put_options[:tagging] = @tagging if @tagging
372
375
 
373
376
  if @s3_metadata
@@ -378,6 +381,8 @@ module Fluent::Plugin
378
381
  end
379
382
  @bucket.object(s3path).put(put_options)
380
383
 
384
+ log.debug "out_s3: completed to write chunk #{dump_unique_id_hex(chunk.unique_id)} with metadata #{chunk.metadata} to s3://#{@s3_bucket}/#{s3path}"
385
+
381
386
  @values_for_s3_object_chunk.delete(chunk.unique_id)
382
387
 
383
388
  if @warn_for_delay
@@ -386,7 +391,11 @@ module Fluent::Plugin
386
391
  end
387
392
  end
388
393
  ensure
389
- tmp.close(true) rescue nil
394
+ begin
395
+ tmp.close(true)
396
+ rescue => e
397
+ log.info "out_s3: Tempfile#close caused unexpected error", error: e
398
+ end
390
399
  end
391
400
  end
392
401
 
@@ -1,5 +1,3 @@
1
- require 'zstd-ruby'
2
-
3
1
  module Fluent::Plugin
4
2
  class S3Output
5
3
  class ZstdCompressor < Compressor
@@ -10,6 +8,14 @@ module Fluent::Plugin
10
8
  config_param :level, :integer, default: 3
11
9
  end
12
10
 
11
+ def initialize(opts = {})
12
+ super
13
+ require 'zstd-ruby'
14
+ rescue LoadError => e
15
+ log.error "failed to load zstd-ruby gem. You need to manually install 'zstd-ruby' gem to use 'zstd'.", error: e.message
16
+ raise Fluent::ConfigError, "failed to load 'zstd-ruby' gem"
17
+ end
18
+
13
19
  def ext
14
20
  'zst'.freeze
15
21
  end
@@ -27,4 +33,4 @@ module Fluent::Plugin
27
33
  end
28
34
  end
29
35
  end
30
- end
36
+ end
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.8.0
4
+ version: 1.8.2
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: 2024-11-13 00:00:00.000000000 Z
12
+ date: 2024-12-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fluentd
@@ -59,20 +59,6 @@ dependencies:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: '1.23'
62
- - !ruby/object:Gem::Dependency
63
- name: zstd-ruby
64
- requirement: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
- type: :runtime
70
- prerelease: false
71
- version_requirements: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: '0'
76
62
  - !ruby/object:Gem::Dependency
77
63
  name: rake
78
64
  requirement: !ruby/object:Gem::Requirement
@@ -143,6 +129,20 @@ dependencies:
143
129
  - - ">="
144
130
  - !ruby/object:Gem::Version
145
131
  version: '0'
132
+ - !ruby/object:Gem::Dependency
133
+ name: zstd-ruby
134
+ requirement: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ type: :development
140
+ prerelease: false
141
+ version_requirements: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
146
  description: Amazon S3 output plugin for Fluentd event collector
147
147
  email: frsyuki@gmail.com
148
148
  executables: []