Commit graph

10546 commits

Author SHA1 Message Date
Andres Rodriguez
acd87a69e7
Rubocop: Enable various EmptyLine cops (#15194)
Disabled:
 * EmptyLineAfterGuardClause
 * EmptyLineAfterMultilineCondition
 * EmptyLinesAroundAccessModifier

Enabled:
 * Layout/EmptyLineAfterMagicComment
 * Layout/EmptyLineBetweenDefs
 * Layout/EmptyLines
 * Layout/EmptyLinesAroundArguments
 * Layout/EmptyLinesAroundAttributeAccessor
 * Layout/EmptyLinesAroundBeginBody
 * Layout/EmptyLinesAroundBlockBody
 * Layout/EmptyLinesAroundExceptionHandlingKeywords
 * Layout/EmptyLinesAroundMethodBody
 * Layout/EmptyLinesAroundModuleBody
2023-07-18 16:49:16 -04:00
Andres Rodriguez
d95a0bba74
Fix deprecated ERB and BigDecimal instances (#15189) 2023-07-18 08:48:01 -04:00
Andrea Selva
5d6aa105b0
Script to run all plugins tests and try an install, rooting in local Logstash (#15018)
Implements a script to test all supported plugins against Logstash/JRuby, in particular it uses the JRuby(and JDK) bundled with Logstash to execute the unit tests, create the gem and install the gem on local Logstash.

This doesn't start a real pipeline run into the local Logstash, but should be enough to reveal macroscopic Ruby syntax compatibility errors.

Refer to PR  https://github.com/elastic/logstash/pull/15018 for usage examples.

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
2023-07-18 10:37:44 +02:00
Andres Rodriguez
1d558c35d0
Fix instances of deprecated class methods (#15183)
Replace ::File.exists? for ::File.exist?
2023-07-17 11:32:46 -04:00
Andres Rodriguez
cb19d4e88a
Add rake lint task to correct custom cods
Add a rake task that allows users to correct all the instances of a specific cop.
2023-07-14 16:48:53 -04:00
Andres Rodriguez
b63ffea472
Enable SpaceAfterColon, SpaceAfterComma, SpaceAfterSemicolon (#15180)
Enable SpaceAfterColon, SpaceAfterComma, SpaceAfterSemicolon and fix occurrences.
2023-07-14 16:46:35 -04:00
Andres Rodriguez
26ff2f7db9
Enable Style/TrailingEmptyLines and fix ocurrences (#15179) 2023-07-14 14:46:33 -04:00
Andres Rodriguez
5e34aacc6e
Enable trailing whitespace formating (#15174)
* Enable Layout/TrailingWhitespace cop formation
* Remove Trailing Whitespaces
2023-07-14 13:22:02 -04:00
Edmo Vamerlatti Costa
6463a4aab1
Add API SSL supported protocols setting (#15166)
This commit adds a new Logstash API setting to configure the SSL/TLS supported protocols (api.ssl.supported_protocols).
2023-07-14 14:21:20 +02:00
Andres Rodriguez
6154a69c15
Add basic ruby linter (#15168)
Adds rubocop as a linter for ruby.:
 - Adds .rubocop.yml which defines specific config on top of default
 - Adds Gradle task 'lint' task
 - Adds 'lint:report' rake task to report Lint Cops.
 - Adds 'lint:format' rake task to automatically format the code.
2023-07-13 17:18:10 -04:00
Mashhur
07b663561c
Snyk scans Logstash container vulnerabilities. (#15117)
* Snyk scans Logstash container vulnerabilities.

* Exclude integ test and tools when Snyk scanning.

* Remote repo url fix for main branch.

* Update .buildkite/scripts/snyk/report.sh

Simplify the logic to retrieve the version from `versions.yml`

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>

* Add backstage definition for Snyk Report pipeline.

---------

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
2023-07-12 14:54:03 -07:00
Andres Rodriguez
c2bbed8266
Add initial PQ sizing doc (#15033)
Add storage sizing guidance for Persistent Queues.

Co-authored-by: Karen Metts <karen.metts@elastic.co>
Co-authored-by: Joao Duarte <joao@elastic.co>
2023-07-12 17:45:49 -04:00
Edmo Vamerlatti Costa
7c472b4498
Updated puma gem from 5.6 to 6.3 (#15158)
This commit updates the puma gem from version 5 to the latest version 6.3.
A few breaking changes were introduced in Puma 6.0.0, which required some refactoring on the Logstash side, especially to adapt it to the "Extracted LogWriter from Events #2798" changes.
Before this PR, all the logs generated by Puma were using the debug level, even the ones that were actually errors and needed attention/action from the users. This commit also changes the log level as following:
error(...): changed from debug to error
unknown_error(..): changed from debug to error
2023-07-12 17:46:34 +02:00
Andres Rodriguez
0092a82a93
Bundle ESF forwarder (#15126) 2023-07-10 18:10:52 -04:00
Edmo Vamerlatti Costa
2adf488164
[Doc] Add monitoring/management SSL regression note on release 8.8.0 (#15090) 2023-07-10 16:14:22 +02:00
Rob Bavey
902b386413
Remove license header from settings.xml template (#15131)
When using a proxy with the plugin manager, this template is written to `~/.m2/settings.xml`. The
license header is also copied, which generates invalid XML which maven cannot parse.
2023-06-30 13:39:21 -04:00
Rob Bavey
9f14c649ff
Update released versions (#15129) 2023-06-30 13:37:36 -04:00
Rob Bavey
2176eb603a
Forward port Release notes for 8.8.2 (#15116) (#15132)
* Update release notes for 8.8.2

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2023-06-30 12:41:08 -04:00
João Duarte
1d1fa7a471
update commons-io commons-compress jrjackson databind (#15125)
* update commons-io to 2.13.0 and commons-compress to 1.23.0

* update databind and jackson
2023-06-29 09:02:32 +02:00
João Duarte
98c3d30ca8
Remove custom bundler (#15066)
* reintroduce bundler patches for bundler < 2.4
2023-06-29 08:59:54 +02:00
João Duarte
a8a5442e58
Update catalog-info.yaml 2023-06-28 16:58:41 +02:00
João Duarte
1022a8f63a
Update serverless_integration_pipeline.yml to invoke es output test 2023-06-28 14:58:24 +02:00
João Duarte
9f0e820b86
Update catalog-info.yaml to use core_serverless_test on serverless test 2023-06-28 14:56:39 +02:00
João Duarte
0a35754392
Delete serverless_pipeline.yml 2023-06-28 13:37:33 +02:00
Andrea Selva
26d1c7ccdb
Update to JRuby 9.4 (#14861)
Set of changes to make Logstash compatible to JRuby 9.4.
Bundle JRuby 9.4.3.0

- Redefine space token in `LSCL`  and `grammar` treetop from `_` which would generated methods in the form `def _0` (deprecated since `2.7`) to `sc`.
- `I18n.t` method doesn't accept hash as second argument
- `URI.encode` has been replaced with same functionality with `URI::Parser.new.escape`
- `YAML.load` needs explicit `fallback: false` to return false when the yaml string is empty (or contains only comments)
- JRuby's  `JavaClass` has been removed, now it can use `java.lang.Class` directly
- explicitly require gem `thwait` to satisfy `require "thwait"` (In `Gemfile.template` and `logstash-core/logstash-core.gemspec`)
- fix not args `clone` to be `def clone(*args)`
- fix `Enumeration.each_slice` which from `Ruby 3.1` is [chainable](https://rubyreferences.github.io/rubychanges/3.1.html#enumerableeach_cons-and-each_slice-return-a-receiver) and doesn't return `nil`. JRuby fixed in https://github.com/jruby/jruby/issues/7015
- Expanded `Down.download` arguments map ca16bbed3c302006967413eb9d3862f2da81f7ae
- Avoid to pass `nil` in the list of couples used in `Hash[ <list of couples> ]` which from Ruby `3.0` generates an `ArgumentError`
- Removed space not allowed between method name and parentheses `initialize (` is forbidden. 29b607dcdef98f81a73ad171639fd13aaa65e243
- With [Ruby 2.7 the `Kernel#open`](https://rubyreferences.github.io/rubychanges/2.7.html#network-and-web) doesn't fallback to `URI#open`, fixed test code that used that to verify open port. e5b70de54c5301f51a767da67294092af0cfafdc
- Avoid to drop `rdoc/` folder from vendored JRuby else `bin/logstash -i irb` would crash, commit b71f73e9c6edb81a7b7ae1305047e506f61c6e8c

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2023-06-28 13:05:43 +02:00
João Duarte
019bb9547c
Update catalog-info.yaml fix indentation and change trigger mode 2023-06-28 09:35:18 +02:00
João Duarte
85891f4679
Update catalog-info.yaml fix spec indentation in pipeline definition 2023-06-28 09:13:00 +02:00
João Duarte
c8812eeb91
Update catalog-info.yaml to introduce resource encapsulating pipeline 2023-06-27 17:30:12 +02:00
João Duarte
52f5650abd
Update catalog-info.yaml to define a component + pipeline instead of resource (#15121) 2023-06-27 16:56:43 +02:00
João Duarte
caff3bf1ce
Rename serverless_integration_pipeline.yml.yml to serverless_integration_pipeline.yml 2023-06-27 16:54:34 +02:00
João Duarte
0998b6a398
reshape catalog-info (#15120)
allow for multiple pipeline definitions
2023-06-27 15:24:50 +02:00
João Duarte
403c361bb1
fix yaml structure for catalog-info (#15119) 2023-06-27 14:45:30 +02:00
elastic-backstage-prod[bot]
a9112fc8f7
Create catalog-info file (#15072)
This will eventually replace the pipeline definition in the catalog repo, using the local file instead.

---------

Co-authored-by: elastic-backstage-prod[bot] <123036547+elastic-backstage-prod[bot]@users.noreply.github.com>
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2023-06-27 12:29:30 +02:00
kaisecheng
e919305fee
placeholder for serverless test in buildkite (#15112)
Use any Buildkite agent for empty serverless pipeline.

Co-authored-by: Mashhur <99575341+mashhurs@users.noreply.github.com>
2023-06-26 22:11:46 +02:00
Mashhur
6f6a446f3c
Install Java on Buildkite Agent. (#15097) 2023-06-22 09:10:33 -07:00
Mashhur
2ccf1a0596
Upgrade bundler version used in ruby utils. (#15109) 2023-06-22 10:11:15 +01:00
Rob Bavey
22dc7a8a91
Bump version to 8.10.0 (#15103) 2023-06-21 09:54:29 -04:00
Mashhur
e3b9324602
Read Snyk token from logstash repo scoped vault. (#15096) 2023-06-20 13:29:47 -07:00
Mashhur
9c080eac53
Snyk Integration (#15083)
* This commit includes number of changes:
- adds initial pipeline steps, each step proceeds one branch report job
- a script to resolve current and previous release latest branches from the release URL. Noting that it considers the branches from snapshots where upcoming releases will be our interest.
- pseudo logic to download logstash, build and report to Snyk. In order to script fully work we need a logstash machine to access Buildkite vault, which I am working.

* Source optimization and use Buildkite Vault to access to Snyk token.

* Add git branch and head to Snyk project tag.

* Dynamically resolve latest branches instead of manually defining.

* Update .buildkite/scripts/snyk/report.sh

Improve comment readability.

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>

---------

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2023-06-20 08:25:21 -07:00
Edmo Vamerlatti Costa
52bbbaa054
Change shutdown stalled method to also include the main/pipeline thread (#15056)
This commit changed the java_pipeline.rb to include the pipeline/main thread on the stalling threads info list, that way, Logstash can provide users with more helpful information when the stalling thread is the pipeline/main one.
2023-06-20 14:48:45 +02:00
Ry Biesemeyer
c187158b58
Forward-port Release notes for 8.8.1 (#15085) (#15086)
* Update release notes for 8.8.1

* Update releasenotes.asciidoc

* Update docs/static/releasenotes.asciidoc



* Update docs/static/releasenotes.asciidoc

* Update docs/static/releasenotes.asciidoc

* Update docs/static/releasenotes.asciidoc



---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2023-06-08 00:08:04 -07:00
Andres Rodriguez
0b68a36e28
Remove obsolete plugin version notice (#15032)
* Remove unneeded tests
2023-06-02 10:35:35 +01:00
Andrea Selva
755fcf8843
Forward port release notes for 8.8.0 (#15062) 2023-05-26 09:08:04 +02:00
Andrea Selva
e5f35df62b
Update versions used in plugins CI (#15061) 2023-05-26 09:07:03 +02:00
David Kilfoyle
b831888318
[Docs] Add instructions to verify Docker install images (#15058)
* Add instructions to verify Docker install images

* remove line breaks

* Update docs/static/docker.asciidoc

Co-authored-by: Maxime Gréau <maxime.greau@elastic.co>

---------

Co-authored-by: Maxime Gréau <maxime.greau@elastic.co>
2023-05-24 08:46:05 -04:00
João Duarte
feb3ee0506
use setLoadPaths instead of RUBYLIB (#15059) 2023-05-24 11:06:00 +01:00
João Duarte
fd2b1ff340
added psych to dependency list and updated NOTICE.txt (#15050)
* replace jruby-complete with jruby-core in build tasks
* place bundler in the rubylib path for testing
2023-05-23 14:16:40 +01:00
Edmo Vamerlatti Costa
e76e582086
Add missing Elasticsearch SSL settings and replace deprecated options (xpack.monitoring and xpack.management) (#15045)
This commit adds missing Elasticsearch SSL settings and replaces deprecated options being used on `xpack.monitoring.*` and `xpack.management.*` settings:

Changes:
- Updated deprecated monitoring and management Elasticsearch's SSL settings so no warnings are logged.
- Added monitoring settings support for file-based certificates and for the cipher suites: `xpack.monitoring.elasticsearch.ssl.certificate`, `xpack.monitoring.elasticsearch.ssl.key`, and `xpack.monitoring.elasticsearch.ssl.cipher_suites`.
- Added management settings support for file-based certificates and for the cipher suites: `xpack.management.elasticsearch.ssl.certificate`, `xpack.management.elasticsearch.ssl.key`, and `xpack.management.elasticsearch.ssl.cipher_suites`.
2023-05-15 11:54:38 +02:00
Ry Biesemeyer
519f3fb2e0
Plugin flow docs fixes (#14820)
* docs: fix example block syntax types and truncations

* docs: provide wrapping hints to flow metric tables

* docs: refresh node stats api response examples

include only `current` and `lifetime` metrics that are GA, and not
technology preview metrics.

* docs: use "m(onospace)" modifier for metric name columns

* docs: swap literal column to first

relies on `#guide table td:first-child .literal` having `white-space: nowrap`
2023-05-10 23:02:39 -07:00
David Kilfoyle
af47b7b478
Fix link to loadbalance in Filebeat ref (#15034) 2023-05-08 09:37:45 -04:00