Skip to content

Conversation

@wangkewen
Copy link

@wangkewen wangkewen commented Nov 7, 2025

Description

This PR fixes the issue-26465 by enabling maven-enforcer-plugin and duplicate-finder-maven-plugin for both spark2 and spark3 profiles.

Motivation and Context

It is needed to not skip checks by maven-enforcer-plugin and duplicate-finder-maven-plugin to fix issue-26465

Impact

Test Plan

Spark2 profile (default)

$ mvn clean install -U -DskipTests -Dmaven.javadoc.skip=true -T1C -pl '!presto-docs'

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for presto-root 0.296-SNAPSHOT:
[INFO]
[INFO] presto-root ........................................ SUCCESS [  4.144 s]
[INFO] presto-testng-services ............................. SUCCESS [  4.500 s]
[INFO] presto-common ...................................... SUCCESS [ 21.952 s]
[INFO] presto-spi ......................................... SUCCESS [  5.175 s]
[INFO] presto-plugin-toolkit .............................. SUCCESS [  2.680 s]
[INFO] presto-client ...................................... SUCCESS [  3.335 s]
[INFO] presto-parser ...................................... SUCCESS [  7.494 s]
[INFO] presto-geospatial-toolkit .......................... SUCCESS [  4.654 s]
[INFO] presto-analyzer .................................... SUCCESS [  1.732 s]
[INFO] presto-bytecode .................................... SUCCESS [  4.001 s]
[INFO] presto-matching .................................... SUCCESS [  1.950 s]
[INFO] presto-memory-context .............................. SUCCESS [  1.863 s]
[INFO] presto-expressions ................................. SUCCESS [  2.057 s]
[INFO] presto-main-tests .................................. SUCCESS [  1.919 s]
[INFO] presto-function-namespace-managers-common .......... SUCCESS [  2.395 s]
[INFO] presto-tpch ........................................ SUCCESS [  2.897 s]
[INFO] presto-thrift-api .................................. SUCCESS [  2.555 s]
[INFO] presto-function-namespace-managers ................. SUCCESS [  4.212 s]
[INFO] presto-built-in-worker-function-tools .............. SUCCESS [  2.074 s]
[INFO] presto-sql-invoked-functions-plugin ................ SUCCESS [  1.525 s]
[INFO] presto-ui .......................................... SUCCESS [ 24.753 s]
[INFO] presto-main-base ................................... SUCCESS [01:15 min]
[INFO] presto-main ........................................ SUCCESS [  8.691 s]
[INFO] presto-blackhole ................................... SUCCESS [  2.550 s]
[INFO] presto-resource-group-managers ..................... SUCCESS [  4.383 s]
[INFO] presto-thrift-testing-udf-server ................... SUCCESS [  3.685 s]
[INFO] presto-tests ....................................... SUCCESS [01:18 min]
[INFO] presto-atop ........................................ SUCCESS [  6.656 s]
[INFO] presto-hdfs-core ................................... SUCCESS [  4.502 s]
[INFO] presto-cache ....................................... SUCCESS [  4.550 s]
[INFO] presto-jmx ......................................... SUCCESS [  6.583 s]
[INFO] presto-record-decoder .............................. SUCCESS [  2.583 s]
[INFO] presto-kafka ....................................... SUCCESS [ 10.007 s]
[INFO] presto-redis ....................................... SUCCESS [  8.289 s]
[INFO] presto-accumulo .................................... SUCCESS [ 12.240 s]
[INFO] presto-cassandra ................................... SUCCESS [  8.391 s]
[INFO] presto-bigquery .................................... SUCCESS [ 10.588 s]
[INFO] presto-memory ...................................... SUCCESS [  7.216 s]
[INFO] presto-orc ......................................... SUCCESS [ 12.178 s]
[INFO] presto-benchmark ................................... SUCCESS [  5.512 s]
[INFO] presto-parquet ..................................... SUCCESS [  7.014 s]
[INFO] presto-rcfile ...................................... SUCCESS [  4.788 s]
[INFO] presto-hive-common ................................. SUCCESS [  2.187 s]
[INFO] presto-hive-metastore .............................. SUCCESS [  6.406 s]
[INFO] presto-tpcds ....................................... SUCCESS [  5.080 s]
[INFO] presto-testing-docker .............................. SUCCESS [  5.861 s]
[INFO] presto-hive ........................................ SUCCESS [ 23.172 s]
[INFO] presto-hive-hadoop2 ................................ SUCCESS [ 18.611 s]
[INFO] presto-iceberg ..................................... SUCCESS [ 26.698 s]
[INFO] presto-i18n-functions .............................. SUCCESS [  4.003 s]
[INFO] presto-teradata-functions .......................... SUCCESS [  4.412 s]
[INFO] presto-example-http ................................ SUCCESS [  3.417 s]
[INFO] presto-local-file .................................. SUCCESS [  3.276 s]
[INFO] presto-base-jdbc ................................... SUCCESS [  7.331 s]
[INFO] presto-mysql ....................................... SUCCESS [  5.581 s]
[INFO] presto-oracle ...................................... SUCCESS [  5.754 s]
[INFO] presto-postgresql .................................. SUCCESS [  5.734 s]
[INFO] presto-prometheus .................................. SUCCESS [  8.390 s]
[INFO] presto-redshift .................................... SUCCESS [  4.438 s]
[INFO] presto-sqlserver ................................... SUCCESS [  4.344 s]
[INFO] presto-mongodb ..................................... SUCCESS [  7.505 s]
[INFO] presto-ml .......................................... SUCCESS [  6.833 s]
[INFO] presto-jdbc ........................................ SUCCESS [ 50.805 s]
[INFO] presto-cli ......................................... SUCCESS [  5.512 s]
[INFO] presto-product-tests ............................... SUCCESS [ 23.017 s]
[INFO] presto-pinot-toolkit ............................... SUCCESS [  8.526 s]
[INFO] presto-pinot ....................................... SUCCESS [  9.616 s]
[INFO] presto-benchmark-driver ............................ SUCCESS [  5.782 s]
[INFO] presto-thrift-testing-server ....................... SUCCESS [01:25 min]
[INFO] presto-thrift-connector ............................ SUCCESS [  3.282 s]
[INFO] presto-password-authenticators ..................... SUCCESS [  3.772 s]
[INFO] presto-session-property-managers-common ............ SUCCESS [  1.750 s]
[INFO] presto-db-session-property-manager ................. SUCCESS [  3.284 s]
[INFO] presto-hudi ........................................ SUCCESS [ 19.645 s]
[INFO] presto-hive-function-namespace ..................... SUCCESS [ 10.372 s]
[INFO] presto-hana ........................................ SUCCESS [  5.375 s]
[INFO] presto-druid ....................................... SUCCESS [ 15.187 s]
[INFO] presto-cluster-ttl-providers ....................... SUCCESS [  3.217 s]
[INFO] presto-file-session-property-manager ............... SUCCESS [  2.751 s]
[INFO] presto-singlestore ................................. SUCCESS [  5.221 s]
[INFO] presto-native-sql-invoked-functions-plugin ......... SUCCESS [  1.458 s]
[INFO] presto-node-ttl-fetchers ........................... SUCCESS [  3.279 s]
[INFO] presto-kudu ........................................ SUCCESS [ 11.676 s]
[INFO] presto-elasticsearch ............................... SUCCESS [ 10.920 s]
[INFO] presto-spark-classloader-spark2 .................... SUCCESS [  5.406 s]
[INFO] presto-spark-classloader-interface ................. SUCCESS [  2.380 s]
[INFO] presto-spark-common ................................ SUCCESS [  1.438 s]
[INFO] presto-spark-base .................................. SUCCESS [  8.283 s]
[INFO] presto-native-execution ............................ SUCCESS [  4.625 s]
[INFO] presto-native-sidecar-plugin ....................... SUCCESS [  4.999 s]
[INFO] presto-delta ....................................... SUCCESS [ 17.370 s]
[INFO] presto-clickhouse .................................. SUCCESS [  6.420 s]
[INFO] presto-server ...................................... SUCCESS [ 57.153 s]
[INFO] presto-verifier .................................... SUCCESS [01:52 min]
[INFO] presto-testing-server-launcher ..................... SUCCESS [ 12.634 s]
[INFO] presto-benchto-benchmarks .......................... SUCCESS [  4.092 s]
[INFO] presto-proxy ....................................... SUCCESS [  5.767 s]
[INFO] presto-benchmark-runner ............................ SUCCESS [  3.848 s]
[INFO] presto-spark ....................................... SUCCESS [  2.378 s]
[INFO] presto-spark-package ............................... SUCCESS [ 53.033 s]
[INFO] presto-spark-launcher .............................. SUCCESS [ 27.774 s]
[INFO] presto-spark-testing ............................... SUCCESS [  2.929 s]
[INFO] presto-thrift-spec ................................. SUCCESS [  3.687 s]
[INFO] presto-google-sheets ............................... SUCCESS [  5.997 s]
[INFO] presto-grpc-api .................................... SUCCESS [  6.181 s]
[INFO] presto-grpc-testing-udf-server ..................... SUCCESS [  1.720 s]
[INFO] presto-lark-sheets ................................. SUCCESS [  7.063 s]
[INFO] presto-test-coverage ............................... SUCCESS [ 13.275 s]
[INFO] presto-plan-checker-router-plugin .................. SUCCESS [  4.215 s]
[INFO] presto-router ...................................... SUCCESS [  9.075 s]
[INFO] presto-native-tests ................................ SUCCESS [  2.610 s]
[INFO] presto-open-telemetry .............................. SUCCESS [  1.882 s]
[INFO] redis-hbo-provider ................................. SUCCESS [  8.321 s]
[INFO] presto-openapi ..................................... SUCCESS [  6.302 s]
[INFO] presto-base-arrow-flight ........................... SUCCESS [ 10.085 s]
[INFO] presto-function-server ............................. SUCCESS [ 16.610 s]
[INFO] presto-router-example-plugin-scheduler ............. SUCCESS [  1.753 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  07:27 min (Wall Clock)
[INFO] Finished at: 2025-11-06T22:21:19-08:00
[INFO] ------------------------------------------------------------------------

Spark3 profile

$ mvn clean install -U -DskipTests -Dmaven.javadoc.skip=true -Dspark-version=3 -T1C -pl '!presto-docs'
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for presto-root 0.296-SNAPSHOT:
[INFO]
[INFO] presto-root ........................................ SUCCESS [  4.110 s]
[INFO] presto-testng-services ............................. SUCCESS [  4.281 s]
[INFO] presto-common ...................................... SUCCESS [  9.491 s]
[INFO] presto-spi ......................................... SUCCESS [  6.130 s]
[INFO] presto-plugin-toolkit .............................. SUCCESS [  3.201 s]
[INFO] presto-client ...................................... SUCCESS [  4.020 s]
[INFO] presto-parser ...................................... SUCCESS [  8.662 s]
[INFO] presto-geospatial-toolkit .......................... SUCCESS [  5.177 s]
[INFO] presto-analyzer .................................... SUCCESS [  2.046 s]
[INFO] presto-bytecode .................................... SUCCESS [  3.895 s]
[INFO] presto-matching .................................... SUCCESS [  2.026 s]
[INFO] presto-memory-context .............................. SUCCESS [  1.853 s]
[INFO] presto-expressions ................................. SUCCESS [  1.856 s]
[INFO] presto-main-tests .................................. SUCCESS [  1.976 s]
[INFO] presto-function-namespace-managers-common .......... SUCCESS [  2.933 s]
[INFO] presto-tpch ........................................ SUCCESS [  3.235 s]
[INFO] presto-thrift-api .................................. SUCCESS [  3.285 s]
[INFO] presto-function-namespace-managers ................. SUCCESS [  4.768 s]
[INFO] presto-built-in-worker-function-tools .............. SUCCESS [  2.069 s]
[INFO] presto-sql-invoked-functions-plugin ................ SUCCESS [  2.200 s]
[INFO] presto-ui .......................................... SUCCESS [ 27.542 s]
[INFO] presto-main-base ................................... SUCCESS [01:11 min]
[INFO] presto-main ........................................ SUCCESS [  7.964 s]
[INFO] presto-blackhole ................................... SUCCESS [  2.677 s]
[INFO] presto-resource-group-managers ..................... SUCCESS [  4.409 s]
[INFO] presto-thrift-testing-udf-server ................... SUCCESS [  4.262 s]
[INFO] presto-tests ....................................... SUCCESS [01:20 min]
[INFO] presto-atop ........................................ SUCCESS [  6.739 s]
[INFO] presto-hdfs-core ................................... SUCCESS [  4.862 s]
[INFO] presto-cache ....................................... SUCCESS [  5.141 s]
[INFO] presto-jmx ......................................... SUCCESS [  6.774 s]
[INFO] presto-record-decoder .............................. SUCCESS [  2.926 s]
[INFO] presto-kafka ....................................... SUCCESS [ 10.013 s]
[INFO] presto-redis ....................................... SUCCESS [  7.805 s]
[INFO] presto-accumulo .................................... SUCCESS [ 12.170 s]
[INFO] presto-cassandra ................................... SUCCESS [  9.152 s]
[INFO] presto-bigquery .................................... SUCCESS [ 10.604 s]
[INFO] presto-memory ...................................... SUCCESS [  7.559 s]
[INFO] presto-orc ......................................... SUCCESS [ 11.524 s]
[INFO] presto-benchmark ................................... SUCCESS [  4.321 s]
[INFO] presto-parquet ..................................... SUCCESS [  6.586 s]
[INFO] presto-rcfile ...................................... SUCCESS [  4.748 s]
[INFO] presto-hive-common ................................. SUCCESS [  2.485 s]
[INFO] presto-hive-metastore .............................. SUCCESS [  6.694 s]
[INFO] presto-tpcds ....................................... SUCCESS [  5.373 s]
[INFO] presto-testing-docker .............................. SUCCESS [  5.644 s]
[INFO] presto-hive ........................................ SUCCESS [ 22.991 s]
[INFO] presto-hive-hadoop2 ................................ SUCCESS [ 17.897 s]
[INFO] presto-iceberg ..................................... SUCCESS [ 26.941 s]
[INFO] presto-i18n-functions .............................. SUCCESS [  4.124 s]
[INFO] presto-teradata-functions .......................... SUCCESS [  4.542 s]
[INFO] presto-example-http ................................ SUCCESS [  3.666 s]
[INFO] presto-local-file .................................. SUCCESS [  3.461 s]
[INFO] presto-base-jdbc ................................... SUCCESS [  7.070 s]
[INFO] presto-mysql ....................................... SUCCESS [  5.116 s]
[INFO] presto-oracle ...................................... SUCCESS [  5.228 s]
[INFO] presto-postgresql .................................. SUCCESS [  5.023 s]
[INFO] presto-prometheus .................................. SUCCESS [  8.272 s]
[INFO] presto-redshift .................................... SUCCESS [  3.904 s]
[INFO] presto-sqlserver ................................... SUCCESS [  3.827 s]
[INFO] presto-mongodb ..................................... SUCCESS [  7.561 s]
[INFO] presto-ml .......................................... SUCCESS [  6.949 s]
[INFO] presto-jdbc ........................................ SUCCESS [ 53.518 s]
[INFO] presto-cli ......................................... SUCCESS [  5.487 s]
[INFO] presto-product-tests ............................... SUCCESS [ 22.832 s]
[INFO] presto-pinot-toolkit ............................... SUCCESS [  8.497 s]
[INFO] presto-pinot ....................................... SUCCESS [  9.934 s]
[INFO] presto-benchmark-driver ............................ SUCCESS [  6.687 s]
[INFO] presto-thrift-testing-server ....................... SUCCESS [01:26 min]
[INFO] presto-thrift-connector ............................ SUCCESS [  3.590 s]
[INFO] presto-password-authenticators ..................... SUCCESS [  4.244 s]
[INFO] presto-session-property-managers-common ............ SUCCESS [  2.266 s]
[INFO] presto-db-session-property-manager ................. SUCCESS [  3.590 s]
[INFO] presto-hudi ........................................ SUCCESS [ 20.064 s]
[INFO] presto-hive-function-namespace ..................... SUCCESS [  9.092 s]
[INFO] presto-hana ........................................ SUCCESS [  4.760 s]
[INFO] presto-druid ....................................... SUCCESS [ 15.457 s]
[INFO] presto-cluster-ttl-providers ....................... SUCCESS [  3.368 s]
[INFO] presto-file-session-property-manager ............... SUCCESS [  2.887 s]
[INFO] presto-singlestore ................................. SUCCESS [  4.704 s]
[INFO] presto-native-sql-invoked-functions-plugin ......... SUCCESS [  2.181 s]
[INFO] presto-node-ttl-fetchers ........................... SUCCESS [  3.440 s]
[INFO] presto-kudu ........................................ SUCCESS [ 11.349 s]
[INFO] presto-elasticsearch ............................... SUCCESS [ 10.784 s]
[INFO] presto-spark-classloader-spark3 .................... SUCCESS [ 19.276 s]
[INFO] presto-spark-classloader-interface ................. SUCCESS [ 17.533 s]
[INFO] presto-spark-common ................................ SUCCESS [  1.522 s]
[INFO] presto-spark-base .................................. SUCCESS [ 36.292 s]
[INFO] presto-native-execution ............................ SUCCESS [ 18.870 s]
[INFO] presto-native-sidecar-plugin ....................... SUCCESS [  5.000 s]
[INFO] presto-delta ....................................... SUCCESS [ 17.900 s]
[INFO] presto-clickhouse .................................. SUCCESS [  5.735 s]
[INFO] presto-server ...................................... SUCCESS [ 57.333 s]
[INFO] presto-verifier .................................... SUCCESS [01:53 min]
[INFO] presto-testing-server-launcher ..................... SUCCESS [ 12.978 s]
[INFO] presto-benchto-benchmarks .......................... SUCCESS [  4.036 s]
[INFO] presto-proxy ....................................... SUCCESS [  6.741 s]
[INFO] presto-benchmark-runner ............................ SUCCESS [  3.836 s]
[INFO] presto-spark ....................................... SUCCESS [  2.273 s]
[INFO] presto-spark-package ............................... SUCCESS [01:07 min]
[INFO] presto-spark-launcher .............................. SUCCESS [ 39.778 s]
[INFO] presto-spark-testing ............................... SUCCESS [ 29.615 s]
[INFO] presto-thrift-spec ................................. SUCCESS [  3.815 s]
[INFO] presto-google-sheets ............................... SUCCESS [  6.531 s]
[INFO] presto-grpc-api .................................... SUCCESS [  7.058 s]
[INFO] presto-grpc-testing-udf-server ..................... SUCCESS [  1.547 s]
[INFO] presto-lark-sheets ................................. SUCCESS [  6.311 s]
[INFO] presto-test-coverage ............................... SUCCESS [ 39.759 s]
[INFO] presto-plan-checker-router-plugin .................. SUCCESS [  4.497 s]
[INFO] presto-router ...................................... SUCCESS [ 10.100 s]
[INFO] presto-native-tests ................................ SUCCESS [  2.358 s]
[INFO] presto-open-telemetry .............................. SUCCESS [  2.246 s]
[INFO] redis-hbo-provider ................................. SUCCESS [  7.909 s]
[INFO] presto-openapi ..................................... SUCCESS [  6.013 s]
[INFO] presto-base-arrow-flight ........................... SUCCESS [ 10.333 s]
[INFO] presto-function-server ............................. SUCCESS [ 16.705 s]
[INFO] presto-router-example-plugin-scheduler ............. SUCCESS [  2.201 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  07:42 min (Wall Clock)
[INFO] Finished at: 2025-11-07T00:53:08-08:00
[INFO] ------------------------------------------------------------------------

Contributor checklist

  • Please make sure your submission complies with our contributing guide, in particular code style and commit standards.
  • PR description addresses the issue accurately and concisely. If the change is non-trivial, a GitHub Issue is referenced.
  • Documented new properties (with its default value), SQL syntax, functions, or other functionality.
  • If release notes are required, they follow the release notes guidelines.
  • Adequate tests were added if applicable.
  • CI passed.
  • If adding new dependencies, verified they have an OpenSSF Scorecard score of 5.0 or higher (or obtained explicit TSC approval for lower scores).

Release Notes

Please follow release notes guidelines and fill in the release notes below.

If release note is NOT required, use:

== NO RELEASE NOTE ==

@wangkewen wangkewen changed the title [pos] Enable maven-enforcer-plugin for both spark2 and spark3 profiles fix[pos] Enable maven-enforcer-plugin for both spark2 and spark3 profiles Nov 7, 2025
@wangkewen wangkewen changed the title fix[pos] Enable maven-enforcer-plugin for both spark2 and spark3 profiles fix[pos]: Enable maven-enforcer-plugin for both spark2 and spark3 profiles Nov 7, 2025
@wangkewen wangkewen changed the title fix[pos]: Enable maven-enforcer-plugin for both spark2 and spark3 profiles fix(pos): Enable maven-enforcer-plugin for both spark2 and spark3 profiles Nov 7, 2025
@wangkewen wangkewen changed the title fix(pos): Enable maven-enforcer-plugin for both spark2 and spark3 profiles fix: Enable maven-enforcer-plugin for both spark2 and spark3 profiles Nov 7, 2025
@tdcmeehan tdcmeehan requested a review from aaneja November 10, 2025 16:30
@tdcmeehan tdcmeehan added the from:Meta PR from Meta label Nov 10, 2025
@prestodb-ci
Copy link
Contributor

Saved that user @wangkewen is from Meta

Copy link
Contributor

@aaneja aaneja left a comment

Choose a reason for hiding this comment

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

Short first pass

In general - can we try and figure out if we need to downgrade a library/ upgrade the module bytecode level instead of adding excludes

<enforceBytecodeVersion>
<maxJdkVersion>20</maxJdkVersion>
<excludes combine.children="append">
<exclude>org.jgrapht:jgrapht-core</exclude>
Copy link
Contributor

Choose a reason for hiding this comment

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

The reason we need to exclude jgrapht-core is that we upgraded to version 1.5.2 which requires JDK 11+. However, for presto-main-base we want to keep the JDK level at 8.

@sumi-mathew Would we be okay to downgrade this library to 1.4.0, which was the last JDK8 compatible version ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes ,We only upgraded to the latest version as part of adopting newer libraries, so reverting to 1.4.0 should be fine.

<enforceBytecodeVersion>
<maxJdkVersion>20</maxJdkVersion>
<excludes combine.children="append">
<exclude>org.apache.yetus:audience-annotations:jar</exclude>
Copy link
Contributor

@aaneja aaneja Nov 11, 2025

Choose a reason for hiding this comment

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

We need this because this upgrade accidentally moved us to a version that requires JDK 11+

Since presto-kudu is unlikely to be used with Spark (can you check internally @wangkewen ?) I propose we roll-forward with this and set the JDK level for this module to 17+

Copy link
Author

Choose a reason for hiding this comment

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

Thanks for your comments. @aaneja I will update it.

@shrinidhijoshi
Copy link
Collaborator

Took an initial look. It seems that for the duration that these checks were disabled, multiple changes have sneaked in to the presto project that are now being flagged by the enforcer.

It might be infeasible for 1 person to hunt down all the changes and this PR will likely need community support to get it across.

I agree with @aaneja though on trying to fix the dependency spec instead of excluding , atleast as much as possible.

Let's start with the ones that @aaneja already identified and keep making progress on this @wangkewen

@aaneja
Copy link
Contributor

aaneja commented Nov 13, 2025

In the interest of time, I am fine if we fix the issues we already identified and create issues for the rest. We can fix those before the next release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

from:Meta PR from Meta

Projects

None yet

Development

Successfully merging this pull request may close these issues.

spark2 maven profile is always active, maven enforcer not enabled

6 participants