Relax SPI compatibility requirements#18072
Relax SPI compatibility requirements#18072ppalucha wants to merge 1 commit intotrinodb:masterfrom ppalucha:pp/relax-spi-check
Conversation
There was a problem hiding this comment.
assertFalse(Versions.checkMatch("420", "421"));
assertFalse(Versions.checkMatch("420", "421-SNAPSHOT"));
There was a problem hiding this comment.
I messed it up, both no snapshots is already covered in previous test case. Should be good now.
lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/VersionsTest.java
Outdated
Show resolved
Hide resolved
lib/trino-plugin-toolkit/src/main/java/io/trino/plugin/base/Versions.java
Outdated
Show resolved
Hide resolved
Check only if major version matches. This allows to test snapshot version of plugin against released Trino version.
|
What's the use case for this? |
@martint as stated in commit message |
|
I read that, but I don't understand how this helps third-party plugins. A third party plugin under development would be referencing a release version of Trino regardless of what version the plugin has (the version of the plugin is unrelated to Trino if it's not part of the Trino codebase). A plugin within the Trino tree would not have this problem, as its version would already match. So the question I'm asking is what is the specific use case for this change, as it's not at all clear from the description. |
|
Thank you @martint for the feedback. I forced me to think me more about it. Actually with 3rd party plugins we cannot assume any versioning pattern. So relaxing this does not make much sense. I think people should not use this function outside of Trino. |
|
A 3rd party plugin with specific versioning compatibility should not invoke |
Description
Check only if major version matches when performing SPI version check.
Additional context and related issues
This change allows to test snapshot version of plugin against the released Trino version.
Release notes
( ) This is not user-visible or docs only and no release notes are required.
( ) Release notes are required, please propose a release note for me.
(x) Release notes are required, with the following suggested text: