Commit graph

170 commits

Author SHA1 Message Date
Dan Hermann
920dc6f332 Revert "Expand config variables for Java plugins"
This reverts commit dae3eecca5.

Fixes #11056
2019-08-19 18:46:03 +00:00
Dan Hermann
51320bb5e3 Expand config variables for Java plugins
Fixes #11043
2019-08-13 19:36:41 +00:00
Dan Hermann
285f730cb6 Update Reflections library
Fixes #10951
2019-07-16 11:59:29 +00:00
urso
a44cb9ebf3 Rename filebeat.prospectors to filebeat.inputs
In filebeat prospectors settings have been renamed to inputs. When
prospectors is used a deprecation warning is printed. With 7.0
`filebeat.prospectors` will be removed.

This change updates all uses of prospectors with inputs. For now
filebeat events report `prospector.type` and `input.type` for
compatibility reasons.

Fixes #10711
2019-04-23 17:38:16 +00:00
Rob Bavey
07eb8ea005 Update Kafka version to fix build
Fixes #10608
2019-03-28 19:37:17 +00:00
Joao Duarte
2543539910 cleanup many rakelib tasks that aren't used anymore
* simplify the plugins-metadata.json file
* sort and update the plugin list in the rakelib/plugins-metadata.json
* remove dependency on twitter input for testing
* sorted Gemfile.template (grouped by group)
* remove default plugins from Gemfile.template

Fixes #10509
2019-03-15 16:26:58 +00:00
Guy Boertje
59e51127af Mute CI integration DLQ acceptance test
Fixes #10504
2019-02-27 17:44:57 +00:00
Rob Bavey
2d5df520bf Mute CLI integration plugin acceptance test
Test is failing CI
https://github.com/elastic/logstash/issues/10459

Fixes #10460
2019-02-15 22:08:39 +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
Ry Biesemeyer
dc174b2802 tests: remove kafka deprecated --new-consumer flag in setup
> KIP-176 removes the `--new-consumer` option for all consumer based tools.
> This option is redundant since the new consumer is automatically used if
> `--bootstrap-server` is defined.
>
> -- [Kafka 2.0.0 Changelog](https://kafka.apache.org/documentation/#upgrade_200_notable)

Fixes #10217
2018-12-17 22:56:18 +00:00
João Duarte
bef984143d
Revert "remove forced dependency on old bundler (#9395)"
This reverts commit ab20b40e47.

Due to failing tests like https://logstash-ci.elastic.co/job/elastic+logstash+master+multijob--ruby-unit-tests/86/
2018-12-03 13:49:54 +00:00
João Duarte
ab20b40e47
remove forced dependency on old bundler (#9395)
* update bundler to 1.17.1

This commit required some tweaking of how we setup Bundler
due to changes in reset behaviour, an internal variable name change,
and the Bundler::Settings api changing.
2018-11-30 09:25:24 +00:00
Rob Bavey
c02440170d Update Kafka download version
Fixes #10172
2018-11-21 22:17:32 +00:00
Joao Duarte
859cbaaea9 Support for integration plugins in plugin manager
* List action shows integration and provided plugins
* List action shows integration when searching by inner plugin
* Install action removed plugins provided by integration
* Install action aborts if plugin is provided by an integration
* Remove action aborts if plugin is provided by an integration

Fixes #9802

Fixes #9811
2018-09-27 10:07:26 +00:00
Dan Hermann
cb426ae89e Fix integration tests to work with the useragent filter at either version 3.2.2 or 3.2.3
Fixes #10021
2018-09-26 12:58:16 +00:00
Dan Hermann
669ccad8f6 fix integration tests to work with version 3.2.3 of the useragent filter
Fixes #10019
2018-09-25 19:17:12 +00:00
Josh Soref
c6cd247ec3 Multiple spelling corrections (#9782)
* spelling: actually
* spelling: already
* spelling: concurrency
* spelling: constructor
* spelling: destinations
* spelling: different
* spelling: elasticsearch
* spelling: encoding
* spelling: error
* spelling: explicitly
* spelling: failings
* spelling: falsey
* spelling: guarantees
* spelling: having
* spelling: implementation
* spelling: logstash
* spelling: module
* spelling: multiple
* spelling: omitted
* spelling: overridden
* spelling: pipeline
* spelling: raspberry
* spelling: receive
* spelling: recommended
* spelling: registered
* spelling: registering
* spelling: shutdown
* spelling: signal
* spelling: specified
* spelling: successful
* spelling: successfully
* spelling: valuefied
* spelling: vector
2018-07-04 10:41:10 +01:00
Ry Biesemeyer
d6b9d0f398 prevent tests from stalling by ensuring files we check get flushed
Fixes #9795
2018-06-29 18:35:51 +00:00
Andrew Cholakian
f8afd2fb39 Make commands to run all acceptance VMs actually do that.
Also, take conservative approach of halting any somehow stale VMs before building

Fixes #9642
2018-05-23 19:23:39 +00:00
Andrew Cholakian
042feafcad Some QA builds are exiting due to an inability to allocate heap.
We should just bump the available memory to 4GB, which is plenty reasonable,
as a starting point.

See https://logstash-ci.elastic.co/job/elastic+logstash+6.x+multijob-acceptance/label=metal,suite=redhat/84/console for an example

Fixes #9640
2018-05-22 19:05:16 +00:00
Dan Hermann
48594baf2b Add license reporting task
Fixes #9331
2018-05-02 15:35:42 +00:00
Armin
6179c9662a JAVAFICATION: Port namespace definitions to Java
Fixes #9490
2018-04-26 12:00:15 +00:00
Armin
76795b1633 BUILD: Stabilize integration tests
Fixes #9412
2018-04-20 15:49:16 +00:00
Armin
4b3b145968 BUILD: Stabilize integration tests
Fixes #9411
2018-04-20 14:55:21 +00:00
Tamara Braun
d919e93322 #8004 fix load order to start webserver after pipeline
Fixes #9398
2018-04-18 16:51:11 +00:00
Armin
5ef2de9802 BUILD: Stop using Exec tasks for ITs
Fixes #9388
2018-04-17 14:02:55 +00:00
Andrew Cholakian
181000c684 Add more generous try timeout for multiple pipelines specs
Fixes #9225
2018-04-10 23:48:58 +00:00
Andrew Cholakian
a1c0e417e5 Support for inter-pipeline comms with a new pipeline input/output
This also makes the load / reload cycle of pipelines threadsafe
and concurrent in the Agent class.

Fixes #9225
2018-04-10 23:48:58 +00:00
Jake Landis
4e0a139004 test fix: use single worker in test to avoid concurrency issue in sleep filter
See: https://github.com/elastic/logstash/issues/8073
See: https://github.com/logstash-plugins/logstash-filter-sleep/issues/7

Fixes: #8974

Fixes #8975
2018-01-17 18:07:53 +00:00
Jake Landis
60c883fcf7 test fix: don't use stdin for blocking pipeline
Fixes #8961
2018-01-17 14:53:42 +00:00
Jake Landis
da70fc6da6 Rspec integration tests for secret store
Fixes #8944
2018-01-16 16:46:42 +00:00
Dan Hermann
d2c7fc7eb5 Support setting logging back to defaults via the API.
Fixes #8384

Fixes #8786
2017-12-01 23:09:05 +00:00
Armin
27137ee2f6 MINOR: Make ITs use same RSpec version used by the main project
Fixes #8712
2017-11-22 18:23:39 +00:00
Armin
35022f5c02 #7135 add Gradle task for bootstrapping and running all integration tests
Fixes #8599
2017-11-14 15:25:36 +00:00
Armin
f0208d60f6 #8596 retry until Vagrant ssh bootstrapping finishes
Fixes #8615
2017-11-08 14:39:00 +00:00
Rob Bavey
58b1e5c832 Clean up es data and log folders after ITs
Change the data and log directories to be in /tmp/ls_integrations
(matching the kafka service folder structure), and delete
them in the teardown script.

Fixes #8528
2017-11-07 21:10:50 +00:00
Armin
c7b7025cc1 #8216 Use standard name for Gemfile.lock
Fixes #8525
2017-10-26 08:33:03 +00:00
Armin
54611c3699 MINOR: Upgrade to newest devutils
Fixes #8487
2017-10-13 06:49:19 +00:00
Jake Landis
8b3cae9685 Test fix: Allow slowlog to have >= 1 entries, instead of exactly 2 entries.
Fixes #8322

Fixes #8323
2017-09-19 21:54:45 +00:00
Jake Landis
2c36246234 Test fix: ensure 'fatal: Not a git repository' is not picked up as expectation integration test Fixes #8319
Fixes #8320
2017-09-19 19:57:53 +00:00
Jake Landis
196d1a1f7e Introduce docker for CI builds.
This commit includes:
* A base Dockerfile and script to push to a Docker repo
* A per-build Dockerfile (derived from the base)
* Updates to the test scripts to allow for more parallel builds
* Docker wrappers for the tests scripts
* Update for the integration test readme to manually run the tests
* Clean up the output of the Java tests
* Remove offline tag for tests (no longer needed that we don't use docker dependent services)

This commit does NOT include:
* Changes needed for the CI system to use Docker

Fixes #8223
2017-09-14 18:55:41 +00:00
Rob Bavey
af6b610b9e Remove wait for client sleep
Fixes #8175
2017-09-13 12:53:33 +00:00
Rob Bavey
38832d367d Handle Elasticsearch errors better during DLQ integration tests
Give more time for Elasticsearch to start up, and retry after
503 responses

Fixes #8175
2017-09-13 12:53:33 +00:00
Armin
c2aba55290 #8177 break cyclic dependency on old Logstash core in ITs and properly load it before service setup
Fixes #8181
2017-09-12 21:24:25 +00:00
Jake Landis
a42b3a5f7a RATS: Remove Docker from integration tests
This is in prep for a Docker based test run approach, and by removing the dependent Docker containers we will avoid Docker in Docker requirements.

Fixes #8211
2017-09-12 13:51:04 +00:00
Armin
8edf9402c4 MINOR: Exclude JAVA_OPT* line from matching in prepare_offline_pack_spec
Fixes #8182
2017-09-08 12:59:48 +00:00
Rob Bavey
ddb8b078ff DLQ Integration Test stabilization
Attempt to stabilize DLQ Integration tests
 - Only tear down ES instance once tests are complete
 - Delete indices after each test
 - Tear down Logstash after each test

Fixes #8143
2017-09-05 23:09:39 +00:00
Rob Bavey
d1aa2864c6 DLQ integration test improvements
Added single pipeline tests

Fixes #8026
2017-09-01 19:43:45 +00:00
Rob Bavey
b1b3a117a6 Add multi-pipeline test
Needs DRY-ing up before commit, but tests should be valid

Fixes #8026
2017-09-01 19:43:45 +00:00
Rob Bavey
6b1ffbc35e RATS: Dead Letter Queue integration tests (WIP)
Simple test for dead letter queue integration tests:
  Attempt to write invalid entries to elastic search, fail and
  remove invalid field. Verify that mutated entry exists in es

Not for committing - has different jvm.options to improve stability
  to ensure that the tests pass in CI.

Fixes #7882

Fixes #8026
2017-09-01 19:43:44 +00:00