-
Couldn't load subscription status.
- Fork 87
Add validation for template_path at input packages
#1000
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 validation for template_path at input packages
#1000
Conversation
input packagestemplate_path at input packages
… directories and add corresponding tests
…multiple directories and add corresponding tests" This reverts commit 203245d.
|
test integrations |
|
Created or updated PR in integrations repository to test this version. Check elastic/integrations#15689 |
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!
Just a doubt about the type used for Type field.-
code/go/internal/validator/semantic/validate_input_policy_template_template_path.go
Outdated
Show resolved
Hide resolved
code/go/internal/validator/semantic/validate_input_policy_template_template_path.go
Outdated
Show resolved
Hide resolved
💚 Build Succeeded
History
|
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.
Thanks!
What does this PR do?
inputtype packages regarding thetemplate_pathat thepolicy_templateinput specto have the fieldtemplate_pathrequiredWhy is it important?
When an
inputpackage does not define itstemplate_pathat thepolicy_templatesobjects, fleet throws an errorhere
This is caused because, the stream created from the input here has an undefined
template_path. For inputs, there is no default value.When a value is defined at
template_path,fleetlooks for the asset taking into account it ends with the given value here so it might be under theagents/inputfolder, or any other as long as it ends with the value.Checklist
Added unit tests for the validation rule
I have added test packages to
test/packagesthat prove my change is effective.I have added an entry in
spec/changelog.yml.Related issues
Resolves partially #703