-
Notifications
You must be signed in to change notification settings - Fork 30
Closed
Description
The following schema:
"MetricReader": {
"type": ["object", "null"],
"additionalProperties": false,
"minProperties": 1,
"maxProperties": 2,
"properties": {
"periodic": {
"$ref": "#/$defs/PeriodicMetricReader"
},
"pull": {
"$ref": "#/$defs/PullMetricReader"
},
"producers": {
"type": "array",
"items": {
"$ref": "#/$defs/MetricProducer"
}
}
}
},
is causing semantic issues.
Previously, it contained only "periodic" and "pull" properties, with max properties = 1, meaning a metric reader is either periodic or pull.
When producers was added, max properties was changed to 2.
This allows "periodic" + "producers", or "pull" + "producers", which is the intent (as I understand).
This however also allows to have both "periodic" and "pull", which are no longer mutually exclusive.
This opens the schema validation to unintended configurations, pushing this downstream to the SDK implementation.
If this combination is not allowed, this must be clarified explicitly:
- for end users, to know what to expect
- for SDK implementors, to test explicitly this case, so it can be handled correctly.
Found while implementing config.yaml for C++:
jack-bergbrettmc
Metadata
Metadata
Assignees
Labels
No labels