Skip to content

Allow interpret keys as native list, not just CSV string #1864

@JWCS

Description

@JWCS

Currently keys are treated as CSV strings, ex

creation_rules:
    - pgp: >-
        85D77543B3D624B63CEA9E6DBC17301B491B3F21,
        FBC7B9E2A4F9289AC0C1D4843D16CEE4A27381B4

I've been bitten by two problems recurringly with this format.

  1. Comments aren't allowed in yaml block scalar form. It's hard to add metadata (ex, this is the semantic identity of this key), without comments.
  2. There's an annoying error when there's a trailing comma on the last element, "" isn't a valid key. This could ofc be itself fixed... but it's symptomatic of not using a native list format, but deferring to a secondary parser and syntax. This is especially the case when the keys might be auto generated, moved around, etc...

Ex

creation_rules:
    - pgp:
        - 85D77543B3D624B63CEA9E6DBC17301B491B3F21 # [email protected]
        - FBC7B9E2A4F9289AC0C1D4843D16CEE4A27381B4 # server_XZY

Note: this shouldn't be a breaking change, so long as its a loosening of the restrictions; ie typeof(pgp) == string | list<string>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions