Skip to content

Fix parameter default value and type#648

Merged
kenhys merged 2 commits into
fluent:1.0from
Watson1978:docs-fix-default-and-type
Jul 27, 2026
Merged

Fix parameter default value and type#648
kenhys merged 2 commits into
fluent:1.0from
Watson1978:docs-fix-default-and-type

Conversation

@Watson1978

Copy link
Copy Markdown
Contributor

Four mismatches found by comparing config_param declarations in fluentd v1.19 (0579b12b) with the documented tables.

  • inject_key_prefix, hash_value_field (filter/parser.md)

    Both are declared as :string with default nil, but the tables said "false", which is not a valid value for a string parameter:

    config_param :inject_key_prefix, :string, default: nil
    config_param :hash_value_field, :string, default: nil
    
  • resolve_hostname (input/forward.md)

    Declared as :bool with default nil, not false. The distinction matters here because of in_forward.rb:106-113: when source_hostname_key is set, a nil resolve_hostname is promoted to true, while an explicitly configured false raises "resolve_hostname must be true with source_hostname_key". So "unset" and "false" are not interchangeable. input/syslog.md already documents the same parameter of in_syslog, which shares the declaration, as nil.

  • generate_cert_expiration (configuration/transport-section.md)

    Declared as :time, not :integer:

    config_param :generate_cert_expiration, :time, default: 10 * 365 * 86400
    

    The documented default is already correct, only the type was wrong. [time] is the notation used for time parameters in buffer-section.md.

Four mismatches found by comparing config_param declarations in fluentd
v1.19 (0579b12b) with the documented tables.

* inject_key_prefix, hash_value_field (filter/parser.md)

  Both are declared as :string with default nil, but the tables said
  "false", which is not a valid value for a string parameter:

      config_param :inject_key_prefix, :string, default: nil
      config_param :hash_value_field, :string, default: nil

* resolve_hostname (input/forward.md)

  Declared as :bool with default nil, not false. The distinction matters
  here because of in_forward.rb:106-113: when source_hostname_key is set,
  a nil resolve_hostname is promoted to true, while an explicitly
  configured false raises "resolve_hostname must be true with
  source_hostname_key". So "unset" and "false" are not interchangeable.
  input/syslog.md already documents the same parameter of in_syslog,
  which shares the declaration, as nil.

* generate_cert_expiration (configuration/transport-section.md)

  Declared as :time, not :integer:

      config_param :generate_cert_expiration, :time, default: 10 * 365 * 86400

  The documented default is already correct, only the type was wrong.
  [time] is the notation used for time parameters in buffer-section.md.

None of the four is overridden by config_set_default anywhere in the
tree, so the declared values are the effective ones. The version columns
were rechecked against the introducing commits and are correct as they
are: 96664acd (v0.14.9) for the two filter_parser parameters and
5c6ffceb (v0.14.10) for resolve_hostname.

Signed-off-by: Shizuo Fujita <fujita@clear-code.com>
@Watson1978
Watson1978 requested a review from kenhys July 24, 2026 09:21
@kenhys
kenhys merged commit cc9a036 into fluent:1.0 Jul 27, 2026
2 checks passed
@Watson1978
Watson1978 deleted the docs-fix-default-and-type branch July 27, 2026 01:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants