-
Notifications
You must be signed in to change notification settings - Fork 18
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
MetricReader allows invalid configurations #138
Comments
A possible fix is to move the "producers" property in each "periodic" and "pull" node. |
Relevant links: |
According to the schema, a metric reader can also have only "producers", as this satisfies min properties = 1. This is invalid, I think this part of the schema should be revisited. |
We could add documentation to type_descriptions.yaml that states that including both |
+1 that this part of the schema is difficult to implement as-is. I am quite stuck when trying to devise a working implementation for PHP.
I haven't tested it out, but I do feel that this would be a lot easier to implement... |
The following schema:
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:
Found while implementing config.yaml for C++:
The text was updated successfully, but these errors were encountered: