Commit graph

10626 commits

Author SHA1 Message Date
dependabot[bot]
350275fd77
Bump jinja2 from 2.11.3 to 3.1.3 in /docker
Bumps [jinja2](https://github.com/pallets/jinja) from 2.11.3 to 3.1.3.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/2.11.3...3.1.3)

---
updated-dependencies:
- dependency-name: jinja2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-11 17:27:14 +00:00
Dimitrios Liappis
a0e3b35c5f
Don't trigger exhaustive tests with backports (#15791)
Having enabled branch pushes as triggers for the exhaustive test
pipeline, we have an unwanted sideeffect, that when using
PR automation (@logstashmachine) to create backports, the temporary
branches also triggered exhaustive tests.

This commit skips triggering this pipeline when upstream branches
starting with `backport` get pushed.
2024-01-11 17:12:47 +02:00
Andrea Selva
4a2104b1a4
Update releases inventory after 8.11.4 (#15783) 2024-01-11 15:54:41 +01:00
Dimitrios Liappis
739e8a3ef0
Add retries to PR pipeline steps (#15787)
There is occasional flakiness mainly with IT tests requiring us to
manually retry such failures when we raise PR (or the first
group of the exhaustive suite, which runs the same steps).

This commit adds up to 3 retries for all the steps of the PR
pipeline.
2024-01-11 15:48:45 +02:00
github-actions[bot]
5b98f7d63d
Release notes for 8.11.4 (#15753) (#15777)
* Update release notes for 8.11.4

(cherry picked from commit 93e786fd0f)
2024-01-10 11:53:09 +01:00
Andrea Selva
50a589493c
Bump Puma lower version constraint to >= 6.4.2 (#15773) 2024-01-10 09:52:56 +00:00
Dimitrios Liappis
c8726b79f3
Run BK exhaustive pipeline when code is pushed (#15738)
This commit enables running the exhaustive tests Buildkite pipeline
(i.e. the equivalent to the `main` Jenkins tests) ; the trigger is
code events, i.e. direct pushes, merge commits and creation of new branches.

CI is skipped if changes are only related to files under `docs/`.
2024-01-10 10:18:19 +02:00
Edmo Vamerlatti Costa
a21ced0946
Add system properties to configure Jackson's stream read constraints (#15720)
This commit added a few jvm.options properties to configure the Jackson read constraints defaults (Maximum Number value length, Maximum String value length, and Maximum Nesting depth).
2024-01-08 17:48:11 +01:00
Dimitrios Liappis
9f1d55c6a2
Pin childprocess gem to major version 4 (#15758)
This commit pins the `childprocess` gem to version `4` since version `5.0.0` of
https://github.com/enkessler/childprocess/pull/175 seems to have broken JRuby support for spawning.

Closes https://github.com/elastic/logstash/issues/15757

Co-authored-by: Andrea Selva <selva.andre@gmail.com>
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2024-01-08 18:08:46 +02:00
Dimitrios Liappis
cebe4a7537
Refactor qa/acceptance tests to get away from vagrant (#15696)
This commit modernizes the qa/acceptance (packaging) test framework by
moving away from Vagrant and having the tests operate locally.

As we are migrating to Buildkite, the expectation is that those tests
will run on dedicated vms thus removing the necessity of vagrant.

Relates: https://github.com/elastic/ingest-dev/issues/1722
2024-01-08 09:40:58 +02:00
Mashhur
73c87a4151
Add elastic_integration plugin to the plugin meta list. (#15692)
* Add elastic_integration plugin non-default plugin. This will be enough to pick up it the doc generations.
2024-01-04 09:39:55 -08:00
Andrea Selva
76d1677187
Fixes a typo in plugin's organization name (#15743)
Fixes a typo in string definition for Logstash's plugins organization.
2024-01-04 17:11:55 +01:00
Dimitrios Liappis
286088915f
JUnit result annotation for Buildkite PR jobs (#15741)
This commit adds annotations for Java unit tests (in the pull request pipeline) helping
identify failing unit tests quickly.
2024-01-04 17:21:07 +02:00
Andrea Selva
6dc8423186
Add filter elastic_integration to be tested in test_plugins script (#15723)
Add the `logstash-filter-elasticsearch_integration` plugin to the list of test_plugins pipeline.
In doing so, reworked the definition of plugins, by not just specifying a plugin name but also adding support leve, type and organization. This necessary for plugins which repository is not part of `logstash-plugins` Github organization but at the same time permit an easier management of the different axes that partitions the plugin landscape.

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2024-01-04 16:00:45 +01:00
Edmo Vamerlatti Costa
41ec183f09
Fix logstash-keystore multiple keys operations with command flags (#15737)
This commit fixes how the keystore tool handle the command's options, including validation for unknown options, and adding the --stdin flag to the add command.
2024-01-03 18:57:57 +01:00
Andrea Selva
2be661b9bc
Re-enable json filter and netflow codec plugins (#15722)
- Re-enabled logstash-filter-json and logstash-codec-netflow plugins into the test_plugins BK pipeline.
- Moved codecs tier2 to be executed in separata VM.
- Commented plugin logstash-codec-collectd till is fixed
2024-01-02 17:20:28 +01:00
Andrea Selva
f643e8606d
Update to gradle 8.5 (#15707)
Update the Gradle wrapper to version 8.5
2024-01-02 13:28:34 +01:00
Dimitrios Liappis
a8b64a32e9
Skip input step when triggering JDK matrix jobs (#15733)
PR#15729 missed the input step. As a result when the job is triggered
the steps are executed, but the pause icon still shows in the job
requiring manual unblock[^1]

This commit also skips the input step when the job is triggered from
the scheduler pipeline.

[^1] https://buildkite.com/elastic/logstash-linux-jdk-matrix-pipeline/builds/86
2024-01-02 13:06:03 +02:00
Dimitrios Liappis
82ac474b13
Don't block triggered JDK matrix Buildkite jobs (#15729)
The recent PRs #15668 and #15705 refactored jobs with a custom schedule
to leverage a centralized trigger pipeline.

An unexpected sideffect of this is that the conditional for the wait
step doesn't work anymore.

This commit skips the wait step when the JDK matrix pipelines get triggered
from another pipeline.
2024-01-02 11:29:52 +02:00
Dimitrios Liappis
4a7b31ea6d
[ci] No Slack alerts for pipeline scheduling job (#15728)
As a follow up to #15705, this commit shushes Slack alerts for the
common Buildkite scheduling pipeline. This is because the pipeline
scheduler just triggers other pipelines which have their own dedicated
alerts setup, therefore we want to avoid duplicate alerts when
there is a failure with one of the triggered pipelines.
2024-01-02 11:14:54 +02:00
Dimitrios Liappis
9538338abb
[ci] Add testing phase to exhaustive tests suite (#15711)
This is the second part of the migration of the exhaustive/main
Jenkins Job to Buildkite. So far we've migrated the "compatibility
phase" and this commit adds the "testing phase"[^1], which is essentially
the same amount of tests that we ran on PR jobs.

Relates https://github.com/elastic/ingest-dev/issues/1722
Depends https://github.com/elastic/logstash/pull/15708

[^1]: For more details, refer to the sequence diagram in https://github.com/elastic/ingest-dev/issues/1722#issuecomment-1824378635
2023-12-21 09:42:14 +02:00
Mashhur
0049717394
So far we are practicing Snyk scan of docker images. Now we can comment docker scan logic to address collected issues later with more experiements. (#15702) 2023-12-20 10:51:20 -08:00
Dimitrios Liappis
03d7b59f2a
[ci] Reusable unit + IT test steps for Buildkite (#15708)
This commit is a pre-requisite for adding unit + IT tests in a
dedicated phase of the Exhaustive tests pipeline.

It refactors the tests currently used by PR jobs, so that they become
reusable.
2023-12-20 18:22:09 +02:00
Felix Jansson
69c145d4ee
Add log.format to the logstash.yml (#15049)
* Added log.format in the logstash.yml (#11290)

* Update config/logstash.yml

---------

Co-authored-by: kaisecheng <69120390+kaisecheng@users.noreply.github.com>
2023-12-20 14:40:59 +00:00
Andrea Selva
48b0af1206
Replace Gradle's report.enabled setting to report's required property (#15706) 2023-12-20 12:40:10 +01:00
Dimitrios Liappis
33347ddddf
Common scheduler pipeline for Buildkite (#15705)
As an improvement from #15668 / #15700, rather than having one
dedicated side-car scheduling job per pipeline, we move to a single
scheduling job. Various pipelines that need triggering with different
schedules now live under each schedule in the new pipeline.

This reduces the amount of jobs we have to maintain in yaml.
2023-12-20 11:47:54 +02:00
Dimitrios Liappis
06ceef8e13
[ci] Allow schedule to trigger several pipelines (#15703)
This commit enhances the functionality introduced in #15668 and #15700
by allowing a single Buildkite scheduling job to trigger several
pipelines, in addition to multiple branches which it already does.

We rename the env var PIPELINE_TO_TRIGGER to PIPELINES_TO_TRIGGER
which now supports comma separate values.

This enhancement can be useful for pipelines like JDK matrix which
have variants (Linux and Windows) that we want to trigger with a single
scheduling job, thus reducing unnecessary entries in catalog-info.
2023-12-20 10:22:46 +02:00
Dimitrios Liappis
42497edebb
Bug fix for trigger pipeline Buildkite pipeline (#15700)
This commit fixes a few bugs introduced in #15668 related to paths for
the calling script. We also stop limiting the execution only from the
main branch (to facilitate e.g. tests from PRs) and, finally, remove
the async clause, which is not needed, since by default BK steps are
run in parallel.
2023-12-19 13:33:46 +02:00
Dimitrios Liappis
c2eaecce8e
[ci] Remove hardcoded branches from DRA schedule (#15668)
This commit is the first making use of #15627 to remove hard coded
branches for the DRA Snapshot build schedule.

With this pattern, we will only need to keep `ci/branches.json` up to date,
as versions evolve, and not need to update/maintain hard coded branches
in `catalog-info.yaml` anymore.

Once this is verified working, we'll add a corresponding schedule
pipeline (in `catalog.info`) for the JDK matrix job.

Relates: https://github.com/elastic/ingest-dev/issues/2664
2023-12-19 11:42:28 +02:00
Dimitrios Liappis
f062fef603
[ci] Add Java 21 option for multi JDK CI pipeline (#15691)
Now that CI VM images are pre-provisioned with various flavors of
Java 21, we add the option for the corresponding CI job.
Adoptium 17 remains the default pre-selected option.

Relates https://github.com/elastic/ci-agent-images/pull/463
2023-12-18 16:56:48 +02:00
Andrea Selva
6b22cc8dd1
Separate scheduling of segments flushes from time (#15680)
Introduces a new interface named SchedulerService to abstract from the ScheduledExecutorService to execute the DLQ flushes of segments. Abstracting from time provides a benefit in testing, where the test doesn't have to wait for things to happen, but those things could happen synchronously.
2023-12-18 11:07:02 +01:00
João Duarte
aa05205a9e
Update logstash_releases.json to include 7.17.16 and 8.11.3 (#15688) 2023-12-12 18:23:46 +00:00
João Duarte
9e93ded8ea
Update catalog-info.yaml to include testing for 8.12 branch (#15666)
Don't remove 8.11 yet as we may have 8.11.x maintenance releases until 8.12.0 is GA.
2023-12-12 17:30:26 +00:00
github-actions[bot]
64ef307a73
Release notes for 8.11.3 (#15681) (#15685)
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 a45349ea47)
2023-12-12 10:28:39 -05:00
Andrea Selva
241c03274c
Avoid to run integration tests while testing all supported plugin (#15511)
Update the test_plugins pipeline script to execute only the unit tests.
Use the vendored JRuby in every Ruby related duty, such as running `bundler` and `gem`.
Temporarily comments plugins that has needs to be fixed and already fails on  their Travis CI.
Executes the testing of input tier1 plugins in VM instead of Buildkite agent.
2023-12-11 10:11:03 +01:00
github-actions[bot]
042e5d4c2d
Release notes for 8.11.2 (#15660) forwardport to main (#15676)
Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
(cherry picked from commit 4e3e09c5d6)
2023-12-07 17:17:32 -05:00
Mashhur
6a44d9df68
Update JRuby core to 9.4.5.0 of rubyUtils.gralde (#15671) 2023-12-07 11:29:16 -08:00
Karen Metts
6c2e123a24
Doc: Add docs for extending integrations with filter-elastic_integrations (#15518) 2023-12-07 14:21:23 -05:00
Dimitrios Liappis
365ca4e2d6
Add new 8.12 branch to CI (#15667)
Now that we have a new 8.12 branch[^1], add it to CI definitions.

[^1]: https://github.com/elastic/logstash/tree/8.12
2023-12-07 15:59:08 +02:00
João Duarte
6c12e6f4c2
bump version to 8.13.0 (#15665) 2023-12-06 23:00:47 +00:00
Karen Metts
0954a687f0
Doc: Update Logstash intro and security overview for serverless (#15313) 2023-12-06 17:00:01 -05:00
Andrea Selva
eddd91454f
Shutdown DLQ segments flusher only if it has been started (#15649)
In DLQ unit testing sometime the DLQ writer is started explicitly without starting the segments flushers. In such cases the test 's logs contains exceptions which could lead to think that the test fails silently.

Avoid to invoke scheduledFlusher's shutdown when it's not started (such behaviour is present only in tests).
2023-12-05 09:06:24 +01:00
Dimitrios Liappis
a26b1d399f
[ci] Skip Logstash PR checks when docs change (#15650)
Changes made under `docs/` are unrelated to the PR tests triggered from
this repo[^1]

This commit skips regular PR tests when changes are made (only) under the `docs/` directory.

Note that the current docs-specific Jenkins Job is getting migrated
at an org level[^2] to Buildkite, and this change will be merged soon.

Relates:

- https://github.com/elastic/ingest-dev/issues/2703

[^1]: via `.buildkite/pull_requests_pipeline.yml`
[^2]: https://github.com/elastic/docs/blob/master/.buildkite/pull-requests.org-wide.json
2023-12-04 19:14:57 +02:00
Dimitrios Liappis
d42b938f81
[ci] Compatibility tests for Exhaustive suite (#15641)
This commit adds the compatibility tier for the Exhaustive tests suite.
Specifically, we introduce two new groups (running in parallel) for Linux and Windows compat tests.
Linux picks one OS per family from [^] and likewise Windows one of the three available choices from the same file.

We also support manual override, if user chooses to, by setting `LINUX_OS` or `WINDOWS_OS` as env vars in the Buildkite build prompt (in this case there is no randomization, and only one OS can be defined for Linux and Windows respectively).

For example:
```
LINUX_OS=rhel-9
WINDOWS_OS=windows=216
```

Relates:

- https://github.com/elastic/ingest-dev/issues/1722

[^1]: 4d6bd955e6/.buildkite/scripts/common/vm-images.json
2023-11-30 20:28:19 +02:00
Dimitrios Liappis
0b1d15e250
Add list of active branches for automation (#15627)
This commit introduces a json file that contains a list of active
branches. It's essentially the same thing done in the Elasticsearch
repo in https://github.com/elastic/elasticsearch/pull/99026 and helps
simplify and automate Buildkite scheduled jobs.

Relates:

- https://github.com/elastic/ingest-dev/issues/2664
- https://elasticco.atlassian.net/browse/ENGPRD-318
- https://github.com/elastic/ingest-dev/issues/2663
2023-11-30 16:55:46 +02:00
kaisecheng
05392ad16e
Added missing method of logger wrapper for puma (#15640)
This commit fixes no method error when node stats API got
invalid API path, which triggers puma to print error using stderr

Fix: #15639
2023-11-30 13:53:18 +00:00
Edmo Vamerlatti Costa
5543e3c3b2
Add support to add and remove multiple keystore keys in a single operation (#15612)
This commit added support to add and remove multiple keystore keys in a single operation. It also fixed the empty value validation for editing existing key values and added ASCII validation for values.
2023-11-30 10:21:51 +01:00
github-actions[bot]
8b9acf12fa
Release notes for 8.11.1 (#15572) forwardport to main (#15637)
(cherry picked from commit 3d4e7e121d)
2023-11-29 18:12:10 -05:00
Dimitrios Liappis
6446bba962
[ci] Switch to Adoptium distro for JDK 11 (#15629)
AdoptOpenJDK is nowadays Adoptium, so we replace it in favor of
the latter which is actively maintained.

Relates https://github.com/elastic/logstash/pull/15628
2023-11-29 11:37:27 +02:00
Mashhur
6785038435
Logstash core integration tests for Logstash to Logstash communication. (#15541)
* Logstash core integration tests for Logsthas to Logstash communication.

* Cleanify: Logstash core integration tests for Logsthas to Logstash communication.
2023-11-28 10:02:22 -08:00