Skip to content

Conversation

@jdconrad
Copy link
Contributor

Backports the following commits to 8.19:

…ts (elastic#127486)

Generates a test file with the following information and format:

{
    "component": "<component name>",
    "locations": [
        {
            "representative_class": <class name with package>,
            "module": "<module name>"
        },
        ...
    ]
}

For painless:

{
    "component": "lang-painless",
    "locations": [
        {
            "representative_class": "org/objectweb/asm/tree/analysis/Analyzer.class",
            "module": "org.objectweb.asm.tree.analysis"
        },
        ...
    ]
}

Then it copies the following files into the jar for consumption by unit tests:

* META-INF/plugin-test-build-info.json
* META-INF/es-plugins/<plugin name>/plugin-descriptor.properties
* META-INF/es-plugins/<plugin name>/entitlement-policy.yaml

For server, the files in the jar become the following:

* META-INF/server-test-build-info.json

This should provide enough information for BootstrapForTesting to be 
able to build a mapping of caller class to policy file using the class file 
to look up the jar or directory within the class path and then associating 
that with it's specified module and finally using the specified module to 
look up the appropriate entitlement policy. 

caller class -> specified module -> entitlement policy


---------

Co-authored-by: Patrick Doyle <[email protected]>
@jdconrad jdconrad added :Core/Infra/Entitlements Entitlements infrastructure >non-issue auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport Team:Core/Infra Meta label for core/infra team labels May 21, 2025
@elasticsearchmachine elasticsearchmachine merged commit 01650e9 into elastic:8.19 May 22, 2025
15 checks passed
@jdconrad jdconrad deleted the backport/8.19/pr-127486 branch May 22, 2025 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport :Core/Infra/Entitlements Entitlements infrastructure >non-issue Team:Core/Infra Meta label for core/infra team v8.19.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants