Commit graph

3659 commits

Author SHA1 Message Date
Colin Surprenant
af4cdb6be2 environment when not in package context
remove unused constants
2015-05-05 07:58:11 -04:00
Colin Surprenant
48bcc5b74d cleanup dependencies and rely on logstash-core gem
remove unused load path

use either local core lib dir or logstash-core gem

include spec in logstash-core

do not include lib, spec and locales dirs in package root

environment bootstrapping in lib/bootstrap.rb

added comments

move pluginmanager out of logstash-core

kafla installation solved by pluginmanager refactor

refactor bootstrap code

refactor shell scripts to simplify and DRY, indirect rspec command to our ruby launcher

add bin/rspec

cut by half the bin/plugin and bin/rspec startup time

fix drip context

use printf instead of tr

updated Windows bin scripts

missing gemspec in gemspec

use gem instead of gemspec so our plugin manager can correctly install logstash-core

generate packages including locally built logstash-core gem

move jenkins developmnent dependencies into Gemfile, they do not belong in logstash-core

path leftover

clean help agent help usage message and remore rspec in available command

comments cosmetics

update Bundler dependency, all recent testing have been made with 1.9.4

updated .lock file with regard to updated Gemfile

cleanup gemspec, Gemfile and regen .lock file

added progress output

avoid dual require on version

closes #3096
2015-05-04 18:17:22 -04:00
Colin Surprenant
3dabba80fa revert multi_filter removal and add check for cancelled events
add filter and flush compiles functions specs

missing multiline filter for core specs

fixes #3100
2015-04-27 13:54:18 -04:00
Colin Surprenant
f8f2609c1b remove setup! and add :clean to uninstall 2015-04-22 17:42:16 +02:00
Pier-Hugues Pellerin
362953b312 Make sure we setup the gem environment before finding the currently installed gems
Fixes #3063
2015-04-21 14:59:37 +00:00
Pier-Hugues Pellerin
b4b8817b4e fix an issue with bin/plugin update with no arguments and no locally installed gems
Fixes #3063
2015-04-21 14:59:36 +00:00
Colin Surprenant
902c2f4710 bundler refactor leftover 2015-04-21 13:07:40 +02:00
Pier-Hugues Pellerin
cc3f9d6ac4 Do not return an empty metadata key hash when calling to_hash_with_metadata
Fixes #3034
2015-04-20 22:59:04 +00:00
Pere Urbon-Bayes
be1c6e30d0 fix relative pathname lookup while installing a local .gem file
use double quotes for the require

Fixes #3040
2015-04-17 16:43:06 +00:00
Pier-Hugues Pellerin
8f8509f0fc wrong link for the config type :bytes documentation
Fixes #3041
2015-04-17 16:15:41 +00:00
Colin Surprenant
cbb225db35 fix for Java 8 Map merge method conflict
typo

DRYied code, comments, cleanup

added spec

specs DRYing

also test HashMap, refactor with shared_example

fixes logstash-plugins/logstash-filter-multiline#10
2015-04-17 14:40:50 +02:00
Colin Surprenant
ae17b4160d refactored all gem/bundler code into logstash/bundler.rb and moved patches into logstash/patches
require bundler/cli to expose expectations classes
2015-04-16 17:34:51 +02:00
Joao Duarte
3eb5ba6450 remove multi_filter 2015-04-15 23:18:32 +02:00
Colin Surprenant
573149b002 refactor conditionals generation
added specs
2015-04-15 23:16:06 +02:00
Tal Levy
2e1b879431 fix include to support nil and array types
Closes logstash-plugins/logstash-filter-mutate/#21.

Fixes #3023
2015-04-15 20:35:17 +00:00
Colin Surprenant
98a5f2348c fix java enumerable integration bug
Fixes #3022
2015-04-15 19:59:18 +00:00
Colin Surprenant
e599284e62 add Java Collection delete, & and | support. refactored Java interfaces equivalence. specs & more java_integration specs
add Java Collection delete support with specs & more java_integration specs

split a spec

refactored for better specs

intersection specs

Ruby intersection on Java collections, refactored to use Java interfaces

specs for remove_tag from events from json input

refactor usage of subject

added Java Collection union with Ruby array and specs

refactored specs to also test for hash from deserialized json for JrJackson & Java Collections

typo and comments

solves #2261
2015-04-15 12:46:22 +02:00
Pere Urbon-Bayes
1cbe1791d1 add the concept of a jar manager to load jars within plugins
make the jar manager to have some of the checks already present in the old load_elasticsearch_jars

removed the load_elasticsearch_jars! method as it's a legacy code from when ES was delivered within LS, nowadays this comes within the differents plugins

clean up Environment::JAR_DIR as is another legacy variable not used anymore

move the jar loading code within the environment module

ammend previous commit adding more clear code

ammend previous commits

added a few simple unit test for the jar manager in the environment module

refactor spec naming

dry out common code for loading jars

clean up env_spec bein in the util dir

cleaning up logstash-core dependencies related to jar-dependencies

ammend stale maen patches created for the LS way of using maven plugins

applied some comments coming from the review by @ph

bring back the maven tools and jar-dependency code as we still need some code like this for the kafka plugins

Revert "bring back the maven tools and jar-dependency code as we still need some code like this for the kafka plugins"

This reverts commit c23f456362776c0a600d78369c2ece8789fa49c2.

Fixes #2980
2015-04-14 15:59:31 +00:00
Tal Levy
2c8802710b Fixes Event#include? to properly check for field
Beforehand, Event#include? would depend on a value of a certain
field to be non-nil as the signal that a field exists. This breaks
when a field's value is nil, even if the field exists. It is now
possible to check for existance of both normal and metadata fields.

Closes #2977.

Fixes #2997
2015-04-13 21:54:41 +00:00
Pier-Hugues Pellerin
2e1bcc145a Add logstash plugin verification on the .gem file
Fixes #2946
2015-04-09 13:52:08 +00:00
Pier-Hugues Pellerin
25926f7f85 Rename plugin_list to plugins_arg to make it clearer it is user submitted content.
Fixes #2946
2015-04-09 13:52:08 +00:00
Pier-Hugues Pellerin
244be5cbb6 make the conditionals use a positive if
Fixes #2946
2015-04-09 13:52:08 +00:00
Pier-Hugues Pellerin
764df9e477 typo
Fixes #2946
2015-04-09 13:52:07 +00:00
Pier-Hugues Pellerin
0839c4da6c Move the verify? outside the verify! method, easier to unit test
Fixes #2946
2015-04-09 13:52:07 +00:00
Pier-Hugues Pellerin
e9e8217f71 Shorter error message for manual plugins
Fixes #2946
2015-04-09 13:52:06 +00:00
Pier-Hugues Pellerin
f2d9c7db5b Aborded -> Aborted
Fixes #2946
2015-04-09 13:52:06 +00:00
Pier-Hugues Pellerin
7518a6aa3d Renaming base -> Command and Fixing bin/plugin list
Fixes #2946
2015-04-09 13:52:06 +00:00
Pier-Hugues Pellerin
090cf0186b typo orignal -> original
Fixes #2946
2015-04-09 13:52:05 +00:00
Pier-Hugues Pellerin
1b0160a77e uses local_gems
Fixes #2946
2015-04-09 13:52:05 +00:00
Pier-Hugues Pellerin
96b6893ebc Allow the installation of a plugin from a .gem, refactor the plugin manager classes.
do not change the gemfile or the .lock

Fixes #2946
2015-04-09 13:52:05 +00:00
Colin Surprenant
380ea33708 refactor test tasks, test:plugins now correctly run specs of installed plugins, including local ones
robustness in shutdown handling and other thread safeties
2015-04-08 08:43:49 -04:00
Colin Surprenant
dbe4154aa6 1.5 pipeline performance regressions fixes
rework output function init

removed double logger.debug

use event constant

fix LogStash::SHUTDOWN to actually be the shutdown signal event push in the pipeline

fix outputs conditionals handling

code gen methods not lambdas, remove intermediate arrays, base multi_filter to simplify code gen

remove block from filter_func

force_encoding at compile time

commented multi_filter method

typo

DRY & cleanups

optimizations: string constants, timestamp initialization, useless logger instance

specs for signal events

Filters::Base interface and multi_filter method

closes #2870

Fixes #2869
2015-03-30 20:07:58 +00:00
Joao Duarte
4a3c9e7be5 remove explicit clone set up on output workers
Fixes #2876
2015-03-24 21:06:11 +00:00
Joao Duarte
3763ecba67 remove deprecation notices when output workers > 1
When workers is set to > 1, new plugin instances are created using a params hash
that contains both the user-specified config parameters and the default ones.
This causes deprecation notices to be printed, even though the user never specified
a deprecated config setting.
Thus, new workers should be created using only the "original" set of config parameters.

Fixes #2876
2015-03-24 21:06:10 +00:00
Tal Levy
203d1e5fc7 raise error when formatting time without @timestamp field
Closes #2730

Fixes #2736
2015-03-09 22:57:39 +00:00
Tal Levy
9a4bcf1f10 do not wrap existing Password type into another Password type when validating
Fixes #2767
2015-03-04 22:29:08 +00:00
Joao Duarte
6b326945a3 Revert "handle LogStash::Gemfile file handle closing"
This reverts commit a473fd6a6f.

Fixes #2748
2015-03-03 14:17:19 +00:00
Pier-Hugues Pellerin
de27d9f0a0 Use warn level instead of error level when a plugin is using the milestone method in the plugin
Fixes #2735
2015-03-03 00:19:13 +00:00
Joao Duarte
057238eb0f handle LogStash::Gemfile file handle closing
Fixes #2740
2015-03-03 00:07:49 +00:00
Colin Surprenant
1ccfd1cf0f changed working
Fixes #2739
2015-03-02 23:06:22 +00:00
Colin Surprenant
1254573a43 show update status
Fixes #2739
2015-03-02 23:06:22 +00:00
Colin Surprenant
1dd82abee0 comment fix
Fixes #2739
2015-03-02 23:06:21 +00:00
Pier-Hugues Pellerin
d98f2b45cb We need to call bundler_setup! before getting the list of the installed gems if we want to support the :path and :git option in the gemfile
Fixes #2732
2015-03-02 20:10:04 +00:00
Pere Urbon-Bayes
d44b58bcdc add an option to bundler_setup! to handle testing environment where development dependencies should not be excluded in order to run proper tests
as a request during review, I made the signature of bundler_setup use the same as invoke_bundler

remove empty line in bundler_setup

ammend last commit

Fixes #2726
2015-03-02 16:05:54 +00:00
Colin Surprenant
4319119e60 set BUNDLE_GEMFILE before requiring bundler
Fixes #2721
2015-03-02 14:53:27 +00:00
Colin Surprenant
6840da52f8 also set Gemfile path in ENV
Fixes #2717
2015-02-27 21:06:42 +00:00
Pier-Hugues Pellerin
f97c01da06 Call bundle clean after doing a bundle update to remove unused gems
Fixes #2703
2015-02-26 23:25:31 +00:00
Colin Surprenant
001c609179 correctly support :clean option
Fixes #2703
2015-02-26 23:25:30 +00:00
Colin Surprenant
4edbf5d32b correctly override & init bundler settings
Fixes #2703
2015-02-26 23:25:30 +00:00
Pier-Hugues Pellerin
b376d913bd When we do a uninstall we are actually doing a bundle install --clean
Fixes #2703
2015-02-26 23:25:29 +00:00