-
Notifications
You must be signed in to change notification settings - Fork 894
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
[configuration] Specify YAML schema that configuration files should follow #3973
[configuration] Specify YAML schema that configuration files should follow #3973
Conversation
cc @open-telemetry/configuration-maintainers |
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for following up on this @mx-psi!
@MrAlias and maybe @carlosalberto take a look when you can. I think this should be ready with an additional approval. |
Co-authored-by: Robert Pająk <[email protected]>
…ollow (open-telemetry#3973) Fixes open-telemetry#3962 ## Changes Specifies the YAML schema to follow. A schema is a set of YAML tags (i.e. types) and a way to assign types. YAML 1.2 recommends the 'Core schema': the types are those of JSON. Scalars are resolved as one would expect, see [here](https://yaml.org/spec/1.2.2/#103-core-schema) for the details. One important difference with the way that YAML 1.1 used to work is that integer scalars starting with a `0` are interpreted as being written in decimal notation; e.g. `0123` parses to the integer 123 instead of the integer 83 (you can still use octal notation in YAML 1.2 by using `0o123`). Some YAML parsers deviate from the core schema in how this works, for example, both of the more commonly used YAML parsing libraries in Golang parse `0123` as 83 ([go-yaml/yaml](https://github.com/go-yaml/yaml?tab=readme-ov-file#compatibility) and [goccy/go-yaml](https://github.com/goccy/go-yaml/blob/4653a1bb5c0047bb37280ac341e2f091cb44352f/ast/ast.go#L326)). **This may make it a bit difficult to strictly follow this requirement in some languages**. For non-trivial changes, follow the [change proposal process](https://github.com/open-telemetry/opentelemetry-specification/blob/main/CONTRIBUTING.md#proposing-a-change). * [x] Related issues open-telemetry#3962, part of open-telemetry#3963 --------- Co-authored-by: Robert Pająk <[email protected]> Co-authored-by: jack-berg <[email protected]>
Fixes #3962
Changes
Specifies the YAML schema to follow. A schema is a set of YAML tags (i.e. types) and a way to assign types.
YAML 1.2 recommends the 'Core schema': the types are those of JSON. Scalars are resolved as one would expect, see here for the details.
One important difference with the way that YAML 1.1 used to work is that integer scalars starting with a
0
are interpreted as being written in decimal notation; e.g.0123
parses to the integer 123 instead of the integer 83 (you can still use octal notation in YAML 1.2 by using0o123
). Some YAML parsers deviate from the core schema in how this works, for example, both of the more commonly used YAML parsing libraries in Golang parse0123
as 83 (go-yaml/yaml and goccy/go-yaml). This may make it a bit difficult to strictly follow this requirement in some languages.For non-trivial changes, follow the change proposal process.