fluentd 1.16.10-x64-mingw-ucrt → 1.17.0-x64-mingw-ucrt

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.
Files changed (89) hide show
  1. checksums.yaml +4 -4
  2. data/.github/DISCUSSION_TEMPLATE/q-a-japanese.yml +50 -0
  3. data/.github/DISCUSSION_TEMPLATE/q-a.yml +47 -0
  4. data/.github/workflows/test-ruby-head.yml +31 -0
  5. data/.github/workflows/test.yml +5 -37
  6. data/CHANGELOG.md +33 -101
  7. data/README.md +4 -1
  8. data/Rakefile +1 -1
  9. data/SECURITY.md +4 -6
  10. data/fluentd.gemspec +9 -10
  11. data/lib/fluent/command/binlog_reader.rb +1 -1
  12. data/lib/fluent/command/fluentd.rb +1 -1
  13. data/lib/fluent/compat/formatter.rb +0 -6
  14. data/lib/fluent/config/configure_proxy.rb +2 -2
  15. data/lib/fluent/config/parser.rb +3 -15
  16. data/lib/fluent/config/types.rb +1 -1
  17. data/lib/fluent/config/v1_parser.rb +1 -1
  18. data/lib/fluent/config/yaml_parser/parser.rb +0 -4
  19. data/lib/fluent/configurable.rb +2 -2
  20. data/lib/fluent/counter/mutex_hash.rb +1 -1
  21. data/lib/fluent/fluent_log_event_router.rb +0 -2
  22. data/lib/fluent/plugin/buf_file.rb +1 -1
  23. data/lib/fluent/plugin/buffer/file_chunk.rb +1 -1
  24. data/lib/fluent/plugin/buffer/file_single_chunk.rb +2 -3
  25. data/lib/fluent/plugin/filter_parser.rb +26 -8
  26. data/lib/fluent/plugin/formatter_csv.rb +4 -18
  27. data/lib/fluent/plugin/in_http.rb +17 -52
  28. data/lib/fluent/plugin/in_tail.rb +35 -3
  29. data/lib/fluent/plugin/out_file.rb +0 -8
  30. data/lib/fluent/plugin/out_http.rb +125 -13
  31. data/lib/fluent/plugin/owned_by_mixin.rb +0 -1
  32. data/lib/fluent/plugin/parser_json.rb +34 -9
  33. data/lib/fluent/plugin/parser_msgpack.rb +24 -3
  34. data/lib/fluent/plugin_helper/metrics.rb +2 -2
  35. data/lib/fluent/plugin_helper/server.rb +1 -4
  36. data/lib/fluent/registry.rb +6 -6
  37. data/lib/fluent/supervisor.rb +3 -3
  38. data/lib/fluent/test/output_test.rb +1 -1
  39. data/lib/fluent/test.rb +2 -5
  40. data/lib/fluent/unique_id.rb +1 -1
  41. data/lib/fluent/version.rb +1 -1
  42. data/lib/fluent/winsvc.rb +8 -38
  43. data/test/command/test_cat.rb +2 -2
  44. data/test/command/test_fluentd.rb +10 -57
  45. data/test/config/test_plugin_configuration.rb +6 -6
  46. data/test/helper.rb +7 -27
  47. data/test/log/test_console_adapter.rb +10 -3
  48. data/test/plugin/data/log_numeric/01.log +0 -0
  49. data/test/plugin/data/log_numeric/02.log +0 -0
  50. data/test/plugin/data/log_numeric/12.log +0 -0
  51. data/test/plugin/data/log_numeric/14.log +0 -0
  52. data/test/plugin/in_tail/test_io_handler.rb +14 -13
  53. data/test/plugin/in_tail/test_position_file.rb +7 -6
  54. data/test/plugin/out_forward/test_ack_handler.rb +3 -3
  55. data/test/plugin/out_forward/test_socket_cache.rb +3 -3
  56. data/test/plugin/test_buffer.rb +2 -2
  57. data/test/plugin/test_filter_grep.rb +1 -1
  58. data/test/plugin/test_in_forward.rb +1 -2
  59. data/test/plugin/test_in_http.rb +23 -1
  60. data/test/plugin/test_in_monitor_agent.rb +6 -6
  61. data/test/plugin/test_in_object_space.rb +0 -4
  62. data/test/plugin/test_in_syslog.rb +18 -25
  63. data/test/plugin/test_in_tail.rb +153 -5
  64. data/test/plugin/test_in_tcp.rb +1 -1
  65. data/test/plugin/test_in_udp.rb +10 -16
  66. data/test/plugin/test_out_exec_filter.rb +7 -12
  67. data/test/plugin/test_out_file.rb +2 -22
  68. data/test/plugin/test_out_forward.rb +37 -38
  69. data/test/plugin/test_out_http.rb +128 -0
  70. data/test/plugin/test_out_stream.rb +1 -1
  71. data/test/plugin/test_output.rb +1 -1
  72. data/test/plugin/test_output_as_buffered.rb +2 -2
  73. data/test/plugin/test_output_as_buffered_retries.rb +2 -2
  74. data/test/plugin/test_owned_by.rb +0 -1
  75. data/test/plugin/test_parser_csv.rb +1 -1
  76. data/test/plugin/test_parser_json.rb +106 -31
  77. data/test/plugin/test_parser_msgpack.rb +127 -0
  78. data/test/plugin/test_storage.rb +0 -1
  79. data/test/plugin_helper/test_child_process.rb +4 -4
  80. data/test/plugin_helper/test_http_server_helper.rb +1 -1
  81. data/test/plugin_helper/test_server.rb +41 -83
  82. data/test/plugin_helper/test_socket.rb +1 -1
  83. data/test/test_config.rb +0 -6
  84. data/test/test_event_router.rb +2 -2
  85. data/test/test_plugin_helper.rb +1 -1
  86. data/test/test_supervisor.rb +21 -30
  87. data/test/test_tls.rb +1 -1
  88. metadata +88 -32
  89. data/test/scripts/windows_service_test.ps1 +0 -73
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 07d425e6333cb03bb1ffb39ca4b6a131ae5341c168e8e6666477a7b53f00c14a
4
- data.tar.gz: b429eb7f1a663524fb99bd89eb48de153ecdd1e85860048a26832be9143db964
3
+ metadata.gz: 5602e3cb82f6e9238b4e236cedfa63ac49b40bdad4799fc56fe416eb7cd49b19
4
+ data.tar.gz: 0c8549628937a696e05e3889e95577f216a1eccde65157404d4272c03b48e69d
5
5
  SHA512:
