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

Lower build requirement from Java 14+ to Java 11+ #940

Merged
merged 4 commits into from
Jul 6, 2021

Conversation

dblock
Copy link
Member

@dblock dblock commented Jul 6, 2021

Description

This is a rebased version of #636 on which I made a mess.

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Avoid use of -Werror -Xlint:all, which may change significantly across
java releases (new warnings could be added). Instead, just list the
warnings individually.

Workaround JDK 11 compiler bug (JDK-8209058) that only impacts test fixture
code in the build itself.

Signed-off-by: Robert Muir <[email protected]>
The java version checker triggers some default warnings because it
targets java7:

```
> Task :distribution:tools:java-version-checker:compileJava FAILED
warning: [options] source value 7 is obsolete and will be removed in a future release
warning: [options] target value 7 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
error: warnings found and -Werror specified
```

Suppress this warning explicitly for this module.

Signed-off-by: Robert Muir <[email protected]>
@opensearch-ci-bot
Copy link
Collaborator

❌   DCO Check Failed c0680575c1d4d9daa3fcf254b8596aee10d489e3
Run ./dev-tools/signoff-check.sh remotes/origin/main c0680575c1d4d9daa3fcf254b8596aee10d489e3 to check locally
Use git commit with -s to add 'Signed-of-by: {EMAIL}' on impacted commits

@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Wrapper Validation success c0680575c1d4d9daa3fcf254b8596aee10d489e3

@dblock dblock force-pushed the rmuir-java_11_build_support branch from c068057 to 39b7d6c Compare July 6, 2021 15:57
@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Wrapper Validation success 39b7d6c

@dblock dblock changed the title Rmuir java 11 build support Lower build requirement from Java 14+ to Java 11+ Jul 6, 2021
@opensearch-ci-bot
Copy link
Collaborator

✅   DCO Check Passed 39b7d6c

@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Precommit success c0680575c1d4d9daa3fcf254b8596aee10d489e3

@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Precommit success 39b7d6c

@dblock
Copy link
Member Author

dblock commented Jul 6, 2021

start gradle check

@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Check success 39b7d6c
Log 317

Reports 317

@dblock dblock merged commit 5d02017 into opensearch-project:main Jul 6, 2021
@tlfeng tlfeng added CI CI related Build Libraries & Interfaces enhancement Enhancement or improvement to existing feature or request v2.0.0 Version 2.0.0 labels Jul 30, 2021
@reta
Copy link
Collaborator

reta commented Oct 13, 2021

@dblock this PR didn't make it to 1.x, should we backport it? any concerns?

@dblock
Copy link
Member Author

dblock commented Oct 13, 2021

Originally we didn’t want to make that change for 1.1. I think we should try to get everything working with Java 11 or 17 for the entire distribution on main, and then decide if we release it in 1.2 and backport this and other commits.

@reta
Copy link
Collaborator

reta commented Oct 13, 2021

Got it, thank you, the bwc tests would drag JDK-14 for the time being, I think it is acceptable.

@dblock
Copy link
Member Author

dblock commented Oct 14, 2021

Got it, thank you, the bwc tests would drag JDK-14 for the time being, I think it is acceptable.

At what point does it do that? I don't think I understand all the intricacies ;)

@reta
Copy link
Collaborator

reta commented Oct 14, 2021

Got it, thank you, the bwc tests would drag JDK-14 for the time being, I think it is acceptable.

At what point does it do that? I don't think I understand all the intricacies ;)

Yeah, so what is happening (my understanding but I am 99% it works this way), when we run bwc tests, we actually check out the branches (in this case 1.x) and build distributions. The "build distributions" step uses the version buildSrc/version.properties from the branch itself, here we run into JDK-14 dependency.

@mch2
Copy link
Member

mch2 commented Nov 23, 2021

This PR didn't make it into 1.2. With CI now updated to use jdk11 this should be backported to 1.x

mch2 pushed a commit to mch2/OpenSearch that referenced this pull request Nov 23, 2021
…#940)

* Lower build requirement from Java 14+ to Java 11+

Avoid use of -Werror -Xlint:all, which may change significantly across
java releases (new warnings could be added). Instead, just list the
warnings individually.

Workaround JDK 11 compiler bug (JDK-8209058) that only impacts test fixture
code in the build itself.

Signed-off-by: Robert Muir <[email protected]>

* Disable warning around -source 7 -release 7 for java version checker

The java version checker triggers some default warnings because it
targets java7:

```
> Task :distribution:tools:java-version-checker:compileJava FAILED
warning: [options] source value 7 is obsolete and will be removed in a future release
warning: [options] target value 7 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
error: warnings found and -Werror specified
```

Suppress this warning explicitly for this module.

Signed-off-by: Robert Muir <[email protected]>

* more java14 -> java11 cleanup

Signed-off-by: Robert Muir <[email protected]>

Co-authored-by: Robert Muir <[email protected]>
Signed-off-by: Marc Handalian <[email protected]>
dblock added a commit that referenced this pull request Nov 24, 2021
* Lower build requirement from Java 14+ to Java 11+

Avoid use of -Werror -Xlint:all, which may change significantly across
java releases (new warnings could be added). Instead, just list the
warnings individually.

Workaround JDK 11 compiler bug (JDK-8209058) that only impacts test fixture
code in the build itself.

Signed-off-by: Robert Muir <[email protected]>

* Disable warning around -source 7 -release 7 for java version checker

The java version checker triggers some default warnings because it
targets java7:

```
> Task :distribution:tools:java-version-checker:compileJava FAILED
warning: [options] source value 7 is obsolete and will be removed in a future release
warning: [options] target value 7 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
error: warnings found and -Werror specified
```

Suppress this warning explicitly for this module.

Signed-off-by: Robert Muir <[email protected]>

* more java14 -> java11 cleanup

Signed-off-by: Robert Muir <[email protected]>

Co-authored-by: Robert Muir <[email protected]>
Signed-off-by: Marc Handalian <[email protected]>

Co-authored-by: Daniel Doubrovkine (dB.) <[email protected]>
Co-authored-by: Robert Muir <[email protected]>
@dblock dblock deleted the rmuir-java_11_build_support branch February 8, 2022 16:13
ritty27 pushed a commit to ritty27/OpenSearch that referenced this pull request May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build Libraries & Interfaces CI CI related enhancement Enhancement or improvement to existing feature or request v2.0.0 Version 2.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants