Commit Graph

450 Commits

Author SHA1 Message Date
Divij Vaidya a68c7068f0
KAFKA-16062: Upgrade mockito to 5.8.0 (#15089)
Reviewers: Luke Chen <showuon@gmail.com>
2023-12-29 16:48:18 +01:00
Fiore Mario Vitale 314de9f23c
KAFKA-15996: Improve JsonConverter performance (#14992)
Improve JsonConverter performance by using afterBurnModule of Jackson library.

Reviewers: Divij Vaidya <diviv@amazon.com>, Mickael Maison <mickael.maison@gmail.com>
2023-12-24 21:47:12 +01:00
Said Boudjelda 05014badf2
KAFKA-15208: Upgrade Jackson dependencies to version 2.16.0 (#13662)
Reviewers: Mickael Maison <mickael.maison@gmail.com>, Divij Vaidya <diviv@amazon.com>
2023-12-19 15:31:24 +01:00
Justine Olshan d9e8d0ddc1
MINOR: Minor update patch versions (#14641)
We were missing the versions for these patch releases. The versions are in versions.py and Dockerfile.

I've also added a step to the release guide to update these files. https://cwiki.apache.org/confluence/display/KAFKA/Release+Process
2023-12-15 13:07:03 -08:00
Andras Katona 270be2dea5
MINOR: Upgrade jetty to 9.4.53.v20231009 (#14877) 2023-12-04 10:54:27 +01:00
Ismael Juma db308a9fe5
MINOR: Upgrade to gradle 8.5 (#14883)
Reviewers: Satish Duggana <satishd@apache.org>
2023-12-01 09:35:45 +05:30
Hao Li bbd75b80ce
KAFKA-15022: Detect negative cycle from one source (#14696)
Introduce a dummy node connected to every other node and run Bellman-ford from the dummy node once instead of from every node in the graph.

Reviewers: Qichao Chu (@ex172000), Matthias J. Sax <matthias@confluent.io>
2023-11-28 00:29:00 -08:00
Kirk True 22f7ffe5e1
KAFKA-15277: Design & implement support for internal Consumer delegates (#14670)
The consumer refactoring project introduced another `Consumer` implementation, creating two different, coexisting implementations of the `Consumer` interface:

* `KafkaConsumer` (AKA "existing", "legacy" consumer)
* `PrototypeAsyncConsumer` (AKA "new", "refactored" consumer)

The goal of this task is to refactor the code via the delegation pattern so that we can keep a top-level `KafkaConsumer` but then delegate to another implementation under the covers. There will be two delegates at first:

* `LegacyKafkaConsumer`
* `AsyncKafkaConsumer`

`LegacyKafkaConsumer` is essentially a renamed `KafkaConsumer`. That implementation handles the existing group protocol. `AsyncKafkaConsumer` is renamed from `PrototypeAsyncConsumer` and will implement the new consumer group protocol from KIP-848. Both of those implementations will live in the `internals` sub-package to discourage their use.

This task is part of the work to implement support for the new KIP-848 consumer group protocol.

Reviewers: Philip Nee <pnee@confluent.io>, Andrew Schofield <aschofield@confluent.io>, David Jacot <djacot@confluent.io>
2023-11-15 05:00:40 -08:00
José Armando García Sancio 35317d8f7b
MINOR; Fix KRaft metadata version system tests (#14722)
The latest metadata version is now 3.7. Fix the KRaft upgrade
test to upgrade to that version instead of 3.6.

Change the vagrant setup and gradle dependencies to use 3.3.2 instead of 3.3.1.

Reviewers: David Arthur <mumrah@gmail.com>
2023-11-09 12:03:12 -08:00
Apoorv Mittal b850b46cf9
KAFKA-15668: Adding Opentelmetry shadowed library (KIP-714) (#14618)
Part of KIP-714.

The PR comprises of changes to include opentlemetry library as defined in KIP-714. The libraries are shadowed to prevent conflicts.

Co-authored-by: Xavier Léauté <xl+github@xvrl.net>

Reviewers: Andrew Schofield <aschofield@confluent.io>, Xavier Léauté <xavier@confluent.io>, Walker Carlson <wcarlson@confluent.io>, Matthias J. Sax <matthias@confluent.io>
2023-11-01 21:53:24 -07:00
atu-sharm a7aaa9c44f
KAFKA-15644: Fix CVE-2023-4586 in netty:handler (#14584)
Reviewers: Mickael Maison <mickael.maison@gmail.com>, Luke Chen <showuon@gmail.com>
2023-10-26 18:36:59 +02:00
Chris Egerton 091eb9b349
KAFKA-15428: Cluster-wide dynamic log adjustments for Connect (#14538)
Reviewers: Greg Harris <greg.harris@aiven.io>, Yang Yang <yayang@uber.com>, Yash Mayya <yash.mayya@gmail.com>
2023-10-20 09:52:37 -04:00
Ismael Juma 1073d434ec
KAFKA-14481: Move LogSegment/LogSegments to storage module (#14529)
A few notes:
* Delete a few methods from `UnifiedLog` that were simply invoking the related method in `LogFileUtils`
* Fix `CoreUtils.swallow` to use the passed in `logging`
* Fix `LogCleanerParameterizedIntegrationTest` to close `log` before reopening
* Minor tweaks in `LogSegment` for readability
 
For broader context on this change, please check:

* KAFKA-14470: Move log layer to storage module

Reviewers: Divij Vaidya <diviv@amazon.com>, Satish Duggana <satishd@apache.org>
2023-10-16 06:37:30 -07:00
Mickael Maison 13b2edd9af
KAFKA-15596: Upgrade ZooKeeper to 3.8.3 (#14535)
Reviewers: Luke Chen <showuon@gmail.com>, Divij Vaidya <diviv@amazon.com>
2023-10-12 17:30:23 +02:00
Ismael Juma 4cf86c5d2f
KAFKA-15492: Upgrade and enable spotbugs when building with Java 21 (#14533)
Spotbugs was temporarily disabled as part of KAFKA-15485 to support Kafka build with JDK 21. This PR upgrades the spotbugs version to 4.8.0 which adds support for JDK 21 and enables it's usage on build again.

Reviewers: Divij Vaidya <diviv@amazon.com>
2023-10-12 14:09:10 +02:00
Arnout Engelen 1983ebebc7
MINOR: fix dependencycheck warnings (#14476)
Add suppressions and skip benchmarking/testing projects

Reviewers: Josep Prat <josep.prat@aiven.io>
2023-10-11 16:18:19 +02:00
atu-sharm c223a9c376
KAFKA-15521: Refactor build.gradle to align gradle swagger plugin with swagger dependencies (#14473)
Reviewers: Mickael Maison <mickael.maison@gmail.com>
2023-10-09 12:30:46 +02:00
Satish Duggana 354c9ca0ce
MINOR Added 3.6.0 to system tests (#14488)
Reviewers: Luke Chen <showuon@gmail.com>
2023-10-08 05:29:06 +05:30
Said Boudjelda 951a9fef9d
MINOR: Upgrade zstd-jni to 1.5.5-6 (#14449)
Reviewers: Divij Vaidya <diviv@amazon.com>
2023-10-03 13:31:20 +02:00
Arnout Engelen dcd8c7d05f
MINOR: suppress dependencycheck warning for CVE-2023-35116 (#14460)
Like in most projects, this attack cannot be achieved by an external
attacker in Kafka.

Reviewers: Josep Prat <josep.prat@aiven.io>
2023-10-02 18:38:29 +02:00
Luke Chen e85b17ec5e
KAFKA-15498: upgrade to snappy 1.1.10.5 (#14458)
Release notes - https://github.com/xerial/snappy-java/releases/tag/v1.1.10.5

This release contains adds support for Windows ARM and fixes some dependencies associated with Linux ppc64. 

Reviewers: Josep Prat <josep.prat@aiven.io>
2023-10-02 19:39:41 +08:00
Luke Chen 86450bf9ac
KAFKA-15498: bump snappy-java version to 1.1.10.4 (#14434)
bump snappy-java version to 1.1.10.4, and add more tests to verify the compressed data can be correctly decompressed and read.

For LogCleanerParameterizedIntegrationTest, we increased the message size for snappy decompression since in the new version of snappy, the decompressed size is increasing compared with the previous version. But since the compression algorithm is not kafka's scope, all we need to do is to make sure the compressed data can be successfully decompressed and parsed/read.

Reviewers: Divij Vaidya <diviv@amazon.com>, Ismael Juma <ismael@juma.me.uk>, Josep Prat <josep.prat@aiven.io>, Kamal Chandraprakash <kamal.chandraprakash@gmail.com>
2023-09-27 19:00:50 +08:00
Divij Vaidya 943d05df68
Upgrade Jetty to 9.4.52.v20230823 (#14438)
Reviewers: Viktor Somogyi-Vass <viktorsomogyi@gmail.com>, Luke Chen <showuon@gmail.com>, Satish Duggana <satishd@apache.org>
2023-09-25 22:35:06 +05:30
Ismael Juma 7ba6d7a0b4
MINOR: Update to Scala 2.13.12 (#14430)
It offers a quickfix action for certain errors, includes a number of bug fixes and it
introduces a new warning by default (https://github.com/scala/scala/pull/10462).

In addition to the scala version bump, we also fix the new compiler warnings and
bump the scalafmt version (the previous version failed with the new scala version).

Release notes: https://github.com/scala/scala/releases/tag/v2.13.12

Reviewers: Divij Vaidya <diviv@amazon.com>, Satish Duggana <satishd@apache.org>
2023-09-24 06:05:12 -07:00
Ismael Juma d1ad1d7b70
MINOR: Upgrade gradle, plugins and test libraries (#14431)
To prepare Java 21 support, upgrade gradle, its plugins and test libraries.
Release notes for major and minor updates included below.

The highlight is faster Java compilation by not shutting down the daemon at the end of the build.
Gradle's internal performance tests show up to a 30% build time improvement for builds that are
dominated by compiling Java sources.

Mockito turns out to be a complex case where we use one of 3 different versions depending on
the Scala and Java versions used. In addition, the default mocking strategy changed from `subclass`
to `inline` in Mockito 5.0. We now use `inline` across the board (we previously used both `subclass`
and `inline`). See comments in the relevant parts of the code for more details.

* Gradle 8.3 release notes: https://docs.gradle.org/8.3/release-notes.html
* jmh 1.37: virtual thread support and various bug fixes
* JUnit 5.10.0 release notes: https://junit.org/junit5/docs/5.10.0/release-notes/index.html
* Mockito 5.x release notes:
  * https://github.com/mockito/mockito/releases/tag/v5.0.0
  * https://github.com/mockito/mockito/releases/tag/v5.1.0
  * https://github.com/mockito/mockito/releases/tag/v5.2.0
  * https://github.com/mockito/mockito/releases/tag/v5.3.0
  * https://github.com/mockito/mockito/releases/tag/v5.4.0
  * https://github.com/mockito/mockito/releases/tag/v5.5.0
* EasyMock 5.2.0 release notes: https://github.com/easymock/easymock/releases/tag/easymock-5.2.0

Reviewers: Divij Vaidya <diviv@amazon.com>
2023-09-24 06:01:28 -07:00
Lucas Brutschy 07a18478be
KAFKA-15326: [7/N] Processing thread non-busy waiting (#14180)
Avoid busy waiting for processable tasks. We need to be a bit careful here to not have the task executors to sleep when work is available. We have to make sure to signal on the condition variable any time a task becomes "processable". Here are some situations where a task becomes processable:

- Task is unassigned from another TaskExecutor.
- Task state is changed (should only happen inside when a task is locked inside the polling phase).
- When tasks are unlocked.
- When tasks are added.
- New records available.
- A task is resumed.

So in summary, we

- We should probably lock tasks when they are paused and unlock them when they are resumed. We should also wake the task executors after every polling phase. This belongs to the StreamThread integration work (separate PR). We add DefaultTaskManager.signalProcessableTasks for this.
- We need to awake the task executors in DefaultTaskManager.unassignTask, DefaultTaskManager.unlockTasks and DefaultTaskManager.add.


Reviewers: Walker Carlson <wcarlson@confluent.io>, Bruno Cadonna <cadonna@apache.org>
2023-09-11 09:58:20 +02:00
Lucas Brutschy ee036ed9ef
KAFKA-15319: Upgrade rocksdb to fix CVE-2022-37434 (#14216)
Rocksdbjni<7.9.2 is vulnerable to CVE-2022-37434 due to zlib 1.2.12

Reviewers: Divij Vaidya <diviv@amazon.com>, Bruno Cadonna <cadonna@apache.org>
2023-08-18 18:31:27 +02:00
Christo Lolov 7ecf5183dd
KAFKA-14661: Upgrade Zookeeper to 3.8.1 (#13260)
Reviewers: Divij Vaidya <diviv@amazon.com>, Mickael Maison <mickael.maison@gmail.com>
2023-08-01 16:10:39 +02:00
Divij Vaidya 353141ed92
KAFKA-15251: Add 3.5.1 to system tests (#14069)
Reviewers: Matthias J. Sax <matthias@confluent.io>
2023-07-27 12:33:34 +02:00
Said Boudjelda 4d30cbf3cd
MINOR: Upgrade the minor version of snappy dependency to 1.1.10.3 (#14072)
Reviewers: Divij Vaidya <diviv@amazon.com>
2023-07-26 11:21:36 +02:00
Said Boudjelda e9fc742979
KAFKA-15222: upgrade zinc scala plugin to 1.9.2 (#14060)
Reviewers: Divij Vaidya <diviv@amazon.com>
2023-07-21 10:42:47 +02:00
Greg Harris 844469311a
KAFKA-10579: Upgrade reflections from 0.9.12 to 0.10.2 (#14029)
Reviewers: Divij Vaidya <diviv@amazon.com>, Chris Egerton <chris.egerton@aiven.io>
2023-07-19 14:00:15 -07:00
Said Boudjelda 2999168cde
MINOR: Upgrade Gradle wrapper version to 8.2.1 (#14032)
Reviewers: Divij Vaidya <diviv@amazon.com>
2023-07-19 09:39:29 +02:00
Mickael Maison 354db26b95
MINOR: Add 3.5.0 and 3.4.1 to system tests (#13849)
Reviewers: Luke Chen <showuon@gmail.com>
2023-07-12 10:11:44 +02:00
ezio 6afcfba9f3
KAFKA-15159: upgrade minor dependencies (#13982)
Reviewers: Divij Vaidya <diviv@amazon.com>

---------

Co-authored-by: Damon Xie <damon.xie@zoom.us>
2023-07-11 10:39:39 +02:00
Ismael Juma 1f4cbc5d53
MINOR: Add JDK 20 CI build and remove some branch builds (#12948)
It's good for us to add support for Java 20 in preparation for Java 21 - the next LTS.

Given that Scala 2.12 support has been deprecated, a Scala 2.12 variant is not included.

Also remove some branch builds that add load to the CI, but have
low value: JDK 8 & Scala 2.13 (JDK 8 support has been deprecated),
JDK 11 & Scala 2.12 (Scala 2.12 support has been deprecated) and
JDK 17 & Scala 2.12 (Scala 2.12 support has been deprecated).

A newer version of Mockito (4.9.0 -> 4.11.0) is required for Java 20 support, but we
only use it with Scala 2.13+ since it causes compilation errors with Scala 2.12. Similarly,
we upgrade easymock when the Java version is 16 or newer as it's incompatible
with powermock (which doesn't support Java 16 or newer).

Filed KAFKA-15117 for a test that fails with Java 20 (SslTransportLayerTest.testValidEndpointIdentificationCN).

Finally, fixed some lossy conversions that were added after #13582 was submitted.

Reviewers: Ismael Juma <ismael@juma.me.uk>
2023-06-30 01:12:00 -07:00
Divij Vaidya 88e784f7c6
KAFKA-15084: Remove lock contention from RemoteIndexCache (#13850)
Use thread safe Caffeine to cache indexes fetched from RemoteTier locally. This PR removes a lock contention that led to higher fetch latencies as the IO threads spent time unnecessarily waiting on global cache lock while a single thread fetches the index from remote tier. See PR #13850 for details and rejected alternatives.

Reviewers: Luke Chen <showuon@gmail.com>, Satish Duggana <satishd@apache.org>
2023-06-21 18:22:49 +02:00
Ismael Juma dfaae317b8
MINOR: Upgrade Scala for Java 20/21 support (#13840)
Upgrade to Scala 2.13.11 and Scala 2.12.18. A minor test change was required
to fix compilation with Scala 2.13.11.

Scala 2.13 release notes:
* https://github.com/scala/scala/releases/tag/v2.13.11

Scala 2.12 release notes:
* https://github.com/scala/scala/releases/tag/v2.12.16
* https://github.com/scala/scala/releases/tag/v2.12.17
* https://github.com/scala/scala/releases/tag/v2.12.18

Reviewers: Justine Olshan <jolshan@confluent.io>, Josep Prat <josep.prat@aiven.io>
2023-06-20 10:29:23 -07:00
Manyanda Chitimbo 958b41b27a
KAFKA-15096: Update snappy-java to 1.1.10.1 (#13865)
The release notes are available at https://github.com/xerial/snappy-java/releases/tag/v1.1.10.1

Reviewers:  Divij Vaidya <diviv@amazon.com>, Josep Prat <josep.prat@aiven.io>
2023-06-19 10:35:49 +02:00
Mickael Maison 115a033e3c
MINOR: Update LICENSE-binary following snappy upgrade (#13791)
Reviewers: Luke Chen <showuon@gmail.com>
2023-06-01 11:17:54 +02:00
David Mao f9b2b3a047
Upgrade to snappy v1.1.10.0 (#13786)
Snappy v1.1.9.1 has some issues around arm compatibility and glibc library versions shipped by default with certain OS distributions. Snappy v1.1.10.0 uses a glibc LTS version, see: xerial/snappy-java#417 xerial/snappy-java#440

Reviewers: Justine Olshan <jolshan@confluent.io>
2023-05-31 14:46:00 -07:00
atu-sharm fa7818dff5
KAFKA-14994: jose4j is vulnerable to CVE- Improper Cryptographic Algorithm (#13717)
Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>
2023-05-13 12:42:57 +05:30
Divij Vaidya f578b38f31
MINOR: Update dependencies (minor versions only) (#13673)
All dependency upgrades in the PR are minor upgrades with backward compatible changes. Note that no major version for dependencies have been changed to make it a low risk change. No code changes are required for any of these dependencies.

Reviewers: Luke Chen <showuon@gmail.com>
2023-05-12 17:47:50 +08:00
Divij Vaidya 6bcc497c36
KAFKA-14766: Improve performance of VarInt encoding and decoding (#13312)
Motivation

Reading/writing the protocol buffer varInt32 and varInt64 (also called varLong in our code base) is in the hot path of data plane code in Apache Kafka. We read multiple varInt in a record and in long. Hence, even a minor change in performance could extrapolate to larger performance benefit.

In this PR, we only update varInt32 encoding/decoding.
Changes

This change uses loop unrolling and reduces the amount of repetition of calculations. Based on the empirical results from the benchmark, the code has been modified to pick up the best implementation.
Results

Performance has been evaluated using JMH benchmarks on JDK 17.0.6. Various implementations have been added in the benchmark and benchmarking has been done for different sizes of varints and varlongs. The benchmark for various implementations have been added at ByteUtilsBenchmark.java

Reviewers: Ismael Juma <mlists@juma.me.uk>, Luke Chen <showuon@gmail.com>, Alexandre Dupriez <alexandre.dupriez@gmail.com>
2023-05-05 20:05:20 +08:00
Said Boudjelda a7d0b3f753
MINOR: Upgrade gradle to 8.1.1 (#13625)
Also upgrade gradle plugins:
 - `org.owasp.dependencycheck` gradle plugin to version `8.2.1`
 - `com.github.johnrengelman.shadow gradle` plugin to version `8.1.1`

Gradle release notes:
* https://docs.gradle.org/8.1.1/release-notes.html

Reviewers: Ismael Juma <ismael@juma.me.uk>
2023-04-25 14:31:04 -07:00
Matthew de Detrich 809966a9a0
KAFKA-13299: Accept duplicate listener on port for IPv4/IPv6 (#11478)
Loosens the validation so that Kafka can accept duplicate listeners on the same port but if and only if the listeners are valid IP addresses with one address being an IPv4 address and the other being an IPv6 address.

Reviewers: Josep Prat <jlprat@apache.org>, Luke Chen <showuon@apache.org>
2023-04-19 20:54:07 +02:00
Ron Dagostino e27926f92b
KAFKA-14735: Improve KRaft metadata image change performance at high … (#13280)
topic counts.

Introduces the use of persistent data structures in the KRaft metadata image to avoid copying the entire TopicsImage upon every change.  Performance that was O(<number of topics in the cluster>) is now O(<number of topics changing>), which has dramatic time and GC improvements for the most common topic-related metadata events.  We abstract away the chosen underlying persistent collection library via ImmutableMap<> and ImmutableSet<> interfaces and static factory methods.

Reviewers: Luke Chen <showuon@gmail.com>, Colin P. McCabe <cmccabe@apache.org>, Ismael Juma <ismael@juma.me.uk>, Purshotam Chauhan <pchauhan@confluent.io>
2023-04-17 17:52:28 -04:00
Ismael Juma 9c12e46210
Update zstd to 1.5.5 (#13567)
1.5.4 is a large release that offers significant performance improvements across
multiple scenarios, as well as new features.

1.5.5 is a smaller release that corrects a rare corruption bug and improves performance
in some scenarios.

It looks like 1.5.3 was retracted or never released.

Zstandard release notes:
* 1.5.4: https://github.com/facebook/zstd/releases/tag/v1.5.4
* 1.5.5: https://github.com/facebook/zstd/releases/tag/v1.5.5

zstd-jni diff: https://github.com/luben/zstd-jni/compare/v1.5.2-1...v1.5.5-1

Reviewers: Rajini Sivaram <rajinisivaram@googlemail.com>, Divij Vaidya <diviv@amazon.com>
2023-04-15 12:30:22 -07:00
Chris Egerton e49a5a265f
KAFKA-14783 (KIP-875): New STOPPED state for connectors (#13424)
Reviewers: Mickael Maison <mickael.maison@gmail.com>, Yash Mayya <yash.mayya@gmail.com>, Greg Harris <gharris1727@gmail.com>
2023-04-11 09:37:26 -04:00
Spacrocket 71ca8ef4ec
KAFKA-14722: Make BooleanSerde public (#13382)
KAFKA-14722: Make BooleanSerde public (#13328)

Addition of boolean serde
https://cwiki.apache.org/confluence/display/KAFKA/KIP-907%3A+Add+Boolean+Serde+to+public+interface

During the task KAFKA-14491 Victoria added BooleanSerde class, It will be useful to have such class in public package.

Reviewers: Walker Carlson <wcarlson@confluent.io>, Lucas Brutschy <lbrutschy@confluent.io>, Divij Vaidya <diviv@amazon.com>
2023-03-24 10:41:51 -05:00
Juan José Ramos 2092153d7f
KAFKA-14800: Bump snappy-java version to 1.1.9.1 (#13385)
Reviewers: Mickael Maison <mickael.maison@gmail.com>, Divij Vaidya <diviv@amazon.com>
2023-03-24 16:27:06 +01:00
Mickael Maison ccfc389a63
KAFKA-14804: Update swagger plugin/dependencies to 2.2.8 (#13388)
Reviewers: David Arthur <mumrah@gmail.com>
2023-03-14 12:06:12 +01:00
Dejan Stojadinović e348da4095
MINOR: Update gradle to 8.0.2 and update several gradle plugins (#13339)
Also removed workaround from `build.gradle` that is no longer required after
the update to Gradle 8.0.2.

Related links:
 - zinc release notes:   https://github.com/sbt/zinc/releases/tag/v1.8.0
 - gradle release notes: https://github.com/gradle/gradle/releases/tag/v8.0.2
 - gradle diff:          https://github.com/gradle/gradle/compare/v8.0.1...v8.0.2

plugins version upgrade details:
 - 'com.github.ben-manes.versions'              0.44.0 -> 0.46.0
 - 'org.owasp.dependencycheck'                     8.0.2 -> 8.1.2
 - 'io.swagger.core.v3.swagger-gradle-plugin' 2.2.0 -> 2.2.8
 - 'org.gradle.test-retry'                                    1.5.1 -> 1.5.2
 - 'com.github.johnrengelman.shadow'           7.1.2 -> 8.1.0

Reviewers: Ismael Juma <ismael@juma.me.uk>
2023-03-04 22:25:00 -08:00
Dejan Stojadinović 72dd401e51
KAFKA-14680: Upgrade gradle version from 7.6 to 8.0.1 (#13205)
Details:
 * gradle upgrade: 7.6 -> 8.0.1
 * spotbugs plugin upgrade: 5.0.9 -> 5.0.13
 * tweaked the mechanics for `-release`/`-source`/`-target` to workaround idiosyncrasies in Gradle 8.0.1 and newer Scala 2.13 versions.
 * streams-scala `test` task no longer triggers the `spotless` task since a newer version is required for Gradle 8 support, but the newer version requires Java 11.
Note: relates to #5479

Gradle upgrade highlights:
* "Scala Incremental Compilation for Multi-Module projects broken in 7.x": https://github.com/gradle/gradle/issues/20101
* "Incremental compilation of java modules is broken with Gradle 7.6": https://github.com/gradle/gradle/issues/23067

Full release notes: https://docs.gradle.org/8.0/release-notes.html

Reviewers: Ismael Juma <ismael@juma.me.uk>
2023-02-23 19:13:43 -08:00
Ron Dagostino cbd46160e9
KAFKA-14731: Upgrade ZooKeeper to 3.6.4 (#13273)
Reviewers: Colin Patrick McCabe <cmccabe@apache.org>
2023-02-21 08:37:48 -05:00
Victoria Xia dcaf95a35f
KAFKA-14491: [8/N] Add serdes for ValueAndTimestamp with null value (#13249)
Introduces a new Serde, that serializes a value and timestamp as a single byte array, where the value may be null (in order to represent putting a tombstone with timestamp into the versioned store).

Part of KIP-889.

Reviewers: Matthias J. Sax <matthias@confluent.io>
2023-02-15 18:07:47 -08:00
Ismael Juma 031d0ff1ba
MINOR: Update build and test dependencies for 3.5 (#13199)
The most recent version that didn't cause compiler or test errors was chosen.

Gradle plugin updates follow, they include minor fixes and support
for newer Java and Gradle versions:

- spotless: 6.10.0 -> 6.13.0
- versions: 0.42.0 -> 0.44.0
- dependencycheck: 7.1.1 -> 8.0.2
- rat: 0.7.1 -> 0.8.0
- spotbugs: 5.0.9 -> 5.0.13
- test-retry: 1.4.0 -> 1.5.1
- scoverage: 7.0.0 -> 7.0.1

Test/benchmark updates:

- jmh: 1.35 -> 1.36
GC profiler and perfasm improvements
https://mail.openjdk.org/pipermail/jmh-dev/2022-November/003553.html

- junit: 5.9.0 -> 5.9.2
Minor fixes
https://junit.org/junit5/docs/current/release-notes/index.html#release-notes-5.9.2

- jqwik: 1.6.5 -> 1.7.2
A number of usability improvements, bug fixes and minor breaking changes
https://jqwik.net/release-notes.html#172

- mockito: 4.6.1 -> 4.9.0
Usability improvements, perf fixes and bug fixes
https://github.com/mockito/mockito/releases/tag/v4.7.0
https://github.com/mockito/mockito/releases/tag/v4.8.0
https://github.com/mockito/mockito/releases/tag/v4.8.1
https://github.com/mockito/mockito/releases/tag/v4.9.0

Reviewers: Stanislav Kozlovski <stanislav_kozlovski@outlook.com>, Luke Chen <showuon@gmail.com>
2023-02-09 15:16:39 +01:00
Satish Duggana 1d3fb76092
KAFKA-14688 Move package org.apache.kafka.server.log.internals to org.apache.kafka.storage.internals.log (#13213)
Reviewers: Ismael Juma <ismael@juma.me.uk>
2023-02-08 09:22:42 +05:30
Ismael Juma 8ac644d2b1
KAFKA-14607: Move Scheduler/KafkaScheduler to server-common (#13092)
There were some concurrency inconsistencies in `KafkaScheduler` flagged by spotBugs
that had to be fixed, summary of changes below:
* Executor is `volatile`
* We always synchronize and check `isStarted` as the first thing within the critical
   section when a mutating operation is performed.
* We don't synchronize (but ensure the executor is not null in a safe way) in read-only
   operations that operate on the executor.

With regards to `MockScheduler/MockTask`:
* Set the type of `nextExecution` to `AtomicLong` and replaced inconsistent synchronization
* Extracted logic into `MockTask.rescheduleIfPeriodic`

Tweaked the `Scheduler` interface a bit:
* Removed `unit` parameter since we always used `ms` except one invocation
* Introduced a couple of `scheduleOnce` overloads to replace the usage of default
   arguments in Scala
* Pulled up `resizeThreadPool` to the interface and removed `isStarted` from the
  interface.

Other cleanups:
* Removed spotBugs exclusion affecting `kafka.log.LogConfig`, which no longer exists.

For broader context, see:
* KAFKA-14470: Move log layer to storage module

Reviewers: Jun Rao <junrao@gmail.com>
2023-01-10 23:51:58 -08:00
José Armando García Sancio 896573f9bc
KAFKA-14279: Add 3.3.x streams system tests (#13077)
Reviewers: Matthias J. Sax <matthias@confluent.io>
2023-01-09 23:37:05 -08:00
Brendan Ribera b8ab09820c
KAFKA-14564: Upgrade netty to 4.1.86 to address CVE-2022-41881, CVE-2022-41915 (#13070)
For KAFKA-14564: upgrade to Netty 4.1.86

Fixes the following:

    CVE-2022-41881
    CVE-2022-41915

Reviewers: Luke Chen <showuon@gmail.com>
2023-01-04 16:55:05 +08:00
Ismael Juma e8232edd24
KAFKA-14477: Move LogValidator and related to storage module (#13012)
Also improved `LogValidatorTest` to cover a bug that was originally
only caught by `LogAppendTimeTest`.

For broader context on this change, please check:

* KAFKA-14470: Move log layer to storage module

Reviewers: Jun Rao <junrao@gmail.com>
2022-12-21 16:57:02 -08:00
Ismael Juma d521f8110e
KAFKA-14473: Move AbstractIndex to storage module (#13007)
For broader context on this change, please check:

* KAFKA-14470: Move log layer to storage module

Reviewers: Jun Rao <junrao@gmail.com>, Satish Duggana <satishd@apache.org>
2022-12-19 19:33:24 -08:00
Patrik Marton 1c10d107fe
KAFKA-14293: Basic Auth filter should set the SecurityContext after a successful login (#12846)
Reviewers: Greg Harris <greg.harris@aiven.io>, Chris Egerton <chrise@aiven.io>
2022-12-05 09:38:40 -05:00
Matthew de Detrich 6ae08c4ee8
KAFKA-14256: Upgrade from Scala 2.13.8 to 2.13.10 (#12675)
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>
2022-12-04 21:02:43 -08:00
Ismael Juma 8d65271a0b
MINOR: Update Gradle to 7.6 (#12918)
The highlights are:
* Support for Java 19
* Support for incremental compilation following a compilation failure
* Flag for individual task rerun (eg "gradle test --rerun")
* Re-use Scala compiler between runs (will be enabled via #12280)

Release notes: https://docs.gradle.org/7.6/release-notes.html

Also adjusted the directory used by `retry_zinc` for the build output from
`build` to `logs` as `gradlew clean` was causing unintended deletion of
the file used by that tool to decide if a retry is required.

Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>
2022-11-30 05:25:56 -08:00
Pratim SC 795390a3c8
KAFKA-14320: Updated Jackson to version 2.13.4 for fixing CVE-2022-42004 (#12840)
* Updated Jackson to version 2.13.4 for fixing CVE-2022-42004, CVE-2020-36518
* Updated Jackson data bind to version 2.13.4.2 for fixing CVE-2022-42004

Co-authored-by: Pratim SC <pratim.sunilkumar.chaudhuri@mercer.com>

 Reviewers: Luke Chen <showuon@gmail.com>, Manikumar Reddy <manikumar.reddy@gmail.com>
2022-11-18 23:28:49 +05:30
Christo Lolov 876c338a60
[KAFKA-14324] Upgrade RocksDB to 7.1.2 (#12809)
Reviewers: Bruno Cadonna <cadonna@confluent.io>, Anna Sophie Blee-Goldman <ableegoldman@apache.org>
2022-11-11 17:48:38 -08:00
Manikumar Reddy 09b8d511f8
MINOR: Upgrade spotbugs dependency (#12768)
Reviewers: Ismael Juma <ismael@juma.me.uk>
2022-10-24 23:11:31 +05:30
José Armando García Sancio 5c5dcb7a96
MINOR; Use 3.3.1 release for system test (#12714)
The following files are available in https://s3-us-west-2.amazonaws.com/kafka-packages/:

kafka-streams-3.3.1-test.jar
kafka_2.12-3.3.1.tgz
kafka_2.13-3.3.1.tgz

Reviewers: Colin P. McCabe <cmccabe@apache.org>
2022-10-04 16:19:24 -07:00
Kirk True 8e43548175
KAFKA-13725: KIP-768 OAuth code mixes public and internal classes in same package (#12039)
* KAFKA-13725: KIP-768 OAuth code mixes public and internal classes in same package

Move classes into a sub-package of "internal" named "secured" that
matches the layout more closely of the "unsecured" package.

Replaces the concrete implementations in the former packages with
sub-classes of the new package layout and marks them as deprecated. If
anyone is already using the newer OAuth code, this should still work.

* Fix checkstyle and spotbugs violations

Co-authored-by: Kirk True <kirk@mustardgrain.com>

Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>
2022-09-23 13:15:15 +05:30
Manikumar Reddy 3e8e082fab MINOR: Bump latest 2.8 version to 2.8.2 2022-09-19 17:18:47 +05:30
Tom Bentley 352c71ffb5
MINOR: Update release versions for upgrade tests with 3.0.2, 3.1.2, 3.2.3 release (#12661)
Updates release versions in files that are used for upgrade test with the 3.0.2, 3.1.2, 3.2.3 release version.
2022-09-19 17:13:40 +05:30
Matthew de Detrich e138772ba5
MINOR: Update Scalafmt to latest version (#12475)
Reviewers: Divij Vaidya <diviv@amazon.com>, Chris Egerton <fearthecellos@gmail.com>
2022-09-12 10:05:15 -04:00
Ismael Juma 3494d6eea3
MINOR: Upgrade gradle to 7.5.1 and bump other build/test dependencies (#12495)
Gradle 7.5.1:
* Important bug fixes including https://github.com/gradle/gradle/issues/21400
* Release notes: https://docs.gradle.org/7.5.1/release-notes.html

JUnit 5.9.0
* Support for open test reporting and configurable thread mode for @Timeout
* Release notes: https://junit.org/junit5/docs/current/release-notes/index.html#release-notes-5.9.0

test-retry-gradle-plugin 1.4.0
* Support for Gradle 7.6 and minor fixes
* Release notes:
  * https://github.com/gradle/test-retry-gradle-plugin/releases/tag/v1.3.2
  * https://github.com/gradle/test-retry-gradle-plugin/releases/tag/v1.4.0

spotbugs-gradle-plugin
* Minor fixes
* Release notes:
  * https://github.com/spotbugs/spotbugs-gradle-plugin/releases/tag/5.0.7
  * https://github.com/spotbugs/spotbugs-gradle-plugin/releases/tag/5.0.8
  * https://github.com/spotbugs/spotbugs-gradle-plugin/releases/tag/5.0.9
 
dependency-check-gradle-plugin
* Minor improvements and false positive fixes
* Release notes:
  * https://github.com/jeremylong/DependencyCheck/releases/tag/v7.0.4
  * https://github.com/jeremylong/DependencyCheck/releases/tag/v7.1.0

rat-gradle-plugin
* Minor fixes
* Diff: https://github.com/eskatos/creadur-rat-gradle/compare/v0.7.0...v0.7.1

Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>
2022-08-10 06:07:54 -07:00
Dalibor Plavcic eeee8e206b
MINOR: Upgrade mockito test dependencies (#12460)
## Changes
- **mockito: 4.4.0 -> 4.6.1** (https://github.com/mockito/mockito/releases)
Most important updates:
  - Fixes https://github.com/mockito/mockito/issues/2648 : Add support for customising strictness via @mock annotation and MockSettings https://github.com/mockito/mockito/pull/2650

## Why is this change needed?

According to the [Mockito documentation](https://javadoc.io/doc/org.mockito/mockito-core/latest/org/mockito/Mockito.html#when(T)) :
> Although it is possible to verify a stubbed invocation, usually it's just redundant. Let's say you've stubbed foo.bar(). If your code cares what foo.bar() returns then something else breaks(often before even verify() gets executed). If your code doesn't care what get(0) returns then it should not be stubbed. 

While working on the [Replace EasyMock and PowerMock with Mockito for StreamsMetricsImplTest ](https://issues.apache.org/jira/browse/KAFKA-12947) I noticed that described behavior wasn't applied when you create a new `mock` like this.

```java
        final Metrics metrics = mock(Metrics.class);
        when(metrics.metric(metricName)).thenReturn(null);

        ... invoke SUT

        verify(metrics).metric(metricName); // this should be redundant (according to docs)

```

After further investigation I figured out that described behaviour wasn't implemented until`v4.6.1`.

With this change we are now able to mock objects like this:

```java
   Foo explicitStrictMock = mock(Foo.class, withSettings().strictness(Strictness.STRICT_STUBS));
```
- link to docs: [MockSettings.html#strictness](https://javadoc.io/static/org.mockito/mockito-core/4.6.1/org/mockito/quality/Strictness.html#STRICT_STUBS)

It looks like I can accomplish the same thing by using the `@RunWith(MockitoJUnitRunner.StrictStubs.class)
` instead of the `@RunWith(MockitoJUnitRunner.class)` so mockito dependency version update is not mandatory, but it would be nice to stay up-to-date and use the latest version (it's up to MR reviewer to decide if we are going to merge this now, or just close the MR and update mockito version later).

Reviewers: Ismael Juma <ismael@juma.me.uk>
2022-08-09 10:08:57 -07:00
Andrew Borley fdc19fbe21
KAFKA-14107: Upgrade Jetty version for CVE fixes (#12440)
Reviewers: Mickael Maison <mickael.maison@gmail.com>, Aaron Freeland <afreeland@gmail.com>
2022-08-05 23:29:04 +02:00
Ismael Juma 348474e2ae
MINOR: Upgrade to Gradle 7.5 (#12413)
Highlights:
* The default Scala Zinc version was updated from 1.3.5 to 1.6.1
* Multiple Checkstyle tasks may now run in parallel within a project
* Support for Java 18
* Much more responsive continuous builds on Windows and macOS
* Improved diagnostics for dependency resolution

Some of our tests require java.util and java.lang modules to be open,
so do it explicitly given the following Gradle bug fix:

> When running on Java 9+, Gradle no longer opens the java.base/java.util
> and java.base/java.lang JDK modules for all Test tasks. In some cases,
> this would cause code to pass during testing but fail at runtime.

Release notes: https://docs.gradle.org/7.5/release-notes.html

Reviewers:  Manikumar Reddy <manikumar.reddy@gmail.com>, Luke Chen <showuon@gmail.com>
2022-07-26 05:58:50 -07:00
Thomas Cooper aa735062eb
Upgrade Netty and Jackson versions for CVE fixes [KAFKA-14044] (#12376)
Reviewers: Luke Chen <showuon@gmail.com>
2022-07-05 14:16:18 +08:00
Bruno Cadonna 4d53dd9972
KAFKA-13930: Add 3.2.0 Streams upgrade system tests (#12209)
* KAFKA-13930: Add 3.2.0 Streams upgrade system tests

Apache Kafka 3.2.0 was recently released. Now we need
to test upgrades from 3.2 to trunk in our system tests.

Reviewer: Bill Bejeck <bbejeck@apache.org>
2022-06-21 16:33:40 +02:00
Chris Egerton 9e8ef8bb31
KAFKA-10000: Exactly-once source tasks (#11780)
Reviewers: Mickael Maison <mickael.maison@gmail.com>, Tom Bentley <tbentley@redhat.com>
2022-06-13 16:25:29 +02:00
Chris Egerton 6853d63e4d
KAFKA-10000: Zombie fencing logic (#11779)
Reviewers: Mickael Maison <mickael.maison@gmail.com>

, Tom Bentley <tbentley@redhat.com>
2022-06-10 14:35:35 +02:00
Mickael Maison 4a06458633
KAFKA-13780: Generate OpenAPI file for Connect REST API (#12067)
New gradle task `connect:runtime:genConnectOpenAPIDocs` that generates `connect_rest.yaml` under `docs/generated`.
This task is executed when `siteDocsTar` runs.
2022-06-10 11:35:22 +02:00
Tom Bentley 467bce04ae
MINOR: Update release versions for upgrade tests with 3.1.1 release (#12156)
Updates release versions in files that are used for upgrade test with the 3.1.1 release version.

Reviewers: Bruno Cadonna <bruno@confluent.io>
2022-05-13 09:32:41 +01:00
Bruno Cadonna 020ff2fe0e
MINOR: Update release versions for upgrade tests with 3.2.0 release (#12143)
Updates release versions in files that are used for upgrade test with the 3.2.0 release version.  

Reviewer: David Jacot <djacot@confluent.io>
2022-05-10 14:47:46 +02:00
Ismael Juma b964c07a68
MINOR: Upgrade build and test dependencies (#11984)
* gradle: 7.3.3 -> 7.4.2
  Configuration cache improvements and several other improvements.
  https://docs.gradle.org/7.4.2/release-notes.html
* dependencycheck gradle plugin: 6.5.3 -> 7.0.3
  Minor fixes.
* spotbugs gradle plugin: 5.0.5 -> 5.0.6
  Minor fixes.
  https://github.com/spotbugs/spotbugs-gradle-plugin/releases/tag/5.0.6
* jmh: 1.34 -> 1.35
  Fixes and profiler improvements.
  https://mail.openjdk.java.net/pipermail/jmh-dev/2022-March/003422.html
* jqwik: 1.6.3 -> 1.6.5
  Various tweaks and some breaking changes that don't seem to affect us.
  https://github.com/jlink/jqwik/releases/tag/1.6.4
  https://github.com/jlink/jqwik/releases/tag/1.6.5
* mockito: 4.3.1 -> 4.4.0
  Add feature to verify static methods calls in order and minor fixes/improvements.
  https://github.com/mockito/mockito/releases/tag/v4.4.0

Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>
2022-04-06 07:27:03 -07:00
Mike Lothian ecb0e8eece
KAFKA-13660: Switch log4j12 to reload4j (#11743)
This bumps the slf4j version to 1.7.36 and swaps out log4j 1.2.17 with
reload4j 1.2.19

Signed-off-by: Mike Lothian <mike@fireburn.co.uk>

Reviewers: Luke Chen <showuon@gmail.com>, Ismael Juma <ismael@juma.me.uk>, Bruno Cadonna <cadonna@apache.org>
2022-03-30 20:54:01 +02:00
Edwin 76ca62a396
KAFKA-13775: CVE-2020-36518 - Upgrade jackson-databind to 2.12.6.1 (#11962)
CVE-2020-36518 vulnerability affects jackson-databind (see GHSA-57j2-w4cx-62h2).

Upgrading to jackson-databind version 2.12.6.1 addresses this CVE.

Reviewers: Luke Chen <showuon@gmail.com>, Bruno Cadonna <cadonna@apache.org>
2022-03-30 20:36:34 +02:00
Bruno Cadonna 3904652b3e
Upgrade RocksDB from 6.27.3 to 6.29.4.1 (#11967)
RocksDB 6.27.3 does not run on arm64 M1 Macs which would prevent people on this platform to run Kafka Streams. Thus, this PR upgrades RocksDB to 6.29.4.1 which contains the following fix to allow to run RocksDB on arm64 M1 Macs:

facebook/rocksdb#7720

The source compatibility report between 6.27.3 and 6.29.4.1 (attached to the ticket) reports a couple of incompatibilities. However, the incompatibilities do not seem to affect Kafka Streams' backwards compatibility.

    The changes to class RocksDB only apply when inheriting from RocksDB. RocksDB is not exposed to users in Streams.
    The changes to class WriteBatch and class WriteBatchInterface also only apply with inheritance. Both classes are not exposed to users in Streams.
    -The change to enum SanityLevel seem also not to apply to Streams since SanityLevel is only used in ConfigOptions which is only used to load options from files and properties objects. Loading options from files or properties is not exposed to users in Streams.

Reviewers: Bill Bejeck <bbejeck@apache.org>, Matthias J. Sax <mjsax@apache.org>, A. Sophie Blee-Goldman <ableegoldman@apache.org>
2022-03-30 14:04:47 +02:00
Mickael Maison 1783fb14df
MINOR: Bump latest 3.0 version to 3.0.1 (#11885)
Reviewers: Matthias J. Sax <mjsax@apache.org>
2022-03-16 11:43:37 +01:00
Mickael Maison 029a14b530
KAFKA-13510: Connect APIs to list all connector plugins and retrieve their configs (#11572)
Implements KIP-769: https://cwiki.apache.org/confluence/display/KAFKA/KIP-769%3A+Connect+APIs+to+list+all+connector+plugins+and+retrieve+their+configuration+definitions

Reviewers: Tom Bentley <tbentley@redhat.com>, Chris Egerton <fearthecellos@gmail.com>
2022-03-03 14:28:50 +01:00
Ismael Juma 7c2d672413
MINOR: Update library dependencies (Q1 2022) (#11306)
- scala 2.13: 2.13.6 -> 2.13.8
  * Support Java 18 and improve Android compatibility
  * https://www.scala-lang.org/news/2.13.7
  * https://www.scala-lang.org/news/2.13.8
- scala 2.12: 2.12.14 -> 2.12.15. 
  * The `-release` flag now works with Scala 2.12, backend parallelism
    can be enabled via `-Ybackend-parallelism N` and string interpolation
    is more efficient.
  * https://www.scala-lang.org/news/2.12.5
- gradle versions plugin: 0.38.0 -> 0.42.0
  * Minor fixes
  * https://github.com/ben-manes/gradle-versions-plugin/releases/tag/v0.40.0
  * https://github.com/ben-manes/gradle-versions-plugin/releases/tag/v0.41.0
  * https://github.com/ben-manes/gradle-versions-plugin/releases/tag/v0.42.0
- gradle dependency check plugin: 6.1.6 -> 6.5.3
  * Minor fixes
- gradle spotbugs plugin: 4.7.1 -> 5.0.5
  * Fixes and minor improvements
  * There were too many releases to include all the links, include the major version bump
  * https://github.com/spotbugs/spotbugs-gradle-plugin/releases/tag/5.0.0
- gradle scoverage plugin: 5.0.0 -> 7.0.0
  * Support newer Gradle versions and other improvements
  * https://github.com/scoverage/gradle-scoverage/releases/tag/6.0.0
  * https://github.com/scoverage/gradle-scoverage/releases/tag/6.1.0
  * https://github.com/scoverage/gradle-scoverage/releases/tag/7.0.0
- gradle shadow plugin: 7.0.0 -> 7.1.2
  * Support gradle toolchains and security fixes
  * https://github.com/johnrengelman/shadow/releases/tag/7.1.0
  * https://github.com/johnrengelman/shadow/releases/tag/7.1.1
  * https://github.com/johnrengelman/shadow/releases/tag/7.1.2
- bcpkix: 1.66 -> 1.70
  * Several improvements and fixes
  * https://www.bouncycastle.org/releasenotes.html
- jline: 3.12.1 -> 3.21.0
  * Various fixes and improvements
- jmh: 1.32 -> 1.34
  * Compiler blackhole enabled by default when using Java 17 and improved
    gradle incremental compilation
  * https://mail.openjdk.java.net/pipermail/jmh-dev/2021-August/003355.html
  * https://mail.openjdk.java.net/pipermail/jmh-dev/2021-December/003406.html
- scalaLogging: 3.9.3 -> 3.9.4
  * Support for Scala 3.0
- jose4j: 0.7.8 -> 0.7.9
  * Minor fixes
- junit: 5.7.1 -> 5.8.2
  * Minor improvements and fixes
  * https://junit.org/junit5/docs/current/release-notes/index.html#release-notes-5.8.0
  * https://junit.org/junit5/docs/current/release-notes/index.html#release-notes-5.8.1
  * https://junit.org/junit5/docs/current/release-notes/index.html#release-notes-5.8.2
- jqwik: 1.5.0 -> 1.6.3
  * Numerous improvements
  * https://github.com/jlink/jqwik/releases/tag/1.6.0
- mavenArtifact: 3.8.1 -> 3.8.4
- mockito: 3.12.4 -> 4.3.1
  * Removed deprecated methods, `DoNotMock` annotation and
    minor fixes/improvements
  * https://github.com/mockito/mockito/releases/tag/v4.0.0
  * https://github.com/mockito/mockito/releases/tag/v4.1.0
  * https://github.com/mockito/mockito/releases/tag/v4.2.0
  * https://github.com/mockito/mockito/releases/tag/v4.3.0
- scalaCollectionCompat: 2.4.4 -> 2.6.0
  * Minor fixes
  * https://github.com/scala/scala-collection-compat/releases/tag/v2.5.0
  * https://github.com/scala/scala-collection-compat/releases/tag/v2.6.0
- scalaJava8Compat: 1.0.0 -> 1.0.2
  * Minor changes
- scoverage: 1.4.1 -> 1.4.11
  * Support for newer Scala versions
- slf4j: 1.7.30 -> 1.7.32
  * Minor fixes, 1.7.35 automatically uses reload4j and 1.7.33/1.7.34
    cause build failures, so we stick with 1.7.32 for now.
- zstd: 1.5.0-4 -> 1.5.2-1
  * zstd 1.5.2
  * Small refinements and performance improvements
  * https://github.com/facebook/zstd/releases/tag/v1.5.1
  * https://github.com/facebook/zstd/releases/tag/v1.5.2

Checkstyle, spotBugs and spotless will be upgraded separately as they
either require non trivial code changes or they have regressions
that affect us.

Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>
2022-02-07 15:24:50 -08:00
Luke Chen 0ab36e8b10
KAFKA-13579: Patch upgrade of netty/jetty/jackson (#11656)
Reviewers: Ismael Juma <ismael@juma.me.uk
2022-02-02 14:21:25 -08:00
Josep Prat cc3d22cc3b
MINOR: Upgrade to Gradle 7.3.3 (#11518)
Updates Gradle to its newer version 7.3.3. This version includes the
following relevant features:
- Support for Java 17
- Support for Scala 3

For a further description of the release notes see:
https://docs.gradle.org/7.3.3/release-notes.html

I did the update as per the description in Gradle's release notes:
```
./gradlew wrapper --gradle-version=7.3.3
```

This means `gradlew` script is updated to the newest version.

Verified that `gradlewAll jar` and `gradlew releaseTarGz` still succeed.

Reviewers: Ismael Juma <ismael@juma.me.uk>
2022-02-02 05:47:05 -08:00
Jonathan Albrecht ec05f90a3d
KAFKA-13599: Upgrade RocksDB to 6.27.3 (#11690)
RocksDB v6.27.3 has been released and it is the first release to support s390x. RocksDB is currently the only dependency in gradle/dependencies.gradle without s390x support.

RocksDB v6.27.3 has added some new options that require an update to streams/src/main/java/org/apache/kafka/streams/state/internals/RocksDBGenericOptionsToDbOptionsColumnFamilyOptionsAdapter.java but no other changes are needed to upgrade.

I have run the unit/integration tests locally on s390x and also the :streams tests on x86_64 and they pass.

Reviewers: Luke Chen <showuon@gmail.com>, Bruno Cadonna <cadonna@apache.org>
2022-02-02 10:56:14 +01:00
David Jacot 4ceb2191e1
MINOR: Upgrade netty to 4.1.73.Final (#11706)
Changelog: https://github.com/netty/netty/issues?q=is%3Aclosed+milestone%3A4.1.73.Final

Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>
2022-01-24 17:08:03 +01:00
David Jacot 34208e8429
MINOR: Update files with 3.1.0 (#11698)
Reviewers: Bill Bejeck <bbejeck@apache.org>
2022-01-21 21:30:56 +01:00
David Jacot 3dd3f3ef03
MINOR: Upgrade jetty-server to 9.4.44.v20210927 (#11692)
Release notes: https://github.com/eclipse/jetty.project/releases/tag/jetty-9.4.44.v20210927

Reviewers: Rajini Sivaram <rajinisivaram@googlemail.com>
2022-01-20 14:14:44 +01:00
Bruno Cadonna 9e579587ac
MINOR: Bump version of grgit to 4.1.1 (#11561)
grgit 4.1.0 caused unsupported version error during gradle builds.
The reason was that grgit 4.1.0 uses always the latest JGit version
internally. Unfortunately, the latest JGit version was compiled with
a Java version later than Java 8 which caused the unsupported version
error during gradle builds for Java 8.

grgit 4.1.1 fixed this issue by upper bounding the version of JGrit
to a version that is still compiled with Java 8. Consequently, we can
remove the hotfix we merged in commit d1e0d2b474
and instead bump the grgit version from 4.1.0 to 4.1.1.

Reviewer: John Roesler <vvcephei@apache.org>
2021-12-07 18:24:43 +01:00
John Roesler 14c2449050
KAFKA-13491: IQv2 framework (#11557)
Implements the major part of the IQv2 framework as proposed in KIP-796.

Reviewers: Patrick Stuedi <pstuedi@apache.org>, Vicky Papavasileiou <vpapavasileiou@confluent.io>, Bruno Cadonnna <cadonna@apache.org>
2021-12-03 12:53:31 -06:00
Bruno Cadonna d1e0d2b474
HOTFIX: Set version of jgit to avoid unsupported version error (#11554)
A new version of JGit that is used by grgit that is used by gradle
causes the following error:

org/eclipse/jgit/storage/file/FileRepositoryBuilder has been compiled
by a more recent version of the Java Runtime (class file version 55.0),
this version of the Java Runtime only recognizes class file versions
up to 52.0

The reason is that version 6.0.0.202111291000-r of JGrit was compiled
with a newer Java version than Java 8, probably Java 11.

Explicitly setting the version of JGrit in gradle to 5.12.0.202106070339-r fixes
the issue.

Reviewers: David Jacot <djacot@confluent.io>, Ismael Juma <ismael@juma.me.uk>, Alexander Stohr, David Arthur <mumrah@gmail.com>
2021-11-30 18:42:41 +01:00
Kirk True 7b379539a5
KAFKA-13202: KIP-768: Extend SASL/OAUTHBEARER with Support for OIDC (#11284)
This task is to provide a concrete implementation of the interfaces defined in KIP-255 to allow Kafka to connect to an OAuth/OIDC identity provider for authentication and token retrieval. While KIP-255 provides an unsecured JWT example for development, this will fill in the gap and provide a production-grade implementation.

The OAuth/OIDC work will allow out-of-the-box configuration by any Apache Kafka users to connect to an external identity provider service (e.g. Okta, Auth0, Azure, etc.). The code will implement the standard OAuth client credentials grant type.

The proposed change is largely composed of a pair of AuthenticateCallbackHandler implementations: one to login on the client and one to validate on the broker.

See the following for more detail:

KIP-768
KAFKA-13202

Reviewers: Yi Ding <dingyi.zj@gmail.com>, Ismael Juma <ismael@juma.me.uk>, Jun Rao <junrao@gmail.com>
2021-10-28 11:36:53 -07:00
David Jacot 493280735b
MINOR: Bump latest 2.8 version to 2.8.1 (#11341)
Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>
2021-09-20 09:23:15 +02:00
Lee Dongjin c558d94c43
KAFKA-13294: Upgrade Netty to 4.1.68 (#11324)
Reviewers: Ismael Juma <ismael@juma.me.uk>
2021-09-17 05:34:37 -07:00
Bruno Cadonna 08d5840fba
KAFKA-13287: Upgrade RocksDB to 6.22.1.1 (#11317)
This commit upgrades RocksDB from 6.19.3 to 6.22.1.1

Reviewer: Anna Sophie Blee-Goldman <ableegoldman@apache.org>
2021-09-13 09:30:47 +02:00
Ismael Juma 49f7c824fa
MINOR: Upgrade compression libraries (#11303)
lz4-java: 1.7.1 -> 1.8.0

The most noteworthy change is the upgrade of the
underlying C library to 1.9.3. Details:

* https://github.com/lz4/lz4-java/releases/tag/1.8.0
* https://github.com/lz4/lz4/releases/tag/v1.9.3

snappy-java: 1.1.8.1 -> 1.1.8.4

The most noteworthy change is support for Apple M1.
Details:

* https://github.com/xerial/snappy-java/releases/tag/1.1.8.2 
* https://github.com/xerial/snappy-java/releases/tag/1.1.8.3
* https://github.com/xerial/snappy-java/releases/tag/1.1.8.4

zstd-jni: 1.5.0-2 -> 1.5.0-4

Minor fixes, details:

* https://github.com/luben/zstd-jni/releases/tag/v1.5.0-3
* https://github.com/luben/zstd-jni/releases/tag/v1.5.0-4

Reviewers: David Jacot <djacot@confluent.io>, Chia-Ping Tsai <chia7712@gmail.com>, Luke Chen <showuon@gmail.com>, Josep Prat <josep.prat@aiven.io>
2021-09-07 08:46:21 -07:00
Ismael Juma 0118330103
KAFKA-13273: Add support for Java 17 (#11296)
Java 17 is at release candidate stage and it will be a LTS release once
it's out (previous LTS release was Java 11).

Details:
* Replace Java 16 with Java 17 in Jenkins and Readme.
* Replace `--illegal-access=permit` (which was removed from Java 17)
   with  `--add-opens` for the packages we require internal access to.
   Filed KAFKA-13275 for updating the tests not to require `--add-opens`
   (where possible).
* Update `release.py` to use JDK8. and JDK 17 (instead of JDK 8 and JDK 15).
* Removed all but one Streams test from `testsToExclude`. The
   Connect test exclusion list remains the same.
* Add notable change to upgrade.html
* Upgrade to Gradle 7.2 as it's required for proper Java 17 support.
* Upgrade mockito to 3.12.4 for better Java 17 support.
* Adjusted `KafkaRaftClientTest` and `QuorumStateTest` not to require
   private access to `jdk.internal.util.random`.

Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2021-09-06 08:55:52 -07:00
Justine Olshan b923ec236e
KAFKA-13209: Upgrade jetty-server to fix CVE-2021-34429
Upgrading to 9.4.43.v20210629
Release notes: https://github.com/eclipse/jetty.project/releases/tag/jetty-9.4.43.v20210629

Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>
2021-08-17 23:56:17 +05:30
Josep Prat 83f0ae3821
KAFKA-12862: Update Scala fmt library and apply fixes (#10784)
Updates the scala fmt to the latest stable version.
Applies all the style fixes (all source code changes are done by scala 
fmt).
Removes setting about dangling parentheses as `true` is already the
default.

Reviewer: John Roesler <john@confluent.io>
2021-08-09 12:05:31 +02:00
Kamal Chandraprakash a103c95a31
KAFKA-12724: Add 2.8.0 to system tests and streams upgrade tests. (#10602)
Also adjusted the acceptable recovery lag to stabilize Streams tests.

Reviewers: Justine Olshan <jolshan@confluent.io>, Matthias J. Sax <mjsax@apache.org>, John Roesler <vvcephei@apache.org>
2021-08-04 17:31:10 -05:00
Ron Dagostino cd24e1233e
MINOR: Update dropwizard library to 4.1.12.1 (#10982)
Reviewers: Colin P. McCabe <cmccabe@apache.org>, Luke Chen <showuon@gmail.com>
2021-07-08 11:00:46 -07:00
Tom Bentley 19e8fd513a
KAFKA-9687: KIP-707: Add KafkaFuture.toCompletionStage() (#9878)
* Improve the test prior to reimplementing KafkaFutureImpl using CompletableFuture.
* KAFKA-9687: Reimplement KafkaFutureImpl using a CompleteableFuture
* KIP-707: Add KafkaFuture.toCompletionStage

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>, David Jacot <djacot@confluent.io>, Konstantine Karantasis <k.karantasis@gmail.com>
2021-07-05 17:33:33 +01:00
Ismael Juma 855011f92a
MINOR: Upgrade Gradle to 7.1.1 and remove JDK 15 build (#10968)
Gradle 7.1 improves Java incremental compilation:
https://docs.gradle.org/7.1.1/release-notes.html

We previously kept the JDK 15 build because some
tests didn't work with JDK 16. Since then, a number
of PRs were submitted to fix this so it's best
to remove the JDK 15 build before we create the
3.0 release branch.

Finally bump `test-retry` gradle plugin version too.

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>, Luke Chen <showuon@gmail.com>
2021-07-04 10:55:16 -07:00
Lee Dongjin fa685fa152
KAFKA-12985: Upgrade jetty to 9.4.42 (#10919)
* 9.4.41 announcement: https://www.eclipse.org/lists/jetty-announce/msg00156.html
* 9.4.42 announcement: https://www.eclipse.org/lists/jetty-announce/msg00158.html

Reviewers: Luke Chen <showuon@gmail.com>, Ismael Juma <ismael@juma.me.uk>
2021-07-04 07:48:25 -07:00
Ron Dagostino 4f5b4c868e
KAFKA-12756: Update ZooKeeper to v3.6.3 (#10918)
Update the ZooKeeper version to v3.6.3. This requires adding dropwizard
as a new dependency.

Also, add Kafka v2.8.0 to the ducktape system test image.

Reviewers: Luke Chen <showuon@gmail.com>, Colin P. McCabe <cmccabe@apache.org>, Ismael Juma <ismael@juma.me.uk>
2021-06-30 11:21:33 -07:00
CHUN-HAO TANG 580c111258
KAFKA-12662: add unit test for ProducerPerformance (#10588)
Reviewers: Luke Chen <showuon@gmail.com>, wenbingshen <oliver.shen999@gmail.com>, dengziming <dengziming1993@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2021-06-17 20:07:12 +08:00
David Christle 39b9df5090
KAFKA-12921: Upgrade zstd-jni to 1.5.0-2 (#10847)
This PR aims to upgrade `zstd-jni` from `1.4.9-1` to `1.5.0-2`.

This change will incorporate a number of bug fixes and performance improvements made in `1.5.0` of `zstd`:
- https://github.com/facebook/zstd/releases/tag/v1.5.0
- https://github.com/luben/zstd-jni/releases/tag/v1.5.0-1
- https://github.com/luben/zstd-jni/releases/tag/v1.5.0-2

The most recent `1.5.0` release offers +25%-140% (compression) and +15% (decompression) performance
improvements under certain conditions. Those conditions are unlikely to apply to Kafka with the default
configuration, however.

Since this is a dependency change, this should pass all the existing CIs.

Reviewers: Lee Dongjin <dongjin@apache.org>, Ismael Juma <ismael@juma.me.uk>
2021-06-13 09:14:24 -07:00
Ismael Juma 1dadb6db0c
MINOR: Only log overridden topic configs during topic creation (#10828)
It's quite verbose to include all configs for every partition loaded/created.
Also make sure to redact sensitive and unknown config values.

Unit test included.

Reviewers: David Jacot <djacot@confluent.io>, Kowshik Prakasam <kprakasam@confluent.io>, Luke Chen <showuon@gmail.com>
2021-06-08 06:39:31 -07:00
Ismael Juma 8b71604c5d
MINOR: Update jmh for async profiler 2.0 support (#10800)
Async profiler 2.0 outputs html5 flame graph files
and supports simultaneous collection of cpu,
allocation and lock profiles in jfr format.

Updated the readme to include an example of the
latter and verified that the Readme commands
work with async profiler 2.0.

Release notes:
* 1.28: https://mail.openjdk.java.net/pipermail/jmh-dev/2021-March/003171.html
* 1.29: https://mail.openjdk.java.net/pipermail/jmh-dev/2021-March/003218.html
* 1.30: https://mail.openjdk.java.net/pipermail/jmh-dev/2021-May/003237.html
* 1.31: https://mail.openjdk.java.net/pipermail/jmh-dev/2021-May/003286.html
* 1.32: https://mail.openjdk.java.net/pipermail/jmh-dev/2021-May/003307.html

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>, David Jacot <djacot@confluent.io>, Luke Chen <showuon@gmail.com>
2021-06-02 05:55:01 -07:00
Josep Prat 274eccf922
MINOR: Dependency updates for Scala libraries for improved Scala 3.0 support (#10783)
Release notes:
* Scala 2.12.14: https://github.com/scala/scala/releases/tag/v2.12.14
* Scala Logging: https://github.com/lightbend/scala-logging/releases/tag/v3.9.3
* Scala Collection Compat:
  *  https://github.com/scala/scala-collection-compat/releases/tag/v2.3.1
  * https://github.com/scala/scala-collection-compat/releases/tag/v2.3.2
  * https://github.com/scala/scala-collection-compat/releases/tag/v2.4.0
  * https://github.com/scala/scala-collection-compat/releases/tag/v2.4.1
  * https://github.com/scala/scala-collection-compat/releases/tag/v2.4.2
  * https://github.com/scala/scala-collection-compat/releases/tag/v2.4.3
  * https://github.com/scala/scala-collection-compat/releases/tag/v2.4.4
* Scala Java8 Compat:
  * https://github.com/scala/scala-java8-compat/releases/tag/v1.0.0-RC1
  * https://github.com/scala/scala-java8-compat/releases/tag/v1.0.0

Reviewers: Ismael Juma <ismael@juma.me.uk>
2021-05-31 12:06:37 -07:00
Ismael Juma 23130262ca
KAFKA-12856: Upgrade Jackson to 2.12.3 (#10778)
2.10.x is no longer supported, so we should move to 2.12 for the 3.0
release.

ScalaObjectMapper has been deprecated and it looks like we don't
actually need it, so remove its usage.

Reviewers: David Jacot <djacot@confluent.io>
2021-05-27 09:56:33 -07:00
Josep Prat a02b19cb77
KAFKA-12796: Removal of deprecated classes under streams-scala (#10710)
Removes previously deprecated methods in older KIPs

Reviewers: Bruno Cadonna <cadonna@apache.org>
2021-05-27 11:30:15 +02:00
Lee Dongjin 57c1422468
KAFKA-12820: Upgrade maven-artifact dependency to resolve CVE-2021-26291
CVE-2021-26291, which makes Man-In-The-Middle-Attack possible, was fixed in maven 3.8.1.

Reviewers: Luke Chen <showuon@gmail.com>, Manikumar Reddy <manikumar.reddy@gmail.com>
2021-05-21 12:37:07 +05:30
Mickael Maison 7f91d2935f
MINOR: Updating files with release 2.7.1 (#10660)
Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>,  Matthias J. Sax <mjsax@apache.org>, Chia-Ping Tsai <chia7712@gmail.com>
2021-05-20 10:43:15 +01:00
Josep Prat a8bd649dbf
MINOR: Update Scala to 2.13.6 (#10711)
This includes TASTy Reader support for Scala 3.0.0. This makes it easier
for Kafka libraries to be used in Scala 3.0 projects

Release notes: https://github.com/scala/scala/releases/tag/v2.13.6

Reviewers: Ismael Juma <ismael@juma.me.uk>
2021-05-19 05:26:08 -07:00
Dejan Stojadinović ad91c5edf0
KAFKA-12728: Upgrade gradle to 7.0.2 and shadow to 7.0.0 (#10606)
Details:
* gradle upgrade: 6.8.3 -> 7.0.2
  https://github.com/gradle/gradle/releases/tag/v7.0.0
  https://github.com/gradle/gradle/releases/tag/v7.0.1
  https://github.com/gradle/gradle/releases/tag/v7.0.2
* 'distributionSha256Sum' gradle property is included into 'gradle-wrapper.properties' file
* gradle shadow plugin upgrade: 6.1.0 -> 7.0.0
  https://github.com/johnrengelman/shadow/releases/tag/7.0.0
* Remaining configurations obsoleted in Gradle 6 (and removed in Gradle 7) are replaced:
  `compile` -> `implementation`
  `testCompile` -> `testImplementation`

Reviewers: Ismael Juma <ismael@juma.me.uk>
2021-05-15 06:10:04 -07:00
Ismael Juma 13ffebe2f1
MINOR: Update jacoco to 0.8.7 for JDK 16 support (#10654)
Details:
* https://github.com/jacoco/jacoco/releases/tag/v0.8.6
* https://github.com/jacoco/jacoco/releases/tag/v0.8.7

Ran `./gradlew clients:reportCoverage -PenableTestCoverage=true -Dorg.gradle.parallel=false`
successfully with Java 15 (see https://github.com/gradle/gradle/issues/15730 and
https://github.com/scoverage/gradle-scoverage/issues/150 for the reason why 
`-Dorg.gradle.parallel=false` is required).

Also updated `README.md` to include `-Dorg.gradle.parallel=false` alongside `reportCoverage`.

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2021-05-12 08:13:03 -07:00
Dejan Stojadinović 9bec36256e
MINOR: Remove unused `scalatest` definition from `dependencies.gradle` (#10655)
Related PR where the `scalatest` usage was removed: #9858

Reviewers: Ismael Juma <ismael@juma.me.uk>
2021-05-09 19:22:29 -07:00
Dejan Stojadinović d934647484
MINOR: checkstyle version upgrade: 8.20 -> 8.36.2 (#10656)
Details:
* Release notes: https://checkstyle.org/releasenotes.html#Release_8.36.2
* Checkstyle version 8.42 should be skipped (lots of false positives, see here: https://github.com/checkstyle/checkstyle/issues/9957)
* More recent Checkstyle versions (i.e. 8.37 and above) are imposing more strict indentation
rules.
2021-05-09 19:03:14 -07:00
Bruno Cadonna 90fc875e24
KAFKA-8897: Upgrade RocksDB to 6.19.3 (#10568)
This PR upgrades RocksDB to 6.19.3. After the upgrade the Gradle build exited with code 134 due to SIGABRT signals ("Pure virtual function called!") coming from the C++ part of RocksDB. This error was caused by RocksDB state stores not properly closed in Streams' code. This PR adds the missing closings and updates the RocksDB option adapter.

Reviewers: Anna Sophie Blee-Goldman <ableegoldman@apache.org>, Guozhang Wang <wangguoz@gmail.com>
2021-05-06 15:29:26 -07:00
Shay Elkin b73d639adc
KAFKA-12752: Bump Jersey deps to 2.34 due to CVE-2021-28168 (#10636)
The version of the Eclipse Jersey library brought as dependences,
2.31, has a known vulnerability, CVE-2021-28168 (https://github.com/advisories/GHSA-c43q-5hpj-4crv).

This replaces it with 2.34, which is fully compatible with
2.31, except for bugs and vulnerabilities.

Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>
2021-05-06 20:14:03 +05:30
Ismael Juma 711608b3b1
MINOR: Update test libraries and gradle plugins for better JDK 16/17 support (#10619)
Details:
* spotbugs gradle plugin from 4.6.0 to 4.7.1:
  https://github.com/spotbugs/spotbugs-gradle-plugin/releases/tag/4.6.1
  https://github.com/spotbugs/spotbugs-gradle-plugin/releases/tag/4.6.2
  https://github.com/spotbugs/spotbugs-gradle-plugin/releases/tag/4.7.0
  https://github.com/spotbugs/spotbugs-gradle-plugin/releases/tag/4.7.1
* spotless gradle plugin from 5.10.2 to 5.12.4:
  https://github.com/diffplug/spotless/blob/gradle/5.12.4/CHANGES.md
* test-retry gradle plugin from 1.2.0 to 1.2.1:
  https://github.com/gradle/test-retry-gradle-plugin/releases/tag/v1.2.1
* dependency check gradle plugin from 6.1.1 to 6.1.6:
  https://github.com/jeremylong/DependencyCheck/releases/tag/v6.1.2
  https://github.com/jeremylong/DependencyCheck/releases/tag/v6.1.3
  https://github.com/jeremylong/DependencyCheck/releases/tag/v6.1.4
  https://github.com/jeremylong/DependencyCheck/releases/tag/v6.1.5
  https://github.com/jeremylong/DependencyCheck/releases/tag/v6.1.6
* versions gradle plugin from 0.36.0 to 0.38.0:
https://github.com/ben-manes/gradle-versions-plugin/releases/tag/v0.37.0
https://github.com/ben-manes/gradle-versions-plugin/releases/tag/v0.38.0
* easymock from 4.2 to 4.3:
  https://github.com/easymock/easymock/releases/tag/easymock-4.3
* mockito from 3.6.0 to 3.9.0:
https://github.com/mockito/mockito/releases (too many releases to list
  them all individually)
* spotbugs from 4.1.4 to 4.2.2:
  https://github.com/spotbugs/spotbugs/blob/4.2.2/CHANGELOG.md
  4.2.3 has a regression that causes spurious errors related to `Random`
  usage.

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2021-05-02 12:15:54 -07:00
A. Sophie Blee-Goldman 3bfc9fe486
MINOR: Bump latest 2.6 version to 2.6.2 (#10582)
Bump the version for system tests to 2.6.2
2021-04-21 12:50:30 -07:00
Lee Dongjin 235d13ff2a
KAFKA-12655 Update Jetty: 9.4.38.v20210224 → 9.4.39.v20210325 (#10526)
Reviewers: Edwin <edwinhobor@gmail.com>, Manikumar Reddy <manikumar.reddy@gmail.com>, Luke Chen, xjin-Confluent, Chia-Ping Tsai <chia7712@gmail.com>
2021-04-13 14:40:55 +08:00
Jim Hurne 1e8a7c45ef
MINOR: Switch to using the Gradle RAT plugin (#10491)
The Gradle RAT plugin properly declares inputs and outputs and is also
cachable. This also relieves the Kafka developers from maintaining the build
integration with RAT.

The generated RAT report is identical to the one generated previously. The only
difference is the RAT report name: the RAT plugin sets the HTML report name to
`index.html` (still under `build/rat`).

Verified that the rat task fails if unlicensed files are present (and not excluded). Also
`./gradlew rat` succeeds when there is no .git folder.
2021-04-12 21:05:49 -07:00
Lee Dongjin b6a787a072
KAFKA-12583: Upgrade netty to 4.1.62.Final
Reviewers: Ismael Juma <ismael@juma.me.uk>
2021-03-31 08:45:30 -07:00
Chia-Ping Tsai 9af81955c4
KAFKA-12173 Migrate streams:streams-scala module to JUnit 5 (#9858)
1. replace org.junit.Assert by org.junit.jupiter.api.Assertions
2. replace org.junit by org.junit.jupiter.api
3. replace Before by BeforeEach
4. replace After by AfterEach
5. remove ExternalResource from all scala modules
6. add explicit AfterClass/BeforeClass to stop/start EmbeddedKafkaCluster

Noted that this PR does not migrate stream module to junit 5 so it does not introduce callback of junit 5 to deal with beforeAll/afterAll. The next PR of migrating stream module can replace explicit beforeAll/afterAll by junit 5 extension. Or we can keep the beforeAll/afterAll if it make code more readable.

Reviewers: John Roesler <vvcephei@apache.org>
2021-03-25 01:04:39 +08:00
Dejan Stojadinović 9ffa6d6d74
KAFKA-12293: Remove JCenter from buildscript and delete buildscript.gradle
They're no longer used and JFrog is sunsetting JCenter.

https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter

Reviewers: Ismael Juma <ismael@juma.me.uk>
2021-03-18 07:27:14 -07:00
Jason Gustafson 8ef1619f3e
KAFKA-12459; Use property testing library for raft event simulation tests (#10323)
This patch changes the raft simulation tests to use jqwik, which is a property testing library. This provides two main benefits:

- It simplifies the randomization of test parameters. Currently the tests use a fixed set of `Random` seeds, which means that most builds are doing redundant work. We get a bigger benefit from allowing each build to test different parameterizations.
- It makes it easier to reproduce failures. Whenever a test fails, jqwik will report the random seed that failed. A developer can then modify the `@Property` annotation to use that specific seed in order to reproduce the failure.

This patch also includes an optimization for `MockLog.earliestSnapshotId` which reduces the time to run the simulation tests dramatically.

Reviewers: Ismael Juma <ismael@juma.me.uk>, Chia-Ping Tsai <chia7712@gmail.com>, José Armando García Sancio <jsancio@gmail.com>, David Jacot <djacot@confluent.io>
2021-03-17 19:20:07 -07:00
Dongjoon Hyun 1f9c9f8bb5
KAFKA-12442: Upgrade ZSTD JNI from 1.4.8-4 to 1.4.9-1 (#10285)
Since the new features are not used, you may right. However, I believe the benefits are three-fold.
- There exists ZSTD side bug-fixes at ZSTD 1.4.9.
- There exists ZSTD JNI side memory optimization improvements at ZSTD JNI 1.4.8-5 ~ 1.4.8-7. (This includes some incompatible changes and recovery. So, 1.4.9 is more human-readable stable version number.).
- I hope this will reduce the chance of future potential version conflict issues across Apache projects. It's important when some downstream project starts to use new feature.
   - Apache Spark 3.2.0 will use ZSTD 1.4.9. (ba7e525a11)
   - Apache Parquet 1.12.0 will use ZSTD 1.4.9 (66ac28ce23)
   - Apache Avro 1.10.3 will use ZSTD 1.4.9 (806667cb2b)

Reviewers: Lee Dongjin <dongjin@apache.org>, Ismael Juma <ismael@juma.me.uk>, Chia-Ping Tsai <chia7712@gmail.com>
2021-03-12 13:37:33 +08:00
Ismael Juma 7a3ebbebbc
KAFKA-12415 Prepare for Gradle 7.0 and restrict transitive scope for non api dependencies (#10203)
Gradle 7.0 is required for Java 16 compatibility and it removes a number of
deprecated APIs. Fix most issues preventing the upgrade to Gradle 7.0.
The remaining ones are more complicated and should be handled
in a separate PR. Details of the changes:

* Release tarball no longer includes includes test, sources, javadoc and test sources jars (these
are still published to the Maven Central repository).
* Replace `compile` with `api` or `implementation` - note that `implementation`
dependencies appear with `runtime` scope in the pom file so this is a (positive)
change in behavior
* Add missing dependencies that were uncovered by the usage of `implementation`
* Replace `testCompile` with `testImplementation`
* Replace `runtime` with `runtimeOnly` and `testRuntime` with `testRuntimeOnly`
* Replace `configurations.runtime` with `configurations.runtimeClasspath`
* Replace `configurations.testRuntime` with `configurations.testRuntimeClasspath` (except for
the usage in the `streams` project as that causes a cyclic dependency error)
* Use `java-library` plugin instead of `java`
* Use `maven-publish` plugin instead of deprecated `maven` plugin - this changes the
commands used to publish and to install locally, but task aliases for `install` and
`uploadArchives` were added for backwards compatibility
* Removed `-x signArchives` line from the readme since it was wrong (it was a
no-op before and it fails now, however)
* Replaces `artifacts` block with an approach that works with the `maven-publish` plugin
* Don't publish `jmh-benchmark` module - the shadow jar is pretty large and not
particularly useful (before this PR, we would publish the non shadow jars)
* Replace `version` with `archiveVersion`, `baseName` with `archiveBaseName` and
`classifier` with `archiveClassifier`
* Update Gradle and plugins to the latest stable version (7.0 is not stable yet)
* Use `plugin` DSL to configure plugins
* Updated notable changes for 3.0

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>, Randall Hauch <rhauch@gmail.com>
2021-03-04 11:22:22 -08:00
Lee Dongjin b77deece1d KAFKA-12400: Upgrade jetty to fix CVE-2020-27223
Here is the fix. The reason of [CVE-2020-27223](https://nvd.nist.gov/vuln/detail/CVE-2020-27223) was DOS vulnerability for Quoted Quality CSV headers and [patched in 9.4.37.v20210219](https://github.com/eclipse/jetty.project/security/advisories/GHSA-m394-8rww-3jr7).

This PR updates Jetty dependency into the following version, 9.4.38.v20210224.

Author: Lee Dongjin <dongjin@apache.org>

Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>

Closes #10245 from dongjinleekr/feature/KAFKA-12400
2021-03-03 10:13:40 +05:30
Lee Dongjin 4b3e3a9e86 y
This security vulnerability was found in netty-codec-http, but [caused by netty itself](c735357bf2) and [fixed in 4.1.59.Final](https://github.com/netty/netty/security/advisories/GHSA-5mcr-gq6c-3hq2). So, upgrade the netty version from 4.1.51.Final to 4.1.59.Final.

Author: Lee Dongjin <dongjin@apache.org>

Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>

Closes #10235 from dongjinleekr/feature/KAFKA-12389
2021-03-03 09:45:24 +05:30
Ismael Juma 6f2cb60ef6
KAFKA-12341: Ensure consistent versions for javassist (#10191)
And update to 3.27.0-GA.

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2021-02-23 10:47:53 -08:00
Manikumar Reddy a74b5eb0df MINOR: Update HttpClient to "4.5.13"
Update HttpClient to recent bug fix version 4.5.13.

Author: Manikumar Reddy <manikumar.reddy@gmail.com>

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>

Closes #10188 from omkreddy/http-client
2021-02-23 15:10:24 +05:30
Ismael Juma dd34e40f3e
MINOR: Update Scala to 2.13.5 (#10169)
This includes a fix from Chia-Ping that removes tuple
allocations when `Map.forKeyValue` is used
(https://github.com/scala/scala/pull/9425) and support
for JDK 16.

Release notes:
https://github.com/scala/scala/releases/tag/v2.13.5

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2021-02-22 22:02:38 -08:00
Lee Dongjin c71ec552d1 KAFKA-12324: Upgrade jetty to fix CVE-2020-27218
Here is the fix. The reason of [CVE-2020-27218](https://nvd.nist.gov/vuln/detail/CVE-2020-27218) was [Incorrect recycling of `HttpInput`](https://bugs.eclipse.org/bugs/show_bug.cgi?id=568892) and [patched in 9.4.35.v20201120](https://github.com/eclipse/jetty.project/security/advisories/GHSA-86wm-rrjm-8wh8).

This PR updates Jetty dependency into the following version, 9.4.36.v20210114.

Author: Lee Dongjin <dongjin@apache.org>

Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>

Closes #10177 from dongjinleekr/feature/KAFKA-12324
2021-02-22 23:19:06 +05:30
Chia-Ping Tsai 6bab96da04
KAFKA-12335 Upgrade junit from 5.7.0 to 5.7.1 (#10145)
Reviewers: Ismael Juma <ismael@juma.me.uk>
2021-02-20 11:27:46 +08:00
Colin P. Mccabe 690f72dd69 KAFKA-12334: Add the KIP-500 metadata shell
The Kafka Metadata shell is a new command which allows users to
interactively examine the metadata stored in a KIP-500 cluster.
It can examine snapshot files that are specified via --snapshot.

The metadata tool works by replaying the log and storing the state into
in-memory nodes.  These nodes are presented in a fashion similar to
filesystem directories.

Reviewers: Jason Gustafson <jason@confluent.io>, David Arthur <mumrah@gmail.com>, Igor Soarez <soarez@apple.com>
2021-02-19 15:46:34 -08:00
Ismael Juma 744d05b128
KAFKA-12327: Remove MethodHandle usage in CompressionType (#10123)
We don't really need it and it causes problems in older Android versions
and GraalVM native image usage (there are workarounds for the latter).

Move the logic to separate classes that are only invoked when the
relevant compression library is actually used. Place such classes
in their own package and enforce via checkstyle that only these
classes refer to compression library packages.

To avoid cyclic dependencies, moved `BufferSupplier` to the `utils`
package.

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2021-02-14 08:12:25 -08:00