Commit graph

51 commits

Author SHA1 Message Date
Joao Duarte
f19e5c81e3 moved to openjdk 11 in docker testing
- also fix javadoc warning when building on jdk11

Fixes #10563
2019-04-15 20:13:37 +00:00
Joao Duarte
91691e871b
updated bundler to 1.17.3 2019-04-12 22:27:51 +01:00
João Duarte
03fbc85e0c
Update patch plugin versions in gemfile lock (#10678) (#10678) 2019-04-12 15:32:32 +01:00
Joao Duarte
9669671872
bump jruby to 9.2.7.0
Revert "work around jruby-5642 during package installation on jdk11 (#10658)"

This reverts commit 033c896330.

skip the bundler-1.16.6 files when unpacking jruby

Fixes #10674
2019-04-11 22:36:07 +01:00
Colin Surprenant
90f2d87a1a
download exact version artifact for release build otherwise download snapshot (#10664) 2019-04-11 22:25:11 +01:00
Joao Duarte
85d0926244 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
Colin Surprenant
c2c31f22b7
correctly handle unexecuted downloadEs task (#10556)
7.0 clean backport of #10555
2019-03-13 18:02:21 -04:00
Colin Surprenant
772dccb880 move download setup code inside the downloadEs task (#10548) 2019-03-12 16:02:42 -07:00
Joao Duarte
92e4813a3c factor in OS and architecture when downloading ES
- use artifacts api to fetch latest build
- use latest build info to find download url
- download package

Fixes #10422
2019-02-11 14:28:19 +00:00
Joao Duarte
2910faa57f fix building of deb and rpm
fpm requires json 1.x but the artifact rake tasks
will activate the default gem json 2

This PR ensures json 1 is activated early and is present right after
jruby is bootstrapped.

Also downgrades fpm to 1.3 as 1.11.0 wasn't building correctly

Downgrades .ruby-version to a version we have available in CI

Fixes #10396
2019-02-06 09:39:55 +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
Dan Hermann
e6d59de458
Update java dependencies (#10340) 2019-01-18 08:16:13 -06:00
Dan Hermann
76a1d0a664
Eliminate compiler and javadoc warnings (#10241) 2019-01-02 07:16:19 -06: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
Guy Boertje
1f7a369993
Add VERSION_QUALIFIER support for use by release manager (#10117)
* Add VERSION_QUALIFIER support for use by release manager

* Make the gem build processes aware of the version qualifier

* Try debugging xpack ci test failure.

* Try to use the artifacts-api.elastic.co api for ES download.

* It builds/tests locally now.

* add some comments explaining the artifacts-api and the version string

* cahnges requested in review.

Fixes #9956
2018-11-07 22:39:52 +00:00
Joao Duarte
f8af1762c5 create gradle task to generate plugin version manifesto
Fixes #9889
2018-08-10 16:45:16 +00:00
Joao Duarte
282ee06814 stop gradle from deleting NOTICE.TXT
Fixes #9888
2018-08-10 14:34:49 +00:00
Joao Duarte
6705ff0251 Update jruby artifact downloading
* download urls moved to maven
* tarball naming scheme has changed

Fixes #9806
2018-07-02 10:46:12 +00:00
Armin
f8860884fa JRUBY: install custom JRuby tar.gz
Fixes #9731
2018-06-14 12:28:39 +00:00
Armin
78dab87221 BUILD: Add Java wrapper for xpack integration tests
Fixes #9597
2018-05-20 14:50:08 +00:00
Andrew Cholakian
bf21f97eb3 Fix the license check CI task
This does a few small things:

1. Prefer invoking rake tasks via ./gradlew vs rake. This prevents Java from segfaulting on docker for unknown reasons
2. Remove use of COPYING.csv which has already been removed

Fixes #9583
2018-05-15 23:31:12 +00:00
Armin
8ebde04ae8 Load tests via JUnit
Fixes #9575
2018-05-15 16:15:39 +00:00
Andrew Cholakian
30e524e5ee Improved NOTICE.txt generation
Fixes #9530
2018-05-10 16:14:45 +00:00
Dan Hermann
48594baf2b Add license reporting task
Fixes #9331
2018-05-02 15:35:42 +00:00
Jenkins CI
93cad10da1 Migrate x-pack-logstash source to logstash 2018-04-24 10:46:15 -05:00
Armin
ebf50f750d BUILD: Fix inconsistent naming of output tar.gz
Fixes #9397
2018-04-18 13:16:24 +00:00
Armin
5ef2de9802 BUILD: Stop using Exec tasks for ITs
Fixes #9388
2018-04-17 14:02:55 +00:00
Armin
645c5c42cc MINOR+BUG: Clean doesn't delete gem jars for logstash-core
Fixes #9387
2018-04-17 11:53:52 +00:00
Andrew Cholakian
885134330d Hide proprietary tasks when OSS=true
Fixes #9238
2018-03-14 20:24:00 +00:00
Andrew Cholakian
126c054331 Add additional gradle tasks in anticipation of x-pack being opened
Fixes #9238
2018-03-14 20:23:59 +00:00
Andrew Cholakian
2ab6cbd3ce Add OSS variants of artifact rake tasks
These will omit the x-pack folder once it is merged in

Fixes #9223
2018-03-09 18:36:31 +00:00
Armin
c0bb875a30 BUILD: Fix wrong paths and wrong output declarations on installTestGems task
Fixes #9052
2018-01-29 14:27:54 +00:00
Armin
a5bac509d5 MINOR: Cleanup dead field and wrong ruby path in build.gradle
Fixes #9040
2018-01-29 09:55:03 +00:00
Colin Surprenant
2996062232 fix integration tests build 2018-01-24 10:26:56 -05:00
Armin
86bf8dbb37 BUILD: Run rake tasks in Gradle JVM
Fixes #8941
2018-01-17 11:57:16 +00:00
Armin
45c54afed6 MINOR: Update readme for building tar distribution
Fixes #8939
2018-01-15 14:22:47 +00:00
Armin
5e13683ecc BUILD: Fix missing Gradle Cache Invalidations in Integration Test Build
Fixes #8680
2017-11-15 18:51:10 +00:00
Armin
62aecc5701 TESTS+BUG: Pass FEATURE_FLAG environment to Integration Tests
Fixes #8670
2017-11-14 20:14:29 +00:00
Armin
2573082445 CR comments
Fixes #8599
2017-11-14 15:25:36 +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
f7fb0257ce #8589 make Gradle bootstrap compatible with Windows (follow up)
Fixes #8626
2017-11-10 14:36:40 +00:00
Armin
4df1a447e1 #8589 make Gradle bootstrap compatible with Windows
Fixes #8607
2017-11-08 15:24:49 +00:00
Armin
87dc146e4b more sophisticated output forwarding from exec tasks
Fixes #8583
2017-11-06 18:34:47 +00:00
Armin
c8d704c93e TESTS: Improve Gradle Test Configuration
* `clean` actually cleans all dynamically created files, in particular it now properly cleans the generated Gemfile so
that changes to the Gemfile.template reflect in a rerun of `bundler`
* `rubyTests` and `test` are now one-off and will automatically bootstrap JRuby and Gems required by the tests if necessary
* Fixed Readme to document the now much simpler test targets
* All rake tasks remain unchanged and still work exactly as they did before

Fixes #8583
2017-11-06 18:34:47 +00:00
Pier-Hugues Pellerin
db5bd5e68a Bootstrap JRuby using gradle
Instead of using rake to bootstrap we are slowly moving part of our
infra to gradle this is the first step taken, I didn't change the calls,
I just made the `rake bootstrap` call the `gradle bootstrap`

Closes: #8234

Fixes #8238
2017-09-18 14:32:10 +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
Armin
7c56407f1d MINOR: Cleanup out directory via gradle clean task
Fixes #8085
2017-08-28 14:40:40 +00:00
Armin
c2e55ba07b MINOR: Enable javac warnings
Fixes #7674
2017-07-13 10:40:46 +00:00
Armin
e80bfe45e7 MINOR: Dry up gradle settings
Fixes #7298
2017-06-03 07:07:28 +00:00