fluent-bit icon indicating copy to clipboard operation
fluent-bit copied to clipboard

Config parsing error: "section 'filter' is missing the 'name' property"

Open drbugfinder-work opened this issue 1 year ago • 10 comments

Bug Report

Describe the bug

Since the commits https://github.com/fluent/fluent-bit/commits/master/?since=2024-10-26&until=2024-10-27 we receive the following errors during our nightly build tests. Is this already known? @edsiper Can you please have a look?

[2024-10-29T00:11:03.443Z] Fluent Bit v3.2.0
[2024-10-29T00:11:03.443Z] * Copyright (C) 2015-2024 The Fluent Bit Authors
[2024-10-29T00:11:03.443Z] * Fluent Bit is a CNCF sub-project under the umbrella of Fluentd
[2024-10-29T00:11:03.443Z] * https://fluentbit.io/
[2024-10-29T00:11:03.443Z] 
[2024-10-29T00:11:03.443Z] ______ _                  _    ______ _ _           _____  _____ 
[2024-10-29T00:11:03.443Z] |  ___| |                | |   | ___ (_) |         |____ |/ __  \
[2024-10-29T00:11:03.443Z] | |_  | |_   _  ___ _ __ | |_  | |_/ /_| |_  __   __   / /`' / /'
[2024-10-29T00:11:03.443Z] |  _| | | | | |/ _ \ '_ \| __| | ___ \ | __| \ \ / /   \ \  / /  
[2024-10-29T00:11:03.443Z] | |   | | |_| |  __/ | | | |_  | |_/ / | |_   \ V /.___/ /./ /___
[2024-10-29T00:11:03.443Z] \_|   |_|\__,_|\___|_| |_|\__| \____/|_|\__|   \_/ \____(_)_____/
[2024-10-29T00:11:03.443Z] 
[2024-10-29T00:11:03.443Z] 
[2024-10-29T00:11:03.443Z] [2024/10/29 00:11:03] [error] [config] section 'filter' is missing the 'name' property
[2024-10-29T00:11:03.443Z] [2024/10/29 00:11:03] [error] configuration file contains errors, aborting.

drbugfinder-work avatar Oct 29 '24 08:10 drbugfinder-work

What config are you using?

We should also make sure to add some regression unit tests for it.

patrick-stephens avatar Oct 29 '24 12:10 patrick-stephens

@patrick-stephens @edsiper Ok, so I could trace it back to the fact that there is only lower-case name property working since the mentioned commits. (All other properties are working fine with mixed case, as far as I've tested).

You can test it for example with:

pipeline:
    inputs:
        - Name: dummy
          dummy: '{"endpoint":"localhost", "value":"something"}'
          tag: dummy
    filters:
        - name: grep
          match: '*'
          logical_op: or
          regex:
            - value something
            - value error
    outputs:
        - name: stdout

It's the same issue for all sections (inputs, filters, outputs)

drbugfinder-work avatar Oct 29 '24 14:10 drbugfinder-work

YAML is case-sensitive and this has been raised before that we should really go for the idiomatic helm camelCase standard: https://github.com/fluent/fluent-bit/issues/7593

patrick-stephens avatar Oct 29 '24 14:10 patrick-stephens

I see. However, this is a regression / unexpected change and should be announced within the release notes for the next release. I will close this issue.

drbugfinder-work avatar Oct 29 '24 14:10 drbugfinder-work

Yeah I was merely indicating we should do this but as you say regression here @drbugfinder-work Problem is more we are supporting a lot of different formats, e.g. some have ., some have _ some have upper/lower/mixed. None of that is idiomatic YAML and just is more things to go wrong.

Technically you could provide the same setting multiple times with different case, etc. so what happens then?

patrick-stephens avatar Oct 29 '24 14:10 patrick-stephens

Got [error] [config] section 'input' is missing the 'name' property in fluentbit 3.2.2, replacing - Name: with - name for input plugins fix this issue.

shuaich avatar Nov 25 '24 23:11 shuaich

Fluent Bit does seem to have mixed expectations for cases of properties, I think this suddenly uniquely applying to name is valid to call out as a bug. For example, borrowing the config posted above, I can change it to the following and it will work:

pipeline:
  inputs:
    - name: dummy
      Dummy: '{"endpoint":"localhost", "value":"something"}'
      dummy: '{"something":"different"}'
      Tag: dummy
  filters:
    - name: grep
      match: '*'
      logical_op: or
      regex:
        - value something
        - value error
  outputs:
    - name: stdout

(the first Dummy is what applies)

Feel free to close it again if it's out of line, but I'm reopening this as I think the specific regression is a bug that should be fixed or noted; it is strange for this to apply to some config fields and not others.

braydonk avatar Nov 26 '24 13:11 braydonk

Fluent Bit does seem to have mixed expectations for cases of properties, I think this suddenly uniquely applying to name is valid to call out as a bug. For example, borrowing the config posted above, I can change it to the following and it will work:

pipeline:
  inputs:
    - name: dummy
      Dummy: '{"endpoint":"localhost", "value":"something"}'
      dummy: '{"something":"different"}'
      Tag: dummy
  filters:
    - name: grep
      match: '*'
      logical_op: or
      regex:
        - value something
        - value error
  outputs:
    - name: stdout

(the first Dummy is what applies)

Feel free to close it again if it's out of line, but I'm reopening this as I think the specific regression is a bug that should be fixed or noted; it is strange for this to apply to some config fields and not others.

@braydonk I completely agree with you. This is a regression and appears to be a "side-effect" of another change. I believe it is correct to make everything consistent by switching to the "new" (correct) lower-case YAML format and also replacing the dot-naming of some properties (yes, there are many lines to be changed). However, this change should be done in a planned manner and announced properly. cc @patrick-stephens

drbugfinder-work avatar Dec 03 '24 08:12 drbugfinder-work

https://github.com/fluent/fluent-bit/issues/9743

drbugfinder-work avatar Dec 19 '24 09:12 drbugfinder-work

Auto-closed by CFL PR but this needs importing into here as well.

patrick-stephens avatar Dec 19 '24 14:12 patrick-stephens

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days. Maintainers can add the exempt-stale label.

github-actions[bot] avatar Mar 23 '25 02:03 github-actions[bot]

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days. Maintainers can add the exempt-stale label.

github-actions[bot] avatar Jun 23 '25 02:06 github-actions[bot]

This issue was closed because it has been stalled for 5 days with no activity.

github-actions[bot] avatar Jun 29 '25 02:06 github-actions[bot]