logstash
logstash copied to clipboard
[Spacetime] Reimplement config Setting classe in java
Release notes
[rn:skip]
What does this PR do?
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 syntatically and semantically equivalent to the old Ruby Boolean class, which replaces.
Why is it important/What is the impact to the user?
This PR allows to move the Ruby Setting subclasses one at a time without breaking existing code.
Checklist
- [x] My code follows the style guidelines of this project
- [x] 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
- [x] Fix the Ruby side of hierarchy to have green tests
How to test this PR locally
The test consist in switching on and off a boolean setting and check the selection is respected. Consider the api.enabled and its deprecated version named http.enabled, tinker with it in config/logstash.yml and as command line switch --api.enabled true|false. Check with curl.
- set to false
api.enabledinlogstash.yml - run Logstash. with
bin/logstash -e "input{stdin{}} output{stdout{}}" - verify with
curl -v "http://localhost:9600"
- Use the command line switch
bin/logstash -e "input{stdin{}} output{stdout{}}" --api.enabled false
Related issues
- Closes #12531
- Closes #12566
Use cases
Screenshots
Logs
@yaauie this is ready for another review :-)
Quality Gate passed
Issues
0 New issues
0 Fixed issues
0 Accepted issues
Measures
0 Security Hotspots
No data about Coverage
No data about Duplication
:green_heart: Build Succeeded
- Buildkite Build
- Commit: 9d7feaa11f38582615c93362a167696b230c822a
History
- :yellow_heart: Build #1334 was flaky 09587199db80ea63a787df4ad1e36113208a1a24
- :yellow_heart: Build #1332 was flaky 6392439963224a47bbf4b54ef8e40a06162a1272
- :broken_heart: Build #1331 failed aa43e461c45a9b8d0ba86f7e44b597705698392b
- :yellow_heart: Build #1270 was flaky 843a8d4eef200b9e5504bf47527f8554f41017dc
- :yellow_heart: Build #1235 was flaky 182cc9a2eac1392c94a5e0563c8cda04988f0b6d
- :green_heart: Build #1230 succeeded aee0a31693a20d24305113c3fc6c503a4521f2e5
cc @andsel

0.0% Coverage on New Code