-
Notifications
You must be signed in to change notification settings - Fork 26
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
Improve output when PMD is invalid #385
Comments
Out of scope for 2.2.0 |
We were discussing about this internally... Are you referring to the details that are gathered internally, for example here: or here The latter already includes all error message related to JSON parsing and validation and publishes it to the "badProviderMetadata" feed. Currently, it seems that this is already gathered in the topics, but there is no way to actually output the error message. Instead, only |
As @oxisto already mentioned, a possible and trivial solution would be to add logging to the @@ -127,16 +127,22 @@ func (m *topicMessages) add(typ MessageType, format string, args ...any) {
// error adds an error message to this topic.
func (m *topicMessages) error(format string, args ...any) {
m.add(ErrorType, format, args...)
+ // Print messages to notify user what went wrong
+ slog.Error(format, args)
}
// warn adds a warning message to this topic.
func (m *topicMessages) warn(format string, args ...any) {
m.add(WarnType, format, args...)
+ // Log message to warn user what maybe went wrong
+ slog.Warn(format, args)
}
// info adds an info message to this topic.
func (m *topicMessages) info(format string, args ...any) {
m.add(InfoType, format, args...)
+ // Log message to notify user what happened
+ slog.Info(format, args)
}
// use signals that we going to use this topic.
Or did you have something else in mind? |
Sounds good to allow the details of failed JSON parsing or schema check to be communicated to the user. This is for the PMD, but we should also do it for the documents itself, see sister issue #572. We should check if the downloader and aggregator should also get that diagnostic messages (so they can enable it) or if they could get a message like: Use the checker to see more. |
Currently, we need to find a valid PMD to run the checks. However, that does not help the user, if he made a mistake in creating the PMD. We should provide more insights (JSON parse, JSON schema validation, etc.) what went wrong to support the users.
The text was updated successfully, but these errors were encountered: