Commit graph

10868 commits

Author SHA1 Message Date
github-actions[bot]
6f8fd5a4eb
ensure jackson overrides are available to static initializers (#16719) (#16757)
Moves the application of jackson defaults overrides into pure java, and
applies them statically _before_ the `org.logstash.ObjectMappers` has a chance
to start initializing object mappers that rely on the defaults.

We replace the runner's invocation (which was too late to be fully applied) with
a _verification_ that the configured defaults have been applied.

(cherry picked from commit 202d07cbbf)

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
2024-12-04 16:02:18 -08:00
github-actions[bot]
5ab462e8b3
Pin jar-dependencies to 0.4.1 (#16747) (#16750)
Pin jar-dependencies to `0.4.1`, until https://github.com/jruby/jruby/issues/7262
is resolved.

(cherry picked from commit e3265d93e8)

Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2024-12-04 10:09:22 -05:00
github-actions[bot]
c68a631a4c
Docs: Troubleshooting update for JDK bug handling cgroups v1 (#16721) (#16731)
---------
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 d913e2ae3d)

Co-authored-by: mmahacek <mark.mahacek@elastic.co>
2024-11-27 13:49:51 +00:00
github-actions[bot]
ab22999a7a
Release notes for 8.16.1 (#16691) (#16707)
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>
(cherry picked from commit 8b97c052e6)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-11-20 18:23:13 -05:00
Cas Donoghue
accc201d1f
Revert "Backport PR #16482 to 8.x: Bugfix for BufferedTokenizer to completely consume lines in case of lines bigger then sizeLimit (#16569)" (#16705)
This reverts commit 27bd2a039b.
2024-11-20 14:46:00 -08:00
github-actions[bot]
adfa02b536
Update minor plugin versions in gemfile lock for 8.17.0 (#16696)
Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
2024-11-20 16:36:32 +00:00
github-actions[bot]
10512266af
Update license checker with new logger dependency (#16695) (#16700)
A new transative dependency on the `logger` gem has been added through sinatra 4.1.0. Update the
license checker to ensure this is accounted for.

(cherry picked from commit e0ed994ab1)

Co-authored-by: Cas Donoghue <cas.donoghue@gmail.com>
2024-11-20 15:29:43 +00:00
João Duarte
7914ac04c0 add lockfile from 8.16.1 and bump version to 8.17.0 2024-11-20 11:20:38 +00:00
Ry Biesemeyer
8af6343a26
PipelineBusV2 deadlock proofing (#16671)
* pipeline bus: add deadlock test for unlisten/unregisterSender

* pipeline bus: eliminate deadlock

Moves the sync-to-notify out of the `AddressStateMapping#mutate`'s effective
synchronous block to eliminate a race condition where unlistening to an address
and unregistering a sender could deadlock.

It is safe to notify an AddressState's attached input without exclusive access
to the AddressState, because notifying an input that has since been disconnected
is net zero harm.
2024-11-18 08:43:11 -08:00
github-actions[bot]
18e1545e4b
Updates release notes for 8.14.x to call for an update. (#16675) (#16676)
Updates release notes for `8.14.x` to call for an update to a subsequent minor for fix performance regression in JSON decoding.

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

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2024-11-18 08:49:35 +01:00
github-actions[bot]
01dcd621d3
Doc: Realign release notes and add known issue (#16663) (#16668)
(cherry picked from commit 15cdf5c63d)

Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2024-11-12 15:19:30 -05:00
github-actions[bot]
a402be0b8f
Release notes for 8.16.0 (#16605) (#16662)
* Update release notes for 8.16.0

* Refine release notes

* Apply suggestions from code review

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
Co-authored-by: Andrea Selva <selva.andre@gmail.com>

* Refine release notes

* Apply suggestions from code review

Co-authored-by: Andrea Selva <selva.andre@gmail.com>

* Apply suggestions from code review

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

* Apply suggestions from code review

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

* Apply suggestions from code review

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

* Added dependency update section for new jruby version

---------

Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
Co-authored-by: edmocosta <11836452+edmocosta@users.noreply.github.com>
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
Co-authored-by: Andrea Selva <selva.andre@gmail.com>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
(cherry picked from commit 8b897915cd)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-11-11 16:56:46 -05:00
kaisecheng
9ad33e21b9
add deprecation warning for allow_superuser: true (#16555) 2024-11-06 17:47:17 +00:00
github-actions[bot]
54caef7a29
Update .ruby-version to jruby-9.4.9.0 (#16642) (#16645)
(cherry picked from commit efbee31461)

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2024-11-06 12:46:06 +00:00
Andrea Selva
4201628f9e
Update depreacation warning to provide the version the ArcSight module is removed. (#16648) 2024-11-06 12:30:45 +01:00
github-actions[bot]
00898bd560
For custom java plugins, set the platform = 'java'. (#16628) (#16649)
(cherry picked from commit 046ea1f5a8)

Co-authored-by: Nicole Albee <2642763+a03nikki@users.noreply.github.com>
2024-11-06 08:54:06 +00:00
github-actions[bot]
0657729cb7
bump jruby to 9.4.9.0 (#16634) (#16639)
(cherry picked from commit 6703aec476)

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2024-11-06 08:23:32 +00:00
github-actions[bot]
aea58a36a9
Anchor the -java match pattern at the end of the string. (#16626) (#16637)
This fixes the offline install problem of the logstash-input-java_filter_example off-line install.

(cherry picked from commit 113585d4a5)

Co-authored-by: Nicole Albee <2642763+a03nikki@users.noreply.github.com>
2024-11-05 14:25:29 +00:00
github-actions[bot]
a7384c0d6c
fix Windows java not found log (#16633) (#16636)
(cherry picked from commit 849f431033)

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
2024-11-05 10:45:59 +00:00
github-actions[bot]
37b1e9006e
Update JDK to latest in versions.yml (#16627) (#16631)
Update JDK to version 21.0.5+11

(cherry picked from commit 852149be2e)

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2024-11-04 17:25:31 +01:00
github-actions[bot]
2bcb5adcbb
add boostrap to docker build to fix missing jars (#16622) (#16623)
The DRA build failed because the required jars were missing, as they had been removed during the Docker build process.

(cherry picked from commit 00da72378b)

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
2024-11-01 15:48:36 +00:00
github-actions[bot]
6c8e086d5e
reduce effort during build of docker images (#16619) (#16620)
there's no need to build jdk-less and windows tarballs for docker images
so this change simplifies the build process.

It should reduce the time spent needed to build docker images.

(cherry picked from commit 9eced9a106)

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2024-10-31 17:04:50 +00:00
github-actions[bot]
1cbd092b6f
make docker build and gradle tasks more friendly towards ci output (#16618) (#16621)
(cherry picked from commit 472e27a014)

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2024-10-31 17:04:42 +00:00
github-actions[bot]
b242715f76
[CI] Change agent for JDK availability check and add schedule also for 8.x (#16614) (#16617)
Switch execution agent of JDK availability check pipeline from vm-agent to container-agent.
Moves the schedule definition from the `Logstash Pipeline Scheduler` pipeline into the pipeline definition, adding a schedule also for `8.x` branch.

(cherry picked from commit c602b851bf)

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2024-10-30 12:52:03 +01:00
github-actions[bot]
1335ec80f3
Fix bad reference to a variable (#16615) (#16616)
(cherry picked from commit 5d523aa5c8)

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2024-10-30 12:51:14 +01:00
github-actions[bot]
51851a99d3
Use jvm catalog for reproducible builds and expose new pipeline to check JDK availability (#16602) (#16609)
Updates the existing `createElasticCatalogDownloadUrl` method to use the precise version retrieved `versions.yml` to download the JDK instead of using the latest of major version. This makes the build reproducible again.
Defines a new Gradle `checkNewJdkVersion` task to check if there is a new JDK version available from JVM catalog matching the same major of the current branch.
Creates a new Buildkite pipeline to execute a `bash` script to run the Gradle task; plus it also update the `catalog-info.yaml` with the new pipeline and a trigger to execute every week.

(cherry picked from commit ed5874bc27)

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2024-10-30 12:15:08 +01:00
github-actions[bot]
d6c96b407f
make max inflight warning global to all pipelines (#16597) (#16601)
The current max inflight error message focuses on a single pipeline and on a maximum amount of 10k events regardless of the heap size.

The new warning will take into account all loaded pipelines and also consider the heap size, giving a warning if the total number of events consumes 10% or more of the total heap.

For the purpose of the warning events are assumed to be 2KB as it a normal size for a small log entry.

(cherry picked from commit ca19f0029e)

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2024-10-25 15:16:18 +01:00
Edmo Vamerlatti Costa
79e439e27b
bump version to 8.17.0 (#16592) 2024-10-24 09:45:56 +01:00
github-actions[bot]
8fb1292934
Release notes for 8.15.3 (#16527) (#16571)
* Update release notes for 8.15.3

* Refined release notes

* Apply suggestions from code review

* Update docs/static/releasenotes.asciidoc

---------

Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
Co-authored-by: edmocosta <11836452+edmocosta@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 2788841f5c)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-10-18 11:11:33 +02:00
github-actions[bot]
7e1877ca12
add http.* deprecation log (#16538) (#16582)
- refactor deprecated alias to support obsoleted version
- add deprecation log for http.* config

(cherry picked from commit 3f0ad12d06)

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
2024-10-17 16:23:15 +01:00
github-actions[bot]
27bd2a039b
Backport PR #16482 to 8.x: Bugfix for BufferedTokenizer to completely consume lines in case of lines bigger then sizeLimit (#16569)
Fixes the behaviour of the tokenizer to be able to work properly when buffer full conditions are met.

Updates BufferedTokenizerExt so that can accumulate token fragments coming from different data segments. When a "buffer full" condition is matched, it record this state in a local field so that on next data segment it can consume all the token fragments till the next token delimiter.
Updated the accumulation variable from RubyArray containing strings to a StringBuilder which contains the head token, plus the remaining token fragments are stored in the input array.
Furthermore it translates the `buftok_spec` tests into JUnit tests.

(cherry picked from commit 85493ce864)

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2024-10-16 17:32:52 +02:00
github-actions[bot]
216c68f280
Backport PR #16564 to 8.x: Adds a JMH benchmark to test BufferedTokenizerExt class(#16570)
Adds a JMH benchmark to measure the peformances of BufferedTokenizerExt.
Update also Gradle build script to remove CMS GC flags and fix deprecations for Gradle 9.0.

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

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2024-10-16 17:31:46 +02:00
github-actions[bot]
6a573f40fa
ensure minitar 1.x is used instead of 0.x (#16565) (#16566)
(cherry picked from commit ab77d36daa)

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2024-10-16 13:35:42 +01:00
Andrea Selva
396b3fef40
Deprecate for removal ArcSight module (#16551)
Logs a deprecation when Logstash 8.x is started with ArsSight module.

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2024-10-15 19:50:19 +02:00
Andrea Selva
c1374a1d81
Log deprecation warn if memory buffer type not defined (#16498)
On 8.x series log a deprecation log if the user didn't explicitly specify a selection for pipeline.buffer.type. Before this change the default was silently set to direct, after this change if not explicitly defined, the default is still direct but log a deprecation log.

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
2024-10-15 16:03:41 +02:00
kaisecheng
4677cb22ed
add modules deprecation log for netflow, fb_apache and azure (#16548)
relates: #16357
2024-10-14 12:40:45 +01:00
github-actions[bot]
dc0739bdaf
refactor log for event_api.tags.illegal (#16545) (#16547)
- add `obsoleted_version` and remove `deprecated_msg` from `deprecated_option` for consistent warning message

(cherry picked from commit 8cd0fa8767)

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
2024-10-11 21:51:53 +01:00
github-actions[bot]
a1f4633b55
Backport PR #16525 to 8.x: [test] Fix xpack test to check for http_address stats only if the webserver is enabled (#16531)
* [test] Fix xpack test to check for http_address stats only if the webserver is enabled (#16525)

Set the 'api.enabled' setting to reflect the flag webserver_enabled and consequently test for http_address presence in settings iff the web server is enabled.

(cherry picked from commit 648472106f)

* Update also the global LogStash::SETTINGS's 'api.enabled' setting value becuase used in the constructor of StatsEventFactory and needs to be in synch with the settings provided to the Agent constructor

---------

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2024-10-11 15:24:11 +02:00
github-actions[bot]
8c6832e3d9
Backport PR #16506 to 8.x: Avoid to access Java DeprecatedAlias value other than Ruby's one
Update Settings to_hash method to also skip Java DeprecatedAlias and not just the Ruby one.
With PR #15679 was introduced org.logstash.settings.DeprecatedAlias which mirrors the behaviour of Ruby class Setting::DeprecatedAlias. The equality check at Logstash::Settings, as descibed in #16505 (comment), is implemented comparing the maps.
The conversion of Settings to the corresponding maps filtered out the Ruby implementation of DeprecatedAlias but not the Java one.
This PR adds also the Java one to the list of filter.

(cherry picked from commit 5d4825f000)

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2024-10-11 11:00:48 +02:00
github-actions[bot]
0594c8867f
Backport PR #15679 to 8.x: [Spacetime] Reimplement config Setting classe in java (#16490)
* [Spacetime] Reimplement config Setting classe in java (#15679)

Reimplement the root Ruby Setting class in Java and use it from the Ruby one moving the original Ruby class to a shell wrapping the Java instance.
In particular create a new symmetric hierarchy (at the time just for `Setting`, `Coercible` and `Boolean` classes) to the Ruby one, moving also the feature for setting deprecation. In this way the new `org.logstash.settings.Boolean` is syntactically and semantically equivalent to the old Ruby Boolean class, which replaces.

(cherry picked from commit 61de60fe26)

* Adds supress warnings related to this-escape for Java Settings classes

---------

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2024-10-11 08:54:03 +02:00
github-actions[bot]
26c2f61276
Flow worker utilization probe (#16532) (#16537)
* flow: refactor pipeline refs to keep worker flows separate

* health: add worker_utilization probe

pipeline is:
  - RED "completely blocked" when last_5_minutes >= 99.999
  - YELLOW "nearly blocked" when last_5_minutes > 95
    - and inludes "recovering" info when last_1_minute < 80
  - YELLOW "completely blocked" when last_1_minute >= 99.999
  - YELLOW "nearly blocked" when last_1_minute > 95

* tests: improve coverage of PipelineIndicator probes

* Apply suggestions from code review

(cherry picked from commit a931b2cde6)

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
2024-10-10 19:59:43 -07:00
github-actions[bot]
986a253db8
health: add logstash.forceApiStatus: green escape hatch (#16535) (#16536)
(cherry picked from commit 065769636b)

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
2024-10-10 17:21:35 -07:00
github-actions[bot]
ad7c61448f
Health api minor followups (#16533) (#16534)
* Utilize default agent for Health API CI. Call python scripts from directly CI step.

* Change BK agent to support both Java and python. Install pip manually and send env vars to subprocess.

(cherry picked from commit 4037adfc4a)

Co-authored-by: Mashhur <99575341+mashhurs@users.noreply.github.com>
2024-10-10 15:25:53 -07:00
Mashhur
1e5105fcd8
Fix QA failure introduced by Health API changes and update rspec dependency of the QA package. (#16521)
* Update rspec dependency of the QA package.

* Update qa/Gemfile

Align on rspec 3.13.x

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>

* Fix the QA test failure caused after reflecting Health Report status to the Node stats.

---------

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
2024-10-09 14:47:01 -07:00
Ry Biesemeyer
7eb5185b4e
Feature: health report api (#16520)
* [health] bootstrap HealthObserver from agent to API (#16141)

* [health] bootstrap HealthObserver from agent to API

* specs: mocked agent needs health observer

* add license headers

* Merge `main` into `feature/health-report-api` (#16397)

* Add GH vault plugin bot to allowed list (#16301)

* regenerate webserver test certificates (#16331)

* correctly handle stack overflow errors during pipeline compilation (#16323)

This commit improves error handling when pipelines that are too big hit the Xss limit and throw a StackOverflowError. Currently the exception is printed outside of the logger, and doesn’t even show if log.format is json, leaving the user to wonder what happened.

A couple of thoughts on the way this is implemented:

* There should be a first barrier to handle pipelines that are too large based on the PipelineIR compilation. The barrier would use the detection of Xss to determine how big a pipeline could be. This however doesn't reduce the need to still handle a StackOverflow if it happens.
* The catching of StackOverflowError could also be done on the WorkerLoop. However I'd suggest that this is unrelated to the Worker initialization itself, it just so happens that compiledPipeline.buildExecution is computed inside the WorkerLoop class for performance reasons. So I'd prefer logging to not come from the existing catch, but from a dedicated catch clause.

Solves #16320

* Doc: Reposition worker-utilization in doc (#16335)

* settings: add support for observing settings after post-process hooks (#16339)

Because logging configuration occurs after loading the `logstash.yml`
settings, deprecation logs from `LogStash::Settings::DeprecatedAlias#set` are
effectively emitted to a null logger and lost.

By re-emitting after the post-process hooks, we can ensure that they make
their way to the deprecation log. This change adds support for any setting
that responds to `Object#observe_post_process` to receive it after all
post-processing hooks have been executed.

Resolves: elastic/logstash#16332

* fix line used to determine ES is up (#16349)

* add retries to snyk buildkite job (#16343)

* Fix 8.13.1 release notes (#16363)

make a note of the fix that went to 8.13.1: #16026

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

* Update logstash_releases.json (#16347)

* [Bugfix] Resolve the array and char (single | double quote) escaped values of ${ENV} (#16365)

* Properly resolve the values from ENV vars if literal array string provided with ENV var.

* Docker acceptance test for persisting  keys and use actual values in docker container.

* Review suggestion.

Simplify the code by stripping whitespace before `gsub`, no need to check comma and split.

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

---------

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

* Doc: Add SNMP integration to breaking changes (#16374)

* deprecate java less-than 17 (#16370)

* Exclude substitution refinement on pipelines.yml (#16375)

* Exclude substitution refinement on pipelines.yml (applies on ENV vars and logstash.yml where env2yaml saves vars)

* Safety integration test for pipeline config.string contains ENV .

* Doc: Forwardport 8.15.0 release notes to main (#16388)

* Removing 8.14 from ci/branches.json as we have 8.15. (#16390)

---------

Co-authored-by: ev1yehor <146825775+ev1yehor@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>
Co-authored-by: Andrea Selva <selva.andre@gmail.com>
Co-authored-by: Mashhur <99575341+mashhurs@users.noreply.github.com>

* Squashed merge from 8.x

* Failure injector plugin implementation. (#16466)

* Test purpose only failure injector integration (filter and output) plugins implementation. Add unit tests and include license notes.

* Fix the degrate method name typo.

Co-authored-by: Andrea Selva <selva.andre@gmail.com>

* Add explanation to the config params and rebuild plugin gem.

---------

Co-authored-by: Andrea Selva <selva.andre@gmail.com>

* Health report integration tests bootstrapper and initial tests implementation (#16467)

* Health Report integration tests bootstrapper and initial slow start scenario implementation.

* Apply suggestions from code review

Renaming expectation check method name.

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

* Changed to branch concept, YAML structure simplified as changed to Dict.

* Apply suggestions from code review

Reflect `help_url` to the integration test.

---------

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

* health api: expose `GET /_health_report` with pipelines/*/status probe (#16398)

Adds a `GET /_health_report` endpoint with per-pipeline status probes, and wires the
resulting report status into the other API responses, replacing their hard-coded `green`
with a meaningful status indication.

---------

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

* docs: health report API, and diagnosis links (feature-targeted) (#16518)

* docs: health report API, and diagnosis links

* Remove plus-for-passthrough markers

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

---------

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

* merge 8.x into feature branch... (#16519)

* Add GH vault plugin bot to allowed list (#16301)

* regenerate webserver test certificates (#16331)

* correctly handle stack overflow errors during pipeline compilation (#16323)

This commit improves error handling when pipelines that are too big hit the Xss limit and throw a StackOverflowError. Currently the exception is printed outside of the logger, and doesn’t even show if log.format is json, leaving the user to wonder what happened.

A couple of thoughts on the way this is implemented:

* There should be a first barrier to handle pipelines that are too large based on the PipelineIR compilation. The barrier would use the detection of Xss to determine how big a pipeline could be. This however doesn't reduce the need to still handle a StackOverflow if it happens.
* The catching of StackOverflowError could also be done on the WorkerLoop. However I'd suggest that this is unrelated to the Worker initialization itself, it just so happens that compiledPipeline.buildExecution is computed inside the WorkerLoop class for performance reasons. So I'd prefer logging to not come from the existing catch, but from a dedicated catch clause.

Solves #16320

* Doc: Reposition worker-utilization in doc (#16335)

* settings: add support for observing settings after post-process hooks (#16339)

Because logging configuration occurs after loading the `logstash.yml`
settings, deprecation logs from `LogStash::Settings::DeprecatedAlias#set` are
effectively emitted to a null logger and lost.

By re-emitting after the post-process hooks, we can ensure that they make
their way to the deprecation log. This change adds support for any setting
that responds to `Object#observe_post_process` to receive it after all
post-processing hooks have been executed.

Resolves: elastic/logstash#16332

* fix line used to determine ES is up (#16349)

* add retries to snyk buildkite job (#16343)

* Fix 8.13.1 release notes (#16363)

make a note of the fix that went to 8.13.1: #16026

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

* Update logstash_releases.json (#16347)

* [Bugfix] Resolve the array and char (single | double quote) escaped values of ${ENV} (#16365)

* Properly resolve the values from ENV vars if literal array string provided with ENV var.

* Docker acceptance test for persisting  keys and use actual values in docker container.

* Review suggestion.

Simplify the code by stripping whitespace before `gsub`, no need to check comma and split.

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

---------

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

* Doc: Add SNMP integration to breaking changes (#16374)

* deprecate java less-than 17 (#16370)

* Exclude substitution refinement on pipelines.yml (#16375)

* Exclude substitution refinement on pipelines.yml (applies on ENV vars and logstash.yml where env2yaml saves vars)

* Safety integration test for pipeline config.string contains ENV .

* Doc: Forwardport 8.15.0 release notes to main (#16388)

* Removing 8.14 from ci/branches.json as we have 8.15. (#16390)

* Increase Jruby -Xmx to avoid OOM during zip task in DRA (#16408)

Fix: #16406

* Generate Dataset code with meaningful fields names (#16386)

This PR is intended to help Logstash developers or users that want to better understand the code that's autogenerated to model a pipeline, assigning more meaningful names to the Datasets subclasses' fields.

Updates `FieldDefinition` to receive the name of the field from construction methods, so that it can be used during the code generation phase, instead of the existing incremental `field%n`.
Updates `ClassFields` to propagate the explicit field name down to the `FieldDefinitions`.
Update the `DatasetCompiler` that add fields to `ClassFields` to assign a proper name to generated Dataset's fields.

* Implements safe evaluation of conditional expressions, logging the error without killing the pipeline (#16322)

This PR protects the if statements against expression evaluation errors, cancel the event under processing and log it.
This avoids to crash the pipeline which encounter a runtime error during event condition evaluation, permitting to debug the root cause reporting the offending event and removing from the current processing batch.

Translates the `org.jruby.exceptions.TypeError`, `IllegalArgumentException`, `org.jruby.exceptions.ArgumentError` that could happen during `EventCodition` evaluation into a custom `ConditionalEvaluationError` which bubbles up on AST tree nodes. It's catched in the `SplitDataset` node.
Updates the generation of the `SplitDataset `so that the execution of `filterEvents` method inside the compute body is try-catch guarded and defer the execution to an instance of `AbstractPipelineExt.ConditionalEvaluationListener` to handle such error. In this particular case the error management consist in just logging the offending Event.


---------

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

* Update logstash_releases.json (#16426)

* Release notes for 8.15.1 (#16405) (#16427)

* Update release notes for 8.15.1

* update release note

---------

Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
Co-authored-by: Kaise Cheng <kaise.cheng@elastic.co>
(cherry picked from commit 2fca7e39e8)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Fix ConditionalEvaluationError to do not include the event that errored in its serialiaxed form, because it's not expected that this class is ever serialized. (#16429) (#16430)

Make inner field of ConditionalEvaluationError transient to be avoided during serialization.

(cherry picked from commit bb7ecc203f)

Co-authored-by: Andrea Selva <selva.andre@gmail.com>

* use gnu tar compatible minitar to generate tar artifact (#16432) (#16434)

Using VERSION_QUALIFIER when building the tarball distribution will fail since Ruby's TarWriter implements the older POSIX88 version of tar and paths will be longer than 100 characters.

For the long paths being used in Logstash's plugins, mainly due to nested folders from jar-dependencies, we need the tarball to follow either the 2001 ustar format or gnu tar, which is implemented by the minitar gem.

(cherry picked from commit 69f0fa54ca)

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

* account for the 8.x in DRA publishing task (#16436) (#16440)

the current DRA publishing task computes the branch from the version
contained in the version.yml

This is done by taking the major.minor and confirming that a branch
exists with that name.

However this pattern won't be applicable for 8.x, as that branch
currently points to 8.16.0 and there is no 8.16 branch.

This commit falls back to reading the buildkite injected
BUILDKITE_BRANCH variable.

(cherry picked from commit 17dba9f829)

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

* Fixes the issue where LS wipes out all quotes from docker env variables. (#16456) (#16459)

* Fixes the issue where LS wipes out all quotes from docker env variables. This is an issue when running LS on docker with CONFIG_STRING, needs to keep quotes with env variable.

* Add a docker acceptance integration test.

(cherry picked from commit 7c64c7394b)

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

* Known issue for 8.15.1 related to env vars references (#16455) (#16469)

(cherry picked from commit b54caf3fd8)

Co-authored-by: Luca Belluccini <luca.belluccini@elastic.co>

* bump .ruby_version to jruby-9.4.8.0 (#16477) (#16480)

(cherry picked from commit 51cca7320e)

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

* Release notes for 8.15.2 (#16471) (#16478)

Co-authored-by: andsel <selva.andre@gmail.com>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
(cherry picked from commit 01dc76f3b5)

* Change LogStash::Util::SubstitutionVariables#replace_placeholders refine argument to optional (#16485) (#16488)

(cherry picked from commit 8368c00367)

Co-authored-by: Edmo Vamerlatti Costa <11836452+edmocosta@users.noreply.github.com>

* Use jruby-9.4.8.0 in exhaustive CIs. (#16489) (#16491)

(cherry picked from commit fd1de39005)

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

* Don't use an older JRuby with oraclelinux-7 (#16499) (#16501)

A recent PR (elastic/ci-agent-images/pull/932) modernized the VM images
and removed JRuby 9.4.5.0 and some older versions.

This ended up breaking exhaustive test on Oracle Linux 7 that hard coded
JRuby 9.4.5.0.

PR https://github.com/elastic/logstash/pull/16489 worked around the
problem by pinning to the new JRuby, but actually we don't
need the conditional anymore since the original issue
https://github.com/jruby/jruby/issues/7579#issuecomment-1425885324 has
been resolved and none of our releasable branches (apart from 7.17 which
uses `9.2.20.1`) specify `9.3.x.y` in `/.ruby-version`.

Therefore, this commit removes conditional setting of JRuby for
OracleLinux 7 agents in exhaustive tests (and relies on whatever
`/.ruby-version` defines).

(cherry picked from commit 07c01f8231)

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>

* Improve pipeline bootstrap error logs (#16495) (#16504)

This PR adds the cause errors details on the pipeline converge state error logs

(cherry picked from commit e84fb458ce)

Co-authored-by: Edmo Vamerlatti Costa <11836452+edmocosta@users.noreply.github.com>

* Logstash Health Report Tests Buildkite pipeline setup. (#16416) (#16511)

(cherry picked from commit 5195332bc6)

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

* Make health report test runner script executable. (#16446) (#16512)

(cherry picked from commit 2ebf2658ff)

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

* Backport PR #16423 to 8.x: DLQ-ing events that trigger an conditional evaluation error. (#16493)

* DLQ-ing events that trigger an conditional evaluation error. (#16423)

When a conditional evaluation encounter an error in the expression the event that triggered the issue is sent to pipeline's DLQ, if enabled for the executing pipeline.

This PR engage with the work done in #16322, the `ConditionalEvaluationListener` that is receives notifications about if-statements evaluation failure, is improved to also send the event to DLQ (if enabled in the pipeline) and not just logging it.

(cherry picked from commit b69d993d71)

* Fixed warning about non serializable field DeadLetterQueueWriter in serializable AbstractPipelineExt

---------

Co-authored-by: Andrea Selva <selva.andre@gmail.com>

* add deprecation log for `--event_api.tags.illegal` (#16507) (#16515)

- move `--event_api.tags.illegal` from option to deprecated_option
- add deprecation log when the flag is explicitly used
relates: #16356

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

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

---------

Co-authored-by: ev1yehor <146825775+ev1yehor@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>
Co-authored-by: Andrea Selva <selva.andre@gmail.com>
Co-authored-by: Mashhur <99575341+mashhurs@users.noreply.github.com>
Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Luca Belluccini <luca.belluccini@elastic.co>
Co-authored-by: Edmo Vamerlatti Costa <11836452+edmocosta@users.noreply.github.com>
Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>

---------

Co-authored-by: ev1yehor <146825775+ev1yehor@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>
Co-authored-by: Andrea Selva <selva.andre@gmail.com>
Co-authored-by: Mashhur <99575341+mashhurs@users.noreply.github.com>
Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Luca Belluccini <luca.belluccini@elastic.co>
Co-authored-by: Edmo Vamerlatti Costa <11836452+edmocosta@users.noreply.github.com>
Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
2024-10-09 09:48:12 -07:00
github-actions[bot]
c2c62fdce4
add deprecation log for --event_api.tags.illegal (#16507) (#16515)
- move `--event_api.tags.illegal` from option to deprecated_option
- add deprecation log when the flag is explicitly used
relates: #16356

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

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
2024-10-08 14:40:49 +01:00
github-actions[bot]
e854ac7bf5
Backport PR #16423 to 8.x: DLQ-ing events that trigger an conditional evaluation error. (#16493)
* DLQ-ing events that trigger an conditional evaluation error. (#16423)

When a conditional evaluation encounter an error in the expression the event that triggered the issue is sent to pipeline's DLQ, if enabled for the executing pipeline.

This PR engage with the work done in #16322, the `ConditionalEvaluationListener` that is receives notifications about if-statements evaluation failure, is improved to also send the event to DLQ (if enabled in the pipeline) and not just logging it.

(cherry picked from commit b69d993d71)

* Fixed warning about non serializable field DeadLetterQueueWriter in serializable AbstractPipelineExt

---------

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2024-10-08 13:45:15 +01:00
github-actions[bot]
3b751d9794
Make health report test runner script executable. (#16446) (#16512)
(cherry picked from commit 2ebf2658ff)

Co-authored-by: Mashhur <99575341+mashhurs@users.noreply.github.com>
2024-10-05 07:32:15 -07:00
github-actions[bot]
2f3f6a9651
Logstash Health Report Tests Buildkite pipeline setup. (#16416) (#16511)
(cherry picked from commit 5195332bc6)

Co-authored-by: Mashhur <99575341+mashhurs@users.noreply.github.com>
2024-10-05 07:30:51 -07:00
github-actions[bot]
d1155988c1
Improve pipeline bootstrap error logs (#16495) (#16504)
This PR adds the cause errors details on the pipeline converge state error logs

(cherry picked from commit e84fb458ce)

Co-authored-by: Edmo Vamerlatti Costa <11836452+edmocosta@users.noreply.github.com>
2024-10-03 13:31:22 +02:00