6
- metadata.gz: c16b652cfbd91bc0629f0a7ad61fdfcd496a33a585ee0002ecad69c0fc79b0eeec1140816143254472709effa1d2dd49a601d1ca26d4520dc24ba3039c97d646
7
- data.tar.gz: 5711d692a6f2f4f5c9a9cfa7bfc8b6eafe4e588da708c5a09b5d9a386cd1d8c47a9ecb4ff5de6a77bcb8954dec5efa086234e14aeb9fee56abcd92ce91feee6c
6
+ metadata.gz: 0a6babc88a02ad6efe4fcb2b688cd1400d6a9c1b2232d75a3e313cfc6bacef17358c0857cfa1b0f3ce1c9589f0794b81a4f04feb97289a4b87986e153a91eb70
7
+ data.tar.gz: bc7b1f1b1660519bf32d40693c71b9f5776db6cf78d7736476dc97ff372ebc6f5e2a57049df60771481b02b1e222586c9127521cdd84b2a48060c13009a202ed
@@ -0,0 +1,50 @@
1
+ title: "[QA (Japanese)]"
2
+ labels: ["Q&A (Japanese)"]
3
+ body:
4
+ - type: markdown
5
+ attributes:
6
+ value: |
7
+ 日本語で気軽に質問するためのカテゴリです。もし他の人が困っているのを見つけたらぜひ回答してあげてください。
8
+ - type: textarea
9
+ id: question
10
+ attributes:
11
+ label: やりたいこと
12
+ description: |
13
+ 何について困っているのかを書いてください。試したことや実際の結果を示してください。
14
+ 期待する挙動と実際の結果の違いがあればそれも書くのをおすすめします。
15
+ render: markdown
16
+ validations:
17
+ required: true
18
+ - type: textarea
19
+ id: configuration
20
+ attributes:
21
+ label: 設定した内容
22
+ description: |
23
+ どのような設定をして期待する挙動を実現しようとしたのかを書いてください。(例: fluentd.confの内容を貼り付ける)
24
+ render: apache
25
+ - type: textarea
26
+ id: logs
27
+ attributes:
28
+ label: ログの内容
29
+ description: |
30
+ Fluentdのログを提示してください。エラーログがあると回答の助けになります。(例: fluentd.logの内容を貼り付ける)
31
+ render: shell
32
+ - type: textarea
33
+ id: environment
34
+ attributes:
35
+ label: 環境について
36
+ description: |
37
+ - Fluentd or td-agent version: `fluentd --version` or `td-agent --version`
38
+ - Operating system: `cat /etc/os-release`
39
+ - Kernel version: `uname -r`
40
+
41
+ どんな環境で困っているかの情報がないと、再現できないため誰も回答できないことがあります。
42
+ 必要な情報を記入することをおすすめします。
43
+ value: |
44
+ - Fluentd version:
45
+ - TD Agent version:
46
+ - Fluent Package version:
47
+ - Docker image (tag):
48
+ - Operating system:
49
+ - Kernel version:
50
+ render: markdown
@@ -0,0 +1,47 @@
1
+ title: "[Q&A]"
2
+ labels: ["Q&A"]
3
+ body:
4
+ - type: markdown
5
+ attributes:
6
+ value: |
7
+ It is recommended to support each other.
8
+ - type: textarea
9
+ id: question
10
+ attributes:
11
+ label: What is a problem?
12
+ description: |
13
+ A clear and concise description of what you want to happen.
14
+ What exactly did you do (or not do) that was effective (or ineffective)?
15
+ render: markdown
16
+ validations:
17
+ required: true
18
+ - type: textarea
19
+ id: configuration
20
+ attributes:
21
+ label: Describe the configuration of Fluentd
22
+ description: |
23
+ If there is the actual configuration of Fluentd, it will help.
24
+ - type: textarea
25
+ id: logs
26
+ attributes:
27
+ label: Describe the logs of Fluentd
28
+ description: |
29
+ If there are error logs of Fluentd, it will help.
30
+ - type: textarea
31
+ id: environment
32
+ attributes:
33
+ label: Environment
34
+ description: |
35
+ - Fluentd or td-agent version: `fluentd --version` or `td-agent --version`
36
+ - Operating system: `cat /etc/os-release`
37
+ - Kernel version: `uname -r`
38
+
39
+ Please describe your environment information. If will help to support.
40
+ value: |
41
+ - Fluentd version:
42
+ - TD Agent version:
43
+ - Fluent Package version:
44
+ - Docker image (tag):
45
+ - Operating system:
46
+ - Kernel version:
47
+ render: markdown
@@ -0,0 +1,31 @@
1
+ name: Test with Ruby head
2
+
3
+ on:
4
+ schedule:
5
+ - cron: '11 14 * * 0'
6
+ workflow_dispatch:
7
+
8
+ jobs:
9
+ test:
10
+ runs-on: ${{ matrix.os }}
11
+ continue-on-error: true
12
+ strategy:
13
+ fail-fast: false
14
+ matrix:
15
+ os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
16
+ ruby-version: ['head']
17
+
18
+ name: Ruby ${{ matrix.ruby-version }} on ${{ matrix.os }}
19
+ steps:
20
+ - uses: actions/checkout@v3
21
+ - name: Set up Ruby
22
+ uses: ruby/setup-ruby@v1
23
+ with:
24
+ ruby-version: ${{ matrix.ruby-version }}
25
+ - name: Install addons
26
+ if: ${{ matrix.os == 'ubuntu-latest' }}
27
+ run: sudo apt-get install libgmp3-dev libcap-ng-dev
28
+ - name: Install dependencies
29
+ run: bundle install
30
+ - name: Run tests
31
+ run: bundle exec rake test TESTOPTS="-v --no-show-detail-immediately"
@@ -2,21 +2,9 @@ name: Test
2
2
 
3
3
  on:
4
4
  push:
5
- branches: [v1.16]
6
- paths-ignore:
7
- - '*.md'
8
- - 'lib/fluent/version.rb'
5
+ branches: [master]
9
6
  pull_request:
10
- branches: [v1.16]
11
- paths-ignore:
12
- - '*.md'
13
- - 'lib/fluent/version.rb'
14
-
15
- concurrency:
16
- group: ${{ github.head_ref || github.sha }}-${{ github.workflow }}
17
- cancel-in-progress: true
18
-
19
- permissions: read-all
7
+ branches: [master]
20
8
 
21
9
  jobs:
22
10
  test:
@@ -27,38 +15,18 @@ jobs:
27
15
  matrix:
28
16
  os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
29
17
  ruby-version: ['3.3', '3.2', '3.1', '3.0', '2.7']
18
+
30
19
  name: Ruby ${{ matrix.ruby-version }} on ${{ matrix.os }}
31
20
  steps:
32
- - uses: actions/checkout@v5
21
+ - uses: actions/checkout@v3
33
22
  - name: Set up Ruby
34
23
  uses: ruby/setup-ruby@v1
35
24
  with:
36
25
  ruby-version: ${{ matrix.ruby-version }}
37
- rubygems: latest
38
26
  - name: Install addons
39
27
  if: ${{ matrix.os == 'ubuntu-latest' }}
40
28
  run: sudo apt-get install libgmp3-dev libcap-ng-dev
41
29
  - name: Install dependencies
42
30
  run: bundle install
43
31
  - name: Run tests
44
- run: bundle exec rake test TESTOPTS="-v --report-slow-tests --no-show-detail-immediately"
45
-
46
- test-windows-service:
47
- runs-on: windows-latest
48
- strategy:
49
- fail-fast: false
50
- matrix:
51
- ruby-version: ['3.3', '3.2', '3.1', '3.0', '2.7']
52
- name: Windows service (Ruby ${{ matrix.ruby-version }})
53
- steps:
54
- - uses: actions/checkout@v5
55
- - name: Set up Ruby
56
- uses: ruby/setup-ruby@v1
57
- with:
58
- ruby-version: ${{ matrix.ruby-version }}
59
- - name: Install dependencies
60
- run: |
61
- bundle install
62
- rake install
63
- - name: Run tests
64
- run: test\scripts\windows_service_test.ps1
32
+ run: bundle exec rake test TESTOPTS="-v --no-show-detail-immediately"
data/CHANGELOG.md CHANGED
@@ -1,114 +1,46 @@
1
- # v1.16
2
-
3
- ## Release v1.16.10 - 2025/09/12
4
-
5
- ### Bug Fix
6
-
7
- * server plugin helper: ensure to close all connections at shutdown
8
- https://github.com/fluent/fluentd/pull/5088
9
-
10
- ### Misc
11
-
12
- * CI improvemnts
13
- https://github.com/fluent/fluentd/pull/5083
14
- https://github.com/fluent/fluentd/pull/5085
15
- https://github.com/fluent/fluentd/pull/5086
16
- https://github.com/fluent/fluentd/pull/5091
17
- https://github.com/fluent/fluentd/pull/5092
18
-
19
- ## Release v1.16.9 - 2025/05/14
20
-
21
- ### Bug Fix
22
-
23
- * winsvc: Fix bug where service accidentally stops after starting.
24
- The previous version (v1.16.8) should not be used for Windows Service.
25
- https://github.com/fluent/fluentd/pull/4955
26
-
27
- ### Misc
1
+ # v1.17
28
2
 
29
- * CI improvemnts
30
- https://github.com/fluent/fluentd/pull/4956
3
+ ## Release v1.17.0 - 2024/04/30
31
4
 
32
- ## Release v1.16.8 - 2025/05/01
33
-
34
- **This version has a critical bug about Windows Service. Do not use this version.**
35
- (https://github.com/fluent/fluentd/pull/4955)
36
-
37
- ### Bug Fix
38
-
39
- * winsvc: Stop the service when the supervisor is dead
40
- https://github.com/fluent/fluentd/pull/4942
41
- * formatter_csv: Fix memory leak
42
- https://github.com/fluent/fluentd/pull/4920
43
-
44
- ### Misc
5
+ ### Enhancement
45
6
 
46
- * Add fiddle as dependency gem for Ruby 3.5 on Windows
47
- https://github.com/fluent/fluentd/pull/4919
48
- * Refactoring code
49
- https://github.com/fluent/fluentd/pull/4921
50
- https://github.com/fluent/fluentd/pull/4922
51
- https://github.com/fluent/fluentd/pull/4926
52
- https://github.com/fluent/fluentd/pull/4943
53
- * CI improvemnts
54
- https://github.com/fluent/fluentd/pull/4821
55
- https://github.com/fluent/fluentd/pull/4850
56
- https://github.com/fluent/fluentd/pull/4851
57
- https://github.com/fluent/fluentd/pull/4862
58
- https://github.com/fluent/fluentd/pull/4915
59
- https://github.com/fluent/fluentd/pull/4923
60
- https://github.com/fluent/fluentd/pull/4925
61
- https://github.com/fluent/fluentd/pull/4927
62
-
63
- ## Release v1.16.7 - 2025/01/29
7
+ * in_http: Recognize CSP reports as JSON data
8
+ https://github.com/fluent/fluentd/pull/4282
9
+ * out_http: Add option to reuse connections
10
+ https://github.com/fluent/fluentd/pull/4330
11
+ * in_tail: Expand glob capability for square brackets and one character matcher
12
+ https://github.com/fluent/fluentd/pull/4401
13
+ * out_http: Support AWS Signature Version 4 authentication
14
+ https://github.com/fluent/fluentd/pull/4459
64
15
 
65
16
  ### Bug Fix
66
17
 
67
- * Windows: Fix `NoMethodError` of `--daemon` option
68
- https://github.com/fluent/fluentd/pull/4796
69
- * Windows: Fixed an issue where stopping the service immediately after startup could leave the processes
70
- https://github.com/fluent/fluentd/pull/4782
71
- * Windows: Fixed an issue where stopping service sometimes can not be completed forever
72
- https://github.com/fluent/fluentd/pull/4782
18
+ * Make sure `parser_json` and `parser_msgpack` return `Hash`.
19
+ Make `parser_json` and `parser_msgpack` accept only `Hash` or `Array` of `Hash`.
20
+ https://github.com/fluent/fluentd/pull/4474
21
+ * filter_parser: Add error event for multiple parsed results
22
+ https://github.com/fluent/fluentd/pull/4478
73
23
 
74
24
  ### Misc
75
25
 
76
- * Windows: Add workaround for unexpected exception
77
- https://github.com/fluent/fluentd/pull/4747
78
- * README: remove deprecated google analytics beacon
79
- https://github.com/fluent/fluentd/pull/4797
80
- * CI improvemnts
81
- https://github.com/fluent/fluentd/pull/4723
82
- https://github.com/fluent/fluentd/pull/4788
83
- https://github.com/fluent/fluentd/pull/4789
84
- https://github.com/fluent/fluentd/pull/4790
85
- https://github.com/fluent/fluentd/pull/4791
86
- https://github.com/fluent/fluentd/pull/4793
87
- https://github.com/fluent/fluentd/pull/4794
88
- https://github.com/fluent/fluentd/pull/4795
89
- https://github.com/fluent/fluentd/pull/4798
90
- https://github.com/fluent/fluentd/pull/4799
91
- https://github.com/fluent/fluentd/pull/4800
92
- https://github.com/fluent/fluentd/pull/4801
93
- https://github.com/fluent/fluentd/pull/4803
94
-
95
- ## Release v1.16.6 - 2024/08/16
96
-
97
- ### Bug Fix
98
-
99
- * YAML config syntax: Fix issue where `$log_level` element was not supported correctly
100
- https://github.com/fluent/fluentd/pull/4486
101
- * parser_json: Fix wrong LoadError warning
102
- https://github.com/fluent/fluentd/pull/4592
103
- * `fluentd` command: Fix `--plugin` (`-p`) option not to overwrite default value
104
- https://github.com/fluent/fluentd/pull/4605
26
+ * Raise minimum required ruby version
27
+ https://github.com/fluent/fluentd/pull/4288
28
+ * Require missing dependent gems as of Ruby 3.4-dev
29
+ https://github.com/fluent/fluentd/pull/4411
30
+ * Minor code refactoring
31
+ https://github.com/fluent/fluentd/pull/4294
32
+ https://github.com/fluent/fluentd/pull/4299
33
+ https://github.com/fluent/fluentd/pull/4302
34
+ https://github.com/fluent/fluentd/pull/4320
35
+ * CI fixes
36
+ https://github.com/fluent/fluentd/pull/4369
37
+ https://github.com/fluent/fluentd/pull/4433
38
+ https://github.com/fluent/fluentd/pull/4452
39
+ https://github.com/fluent/fluentd/pull/4477
40
+ * github: unify YAML file extension to .yml
41
+ https://github.com/fluent/fluentd/pull/4429
105
42
 
106
- ### Misc
107
-
108
- * out_file: Add warn message for symlink_path setting
109
- https://github.com/fluent/fluentd/pull/4512
110
- * Keep console gem v1.23 to avoid LoadError
111
- https://github.com/fluent/fluentd/pull/4510
43
+ # v1.16
112
44
 
113
45
  ## Release v1.16.5 - 2024/03/27
114
46
 
data/README.md CHANGED
@@ -4,6 +4,7 @@ Fluentd: Open-Source Log Collector
4
4
  [![Testing on Ubuntu](https://github.com/fluent/fluentd/actions/workflows/linux-test.yaml/badge.svg?branch=master)](https://github.com/fluent/fluentd/actions/workflows/linux-test.yaml)
5
5
  [![Testing on Windows](https://github.com/fluent/fluentd/actions/workflows/windows-test.yaml/badge.svg?branch=master)](https://github.com/fluent/fluentd/actions/workflows/windows-test.yaml)
6
6
  [![Testing on macOS](https://github.com/fluent/fluentd/actions/workflows/macos-test.yaml/badge.svg?branch=master)](https://github.com/fluent/fluentd/actions/workflows/macos-test.yaml)
7
+ [![Code Climate](https://codeclimate.com/github/fluent/fluentd/badges/gpa.svg)](https://codeclimate.com/github/fluent/fluentd)
7
8
  [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/1189/badge)](https://bestpractices.coreinfrastructure.org/projects/1189)
8
9
 
9
10
  [Fluentd](https://www.fluentd.org/) collects events from various data sources and writes them to files, RDBMS, NoSQL, IaaS, SaaS, Hadoop and so on. Fluentd helps you unify your logging infrastructure (Learn more about the [Unified Logging Layer](https://www.fluentd.org/blog/unified-logging-layer)).
@@ -28,7 +29,7 @@ Fluentd: Open-Source Log Collector
28
29
 
29
30
  ### Prerequisites
30
31
 
31
- - Ruby 2.4 or later
32
+ - Ruby 2.7 or later
32
33
  - git
33
34
 
34
35
  `git` should be in `PATH`. On Windows, you can use `Github for Windows` and `GitShell` for easy setup.
@@ -70,3 +71,5 @@ See [SECURITY](SECURITY.md) to contact us about vulnerability.
70
71
  ## Contributors:
71
72
 
72
73
  Patches contributed by [great developers](https://github.com/fluent/fluentd/contributors).
74
+
75
+ [<img src="https://ga-beacon.appspot.com/UA-24890265-6/fluent/fluentd" />](https://github.com/fluent/fluentd)
data/Rakefile CHANGED
@@ -13,7 +13,7 @@ task test: [:base_test]
13
13
  namespace :build do
14
14
  desc 'Build gems for all platforms'
15
15
  task :all do
16
- Bundler.with_clean_env do
16
+ Bundler.with_original_env do
17
17
  %w[ruby x86-mingw32 x64-mingw32 x64-mingw-ucrt].each do |name|
18
18
  ENV['GEM_BUILD_FAKE_PLATFORM'] = name
19
19
  Rake::Task["build"].execute
data/SECURITY.md CHANGED
@@ -2,13 +2,11 @@
2
2
 
3
3
  ## Supported Versions
4
4
 
5
- | Version | Supported |
6
- |-----------|--------------------|
7
- | 1.19.x | :white_check_mark: |
8
- | 1.18.x | :x: |
9
- | 1.17.x | :x: |
5
+ | Version | Supported |
6
+ | ------- | ------------------ |
10
7
  | 1.16.x | :white_check_mark: |
11
- | <= 1.15.x | :x: |
8
+ | 1.15.x | :white_check_mark: |
9
+ | <= 1.14.x | :x: |
12
10
 
13
11
  ## Reporting a Vulnerability
14
12
 
data/fluentd.gemspec CHANGED
@@ -16,7 +16,7 @@ Gem::Specification.new do |gem|
16
16
  gem.require_paths = ["lib"]
17
17
  gem.license = "Apache-2.0"
18
18
 
19
- gem.required_ruby_version = '>= 2.4'
19
+ gem.required_ruby_version = '>= 2.7'
20
20
 
21
21
  gem.add_runtime_dependency("bundler")
22
22
  gem.add_runtime_dependency("msgpack", [">= 1.3.1", "< 2.0.0"])
@@ -29,10 +29,11 @@ Gem::Specification.new do |gem|
29
29
  gem.add_runtime_dependency("tzinfo-data", ["~> 1.0"])
30
30
  gem.add_runtime_dependency("strptime", [">= 0.2.4", "< 1.0.0"])
31
31
  gem.add_runtime_dependency("webrick", ["~> 1.4"])
32
- gem.add_runtime_dependency("console", ["< 1.24"])
33
32
 
34
- # gems that aren't default gems as of Ruby 3.5
35
- gem.add_runtime_dependency("logger", ["~> 1.6"])
33
+ # gems that aren't default gems as of Ruby 3.4
34
+ gem.add_runtime_dependency("base64", ["~> 0.2"])
35
+ gem.add_runtime_dependency("csv", ["~> 3.2"])
36
+ gem.add_runtime_dependency("drb", ["~> 2.2"])
36
37
 
37
38
  # build gem for a certain platform. see also Rakefile
38
39
  fake_platform = ENV['GEM_BUILD_FAKE_PLATFORM'].to_s
@@ -42,9 +43,6 @@ Gem::Specification.new do |gem|
42
43
  gem.add_runtime_dependency("win32-ipc", ["~> 0.7.0"])
43
44
  gem.add_runtime_dependency("win32-event", ["~> 0.6.3"])
44
45
  gem.add_runtime_dependency("certstore_c", ["~> 0.1.7"])
45
-
46
- # gems that aren't default gems as of Ruby 3.5
47
- gem.add_runtime_dependency("fiddle", ["~> 1.1"])
48
46
  end
49
47
 
50
48
  gem.add_development_dependency("rake", ["~> 13.0"])
@@ -52,12 +50,13 @@ Gem::Specification.new do |gem|
52
50
  gem.add_development_dependency("parallel_tests", ["~> 0.15.3"])
53
51
  gem.add_development_dependency("simplecov", ["~> 0.7"])
54
52
  gem.add_development_dependency("rr", ["~> 3.0"])
55
- # timecop v0.9.9 supports `Process.clock_gettime`. It breaks some tests.
56
- # (https://github.com/fluent/fluentd/pull/4521)
57
- gem.add_development_dependency("timecop", ["< 0.9.9"])
53
+ gem.add_development_dependency("timecop", ["~> 0.9"])
58
54
  gem.add_development_dependency("test-unit", ["~> 3.3"])
59
55
  gem.add_development_dependency("test-unit-rr", ["~> 1.0"])
60
56
  gem.add_development_dependency("oj", [">= 2.14", "< 4"])
61
57
  gem.add_development_dependency("async", "~> 1.23")
62
58
  gem.add_development_dependency("async-http", ">= 0.50.0")
59
+ gem.add_development_dependency("aws-sigv4", ["~> 1.8"])
60
+ gem.add_development_dependency("aws-sdk-core", ["~> 3.191"])
61
+ gem.add_development_dependency("rexml", ["~> 3.2"])
63
62
  end
@@ -130,7 +130,7 @@ module BinlogReaderCommand
130
130
  private
131
131
 
132
132
  def configure_option_parser
133
- @options.merge!(config_params: {})
133
+ @options[:config_params] = {}
134
134
 
135
135
  @opt_parser.banner = "Usage: fluent-binlog-reader #{self.class.to_s.split('::').last.downcase} [options] file"
136
136
 
@@ -46,7 +46,7 @@ op.on('--show-plugin-config=PLUGIN', "[DEPRECATED] Show PLUGIN configuration and
46
46
  }
47
47
 
48
48
  op.on('-p', '--plugin DIR', "add plugin directory") {|s|
49
- (cmd_opts[:plugin_dirs] ||= default_opts[:plugin_dirs]) << s
49
+ (cmd_opts[:plugin_dirs] ||= []) << s
50
50
  }
51
51
 
52
52
  op.on('-I PATH', "add library path") {|s|
@@ -101,12 +101,6 @@ module Fluent
101
101
 
102
102
  class CsvFormatter < Fluent::Plugin::CsvFormatter
103
103
  # TODO: warn when deprecated
104
-
105
- # Do not cache because it is hard to consider the thread key correctly.
106
- # (We can try, but it would be low priority.)
107
- def csv_cacheable?
108
- false
109
- end
110
104
  end
111
105
 
112
106
  class SingleValueFormatter < Fluent::Plugin::SingleValueFormatter
@@ -201,7 +201,7 @@ module Fluent
201
201
 
202
202
  def overwrite_defaults(other) # other is owner plugin's corresponding proxy
203
203
  self.defaults = self.defaults.merge(other.defaults)
204
- self.sections.keys.each do |section_key|
204
+ self.sections.each_key do |section_key|
205
205
  if other.sections.has_key?(section_key)
206
206
  self.sections[section_key].overwrite_defaults(other.sections[section_key])
207
207
  end
@@ -274,7 +274,7 @@ module Fluent
274
274
  option_value_type!(name, opts, :deprecated, String)
275
275
  option_value_type!(name, opts, :obsoleted, String)
276
276
  if type == :enum
277
- if !opts.has_key?(:list) || !opts[:list].is_a?(Array) || opts[:list].empty? || !opts[:list].all?{|v| v.is_a?(Symbol) }
277
+ if !opts.has_key?(:list) || !opts[:list].is_a?(Array) || opts[:list].empty? || !opts[:list].all?(Symbol)
278
278
  raise ArgumentError, "#{name}: enum parameter requires :list of Symbols"
279
279
  end
280
280
  end
@@ -92,23 +92,10 @@ module Fluent
92
92
  else
93
93
  basepath = '/'
94
94
  fname = path
95
- parser_proc = ->(f) {
95
+ require 'open-uri'
96
+ URI.open(uri) {|f|
96
97
  Parser.new(basepath, f.each_line, fname).parse!(allow_include, nil, attrs, elems)
97
98
  }
98
-
99
- case u.scheme
100
- when 'http', 'https', 'ftp'
101
- # URI#open can be able to handle URIs for http, https and ftp.
102
- require 'open-uri'
103
- u.open(&parser_proc)
104
- else
105
- # TODO: This case should be handled in the previous if condition. Glob is not applied to some Windows path formats.
106
- # 'c:/path/to/file' will be passed as URI, 'uri' and 'u.path' will be:
107
- # - uri is 'c:/path/to/file'
108
- # - u.path is '/path/to/file' and u.scheme is 'c'
109
- # Therefore, the condition of the if statement above is not met and it is handled here.
110
- File.open(uri, &parser_proc)
111
- end
112
99
  end
113
100
 
114
101
  rescue SystemCallError => e
@@ -117,3 +104,4 @@ module Fluent
117
104
  end
118
105
  end
119
106
  end
107
+
@@ -123,7 +123,7 @@ module Fluent
123
123
 
124
124
  s = val.to_sym
125
125
  list = opts[:list]
126
- raise "Plugin BUG: config type 'enum' requires :list of symbols" unless list.is_a?(Array) && list.all?{|v| v.is_a? Symbol }
126
+ raise "Plugin BUG: config type 'enum' requires :list of symbols" unless list.is_a?(Array) && list.all?(Symbol)
127
127
  unless list.include?(s)
128
128
  raise ConfigError, "valid options are #{list.join(',')} but got #{val}"
129
129
  end
@@ -172,7 +172,7 @@ module Fluent
172
172
  require 'open-uri'
173
173
  basepath = '/'
174
174
  fname = path
175
- data = u.open { |f| f.read }
175
+ data = URI.open(uri) { |f| f.read }
176
176
  data.force_encoding('UTF-8')
177
177
  ss = StringScanner.new(data)
178
178
  V1Parser.new(ss, basepath, fname, @eval_context).parse_element(true, nil, attrs, elems)
@@ -138,10 +138,6 @@ module Fluent
138
138
  sb.add_line('@id', v)
139
139
  end
140
140
 
141
- if (v = config.delete('$log_level'))
142
- sb.add_line('@log_level', v)
143
- end
144
-
145
141
  config.each do |key, val|
146
142
  if val.is_a?(Array)
147
143
  val.each do |v|
@@ -31,13 +31,13 @@ module Fluent
31
31
  super
32
32
  # to simulate implicit 'attr_accessor' by config_param / config_section and its value by config_set_default
33
33
  proxy = self.class.merged_configure_proxy
34
- proxy.params.keys.each do |name|
34
+ proxy.params.each_key do |name|
35
35
  next if name.to_s.start_with?('@')
36
36
  if proxy.defaults.has_key?(name)
37
37
  instance_variable_set("@#{name}".to_sym, proxy.defaults[name])
38
38
  end
39
39
  end
40
- proxy.sections.keys.each do |name|
40
+ proxy.sections.each_key do |name|
41
41
  next if name.to_s.start_with?('@')
42
42
  subproxy = proxy.sections[name]
43
43
  if subproxy.multi?
@@ -54,7 +54,7 @@ module Fluent
54
54
  if mutex.try_lock
55
55
  locks[key] = mutex
56
56
  else
57
- locks.values.each(&:unlock)
57
+ locks.each_value(&:unlock)
58
58
  locks = {} # flush locked keys
59
59
  break
60
60
  end
@@ -47,8 +47,6 @@ module Fluent
47
47
  # it's not suppressed in default event router for non-log-event events
48
48
  log_event_router.suppress_missing_match!
49
49
 
50
- log_event_router = log_event_router
51
-
52
50
  unmatched_tags = Fluent::Log.event_tags.select { |t| !log_event_router.match?(t) }
53
51
  unless unmatched_tags.empty?
54
52
  $log.warn "match for some tags of log events are not defined in @FLUENT_LOG label (to be ignored)", tags: unmatched_tags
@@ -56,7 +56,7 @@ module Fluent
56
56
 
57
57
  @variable_store = Fluent::VariableStore.fetch_or_build(:buf_file)
58
58
 
59
- multi_workers_configured = owner.system_config.workers > 1 ? true : false
59
+ multi_workers_configured = owner.system_config.workers > 1
60
60
 
61
61
  using_plugin_root_dir = false
62
62
  unless @path
@@ -399,7 +399,7 @@ module Fluent
399
399
  end
400
400
 
401
401
  if chunk.slice(0, 2) == BUFFER_HEADER
402
- size = chunk.slice(2, 4).unpack('N').first
402
+ size = chunk.slice(2, 4).unpack1('N')
403
403
  if size
404
404
  return Fluent::MessagePackFactory.msgpack_unpacker(symbolize_keys: true).feed(chunk.slice(6, size)).read rescue nil
405
405
  end
@@ -238,17 +238,16 @@ module Fluent
238
238
  callback.call(file) if callback
239
239
  end
240
240
 
241
- URI_PARSER = URI::Parser.new
242
241
  ESCAPE_REGEXP = /[^-_.a-zA-Z0-9]/n
243
242
 
244
243
  def encode_key(metadata)
245
244
  k = @key ? metadata.variables[@key] : metadata.tag
246
245
  k ||= ''
247
- URI_PARSER.escape(k, ESCAPE_REGEXP)
246
+ URI::DEFAULT_PARSER.escape(k, ESCAPE_REGEXP)
248
247
  end
249
248
 
250
249
  def decode_key(key)
251
- URI_PARSER.unescape(key)
250
+ URI::DEFAULT_PARSER.unescape(key)
252
251
  end
253
252
 
254
253
  def create_new_chunk(path, metadata, perm)