Update trino-plugin to be compatible with the latest Trino SPI (version 433)
What changes were proposed in this pull request?
- Update trino-plugin to be compatible with the latest Trino SPI (version 433)
- I hope it helps someone in trouble with Trino SPI interface changing too fast..
- Related issue: https://github.com/aakashnand/trino-ranger-demo/issues/7
WARNING
- latest version of Trino skips all the access control on in-line functions! If you want to manage access on the Trino in-line functions with Ranger, you have to modify codes on the
FunctionResolver!- Related code: https://github.com/trinodb/trino/blob/master/core/trino-main/src/main/java/io/trino/metadata/FunctionResolver.java#L312
- Related issue I raised: https://github.com/trinodb/trino/issues/19912
How was this patch tested?
- I tested this updated plugin with Trino v433(latest) and Ranger v2.4.0
- I guess it will work well with the higher version of Ranger(it may also v3.0.0..?)
@aakashnand , would you please review this update..?
Hello, @okayhooni
Although we are not doing Ranger Contributing, we are using the same upgraded version of Trino internally.
How did you test these changes?
I remember that Trino Dependency built with JDK 17 could not be used on the Ranger Admin side (built with JDK8), so I was curious how you got it running. (In our case, Ranger Admin was also built based on JDK 17.)
Additionally, there doesn't seem to be any code modification for ranger-trino-plugin-shim, but I think it needs to be modified.
@leeyh0216 Sorry for the late response..!
- We built and tested all the packages of Trino and Ranger with JDK 17
- I already committed the fixes on the
ranger-trino-plugin-shimon this MR (https://github.com/apache/ranger/pull/290/files#diff-afa003f80796be360546cf8a2827aaf0842ca3c6f296554e88ab87f5056107dc)
@okayhooni can you share your maven build command for ranger and trino plugin? I tried to build your fork with JDK 17 but getting errors
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.6:exploded (prepare) on project security-admin-web: Execution prepare of goal org.apache.maven.plugins:maven-war-plugin:2.6:exploded failed: Unable to load the mojo 'exploded' in the plugin 'org.apache.maven.plugins:maven-war-plugin:2.6' due to an API incompatibility: org.codehaus.plexus.component.repository.exception.ComponentLookupException: null
I build by the following command:
mvn -DskipTests=true clean compile package install
@okayhooni can you share your maven build command for ranger and trino plugin? I tried to build your fork with JDK 17 but getting errors
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.6:exploded (prepare) on project security-admin-web: Execution prepare of goal org.apache.maven.plugins:maven-war-plugin:2.6:exploded failed: Unable to load the mojo 'exploded' in the plugin 'org.apache.maven.plugins:maven-war-plugin:2.6' due to an API incompatibility: org.codehaus.plexus.component.repository.exception.ComponentLookupException: nullI build by the following command:
mvn -DskipTests=true clean compile package install
You should build only trino plugin, you can try to run this command: mvn clean package -DskipTests -P ranger-trino-plugin,-linux -am -pl distro,plugin-trino,ranger-trino-plugin-shim,agents-installer,credentialbuilder
Hi guys, what's going on with this PR and support the latest version of Trino?
@ognjen-it - Trino plugin implementation is being moved from Ranger git repo to Trino git repo, tracked by RANGER-4810, and Trino PR #22675. It will help if you can review the PR in Trino repo.