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

config_format: yaml: add support for idiomatic Yaml camelCase (fix #7593) #7879

Merged
merged 8 commits into from
Aug 30, 2023

Conversation

edsiper
Copy link
Member

@edsiper edsiper commented Aug 30, 2023

The current Yaml reader is agnostic from the keys format, it only cares to convert them to lower
case so the backend layer can configure the properties properly. The following is an non-idiomatic
example:

    env:
        flushInterval: 1

    service:
        flush: ${flushInterval}

    pipeline:
        inputs:
            - name: random
              Interval_Sec: 1

        filters:
            - name: record_modifier
              match: "*"
              record: powered_by calyptia
              uuid_key: abc

        outputs:
            - name: stdout
              match: "*"

The following patch make the Yaml parser to be idiomatic by supporting a compatible layer with
camelCase style for key names, e.g:

    env:
        flushInterval: 1

    service:
        flush: ${flushInterval}

    pipeline:
        inputs:
            - name: random
              intervalSec: 1

        filters:
            - name: record_modifier
              match: "*"
              record: powered_by calyptia
              uuidKey: abc

        outputs:
            - name: stdout
              match: "*"        

Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.

)

The current Yaml reader is agnostic from the keys format, it only cares to convert them to lower
case so the backend layer can configure the properties properly. The following is an non-idiomatic
example:

env:
    flushInterval: 1

service:
    flush: ${flushInterval}

pipeline:
    inputs:
        - name: random
          Interval_Sec: 1

    filters:
        - name: record_modifier
          match: "*"
          record: powered_by calyptia
          uuid_key: abc

    outputs:
        - name: stdout
          match: "*"

The following patch make the Yaml parser to be idiomatic by supporting a compatible layer with
camelCase style for key names, e.g:

env:
    flushInterval: 1

service:
    flush: ${flushInterval}

pipeline:
    inputs:
        - name: random
          intervalSec: 1

    filters:
        - name: record_modifier
          match: "*"
          record: powered_by calyptia
          uuidKey: abc

    outputs:
        - name: stdout
          match: "*"

Signed-off-by: Eduardo Silva <[email protected]>
@edsiper edsiper temporarily deployed to pr August 30, 2023 05:21 — with GitHub Actions Inactive
@edsiper edsiper temporarily deployed to pr August 30, 2023 05:21 — with GitHub Actions Inactive
@edsiper edsiper temporarily deployed to pr August 30, 2023 05:21 — with GitHub Actions Inactive
@edsiper edsiper temporarily deployed to pr August 30, 2023 05:48 — with GitHub Actions Inactive
@edsiper edsiper temporarily deployed to pr August 30, 2023 14:44 — with GitHub Actions Inactive
@edsiper edsiper temporarily deployed to pr August 30, 2023 14:44 — with GitHub Actions Inactive
@edsiper edsiper temporarily deployed to pr August 30, 2023 14:44 — with GitHub Actions Inactive
@edsiper edsiper temporarily deployed to pr August 30, 2023 15:14 — with GitHub Actions Inactive
@edsiper edsiper temporarily deployed to pr August 30, 2023 16:30 — with GitHub Actions Inactive
@edsiper edsiper temporarily deployed to pr August 30, 2023 16:30 — with GitHub Actions Inactive
@edsiper edsiper temporarily deployed to pr August 30, 2023 16:30 — with GitHub Actions Inactive
@edsiper edsiper temporarily deployed to pr August 30, 2023 17:01 — with GitHub Actions Inactive
@edsiper
Copy link
Member Author

edsiper commented Aug 30, 2023

it seems good to go, the only issue is on the macos test that only fails in CI

@edsiper edsiper merged commit 7ab07aa into master Aug 30, 2023
@edsiper edsiper deleted the yaml-snake-to-camel branch August 30, 2023 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant