Commit graph

11011 commits

Author SHA1 Message Date
kaisecheng
84886ac4be
remove 8.12 from CI (#16077) 2024-04-11 12:56:29 +01:00
Andrea Selva
afa646fbcb
Introduce a new setting to give preference to Java heap or direct space buffer allocation type (#16054)
Introduce a new setting named `pipeline.buffer.type` which could be valued direct or heap to enable the allocation on Java heap.
The processing of the setting is done in `LogStash::Runner#execute` and sets the Java properties considered by Netty to disable the direct allocation: `io.netty.noPreferDirect`.
However, if that system property is already configured explicitly by the user (because set in `jvm.options`or `LS_JAVA_OPTS`) the setting doesn't take place and warning log is reported, respecting the user's will.

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2024-04-10 15:23:47 +02:00
github-actions[bot]
2ec54b42e2
Release notes for 8.13.2 (#16068) (#16071)
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
(cherry picked from commit 2bef137dc4)
2024-04-08 12:23:34 -04:00
Mashhur
4a379be6d5
Fix the git branch check for snyk bk jobs (#16062)
* Replace 'git show-ref' with 'git rev-parse' to fix the issue where show-ref is not working as expected.
* Use git checkout instead 'git rev-parse'.
* Apply prune dependencies recommended for big projects (like we have multi gradle projects) by Snyk.
* Apply prune repeated dependency option directly to snyk monitor.
* Avoid the exit, continue scanning to the end.
* Remove the debugging.
2024-04-08 11:34:26 +01:00
Rob Bavey
e5b2b3d92b
Update Dockerfile to select appropriate architecture on build box (#16053)
This commit adds logic to copy the appropriate env2yaml file to the Docker image
* Clean up env2yaml folder

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2024-04-04 18:15:54 -04:00
Andrea Selva
6eb99437e4
Update releases inventory after 8.13.1 (#16048) 2024-04-04 10:39:17 +02:00
Andrea Selva
6a04854e4c
JDK 21 move (#15719)
Adaptations to run Logstash on JDK 21:

- Java 8 support is obsolete and will be removed.
- Thread's `getId` (not final) replaced by final `threadId` https://bugs.openjdk.org/browse/JDK-8017617
- Verify the warnings "this-escape" when a constructor use other method or pass around `this` reference to other methods https://bugs.openjdk.org/browse/JDK-8015831
- URL constructor is deprecated, use `<uri_instance>.toURL()` (since JDK 20)
-  Manages new (since JDK 20) `G1 Concurrent GC` MX Bean, [ref](https://github.com/elastic/logstash/pull/15719#issuecomment-1946367785)
2024-04-03 17:08:12 +02:00
github-actions[bot]
327fbe134a
Release notes for 8.13.1 (#16046) (#16049)
Forward port release notes for 8.13.1 on main
2024-04-02 08:59:18 +02:00
Mashhur
dd1f6dd160
Fix integration tests caused by #16026. (#16038) 2024-03-28 09:08:00 -07:00
João Duarte
f6940f5a34
Update critical_vulnerability_scan.yml (#16039)
Change trigger from pull_request_target to pull_request, as the former uses the base branch instead of the PR source code.
This allows simplification of the checkout action (also took the opportunity to bump from v2 to v4).
2024-03-28 15:03:07 +00:00
kaisecheng
a7779664af
Modernize ironbank Dockerfile (#16022)
- remove golang assets (go1.17.8.linux-amd64.tar.gz)
- remove yaml lib assets (v2.3.0.tar.gz)
- use go container to build env2yaml
- remove unnecessary layers
- remove HEALTHCHECK
- switch yum to dnf

Fixes: elastic/ingest-dev#3008
2024-03-28 11:15:01 +00:00
Mashhur
e429795039
Save name came through ENV vars to let Logstash decide using value from either keystore or ENV. (#16026)
* Save  name came through ENV vars to let Logstash decide using either keystore or ENV value.

* Apply suggestions from code review to simplify array declaration.

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

---------

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
2024-03-27 09:22:27 -07:00
João Duarte
e8597cbb77
Introduce vulnerability scanner that fails PRs on critical vulnerabilities (#16028)
This github action leverages https://github.com/anchore/grype to scan a tarball artifact
2024-03-27 16:04:50 +00:00
João Duarte
96e4838e43
Fix exclusion of old ruby-maven-libs 3.3.9 jars (#16032) 2024-03-27 14:40:03 +00:00
Karen Metts
36b7cb8ab3
Doc: Remove beta tag from integrations filter doc (#16021) 2024-03-26 12:22:08 -04:00
Andrea Selva
c4bd54de58
Update releases inventory after 7.17.19 (#16024) 2024-03-26 15:53:34 +01:00
kaisecheng
716c33f4b5
update ci release for 8.13.0 (#16030) 2024-03-26 10:53:44 +00:00
github-actions[bot]
bae6210c21
Release notes for 8.13.0 (#15978) (#16027)
Co-authored-by: Kaise Cheng <kaise.cheng@elastic.co>
Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
Co-authored-by: Mashhur <mashhur.sattorov@elastic.co>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
(cherry picked from commit 270c8ca110)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-03-26 09:22:00 +00:00
João Duarte
59bd376360
upgrade ruby-maven-libs to 3.8.9 (#15894)
Given that JRuby comes with ruby-maven-libs 3.3.9 this commit upgrades the gem to 3.8.9 and ensures files from 3.3.9 are not included in the distribution.
2024-03-18 14:30:13 +01:00
carrychair
d1e624b81c
remove repetitions of "the" word (#15987)
Signed-off-by: carrychair <linghuchong404@gmail.com>
2024-03-17 10:53:59 +00:00
Karen Metts
92b20bc184
Doc: Remove extra + to force page regen (#16000) 2024-03-12 11:27:07 -04:00
Rob Bavey
32052a263f
Remove curl installation step, as curl-minimal is already provided in ubi9 (#15998) 2024-03-12 09:50:52 -04:00
João Duarte
43614ede50
ensure order of jvm options from file and env vars is respected (#15997)
Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2024-03-12 09:18:35 +00:00
Ry Biesemeyer
483059e378
geoip: avoid crash cleaning non-existing managed dbs (#15986)
* geoip: avoid crash cleaning non-existing managed dbs

* Update x-pack/spec/geoip_database_management/manager_spec.rb

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

---------

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2024-03-11 11:56:51 -07:00
Dimitrios Liappis
c0c213d17e
Split java/ruby unit test steps on Windows (#15888)
As a follow up to #15861 this commit splits the current unit tests step
for the Windows JDK matrix pipeline to two that run
Java and Ruby unit tests separately.

Closes https://github.com/elastic/logstash/issues/15566
2024-03-11 09:27:11 +02:00
Rob Bavey
b640e7e851
Add arm64 support for env2yaml (#15980)
* Add arm64 support for env2yaml

This commit builds env2yaml in arm64 and amd64 flavors, and uses
$TARGETARCH in the Dockerfile to ensure that the correct version is used
when building for alternative architectures

Fixes: #15913

* Add env2yaml executables to build context

* Split `COPY_FILES` for readability

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

---------

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
2024-03-08 10:47:01 -05:00
Mashhur
dec53ba325
Imap plugin is no anymore default plugin. (#15425) 2024-03-08 07:25:46 -08:00
Mashhur
19637143e6
Fix the Bootstrap check test failure on Windows. (#15975) 2024-03-06 10:10:35 -08:00
github-actions[bot]
3070a637cf
Release notes for 8.12.2 (#15956) (#15972)
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
(cherry picked from commit 2c89bcfc7b)
2024-02-23 08:30:20 -05:00
Andrea Selva
834c779c5a
Remove dlq writer dead code add some logs (#15965)
Remove unused method createFlushScheduler and add some debug logs to the finalizeSegment method to better follow what happens during its execution in case of problems.
2024-02-22 14:06:53 +01:00
Andrea Selva
18bbb3156c
Add shutdown step of DLQ flusher scheduled service (#15964)
This PR adds a shutdown method to the SchedulerService class used to handle actions to be executed on a certain cadence. In particular is used to execute scheduled finalization of DLQ head segment.
Updates the close method of the DLQ writer to invoke this additional shutdown on the service instance.
2024-02-22 12:33:23 +01:00
Andrea Selva
ff37e1e0d3
Fix failing DLQ test due to time scheduling (#15960)
Adds a burning of time condition to avoid a collision of time which, under certain circumstances, would fail the test.
The sealing of a segment happens if the segment is considered as stale, which requires 2 conditions:

- the segment must have received a write.
- the time of the last write must exceed the flush interval.

In this failing test, the flush interval is set to ZERO because of the synchronicity of the test, to avoid time dependency. However, with coarse grain timer resolution, could happen that the last write coincide with the time of the stale check, so fail the seal condition.
2024-02-22 11:28:31 +01:00
João Duarte
14dc3d24a4
bump jruby to 9.4.6.0 and remove ffi workaround (#15961) 2024-02-22 09:47:42 +00:00
Andrea Selva
c30fe46c80
Added :jvm-options-parser subproject to the javaTests task (#15957)
Adds a global new task named javaTests which groups both :logstash-core:javaTests and :jvm-options-parser:test to include the JvmOptionParser unit test in javaTests phase.
2024-02-19 16:22:03 +01:00
Pavel Zorin
e5ca8601ba
[CI] [Sonar] Explicitly specified test sources for sonar (#15954)
* [CI] [Sonar] Explicitly specified test sources for sonar

* [CI] removed wildcards from sonar.tests
2024-02-15 14:10:54 +01:00
Dimitrios Liappis
54f73e5d22
Follow up to #15900 -- fix remaining acceptance tests (#15907)
PR#15900 missed a few more places where Logstash is installed but
a working minimal pipeline config is added.
This commit fixes that and stabilizes all acceptance tests, thus
minizing the need for time consuming BK retries of corresponding
steps.

Relates #15900
Relates https://github.com/elastic/logstash/issues/15784
2024-02-15 11:33:17 +02:00
Dimitrios Liappis
eedccea33f
Fix packaging service check failures (#15946)
This commit tightens the checks for the status
output of the Logstash OS service to specifically
scan for `org.logstash.Logstash` rather than
only the jdk path.

The reason is that the startup script first runs
an options parser, and then the logstash process
itself, both referencing the JDK path.

Closes https://github.com/elastic/ingest-dev/issues/2950
2024-02-15 10:01:47 +02:00
Mashhur
3c9db658bc
Package elastic_integration plugin. (#15769)
* Exclude plugins feature in OSS distributions.

* Set elastic_integration plugin default.

* Remove non-OSS plugins after installing default plugins.

* Testing local can't find gem bundler (= 2.3.26) issue.

* Include extract non-OSS plugins logic indocker build operations.

* Only default plugins can be excluded from OSS distros.

* Simplification: instead conditional check, use intersection to make OSS exlucluded plugin list.

* Gem and specification files still stay after removing the plugin. This change removes the stayed files.

* Rename oss-exclude to skip-oss to align namings with other params.

* Make intersection method simpler.

* [Test] Temporary excluding elastic integration plugin from default plugin list.

* Sets elastic_integration plugin default back. When removing locally installed gems, Gem::Specification doesn't recognize the gem. We have Bundle::setup in the removal logic but it is causing an issue when we re-use the bundle.

* Test the build order, remove plugin from cache logic seems invalid since we don't pack the cache.
2024-02-14 07:10:42 -08:00
kaisecheng
22a10b5b92
bump version to 8.14.0 (#15935) 2024-02-14 09:18:48 +00:00
kaisecheng
34ebdc120f
add 8.13 branch (#15938) 2024-02-13 17:39:10 +00:00
Andres Rodriguez
8eb08e1382
Add Alma 8, Alma 9, and Rocky Linux 9 to the JDK matrix (#15941) 2024-02-13 11:01:21 -05:00
Ry Biesemeyer
dc8b5b2c86
ci: provide metadata about releases that are in-flight (#15924)
Our shared CI infrastructure relies on this file being here with a specific
format, expanding a given `ELASTIC_STACK_VERSION` environment variable and
an optional `SNAPSHOT` environment variable into the information necessary
to target either the most recent published release or a snapshot representing
a candidate for the _next_ possible release in the series.

When we cut a new minor branch from `main` (at feature freeze), the tip of
that branch contains unreleased code that is in-flight for the next release.
We need to have a way to reference artifacts from this in-flight release,
instead of skipping over them while a minor release is in flight.

This change affects the _semantics_ of what is tested during a minor stack
release's feature-freeze period, ensuring that automated tests throughout
the Logstash ecosystem continue to run against the pending release with NO
changes required in those plugins.

It also introduces a new `snapshots.main` entry, which refers to snapshot
artifacts built from the un-feature-frozen `main` branch, so that plugins
can _optionally_ test against the _next_ minor in advance of its feature
freeze, as they currently do unintentionally in builds that target
 `ELASTIC_STACK_VERSION=8.x SNAPSHOT=true`.
2024-02-12 07:04:06 -08:00
Dimitrios Liappis
be3f75e346
Clean up left over scripts after CI migration (#15926)
Following the CI migration from Jenkins to Buildkite, this commit
removes a number of left over helper scripts that aren't needed
anymore.

Closes https://github.com/elastic/ingest-dev/issues/2850
2024-02-12 11:26:28 +02:00
kaisecheng
4e6815b1ea
add openssl to ubi image (#15929)
Logstash on ECK requires openssl command to build TLS keystore.
This commit adds `microdnf install -y openssl` to ensure the command exists in ubi image.
2024-02-09 18:40:02 +00:00
João Duarte
de01eb6ee3
Remove jinja2 in favor of erb templates (#15142)
This commit removes the jinja2 templates and consequently the dependency on Python
2024-02-09 13:49:58 +00:00
Andrea Selva
52ce3ff8f6
Set Netty's maxOrder options to previous default (#15925)
Updates Netty's configuration of maxOrder to a previously proven value, if not already customised by the user.

Adds a step to the JvmOption parsing tool, which is used to compose the JVM options string to pass down to Logstash at startup.
The added step rework the parsed options to set the allocator max order -Dio.netty.allocator.maxOrder=11 so that the maximum pooled buffer is up to 16MB and not 4MB.
This option is added iff it's not yet specified by the user
2024-02-09 13:49:23 +01:00
João Duarte
5c3e64d591
introduce go.mod for env2yaml (#15921)
Update the env2yaml to have a go.mod instead of relying on disabling go modules, otherwise building with golang 1.22 will fail in the future.
This change also directly uses the golang image to build the binary removing the need for an intermediate image.
2024-02-08 18:12:11 +00:00
Nassim Kammah
db193f56c4
Update docs-preview link (#15918)
Following the migration from Jenkins to Buildkite, docs previews are now available at <repo>_bk_<PR>.

More context in https://github.com/elastic/docs/pull/2898
2024-02-08 17:20:58 +01:00
Andrea Selva
4e98aa8117
Fix the lastes 8.12 version, to the actually latest released (#15915)
* Fix the latest 8.12 version, to the actually latest released
* Update version fo 7.17


Co-authored-by: Mashhur <99575341+mashhurs@users.noreply.github.com>
2024-02-07 18:02:51 +01:00
Mashhur
c75a2d84b1
Update CI release file after releases. (#15911) 2024-02-07 06:41:02 -08:00