Skip to content

KAFKA-14256: Upgrade from Scala 2.13.8 to 2.13.10#12675

Merged
ijuma merged 4 commits intoapache:trunkfrom
mdedetrich:update-to-scala-2.13.9
Dec 5, 2022
Merged

KAFKA-14256: Upgrade from Scala 2.13.8 to 2.13.10#12675
ijuma merged 4 commits intoapache:trunkfrom
mdedetrich:update-to-scala-2.13.9

Conversation

@mdedetrich
Copy link
Copy Markdown
Contributor

@mdedetrich mdedetrich commented Sep 22, 2022

In addition to the version bump, we also had to:

  • Update the zinc version
  • Workaround compiler warnings via suppression (proper fix in a follow up)
  • Adjust testDeleteTopicDoesNotRetryThrottlingQuotaExceededException to fix a test failure

Release notes:

@mdedetrich
Copy link
Copy Markdown
Contributor Author

So the update to Scala 2.13.9 seems to have found a regression in the scalac compiler, reported upstream scala/bug#12648

@mdedetrich mdedetrich force-pushed the update-to-scala-2.13.9 branch from 437733a to 02c9145 Compare October 15, 2022 13:18
@mdedetrich mdedetrich changed the title KAFKA-14256: Upgrade from Scala 2.13.8 to 2.13.9 KAFKA-14256: Upgrade from Scala 2.13.8 to 2.13.10 Oct 15, 2022
@mdedetrich
Copy link
Copy Markdown
Contributor Author

So I have updated the PR with the following changes

  • Scala 2.13.10 just came out, so I bumped the Scala version (commit message has also been updated)
  • I have added a workaround for the depreciation warning message in the commit Add workaround for change of behaviour in deprecation for 2.13.10.

The latest CI run has failed but it appears to be due to a possible unrelated problem, i.e. the zinc compiler has a timeout because kafka-streams-scala was compiling at the same time as core-scala

[2022-10-15T13:27:03.553Z] BUILD FAILED in 8m 24s

[2022-10-15T13:27:03.553Z] 237 actionable tasks: 192 executed, 45 up-to-date

[2022-10-15T13:27:03.553Z] 

[2022-10-15T13:27:03.553Z] See the profiling report at: file:///home/jenkins/workspace/Kafka_kafka-pr_PR-12675/build/reports/profile/profile-2022-10-15-13-18-44.html

[2022-10-15T13:27:03.553Z] A fine-grained performance profile is available: use the --scan option.

[2022-10-15T13:27:04.484Z] > Timeout waiting to lock zinc-1.6.1_2.13.10_11 compiler cache (/home/jenkins/.gradle/caches/7.5.1/zinc-1.6.1_2.13.10_11). It is currently in use by another Gradle instance.

[2022-10-15T13:27:04.484Z] Retrying due to zinc lock timeout

[2022-10-15T13:27:05.415Z] To honour the JVM settings for this build a single-use Daemon process will be forked. See https://docs.gradle.org/7.5.1/userguide/gradle_daemon.html#sec:disabling_the_daemon.

[2022-10-15T13:27:07.178Z] Daemon will be stopped at the end of the build 

@mimaison @cadonna @ijuma Would it be possible to retrigger the CI so I can see if this error is deterministic? If so I will have a look into the problem.

@mimaison
Copy link
Copy Markdown
Member

@vjanelle
Copy link
Copy Markdown

Hmm, trying this locally with 2.8.2 (slightly forked), and the following test fails

> Task :core:integrationTest FAILED
kafka.admin.TopicCommandWithAdminClientTest.testDeleteTopicDoesNotRetryThrottlingQuotaExceededException() failed, log available in /Users/vjanelle/git/kafka/core/build/reports/testOutput/kafka.admin.TopicCommandWithAdminClientTest.testDeleteTopicDoesNotRetryThrottlingQuotaExceededException().test.stdout

TopicCommandWithAdminClientTest > testDeleteTopicDoesNotRetryThrottlingQuotaExceededException() FAILED
    Argument(s) are different! Wanted:
    admin.deleteTopics(
        [testDeleteTopicDoesNotRetryThrottlingQuotaExceededException-Qx8RDpByDZ],
        <custom argument matcher>
    );
    -> at kafka.admin.TopicCommandWithAdminClientTest.testDeleteTopicDoesNotRetryThrottlingQuotaExceededException(TopicCommandWithAdminClientTest.scala:779)
    Actual invocations have different arguments:
    admin.listTopics(
        org.apache.kafka.clients.admin.ListTopicsOptions@669fa03e
    );
    -> at kafka.admin.TopicCommand$AdminClientTopicService.getTopics(TopicCommand.scala:368)
    admin.deleteTopics(
        [testDeleteTopicDoesNotRetryThrottlingQuotaExceededException-Qx8RDpByDZ],
        org.apache.kafka.clients.admin.DeleteTopicsOptions@4a7bb32e
    );
    -> at kafka.admin.TopicCommand$AdminClientTopicService.deleteTopic(TopicCommand.scala:360)
        at kafka.admin.TopicCommandWithAdminClientTest.testDeleteTopicDoesNotRetryThrottlingQuotaExceededException(TopicCommandWithAdminClientTest.scala:779)

I haven't confirmed with 3.x yet though.

@mdedetrich
Copy link
Copy Markdown
Contributor Author

mdedetrich commented Oct 17, 2022

So I managed to solve one problem but created another. So I have solved the issues with the zinc incremental compiler (it appears that the version of zinc was too old for the new Scala compiler being used) however now there is a problem of the where the rat task is complaining that an incompatible license was brought in ????

I cannot produce the problem locally at all either, does anyone know if its possible to grab the report file directly from the CI so I can see what it's complaining about?

Hmm, trying this locally with 2.8.2 (slightly forked), and the following test fails

@vjanelle Can you setup a branch setup with your exact setup, I can then have a look into it.

@vjanelle
Copy link
Copy Markdown

@omkreddy
Copy link
Copy Markdown
Contributor

@mdedetrich Thanks for the PR. I have run this PR with rat verbose output bug fix

Results are (#12785, https://github.com/apache/kafka/runs/9090714417): I can see be below rat task error.

Files with unapproved licenses:
 - /home/jenkins/workspace/Kafka_kafka-pr_PR-12785/buildoutput.log

compilation errors with JDK 11 and Scala 2.13

Argument(s) are different! Wanted:
admin.deleteTopics(
    [topicName],
    <custom argument matcher>
);
-> at kafka.admin.TopicCommandTest.testDeleteTopicDoesNotRetryThrottlingQuotaExceededException(TopicCommandTest.scala:207)
Actual invocations have different arguments:
admin.listTopics(
    ListTopicsOptions(listInternal=true)
);
-> at kafka.admin.TopicCommand$TopicService.getTopics(TopicCommand.scala:370)
admin.deleteTopics(
    [topicName],
    org.apache.kafka.clients.admin.DeleteTopicsOptions@bd09a26
);
-> at kafka.admin.TopicCommand$TopicService.deleteTopic(TopicCommand.scala:362)

@omkreddy
Copy link
Copy Markdown
Contributor

@mdedetrich any update here? let us know if you need any help.

@mdedetrich
Copy link
Copy Markdown
Contributor Author

I was busy last week so I didn't have time for it, will try to look later this week

@egyedt
Copy link
Copy Markdown
Contributor

egyedt commented Nov 14, 2022

The following dependency should also be checked:
scoverage: "1.4.11"
The 2.0.7 version of it, is the first one where Scala 2.13.10 is supported.
https://mvnrepository.com/artifact/org.scoverage/scalac-scoverage-plugin_2.13.10/2.0.7
https://github.com/scoverage/scalac-scoverage-plugin/releases

@vjanelle
Copy link
Copy Markdown

@mdedetrich looks like confluent has something in their branch linked to here that would work for the arg matching issue.

Comment thread build.gradle Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why do we have to do this instead of removing the suppressions that are no longer needed?

@ijuma ijuma force-pushed the update-to-scala-2.13.9 branch from ee72e82 to 43b2e14 Compare December 5, 2022 00:29
@ijuma
Copy link
Copy Markdown
Member

ijuma commented Dec 5, 2022

I rebased the branch and fixed the failing test.

@ijuma
Copy link
Copy Markdown
Member

ijuma commented Dec 5, 2022

Java 8 and 11 passed. Java 17 had a few flaky unrelated failures:

Build / JDK 17 and Scala 2.13 / org.apache.kafka.common.network.SslVersionsTransportLayerTest.tlsServerProtocol = [TLSv1.3, TLSv1.2], tlsClientProtocol = [TLSv1.3]
Build / JDK 17 and Scala 2.13 / org.apache.kafka.common.record.MemoryRecordsBuilderTest.[6] magic=2, bufferOffset=0, compressionType=gzip
Build / JDK 17 and Scala 2.13 / org.apache.kafka.common.record.MemoryRecordsBuilderTest.[18] magic=1, bufferOffset=15, compressionType=gzip

@ijuma ijuma merged commit 6ae08c4 into apache:trunk Dec 5, 2022
guozhangwang pushed a commit to guozhangwang/kafka that referenced this pull request Jan 25, 2023
In addition to the version bump, we also had to:
* Update the zinc version
* Workaround compiler warnings via suppression (proper fix in a follow up)
* Adjust `testDeleteTopicDoesNotRetryThrottlingQuotaExceededException` to fix a test failure

Release notes:
* https://github.com/scala/scala/releases/tag/v2.13.9
* https://github.com/scala/scala/releases/tag/v2.13.10

Reviewers: Ismael Juma <ismael@juma.me.uk>
udaynpusa pushed a commit to mapr/kafka that referenced this pull request Apr 25, 2024
This change bumps scala version to 2.13.12 and cherry-picks squashed combination of the following commits (only scala-related changes):
dfaae31 MINOR: Upgrade Scala for Java 20/21 support (apache#13840)
6ae08c4 KAFKA-14256: Upgrade from Scala 2.13.8 to 2.13.10 (apache#12675)
7c2d672 MINOR: Update library dependencies (Q1 2022) (apache#11306)
a8bd649 MINOR: Update Scala to 2.13.6 (apache#10711)
dd34e40 MINOR: Update Scala to 2.13.5 (apache#10169)
cbf8ad2 MINOR: Upgrade to Scala 2.13.4 (apache#9643)
7f90a58 MINOR: Update Scala to 2.13.3 (apache#8931)
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.

6 participants