Skip to content

[WIP]Rought idea of translating Ruby setting into Java using a Ruby shell to immutable Java implementation#12566

Closed
andsel wants to merge 1 commit intoelastic:mainfrom
andsel:feature/move_settings_ruby_to_java_immutable_version
Closed

[WIP]Rought idea of translating Ruby setting into Java using a Ruby shell to immutable Java implementation#12566
andsel wants to merge 1 commit intoelastic:mainfrom
andsel:feature/move_settings_ruby_to_java_immutable_version

Conversation

@andsel
Copy link
Copy Markdown
Member

@andsel andsel commented Jan 13, 2021

What does this PR do?

This PR is POC related to #12531 where it prove the feasibility to keep the existing Ruby setting classes as shell to effectively proxy calls to a Java immutable versions. The Java version has a specification class, that contain validator, default value and such, while proper setting class (always immutable) keep the value and uses the specification to validate it; It's based on the considerations. However there still some part not captured, for example the base Ruby Setting class accepts a code block used to validate the setting, this code is Ruby code and it should be used by the Java immutable class as validator, but looking at Logstash code base the only usage of that block as validator seem to be in unit tests, so it could be thought as "internal usage" and not leveraged by other plugins (this needs confirmation)

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

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

Related issues

Use cases

Screenshots

Logs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants