Commit graph

165 commits

Author SHA1 Message Date
João Duarte
3a62db05e1 replace YAML.parse with YAML.safe_load in release tool
YAML.parse returns Psych nodes that then need to be converted to plain ruby objects.

Calling YAML.safe_load outputs basic ruby objects already and also increases security as it greatly restricts the classes it deserializes.

Fixes #11208
2019-10-11 13:09:06 +00:00
Aarti Gupta
72f4828cca
Enhancements to Logstash Benchmarking Tool (#10253)
* Adding support for -
1. Custom Data Sets
2. Added heap used statistics to results
2019-08-29 11:41:30 +01:00
Joao Duarte
072d33690c fix plugin version bump rake task
By removing the default plugins from the Gemfile.template
the current task that modified the template was not working correctly.

This commit either replaces the dependency entry if it exists or
otherwise creates it.

Fixes #10947
2019-07-12 14:25:06 +00:00
Ry Biesemeyer
583ec6b625
Java 11 support (#10279)
* bump jruby to 9.2

* don't rely on logstash-base docker image

* work around webmock ruby 2.5 support

* ensure data folder exists in docker

* change fixnum and bignum to integer

* FileUtils.rmdir to rm_rf

this is because from 2.3 to 2.5 FileUtils.rmdir will throw an exception
if the directory isn't empty. On 2.3 the operation will just not delete
the directory silently.

* bump jruby to 9.2.5.0 and fix test

* make rake default task since prepare pack needs it

* Resolve compiler warnings (#10247)

There are 3 types of compiler warnings that are either resolved or suppressed:

1. Rawtypes: In JRuby 9.2, `RubyArray` is a generic, so references throughout
   our codebase to the now "raw" type trigger warnings. In most cases we cannot
   actually resolve the issue, since the JRuby-provided methods for creating
   `RubyArray`s still return the raw type, so these have been suppressed.

2. Deprecations:
   - `RubyString#intern19()` -> `RubyString#intern()`
   - `RubyString#downcase19(ThreadContext)` -> `RubyString#downcase(ThreadContext)`
   - `NativeException`: remove import & reference directly; suppress usage
     warnings
   - `RaiseException()`: migrate to equivalent non-deprecated methods wherever
     possible; in some cases where we are using this in conjunction with the
     also-deprecated `NativeException` to preserve java stacktraces, there
     seems to be no non-deprecated path forward, so these cases have been
     suppressed.

3. Redundant Casts
   - Resolved

* JRuby 9.2 bundler shenanigans (#10266)

* Revert "Revert "remove forced dependency on old bundler (#9395)""

This reverts commit bef984143d.

* plugin management: update internal bundler to 1.17.x APIs

* deps: update dev dependency webmock to version compatible with JRuby 9.2

* spec: update Pack fixture to include manticore version that doesn't conflict

* build: update gradle to version that has Java 11 support

* java11: resolve or suppress deprecation warnings

* Remove superfluous flag opting into ParNew GC implementation

When opting into CMS garbage collector with `XX:+UseConcMarkSweepGC`, the
young generation collector ParNew has been the default since Java 8, making
the `XX:+UseParNew` flag redundant; the flag was removed in Java 9, and
should no longer be specified to work with modern Javas.

https://bugs.openjdk.java.net/browse/JDK-8006478
https://openjdk.java.net/jeps/214

* spec: set thread name to example description for easier debugging

* spec: prevent errors in testing specs by checking against skip list before using

* no-op: remove use of `HashMap#computeIfAbsent` on single-threaded code

> This method will, on a best-effort basis, throw a `ConcurrentModificationException`
> if it is detected that the mapping function modifies this map during computation.
>
> -- https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/HashMap.html#computeIfAbsent(K,java.util.function.Function)

* qa: by default, run integration against Elastic Stack 6.5.x

To support development on Logstash on top of Java 11, default to testing
against an Elastic Stack that is capable of running on Java 11.

* qa: ignore deprecation warnings when comparing offline pack output

* qa: add Java 9+ support to ChildProcess dev dependency

this can safely be removed when the childprocess gem supports Java9+
https://github.com/enkessler/childprocess/pull/141

* qa: allow connections to localhost in webmock

* bump jrjackson version

* fix filebeat integration tests

* spec: ensure license compliance spec runs first

The license compliance spec that validates the licenses of bundled
plugins appears to not be compatible with the hooks that we inject
into bundler for plugin management, and will fail in obscure ways
when run after those hooks have been added. Since those hooks are
not necessary for validating licenses, the easiest solution was to
ensure that those specs run first, before the VM has been poluted.

Since the gradle/junit/rspec bridge that is currently in place
runs all specs in the same JVM, we also need to make sure that the
rspec "world" is reset before a run, to ensure that it doesn't
retain spec definitions from previous runs.

Also updates the rake invocation, although I'm not sure it is used
any more.
2019-02-04 16:36:11 -08:00
Joao Duarte
69c1928f4a add missing ruby shebang to release tools
Fixes #10283
2019-01-11 15:46:20 +00:00
Joao Duarte
ccfa770939 add lockfile bump and release notes draft tools
Fixes #10265
2019-01-08 15:35:16 +00:00
Dan Hermann
9b73071e67 instructions on how to run tool, remove unused readlink call in script
Fixes #9931
2018-08-27 21:44:47 +00:00
Dan Hermann
4f4c81adc8 do not fail build if license violations are found
Fixes #9944
2018-08-27 18:18:32 +00:00
Dan Hermann
c3aee102d0 add reporting of unused dependencies
Fixes #9923
2018-08-24 12:25:56 +00:00
Dan Hermann
b6e355d151 documentation for the dependency license audit tool
Fixes #9921
2018-08-21 13:31:59 +00:00
Dan Hermann
8b6c162c18 add missing dependency
Fixes #9924
2018-08-20 15:39:39 +00:00
Dan Hermann
319cbcbca3 fix remaining license checker problems
Fixes #9913
2018-08-20 14:00:43 +00:00
Dan Hermann
d236fa898a move license URL check outside loop
Fixes #9895
2018-08-14 12:57:13 +00:00
Dan Hermann
95ea8e65c2 Adds support for specifying multiple licenses separated by the pipe symbol
Fixes #9895
2018-08-14 12:57:13 +00:00
Dan Hermann
0d6fef1100 update NOTICE.txt files for dependencies
Fixes #9894
2018-08-13 14:43:05 +00:00
Dan Hermann
3a813cee62 update dependency license info
Fixes #9891
2018-08-13 12:10:52 +00:00
Joao Duarte
cb65e15ed1 manually generate NOTICE.TXT from licenses in dependencies-report
Fixes #9886
2018-08-10 12:38:51 +00:00
Joao Duarte
35f48a8261 notices from pr #9541
Fixes #9886
2018-08-10 12:38:51 +00:00
Joao Duarte
c73912e71e notices from pr #9556
Fixes #9886
2018-08-10 12:38:51 +00:00
Joao Duarte
a72a506f7d notices from pr #9559
Fixes #9886
2018-08-10 12:38:51 +00:00
Joao Duarte
b5509b6b4c notices from pr #9553
Fixes #9886
2018-08-10 12:38:51 +00:00
Joao Duarte
bf62024981 notices from pr #9547
Fixes #9886
2018-08-10 12:38:51 +00:00
Joao Duarte
05a695079d merge together license compilation for dependencies
This merges PRs #9547, #9553, #9559, #9556, #9541

Fixes #9886
2018-08-10 12:38:51 +00:00
Andrew Cholakian
bd8f80eb70 Make dependencies report tests run on windows by using ! as separator
On windows filenames cannot use `:` as a separator, which we use for java notice files.

We settled on using a `!` instead which is compatible.

Fixes #9593
2018-05-16 21:49:00 +00:00
Andrew Cholakian
30e524e5ee Improved NOTICE.txt generation
Fixes #9530
2018-05-10 16:14:45 +00:00
Dan Hermann
741215c234 change report columns
Fixes #9532
2018-05-07 11:40:28 +00:00
Dan Hermann
9b0f5041a6 Add component URL to license report
Fixes #9529
2018-05-05 13:43:43 +00:00
Dan Hermann
6c3546606d temporarily disable the exit(1) in case of dependencies with unidentified licenses
Fixes #9525
2018-05-04 13:46:15 +00:00
Dan Hermann
9aeb2a7d0e ignore different EOLs when testing report output
Fixes #9515
2018-05-02 17:27:48 +00:00
Dan Hermann
da5ecd301e add license for jls-grok
Fixes #9331
2018-05-02 15:35:42 +00:00
Dan Hermann
0e2186c36f remove unnecessary license mapping and shell function
Fixes #9331
2018-05-02 15:35:42 +00:00
Dan Hermann
48594baf2b Add license reporting task
Fixes #9331
2018-05-02 15:35:42 +00:00
Armin
01c99ccf11 #8360 fix tests by enforcing IPV4 in Benchmark tool UTs
Fixes #8372
2017-09-23 06:50:39 +00:00
Armin
777df441b1 BENCHMARK: Add Workercount and Batch size as configurable settings in benchmark
Fixes #8217
2017-09-13 13:27:16 +00:00
Armin
7c56407f1d MINOR: Cleanup out directory via gradle clean task
Fixes #8085
2017-08-28 14:40:40 +00:00
Armin
f639df97cd Benchmark: General cleanup
Fixes #7875
2017-08-02 15:16:17 +00:00
Armin
3da9dc146f Benchmark: fix cache use
Fixes #7875
2017-08-02 15:16:17 +00:00
Armin
3fb0498a98 Benchmark: Allow setting a repeat count
Fixes #7864
2017-08-01 16:23:50 +00:00
Armin
fb487c58d3 #7784 ES benchmark result storage to ES
Fixes #7830
2017-07-28 06:59:01 +00:00
Suyog Rao
fb84685230 Delete unused tools/benchmark folder
Fixes #7831
2017-07-27 19:40:40 +00:00
Armin
820c1a383a #7784 cleanup metric parser
Fixes #7816
2017-07-27 04:43:47 +00:00
Armin
18571f2b89 #7799 fix Windows incompatible Resource use + Windows incompatible use of /dev/null
Fixes #7800
2017-07-25 12:35:19 +00:00
Suyog Rao
b6bcbda8e4 bump master version to 7.0.0-alpha1 (#7791) 2017-07-24 11:51:40 -07:00
Armin
d9436dd760 Benchmark Tool
Fixes #7629
2017-07-24 15:46:30 +00:00
Armin
b250b145a7 MINOR: Fix compiler warnings in Ingest Converter Test
Fixes #7703
2017-07-17 09:42:32 +00:00
Armin
04163d05e8 #7665 pattern definitions hash should be proper ruby hash without commas
Fixes #7670
2017-07-13 12:56:12 +00:00
Armin
892a2d90db #7642 Fix windows line endings issues in ingest test
Fixes #7644
2017-07-11 15:17:50 +00:00
Armin
62f8270308 #7642 make test path handling portable to Windows
Fixes #7643
2017-07-11 14:05:04 +00:00
Suyog Rao
b8ea070706 Enhance ingest convert to add input/output (#7456)
* Add input/output to converter

* update CLI help

* remove newline and use join on array
2017-06-15 16:21:19 -07:00
Suyog Rao
fae99f1f9f Handle ingest on_failure processor (#7412)
* Handle ingest on_failure processor

Ingest `on_failure` processor allows to define a new sub-piplene when a failure
happens in the current processor. Logstash does not have an on_failure but this can
be emulated using the tag and conditional.

Also added a set processor converter which is typically used in `on_failure`.

* generalize on_failure method

* Add comments

* Fix indentation issue
2017-06-12 08:18:04 -07:00