Skip to content

[Proposal] Disallow dotted YAML key names #538

@andrewkroh

Description

@andrewkroh

I propose that package-spec disallows dotted key names in the YAML used to define packages. Allowing dotted key names leads to ambiguous specifications. It also increases the complexity of properly parsing the specification because the parse needs to account for fields that maybe defined in more than one way. In the two ambiguous examples below the specification is clear in that both kibana and elasticsearch are to be objects. 1 2 But from a validation point of view these are accepted by elastic-package.

conditions:
  kibana.version: '^8.8.0'

  kibana:
    version: '^8.10.0'
elasticsearch.dynamic_dataset: true

elasticsearch:
  dynamic_dataset: false

There are many examples of this occurring in packages:

Footnotes

  1. https://github.com/elastic/package-spec/blob/18849a4d552c24ed5fc4626365f6d8d13501bec9/spec/integration/manifest.spec.yml#L104-L107

  2. https://github.com/elastic/package-spec/blob/54365210c7d800b662c520668fb79a12d1ee26ef/spec/integration/data_stream/manifest.spec.yml#L264-L267

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions