Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WiP] Enhanced config validation mechanism for logstash plugins #5779

Closed
wants to merge 1 commit into from

Conversation

purbon
Copy link
Contributor

@purbon purbon commented Aug 18, 2016

This PR has been created as work in progress example to have initial revision.

  • introduction of validators and coercers to simplify to simplify the config mixin.
  • add default code to handle class and proc based validators
  • add the option to pass the params object to the validators to they can actually do cross validation

There are a lot of things that can, could and for sure will change in this PR, opened this as discussed with @jordansissel and @jsvd to have a tool to discuss.

TODO (pending):

  • Reuse and simplify coercers and validators organization, for example with settings.
  • Improve test coverage and organization.

Test:

Current test pas at core level and also locally I updated the file and jdbc inputs and the date filter with passing tests, as this touches and important component of LS, more detailed test will be pulled to be sure there no missing bit pending.

Notes to reviewers

Please focus on:

  • If you like the idea and think is powerful enough to help improve the config tests.
  • Do you miss an abstraction? could a class be written differently?

Think will be a living creature to don't think of this as something final, we might not even merge it 馃樃.

For more details check #5778

* add new structure call config::mixinnextgen to map new layout for the config mixin
* add default code to handle class and proc validators
* add the option to pass the params object to the validators to they can actually do cross validation
* add the concept of BlockValidator used to wrap anything that respond to call
@purbon
Copy link
Contributor Author

purbon commented Aug 18, 2016

@andrewvc @jordansissel @guyboertje you might like to take a look here, this is actually the first sketch with happy tests all over from the idea I just shared with you.

@jsvd this is the PR we spoke about this morning, looking forward to see how the setting and this coercions could be DRY'ed.

@kares
Copy link
Contributor

kares commented Mar 9, 2020

seems this WiP is no longer relevant. should be restarted with a clean slate if anyone feels otherwise.

@kares kares closed this Mar 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants