Skip to content

Commit 57ab359

Browse files
committed
Merge branch 'trunk' into KAFKA-18530
# Conflicts: # core/src/test/scala/unit/kafka/server/ClientQuotasRequestTest.scala
2 parents f49b70e + 8c0a0e0 commit 57ab359

File tree

335 files changed

+5599
-3760
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

335 files changed

+5599
-3760
lines changed

.github/scripts/develocity_reports.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -889,7 +889,7 @@ def get_develocity_class_link(class_name: str, threshold_days: int, test_type: s
889889
threshold_days: Number of days to look back in search
890890
test_type: Type of test (e.g., "quarantinedTest", "test")
891891
"""
892-
base_url = "https://ge.apache.org/scans/tests"
892+
base_url = "https://develocity.apache.org/scans/tests"
893893
params = {
894894
"search.rootProjectNames": "kafka",
895895
"search.tags": "github,trunk",
@@ -913,7 +913,7 @@ def get_develocity_method_link(class_name: str, method_name: str, threshold_days
913913
threshold_days: Number of days to look back in search
914914
test_type: Type of test (e.g., "quarantinedTest", "test")
915915
"""
916-
base_url = "https://ge.apache.org/scans/tests"
916+
base_url = "https://develocity.apache.org/scans/tests"
917917

918918
# Extract just the method name without the class prefix
919919
if '.' in method_name:
@@ -1186,7 +1186,7 @@ def main():
11861186
exit(1)
11871187

11881188
# Configuration
1189-
BASE_URL = "https://ge.apache.org"
1189+
BASE_URL = "https://develocity.apache.org"
11901190
PROJECT = "kafka"
11911191
QUARANTINE_THRESHOLD_DAYS = 7
11921192
MIN_FAILURE_RATE = 0.1

.github/scripts/junit.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,10 @@ class TestSuite:
9191
def clean_test_name(test_name: str) -> str:
9292
cleaned = test_name.strip("\"").rstrip("()")
9393
m = method_matcher.match(cleaned)
94-
return m.group(1)
94+
if m is None:
95+
raise ValueError(f"Could not parse test name '{test_name}'. Expected a valid Java method name.")
96+
else:
97+
return m.group(1)
9598

9699

97100
class TestCatalogExporter:

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ jobs:
103103
java-version: 23
104104
gradle-cache-read-only: ${{ !inputs.is-trunk }}
105105
gradle-cache-write-only: ${{ inputs.is-trunk }}
106-
develocity-access-key: ${{ secrets.GE_ACCESS_TOKEN }}
106+
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
107107
- name: Compile and validate
108108
env:
109109
SCAN_ARG: ${{ inputs.is-public-fork && '--no-scan' || '--scan' }}
@@ -168,7 +168,7 @@ jobs:
168168
java-version: ${{ matrix.java }}
169169
gradle-cache-read-only: ${{ !inputs.is-trunk }}
170170
gradle-cache-write-only: ${{ inputs.is-trunk }}
171-
develocity-access-key: ${{ secrets.GE_ACCESS_TOKEN }}
171+
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
172172

173173
# If the load-catalog job failed, we won't be able to download the artifact. Since we don't want this to fail
174174
# the overall workflow, so we'll continue here without a test catalog.

.github/workflows/ci-complete.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ run-name: Build Scans for ${{ github.event.workflow_run.display_title}}
3030
#
3131
# This "workflow_run" triggered workflow is run in a privileged context and so does have access to
3232
# the repository secrets. Here we can download the build scan files produced by a PR and publish
33-
# them to ge.apache.org.
33+
# them to develocity.apache.org.
3434
#
3535
# If we need to do things like comment on, label, or otherwise modify PRs from public forks. This
3636
# workflow is the place to do it. PR number is ${{ github.event.workflow_run.pull_requests[0].number }}
@@ -59,7 +59,7 @@ jobs:
5959
uses: ./.github/actions/setup-gradle
6060
with:
6161
java-version: ${{ matrix.java }}
62-
develocity-access-key: ${{ secrets.GE_ACCESS_TOKEN }}
62+
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
6363
- name: Download build scan archive
6464
id: download-build-scan
6565
uses: actions/download-artifact@v4

.github/workflows/deflake.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
with:
5151
java-version: ${{ inputs.java-version }}
5252
gradle-cache-read-only: true
53-
develocity-access-key: ${{ secrets.GE_ACCESS_TOKEN }}
53+
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
5454
- name: Test
5555
timeout-minutes: 60
5656
id: junit-test

.github/workflows/generate-reports.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ on:
2323
jobs:
2424
flaky-test-report:
2525
name: Flaky Test Report
26-
if : github.event.repository.fork == 'false'
2726
permissions:
2827
contents: read
2928
runs-on: ubuntu-latest
@@ -37,6 +36,7 @@ jobs:
3736
- name: Setup Python
3837
uses: ./.github/actions/setup-python
3938
- name: Run Report
39+
if : ${{ ! github.event.repository.fork }}
4040
env:
4141
DEVELOCITY_ACCESS_TOKEN: ${{ secrets.DV_API_ACCESS }}
4242
run: |

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ fail due to code changes. You can just run:
110110
Using compiled files:
111111

112112
KAFKA_CLUSTER_ID="$(./bin/kafka-storage.sh random-uuid)"
113-
./bin/kafka-storage.sh format --standalone -t $KAFKA_CLUSTER_ID -c config/kraft/reconfig-server.properties
114-
./bin/kafka-server-start.sh config/kraft/reconfig-server.properties
113+
./bin/kafka-storage.sh format --standalone -t $KAFKA_CLUSTER_ID -c config/server.properties
114+
./bin/kafka-server-start.sh config/server.properties
115115

116116
Using docker image:
117117

build.gradle

Lines changed: 55 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ ext {
4949
gradleVersion = versions.gradle
5050
minClientJavaVersion = 11
5151
minNonClientJavaVersion = 17
52-
modulesNeedingJava11 = [":clients", ":generator", ":streams", ":streams:test-utils", ":streams-scala", ":test-common:test-common-runtime"]
52+
modulesNeedingJava11 = [":clients", ":generator", ":streams", ":streams:test-utils", ":streams-scala", ":test-common:test-common-util"]
5353

5454
buildVersionFileName = "kafka-version.properties"
5555

@@ -139,10 +139,11 @@ ext {
139139
runtimeTestLibs = [
140140
libs.slf4jLog4j2,
141141
libs.junitPlatformLanucher,
142-
project(":test-common:test-common-runtime")
142+
libs.jacksonDatabindYaml,
143+
project(":test-common:test-common-util")
143144
]
144145

145-
log4jRuntimeLibs = [
146+
log4jReleaseLibs = [
146147
libs.slf4jLog4j2,
147148
libs.log4j1Bridge2Api,
148149
libs.jacksonDatabindYaml
@@ -1059,7 +1060,7 @@ project(':core') {
10591060
}
10601061

10611062
dependencies {
1062-
releaseOnly log4jRuntimeLibs
1063+
releaseOnly log4jReleaseLibs
10631064
// `core` is often used in users' tests, define the following dependencies as `api` for backwards compatibility
10641065
// even though the `core` module doesn't expose any public API
10651066
api project(':clients')
@@ -1102,8 +1103,9 @@ project(':core') {
11021103
testImplementation project(':server-common').sourceSets.test.output
11031104
testImplementation project(':storage:storage-api').sourceSets.test.output
11041105
testImplementation project(':server').sourceSets.test.output
1105-
testImplementation project(':test-common')
1106-
testImplementation project(':test-common:test-common-api')
1106+
testImplementation project(':test-common:test-common-runtime')
1107+
testImplementation project(':test-common:test-common-internal-api')
1108+
testImplementation project(':test-common:test-common-util')
11071109
testImplementation libs.bcpkix
11081110
testImplementation libs.mockitoCore
11091111
testImplementation(libs.apacheda) {
@@ -1535,21 +1537,17 @@ project(':group-coordinator') {
15351537
srcJar.dependsOn 'processMessages'
15361538
}
15371539

1538-
project(':test-common') {
1539-
// Test framework stuff. Implementations that support test-common-api
1540+
1541+
project(':test-common:test-common-internal-api') {
1542+
// Interfaces, config classes, and other test APIs. Java 17 only
15401543
base {
1541-
archivesName = "kafka-test-common"
1544+
archivesName = "kafka-test-common-internal-api"
15421545
}
15431546

15441547
dependencies {
1545-
implementation project(':core')
1546-
implementation project(':metadata')
1547-
implementation project(':server')
1548-
implementation project(':raft')
1549-
implementation project(':storage')
1550-
implementation project(':server-common')
1551-
implementation libs.jacksonDatabindYaml
1552-
implementation libs.slf4jApi
1548+
implementation project(':server-common') // Only project dependency allowed
1549+
1550+
implementation libs.junitJupiterApi
15531551

15541552
testImplementation libs.junitJupiter
15551553
testImplementation libs.mockitoCore
@@ -1559,41 +1557,30 @@ project(':test-common') {
15591557
}
15601558

15611559
checkstyle {
1562-
configProperties = checkstyleConfigProperties("import-control-test-common.xml")
1560+
configProperties = checkstyleConfigProperties("import-control-test-common-internal-api.xml")
15631561
}
15641562

15651563
javadoc {
15661564
enabled = false
15671565
}
15681566
}
15691567

1570-
project(':test-common:test-common-api') {
1571-
// Interfaces, config classes, and other test APIs
1568+
project(':test-common:test-common-util') {
1569+
// Runtime-only JUnit extensions for entire project. Java 11 only
15721570
base {
1573-
archivesName = "kafka-test-common-api"
1571+
archivesName = "kafka-test-common-util"
15741572
}
15751573

15761574
dependencies {
1577-
implementation project(':clients')
1578-
implementation project(':core')
1579-
implementation project(':group-coordinator')
1580-
implementation project(':metadata')
1581-
implementation project(':raft')
1582-
implementation project(':server')
1583-
implementation project(':server-common')
1584-
implementation project(':storage')
1585-
implementation project(':test-common')
1575+
implementation libs.junitPlatformLanucher
15861576
implementation libs.junitJupiterApi
1587-
1588-
testImplementation libs.junitJupiter
1589-
testImplementation libs.mockitoCore
1577+
implementation libs.junitJupiter
1578+
implementation libs.slf4jApi
15901579
testImplementation testLog4j2Libs
1591-
1592-
testRuntimeOnly runtimeTestLibs
15931580
}
15941581

15951582
checkstyle {
1596-
configProperties = checkstyleConfigProperties("import-control-test-common-api.xml")
1583+
configProperties = checkstyleConfigProperties("import-control-test-common-util.xml")
15971584
}
15981585

15991586
javadoc {
@@ -1602,21 +1589,36 @@ project(':test-common:test-common-api') {
16021589
}
16031590

16041591
project(':test-common:test-common-runtime') {
1605-
// Runtime-only test code including JUnit extentions
1592+
// Runtime-only JUnit extensions for integration tests. Java 17 only
16061593
base {
16071594
archivesName = "kafka-test-common-runtime"
16081595
}
16091596

16101597
dependencies {
1598+
implementation project(':test-common:test-common-internal-api')
1599+
implementation project(':clients')
1600+
implementation project(':core')
1601+
implementation project(':group-coordinator')
1602+
implementation project(':metadata')
1603+
implementation project(':raft')
1604+
implementation project(':server')
1605+
implementation project(':server-common')
1606+
implementation project(':storage')
1607+
16111608
implementation libs.junitPlatformLanucher
1612-
implementation libs.junitJupiterApi
16131609
implementation libs.junitJupiter
1610+
implementation libs.jacksonDatabindYaml
16141611
implementation libs.slf4jApi
1612+
1613+
testImplementation libs.junitJupiter
1614+
testImplementation libs.mockitoCore
16151615
testImplementation testLog4j2Libs
1616+
1617+
testRuntimeOnly runtimeTestLibs
16161618
}
16171619

16181620
checkstyle {
1619-
configProperties = checkstyleConfigProperties("import-control-test-common-api.xml")
1621+
configProperties = checkstyleConfigProperties("import-control-test-common-runtime.xml")
16201622
}
16211623

16221624
javadoc {
@@ -1644,8 +1646,8 @@ project(':transaction-coordinator') {
16441646
testImplementation libs.junitJupiter
16451647
testImplementation libs.mockitoCore
16461648
testImplementation project(':clients').sourceSets.test.output
1647-
testImplementation project(':test-common')
1648-
testImplementation project(':test-common:test-common-api')
1649+
testImplementation project(':test-common:test-common-runtime')
1650+
testImplementation project(':test-common:test-common-internal-api')
16491651

16501652
testRuntimeOnly runtimeTestLibs
16511653

@@ -1866,6 +1868,7 @@ project(':clients') {
18661868
compileOnly libs.jose4j // for SASL/OAUTHBEARER JWT validation; only used by broker
18671869

18681870

1871+
testImplementation project(':test-common:test-common-util')
18691872
testImplementation libs.bcpkix
18701873
testImplementation libs.jacksonJakartarsJsonProvider
18711874
testImplementation libs.jose4j
@@ -1880,7 +1883,6 @@ project(':clients') {
18801883
testRuntimeOnly libs.jacksonDatabind
18811884
testRuntimeOnly libs.jacksonJDK8Datatypes
18821885
testRuntimeOnly runtimeTestLibs
1883-
testRuntimeOnly log4jRuntimeLibs
18841886

18851887
generator project(':generator')
18861888
}
@@ -2267,7 +2269,8 @@ project(':storage') {
22672269
testImplementation project(':clients').sourceSets.test.output
22682270
testImplementation project(':core')
22692271
testImplementation project(':core').sourceSets.test.output
2270-
testImplementation project(':test-common:test-common-api')
2272+
testImplementation project(':test-common:test-common-internal-api')
2273+
testImplementation project(':test-common:test-common-runtime')
22712274
testImplementation project(':server')
22722275
testImplementation project(':server-common')
22732276
testImplementation project(':server-common').sourceSets.test.output
@@ -2424,7 +2427,7 @@ project(':tools') {
24242427
}
24252428

24262429
dependencies {
2427-
releaseOnly log4jRuntimeLibs
2430+
releaseOnly log4jReleaseLibs
24282431

24292432
implementation project(':clients')
24302433
implementation project(':metadata')
@@ -2456,7 +2459,8 @@ project(':tools') {
24562459
testImplementation project(':server').sourceSets.test.output
24572460
testImplementation project(':core')
24582461
testImplementation project(':core').sourceSets.test.output
2459-
testImplementation project(':test-common:test-common-api')
2462+
testImplementation project(':test-common:test-common-internal-api')
2463+
testImplementation project(':test-common:test-common-runtime')
24602464
testImplementation project(':server-common')
24612465
testImplementation project(':server-common').sourceSets.test.output
24622466
testImplementation project(':connect:api')
@@ -2467,7 +2471,6 @@ project(':tools') {
24672471
testImplementation project(':streams')
24682472
testImplementation project(':streams').sourceSets.test.output
24692473
testImplementation project(':streams:integration-tests').sourceSets.test.output
2470-
testImplementation project(':test-common')
24712474
testImplementation libs.junitJupiter
24722475
testImplementation libs.mockitoCore
24732476
testImplementation libs.mockitoJunitJupiter // supports MockitoExtension
@@ -2648,7 +2651,6 @@ project(':streams') {
26482651

26492652
testRuntimeOnly project(':streams:test-utils')
26502653
testRuntimeOnly runtimeTestLibs
2651-
testRuntimeOnly log4jRuntimeLibs
26522654

26532655
generator project(':generator')
26542656
}
@@ -2839,7 +2841,7 @@ project(':streams:integration-tests') {
28392841
testImplementation project(':storage')
28402842
testImplementation project(':streams').sourceSets.test.output
28412843
testImplementation project(':streams:streams-scala')
2842-
testImplementation project(':test-common')
2844+
testImplementation project(':test-common:test-common-runtime')
28432845
testImplementation project(':tools')
28442846
testImplementation project(':transaction-coordinator')
28452847
testImplementation libs.bcpkix
@@ -3515,14 +3517,15 @@ project(':connect:runtime') {
35153517
testImplementation project(':server')
35163518
testImplementation project(':metadata')
35173519
testImplementation project(':server-common')
3518-
testImplementation project(':test-common')
3520+
testImplementation project(':test-common:test-common-internal-api')
3521+
testImplementation project(':test-common:test-common-util')
3522+
testImplementation project(':test-common:test-common-runtime')
35193523
testImplementation project(':server-common')
35203524
testImplementation project(':server')
35213525
testImplementation project(':group-coordinator')
35223526
testImplementation project(':storage')
35233527
testImplementation project(':connect:test-plugins')
35243528
testImplementation project(':server-common').sourceSets.test.output
3525-
testImplementation project(':test-common:test-common-api')
35263529

35273530
testImplementation libs.jacksonDatabindYaml
35283531
testImplementation libs.junitJupiter
@@ -3636,7 +3639,7 @@ project(':connect:file') {
36363639
testImplementation project(':connect:runtime')
36373640
testImplementation project(':connect:runtime').sourceSets.test.output
36383641
testImplementation project(':core')
3639-
testImplementation project(':test-common')
3642+
testImplementation project(':test-common:test-common-runtime')
36403643
testImplementation project(':server-common').sourceSets.test.output
36413644

36423645
testRuntimeOnly runtimeTestLibs
@@ -3740,7 +3743,7 @@ project(':connect:mirror') {
37403743
testImplementation project(':clients').sourceSets.test.output
37413744
testImplementation project(':connect:runtime').sourceSets.test.output
37423745
testImplementation project(':core')
3743-
testImplementation project(':test-common')
3746+
testImplementation project(':test-common:test-common-runtime')
37443747
testImplementation project(':server')
37453748
testImplementation project(':server-common').sourceSets.test.output
37463749

checkstyle/import-control-coordinator-common.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
<allow pkg="org.apache.kafka.common.security" />
3838
<allow pkg="org.apache.kafka.common.serialization" />
3939
<allow pkg="org.apache.kafka.common.utils" />
40+
<allow pkg="org.apache.kafka.common.test.api" />
4041

4142
<subpackage name="coordinator">
4243
<subpackage name="common">

0 commit comments

Comments
 (0)