Skip to content

Check stable plugin version at install and load time#91780

Merged
williamrandolph merged 3 commits intoelastic:mainfrom
williamrandolph:sp/version-check
Nov 23, 2022
Merged

Check stable plugin version at install and load time#91780
williamrandolph merged 3 commits intoelastic:mainfrom
williamrandolph:sp/version-check

Conversation

@williamrandolph
Copy link
Copy Markdown
Contributor

For a node to install a stable plugin, the node's Elasticsearch version must have the same major version as the Elasticsearch libraries against which the stable plugin was built. Additionally, a node will reject stable plugins that have been built with a future version of Elasticsearch.

@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

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

@elasticsearchmachine elasticsearchmachine added the Team:Core/Infra Meta label for core/infra team label Nov 21, 2022
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Hi @williamrandolph, I've created a changelog YAML for you.

Copy link
Copy Markdown
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. One suggestion on the tests.

"my_plugin",
"desc",
"1.0",
Version.fromId(Version.CURRENT.id + 1),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Since all we care about changing is the version, a utility for creating a descriptor with a specific Version would reduce a lot of boilerplate in these tests. Before the only case to change the version was in testIncompatibleElasticsearchVersion(), but this adds 2 more, so I would combine them to make the tests easier to read. Something like newTestDescriptorForVersion(Version v)

@williamrandolph williamrandolph merged commit 0367e07 into elastic:main Nov 23, 2022
@pgomulka pgomulka mentioned this pull request Nov 24, 2022
25 tasks
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 >enhancement Team:Core/Infra Meta label for core/infra team v8.7.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants