Commit graph

24 commits

Author SHA1 Message Date
kaisecheng
1a5ef6ad13
pin snakeyaml to 1.33 (#14960)
Co-authored-by: Mashhur Sattorov <mashhur.sattorov@elastic.co>
2023-03-14 13:06:08 +00:00
João Duarte
022e8ff5e0
bump jruby to 9.2.20.1 (#13468) (#13469) 2021-12-02 12:45:30 +00:00
Rob Bavey
2ac869a9c4
Backport PR #13015 to 7.x: Bundler: freeze lockfile on run, and "norm… (#13140)
* Backport PR #13015 to 7.x: Bundler: freeze lockfile on run, and "normalize" platform on plugin changes

Backport PR #13015 to 7.x branch. Original Message:

This PR enables the upgrade of bundler to the latest version.

Prior to this PR, the ability to do so was blocked by bundler.setup in versions of bundler > `2.23` making runtime changes to `Gemfile.lock` (unless the lock file was `frozen`) based on the specific platform the application was being run on, overriding any platforms (including generic `java` platform) set during build time. This was in conflict with changes made in #12782, which prevented the logstash user writing to files in `/usr/share/logstash`.

This PR will freeze the lockfile when logstash is run, and unfreeze it when manipulating plugins (install, update, remove, install from offline pack) to allow new plugins to be added. While unfrozen, changes are also made to ensure that the platform list remains as the generic `java` platform, and not changed to the specific platform for the runtime JVM.

This PR also introduces a new runtime flag, `--enable-local-plugin-development`. This flag is intended for use by Logstash developers only, and enables a mode of operation where a Gemfile can be manipulated, eg

```
gem "logstash-integration-kafka", :path => '/users/developer/code/plugins/logstash-integration-kafka'
```

to facilitate quick and simple plugin testing.

This PR also sets the `silence_root_warning` flag to avoid bundler printing out alarming looking warning messages when `sudo` is used. This warning message was concerning for users - it would be printed out during normal operation of `bin/logstash-plugin install/update/remove` when run under `sudo`, which is the expected mode of operation when logstash is installed to run as a service via rpm/deb packages.

This PR also updates the vagrant based integration tests to ensure that Logstash still runs after plugin update/install/remove operations, fixes up some regular expressions that would cause test failures, and removes some dead code from tests.

* Updated Bundler to latest version
* Ensured that `Gemfile.lock` are appropriately frozen
* Added new developer-only flag to facilitate local plugin development to allow unfrozen lockfile in a development environment

(cherry picked from commit 4707cb)

* Remove code pinning bundler to ~> 1.17
2021-08-17 20:31:26 -04:00
Andrea Selva
24314350ab
[bacport 7.x] Update Snakeyaml version to 1.29 (#13129) (#13134)
Snakeyaml is used only in the build chain, and it's not packaged with Logstash

(cherry picked from commit a7f6c01a3a)
2021-08-16 14:29:07 +02:00
Karol Bucek
35ce0eed13
[7.x] Deps: update JRuby to 9.2.19.0 (#12989) (#12990) 2021-06-16 12:04:05 +02:00
Karol Bucek
419b1dc988
Backport PR #12791 to 7.x: Deps: update JRuby to 9.2.18.0 (#12971)
Backport PR #12791 to 7.x branch. Original message:

Version bump of JRuby.

+ Fix: a missing require in bootstrap

(cherry picked from commit ee6038afec)
2021-06-10 07:24:17 +02:00
João Duarte
06bee93154
update jruby to 9.2.16.0 (#12699) (#12721)
fix define_method+super calls due to jruby/jruby#6571

(cherry picked from commit 9643a33b99)
2021-03-04 10:10:57 +00:00
João Duarte
7fee8c3a3b
cleanup bundler exclusions during jruby unpacking (#12692) (#12702)
JRuby had a few releases where it shipped with bundler,
creating some difficulty in working with newer versions.
This no longer happens so we can remove these exclusions
from the jruby unzipping task.

(cherry picked from commit f0c18e89d0)
2021-03-01 11:01:48 +00:00
Colin Surprenant
45099c1b54 remove evaluation dir from JRuby bundled did_you_mean gem 2020-11-23 19:22:28 +00:00
Joao Duarte
f736d9c860 bump jruby to 9.2.13.0 2020-08-05 14:49:21 +00:00
Joao Duarte
85a572a077 update jruby to 9.2.12.0
Also tweak the documentation since most of the add-opens are no longer needed, except:

java.io due to colinsurprenant/jruby-stdin-channel#1
java.security due to jruby-openssl
java.nio.channels, sun.nio.ch, sun.management and java.io from jruby: https://github.com/jruby/jruby/blob/9.2.12.0/bin/.jruby.module_opts

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
2020-07-08 11:57:39 +00:00
Rob Bavey
b2da4449a5
Use task avoidance API in gradle scripts (#11914) (#11943)
* Use task avoidance API in gradle scripts

This commit uses the task avoidance api (tasks.register vs task.create/
task DSL), as recommended since Gradle 5.1

This should reduce the execution of unnecessary tasks in build jobs, and
hopefully improve build resiliency and execution time.
2020-05-29 11:52:01 -04:00
Rob Bavey
0eb2f54de2
Update gradle version to 6.3 (#11742) (#11761)
* Backport of #11742. Not a clean backport as 7.x had not previously been upgraded to 5.6.4 as master had been.

* Update gradle version to 6.3

Gradle versions prior to 6.3 cannot run under JDK14.
This commit upgrades the version of Gradle to 6.3, and removes all deprecation warnings that can currently be removed.

Changes include:
* Increase gradle memory to 2g
* Increase gradle memory in the license check job to 2g
* Replace use of `testCompile`
* Replace `runtime` with `runtimeOnly`
* Remove`compile` depedencies from gradle files
* Replace deprecated archive methods
* Fix dependencies report build
* Make jruby dependencies 'api', fix archiveVersion
* Set `duplicatesStrategy` for all tasks of type Copy
* Use `configureEach` for global 'withType' calls
** Use the recommended Tasks API calls
(https://blog.gradle.org/preview-avoiding-task-configuration-time)
* Run `./gradlew wrapper` earlier to improve caching
* Use copy with chown for resources that need to be run during `./gradlew wrapper`
2020-04-08 09:00:34 -04:00
Karol Bucek
baf60a9840 Updated: JRuby to 9.2.11.1
Fixes #11723
2020-03-26 11:35:02 +00:00
João Duarte
1fc169b7f6 Add apache and elastic license headers to source code files (#11673)
* add license header to ruby and java files
* add license header to erb and rake files
* add license headers to gradle files
2020-03-11 11:54:32 +00:00
Karol Bucek
b7a5f76859 Updated: JRuby to 9.2.11.0
- fix: deprecation warnings due JRuby 9.2.11
- fix: compat for upgraded RubyGems 3.0

Fixes #11647
2020-03-05 11:40:47 +00:00
Joao Duarte
6842aba9eb stop installing rake and json on every bootstrap
Fixes #11102
2019-12-02 14:59:43 +00:00
Joao Duarte
6346d03f6d update jruby to 9.2.9.0
Fixes #11281
2019-11-21 09:36:29 +00:00
Dan Hermann
764589e2ca correct directory for versions.yml file
Fixes #11318
2019-11-19 14:36:01 +00:00
Joao Duarte
085d93650e update jruby to 9.2.8.0
Fixes #11041
2019-08-13 06:45:58 +00:00
Dan Hermann
3fba3af9f9 * Adds a java_generator input with jdots codec to facilitate testing, adds float config type
* Breaking change to codec.encode method

* Sink output for discarding events

* URI and password config types

* Utility methods for packaging Java plugins

* Plugin API validation, fix gemspec generation

* Plugin Jar validation

* Update developer documentation

* Update codec metrics for new encode method

* Beta: Isolated classloaders for Java plugins

* Address code review comments

Fixes #10620
2019-05-03 11:54:37 +00:00
Joao Duarte
97704dc35d properly exclude bundler 1.16.6
Fixes #10684
2019-04-12 21:30:27 +00:00
Joao Duarte
62f8282a3b 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 21:32:32 +00:00
Dan Hermann
30dd8243d2 Move Gradle wrappers around Ruby operations to a separate file to facilitate sharing of common operations with Java plugins
Fixes #10642
2019-04-04 19:56:59 +00:00