Skip to content

Conversation

rjernst
Copy link
Member

@rjernst rjernst commented Aug 22, 2025

When finding the platform dir to pass to jna we check for system properties which are either set by internal test gradle code or or the cli shell script. If neither of thse are set, we are in test code for an external plugin. This commit fixes the code to use the working dir in this fallback case. Previously we would have created a bogus path. Both are the same: external plugin tests can't load ES native libs since they don't have them available.

When finding the platform dir to pass to jna we check for
system properties which are either set by internal test gradle code or
or the cli shell script. If neither of thse are set, we are in test code
for an external plugin. This commit fixes the code to use the working
dir in this fallback case. Previously we would have created a bogus
path. Both are the same: external plugin tests can't load ES native libs
since they don't have them available.
@elasticsearchmachine elasticsearchmachine added needs:triage Requires assignment of a team area label v8.19.3 labels Aug 22, 2025
@rjernst rjernst added :Core/Infra/Core Core issues without another label >test Issues or PRs that are addressing/adding tests and removed needs:triage Requires assignment of a team area label labels Aug 22, 2025
@elasticsearchmachine elasticsearchmachine added the Team:Core/Infra Meta label for core/infra team label Aug 22, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

@rjernst
Copy link
Member Author

rjernst commented Aug 22, 2025

Note that this does not affect main because there we do not have JNA. The jdk loader directly loads the library when asked, but for JNA we have to set a special system property statically, which is what fails when trying to create the library path.

@rjernst
Copy link
Member Author

rjernst commented Aug 23, 2025

Here's an example failure that occurs without this fix:
https://gradle-enterprise.elastic.co/s/xyjeaupyryisu

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.

lgtm

@rjernst rjernst merged commit 467fe8d into elastic:8.19 Aug 23, 2025
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Core/Infra/Core Core issues without another label Team:Core/Infra Meta label for core/infra team >test Issues or PRs that are addressing/adding tests v8.19.3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants