-
Notifications
You must be signed in to change notification settings - Fork 127
Enable developer extensions #840
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
Conversation
🌐 Coverage report
|
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.
Looks good.
Added some comments about possible future refactors that may be done to support multiple package types.
My only concern is about cases where we may be accepting that we cannot find the package root.
internal/fields/validate.go
Outdated
| v.Schema, err = loadFieldsFromDir(fieldsDir) | ||
| if err != nil { | ||
| return nil, errors.Wrapf(err, "can't load fields for data stream (path: %s)", dataStreamRootPath) | ||
| return nil, errors.Wrapf(err, "can't load fields for data stream (path: %s)", fieldsParentDir) |
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.
Nit. This message is also now about input packages, right? We may need to change this error message.
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.
Fixed
| if err != nil { | ||
| return nil, errors.Wrap(err, "can't find package root") | ||
| } | ||
| if !found { |
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.
Could this hide problems with malformed packages?
On what cases is it ok to not find the package root? Could you add a comment here about 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.
I added a comment, let me know what do you think.
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.
Ok, we can revisit this if found to be problematic at some point. Would it make sense to add a debug message here?
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.
Sure!
| if err != nil { | ||
| return nil, errors.Wrap(err, "can't find package root") | ||
| } | ||
| if !found { |
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.
Ok, we can revisit this if found to be problematic at some point. Would it make sense to add a debug message here?
Meta-issue: elastic/package-spec#319
Changes:
Related:
elastic/package-spec#350