Commit graph

10556 commits

Author SHA1 Message Date
github-actions[bot]
9f6d4ed219
Release notes for 8.10.3 (#15390) (#15408)
* Add known imap and email plugin issues section to Logstash 8.10+ versions.

Co-authored-by: Mashhur <mashhur.sattorov@elastic.co>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
(cherry picked from commit a88f82e77f)
2023-10-10 09:12:04 -04:00
github-actions[bot]
09c70df7a9
[DRA] Remove wait step in buildkite (#15366) (#15391)
DRA artifact builds support two optional parameters
`VERSION_QUALIFIER_OPT` and `DRA_DRY_RUN`.  The most important is
`VERSION_QUALIFIER_OPT` which should be provided when `alpha1` or
similar versions need to be built.

Currently, after clicking new build, the pipeline takes ~20s to
assemble the steps and then pauses the job waiting for these options to be
filled (or just accept the empty defaults) and press continue.

I feel that this could be trappy behavior because the majority of the
use cases don't need it, and it's likely that a user manually clicks
build and forgets that they'd need to confirm these parameters later
on, left with a hanging build.

This commit makes the parameters optional. If needed, they should be
defined explicitly as Environment Variables in the New Build prompt,
after expanding the Options section.

The downside of this approach is that when needed, users need to
consult the documentation about the environment variable names.

(cherry picked from commit 94dfd4773b)

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
2023-10-05 15:53:39 +03:00
github-actions[bot]
a7f4e78065
bump lock file for 8.11 (#15386)
* Update minor plugin versions in gemfile lock

* Apply suggestions from code review

Remove unnecessary java-universal-11 dependency

---------

Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
Co-authored-by: Mashhur <99575341+mashhurs@users.noreply.github.com>
2023-10-04 10:00:17 -07:00
Mashhur
9680bbd82a
Add bigdecimal > 3.1 dependency. (#15377) 2023-10-04 00:08:14 -07:00
Mashhur
deea26cc72
Copy Gemfile.lock from 8.10 branch. (#15375) 2023-10-03 17:05:16 -07:00
github-actions[bot]
13309ad4fd
deps: downgrade jruby, keep updated default-gem dependencies (forward-port #15283) (#15369) (#15370)
* deps: downgrade jruby, keep updated default-gem dependencies (#15283)

forward-ports non-release-branch components of #15283 to `main`

* deps: downgrade jruby, keep updated default-gem dependencies

By downgrading JRuby to 9.4.2.0 we avoid the silent global crash of the
scheduler backing `Concurrent::TimerTask` that occurs when Jruby 9.4.3.0's
invokedynamic promotes a method to run natively, incorrectly.

Upstream bug: https://github.com/jruby/jruby/issues/7904

Along with the downgrade of JRuby itself to 9.4.2.0, we cherry-pick the
updates to gems that were included in the latest JRuby 9.4.3.0 to ensure
we don't back out relevant fixes to stdlib.

We also remove a pinned-dependency on `racc` that is no longer relevant.

Resolves: https://github.com/elastic/logstash/issues/15282

* Imported the licenses for some gems

- cgi
- date
- ffi-binary-libfixposix
- io-console
- net-http
- net-protocol
- reline
- time
- timeout
- uri

* specs: avoid mocking global ::Gem::Dependency::new

* build: remove redundanct dependsOn declaration

* deps: notice use of ffi-binary-libfixposix via Ruby license

this gem is tri-licensed `Ruby` / `EPL-2.0` / `LGPL-2.1-or-later` and
the Ruby license is preferred to EPL when available

---------

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

* deps: add license notices for gems moved from default to bundled

---------

Co-authored-by: andsel <selva.andre@gmail.com>
(cherry picked from commit 70081bbcac)

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
2023-10-03 14:41:08 -07:00
Andres Rodriguez
2b091432cb
Add native Logstash to Logstash documentation (#15346)
Add native Logstash to Logstash documentation, which replaces HTTP Input/Output
2023-10-03 10:58:51 -04:00
Dimitrios Liappis
9307c4de1c
[DRA] Rename Buildkite metadata for DRA pipelines (#15365)
To provide a smoother migration experience from Jenkins, this commit adds better information about the two types of DRA jobs.

Relates https://github.com/elastic/ingest-dev/issues/1720
2023-10-03 17:21:03 +03:00
Mashhur
7ed8d37630
Bundle plugin. (#15359) 2023-10-02 21:36:05 -07:00
Dimitrios Liappis
da51a6ac53
[buildkite] DRA staging + snapshot pipelines (#15344)
This commit is the step after #15337 and switches away from the generically named [logstash-dra-pipeline-ci](https://buildkite.com/elastic/logstash-dra-pipeline-ci)
pipeline to two separate pipelines for `snapshot` and `staging`, reflecting the current structure in [Jenkins](https://logstash-ci.elastic.co/view/DRA/).

We define a daily schedule for `snapshot`, but it's commented out for now, until we ramp down the Jenkins job.

Finally, as we've created a dedicated Buildkite team for `logstash`, we place both pipelines under this team.

Relates:

- https://github.com/elastic/ingest-dev/issues/1720
- https://github.com/elastic/logstash/pull/15337
2023-10-02 12:10:59 +03:00
Dimitrios Liappis
05c2627123
[DRA, buildkite] Use GCP vms for package build step (#15356)
We seem to be hitting a weird issue with the psych gem when running in a container:

```
> Task :bootstrap
2023-09-27T15:13:23.844Z [Execution worker Thread 5] WARN FilenoUtil : Native subprocess control requires open access to the JDK IO subsystem
Pass '--add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED' to enable.
Error Errno::ENOENT, retrying 1/10
No such file or directory - /buildkite/builds/bk-agent-prod-k8s-1695827479442731913/elastic/logstash-dra-pipeline-ci/vendor/bundle/jruby/3.1.0/gems/psych-5.1.0-java/deps.lst
```

This commit works around this problem by running inside a VM. The underlying root cause (and that gradle should be erroring in this case) will be investigated separately.
2023-09-28 11:16:51 +03:00
Andres Rodriguez
ad3b89a2b4
Clarify Env Variable usage for list-type URI params (#15345)
Clarify Env Variable usage for list-type URI params
2023-09-27 17:24:21 -04:00
Dimitrios Liappis
12a98250cb
[DRA,buildkite] Use AWS aarch64 instance type (#15352)
We've spotted network flakiness downloading artifacts with gradle (connection resets) when using GCP/t2a on us-central1.
This commit switches to AWS Graviton instance types for building the aarch64 artifacts.
2023-09-27 16:41:51 +03:00
Dimitrios Liappis
dd77c9f927
[ci] Commit DRA -SNAPSHOT buildkite pipeline (#15337)
This commit adds support for building + publishing DRA (-SNAPSHOT for now) artifacts for Logstash. It builds on top of #15312 and therefore only targets the `main` branch and is intended to be run manually during a trial period before we retire the corresponding Jenkins job.

The structure is similar to Jenkins:

1. Three steps runs in parallel to build packages, x86_64 docker and aarch64 docker artifacts.

2. Once 1. is successfully done, use release manager to publish the artifacts.

We generate the pipeline steps for 1. and 2. dynamically (with a simple Python script) to avoid repetition for future PRs: we will add a new pipeline in a follow up PR for -STAGING.

The actual shell scripts are simplified copies from the existing `dra*` scripts under https://github.com/elastic/logstash/tree/main/ci; the simplification comes from native support for copying artifacts between steps in Buildkite and
not having to use an intermediate bucket.

Relates: https://github.com/elastic/ingest-dev/issues/1720
Blocked by: https://github.com/elastic/ci/pull/2312/files
2023-09-26 16:00:56 +03:00
Andrea Selva
b31c429d19
Expanded the description how to size the memory of the JVM (#15210)
Expands the description of memory used by Logstash, dividing the heap and non-heap; describing in details which parts composes the non-heap, how to size it and list the JVM settings that can be used to properly define this space.

Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2023-09-26 09:13:50 +02:00
Dimitrios Liappis
9af39e8b66
[ci, buildkite] Fix backstage link to logstash ... (#15343)
DRA buildkite job
2023-09-25 14:32:41 +03:00
Andrea Selva
03e0b1a301
Updates CI versions after 8.10.2 (#15339) 2023-09-21 09:24:02 -07:00
github-actions[bot]
23ccdda4f7
Release notes for 8.10.2 (#15336) (#15340) 2023-09-21 10:17:17 -04:00
João Duarte
c33af94faa
Update logstash_releases.json to include 8.10.1 2023-09-20 13:28:40 +01:00
github-actions[bot]
0c31ea4523
Fix releasenotes.asciidoc for 8.10.1 (#15327) (#15331)
Since the DRA build for 8.10.1 was made with 82daae80bb , this fix didn't get in.
(cherry picked from commit aa9265665e)
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2023-09-19 13:05:53 -04:00
github-actions[bot]
48156077bc
Release notes for 8.10.1 (#15326) (#15330)
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
(cherry picked from commit 4ae4db31fb)
2023-09-19 12:41:18 -04:00
Pavel Zorin
f90647d98d
Sonar integration with Java Tests code coverage (#15279)
* Sonar integration

* Removed sonar from test target
2023-09-15 00:47:38 +02:00
kaisecheng
cd78558121
fix NPE when getting native thread id (#15301)
This commit adds null guard to get the native thread when constructing pipeline report

Fix: #15300
2023-09-14 16:46:26 +01:00
Andrea Selva
4bddfd7d06
Update CI releases after 7.17.13 (#15293) 2023-09-13 16:48:59 +02:00
kaisecheng
03f1a18a77
Update CI releases after 8.10.0 (#15319) 2023-09-13 10:56:50 +01:00
kaisecheng
c204f38718
Release notes for 8.10.0 (#15265) (#15316)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
2023-09-12 14:14:24 +01:00
kaisecheng
236b8cb8cb
bump_ci_8.10.0 (#15315) 2023-09-12 14:14:08 +01:00
Dimitrios Liappis
77d2ec31fa
[CI] Add initial buildkite pipeline for DRA (#15312)
Add initial buildkite pipeline for DRA artifacts.
This is a "hello-world" pipeline skeleton required to iterate on migrating the actual DRA jobs.
This commit also updates the backstage component for logstash to become a top level entity with the
necessary annotations and linked dependencies to pipelines.

Relates https://github.com/elastic/ingest-dev/issues/1720
2023-09-12 12:05:24 +03:00
Andrea Selva
a623377086
Forward port 8.9.2 release notes to main (#15310)
Forward port 8.9.2 release notes to main
2023-09-08 14:47:58 +02:00
Andrea Selva
3d67f8238d
Update CI releases after 8.9.2 (#15295) 2023-09-08 14:47:06 +02:00
kaisecheng
fde473d976
buildkite serverless test against main (#15306)
- test against main branch
- fix rename
2023-09-06 14:40:53 +01:00
github-actions[bot]
0f3330eba2
Update .ruby-version to 9.3.10.0 (#15303) (#15305)
(cherry picked from commit 8e5676d7c6)

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2023-09-05 09:29:58 +01:00
Dimitrios Liappis
bee6749076
[Docs] Update build from source instructions in README.md (#15302)
The instructions to build from source in README.md were outdated. This
commit updates and simplifies them, preferring the use of `gradle`.
2023-09-04 16:50:16 +03:00
kaisecheng
0286f671d2
serverless test use minimum privileges per case (#15264)
This commit splits the privileges per use case and 
removes ilm in template for serverless test
2023-08-31 22:27:43 +01:00
kaisecheng
6b2fa20622
disable xpack API and monitoring pipeline for serverless (#15277)
This commit adds a call to identify serverless cluster before fetching `/_xpack` to verify the license and supported features.
When it is serverless, the license checker uses hardcoded xpack info instead of calling xpack API. The internal pipeline of monitoring is disabled and logs error when configured to use legacy monitoring.

Fixes: 
ingest-dev#2303
ingest-dev#2284

Co-authored-by: Rob Bavey <rob.bavey@elastic.co>
2023-08-31 17:00:13 +01:00
kaisecheng
da4c918122
bump to 8.11.0 (#15276) 2023-08-23 13:52:30 +01:00
vodorok
8e00989a37
Remove unnecessary whitespace from logstash.yml (#15262) 2023-08-22 09:21:41 -07:00
Andrea Selva
58e23fbdc3
Fix the update of Puma (#15271)
Revert PR #15267 which updated Puma in Gemfile.template and correctly place it in logstash-core.gemspec, beeing a dependency of Logstash core.
2023-08-22 12:32:50 +02:00
Rob Bavey
fe1b1ed1da
Remove DepProxy patch, as Bundler::DepProxy is removed in Bundler 2.4.0 (#15269) 2023-08-21 15:54:01 -04:00
Andrea Selva
afc50eb676
Update Puma (#15267)
Update Puma dependency
2023-08-21 14:11:31 +02:00
kaisecheng
9e48f9cfde
update release version (#15263) 2023-08-17 17:14:15 +01:00
github-actions[bot]
710905248d
Release notes for 8.9.1 (#15244) (#15261)
Co-authored-by: logstashmachine <43502315+logstashmachine@users.noreply.github.com>
Co-authored-by: Kaise Cheng <kaise.cheng@elastic.co>
(cherry picked from commit db86da61db)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-08-16 17:44:58 +01:00
kaisecheng
a51c788e0c
[doc] serverless setup endpoint for test (#15249)
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2023-08-16 17:37:12 +01:00
kaisecheng
fb66e9888c
Fix serverless test for api protection (#15252) 2023-08-16 14:02:11 +01:00
Edmo Vamerlatti Costa
499091824b
Fix update oldest segment reference order (#15246)
The DeadLetterQueueWriter#updateOldestSegmentReference was sorting the existing segments by the lexicographic file names. For example, if there are a few segments on the DQL path with index 8, 9 and 10, it was choosing the 10 as the oldest segment instead of 8.
This commit changed it to comparing the segment ID as numbers, so the file deletion will happen following the proper order.
2023-08-16 10:00:08 +02:00
João Duarte
04fd0840fe
bump rake 13 for jruby 9.4 compatibility (#15256) 2023-08-15 22:45:45 +01:00
Mashhur
e890049c1b
Pipeline to pipeline communication acked queue improvements. (#15173)
* Pipeline to pipeline communication acked queue improvements.

* Handle InterruptedException exception in input back, warn message improvement when in-flight events are partially sent and other minor such as descriptive logs, etc improvements.

* Apply suggestions from code review

Check if queue is open after thread acquires the lock.

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

* Apply suggestions from code review

Unite test case improvement: use `assertThrows` when validating the exception.

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

* Pulling off of introducing  wrap with  operations.

* Introduce  functional interface to broadly use to catch the exception types.

* Addressing comments: do not retry sending inflight events on  case. We still throw  if we get error when opening queue.

* will not be reached input retry logic, removing.

* Move queue close check after thread acquiring a lock. Make read next page interface private since it is an internal use purpose.

* Apply suggestions from code review

Leave a comment for the write lock and remove unnecessary warning with `ensure_delivery=>false`

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

* Remove unused  method, check if current thread acquired lock when accessing next page.

* pq: getting possibly-shared access to next read page is illegal

The private `Queue#nextReadPage()` method requires that the caller has
exclusive ownership of the lock, and failing to have the lock is an
illegal state that cannot be recoverd from; it would leak the
effectively-private `Page` to a caller that cannot reliably use it
without corrupting other callers.

Both callers of this private method already call it with exclusive
access, so this safeguard is merely to prevent future development from
breaking the expectation unknowingly.

As such, we throw an `IllegalStateException`.

* pq: use shared queue-closed check for block and non-block reads

By moving the closed-check from the blocking `Queue#readBatch` to the
shared private `Queue#nextReadPage`, we ensure that both blocking reads
by `Queue#readBatch` and non-blocking reads by `Queue#nonBlockReadBatch`
behave the same when the queue has been closed.

* pq: make exception message constants descriptive

* p2p: clarify comment about cumulating retry behaviour

---------

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
Co-authored-by: Ry Biesemeyer <ry.biesemeyer@elastic.co>
2023-08-08 16:05:41 -07:00
Rob Bavey
fd1b3498dd
Forward port of release notes from 8.9.0 (#15230)
Contains the following PRs

Release notes for 8.9.0 (#15162)
8.9 Release notes updated. (#15221)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Karen Metts <35154725+karenzone@users.noreply.github.com>
Co-authored-by: Mashhur <99575341+mashhurs@users.noreply.github.com>
2023-08-08 18:00:58 -04:00
Edmo Vamerlatti Costa
88f42f334e
Fix DeadLetterQueueWriter unable to finalize segment error (#15233)
This commit moves the Files.size(...) call into the try catch block, that way, when the oldest segment is deleted by the DeadLetterQueueReader, no NoSuchFileException will be thrown up, and the writer will gracefully update the oldest segment on the next updateOldestSegmentReference invocation (scheduled flush, entry write, delete expired, etc).
It also adds the volatile keyword to the shared mutable variables, making sure that all the changes will be instantly visible among all the running threads (scheduler & writer).
2023-08-08 16:06:44 +02:00
kaisecheng
9af7c7cef4
Serverless test against restricted API key (#15224)
This commit changes the serverless tests to use a restricted API key with necessary permissions and disables Logstash legacy monitoring test.

Fixes: #15234

Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
2023-08-02 15:27:46 +01:00