Commit graph

10932 commits

Author SHA1 Message Date
mergify[bot]
e095a1805f
Added test to verify the int overflow happen (#17353) (#17356)
Use long instead of int type to keep the length of the first token.

The size limit validation requires to sum two integers, one with the length of the accumulated chars till now plus the next fragment head part. If any of the two sizes is close to the max integer it generates an overflow and could successfully fail the test 9c0e50faac/logstash-core/src/main/java/org/logstash/common/BufferedTokenizerExt.java (L123).

To fall in this case it's required that sizeLimit is bigger then 2^32 bytes (2GB) and data fragments without any line delimiter is pushed to the tokenizer with a total size close to 2^32 bytes.

(cherry picked from commit afde43f918)

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2025-03-19 17:26:56 +01:00
mergify[bot]
9228b1eae3
[8.17] Upgrade elasticsearch-ruby client. (backport #17161) (backport #17306) (#17339)
* [8.x] Upgrade elasticsearch-ruby client. (backport #17161) (#17306)

* Upgrade elasticsearch-ruby client. (#17161)

* Fix Faraday removed basic auth option and apply the ES client module name change.

(cherry picked from commit e748488e4a)

* Apply the required changes in elasticsearch_client.rb after upgrading the elasticsearch-ruby client to 8.x

* Swallow the exception and make non-connectable client when ES client raises connection refuses exception.

---------

Co-authored-by: Mashhur <99575341+mashhurs@users.noreply.github.com>
Co-authored-by: Mashhur <mashhur.sattorov@elastic.co>
(cherry picked from commit 7f74ce34a9)

* Update Gemfile lock to reflect elasticsearch-ruby changes.

* Upgrade faraday to v2 in Gemfile lock.

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Mashhur <mashhur.sattorov@elastic.co>
2025-03-17 10:11:25 -07:00
github-actions[bot]
7c46a7ddbf
bump lock file for 8.17 (#17337)
* Update patch plugin versions in gemfile lock

* Update JRuby lockfile and LSCL grammar parser

---------

Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2025-03-17 17:54:41 +01:00
mergify[bot]
e3333b3c8e
Add Deprecation tag to arcsight module (#17331) (#17333)
(cherry picked from commit d45706debe)

Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2025-03-17 11:30:08 -04:00
mergify[bot]
3e7482e047
Shareable function for partitioning integration tests (#17223) (#17301)
For the fedramp high work https://github.com/elastic/logstash/pull/17038/files a
use case for multiple scripts consuming the partitioning functionality emerged.
As we look to more advanced partitioning we want to ensure that the
functionality will be consumable from multiple scripts.

See https://github.com/elastic/logstash/pull/17219#issuecomment-2698650296

(cherry picked from commit d916972877)

Co-authored-by: Cas Donoghue <cas.donoghue@gmail.com>
2025-03-12 11:17:14 -07:00
mergify[bot]
9c80c9c7fd
Fix pqcheck and pqrepair on Windows (#17210) (#17261)
A recent change to pqheck, attempted to address an issue where the
pqcheck would not on Windows mahcines when located in a folder containing
a space, such as "C:\program files\elastic\logstash". While this fixed an
issue with spaces in folders, it introduced a new issue related to Java options,
and the pqcheck was still unable to run on Windows.

This PR attempts to address the issue, by removing the quotes around the Java options,
which caused the option parsing to fail, and instead removes the explicit setting of
the classpath - the use of `set CLASSPATH=` in the `:concat` function is sufficient
to set the classpath, and should also fix the spaces issue

Fixes: #17209
(cherry picked from commit ba5f21576c)

Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2025-03-07 16:13:30 -05:00
mergify[bot]
829858e8f1
[CI] Health report integration tests use the new artifacts-api (#17274) (#17286)
migrate to the new artifacts-api

(cherry picked from commit feb2b92ba2)

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
2025-03-06 16:49:01 +00:00
Rob Bavey
b6bfa855e6
Forward Port of Release notes for 8.16.5 (#17188) (#17265)
* Update release notes for 8.16.5

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
2025-03-06 08:57:25 -05:00
mergify[bot]
3be9a29c5c
gradle task migrate to the new artifacts-api (#17232) (#17238)
This commit migrates gradle task to the new artifacts-api

- remove dependency on staging artifacts
- all builds use snapshot artifacts
- resolve version from current branch, major.x, previous minor,
   with priority given in that order.

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
(cherry picked from commit 0a745686f6)

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
2025-03-05 18:21:22 +00:00
github-actions[bot]
a3ff8ef769
Update rack to 3.1.11 (#17230) (#17234)
(cherry picked from commit 872ae95588)

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
2025-03-05 17:23:20 +00:00
mergify[bot]
c36957c37a
Fix empty node stats pipelines (#17185) (#17198)
Fixed an issue where the `/_node/stats` API displayed empty pipeline metrics
when X-Pack monitoring was enabled

(cherry picked from commit 86785815bd)

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
2025-03-05 00:12:09 +00:00
Rob Bavey
62b1f5fa2a
8.17.4 version bump (#17216)
* 8.17.4 version bump
2025-03-04 13:23:33 -05:00
github-actions[bot]
80ac2024db
Release notes for 8.17.3 (#17187)
* Update release notes for 8.17.3


---------

Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2025-03-04 08:10:11 -05:00
github-actions[bot]
2c4fdf7119
Update Dockerfile.erb to set eux on RUN command with semicolons (#17141) (#17199)
as per guidance https://github.com/elastic/logstash/pull/16063#discussion_r1577000627

(cherry picked from commit 18772dd25a)

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2025-02-28 22:36:54 +00:00
github-actions[bot]
08b22ef499
bump lock file for 8.17 (#17152)
* Update patch plugin versions in gemfile lock

* Remove universal-java-17 to remain consistent with previous version

---------

Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2025-02-26 08:34:51 -05:00
github-actions[bot]
7cb800bb05
Add Windows 2025 to CI (#17133) (#17144)
This commit adds Windows 2025 to the Windows JDK matrix and exhaustive tests pipelines.

(cherry picked from commit 4d52b7258d)

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
2025-02-24 16:48:35 +02:00
github-actions[bot]
bbacc0bfdc
allow concurrent Batch deserialization (#17050) (#17107)
Currently the deserialization is behind the readBatch's lock, so any large batch will take time deserializing, causing any other Queue writer (e.g. netty executor threads) and any other Queue reader (pipeline worker) to block.

This commit moves the deserialization out of the lock, allowing multiple pipeline workers to deserialize batches concurrently.

- add intermediate batch-holder from `Queue` methods
- make the intermediate batch-holder a private inner class of `Queue` with a descriptive name `SerializedBatchHolder`

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
(cherry picked from commit 637f447b88)

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2025-02-17 22:22:56 +00:00
github-actions[bot]
c1858ac810
CPM handle 404 response gracefully with user-friendly log (#17052) (#17099)
Starting from es-output 12.0.2, a 404 response is treated as an error. Previously, central pipeline management considered 404 as an empty pipeline, not an error.

This commit restores the expected behavior by handling 404 gracefully and logs a user-friendly message.
It also removes the redundant cache of pipeline in CPM

Fixes: #17035
(cherry picked from commit e896cd727d)

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
2025-02-17 13:51:06 +00:00
github-actions[bot]
88cd16b2c4
Allow capturing heap dumps in DRA BK jobs (#17081) (#17086)
This commit allows Buildkite to capture any heap dumps produced
during DRA builds.

(cherry picked from commit 78c34465dc)

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
2025-02-14 09:37:43 +02:00
Dimitrios Liappis
6398d9612e
Fix conflicts (#17075) 2025-02-12 10:46:26 -08:00
github-actions[bot]
3e041cd8eb
Don't honor VERSION_QUALIFIER if set but empty (#17032) (#17070)
PR #17006 revealed that the `VERSION_QUALIFIER` env var gets honored in
various scripts when present but empty.
This shouldn't be the case as the DRA process is designed to gracefully
ignore empty values for this variable.

This commit changes various ruby scripts to not treat "" as truthy.
Bash scripts (used by CI etc.) are already ok with this as part of
refactorings done in #16907.

---------

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
(cherry picked from commit c7204fd7d6)

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
2025-02-12 16:12:51 +02:00
github-actions[bot]
82f86922de
inject VERSION_QUALIFIER into artifacts (#16904) (#17049) (#17065)
VERSION_QUALIFIER was already observed in rake artifacts task but only to influence the name of the artifact.

This commit ensure that the qualifier is also displayed in the cli and in the http api.

(cherry picked from commit 00f8b91c35)

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2025-02-12 09:10:27 +00:00
Ry Biesemeyer
0e487fd7ea
docs: forward-port 8.16.4 release notes to 8.17 (#17056) 2025-02-11 12:31:57 -08:00
Ry Biesemeyer
03aeacf662
version bump 8.17.3 (#17054) 2025-02-11 08:33:31 -08:00
github-actions[bot]
8491a4ba20
Release notes for 8.17.2 (#17044)
* Update release notes for 8.17.2

* humanize release notes 8.17.2

* Apply suggestions from code review

Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>

---------

Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2025-02-10 22:40:10 -08:00
github-actions[bot]
a19a607909
fix logstash-keystore to accept spaces in values when added via stdin (#17039) (#17041)
This commit preserves spaces in values, ensuring that multi-word strings are stored as intended.
Prior to this change, `logstash-keystore` incorrectly handled values containing spaces,
causing only the first word to be stored.

(cherry picked from commit 5573b5ad77)

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
2025-02-07 21:35:06 +00:00
github-actions[bot]
40866b9e96
bump lock file for 8.17 (#17024)
* Update patch plugin versions in gemfile lock

* pull in minor from ES filter

* remove java-17 specific (covered by `java`)

* pull in minor from http input to get fixed netty thread names

---------

Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
Co-authored-by: Ry Biesemeyer <ry.biesemeyer@elastic.co>
2025-02-05 10:07:15 -08:00
github-actions[bot]
d1f470ae5c
Backport PR #16968 to 8.17: Fix BufferedTokenizer to properly resume after a buffer full condition respecting the encoding of the input string (#16968) (#17022)
Backport PR #16968 to 8.17 branch, original message:

----

Permit to use effectively the tokenizer also in context where a line is bigger than a limit.
Fixes an issues related to token size limit error, when the offending token was bigger than the input fragment in happened that the tokenzer wasn't unable to recover the token stream from the first delimiter after the offending token but messed things, loosing part of tokens.

## How solve the problem
This is a second take to fix the processing of tokens from the tokenizer after a buffer full error. The first try #16482 was rollbacked to the encoding error #16694.
The first try failed on returning the tokens in the same encoding of the input.
This PR does a couple of things:
- accumulates the tokens, so that after a full condition can resume with the next tokens after the offending one.
- respect the encoding of the input string. Use `concat` method instead of `addAll`, which avoid to convert RubyString to String and back to RubyString. When return the head `StringBuilder` it enforce the encoding with the input charset.

(cherry picked from commit 1c8cf546c2)

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2025-02-05 12:14:55 +01:00
github-actions[bot]
23383e71c3
upgrade jdk to 21.0.6+7 (#16932) (#16987) (#16989)
(cherry picked from commit 51ab5d85d2)

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
(cherry picked from commit f561207b4b)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-01-30 11:20:09 +00:00
github-actions[bot]
77e355ed9f
plugin manager: add --level=[major|minor|patch] (default: minor) (#16899) (#16974)
* plugin manager: add `--level=[major|minor|patch]` (default: `minor`)

* docs: plugin manager update `--level` behavior

* Update docs/static/plugin-manager.asciidoc

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

* docs: plugin update major as subheading

* docs: intention-first in major plugin updates

* Update docs/static/plugin-manager.asciidoc

Co-authored-by: Karen Metts <35154725+karenzone@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>
(cherry picked from commit 6943df5570)

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
2025-01-28 17:18:03 -08:00
kaisecheng
dfdbaf2f66
add openssl command to wolfi image (#16971) 2025-01-28 17:31:48 +00:00
github-actions[bot]
56e5ebcf37
remove irrelevant warning for internal pipeline (#16938) (#16963)
This commit removed irrelevant warning for internal pipeline, such as monitoring pipeline.
Monitoring pipeline is expected to be one worker. The warning is not useful

Fixes: #13298
(cherry picked from commit 3f41828ebb)

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
2025-01-27 17:29:53 +00:00
github-actions[bot]
3897b718ff
[Backport 8.x] Reimplement LogStash::String setting in Java (#16576) (#16959) (#16960)
Clean backport of #16959 from 8.x to 8.17

----

Reimplements `LogStash::Setting::String` Ruby setting class into the `org.logstash.settings.SettingString` and exposes it through `java_import` as `LogStash::Setting::SettingString`.
Updates the rspec tests in two ways:
- logging mock is now converted to real Log4J appender that spy log line that are later verified
- verifies `java.lang.IllegalArgumentException` instead of `ArgumentError` is thrown because the kind of exception thrown by Java code, during verification.

* Fixed the rename of NullableString to SettingNullableString

* Fixed runner test to use real spy logger from Java Settings instead of mock test double

(cherry picked from commit a0378c05cb)

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2025-01-27 17:25:12 +01:00
github-actions[bot]
f3fd1c5841
fix user and password detection from environment's uri (#16955) (#16958)
(cherry picked from commit c8a6566877)

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2025-01-27 11:50:57 +00:00
github-actions[bot]
b9b5b9553b
Increase Xmx used by JRuby during Rake execution to 4Gb (#16911) (#16943)
(cherry picked from commit 58e6dac94b)

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2025-01-24 14:54:29 +01:00
Dimitrios Liappis
2002e936fe
Backport 16907 to 8.17: Use --qualifier in release manager (#16907) #16941
Backport of #16907 cherry-picked from 9385cfa

This commit uses the new --qualifier parameter in the release manager
for publishing dra artifacts. Additionally, simplifies the expected
variables to rely on a simple `VERSION_QUALIFIER`.

Snapshot builds are skipped when VERSION_QUALIFIER is set.
Finally, for helping to test DRA PRs, we also allow passing the `DRA_BRANCH`  option/env var
to override BUILDKITE_BRANCH.

Closes https://github.com/elastic/ingest-dev/issues/4856
2025-01-24 14:52:07 +02:00
github-actions[bot]
fa6894ae93
Doc: Remove extra symbol to fix formatting error (#16926) (#16935)
(cherry picked from commit f66e00ac10)

Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2025-01-23 17:35:14 -05:00
github-actions[bot]
0966786feb
[doc] fix the necessary privileges of central pipeline management (#16902) (#16930)
CPM requires two roles logstash_admin and logstash_system

Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
(cherry picked from commit dc740b46ca)

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
2025-01-23 11:36:13 +00:00
github-actions[bot]
d2aa696142
fix jars installer for new maven and pin psych to 5.2.2 (#16919) (#16924)
handle maven output that can carry "garbage" information after the jar's name. this patch deletes that extra information, also pins psych to 5.2.2 until jruby ships with snakeyaml-engine 2.9 and jar-dependencies 0.5.2

Related to: https://github.com/jruby/jruby/issues/8579

(cherry picked from commit 52b7fb0ae6)

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2025-01-22 17:00:35 +00:00
kaisecheng
648c5abd00
Update Gemfile.jruby-3.1.lock.release (#16922) 2025-01-22 15:13:55 +00:00
kaisecheng
93e792c3d6
Release notes for 8.16.3 (#16879) (#16918)
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
# Conflicts:
#	docs/static/releasenotes.asciidoc

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-01-21 12:00:21 +00:00
kaisecheng
862bbacb6a
bump core 8.17.2 (#16916) 2025-01-21 10:10:52 +00:00
github-actions[bot]
927a043597
Release notes for 8.17.1 (#16880)
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2025-01-21 01:44:00 +00:00
github-actions[bot]
5bd02d98b4
Validate the size limit in BufferedTokenizer. (#16882) (#16891)
(cherry picked from commit a215101032)

Co-authored-by: Mashhur <99575341+mashhurs@users.noreply.github.com>
2025-01-09 16:52:41 -08:00
github-actions[bot]
43f6fc0f4a
Initialize flow metrics if pipeline metric.collect params is enabled. (#16881) (#16888)
(cherry picked from commit 47d04d06b2)

Co-authored-by: Mashhur <99575341+mashhurs@users.noreply.github.com>
2025-01-09 13:32:00 -08:00
João Duarte
92d58d1928
Forward port 8.15.5 and 8.16.2 release notes to 8.17 (#16810)
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2025-01-08 11:44:57 +00:00
Mashhur
268b61da9a
elastic_integration plugin version updated. (#16875) 2025-01-07 18:22:51 -08:00
github-actions[bot]
e9c3abb049
bump lock file for 8.17 (#16870)
* Update patch plugin versions in gemfile lock

* Update Gemfile.jruby-3.1.lock.release

---------

Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
2025-01-07 17:26:54 +00:00
github-actions[bot]
af3004c8cd
Respect environment variables in jvm.options (#16834) (#16867)
JvmOptionsParser adds support for ${VAR:default} syntax when parsing jvm.options
- allow dynamic resolution of environment variables in the jvm.options file
- enables fallback to default value when the environment variable is not set

(cherry picked from commit ef36df6b81)

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
2025-01-07 15:04:17 +00:00
github-actions[bot]
1494f184ef
Add pipeline metrics to Node Stats API (#16839) (#16865)
This commit introduces three new metrics per pipeline in the Node Stats API:
- workers
- batch_size
- batch_delay

```
{
  ...
  pipelines: {
    main: {
      events: {...},
      flow: {...},
      plugins: {...},
      reloads: {...},
      queue: {...},
      pipeline: {
        workers: 12,
        batch_size: 125,
        batch_delay: 5,
      },
    }
  }
  ...
}
```

(cherry picked from commit de6a6c5b0f)

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
2025-01-07 14:53:08 +00:00