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

More conventional conversion yaml to xml #41044

Merged

Conversation

vitlibar
Copy link
Member

@vitlibar vitlibar commented Sep 6, 2022

Changelog category:

  • Improvement

Changelog entry:

Make conversion YAML -> XML more conventional. A sequence of mappings like

seq:
  - k1: val1
    k2: val2
  - k3: val3

is now converted into the following xml:

<seq><k1>val1</k1><k2>val2</k2></seq>
<seq><k3>val3</k3></seq>

For example,

remote_servers:
    test_cluster:
        shard:
          - replica:
                host: 127.0.0.1
                port: 9000
          - replica:
                host: 127.0.0.2
                port: 9000

is now parsed by YAMLParser as

<remote_servers>
    <test_cluster>
        <shard>
            <replica>
                <host>127.0.0.1</host>
                <port>9000</port>
            </replica>
        </shard>
        <shard>
            <replica>
                <host>127.0.0.2</host>
                <port>9000</port>
            </replica>
        </shard>
    </test_cluster>
</remote_servers>

This PR fixes #40561 and reverts #35135

@vitlibar vitlibar changed the title More conventional conversion yaml to xmk More conventional conversion yaml to xml Sep 6, 2022
@robot-ch-test-poll robot-ch-test-poll added the pr-improvement Pull request with some product improvements label Sep 6, 2022
@vitlibar vitlibar force-pushed the more-conventional-conversion-yaml-to-xmk branch from 7d05423 to f70d7cb Compare September 6, 2022 12:43
@vitlibar vitlibar force-pushed the more-conventional-conversion-yaml-to-xmk branch from f70d7cb to c258c05 Compare September 6, 2022 13:01
@vitlibar vitlibar force-pushed the more-conventional-conversion-yaml-to-xmk branch from c258c05 to 63e992d Compare September 6, 2022 15:10
@Avogar Avogar self-assigned this Sep 7, 2022
@Avogar
Copy link
Member

Avogar commented Sep 7, 2022

AST fuzzer (ubsan) - #29039
Stress test (ubsan) - #41013

@vitlibar vitlibar merged commit 31ed722 into ClickHouse:master Sep 7, 2022
@vitlibar vitlibar deleted the more-conventional-conversion-yaml-to-xmk branch September 7, 2022 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-improvement Pull request with some product improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

parsing config yaml file does not meet expectations
3 participants