Commit graph

249 commits

Author SHA1 Message Date
Joao Duarte
dd02422912 converted static I18n test to rspec
Fixes #5158
2016-04-27 14:49:41 +00:00
Joao Duarte
b77b021607 add static analysis rake task for i18n usage
Fixes #5158
2016-04-27 14:49:41 +00:00
Pier-Hugues Pellerin
cb18b76596 1g
Fixes #5198
2016-04-26 19:35:17 +00:00
Pier-Hugues Pellerin
04dfefcff1 Set the HEAP Size to 1gig when running rake tasks
Logstash uses by default in the shell script 1 gig of memory for the
JVM. but when we use rake it uses the default settings of JRUBY and
start a vm 500megs of memory. The recent changes in JRUBY and
JRuby-OpenSSL have increased the base memory and make the installing of
plugins with a OOM issues. This PR make sure the CI scripts and the rake
jruby launch uses the default of 1gig.

Fixes: #5179

Fixes #5198
2016-04-26 19:35:17 +00:00
Jordan Sissel
8809a632b4 Force RPM OS to be set to linux. Fixes #5147
Fixes #5156
2016-04-21 15:08:46 +00:00
Colin Surprenant
5de3ce40d1 upgrade to JRuby 1.7.25 and required jruby-openssl 0.9.16 to match JRuby 2016-04-20 14:04:53 -04:00
Pier-Hugues Pellerin
b85845706c Normalize the name of the generated artifacts
This PR introduce a unified naming scheme for all our artifacts and will
produce the following files:

logstash-5.0.0-alpha1_all.deb
logstash-5.0.0-alpha1.tar.gz
logstash-5.0.0-alpha1.zip
logstash-5.0.0-alpha1.noarch.rpm

Fix #5100

Fixes #5125
2016-04-18 13:22:28 +00:00
Tal Levy
6c609a3010 build core gems in same process as rake command instead of spawning new process
Fixes #5075
2016-04-11 21:26:23 +00:00
Pier-Hugues Pellerin
97352c7960 Remove some plugins that failed the build when creating the tar.gz
Fixes #5054
2016-04-07 14:39:36 +00:00
Pere Urbon-Bayes
147937643c fix Rakelib package.rake to use logstash-plugin pack to generate the plugins bundle
Fixes #5049
2016-04-07 13:06:00 +00:00
Colin Surprenant
3862514388 revert to jruby 1.7.23 for regex regression 2016-04-04 14:37:38 -04:00
Pere Urbon-Bayes
613a7d6924 Make the logstash-core-plugin-api install locally in case of having a :path in the Gemfile, works the same way as other "core" gems used for master branch.
Fixes #4908
2016-03-29 13:47:17 +00:00
Suyog Rao
683302e26d Rename bin/plugin to bin/logstash-plugin
This adds support for packs and fixes the problem where bin/plugin
pollutes the PATH namespace

Fixes #4871

Fixes #4874
2016-03-24 00:23:15 +00:00
Joao Duarte
fffe5883ae include hidden ruby-maven directory in packaging
ruby-maven ships a hidden directory called .mvn that
needs to be included in the package.
Currently the list of files to be packaged is generated using
Rake::FileList[globs] which excludes hidden files by default
(same happens with Dir.glob).

The fix is to ensure the contents of that directory are included
by explicitly referencing it.

For example, the file "extensions.xml", included in this directory,
is responsible for loading the ruby DSL for POMs. Not carrying this
file in the logstash package breaks any plugin update that uses
jar-dependencies.

Fixes #4845
2016-03-18 20:48:29 +00:00
Pere Urbon-Bayes
42710a4ffd add expectations for json and plain text responses for the hot threads api tests
format test properly for the node_spec api

Introduce a more proper organization of the dummy/mock runner to avoid
having wrong state propagaged across the different tests. This was
discovered by the unnecessary need to have the rubydebug codec as it was
due to wrong pipeline startup.

make the node stats test sync with last changes in data formats

improve web api service logic from reviews

remove the requirement of using output-null as only with output {} you get the same effect

Fixes #4782
2016-03-14 14:07:25 +00:00
Pere Urbon-Bayes
79e2d0040f Make sure all web api test are actually going through the hole pipe and getting data out of a real logstash execution.
Test improvements:

* Cleanup non used fixture.
* Improve node_stats tests by adding omre context and format checks.
* Add a new node_specs endpoint test that checks the expected data is
  returned for the hot_threads resource.

Fixes #4782
2016-03-14 14:07:25 +00:00
JWhy
c75a7af326 Fix deb packaging task description
Fix description of the task package("ubuntu", ...). Likely caused by copy-paste.

Fixes #4601
2016-02-02 14:25:51 +00:00
Colin Surprenant
5a522a0037 code cleanups and integration work for defaulting to Java Event implementation
cleaned dependencies, removed Guava code

default to java event

also compile java event

use json-unit for json result assertions

remove Java 8 specific constructs to be able to compile on Java 7

use jar-dependencies

better jar file loading

copy jar into lib after build

add post-build copy and clean of gem jar and re-indented file

fix jar destination

include generated jar in gem

remove useless ArrayList constructions

add tests for KeyNode.join method

remove useless  shadow and disable unchecked warnings

update gradle dependency to 2.8

fix deprecated asserEquals usage

simplify convoluted list contruction

fix array fields nil values handling

moar nil value tests

simplify for loop
2016-01-26 12:39:35 -05:00
Pier-Hugues Pellerin
f10ed19457 Upgrade to JRuby 1.7.24
This release fix the following problems we have:
- File.stat on 32 bits JVM on windows https://github.com/logstash-plugins/logstash-input-file/issues/82
- Annoying io/console warning on Windows https://github.com/elastic/logstash/issues/3087

Full changelog http://jruby.org/2016/01/20/jruby-1-7-24.html

Fixes #4541
2016-01-21 16:10:31 +00:00
Suyog Rao
62f56ec274 Fix issue when building regular tar
Thanks to @ph who caught this issue in review
https://github.com/elastic/logstash/pull/4435#discussion_r49224181

Fixes #4440
2016-01-09 02:27:28 +00:00
Suyog Rao
6e94d0c68b Add rake tasks to create uber packages
Add rake tasks to create zip and tar.gz for LS package with all plugins
installed from losgtash-repo

Fixes #4435
2016-01-08 23:08:21 +00:00
Andrew Cholakian
c2715d0ded Add http poller to default plugins list
Fixes #4409
2016-01-03 23:06:44 +00:00
Vincent Bernat
4bc5261895 pkg: ensure dev/beta/rc are ordered before a regular version
```ruby
class DpkgVersion
  include Comparable
  attr :version
  def <=>(anOther)
    return -1 if system("dpkg --compare-versions #{version} lt #{anOther.version}")
    return 1 if system("dpkg --compare-versions #{version} gt #{anOther.version}")
    return 0
  end
  def initialize(version)
    @version = version
  end
  def to_s
    @version
  end
end

versions="1.5.1 1.5.0 1.5.0.rc3 1.5.0.beta2 1.5.0.alpha3".split
versions=versions.map { |x| DpkgVersion.new(x.gsub(/\.([[:alpha:]])/, '~\1')) }
versions=versions.sort
puts versions
```

This outputs:

```
1.5.0~alpha3
1.5.0~beta2
1.5.0~rc3
1.5.0
1.5.1
```

Fixes #2461
2015-12-11 20:17:33 +00:00
Joao Duarte
00a99c19e5 refactor concerns of runner, agent and pipeline
* move cli argument handling from agent to runner
* add a short-help message
* add interactive shell option
* log fatal messages to terminal when logging to file
* change docs:generate task to use bundle exec

Fixes #3872
2015-11-25 12:11:36 +00:00
Pere Urbon-Bayes
245319e9b8 update jruby to last 1.7.23 release
Fixes #4260
2015-11-25 10:04:04 +00:00
Pere Urbon-Bayes
2195f145b2 This adds a feature to let users dump all their installed plugins,
including dependencies, and reuse them in an offline installation by
providing an package for it. It adds two important commands to the
plugin manager, the pack and upack, to handle package creation and
installation and adds the --local flag to install and update to pull
plugins from the installed local packages.

Former commits:

add a task to create a bundle, under vendor/cache of the installed gems + their dependencies, this can be used later on to be installed offline

add an option to pass the --local flag to the bin/plugin update task, so it fetch plugins from a local cache, by default under vendor/cache

rename package:build to package:build-cache as is more meaningfull

add a --local flag to bin/plugin install to users can install plugins from the local cache, under the default directory of vendor/cache

add a plugin manager command to build the local cache of installed plugins using bundler package alike command

It adds code for compressing and extracting in zip and tar formats to
the utils module of logstash. The zip module is only jruby dependant as
it uses functions provided by java.
There is also code add in the plugin manager package command to handle
compression of plugins dumping.

Cleanup the custom java code to compress and extract zip files as it has
been known that using rubyzip is good and it has a more ruby like
features so the code is more clean and portable.

set of smallish improvement requested during review

added several options to handle situation when the package of plugins we want to generate is already there

clean up old code

applyed feedback from review, mostly changed in documentating behaviour plus better wording for messages

relocate the Environment.windows? check to the bootstrap side as it's used also in the plugin manager

add an unpack bin/plugin command so users can install packages of plugins throw the plugin manager

document override behaviour in the compress helpers (for zip and tar) plus add a fix for the tar extract when reading entries

made the unpack filename parameter a required one

add a force option to the bin/plugin unpack command

add a notice to that if using a local cache the --local flag should be passed with

Code cleanup and refactor introduced during review

add two wording suggestions comming from review

ammend more wording

skip the major version validation as in situation where there is no internet connection like when using the local vendor/cache to do the update

move compress to the bootstrap environment as being used in the plugin manager means not being loaded with logstash-core

Bring pack cached gems in the vendor directory so they can be used for bundler when packaging dependencies

Revert "Bring pack cached gems in the vendor directory so they can be used for bundler when packaging dependencies"

This reverts commit a9d7f46649932b06efaafebdd0eed2b4c63c2235.

patch the Bundler::Source::Rubygems to fetch only gems from a remote  source

small changes in several parts of the plugin manager and the creation of a common pack command with shared code

change compress to read in chuncks

fix wrong var name in the bootstrap compress utils module

fix namespacing conflicts

add basic test for the compress utility module

ammend more namespace issues

add a comment to the rubygems mockey patch to rebuild the gem cache

apply cosmetic changes

make the compress module raise CompressError

remove vendor_path and pattern_path form environment as they where mix up during rebase

change the bin/pack force option to be force-delete-cache

rename force_delete_cache to overwrite

change force for overwrite in tha pack command

remove the override option for bin/plugin unpack

revert Gemfile and Genfile.lock wrong committed
2015-11-18 12:03:51 +01:00
Colin Surprenant
1a32c14eac fix version path, relates to #4123 2015-11-17 01:13:11 -05:00
Colin Surprenant
d74d41cb30 logstash-core & logstash-core-event extraction to support logstash-core-event-java impl, relates to #4191
fixed timezone issue

extracted logstash-core and reorganized specs

extracted logstash-core-event

extract java Event into logstash-core-event-java in a proper gem

remove obsolete jruby_event bootstrapping

fix require path

add java code bootstrap

use logstash-core-event/logstash-core-event.rb

remove obsolete files

basic instructions

LogStash::Json need to be initialized from event

update jruby and gradle versions

update compile:logstash-core-event-java rake task

WIP tasks refactor

fix gem.files

skip test if class is not defined

fix gem related tasks for new structure

add gem spec dirs in core tests

bootstrap java implementation when requiring timestamp

new Cloner class and Event clone impl

fix array fields assignments, see #4140

don't rely on json implementation ordering

fix skipped last iterpolation char

remove implementation specific unnecessary check

also require ruby classes

define error class in ruby

raise exception on invalid format

remove implementation specific tests and extract and put logger related test in pending

missing bits for having all core timestamp specs pass

run all core specs

remove leftover

comment regex

missing encoding header

revert to logstash-core-event by default

finished proper gemification

useless require

dynamically pick specs depending on logstash-core-event-* implementation

logstash root package version

missing file for proper gemification

do not build java event by default

always check for root logstash lib dir

fix concurrent-ruby version confict

fix rebase conflict

re-enable specs

user vars instead of constants

move non core code in bootstrap

document version files

move version file

remove useless code

use version in logstash-core

fix gem files list

put back concurrent-ruby version constrain as in master

add dependency on logstash-core-event

remove dependency on logstash-core to avoid circular dependency

fix rebase conflict

remove circular dependency

fix specs

update README
2015-11-16 16:40:19 -05:00
Tal Levy
e28f188e12 refactor to gradle project, relates to #4191
more event java updates

- updated metadata
- moved #append to java
- other small test fixes

commit gradle wrapper jar
2015-11-16 16:39:47 -05:00
Suyog Rao
146b3f6c5d Add jdbc input to default package list
JDBC input is a popular plugin and has been stable over the last
few releases.

Fixes #4198
2015-11-16 18:02:54 +00:00
Pier-Hugues Pellerin
a30b9a905e Add the possibility to run local integration test
Fixes #4166
2015-11-13 17:16:49 +00:00
Gabriel Moskovicz
abd97aa98b Add powershell script for windows testing
- Release acceptance test, which tests ports and run Logstash.
- Default plugins, which runs the same plugin installation and
environment for windows
- Simple integration, which integrates Logstash with Elasticsearch and a
simple configuration

Fixes #3994
2015-11-06 10:29:57 -08:00
Pier-Hugues Pellerin
ed97013196 Logstash-input-beats is now part of the default plugins
Fixes #4057
2015-10-19 18:22:22 +00:00
Suyog Rao
bfbb49dc14 Remove elasticsearch_http from default plugins list
Fixes #4002
2015-10-08 13:35:30 +00:00
guyboertje
7bb94d0692 add test for compact and compact! in java_integrations
Fixes #3772
2015-09-03 19:43:10 +00:00
Suyog Rao
568231816e Update ot JRuby 1.7.22
Fixes #3835
2015-09-02 20:54:50 +00:00
Suyog Rao
e2a5e92faf Jenkins: Ignore DynamoDB for now. Make sure all plugins tests pass
Fixes #3839
2015-09-02 17:53:26 +00:00
Pere Urbon-Bayes
028d76497c add the missing magic header # encoding: utf-8 so all internal strings are UTF-8 in Ruby < 2.0
Fixes #3723
2015-08-17 13:30:07 +00:00
Suyog Rao
229c42a964 Bundle http input plugin with defaults
Fixes #3507
2015-06-29 21:19:13 +00:00
Aaron Mildenstein
3d3cd8ab8f Do not include rackspace input/output in tests
Block testing by regex.

fixes #3518

Fixes #3519
2015-06-29 18:03:34 +00:00
Pier-Hugues Pellerin
fd4824c23f Add a micro benchmark runner
Fixes #3457
Add `rake benchmark:run` task to run micro benchmark on specific part of
the code, it's uses the benchmark-ips gem to generate gem.
See https://github.com/evanphx/benchmark-ips for usage
2015-06-26 11:11:52 -07:00
Pere Urbon-Bayes
cf10890d63 fix the coverage analysis throw simplecov to take care of all files
make the eager loading patterns consistent in the spec_helper.rb file

make the setup-simplecov task not a dependency, but an explicit task only executed when ENV['COVERAGE'] is defined

refactor eager loading code plus add some documentation to the setup-simplecov task

Added more comments to the test:setup task

Fixes #3465
2015-06-25 15:36:57 +00:00
Suyog Rao
fb5c388693 Add comma after new line was added
Fixes #3472
2015-06-19 17:09:25 +00:00
Suyog Rao
f26ab64ec4 Add NOTICE.TXT to comply with License
Fixes #3458
2015-06-19 16:47:10 +00:00
Pier-Hugues Pellerin
d85fdcb86d remove benchmark from this PR
Fixes #3425
2015-06-18 17:59:49 +00:00
Pier-Hugues Pellerin
fcf8d783fa Add a caching mechanism for the #sprintf calls
This PR allow the Event class to compile a `sprintf` the first time and
reuse the template for the other calls. This strategy speeds up considerably
calls that uses date formatting or use fieldref its a bit slower if you
dont do any string manipulation.

Fixes #3425
2015-06-18 17:59:47 +00:00
Pere Urbon-Bayes
1849ff23bb add logstash-output-webhdfs as is released, but still not completely integrated with logstash to be run in the all plugins test
Fixes #3401
2015-06-09 09:31:18 +00:00
Pere Urbon-Bayes
06c5a893b5 add logstash-input-http as requested by jsvd
Fixes #3399
2015-06-09 09:05:57 +00:00
Pere Urbon-Bayes
8012c98895 add the perfmon plugin to the skip list
Fixes #3399
2015-06-09 09:05:57 +00:00
Pere Urbon-Bayes
d5fc55b3a6 update is_released to use Gems.info
Fixes #3391
2015-06-08 13:11:26 +00:00