forked from apache/kafka
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'apache-github/trunk' into reduce-produc…
…e-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) ...
- Loading branch information
Showing
789 changed files
with
28,873 additions
and
12,318 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,28 +17,27 @@ | |
* | ||
*/ | ||
|
||
def setupGradle() { | ||
// Delete gradle cache to workaround cache corruption bugs, see KAFKA-3167 | ||
dir('.gradle') { | ||
deleteDir() | ||
} | ||
sh './gradlew -version' | ||
} | ||
|
||
def doValidation() { | ||
sh ''' | ||
sh """ | ||
./gradlew -PscalaVersion=$SCALA_VERSION clean compileJava compileScala compileTestJava compileTestScala \ | ||
spotlessScalaCheck checkstyleMain checkstyleTest spotbugsMain rat \ | ||
--profile --no-daemon --continue -PxmlSpotBugsReport=true | ||
''' | ||
""" | ||
} | ||
|
||
def doTest(target = "unitTest integrationTest") { | ||
sh """ | ||
./gradlew -PscalaVersion=$SCALA_VERSION ${target} \ | ||
--profile --no-daemon --continue -PtestLoggingEvents=started,passed,skipped,failed \ | ||
-PignoreFailures=true -PmaxParallelForks=2 -PmaxTestRetries=1 -PmaxTestRetryFailures=5 | ||
""" | ||
def isChangeRequest(env) { | ||
env.CHANGE_ID != null && !env.CHANGE_ID.isEmpty() | ||
} | ||
|
||
def retryFlagsString(env) { | ||
if (isChangeRequest(env)) " -PmaxTestRetries=1 -PmaxTestRetryFailures=5" | ||
else "" | ||
} | ||
|
||
def doTest(env, target = "unitTest integrationTest") { | ||
sh """./gradlew -PscalaVersion=$SCALA_VERSION ${target} \ | ||
--profile --no-daemon --continue -PtestLoggingEvents=started,passed,skipped,failed \ | ||
-PignoreFailures=true -PmaxParallelForks=2""" + retryFlagsString(env) | ||
junit '**/build/test-results/**/TEST-*.xml' | ||
} | ||
|
||
|
@@ -95,10 +94,16 @@ def tryStreamsArchetype() { | |
|
||
pipeline { | ||
agent none | ||
|
||
options { | ||
disableConcurrentBuilds() | ||
} | ||
|
||
stages { | ||
stage('Build') { | ||
parallel { | ||
stage('JDK 8') { | ||
|
||
stage('JDK 8 and Scala 2.12') { | ||
agent { label 'ubuntu' } | ||
tools { | ||
jdk 'jdk_1.8_latest' | ||
|
@@ -112,14 +117,13 @@ pipeline { | |
SCALA_VERSION=2.12 | ||
} | ||
steps { | ||
setupGradle() | ||
doValidation() | ||
doTest() | ||
doTest(env) | ||
tryStreamsArchetype() | ||
} | ||
} | ||
|
||
stage('JDK 11') { | ||
stage('JDK 11 and Scala 2.13') { | ||
agent { label 'ubuntu' } | ||
tools { | ||
jdk 'jdk_11_latest' | ||
|
@@ -132,14 +136,13 @@ pipeline { | |
SCALA_VERSION=2.13 | ||
} | ||
steps { | ||
setupGradle() | ||
doValidation() | ||
doTest() | ||
doTest(env) | ||
echo 'Skipping Kafka Streams archetype test for Java 11' | ||
} | ||
} | ||
stage('JDK 15') { | ||
|
||
stage('JDK 15 and Scala 2.13') { | ||
agent { label 'ubuntu' } | ||
tools { | ||
jdk 'jdk_15_latest' | ||
|
@@ -152,9 +155,8 @@ pipeline { | |
SCALA_VERSION=2.13 | ||
} | ||
steps { | ||
setupGradle() | ||
doValidation() | ||
doTest() | ||
doTest(env) | ||
echo 'Skipping Kafka Streams archetype test for Java 15' | ||
} | ||
} | ||
|
@@ -169,14 +171,103 @@ pipeline { | |
SCALA_VERSION=2.12 | ||
} | ||
steps { | ||
setupGradle() | ||
doValidation() | ||
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') { | ||
doTest('unitTest') | ||
doTest(env, 'unitTest') | ||
} | ||
echo 'Skipping Kafka Streams archetype test for ARM build' | ||
} | ||
} | ||
|
||
// To avoid excessive Jenkins resource usage, we only run the stages | ||
// above at the PR stage. The ones below are executed after changes | ||
// are pushed to trunk and/or release branches. We achieve this via | ||
// the `when` clause. | ||
|
||
stage('JDK 8 and Scala 2.13') { | ||
when { | ||
not { changeRequest() } | ||
beforeAgent true | ||
} | ||
agent { label 'ubuntu' } | ||
tools { | ||
jdk 'jdk_1.8_latest' | ||
maven 'maven_3_latest' | ||
} | ||
options { | ||
timeout(time: 8, unit: 'HOURS') | ||
timestamps() | ||
} | ||
environment { | ||
SCALA_VERSION=2.13 | ||
} | ||
steps { | ||
doValidation() | ||
doTest(env) | ||
tryStreamsArchetype() | ||
} | ||
} | ||
|
||
stage('JDK 11 and Scala 2.12') { | ||
when { | ||
not { changeRequest() } | ||
beforeAgent true | ||
} | ||
agent { label 'ubuntu' } | ||
tools { | ||
jdk 'jdk_11_latest' | ||
} | ||
options { | ||
timeout(time: 8, unit: 'HOURS') | ||
timestamps() | ||
} | ||
environment { | ||
SCALA_VERSION=2.12 | ||
} | ||
steps { | ||
doValidation() | ||
doTest(env) | ||
echo 'Skipping Kafka Streams archetype test for Java 11' | ||
} | ||
} | ||
|
||
stage('JDK 15 and Scala 2.12') { | ||
when { | ||
not { changeRequest() } | ||
beforeAgent true | ||
} | ||
agent { label 'ubuntu' } | ||
tools { | ||
jdk 'jdk_15_latest' | ||
} | ||
options { | ||
timeout(time: 8, unit: 'HOURS') | ||
timestamps() | ||
} | ||
environment { | ||
SCALA_VERSION=2.12 | ||
} | ||
steps { | ||
doValidation() | ||
doTest(env) | ||
echo 'Skipping Kafka Streams archetype test for Java 15' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
post { | ||
always { | ||
node('ubuntu') { | ||
script { | ||
if (!isChangeRequest(env)) { | ||
step([$class: 'Mailer', | ||
notifyEveryUnstableBuild: true, | ||
recipients: "[email protected]", | ||
sendToIndividuals: false]) | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
Oops, something went wrong.