From c7980f8f0e8143ea9ef33ca785c8934fc667f26f Mon Sep 17 00:00:00 2001 From: David Arthur Date: Fri, 21 Dec 2018 09:37:21 -0500 Subject: [PATCH 1/5] Update jenkins.sh to fail fast --- jenkins.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/jenkins.sh b/jenkins.sh index dd85dde03535f..443a69432dc9c 100755 --- a/jenkins.sh +++ b/jenkins.sh @@ -17,4 +17,14 @@ # This script is used for verifying changes in Jenkins. In order to provide faster feedback, the tasks are ordered so # that faster tasks are executed in every module before slower tasks (if possible). For example, the unit tests for all # the modules are executed before the integration tests. -./gradlew clean compileJava compileScala compileTestJava compileTestScala spotlessScalaCheck checkstyleMain checkstyleTest spotbugsMain unitTest rat integrationTest --no-daemon --continue -PxmlSpotBugsReport=true -PtestLoggingEvents=started,passed,skipped,failed "$@" + +# Run validation checks (compilation and static analysis) +./gradlew clean compileJava compileScala compileTestJava compileTestScala \ + spotlessScalaCheck checkstyleMain checkstyleTest spotbugsMain \ + --no-daemon --continue -PxmlSpotBugsReport=true "$@" \ + || { echo 'Validation steps failed'; exit 1; } + +# Run tests +./gradlew unitTest rat integrationTest \ + --no-daemon --continue -PtestLoggingEvents=started,passed,skipped,failed "$@" \ + || { echo 'Test steps failed'; exit 1; } From 3e2d483c4d6d668af2a4328e548a7479344a0eca Mon Sep 17 00:00:00 2001 From: David Arthur Date: Fri, 21 Dec 2018 09:37:36 -0500 Subject: [PATCH 2/5] Introduce a checkstyle error --- clients/src/main/java/org/apache/kafka/clients/Metadata.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clients/src/main/java/org/apache/kafka/clients/Metadata.java b/clients/src/main/java/org/apache/kafka/clients/Metadata.java index 1028de755a2ef..8f23d60288282 100644 --- a/clients/src/main/java/org/apache/kafka/clients/Metadata.java +++ b/clients/src/main/java/org/apache/kafka/clients/Metadata.java @@ -254,7 +254,7 @@ public synchronized void bootstrap(List addresses, long now) */ public synchronized void update(MetadataResponse metadataResponse, long now) { Objects.requireNonNull(metadataResponse, "Metadata response cannot be null"); - if (isClosed()) + if(isClosed()) throw new IllegalStateException("Update requested after metadata close"); this.needUpdate = false; From 0bf0973c5410a364d1b445cc0ec0d0199cdef914 Mon Sep 17 00:00:00 2001 From: David Arthur Date: Fri, 21 Dec 2018 09:57:36 -0500 Subject: [PATCH 3/5] Revert "Introduce a checkstyle error" This reverts commit 3e2d483c4d6d668af2a4328e548a7479344a0eca. --- clients/src/main/java/org/apache/kafka/clients/Metadata.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clients/src/main/java/org/apache/kafka/clients/Metadata.java b/clients/src/main/java/org/apache/kafka/clients/Metadata.java index 8f23d60288282..1028de755a2ef 100644 --- a/clients/src/main/java/org/apache/kafka/clients/Metadata.java +++ b/clients/src/main/java/org/apache/kafka/clients/Metadata.java @@ -254,7 +254,7 @@ public synchronized void bootstrap(List addresses, long now) */ public synchronized void update(MetadataResponse metadataResponse, long now) { Objects.requireNonNull(metadataResponse, "Metadata response cannot be null"); - if(isClosed()) + if (isClosed()) throw new IllegalStateException("Update requested after metadata close"); this.needUpdate = false; From 3ed956305b1ce93617c92ef556094caa8c4cd3ff Mon Sep 17 00:00:00 2001 From: David Arthur Date: Fri, 21 Dec 2018 10:01:20 -0500 Subject: [PATCH 4/5] Move rat to validation checks --- jenkins.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jenkins.sh b/jenkins.sh index 443a69432dc9c..e36fe8e724cb9 100755 --- a/jenkins.sh +++ b/jenkins.sh @@ -20,11 +20,11 @@ # Run validation checks (compilation and static analysis) ./gradlew clean compileJava compileScala compileTestJava compileTestScala \ - spotlessScalaCheck checkstyleMain checkstyleTest spotbugsMain \ + spotlessScalaCheck checkstyleMain checkstyleTest spotbugsMain rat \ --no-daemon --continue -PxmlSpotBugsReport=true "$@" \ || { echo 'Validation steps failed'; exit 1; } # Run tests -./gradlew unitTest rat integrationTest \ +./gradlew unitTest integrationTest \ --no-daemon --continue -PtestLoggingEvents=started,passed,skipped,failed "$@" \ || { echo 'Test steps failed'; exit 1; } From f089249e7d8402c16105593958982fd155fda548 Mon Sep 17 00:00:00 2001 From: David Arthur Date: Fri, 21 Dec 2018 10:11:03 -0500 Subject: [PATCH 5/5] Add profile flag for more insight into build time --- jenkins.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jenkins.sh b/jenkins.sh index e36fe8e724cb9..5d549fe074346 100755 --- a/jenkins.sh +++ b/jenkins.sh @@ -21,10 +21,10 @@ # Run validation checks (compilation and static analysis) ./gradlew clean compileJava compileScala compileTestJava compileTestScala \ spotlessScalaCheck checkstyleMain checkstyleTest spotbugsMain rat \ - --no-daemon --continue -PxmlSpotBugsReport=true "$@" \ + --profile --no-daemon --continue -PxmlSpotBugsReport=true "$@" \ || { echo 'Validation steps failed'; exit 1; } # Run tests ./gradlew unitTest integrationTest \ - --no-daemon --continue -PtestLoggingEvents=started,passed,skipped,failed "$@" \ + --profile --no-daemon --continue -PtestLoggingEvents=started,passed,skipped,failed "$@" \ || { echo 'Test steps failed'; exit 1; }