Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgraded third-party dependencies to the latest versions and fixed CVE vulnerabilities #34409

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

JoshuaChen
Copy link
Contributor

Upgraded third-party dependencies to the latest versions and fixed CVE vulnerabilities


Before committing this PR, I'm sure that I have checked the following options:

  • My code follows the code of conduct of this project.
  • I have self-reviewed the commit code.
  • I have (or in comment I request) added corresponding labels for the pull request.
  • I have passed maven check locally : ./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e.
  • I have made corresponding changes to the documentation.
  • I have added corresponding unit tests for my changes.
  • I have updated the Release Notes of the current development version. For more details, see Update Release Note

Copy link
Member

@linghengqian linghengqian left a comment

Choose a reason for hiding this comment

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

I noticed a bunch of suspicious issues. However, there are no separate issues for the related topics.

Comment on lines +42 to +46
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest</artifactId>
<scope>test</scope>
</dependency>
Copy link
Member

Choose a reason for hiding this comment

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

  • Why is this necessary? hamcrest is imported globally in the top-level POM.
  • I see that the current PR adds hamcrest in more than one place, what is the point of doing this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Although hamcrest was configured in the main pom.xml, the submodule still couldn't find the package when running the test locally.
I found a global duplicate configuration (without scope) before my change in the main pom.xml

Copy link
Member

Choose a reason for hiding this comment

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

I think hamcrest still needs to be defined in the top-level POM, which is cumbersome.

@@ -38,7 +40,7 @@ class EncryptInsertSelectSupportedCheckerTest {
@Test
void assertIsCheck() {
InsertStatementContext sqlStatementContext = mock(InsertStatementContext.class, RETURNS_DEEP_STUBS);
when(sqlStatementContext.getSqlStatement().getInsertSelect().isPresent()).thenReturn(true);
when(sqlStatementContext.getSqlStatement().getInsertSelect()).thenReturn(Optional.of(mock(SubquerySegment.class)));
Copy link
Member

Choose a reason for hiding this comment

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

  • Why does updating some third-party dependencies cause a large number of unit tests to change? Where is the original issue?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The new version of mock will prompt that the thenReturn type is wrong, and Optional.of(mock(SubquerySegment.class)) is required to return

Copy link
Member

Choose a reason for hiding this comment

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

This involves a problem. The new version of mockito does not support JDK8, so it makes no sense to do so.

<commons-compress.version>1.27.1</commons-compress.version>
<commons-configuration2.version>2.11.0</commons-configuration2.version>
<commons-text.version>1.13.0</commons-text.version>
<caffeine.version>3.2.0</caffeine.version>
Copy link
Member

Choose a reason for hiding this comment

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

  • Isn't the last version of caffeine that supports running on JDK 8 2.9.3? Why is this change necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

commons-compress/commons-configuration2/commons-text needs to be specified because the version number conflicts with hadoop-common

Copy link
Member

Choose a reason for hiding this comment

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

This brings up a new topic, why do you need to try to update hadoop? Only hiveserver2 jdbc driver requires hadoop, and hiveserver2 jdbc driver does not support hadoop 3.4.0 at all.

<narayana.version>5.12.7.Final</narayana.version>
<jboss-transaction-spi.version>7.6.1.Final</jboss-transaction-spi.version>
<jboss-logging.version>3.2.1.Final</jboss-logging.version>
<narayana.version>5.13.1.Final</narayana.version>
Copy link
Member

Choose a reason for hiding this comment

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

  • Isn't the last version of narayana supporting Jakarta EE 8 5.12.7.Final? Why is this change needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Upgrade to the last version that supports Java 8

Copy link
Member

Choose a reason for hiding this comment

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

This is not a jdk8 issue, this is an issue related to #27976. You cannot just update the Jakarta EE version without changing the java package.

Comment on lines +101 to +102
<jboss-transaction-spi.version>8.0.0.Final</jboss-transaction-spi.version>
<jboss-logging.version>3.6.1.Final</jboss-logging.version>
Copy link
Member

Choose a reason for hiding this comment

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

  • Why do you need to change the version of narayana to be inconsistent with jboss? Actually only narayana needs jboss.

<hive.version>4.0.1</hive.version>
<hive-server2-jdbc-driver-thin.version>1.6.0</hive-server2-jdbc-driver-thin.version>
<hadoop.version>3.3.6</hadoop.version>
<presto.version>0.288.1</presto.version>
<hadoop.version>3.4.1</hadoop.version>
Copy link
Member

Choose a reason for hiding this comment

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

pom.xml Outdated
<jaybird.version>5.0.6.java8</jaybird.version>

<hikari-cp.version>4.0.3</hikari-cp.version>
<hikari-cp.version>6.2.1</hikari-cp.version>
Copy link
Member

Choose a reason for hiding this comment

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

  • The new version of hikaricp has dropped support for JDK8.

<hamcrest.version>3.0</hamcrest.version>
<mockito.version>4.11.0</mockito.version>
<mockito.version>5.15.2</mockito.version>
Copy link
Member

Choose a reason for hiding this comment

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

  • The new version of mockito has dropped support for JDK8.

<jetcd.version>0.7.7</jetcd.version>
<vertx.version>4.5.1</vertx.version>
<curator.version>5.7.1</curator.version>
<zookeeper.version>3.9.3</zookeeper.version>
Copy link
Member

@linghengqian linghengqian Jan 20, 2025

Choose a reason for hiding this comment

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

  • Warning, an unopened issue has revealed that zookeeper 3.9.3 has changed binary compatibility compared to 3.9.2, which further breaks nativeTest of shardingsphere under GraalVM Native Image. Can you open an issue on the shardingsphere side for zookeeper and tag me to track it?

@@ -914,14 +909,17 @@
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Copy link
Member

Choose a reason for hiding this comment

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

  • Why do you need to add groupId manually? These are Maven's syntax sugar.

@@ -14,6 +14,6 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
wrapperVersion=3.3.2
wrapperVersion=3.9.9
Copy link
Member

Choose a reason for hiding this comment

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

@JoshuaChen JoshuaChen marked this pull request as draft January 20, 2025 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants