open-telemetry / opentelemetry-configuration

JSON Schema definitions for OpenTelemetry file configuration
Apache License 2.0
41 stars 17 forks source link

Should file_format follow semantic versioning? #2

Open jack-berg opened 1 year ago

jack-berg commented 1 year ago

file_format currently includes major and minor, and but no patch version. This was originally discussed here.

Should we revisit this and include patch as well?

tsloughter commented 1 year ago

Patch may always be 0 but is there anything gained from leaving out the .0? So I'd lean towards including it just so its not "different".

MikeGoldsmith commented 1 year ago

+1 - even if we never use it, it's good to have the option.

pirgeo commented 1 year ago

Is there any downside to having it? On the other hand: Would there ever be a situation where we want to release a patch version?

MikeGoldsmith commented 1 year ago

I don't think there are any negatives to having it, beyond it never getting used.

marcalff commented 2 months ago

Note that nothing requires the file format to be a version number currently, this is what the examples do, but not what the schema enforces:

"properties": {
        "file_format": {
            "type": "string"
        }
    },

This opens two underlying questions to address.

Requirements on the parser implementation

We need to define what an implementation is expected to do, when parsing a config.yaml document.

Assume an implementation supports a format known as "1.10.20".

When a document that contains the following formats is found, we need to clarify what the reasonable behavior is for the implementation of config.yaml:

For example

Guidelines for schema versioning

When the schema itself changes, another question is when to change the major / minor / patch version number.

For example:

makes sense, but the the story gets more complicated very quickly.

When adding a mandatory attribute to a node that itself is optional (say, define configuration for a new exporter), is this a change in patch version only, or a change in minor version ?

These guidelines needs to be clarified before reaching schema 1.0.0

jack-berg commented 1 month ago

Great summary @marcalff.

Some thoughts:

When adding a mandatory attribute to a node that itself is optional (say, define configuration for a new exporter), is this a change in patch version only, or a change in minor version ?

By my logic, this is a breaking change that required a major version. Therefore, its extremely important to get the mandatory fields correct the first time we release any new type. In my experience, this is common in schema versioning.