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

KAFKA-16763: Upgrade to scala 2.12.19 and scala 2.13.14 #15958

Merged
merged 5 commits into from
May 17, 2024

Conversation

m1a2st
Copy link
Contributor

@m1a2st m1a2st commented May 15, 2024

Scala has been releas new version, so upgrade scala version

@m1a2st m1a2st marked this pull request as ready for review May 15, 2024 01:41
@m1a2st m1a2st changed the title Upgrade to scala 2.12.19 and scala 2.13.14 KAFKA-16763: Upgrade to scala 2.12.19 and scala 2.13.14 May 15, 2024
@m1a2st
Copy link
Contributor Author

m1a2st commented May 15, 2024

@chia7712, This PR please take a look, Thank you.

@chia7712
Copy link
Contributor

[2024-05-15T01:51:49.255Z] > Task :core:compileScala

[2024-05-15T01:51:49.255Z] [Error] /home/jenkins/workspace/Kafka_kafka-pr_PR-15958/core/src/main/scala/kafka/controller/KafkaController.scala:1202:18: method setOrCreatePartitionReassignment in class KafkaZkClient is deprecated

[2024-05-15T01:51:50.590Z] [Error] /home/jenkins/workspace/Kafka_kafka-pr_PR-15958/core/src/main/scala/kafka/zk/ZkData.scala:518:14: class LegacyPartitionAssignment in object ReassignPartitionsZNode is deprecated

[2024-05-15T01:51:50.590Z] [Error] /home/jenkins/workspace/Kafka_kafka-pr_PR-15958/core/src/main/scala/kafka/zk/ZkData.scala:524:24: class LegacyPartitionAssignment in object ReassignPartitionsZNode is deprecated

[2024-05-15T01:51:50.590Z] [Error] /home/jenkins/workspace/Kafka_kafka-pr_PR-15958/core/src/main/scala/kafka/zk/ZkData.scala:533:23: class LegacyPartitionAssignment in object ReassignPartitionsZNode is deprecated

[2024-05-15T01:51:50.590Z] [Error] /home/jenkins/workspace/Kafka_kafka-pr_PR-15958/core/src/main/scala/kafka/zk/ZkData.scala:533:49: class LegacyPartitionAssignment in object ReassignPartitionsZNode is deprecated

please file the build error

@m1a2st
Copy link
Contributor Author

m1a2st commented May 16, 2024

@chia7712, Thanks for your review, Scala 2.3 build is passed in Jenkins

build.gradle Outdated
@@ -671,7 +671,8 @@ subprojects {
"-Xlint:private-shadow",
"-Xlint:stars-align",
"-Xlint:type-parameter-shadow",
"-Xlint:unused"
"-Xlint:unused",
Copy link
Contributor

Choose a reason for hiding this comment

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

Pardon me, why we need those changes?

Copy link
Contributor Author

@m1a2st m1a2st May 16, 2024

Choose a reason for hiding this comment

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

I catch two main errors are class is depreate (1. ) and @nowarn build error in previous build in Jenkins, but these classes or method are used by other classes. I consider that I should not migrate these methods or classes in this PR, thus I think that should closed these check when building scala version 2.3.

  1. ([Error] /home/jenkins/jenkins-agent/workspace/Kafka_kafka-pr_PR-15958/core/src/main/scala/kafka/controller/KafkaController.scala:1202:18: method setOrCreatePartitionReassignment in class KafkaZkClient is deprecated)

Copy link
Contributor

Choose a reason for hiding this comment

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

The issue is caused by the magic NotNothing. As we are in modern scala, could you try to remove it? I give a try on my local, and both compile and test work well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, I will remove the "-Wconf:cat=unused-nowarn:s", and try to complie

Copy link
Contributor Author

Choose a reason for hiding this comment

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

[2024-05-16T08:37:59.531Z] [Error] /home/jenkins/jenkins-agent/workspace/Kafka_kafka-pr_PR-15958/core/src/main/scala/kafka/network/RequestChannel.scala:174:69: @nowarn annotation does not suppress any warnings

[2024-05-16T08:37:59.531Z] one error found

This error happened on Jenkins.

Copy link
Contributor

Choose a reason for hiding this comment

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

@m1a2st You have to remove the usage of NotNothing

Copy link
Contributor

@chia7712 chia7712 left a comment

Choose a reason for hiding this comment

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

LGTM

@chia7712 chia7712 merged commit 7fea279 into apache:trunk May 17, 2024
1 check failed
rreddy-22 pushed a commit to rreddy-22/kafka-rreddy that referenced this pull request May 24, 2024
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants