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 runtime java home for third party audit task #91412

Merged
merged 2 commits into from Nov 8, 2022

Conversation

mark-vieira
Copy link
Contributor

@mark-vieira mark-vieira commented Nov 8, 2022

We actually do indeed need to use the runtime Java for this task because depending on the target version, we may be loading classes for a later Java version. For example, if we use dependencies that are MR jars, then we in fact do load different classes depending on the runtime Java version. To test this properly then we need to use the target Java version to actually execute the task so it can both load the newer classes, and any classes from any newer APIs present in the later Java version.

Closes #91264

We actually do indeed need to use the runtime Java for this task
because depending on the target version, we may be loading classes
for a later Java version. For example, if we use dependencies that are
MR jars, then we in fact do load different classes depending on the
runtime Java version. To test this properly then we need to use the
target Java version to actually execute the task so it can both load
the newer classes, and any classes from any newer APIs present in the
later Java version.
@mark-vieira mark-vieira added >test Issues or PRs that are addressing/adding tests :Delivery/Build Build or test infrastructure auto-backport-and-merge Automatically create backport pull requests and merge when ready v8.5.1 labels Nov 8, 2022
@elasticsearchmachine elasticsearchmachine added Team:Delivery Meta label for Delivery team v8.6.0 labels Nov 8, 2022
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-delivery (Team:Delivery)

@breskeby
Copy link
Contributor

breskeby commented Nov 8, 2022

👍

@breskeby breskeby self-requested a review November 8, 2022 16:09
Copy link
Contributor

@breskeby breskeby left a comment

Choose a reason for hiding this comment

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

I think its cleaner to use an if / else block here instead of potentially configure javahome twice

@mark-vieira
Copy link
Contributor Author

I think its cleaner to use an if / else block here instead of potentially configure javahome twice

We're not configuring it twice, we simply on set it if runtime java is different than the compiler java. So otherwise it'll just use the default, which is the build java home.

@mark-vieira mark-vieira merged commit 071ae26 into elastic:main Nov 8, 2022
@mark-vieira mark-vieira deleted the thirdpartyaudit_runtime_java branch November 8, 2022 19:18
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
8.5

mark-vieira added a commit to mark-vieira/elasticsearch that referenced this pull request Nov 8, 2022
We actually do indeed need to use the runtime Java for this task
because depending on the target version, we may be loading classes
for a later Java version. For example, if we use dependencies that are
MR jars, then we in fact do load different classes depending on the
runtime Java version. To test this properly then we need to use the
target Java version to actually execute the task so it can both load
the newer classes, and any classes from any newer APIs present in the
later Java version.
elasticsearchmachine pushed a commit that referenced this pull request Nov 8, 2022
We actually do indeed need to use the runtime Java for this task
because depending on the target version, we may be loading classes
for a later Java version. For example, if we use dependencies that are
MR jars, then we in fact do load different classes depending on the
runtime Java version. To test this properly then we need to use the
target Java version to actually execute the task so it can both load
the newer classes, and any classes from any newer APIs present in the
later Java version.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport-and-merge Automatically create backport pull requests and merge when ready :Delivery/Build Build or test infrastructure Team:Delivery Meta label for Delivery team >test Issues or PRs that are addressing/adding tests v8.5.1 v8.6.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ThirdPartyAudit failure for JDK19
3 participants