Skip to content

Refactor plugin scanning into lib#92437

Merged
pgomulka merged 20 commits intoelastic:mainfrom
pgomulka:moving_scanning_into_lib
Jan 9, 2023
Merged

Refactor plugin scanning into lib#92437
pgomulka merged 20 commits intoelastic:mainfrom
pgomulka:moving_scanning_into_lib

Conversation

@pgomulka
Copy link
Copy Markdown
Contributor

new stable plugins require generated named_components.json file which contains all analysis components implemented by this plugin. The generation is currently done in build-tools by elasticsearch.stable-esplugin
However this makes the generation only available for plugins using gradle. Plugin developers using maven or other building tooling will not be able to use it.

This commits refactors the scanning logic into libs:plugin-scanner which will allow for plugin install command to perform the scanning too.

relates #88980

@pgomulka pgomulka added :Delivery/Build Build or test infrastructure :Core/Infra/Plugins Plugin API and infrastructure >refactoring v8.7.0 labels Dec 19, 2022
@pgomulka pgomulka self-assigned this Dec 19, 2022
@pgomulka pgomulka requested a review from breskeby December 21, 2022 11:06
@pgomulka pgomulka marked this pull request as ready for review December 21, 2022 11:06
@elasticsearchmachine elasticsearchmachine added Team:Core/Infra Meta label for core/infra team Team:Delivery Meta label for Delivery team labels Dec 21, 2022
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

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

@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

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

Copy link
Copy Markdown
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.

some minor changes. I think only having the tests enabled again is a blocker from my perspective to merge this though

*/

// This is only required because :server needs this at runtime.
// We'll be removing this in 8.0 so for now just publish the JAR to make dependency resolution work.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is this comment actually true? I think this is outdated copied from somewhere?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we always need to publish this

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

that was a copy paste. good spot


implementation 'org.ow2.asm:asm:9.2'
implementation 'org.ow2.asm:asm-tree:9.2'
// implementation "com.fasterxml.jackson.core:jackson-core:${versions.jackson}"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can we clean that up

tasks.named("test").configure { enabled = false }

// test depend on ES core...
tasks.named('forbiddenApisMain').configure { enabled = false}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why are those disabled?

// We'll be removing this in 8.0 so for now just publish the JAR to make dependency resolution work.
apply plugin: 'elasticsearch.publish'

tasks.named("test").configure { enabled = false }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

that test task should be enabled as we actually have tests in that lib project

@pgomulka pgomulka merged commit ed83f9c into elastic:main Jan 9, 2023
pgomulka added a commit to pgomulka/elasticsearch that referenced this pull request Jan 13, 2023
new stable plugins require generated named_components.json file which contains all analysis components implemented by this plugin. The generation is currently done in build-tools by elasticsearch.stable-esplugin
However this makes the generation only available for plugins using gradle. Plugin developers using maven or other building tooling will not be able to use it.

This commits refactors the scanning logic into libs:plugin-scanner which will allow for plugin install command to perform the scanning too.

relates elastic#88980
pgomulka added a commit that referenced this pull request Jan 14, 2023
new stable plugins require generated named_components.json file which contains all analysis components implemented by this plugin. The generation is currently done in build-tools by elasticsearch.stable-esplugin However this makes the generation only available for plugins using gradle. Plugin developers using maven or other building tooling will not be able to use it.

This commits refactors the scanning logic into libs:plugin-scanner which will allow for plugin install command to perform the scanning too.

relates #88980
backports #92437
pgomulka added a commit to pgomulka/elasticsearch that referenced this pull request Jan 20, 2023
pgomulka added a commit to pgomulka/elasticsearch that referenced this pull request Jan 20, 2023
Part of elastic#92437 where Classreaders was refactored to return a List
instead of Stream
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Core/Infra/Plugins Plugin API and infrastructure :Delivery/Build Build or test infrastructure >refactoring Team:Core/Infra Meta label for core/infra team Team:Delivery Meta label for Delivery team v8.7.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants