-
Notifications
You must be signed in to change notification settings - Fork 117
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
Add support to filter errors in packages based on codes #1467
Conversation
3bd1eeb
to
246577f
Compare
buildkite test this |
1 similar comment
buildkite test this |
cmd/lint.go
Outdated
return fmt.Errorf("linting package failed: %w", err) | ||
errs, skipped := validation.ValidateAndFilterFromPath(packageRootPath) | ||
if skipped != nil { | ||
logger.Infof("skipped errors: %v", skipped) |
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.
Should we log these at the warning level instead?
internal/validation/validation.go
Outdated
return allErrors, nil, nil | ||
} | ||
|
||
config, err := processors.LoadConfigFilter(fsys, configPath) |
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.
I still see this "processors" name as a too generic name, specially when used externally, but lets continue with it.
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.
Just changed all the code in processors to be in the same specerrors
.
Co-authored-by: Jaime Soriano Pastor <[email protected]>
Co-authored-by: Jaime Soriano Pastor <[email protected]>
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.
LGTM
💚 Build Succeeded
History
cc @mrodm |
@@ -0,0 +1,45 @@ | |||
# HOWTO: Filter errors based on Validation Codes |
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.
Added doc about how filtering errors should be set up.
Updated with the latest package-spec version and added a new doc about how to filter errors based on the codes. |
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.
Ship it! ⛵
Relates elastic/package-spec#558
This PR adds the required support to filter errors based on the errors configuration (
errors.yml
validation.yml
) for both directories and zip packages.This PR depends on a new package-spec version including the structured errors.