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

Use proper Java version for BWC builds #29493

Merged
merged 5 commits into from
Apr 13, 2018

Conversation

jasontedor
Copy link
Member

Today we have JAVA_HOME for the compiler Java home and RUNTIME_JAVA_HOME for the test Java home. However, when we compile BWC nodes and run them, neither of these Java homes might be the version that was suitable for that BWC node (e.g., 5.6 requires JDK 8 to compile and to run). This commit adds support for the environment variables JAVA\d+_HOME and uses the appropriate Java home based on the version of the node being started. We even do this for reindex-from-old which requires JDK 7 for these very old nodes. Note that these environment variables are not required if not running BWC tests, and they are strictly required if running BWC tests.

Today we have JAVA_HOME for the compiler Java home and RUNTIME_JAVA_HOME
for the test Java home. However, when we compile BWC nodes and run them,
neither of these Java homes might be the version that was suitable for
that BWC node (e.g., 5.6 requires JDK 8 to compile and to run). This
commit adds support for the environment variables JAVA\d+_HOME and uses
the appropriate Java home based on the version of the node being
started. We even do this for reindex-from-old which requires JDK 7 for
these very old nodes. Note that these environment variables are not
required if not running BWC tests, and they are strictly required if
running BWC tests.
@jasontedor jasontedor requested a review from rjernst April 12, 2018 06:02
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

Copy link
Member

@rjernst rjernst left a comment

Choose a reason for hiding this comment

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

Lgtm. Thanks for all the strict checks.

env = ['JAVA_HOME': project.runtimeJavaHome]
final String javaHome
final Map<Integer, JavaVersion> javaVersions = project.javaVersions
if (Version.fromString(nodeVersion).before("6.2.0")) {
Copy link
Member

Choose a reason for hiding this comment

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

Can we change nodeVersion so it is a Version instead of String so we don't have to parse many times during configuration of every node in gradle?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure; I will address this in a follow-up PR.

Copy link
Member Author

Choose a reason for hiding this comment

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

I opened #29515.

* master:
  Fix NPE in InternalGeoCentroidTests#testReduceRandom (elastic#29481)
  Build: introduce keystoreFile for cluster config (elastic#29491)
  test: Index more docs, so that it is less likely the search request does not time out.
@jasontedor
Copy link
Member Author

run the packaging tests

@jasontedor
Copy link
Member Author

run the packaging sample tests

@jasontedor
Copy link
Member Author

run the sample packaging tests

1 similar comment
@jasontedor
Copy link
Member Author

run the sample packaging tests

* master:
  Enable skipping fetching latest for BWC builds (elastic#29497)
  Add remote cluster client (elastic#29495)
  Ensure flush happens on shard idle
  Adds SpanGapQueryBuilder in the query DSL (elastic#28636)
  Control max size and count of warning headers (elastic#28427)
  Make index APIs work without types. (elastic#29479)
  Deprecate filtering on `_type`. (elastic#29468)
  Fix auto-generated ID example format (elastic#29461)
  Fix typo in max number of threads check docs (elastic#29469)
  Add primary term to translog header (elastic#29227)
  Add a helper method to get a random java.util.TimeZone (elastic#29487)
  Move TimeValue into elasticsearch-core project (elastic#29486)
@jasontedor jasontedor merged commit 27fafa2 into elastic:master Apr 13, 2018
jasontedor added a commit that referenced this pull request Apr 13, 2018
Today we have JAVA_HOME for the compiler Java home and RUNTIME_JAVA_HOME
for the test Java home. However, when we compile BWC nodes and run them,
neither of these Java homes might be the version that was suitable for
that BWC node (e.g., 5.6 requires JDK 8 to compile and to run). This
commit adds support for the environment variables JAVA\d+_HOME and uses
the appropriate Java home based on the version of the node being
started. We even do this for reindex-from-old which requires JDK 7 for
these very old nodes. Note that these environment variables are not
required if not running BWC tests, and they are strictly required if
running BWC tests.
jasontedor added a commit that referenced this pull request Apr 16, 2018
* 6.x:
  [TEST] REST client request without leading '/' (#29471)
  Prevent accidental changes of default values (#29528)
  [Docs] Add definitions to glossary  (#29127)
  Avoid self-deadlock in the translog (#29520)
  Minor cleanup in NodeInfo.groovy
  Lazy configure build tasks that require older JDKs (#29519)
  Fix usage of NodeInfo#nodeVersion in build
  Control max size/count of warning headers (#28427) (#29516)
  Simplify snapshot check in root build file
  Make NodeInfo#nodeVersion strongly-typed as Version (#29515)
  Enable license header exclusions (#29379)
  Use proper Java version for BWC builds (#29493)
  Mute TranslogTests#testFatalIOExceptionsWhileWritingConcurrently
jasontedor added a commit that referenced this pull request Apr 16, 2018
* master:
  [TEST] REST client request without leading '/' (#29471)
  Using ObjectParser in UpdateRequest (#29293)
  Prevent accidental changes of default values (#29528)
  [Docs] Add definitions to glossary  (#29127)
  Avoid self-deadlock in the translog (#29520)
  Minor cleanup in NodeInfo.groovy
  Lazy configure build tasks that require older JDKs (#29519)
  Simplify snapshot check in root build file
  Make NodeInfo#nodeVersion strongly-typed as Version (#29515)
  Enable license header exclusions (#29379)
  Use proper Java version for BWC builds (#29493)
  Mute TranslogTests#testFatalIOExceptionsWhileWritingConcurrently
  Enable skipping fetching latest for BWC builds (#29497)
jasontedor added a commit to jasontedor/elasticsearch that referenced this pull request Apr 17, 2018
* master: (96 commits)
  TEST: Mute testEnsureWeReconnect
  Mute full cluster restart test recovery test
  REST high-level client: add support for Indices Update Settings API [take 2] (elastic#29327)
  Plugins: Fix native controller confirmation for non-meta plugin (elastic#29434)
  Remove PipelineExecutionService#executeIndexRequest (elastic#29537)
  Fix overflow error in parsing of long geohashes (elastic#29418)
  Remove unused index.ttl.disable_purge setting (elastic#29527)
  FullClusterRestartIT.testRecovery should wait for all initializing shards
  Build: Fail if any libs depend on non-core libs (elastic#29336)
  [TEST] REST client request without leading '/' (elastic#29471)
  Using ObjectParser in UpdateRequest (elastic#29293)
  Prevent accidental changes of default values (elastic#29528)
  [Docs] Add definitions to glossary  (elastic#29127)
  Avoid self-deadlock in the translog (elastic#29520)
  Minor cleanup in NodeInfo.groovy
  Lazy configure build tasks that require older JDKs (elastic#29519)
  Simplify snapshot check in root build file
  Make NodeInfo#nodeVersion strongly-typed as Version (elastic#29515)
  Enable license header exclusions (elastic#29379)
  Use proper Java version for BWC builds (elastic#29493)
  ...
@mark-vieira mark-vieira added the Team:Delivery Meta label for Delivery team label Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Delivery/Build Build or test infrastructure Team:Delivery Meta label for Delivery team v6.3.0 v7.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants