-
Notifications
You must be signed in to change notification settings - Fork 525
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
Validation for metadata.service not working #4141
Comments
One more note - since we use the same schema validation for the metadata sent for |
Validations on metadata.service.* fields were not run correctly, changing the schema to properly run validations and adding package tests for verification. fixes elastic#4141
As pointed out by @jalvz the original request from the agents (@felixbarny ) was to make |
Profiling is still experimental, so no big deal if we have to update the Go agent to match the change. |
Validations on metadata.service.* fields were not run correctly, changing the schema to properly run validations and adding package tests for verification. fixes #4141
Validations on metadata.service.* fields were not run correctly, changing the schema to properly run validations and adding package tests for verification. fixes elastic#4141
Turns out that the current way of writing the validation rules for
metadata.service.*
fields in the json-schema is not working properly.Instead of writing e.g.
"properties.agent.required": ["name", "version"]
one would need to expand to objects likeor probably even better, just copy & paste the whole
service
definition and adapt the required fields.Unfortunately this has also been missed in the
package_tests
as tests for metadata are very sparse.Following fields should be changed to the key being
required
and value not being allowed to benull
:metadata.service.name
(currently key required but value allowed to benull
) ,metadata.service.agent
(currently key required but value allowed to benull
), *metadata.service.agent.name
,metadata.service.agent.version
,metadata.service.runtime.name
,metadata.serice.runtime.version
,metadata.service.language.name
(currently key not required and value allowed to benull
)Technically this is a bug and we should fix it; but it would potentially break agents that might not send the required fields.
I suggest to create a fix and ask agents to run their tests against the fixed json schema to see if any current agent versions would break when fixing this.
The bug exists since
7.0
.The text was updated successfully, but these errors were encountered: