Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make config values more strictly and enable to set nil or default #2685

Merged
merged 22 commits into from
Dec 12, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
dbc94e4
test/config/test_types.rb: Introduce data driven test
ashie Oct 30, 2019
262d3b9
Add an ability to parse integer & float values more strictly
ashie Nov 6, 2019
899315c
Add "strict_config_value" to system config
ashie Nov 11, 2019
60f11b7
Raise more friendly error on strict_config_value = true
ashie Nov 12, 2019
2b55be3
Add a command line option "--strict-config-value"
ashie Nov 13, 2019
4204e1c
Parse config values strictly also for system config
ashie Nov 13, 2019
208f7ff
Also parse bool value strictly on strict_config_value = true
ashie Nov 14, 2019
ea0878d
Enable to set nil to parameters in config file
ashie Nov 19, 2019
1fdb92d
Now embedded ruby code in config file can set default value
ashie Nov 20, 2019
06e55c5
Add helper methods to set nil or default in config file
ashie Nov 20, 2019
134990d
Narrow the scope of begin - rescue to clarify what raises the errors
ashie Nov 26, 2019
56291e1
SetNil and SetDefault should inherit Exception instead of ConfigError
ashie Nov 26, 2019
e0b641c
Keep backward compatibility of SectionGenerator::generate
ashie Nov 26, 2019
787d5fe
Enable to dump a config which includes nil or :default
ashie Nov 26, 2019
64b4672
Show more friendly message on ConfigError
ashie Nov 28, 2019
9238ffe
Add more tests for setting nil or :default to Configurable
ashie Dec 2, 2019
d111922
Set correct default config value on the helper method "use_default"
ashie Dec 2, 2019
e35d4cc
Enable use_nil and use_default also for config_argument
ashie Dec 2, 2019
f1e1353
Use single quote
ashie Dec 3, 2019
45adea3
strict_config_value should also affect to SystemConfig itself
ashie Dec 4, 2019
f13d48b
Show correct default value on dumping a config element
ashie Dec 5, 2019
3ae212b
Don't use keyword argument for Configurable::configure
ashie Dec 5, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add a command line option "--strict-config-value"
Signed-off-by: Takuro Ashie <ashie@clear-code.com>
  • Loading branch information
ashie committed Dec 5, 2019
commit 2b55be3c2b6cdcf2ee25e0e916deb6239974d4b4
4 changes: 4 additions & 0 deletions lib/fluent/command/fluentd.rb
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@
opts[:use_v1_config] = !b
}

op.on('--strict-config-value', "Parse config values strictly", TrueClass) {|b|
opts[:strict_config_value] = b
}

op.on('-v', '--verbose', "increase verbose level (-v: debug, -vv: trace)", TrueClass) {|b|
if b
opts[:log_level] = [opts[:log_level] - 1, Fluent::Log::LEVEL_TRACE].max
Expand Down
1 change: 1 addition & 0 deletions lib/fluent/supervisor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,7 @@ def self.default_options
suppress_repeated_stacktrace: true,
without_source: nil,
use_v1_config: true,
strict_config_value: nil,
supervise: true,
standalone_worker: false,
signame: nil,
Expand Down