-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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
MINOR: Update Scala to 2.13.3 #8931
Conversation
Two jobs passed, one failed with a seemingly unrelated issue. |
retest this please |
@@ -548,9 +550,9 @@ class AclAuthorizer extends Authorizer with Logging { | |||
|
|||
private def updateCache(resource: ResourcePattern, versionedAcls: VersionedAcls): Unit = { | |||
if (versionedAcls.acls.nonEmpty) { | |||
aclCache = aclCache + (resource -> versionedAcls) | |||
aclCache = aclCache.updated(resource, versionedAcls) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This avoids the tuple
creation.
@@ -367,7 +367,8 @@ class AclAuthorizer extends Authorizer with Logging { | |||
} else false | |||
} | |||
|
|||
@nowarn("cat=deprecation&cat=optimizer") | |||
@nowarn("cat=deprecation") | |||
@nowarn("cat=optimizer") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The behavior of &
was changed so that both conditions have to evaluate to true for a warning to match the exclusion.
@@ -538,6 +539,7 @@ class AclAuthorizer extends Authorizer with Logging { | |||
} | |||
} | |||
|
|||
@nowarn("cat=optimizer") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New warning flagged by the compiler.
@@ -566,6 +568,7 @@ object ConsumerGroupCommand extends Logging { | |||
/** | |||
* Returns the state of the specified consumer group and partition assignment states | |||
*/ | |||
@nowarn("cat=optimizer") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New warning flagged by the compiler.
@@ -1210,7 +1210,7 @@ object KafkaConfig { | |||
.define(PasswordEncoderIterationsProp, INT, Defaults.PasswordEncoderIterations, atLeast(1024), LOW, PasswordEncoderIterationsDoc) | |||
} | |||
|
|||
def configNames() = configDef.names().asScala.toList.sorted | |||
def configNames: Seq[String] = configDef.names.asScala.toBuffer.sorted |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
toBuffer
is more efficient than toList
and sorted
returns a copy anyway.
*/ | ||
@Deprecated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't make sense to deprecate a method in an internal class that is still needed by our code. Removed the deprecation of various KafkaZkClient
classes. cc @stanislavkozlovski
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ijuma Thanks for the PR. LGTM.
One job passed, two had a single unrelated test failure. |
* 'trunk' of github.com:apache/kafka: KAFKA-10180: Fix security_config caching in system tests (apache#8917) KAFKA-10173: Fix suppress changelog binary schema compatibility (apache#8905) KAFKA-10166: always write checkpoint before closing an (initialized) task (apache#8926) MINOR: Rename SslTransportLayer.State."NOT_INITALIZED" enum value to "NOT_INITIALIZED" MINOR: Update Scala to 2.13.3 (apache#8931) KAFKA-9076: support consumer sync across clusters in MM 2.0 (apache#7577) MINOR: Remove Diamond and code code Alignment (apache#8107) KAFKA-10198: guard against recycling dirty state (apache#8924)
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)
I had to fix several compiler errors due to deprecation of auto application of
()
. A relatedXlint config (
-Xlint:nullary-override
) is no longer valid in 2.13, so we now only enable itfor 2.12. The compiler flagged two new inliner warnings that required suppression and
the semantics of
&
in@nowarn
annotations changed, requiring a small change inone of the warning suppressions.
I also removed the deprecation of a number of methods in
KafkaZkClient
asthey should not have been deprecated in the first place since
KafkaZkClient
is aninternal class and we still use these methods in the Controller and so on. This
became visible because the Scala compiler now respects Java's
@Deprecated
annotation.
Finally, I included a few minor clean-ups (eg using
toBuffer
insteadtoList
) when fixingthe compilation warnings.
Noteworthy bug fixes in Scala 2.13.3:
Full release notes:
https://github.com/scala/scala/releases/tag/v2.13.3
Committer Checklist (excluded from commit message)