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

Add JavaVersionChecker to check Java version for compatibility before… #13533

Merged
merged 1 commit into from
Jan 4, 2022

Conversation

robbavey
Copy link
Member

… running

Provides a "friendly" error message when running Logstash with an incompatible
version of Java

Readded version of #13356, incorporated with use of Comparable from #13358

Release notes

This commit prevents Logstash from attempting to start with a version of the JDK below Java 11, rather than logging a warning and crashing

What does this PR do?

This commit prevents Logstash from attempting to start with a version of the JDK below Java 11, rather than logging a warning and crashing

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

Later versions of 7.x would provide a runtime warning/deprecation log when Logstash is run using JDK < 11, which will not be supported in Logstash 8 due to the changes to support nanosecond precision timestamps introduced in #12797. This commit will prevent Logstash from starting at all if JDK < 11 is used, presenting an error message to the user when this is attempted.

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

Pull down the latest version of Logstash, attempt to run using JDK8, 11, 17. Also test bin/logstash-plugin for correctness

Related issues

… running

Provides a "friendly" error message when running Logstash with an incompatible
version of Java

Readded version of elastic#13356, incorporated with use of Comparable from elastic#13358
Copy link
Contributor

@andsel andsel left a comment

Choose a reason for hiding this comment

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

LGTM

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