Commit graph

10983 commits

Author SHA1 Message Date
kaisecheng
fb529f539c Update z_rubycheck.rake to no longer inject Xmx1g
This allows the environment variable JRUBY_OPTS to be used for setting properties like Xmx
original pr: #16420

(cherry picked from commit f562f37df2)
2025-02-28 15:23:52 +00:00
kaisecheng
7a39a0e7c1
[Backport 9.0] use UBI9 as base image (#17174)
- the base image change from ubi8 to ubi9
- remove installation of curl
2025-02-28 11:52:02 +00:00
github-actions[bot]
fc99649795
qa: don't bypass plugin manger tests on linux (#17171) (#17172)
* qa: don't bypass plugin manger tests on linux

* add gradle task to build gem fixtures for integration tests

(cherry picked from commit 0f81816311)

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
2025-02-27 13:59:32 -08:00
github-actions[bot]
574b8eda76
Add Windows 2025 to CI (#17133) (#17142)
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:47:57 +02:00
github-actions[bot]
bba7e470a5
Update container acceptance tests with stdout/stderr changes (#17138) (#17139)
In https://github.com/elastic/logstash/pull/17125 jvm setup was redirected to
stderr to avoid polluting stdout. This test was actually having to do some
additional processing to parse that information. Now that we have split the
destinations the tests can be simplified to look for the data they are trying to
validate on the appropriate stream.

(cherry picked from commit 227c0d8150)

Co-authored-by: Cas Donoghue <cas.donoghue@gmail.com>
2025-02-21 12:23:02 -08:00
github-actions[bot]
d622ff2272
entrypoint: avoid polluting stdout (#17125) (#17135)
routes output from setup-related functions to stderr, so that stdout can
include only the output of the actual program.

(cherry picked from commit 91258c3f98)

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
2025-02-21 12:22:31 -08:00
github-actions[bot]
5da491eb3b
Update minor plugin versions in gemfile lock (#17134)
Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
2025-02-20 12:16:07 -08:00
Mashhur
ae2ecf3d8b
Upgrade filter-xml and its nokogori dependency. (#17130) 2025-02-20 09:35:11 -08:00
github-actions[bot]
db8fdad7d9
Fix acceptance test assertions for updated plugin remove (#17126) (#17129)
This commit updates the acceptance tests to expect messages in the updated
format for removing plugins. See https://github.com/elastic/logstash/pull/17030
for change.

(cherry picked from commit e8e24a0397)

Co-authored-by: Cas Donoghue <cas.donoghue@gmail.com>
2025-02-20 09:10:47 -08:00
github-actions[bot]
a86b0ce4da
Fix acceptance test assertions for updated plugin remove (#17122) (#17123)
This commit updates the acceptance tests to expect messages in the updated
format for removing plugins. See https://github.com/elastic/logstash/pull/17030
for change.

(cherry picked from commit e094054c0e)

Co-authored-by: Cas Donoghue <cas.donoghue@gmail.com>
2025-02-19 16:27:26 -08:00
github-actions[bot]
de68d4bb1d
plugins: improve remove command to support multiple plugins (#17030) (#17120)
Removal works in a single pass by finding plugins that would have unmet
dependencies if all of the specified plugins were to be removed, and
proceeding with the removal only if no conflicts were created.

> ~~~
> ╭─{ rye@perhaps:~/src/elastic/logstash@main (pluginmanager-remove-multiple ✘) }
> ╰─● bin/logstash-plugin remove logstash-input-syslog logstash-filter-grok
> Using system java: /Users/rye/.jenv/shims/java
> Resolving dependencies......
> Successfully removed logstash-input-syslog
> Successfully removed logstash-filter-grok
> [success (00:00:05)]
~~~

(cherry picked from commit 089558801e)

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
2025-02-19 15:42:15 -08:00
github-actions[bot]
e211af5c62
spec: improve ls2ls spec (#17114) (#17118)
* spec: improve ls2ls spec

 - fixes upstream/downstream convention
   - upstream: the sending logstash (has an LS output)
   - downstream: the receiving logstash (has an LS input)
 - helper `run_logstash_instance` yields the `LogstashService` instance
   and handles the teardown.
 - pass the pipeline id and node name to the LS instances via command line
   flags to make logging easier to differentiate
 - use the generator input's sequence id to ensure that the _actual_ events
   generated are received by the downstream pipeline

* start with port-offset 100

Co-authored-by: Mashhur <99575341+mashhurs@users.noreply.github.com>

---------

Co-authored-by: Mashhur <99575341+mashhurs@users.noreply.github.com>
(cherry picked from commit 9abad6609c)

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
2025-02-18 22:49:20 -08:00
github-actions[bot]
1fba70f92e
qa: use clean expansion of LS tarball per fixture instance (#17082) (#17113)
* qa: use clean expansion of LS tarball per fixture instance

Because QA tests can _modify_ the Logstash installation (e.g. those that
invoke the plugin manager), it is important that the service wrapper
begins with a clean expansion of the logstash tarball.

* qa: enable safe reuse of ls_home in ls_to_ls tests

(cherry picked from commit d20eb4dbcb)

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
2025-02-18 22:08:02 -08:00
github-actions[bot]
39950dc819
allow concurrent Batch deserialization (#17050) (#17109)
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:46 +00:00
github-actions[bot]
a58abbb5a4
CPM handle 404 response gracefully with user-friendly log (#17052) (#17097)
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:50:25 +00:00
github-actions[bot]
ac54db4d22
Release notes for 9.0.0 beta1 (#17027)
* Update release notes for 9.0.0

* First clean up: non end user related changes.

* Start cleanup of generated content

* Humanize github commit notes.

* Remove same items shipped in 8.x, simplify SSL removed settings.

* Categorize breaking change section and standardize the notes.

* Move base image change to breaking change section, plugin releases included in 8.x removed.

* Remove Elastic_enterprise_search plugin change.

* Make a single simple line if posssible.

* Update docs/static/releasenotes.asciidoc

Co-authored-by: Rob Bavey <rob.bavey@elastic.co>

* Move avoiding JSON log collision to breaking change section.

* 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: Mashhur <mashhur.sattorov@elastic.co>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
Co-authored-by: Mashhur <99575341+mashhurs@users.noreply.github.com>
Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2025-02-14 17:21:30 -08:00
github-actions[bot]
4fcfab11d5
bump lock file for 9.0 (#17080)
* Update patch plugin versions in gemfile lock

---------

Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
Co-authored-by: Mashhur <mashhur.sattorov@elastic.co>
2025-02-13 10:30:49 -08:00
Dimitrios Liappis
b982e36958
Backport PR #17063 to 9.0: Use centralized source of truth for active branches (#17072)
* github-action: Add AsciiDoc freeze warning (#16969)

* Add 9.0 branch to the CI branches definition (#16997)

* Core version bump to 9.1.0 (#16991)

* Use centralized source of truth for active branches (#17063)

This commit simplifies the DRA process in Logstash by removing the need to maintain a separate file for the active branches, and instead rely on a centrally maintained file containing source of truth.
While at it, we refactor/simplify the creation of an array with the versions in `.buildkite/scripts/snyk/resolve_stack_version.sh`.

* Fix conflicts

---------

Co-authored-by: Jan Calanog <nejcalanog@gmail.com>
Co-authored-by: Mashhur <99575341+mashhurs@users.noreply.github.com>
2025-02-12 14:54:48 -08:00
Mashhur
cdc7e28fad
Upgrade net-imap to 0.5.6 (#17077) 2025-02-12 11:31:52 -08:00
github-actions[bot]
4299ebfa7c
fix logstash-keystore to accept spaces in values when added via stdin (#17039) (#17042)
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:37:44 +00:00
github-actions[bot]
8c32a462ba
Don't honor VERSION_QUALIFIER if set but empty (#17032) (#17034)
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-07 13:35:55 +02:00
Mashhur
20e192cc02
Update elastic_integration version with 9.0 pre-release. (#17016) 2025-02-05 08:26:41 -08:00
github-actions[bot]
97cadfa45d
Backport PR #16968 to 9.0: Fix BufferedTokenizer to properly resume after a buffer full condition respecting the encoding of the input string (#16968) (#17018)
Backport PR #16968 to 9.0 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 11:31:33 +01:00
Dimitrios Liappis
f8f53d1110
Revert "Use centralized version qualifier (#16995)" (#17006)
This reverts commit ac56d99553.

As mentioned in https://github.com/elastic/logstash/pull/16995#issuecomment-2626811054 testing revealed
that even an empty VERSION_QUALIFIER env var currently gets honored for snapshot builds (resulting in an unnecessary empty "-" suffix)
so there's a little more prerequisite work needed.
2025-01-31 14:17:12 +02:00
Dimitrios Liappis
ac56d99553
Use centralized version qualifier (#16995)
To avoid manual invocations specifying the version qualifier for
prereleases in this commit we leverage a centralized version of truth
for the version qualifier.

We also honor the `DRA_BRANCH` BK var for the generated step names
(the functionality was already there, it's just a cosmetic improvement).
2025-01-31 11:34:49 +02:00
github-actions[bot]
3d66b67ba3
Update major plugin versions in gemfile lock (#16996)
Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
2025-01-30 11:31:37 -08:00
Mashhur
3d83ac5bda
Copy Gemfile from 8.17 to 9.0 (#16993)
* Copy Gemfile from 8.17 and bump core version to 9.0
2025-01-30 09:56:04 -08:00
João Duarte
51ab5d85d2
upgrade jdk to 21.0.6+7 (#16932) 2025-01-30 11:17:04 +00:00
Mashhur
7378b85f41
Adding elastic_integration upgrade guidelines. (#16979)
* Adding elastic_integration upgrade guidelines.
2025-01-29 15:20:47 -08:00
Rob Bavey
70a6c9aea6
[wip] Changing upgrade docs to refer to 9.0 instead of 8.0 (#16977) 2025-01-29 17:33:17 -05:00
Rob Bavey
8a41a4e0e5
Remove sample breaking change from breaking changes doc (#16978) 2025-01-29 17:31:37 -05:00
Andrea Selva
6660395f4d
Update branches.json for 8.18 (#16981)
Add 8.18 to CI inventory branches
2025-01-29 19:04:16 +01:00
João Duarte
d3093e4b44
integration tests: switch log input to filestream in filebeat (#16983)
Log input has been deprecated in filebeat 9.0.0 and throws an error if it's present in the configuration.
This commit switches the configuration to the "filestream" input.
2025-01-29 13:51:09 +00:00
Ry Biesemeyer
6943df5570
plugin manager: add --level=[major|minor|patch] (default: minor) (#16899)
* 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>
2025-01-28 08:33:37 -08:00
Victor Martinez
1fda320ed9
ci(buildkite): exclude files/folders that are not tested in Buildkite (#16929) 2025-01-28 11:54:29 +01:00
kaisecheng
2be4812118
add openssl command to wolfi image (#16966)
This commit added openssl command to logstash-wolfi image
Fixes: #16965
2025-01-27 18:58:39 +00:00
kaisecheng
3f41828ebb
remove irrelevant warning for internal pipeline (#16938)
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
2025-01-27 16:44:12 +00:00
João Duarte
c8a6566877
fix user and password detection from environment's uri (#16955) 2025-01-27 11:38:42 +00:00
Andrea Selva
03b11e9827
Reimplement LogStash::String setting in Java (#16576)
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.
2025-01-24 16:56:53 +01:00
kaisecheng
dc740b46ca
[doc] fix the necessary privileges of central pipeline management (#16902)
CPM requires two roles logstash_admin and logstash_system

Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2025-01-23 11:04:19 +00:00
Karen Metts
f66e00ac10
Doc: Remove extra symbol to fix formatting error (#16926) 2025-01-22 18:21:25 -05:00
João Duarte
52b7fb0ae6
fix jars installer for new maven and pin psych to 5.2.2 (#16919)
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
2025-01-22 15:35:50 +00:00
kaisecheng
d4ba08c358
Update logstash_releases.json (#16917) 2025-01-21 11:29:26 +00:00
Dimitrios Liappis
9385cfac5a
Use --qualifier in release manager (#16907)
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-20 13:55:17 +02:00
Andrea Selva
58e6dac94b
Increase Xmx used by JRuby during Rake execution to 4Gb (#16911) 2025-01-19 18:02:23 +01:00
Karen Metts
92d7210146
Doc: WPS integration (#16910) 2025-01-17 13:20:53 -05:00
kaisecheng
cd729b7682
Add %{{TIME_NOW}} pattern for sprintf (#16906)
* Add a new pattern %{{TIME_NOW}} to `event.sprintf` to generate a fresh timestamp.
The timestamp is represented as a string in the default ISO 8601 format

For example,
```
input {
    heartbeat {
    add_field => { "heartbeat_time" => "%{{TIME_NOW}}" }
    }
}
```
2025-01-17 16:51:15 +00:00
João Duarte
9a2cd015d4
inject VERSION_QUALIFIER into artifacts (#16904)
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.
2025-01-17 10:18:35 +00:00
kaisecheng
ff44b7cc20
Update logstash_releases.json (#16901) 2025-01-14 15:46:29 +00:00
Ry Biesemeyer
348f1627a5
remove pipeline bus v1 (#16895) 2025-01-10 15:55:25 -08:00