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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR Review Updates #6

Merged

Conversation

Bargs
Copy link

@Bargs Bargs commented Feb 26, 2016

@BigFunger I've made some updates to your first PR that I'd like you to review and, if you're good with them, merge into your branch before we merge the PR into the Kibana feature/ingest branch.

Here are the highlights of what I changed:

  • Created integration tests for the simulate endpoint and simulation of the set processor
  • Created Joi schemas for the Kibana simulate API payload document and the set processor. Established a pattern for creating Joi schemas for future processors.
  • Enforced snake_case in simulate API payloads to adhere to Kibana conventions.
  • Pulled getDefinition methods out of ingest_processor_types.js and into their own special "converters" module. I'm guessing this might be the most controversial change, so let me explain my reasoning. I've found in the past that it's best to separate model objects (I use that term a bit loosely here) from the logic that serializes them to different formats. It helps keep the ES specific knowledge encapsulated on the server side and it decouples our models from a specific serialization format which gives us the flexibility to provide different types of converters in the future (for instance, one for the "Kibana processor schema" and one for the "ES processor schema"). It also establishes a nice pattern for converting any Kibana API document to an ES API document in the future, all the converters can live in the same place so they're easy to find and manage.
  • Switched to using callWithRequest instead of the raw elasticsearch.js client so that authorization headers are passed along.
  • Updated some variables names to make things more explicit

Let me know what you think.

BigFunger added a commit that referenced this pull request Mar 9, 2016
@BigFunger BigFunger merged commit 2c7a7ba into BigFunger:ingest-pipeline-setup-server Mar 9, 2016
BigFunger pushed a commit that referenced this pull request Sep 6, 2016
BigFunger pushed a commit that referenced this pull request Aug 3, 2017
* Initial commit

* added actual config

* version 0.0.1

* version 0.0.2

* [no-const-assign] Disallow assignment to const

http://eslint.org/docs/rules/no-const-assign

* [no-redeclare] Disallow redeclaring variables

http://eslint.org/docs/rules/no-redeclare

* version 0.0.3

* [no-unused-vars]: Disallow declaration of variables that are not used in the code.

* Bump to 0.1.0.

* upgrade deps in preperation for babel6 transition

* 0.2.0-alpha1

* use yaml for readability

* 0.2.0

* update/pin peed dependency versions

* 0.2.1

* [quotes] allow template literals

This allows eslint to validate this rule from the styleguide: https://github.com/elastic/kibana/blob/master/style_guides/js_style_guide.md#use-template-strings-to-avoid-escaping-single-quotes

* 0.2.2

* add object-curly-spacing and no-global-assign rules

* sort .eslintrc.yaml rules

* 0.3.0

* add basic react support

* 0.4.0

* Disallow using 'context' in tests

* 0.5.0

* move from .eslintrc.yaml to .eslintrc.js without .json generation (#6)

* Implement import plugin (#7)

* update deps

* include eslint-plugin-import

* Dereference import config (#8)

* reorganize existing rules into groups

* defreference eslint-plugin-import "recommended" config

Based on https://github.com/benmosher/eslint-plugin-import/blob/ea9c92c7324473ef303ac76b127e17af2becd2ee/config/recommended.js

* 0.6.0

* set environment info for import rule

* 0.6.1

* update peerDependencies

* 0.7.0

* Move eslint-config-kibana into packages directory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants