Skip to content

Commit 00c29d0

Browse files
committed
Merge remote-tracking branch 'apache-github/trunk' into reduce-produce-allocations-lz4
* apache-github/trunk: (155 commits) KAFKA-12728: Upgrade gradle to 7.0.2 and shadow to 7.0.0 (apache#10606) KAFKA-12778: Fix QuorumController request timeouts and electLeaders (apache#10688) KAFKA-12754: Improve endOffsets for TaskMetadata (apache#10634) Rework on KAFKA-3968: fsync the parent directory of a segment file when the file is created (apache#10680) MINOR: set replication.factor to 1 to make StreamsBrokerCompatibilityService work with old broker (apache#10673) MINOR: prevent cleanup() from being called while Streams is still shutting down (apache#10666) KAFKA-8326: Introduce List Serde (apache#6592) KAFKA-12697: Add Global Topic and Partition count metrics to the Quorum Controller (apache#10679) KAFKA-12648: MINOR - Add TopologyMetadata.Subtopology class for subtopology metadata (apache#10676) MINOR: Update jacoco to 0.8.7 for JDK 16 support (apache#10654) MINOR: exclude all `src/generated` and `src/generated-test` (apache#10671) KAFKA-12772: Move all transaction state transition rules into their states (apache#10667) KAFKA-12758 Added `server-common` module to have server side common classes. (apache#10638) MINOR Removed copying storage libraries specifically as they are already copied. (apache#10647) KAFKA-5876: KIP-216 Part 4, Apply InvalidStateStorePartitionException for Interactive Queries (apache#10657) KAFKA-12747: Fix flakiness in shouldReturnUUIDsWithStringPrefix (apache#10643) MINOR: remove unnecessary placeholder from WorkerSourceTask#recordSent (apache#10659) MINOR: Remove unused `scalatest` definition from `dependencies.gradle` (apache#10655) MINOR: checkstyle version upgrade: 8.20 -> 8.36.2 (apache#10656) KAFKA-12464: minor code cleanup and additional logging in constrained sticky assignment (apache#10645) ...
2 parents 845814b + ad91c5e commit 00c29d0

File tree

789 files changed

+28873
-12318
lines changed

Some content is hidden

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

789 files changed

+28873
-12318
lines changed

.gitignore

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,8 @@ docs/generated/
5151
kafkatest.egg-info/
5252
systest/
5353
*.swp
54-
clients/src/generated
55-
clients/src/generated-test
5654
jmh-benchmarks/generated
5755
jmh-benchmarks/src/main/generated
58-
streams/src/generated
59-
raft/src/generated
6056
raft/.jqwik-database
61-
core/src/generated
62-
metadata/src/generated
57+
**/src/generated
58+
**/src/generated-test

Jenkinsfile

Lines changed: 119 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -17,28 +17,27 @@
1717
*
1818
*/
1919

20-
def setupGradle() {
21-
// Delete gradle cache to workaround cache corruption bugs, see KAFKA-3167
22-
dir('.gradle') {
23-
deleteDir()
24-
}
25-
sh './gradlew -version'
26-
}
27-
2820
def doValidation() {
29-
sh '''
21+
sh """
3022
./gradlew -PscalaVersion=$SCALA_VERSION clean compileJava compileScala compileTestJava compileTestScala \
3123
spotlessScalaCheck checkstyleMain checkstyleTest spotbugsMain rat \
3224
--profile --no-daemon --continue -PxmlSpotBugsReport=true
33-
'''
25+
"""
3426
}
3527

36-
def doTest(target = "unitTest integrationTest") {
37-
sh """
38-
./gradlew -PscalaVersion=$SCALA_VERSION ${target} \
39-
--profile --no-daemon --continue -PtestLoggingEvents=started,passed,skipped,failed \
40-
-PignoreFailures=true -PmaxParallelForks=2 -PmaxTestRetries=1 -PmaxTestRetryFailures=5
41-
"""
28+
def isChangeRequest(env) {
29+
env.CHANGE_ID != null && !env.CHANGE_ID.isEmpty()
30+
}
31+
32+
def retryFlagsString(env) {
33+
if (isChangeRequest(env)) " -PmaxTestRetries=1 -PmaxTestRetryFailures=5"
34+
else ""
35+
}
36+
37+
def doTest(env, target = "unitTest integrationTest") {
38+
sh """./gradlew -PscalaVersion=$SCALA_VERSION ${target} \
39+
--profile --no-daemon --continue -PtestLoggingEvents=started,passed,skipped,failed \
40+
-PignoreFailures=true -PmaxParallelForks=2""" + retryFlagsString(env)
4241
junit '**/build/test-results/**/TEST-*.xml'
4342
}
4443

@@ -95,10 +94,16 @@ def tryStreamsArchetype() {
9594

9695
pipeline {
9796
agent none
97+
98+
options {
99+
disableConcurrentBuilds()
100+
}
101+
98102
stages {
99103
stage('Build') {
100104
parallel {
101-
stage('JDK 8') {
105+
106+
stage('JDK 8 and Scala 2.12') {
102107
agent { label 'ubuntu' }
103108
tools {
104109
jdk 'jdk_1.8_latest'
@@ -112,14 +117,13 @@ pipeline {
112117
SCALA_VERSION=2.12
113118
}
114119
steps {
115-
setupGradle()
116120
doValidation()
117-
doTest()
121+
doTest(env)
118122
tryStreamsArchetype()
119123
}
120124
}
121125

122-
stage('JDK 11') {
126+
stage('JDK 11 and Scala 2.13') {
123127
agent { label 'ubuntu' }
124128
tools {
125129
jdk 'jdk_11_latest'
@@ -132,14 +136,13 @@ pipeline {
132136
SCALA_VERSION=2.13
133137
}
134138
steps {
135-
setupGradle()
136139
doValidation()
137-
doTest()
140+
doTest(env)
138141
echo 'Skipping Kafka Streams archetype test for Java 11'
139142
}
140143
}
141-
142-
stage('JDK 15') {
144+
145+
stage('JDK 15 and Scala 2.13') {
143146
agent { label 'ubuntu' }
144147
tools {
145148
jdk 'jdk_15_latest'
@@ -152,9 +155,8 @@ pipeline {
152155
SCALA_VERSION=2.13
153156
}
154157
steps {
155-
setupGradle()
156158
doValidation()
157-
doTest()
159+
doTest(env)
158160
echo 'Skipping Kafka Streams archetype test for Java 15'
159161
}
160162
}
@@ -169,14 +171,103 @@ pipeline {
169171
SCALA_VERSION=2.12
170172
}
171173
steps {
172-
setupGradle()
173174
doValidation()
174175
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
175-
doTest('unitTest')
176+
doTest(env, 'unitTest')
176177
}
177178
echo 'Skipping Kafka Streams archetype test for ARM build'
178179
}
179180
}
181+
182+
// To avoid excessive Jenkins resource usage, we only run the stages
183+
// above at the PR stage. The ones below are executed after changes
184+
// are pushed to trunk and/or release branches. We achieve this via
185+
// the `when` clause.
186+
187+
stage('JDK 8 and Scala 2.13') {
188+
when {
189+
not { changeRequest() }
190+
beforeAgent true
191+
}
192+
agent { label 'ubuntu' }
193+
tools {
194+
jdk 'jdk_1.8_latest'
195+
maven 'maven_3_latest'
196+
}
197+
options {
198+
timeout(time: 8, unit: 'HOURS')
199+
timestamps()
200+
}
201+
environment {
202+
SCALA_VERSION=2.13
203+
}
204+
steps {
205+
doValidation()
206+
doTest(env)
207+
tryStreamsArchetype()
208+
}
209+
}
210+
211+
stage('JDK 11 and Scala 2.12') {
212+
when {
213+
not { changeRequest() }
214+
beforeAgent true
215+
}
216+
agent { label 'ubuntu' }
217+
tools {
218+
jdk 'jdk_11_latest'
219+
}
220+
options {
221+
timeout(time: 8, unit: 'HOURS')
222+
timestamps()
223+
}
224+
environment {
225+
SCALA_VERSION=2.12
226+
}
227+
steps {
228+
doValidation()
229+
doTest(env)
230+
echo 'Skipping Kafka Streams archetype test for Java 11'
231+
}
232+
}
233+
234+
stage('JDK 15 and Scala 2.12') {
235+
when {
236+
not { changeRequest() }
237+
beforeAgent true
238+
}
239+
agent { label 'ubuntu' }
240+
tools {
241+
jdk 'jdk_15_latest'
242+
}
243+
options {
244+
timeout(time: 8, unit: 'HOURS')
245+
timestamps()
246+
}
247+
environment {
248+
SCALA_VERSION=2.12
249+
}
250+
steps {
251+
doValidation()
252+
doTest(env)
253+
echo 'Skipping Kafka Streams archetype test for Java 15'
254+
}
255+
}
256+
}
257+
}
258+
}
259+
260+
post {
261+
always {
262+
node('ubuntu') {
263+
script {
264+
if (!isChangeRequest(env)) {
265+
step([$class: 'Mailer',
266+
notifyEveryUnstableBuild: true,
267+
recipients: "[email protected]",
268+
sendToIndividuals: false])
269+
}
270+
}
180271
}
181272
}
182273
}

0 commit comments

Comments
 (0)