Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.x] Reimplement LogStash::Numeric setting in Java (backport #17127) #17273

Merged
merged 2 commits into from
Mar 6, 2025

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Mar 6, 2025

Release notes

[rn:skip]

What does this PR do?

Reimplements LogStash::Setting::Numeric Ruby setting class into the org.logstash.settings.NumericSetting and exposes it through java_import as LogStash::Setting::NumericSetting.
Updates the rspec tests:

  • verifies java.lang.IllegalArgumentException instead of ArgumentError is thrown because the kind of exception thrown by Java code, during verification.

Why is it important/What is the impact to the user?

As a developer I want use Java classes to shape the configuration settings.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • [ ] I have made corresponding changes to the documentation
  • [ ] I have made corresponding change to the default configuration files (and/or docker env variables)
  • I have added tests that prove my fix is effective or that my feature works

Author's Checklist

  • [ ]

How to test this PR locally

Update a numeric settings like pipeline.batch.delay to a value that's not the default, start Logstash and verify that the setting value is used, for example check with

curl -XGET 'localhost:9600/_node/pipelines?pretty'

Related issues

Reimplements `LogStash::Setting::Numeric` Ruby setting class into the `org.logstash.settings.NumericSetting` and exposes it through `java_import` as `LogStash::Setting::NumericSetting`.
Updates the rspec tests:
- verifies `java.lang.IllegalArgumentException` instead of `ArgumentError` is thrown because the kind of exception thrown by Java code, during verification.

(cherry picked from commit 07a3c8e)
@mergify mergify bot added the backport label Mar 6, 2025
@mergify mergify bot assigned andsel Mar 6, 2025
Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarQube

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

cc @andsel

Copy link
Contributor

@kaisecheng kaisecheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI green LGTM

@andsel andsel merged commit 5f50548 into 8.x Mar 6, 2025
7 checks passed
@andsel andsel deleted the mergify/bp/8.x/pr-17127 branch March 6, 2025 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants