Commit graph

11002 commits

Author SHA1 Message Date
github-actions[bot]
f15ae9fbb0
Update patch plugin versions in gemfile lock (#17343)
Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
2025-03-17 18:52:12 -07:00
mergify[bot]
248f630012
Doc: Refine new MD docs (WIP) (#17325) (#17342)
(cherry picked from commit 193af6a272)
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2025-03-17 17:41:57 -04:00
mergify[bot]
3af8a6fe00
[9.0] Upgrade elasticsearch-ruby client. (backport #17161) (#17309)
* Upgrade elasticsearch-ruby client. (#17161)

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

(cherry picked from commit e748488e4a)

* Update elasticsearch-ruby client in gemfile lock.

---------

Co-authored-by: Mashhur <99575341+mashhurs@users.noreply.github.com>
Co-authored-by: Mashhur <mashhur.sattorov@elastic.co>
2025-03-17 08:35:43 -07:00
mergify[bot]
402bd5a11e
Internal collection doc update to reflect enabling legacy collection. (#17326) (#17327)
(cherry picked from commit 8d10baa957)

Co-authored-by: Mashhur <99575341+mashhurs@users.noreply.github.com>
2025-03-14 15:25:35 -07:00
mergify[bot]
5c50762b66
Require shellwords in artifact rake task (#17319) (#17320)
The https://github.com/elastic/logstash/pull/17310 PR changed the rake task for
artifact creation to use shellwords from standard library. The acceptance tests
need to explitily load that library. This commit updates the rake file to handle
loading the required code.

(cherry picked from commit 964468f922)

Co-authored-by: Cas Donoghue <cas.donoghue@gmail.com>
2025-03-13 19:11:06 -07:00
mergify[bot]
6ab56e35c8
Surface failures from nested rake/shell tasks (#17310) (#17313)
Previously when rake would shell out the output would be lost. This
made debugging CI logs difficult. This commit updates the stack with
improved message surfacing on error.

(cherry picked from commit 0d931a502a)

Co-authored-by: Cas Donoghue <cas.donoghue@gmail.com>
2025-03-13 16:47:13 -07:00
mergify[bot]
d3ee043bb5
Shareable function for partitioning integration tests (#17223) (#17299)
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:16:40 -07:00
Karen Metts
91927d7450
Doc: Migrate docs from AsciiDoc to Markdown in 9.0 branch (#17289)
* Doc: Delete asciidoc files for 9.0 branch
* Add MD files for 9.0 branch
2025-03-10 18:02:14 -04:00
mergify[bot]
905ff93cec
Fix pqcheck and pqrepair on Windows (#17210) (#17263)
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:14 -05:00
Ry Biesemeyer
0f59eee208
Backport 17203 and 17267 9.0 (#17269)
* Pluginmanager clean after mutate (#17203)

* pluginmanager: always clean after mutate

* pluginmanager: don't skip updating plugins installed with --version

* pr feedback

(cherry picked from commit 8c96913807)

* Pluginmanager install preserve (#17267)

* tests: integration tests for pluginmanager install --preserve

* fix regression where pluginmanager's install --preserve flag didn't
2025-03-06 09:19:08 -08:00
mergify[bot]
aefc1bb024
[CI] Health report integration tests use the new artifacts-api (#17274) (#17284)
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:29 +00:00
mergify[bot]
39bdd54fc1
[CI] benchmark uses the new artifacts-api (#17224) (#17278)
migrate benchmark to the new artifacts-api

(cherry picked from commit d61a83abbe)

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
2025-03-06 16:27:30 +00:00
mergify[bot]
1a87f07137
Additional cleanify changes to ls2ls integ tests (#17246) (#17257)
* Additional cleanify changes to ls2ls integ tests: replace heartbeat-input with reload option, set queue drain to get consistent result.

(cherry picked from commit 1e06eea86e)

Co-authored-by: Mashhur <99575341+mashhurs@users.noreply.github.com>
2025-03-05 13:03:08 -08:00
mergify[bot]
c9ae703117
tests: ls2ls delay checking until events have been processed (#17167) (#17251)
* tests: ls2ls delay checking until events have been processed

* Make sure upstream sends expected number of events before checking the expectation with downstream. Remove unnecessary or duplicated logics from the spec.

* Add exception handling in `wait_for_rest_api` to make wait for LS REST API retriable.

---------

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

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
2025-03-05 12:18:00 -08:00
mergify[bot]
8e42cba58c
Improve warning for insufficient file resources for PQ max_bytes (#16656) (#17249)
This commit refactors the `PersistedQueueConfigValidator` class to provide a
more detailed, accurate and actionable warning when pipeline's PQ configs are at
risk of running out of disk space. See
https://github.com/elastic/logstash/issues/14839 for design considerations. The
highlights of the changes include accurately determining the free resources on a
filesystem disk and then providing a breakdown of the usage for each of the
paths configured for a queue.

(cherry picked from commit 062154494a)

Co-authored-by: Cas Donoghue <cas.donoghue@gmail.com>
2025-03-05 11:36:57 -08:00
mergify[bot]
2aff08c6e4
gradle task migrate to the new artifacts-api (#17232) (#17240)
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:23:30 +00:00
github-actions[bot]
ed676fe4d3
Update rack to 3.1.11 (#17230) (#17233)
(cherry picked from commit 872ae95588)

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
2025-03-05 17:23:05 +00:00
github-actions[bot]
c6149e6584
Fix empty node stats pipelines (#17185) (#17204)
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-02-28 22:51:58 +00:00
github-actions[bot]
6ceddc694a
add missing Makefile tasks to build oss and wolfi images from build context tarballs (#17189) (#17205)
(cherry picked from commit a4cf2bcc52)

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2025-02-28 22:31:14 +00:00
github-actions[bot]
24e97492df
add env2yaml source files to build context tarball (#17151) (#17181)
* build full docker image from dockerfiles during docker acceptance tests

(cherry picked from commit fecfc7c602)

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2025-02-28 16:23:03 +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