Skip to content

Commit

Permalink
Merge remote-tracking branch 'apache-github/trunk' into reduce-produc…
Browse files Browse the repository at this point in the history
…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
ijuma committed May 16, 2021
2 parents 845814b + ad91c5e commit 00c29d0
Show file tree
Hide file tree
Showing 789 changed files with 28,873 additions and 12,318 deletions.
8 changes: 2 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,8 @@ docs/generated/
kafkatest.egg-info/
systest/
*.swp
clients/src/generated
clients/src/generated-test
jmh-benchmarks/generated
jmh-benchmarks/src/main/generated
streams/src/generated
raft/src/generated
raft/.jqwik-database
core/src/generated
metadata/src/generated
**/src/generated
**/src/generated-test
147 changes: 119 additions & 28 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}

Expand Down Expand Up @@ -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'
Expand All @@ -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'
Expand All @@ -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'
Expand All @@ -152,9 +155,8 @@ pipeline {
SCALA_VERSION=2.13
}
steps {
setupGradle()
doValidation()
doTest()
doTest(env)
echo 'Skipping Kafka Streams archetype test for Java 15'
}
}
Expand All @@ -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])
}
}
}
}
}
Expand Down
Loading

0 comments on commit 00c29d0

Please sign in to comment.