-
Notifications
You must be signed in to change notification settings - Fork 13
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
feat: serverSide validation error markers #190
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -99,6 +102,28 @@ export function validateOtelCollectorConfigurationAndSetMarkers( | |||
} | |||
if (!totalErrors.jsYamlError) { | |||
customValidate(mainItemsData, serviceItemsData, errorMarkers, totalErrors, configData); | |||
const serverSideErrorElement = findErrorElement(serverSideValidationPath, parsedYamlConfig); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: Add tests for this :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the functions that used for serverSide markers are already have tests. (used the same functions as for ajv error markers) @bripkens
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So if that is the case, does that mean that this new code can be deleted and there will be a red test? :)
@bripkens removed server-side word |
We need to deduplicate errors on the same path: if two errors are found on the same path, the server-side error takes precedence, see attached screenshot (repro). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need error deduplication, see comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's get this merged and then iterate on the presentation and de-duplication.
db19955
to
2bc1570
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
No description provided.