fluent-plugin-sql 2.3.3 → 2.3.4

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: 197db6803c87ca64448c432656a89d879f8e465258928e697d487ad16fd462b6
4
- data.tar.gz: 89a4f1866a939aaec3122ba8259f4d9a74d851175743c117984ab2e29cc757bf
3
+ metadata.gz: abe6a6b14d3e4b6c1bb04c4e0bba54171e184d2430c316fed94ffb820b79c326
4
+ data.tar.gz: d8fcfa403f2ea3fcb1532b705b20988fc5a3e070caca34d1eb994a93e9ce7425
5
5
  SHA512:
6
- metadata.gz: b22a4fefd2608b511a17247e92ee07ef475a570c9f1b17e713156ced301b69d51ff994d2e2ed39832134241227fa24fd381fe792b97ccf38cf212ccc01d9f9b4
7
- data.tar.gz: 00eae6b85e603667715d5ddd72f788dd1c8614cd8b0cb5c31d7d515cdba8f2aec3d84b39f12c8c6a6e65951c42c6d13189be54129a8d1022d0b333165c87ee8d
6
+ metadata.gz: 7eed503b24afef6dce07661a79065a6523be4a2ea9a158d5e5f442af387a3d3b2f7fbdb217dd4f6c720569724f9688e170a3fc5ac1ce49a12170037d8ecdfdb4
7
+ data.tar.gz: dcbb1e763664f1dad9d78df5e3546e48cfe659840ab02d1f30edd479265e18f92fbd757f63ddb96c56b546f7fbba32c319fcb635fec6c37bff807f56fa1d0291
@@ -4,3 +4,20 @@ updates:
4
4
  directory: '/'
5
5
  schedule:
6
6
  interval: 'monthly'
7
+ groups:
8
+ # PR: "Security update [package] from [old] to [new]"
9
+ # This PR should be merged in hurry
10
+ security-updates:
11
+ applies-to: security-updates
12
+ patterns:
13
+ - '*'
14
+
15
+ # PR: "Bump [package] from [old] to [new]"
16
+ # No need to be merged this PR in hurry. It is enough to merge
17
+ # once in a month.
18
+ monthly-updates:
19
+ applies-to: version-updates
20
+ patterns:
21
+ - '*'
22
+ # Allow to create PR both of security and normal updates.
23
+ open-pull-requests-limit: 1
@@ -30,8 +30,8 @@ jobs:
30
30
  --health-retries 5
31
31
  name: Ruby ${{ matrix.ruby }} with PostgreSQL ${{ matrix.postgres }} unit testing on ${{ matrix.os }}
32
32
  steps:
33
- - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
34
- - uses: ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f # v1.306.0
33
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
34
+ - uses: ruby/setup-ruby@145243922b4465b78e04dd66294782c7de45901f # v1.345.0
35
35
  with:
36
36
  ruby-version: ${{ matrix.ruby }}
37
37
  bundler-cache: true
@@ -11,7 +11,7 @@ jobs:
11
11
  uses: ruby/actions/.github/workflows/ruby_versions.yml@master
12
12
  with:
13
13
  engine: cruby
14
- min_version: 2.7
14
+ min_version: 3.2
15
15
  build:
16
16
  needs: ruby-versions
17
17
  runs-on: ${{ matrix.os }}
@@ -40,8 +40,8 @@ jobs:
40
40
  --health-retries 5
41
41
  name: Ruby ${{ matrix.ruby }} with PostgreSQL ${{ matrix.postgres }} unit testing on ${{ matrix.os }}
42
42
  steps:
43
- - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
44
- - uses: ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f # v1.306.0
43
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
44
+ - uses: ruby/setup-ruby@145243922b4465b78e04dd66294782c7de45901f # v1.345.0
45
45
  with:
46
46
  ruby-version: ${{ matrix.ruby }}
47
47
  bundler-cache: true
data/ChangeLog CHANGED
@@ -1,3 +1,9 @@
1
+ Release 2.3.4 - 2026/12/04
2
+
3
+ * out_sql: Use the json gem instead of yajl-ruby (#174)
4
+ * in_sql: Fix NoMethodError in shutdown when the plugin did not start (#176)
5
+ * in_sql: Fix crash on startup with `all_tables true` (#178)
6
+
1
7
  Release 2.3.3 - 2026/05/18
2
8
 
3
9
  * out_sql: fix unmapped columns being explicitly set to NULL on INSERT (#169)
data/Gemfile CHANGED
@@ -1,2 +1,2 @@
1
- source "http://rubygems.org"
1
+ source "https://rubygems.org"
2
2
  gemspec
data/Gemfile.v0.12 CHANGED
@@ -1,4 +1,4 @@
1
- source "http://rubygems.org"
1
+ source "https://rubygems.org"
2
2
 
3
3
  gem 'json', '= 1.8.6'
4
4
  gem 'fluentd', '~> 0.12.0'
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.3.3
1
+ 2.3.4
@@ -219,11 +219,10 @@ module Fluent::Plugin
219
219
  nil
220
220
  else
221
221
  te = TableElement.new
222
- te.configure({
222
+ te.configure(Fluent::Config::Element.new('table', '', {
223
223
  'table' => table_name,
224
224
  'tag' => table_name,
225
- 'update_column' => nil,
226
- })
225
+ }, []))
227
226
  te
228
227
  end
229
228
  end.compact
@@ -248,8 +247,10 @@ module Fluent::Plugin
248
247
 
249
248
  def shutdown
250
249
  @stop_flag = true
251
- $log.debug "Waiting for thread to finish"
252
- @thread.join
250
+ if @thread
251
+ $log.debug "Waiting for thread to finish"
252
+ @thread.join
253
+ end
253
254
  end
254
255
 
255
256
  def thread_main
@@ -99,7 +99,7 @@ module Fluent::Plugin
99
99
  columns |= new_record.keys
100
100
  records << @model.new(new_record)
101
101
  rescue => e
102
- args = {error: e, table: @table, record: Yajl.dump(data)}
102
+ args = {error: e, table: @table, record: JSON.generate(data)}
103
103
  @log.warn "Failed to create the model. Ignore a record:", args
104
104
  end
105
105
  }
@@ -30,6 +30,22 @@ class SqlInputTest < Test::Unit::TestCase
30
30
  </table>
31
31
  ]
32
32
 
33
+ ALL_TABLES_CONFIG = %[
34
+ adapter postgresql
35
+ host localhost
36
+ port 5432
37
+ database fluentd_test
38
+
39
+ username fluentd
40
+ password fluentd
41
+
42
+ schema_search_path public
43
+
44
+ tag_prefix db
45
+
46
+ all_tables true
47
+ ]
48
+
33
49
  def create_driver(conf = CONFIG)
34
50
  Fluent::Test::Driver::Input.new(Fluent::Plugin::SQLInput).configure(conf)
35
51
  end
@@ -64,6 +80,18 @@ class SqlInputTest < Test::Unit::TestCase
64
80
  assert_equal("logs", messages.tag)
65
81
  end
66
82
 
83
+ def test_all_tables
84
+ d = create_driver(ALL_TABLES_CONFIG)
85
+ d.instance.start
86
+ begin
87
+ table_names = d.instance.instance_variable_get(:@tables).map(&:table)
88
+ assert { table_names.include?("messages") }
89
+ assert { table_names.none? { |table_name| table_name.match?(Fluent::Plugin::SQLInput::SKIP_TABLE_REGEXP) }}
90
+ ensure
91
+ d.instance.shutdown
92
+ end
93
+ end
94
+
67
95
  def test_message
68
96
  d = create_driver(CONFIG + "select_interval 1")
69
97
  Message.create!(message: "message 1")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-sql
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.3
4
+ version: 2.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sadayuki Furuhashi
@@ -190,7 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
190
190
  - !ruby/object:Gem::Version
191
191
  version: '0'
192
192
  requirements: []
193
- rubygems_version: 4.0.10
193
+ rubygems_version: 4.0.20
194
194
  specification_version: 4
195
195
  summary: SQL input/output plugin for Fluentd event collector
196
196
  test_files: