From da839136b8096a5de9a587393697a275146c669d Mon Sep 17 00:00:00 2001 From: Bernardo Botella Corbi Date: Thu, 21 Nov 2024 13:57:11 -0800 Subject: [PATCH 01/20] Add Delta Coverage plugin https://issues.apache.org/jira/browse/CASSSIDECAR-163 Adds changes.txt Adds changes.txt Readds missing change --- CHANGES.txt | 1 + build.gradle | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 891ff1d11..3f8c793b6 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,6 @@ 1.0.0 ----- + * Integrate delta-coverage-plugin plugin (CASSSIDECAR-163) * Mechanism to have a reduced number of Sidecar instances run operations (CASSSIDECAR-174) * Adding support for CDC APIs into sidecar client (CASSSIDECAR-172) * Stopping Sidecar can take a long time (CASSSIDECAR-178) diff --git a/build.gradle b/build.gradle index 8cf04458c..207eda160 100644 --- a/build.gradle +++ b/build.gradle @@ -25,6 +25,9 @@ import java.nio.file.Files import java.nio.file.Paths buildscript { + repositories { + maven { url "https://plugins.gradle.org/m2/" } + } dependencies { // findBugs needs a newer version of Guava in the buildscript. // otherwise it throws an exception @@ -49,6 +52,7 @@ plugins { id("org.nosphere.apache.rat") version "0.8.0" id 'jacoco' + id("io.github.surpsg.delta-coverage") version "2.4.0" } // Force checkstyle, rat, and spotBugs to run before test tasks for faster feedback @@ -88,6 +92,27 @@ allprojects { } +deltaCoverageReport { + diffSource { + git.compareWith("refs/remotes/upstream/trunk") + git.useNativeGit.set(true) + } + + violationRules { + failOnViolation.set(true) + rule(io.github.surpsg.deltacoverage.gradle.CoverageEntity.LINE) { + minCoverageRatio.set(0.9d) + } + rule(io.github.surpsg.deltacoverage.gradle.CoverageEntity.BRANCH) { + minCoverageRatio.set(0.7d) + } + } + + reports { + html.set(true) + } +} + group 'org.apache.cassandra' version project.version From fd58694d3703b1a0c1fe6a2b2ec81459040dcd3f Mon Sep 17 00:00:00 2001 From: Bernardo Botella Corbi Date: Thu, 21 Nov 2024 15:55:44 -0800 Subject: [PATCH 02/20] Remove redundant repository --- build.gradle | 3 --- 1 file changed, 3 deletions(-) diff --git a/build.gradle b/build.gradle index 207eda160..ef75cdd92 100644 --- a/build.gradle +++ b/build.gradle @@ -25,9 +25,6 @@ import java.nio.file.Files import java.nio.file.Paths buildscript { - repositories { - maven { url "https://plugins.gradle.org/m2/" } - } dependencies { // findBugs needs a newer version of Guava in the buildscript. // otherwise it throws an exception From 7741daec3b93d23d9cc4dfa2f0c8757dfbc3e40f Mon Sep 17 00:00:00 2001 From: Bernardo Botella Corbi Date: Mon, 16 Dec 2024 14:28:09 -0800 Subject: [PATCH 03/20] Updates Circle config --- .circleci/config.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index d7ac88f60..55026d35f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -393,6 +393,14 @@ jobs: - store_test_results: path: build/test-results/ + # Delta coverage plugin requires java 11 so we only validate in java 11 builds + validate_delta_coverage: + docker: + - image: cimg/openjdk:11.0 + steps: + - ./gradlew deltaCoverage + + # ensures we can build and install deb packages deb_build_install: docker: @@ -484,6 +492,15 @@ workflows: requires: - unit_java11 - build-dtest-jdk11 + - validate_delta_coverage: + required: + - unit_java11 + - integration_cassandra_40_java11 + - integration_heavy_cassandra_40_java11 + - integration_cassandra_50_java11 + - integration_heavy_cassandra_50_java11 + - integration_cassandra_trunk_java11 + - integration_heavy_cassandra_trunk_java11 - docs_build: requires: - unit_java8 From 2422ccf7baec58cf30256c5f9814e9c1104dbcf9 Mon Sep 17 00:00:00 2001 From: Bernardo Botella Corbi Date: Mon, 16 Dec 2024 14:29:47 -0800 Subject: [PATCH 04/20] Fix circleCI --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 55026d35f..9466b005b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -493,7 +493,7 @@ workflows: - unit_java11 - build-dtest-jdk11 - validate_delta_coverage: - required: + requires: - unit_java11 - integration_cassandra_40_java11 - integration_heavy_cassandra_40_java11 From d9cc714c6fde714dceba4c4e566020608db5a657 Mon Sep 17 00:00:00 2001 From: Bernardo Botella Corbi Date: Mon, 16 Dec 2024 14:30:37 -0800 Subject: [PATCH 05/20] Fix run coverage --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9466b005b..6e6fc3c1c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -398,7 +398,7 @@ jobs: docker: - image: cimg/openjdk:11.0 steps: - - ./gradlew deltaCoverage + - run: ./gradlew deltaCoverage # ensures we can build and install deb packages From da6e783a23a8f8552495ef987c6fde2d60d4bb96 Mon Sep 17 00:00:00 2001 From: Bernardo Botella Corbi Date: Mon, 16 Dec 2024 15:01:56 -0800 Subject: [PATCH 06/20] Install common --- .circleci/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6e6fc3c1c..33e70afd8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -398,9 +398,10 @@ jobs: docker: - image: cimg/openjdk:11.0 steps: + - install_common + - checkout - run: ./gradlew deltaCoverage - # ensures we can build and install deb packages deb_build_install: docker: From a8efdadce88dc2d8e7ce348236538f10dd89c902 Mon Sep 17 00:00:00 2001 From: Bernardo Botella Corbi Date: Mon, 16 Dec 2024 15:55:42 -0800 Subject: [PATCH 07/20] Circle test --- .circleci/config.yml | 5 ++++- build.gradle | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 33e70afd8..560104f57 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -397,10 +397,13 @@ jobs: validate_delta_coverage: docker: - image: cimg/openjdk:11.0 + environment: + skipIntegrationTest: true steps: + - setup_remote_docker - install_common - checkout - - run: ./gradlew deltaCoverage + - run: ./gradlew --info deltaCoverage # ensures we can build and install deb packages deb_build_install: diff --git a/build.gradle b/build.gradle index ef75cdd92..0464d5a20 100644 --- a/build.gradle +++ b/build.gradle @@ -91,7 +91,7 @@ allprojects { deltaCoverageReport { diffSource { - git.compareWith("refs/remotes/upstream/trunk") + git.compareWith("refs/remotes/origin/trunk") git.useNativeGit.set(true) } From cca767b685705c9fbec4f5760d414b8926de0f9a Mon Sep 17 00:00:00 2001 From: Bernardo Botella Corbi Date: Fri, 20 Dec 2024 11:05:35 -0800 Subject: [PATCH 08/20] Test new circle approach for coverage --- .circleci/config.yml | 31 +++++++++++++++++++++++++++++++ build.gradle | 4 +++- 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 560104f57..1d53f49e7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -262,6 +262,10 @@ jobs: - store_test_results: path: build/test-results/ + - persist_to_workspace: + root: jacoco-results/<>/ + paths: + - "**/*.exec" integration_heavy_cassandra_40_java11: docker: @@ -289,6 +293,11 @@ jobs: - store_test_results: path: build/test-results/ + - persist_to_workspace: + root: jacoco-results/<>/ + paths: + - "**/*.exec" + integration_cassandra_50_java11: docker: - image: cimg/openjdk:11.0 @@ -315,6 +324,11 @@ jobs: - store_test_results: path: build/test-results/ + - persist_to_workspace: + root: jacoco-results/<>/ + paths: + - "**/*.exec" + integration_heavy_cassandra_50_java11: docker: - image: cimg/openjdk:11.0 @@ -341,6 +355,11 @@ jobs: - store_test_results: path: build/test-results/ + - persist_to_workspace: + root: jacoco-results/<>/ + paths: + - "**/*.exec" + integration_cassandra_trunk_java11: docker: - image: cimg/openjdk:11.0 @@ -367,6 +386,11 @@ jobs: - store_test_results: path: build/test-results/ + - persist_to_workspace: + root: jacoco-results/<>/ + paths: + - "**/*.exec" + integration_heavy_cassandra_trunk_java11: docker: - image: cimg/openjdk:11.0 @@ -393,6 +417,11 @@ jobs: - store_test_results: path: build/test-results/ + - persist_to_workspace: + root: jacoco-results/<>/ + paths: + - "**/*.exec" + # Delta coverage plugin requires java 11 so we only validate in java 11 builds validate_delta_coverage: docker: @@ -403,6 +432,8 @@ jobs: - setup_remote_docker - install_common - checkout + - attach_workspace: + at: jacoco-results - run: ./gradlew --info deltaCoverage # ensures we can build and install deb packages diff --git a/build.gradle b/build.gradle index 0464d5a20..347478864 100644 --- a/build.gradle +++ b/build.gradle @@ -49,7 +49,7 @@ plugins { id("org.nosphere.apache.rat") version "0.8.0" id 'jacoco' - id("io.github.surpsg.delta-coverage") version "2.4.0" + id("io.github.surpsg.delta-coverage") version "2.5.0" } // Force checkstyle, rat, and spotBugs to run before test tasks for faster feedback @@ -95,6 +95,8 @@ deltaCoverageReport { git.useNativeGit.set(true) } + coverageBinaryFiles = fileTree(".") { include("**/*.exec") } + violationRules { failOnViolation.set(true) rule(io.github.surpsg.deltacoverage.gradle.CoverageEntity.LINE) { From a90f60500e5c53c69b753e82e11cd5426c243761 Mon Sep 17 00:00:00 2001 From: Bernardo Botella Corbi Date: Fri, 20 Dec 2024 12:09:24 -0800 Subject: [PATCH 09/20] Fix workspace --- .circleci/config.yml | 20 +++++++++++++------- scripts/get-jacoco-results.sh | 14 ++++++++++++++ 2 files changed, 27 insertions(+), 7 deletions(-) create mode 100755 scripts/get-jacoco-results.sh diff --git a/.circleci/config.yml b/.circleci/config.yml index 1d53f49e7..9ff3b6d39 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -251,6 +251,7 @@ jobs: at: dtest-jars - run: ./scripts/install-shaded-dtest-jar-local.sh - run: ./gradlew --no-daemon -PdtestVersion=4.1.8 -Dcassandra.sidecar.versions_to_test="4.0" checkstyleIntegrationTest spotbugsIntegrationTest integrationTestLightWeight --stacktrace + - run: ./scripts/get-jacoco-results.sh jacoco-results/<> - store_artifacts: path: build/reports @@ -263,7 +264,7 @@ jobs: - store_test_results: path: build/test-results/ - persist_to_workspace: - root: jacoco-results/<>/ + root: jacoco-results paths: - "**/*.exec" @@ -281,6 +282,7 @@ jobs: at: dtest-jars - run: ./scripts/install-shaded-dtest-jar-local.sh - run: ./gradlew --no-daemon -PdtestVersion=4.1.8 -Dcassandra.sidecar.versions_to_test="4.0" integrationTestHeavyWeight --stacktrace + - run: ./scripts/get-jacoco-results.sh jacoco-results/<> - store_artifacts: path: build/reports @@ -294,7 +296,7 @@ jobs: path: build/test-results/ - persist_to_workspace: - root: jacoco-results/<>/ + root: jacoco-results paths: - "**/*.exec" @@ -312,6 +314,7 @@ jobs: at: dtest-jars - run: ./scripts/install-shaded-dtest-jar-local.sh - run: ./gradlew --no-daemon -PdtestVersion=5.0.3 -Dcassandra.sidecar.versions_to_test="5.0" checkstyleIntegrationTest spotbugsIntegrationTest integrationTestLightWeight --stacktrace + - run: ./scripts/get-jacoco-results.sh jacoco-results/<> - store_artifacts: path: build/reports @@ -325,7 +328,7 @@ jobs: path: build/test-results/ - persist_to_workspace: - root: jacoco-results/<>/ + root: jacoco-results paths: - "**/*.exec" @@ -343,6 +346,7 @@ jobs: at: dtest-jars - run: ./scripts/install-shaded-dtest-jar-local.sh - run: ./gradlew --no-daemon -PdtestVersion=5.0.3 -Dcassandra.sidecar.versions_to_test="5.0" integrationTestHeavyWeight --stacktrace + - run: ./scripts/get-jacoco-results.sh jacoco-results/<> - store_artifacts: path: build/reports @@ -356,7 +360,7 @@ jobs: path: build/test-results/ - persist_to_workspace: - root: jacoco-results/<>/ + root: jacoco-results paths: - "**/*.exec" @@ -374,6 +378,7 @@ jobs: at: dtest-jars - run: ./scripts/install-shaded-dtest-jar-local.sh - run: ./gradlew --no-daemon -PdtestVersion=5.1 -Dcassandra.sidecar.versions_to_test="5.1" checkstyleIntegrationTest spotbugsIntegrationTest integrationTestLightWeight --stacktrace + - run: ./scripts/get-jacoco-results.sh jacoco-results/<> - store_artifacts: path: build/reports @@ -387,7 +392,7 @@ jobs: path: build/test-results/ - persist_to_workspace: - root: jacoco-results/<>/ + root: jacoco-results paths: - "**/*.exec" @@ -405,6 +410,7 @@ jobs: at: dtest-jars - run: ./scripts/install-shaded-dtest-jar-local.sh - run: ./gradlew --no-daemon -PdtestVersion=5.1 -Dcassandra.sidecar.versions_to_test="5.1" integrationTestHeavyWeight --stacktrace + - run: ./scripts/get-jacoco-results.sh jacoco-results/<> - store_artifacts: path: build/reports @@ -418,9 +424,9 @@ jobs: path: build/test-results/ - persist_to_workspace: - root: jacoco-results/<>/ + root: . paths: - - "**/*.exec" + - "jacoco-results/jacoco-results/**/*.exec" # Delta coverage plugin requires java 11 so we only validate in java 11 builds validate_delta_coverage: diff --git a/scripts/get-jacoco-results.sh b/scripts/get-jacoco-results.sh new file mode 100755 index 000000000..a936b7399 --- /dev/null +++ b/scripts/get-jacoco-results.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +search_dir="." + +target_folder="${1}" + +mkdir -p $target_folder + +find "$search_dir" -type d -path "*/build/jacoco" -print0 | while IFS= read -r -d '' dir; do + destination_path="$target_folder/${dir:2}" + mkdir -p "$destination_path" + cp -r $dir "$destination_path" +done + From 83714a8c5d90909ba6544750c3a6b50ff27d134f Mon Sep 17 00:00:00 2001 From: Bernardo Botella Corbi Date: Fri, 20 Dec 2024 12:25:44 -0800 Subject: [PATCH 10/20] Add license to script --- scripts/get-jacoco-results.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/scripts/get-jacoco-results.sh b/scripts/get-jacoco-results.sh index a936b7399..e71acb136 100755 --- a/scripts/get-jacoco-results.sh +++ b/scripts/get-jacoco-results.sh @@ -1,4 +1,21 @@ #!/bin/bash +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# search_dir="." From 9ecb89e47eccf62d0be77bed8ce440c954891756 Mon Sep 17 00:00:00 2001 From: Bernardo Botella Corbi Date: Fri, 20 Dec 2024 13:41:44 -0800 Subject: [PATCH 11/20] Test WS --- .circleci/config.yml | 14 +++++++------- scripts/get-jacoco-results.sh | 1 + 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9ff3b6d39..0af8bbf72 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -264,7 +264,7 @@ jobs: - store_test_results: path: build/test-results/ - persist_to_workspace: - root: jacoco-results + root: ./jacoco-results paths: - "**/*.exec" @@ -296,7 +296,7 @@ jobs: path: build/test-results/ - persist_to_workspace: - root: jacoco-results + root: ./jacoco-results paths: - "**/*.exec" @@ -328,7 +328,7 @@ jobs: path: build/test-results/ - persist_to_workspace: - root: jacoco-results + root: ./jacoco-results paths: - "**/*.exec" @@ -360,7 +360,7 @@ jobs: path: build/test-results/ - persist_to_workspace: - root: jacoco-results + root: ./jacoco-results paths: - "**/*.exec" @@ -392,7 +392,7 @@ jobs: path: build/test-results/ - persist_to_workspace: - root: jacoco-results + root: ./jacoco-results paths: - "**/*.exec" @@ -424,9 +424,9 @@ jobs: path: build/test-results/ - persist_to_workspace: - root: . + root: ./jacoco-results paths: - - "jacoco-results/jacoco-results/**/*.exec" + - "**/*.exec" # Delta coverage plugin requires java 11 so we only validate in java 11 builds validate_delta_coverage: diff --git a/scripts/get-jacoco-results.sh b/scripts/get-jacoco-results.sh index e71acb136..8304ddcd7 100755 --- a/scripts/get-jacoco-results.sh +++ b/scripts/get-jacoco-results.sh @@ -27,5 +27,6 @@ find "$search_dir" -type d -path "*/build/jacoco" -print0 | while IFS= read -r - destination_path="$target_folder/${dir:2}" mkdir -p "$destination_path" cp -r $dir "$destination_path" + echo "Copied folder $dir to $destination_path" done From 6cebfa562ff7cf34544c472bd666b296f6d1e76b Mon Sep 17 00:00:00 2001 From: Bernardo Botella Corbi Date: Fri, 20 Dec 2024 14:19:29 -0800 Subject: [PATCH 12/20] Test paths --- .circleci/config.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0af8bbf72..2b68369f3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -266,7 +266,7 @@ jobs: - persist_to_workspace: root: ./jacoco-results paths: - - "**/*.exec" + - "jacoco-results/*/*/build/jacoco/*.exec" integration_heavy_cassandra_40_java11: docker: @@ -298,7 +298,7 @@ jobs: - persist_to_workspace: root: ./jacoco-results paths: - - "**/*.exec" + - "jacoco-results/*/*/build/jacoco/*.exec" integration_cassandra_50_java11: docker: @@ -330,7 +330,7 @@ jobs: - persist_to_workspace: root: ./jacoco-results paths: - - "**/*.exec" + - "jacoco-results/*/*/build/jacoco/*.exec" integration_heavy_cassandra_50_java11: docker: @@ -362,7 +362,7 @@ jobs: - persist_to_workspace: root: ./jacoco-results paths: - - "**/*.exec" + - "jacoco-results/*/*/build/jacoco/*.exec" integration_cassandra_trunk_java11: docker: @@ -394,7 +394,7 @@ jobs: - persist_to_workspace: root: ./jacoco-results paths: - - "**/*.exec" + - "jacoco-results/*/*/build/jacoco/*.exec" integration_heavy_cassandra_trunk_java11: docker: @@ -426,7 +426,7 @@ jobs: - persist_to_workspace: root: ./jacoco-results paths: - - "**/*.exec" + - "jacoco-results/*/*/build/jacoco/*.exec" # Delta coverage plugin requires java 11 so we only validate in java 11 builds validate_delta_coverage: From 22889381445a51898af11483fc93a81bbce5c038 Mon Sep 17 00:00:00 2001 From: Bernardo Botella Corbi Date: Fri, 20 Dec 2024 14:49:40 -0800 Subject: [PATCH 13/20] Broader paths --- .circleci/config.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2b68369f3..c18d95981 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -266,7 +266,7 @@ jobs: - persist_to_workspace: root: ./jacoco-results paths: - - "jacoco-results/*/*/build/jacoco/*.exec" + - "jacoco-results/*" integration_heavy_cassandra_40_java11: docker: @@ -298,7 +298,7 @@ jobs: - persist_to_workspace: root: ./jacoco-results paths: - - "jacoco-results/*/*/build/jacoco/*.exec" + - "jacoco-results/*" integration_cassandra_50_java11: docker: @@ -330,7 +330,7 @@ jobs: - persist_to_workspace: root: ./jacoco-results paths: - - "jacoco-results/*/*/build/jacoco/*.exec" + - "jacoco-results/*" integration_heavy_cassandra_50_java11: docker: @@ -362,7 +362,7 @@ jobs: - persist_to_workspace: root: ./jacoco-results paths: - - "jacoco-results/*/*/build/jacoco/*.exec" + - "jacoco-results/*" integration_cassandra_trunk_java11: docker: @@ -394,7 +394,7 @@ jobs: - persist_to_workspace: root: ./jacoco-results paths: - - "jacoco-results/*/*/build/jacoco/*.exec" + - "jacoco-results/*" integration_heavy_cassandra_trunk_java11: docker: @@ -426,7 +426,7 @@ jobs: - persist_to_workspace: root: ./jacoco-results paths: - - "jacoco-results/*/*/build/jacoco/*.exec" + - "jacoco-results/*" # Delta coverage plugin requires java 11 so we only validate in java 11 builds validate_delta_coverage: From 6f6943686ac81eafb382a6678d9b4865dd54f3d3 Mon Sep 17 00:00:00 2001 From: Bernardo Botella Corbi Date: Fri, 20 Dec 2024 15:20:11 -0800 Subject: [PATCH 14/20] Relative paths --- .circleci/config.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c18d95981..1dfe728d1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -266,7 +266,7 @@ jobs: - persist_to_workspace: root: ./jacoco-results paths: - - "jacoco-results/*" + - "./jacoco-results/*" integration_heavy_cassandra_40_java11: docker: @@ -298,7 +298,7 @@ jobs: - persist_to_workspace: root: ./jacoco-results paths: - - "jacoco-results/*" + - "./jacoco-results/*" integration_cassandra_50_java11: docker: @@ -330,7 +330,7 @@ jobs: - persist_to_workspace: root: ./jacoco-results paths: - - "jacoco-results/*" + - "./jacoco-results/*" integration_heavy_cassandra_50_java11: docker: @@ -362,7 +362,7 @@ jobs: - persist_to_workspace: root: ./jacoco-results paths: - - "jacoco-results/*" + - "./jacoco-results/*" integration_cassandra_trunk_java11: docker: @@ -394,7 +394,7 @@ jobs: - persist_to_workspace: root: ./jacoco-results paths: - - "jacoco-results/*" + - "./jacoco-results/*" integration_heavy_cassandra_trunk_java11: docker: @@ -426,7 +426,7 @@ jobs: - persist_to_workspace: root: ./jacoco-results paths: - - "jacoco-results/*" + - "./jacoco-results/*" # Delta coverage plugin requires java 11 so we only validate in java 11 builds validate_delta_coverage: From c037ccb2071d2894d76b6153b6707fbf958a7d89 Mon Sep 17 00:00:00 2001 From: Bernardo Botella Corbi Date: Mon, 23 Dec 2024 07:04:56 -0800 Subject: [PATCH 15/20] Debug paths --- .circleci/config.yml | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1dfe728d1..4fad94c5a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -252,6 +252,9 @@ jobs: - run: ./scripts/install-shaded-dtest-jar-local.sh - run: ./gradlew --no-daemon -PdtestVersion=4.1.8 -Dcassandra.sidecar.versions_to_test="4.0" checkstyleIntegrationTest spotbugsIntegrationTest integrationTestLightWeight --stacktrace - run: ./scripts/get-jacoco-results.sh jacoco-results/<> + - run: + name: Debug jacoco-results folder + command: ls -R ./jacoco-results - store_artifacts: path: build/reports @@ -266,7 +269,7 @@ jobs: - persist_to_workspace: root: ./jacoco-results paths: - - "./jacoco-results/*" + - "**/*.exec" integration_heavy_cassandra_40_java11: docker: @@ -283,6 +286,9 @@ jobs: - run: ./scripts/install-shaded-dtest-jar-local.sh - run: ./gradlew --no-daemon -PdtestVersion=4.1.8 -Dcassandra.sidecar.versions_to_test="4.0" integrationTestHeavyWeight --stacktrace - run: ./scripts/get-jacoco-results.sh jacoco-results/<> + - run: + name: Debug jacoco-results folder + command: ls -R ./jacoco-results - store_artifacts: path: build/reports @@ -298,7 +304,7 @@ jobs: - persist_to_workspace: root: ./jacoco-results paths: - - "./jacoco-results/*" + - "**/*.exec" integration_cassandra_50_java11: docker: @@ -315,6 +321,9 @@ jobs: - run: ./scripts/install-shaded-dtest-jar-local.sh - run: ./gradlew --no-daemon -PdtestVersion=5.0.3 -Dcassandra.sidecar.versions_to_test="5.0" checkstyleIntegrationTest spotbugsIntegrationTest integrationTestLightWeight --stacktrace - run: ./scripts/get-jacoco-results.sh jacoco-results/<> + - run: + name: Debug jacoco-results folder + command: ls -R ./jacoco-results - store_artifacts: path: build/reports @@ -330,7 +339,7 @@ jobs: - persist_to_workspace: root: ./jacoco-results paths: - - "./jacoco-results/*" + - "**/*.exec" integration_heavy_cassandra_50_java11: docker: @@ -347,6 +356,9 @@ jobs: - run: ./scripts/install-shaded-dtest-jar-local.sh - run: ./gradlew --no-daemon -PdtestVersion=5.0.3 -Dcassandra.sidecar.versions_to_test="5.0" integrationTestHeavyWeight --stacktrace - run: ./scripts/get-jacoco-results.sh jacoco-results/<> + - run: + name: Debug jacoco-results folder + command: ls -R ./jacoco-results - store_artifacts: path: build/reports @@ -362,7 +374,7 @@ jobs: - persist_to_workspace: root: ./jacoco-results paths: - - "./jacoco-results/*" + - "**/*.exec" integration_cassandra_trunk_java11: docker: @@ -379,6 +391,9 @@ jobs: - run: ./scripts/install-shaded-dtest-jar-local.sh - run: ./gradlew --no-daemon -PdtestVersion=5.1 -Dcassandra.sidecar.versions_to_test="5.1" checkstyleIntegrationTest spotbugsIntegrationTest integrationTestLightWeight --stacktrace - run: ./scripts/get-jacoco-results.sh jacoco-results/<> + - run: + name: Debug jacoco-results folder + command: ls -R ./jacoco-results - store_artifacts: path: build/reports @@ -394,7 +409,7 @@ jobs: - persist_to_workspace: root: ./jacoco-results paths: - - "./jacoco-results/*" + - "**/*.exec" integration_heavy_cassandra_trunk_java11: docker: @@ -411,6 +426,9 @@ jobs: - run: ./scripts/install-shaded-dtest-jar-local.sh - run: ./gradlew --no-daemon -PdtestVersion=5.1 -Dcassandra.sidecar.versions_to_test="5.1" integrationTestHeavyWeight --stacktrace - run: ./scripts/get-jacoco-results.sh jacoco-results/<> + - run: + name: Debug jacoco-results folder + command: ls -R ./jacoco-results - store_artifacts: path: build/reports @@ -426,7 +444,7 @@ jobs: - persist_to_workspace: root: ./jacoco-results paths: - - "./jacoco-results/*" + - "**/*.exec" # Delta coverage plugin requires java 11 so we only validate in java 11 builds validate_delta_coverage: From da90a2b6a3032e401ffbea64167407e31d4e6f93 Mon Sep 17 00:00:00 2001 From: Bernardo Botella Corbi Date: Mon, 23 Dec 2024 07:39:02 -0800 Subject: [PATCH 16/20] Debug paths --- .circleci/config.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4fad94c5a..df7305173 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -254,7 +254,7 @@ jobs: - run: ./scripts/get-jacoco-results.sh jacoco-results/<> - run: name: Debug jacoco-results folder - command: ls -R ./jacoco-results + command: ls -R ./jacoco-results && cd ./jacoco-results && pwd - store_artifacts: path: build/reports @@ -288,7 +288,7 @@ jobs: - run: ./scripts/get-jacoco-results.sh jacoco-results/<> - run: name: Debug jacoco-results folder - command: ls -R ./jacoco-results + command: ls -R ./jacoco-results && cd ./jacoco-results && pwd - store_artifacts: path: build/reports @@ -323,7 +323,7 @@ jobs: - run: ./scripts/get-jacoco-results.sh jacoco-results/<> - run: name: Debug jacoco-results folder - command: ls -R ./jacoco-results + command: ls -R ./jacoco-results && cd ./jacoco-results && pwd - store_artifacts: path: build/reports @@ -358,7 +358,7 @@ jobs: - run: ./scripts/get-jacoco-results.sh jacoco-results/<> - run: name: Debug jacoco-results folder - command: ls -R ./jacoco-results + command: ls -R ./jacoco-results && cd ./jacoco-results && pwd - store_artifacts: path: build/reports @@ -393,7 +393,7 @@ jobs: - run: ./scripts/get-jacoco-results.sh jacoco-results/<> - run: name: Debug jacoco-results folder - command: ls -R ./jacoco-results + command: ls -R ./jacoco-results && cd ./jacoco-results && pwd - store_artifacts: path: build/reports @@ -428,7 +428,7 @@ jobs: - run: ./scripts/get-jacoco-results.sh jacoco-results/<> - run: name: Debug jacoco-results folder - command: ls -R ./jacoco-results + command: ls -R ./jacoco-results && cd ./jacoco-results && pwd - store_artifacts: path: build/reports From 8b84ba76b9aa346251a2acedd6fc45fb5be674d9 Mon Sep 17 00:00:00 2001 From: Bernardo Botella Corbi Date: Mon, 23 Dec 2024 07:40:05 -0800 Subject: [PATCH 17/20] Debug paths --- .circleci/config.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index df7305173..c13ec805f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -254,7 +254,7 @@ jobs: - run: ./scripts/get-jacoco-results.sh jacoco-results/<> - run: name: Debug jacoco-results folder - command: ls -R ./jacoco-results && cd ./jacoco-results && pwd + command: pwd && ls -R ./jacoco-results && cd ./jacoco-results - store_artifacts: path: build/reports @@ -288,7 +288,7 @@ jobs: - run: ./scripts/get-jacoco-results.sh jacoco-results/<> - run: name: Debug jacoco-results folder - command: ls -R ./jacoco-results && cd ./jacoco-results && pwd + command: pwd && ls -R ./jacoco-results && cd ./jacoco-results - store_artifacts: path: build/reports @@ -323,7 +323,7 @@ jobs: - run: ./scripts/get-jacoco-results.sh jacoco-results/<> - run: name: Debug jacoco-results folder - command: ls -R ./jacoco-results && cd ./jacoco-results && pwd + command: pwd && ls -R ./jacoco-results && cd ./jacoco-results - store_artifacts: path: build/reports @@ -358,7 +358,7 @@ jobs: - run: ./scripts/get-jacoco-results.sh jacoco-results/<> - run: name: Debug jacoco-results folder - command: ls -R ./jacoco-results && cd ./jacoco-results && pwd + command: pwd && ls -R ./jacoco-results && cd ./jacoco-results - store_artifacts: path: build/reports @@ -393,7 +393,7 @@ jobs: - run: ./scripts/get-jacoco-results.sh jacoco-results/<> - run: name: Debug jacoco-results folder - command: ls -R ./jacoco-results && cd ./jacoco-results && pwd + command: pwd && ls -R ./jacoco-results && cd ./jacoco-results - store_artifacts: path: build/reports @@ -428,7 +428,7 @@ jobs: - run: ./scripts/get-jacoco-results.sh jacoco-results/<> - run: name: Debug jacoco-results folder - command: ls -R ./jacoco-results && cd ./jacoco-results && pwd + command: pwd && ls -R ./jacoco-results && cd ./jacoco-results - store_artifacts: path: build/reports From 3251d8f75ddf40d1cc80dd52c2f6c0cd8e181e41 Mon Sep 17 00:00:00 2001 From: Bernardo Botella Corbi Date: Mon, 23 Dec 2024 08:28:39 -0800 Subject: [PATCH 18/20] New paths --- .circleci/config.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c13ec805f..7c333cddc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -269,7 +269,7 @@ jobs: - persist_to_workspace: root: ./jacoco-results paths: - - "**/*.exec" + - "**/*" integration_heavy_cassandra_40_java11: docker: @@ -304,7 +304,7 @@ jobs: - persist_to_workspace: root: ./jacoco-results paths: - - "**/*.exec" + - "**/*" integration_cassandra_50_java11: docker: @@ -339,7 +339,7 @@ jobs: - persist_to_workspace: root: ./jacoco-results paths: - - "**/*.exec" + - "**/*" integration_heavy_cassandra_50_java11: docker: @@ -374,7 +374,7 @@ jobs: - persist_to_workspace: root: ./jacoco-results paths: - - "**/*.exec" + - "**/*" integration_cassandra_trunk_java11: docker: @@ -409,7 +409,7 @@ jobs: - persist_to_workspace: root: ./jacoco-results paths: - - "**/*.exec" + - "**/*" integration_heavy_cassandra_trunk_java11: docker: @@ -444,7 +444,7 @@ jobs: - persist_to_workspace: root: ./jacoco-results paths: - - "**/*.exec" + - "**/*" # Delta coverage plugin requires java 11 so we only validate in java 11 builds validate_delta_coverage: From 5ba0481c1cbf587f09272bbfe803562e459464d3 Mon Sep 17 00:00:00 2001 From: Bernardo Botella Corbi Date: Mon, 23 Dec 2024 09:44:44 -0800 Subject: [PATCH 19/20] Move to unique folder --- .circleci/config.yml | 42 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 36 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7c333cddc..8af044ebe 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -251,7 +251,12 @@ jobs: at: dtest-jars - run: ./scripts/install-shaded-dtest-jar-local.sh - run: ./gradlew --no-daemon -PdtestVersion=4.1.8 -Dcassandra.sidecar.versions_to_test="4.0" checkstyleIntegrationTest spotbugsIntegrationTest integrationTestLightWeight --stacktrace - - run: ./scripts/get-jacoco-results.sh jacoco-results/<> + - run: + name: Move Jacoco results to unique folder + command: | + UNIQUE_ID="${CIRCLE_WORKFLOW_ID}-${CIRCLE_JOB}-${CIRCLE_NODE_INDEX}" + echo "Unique ID: $UNIQUE_ID" + ./scripts/get-jacoco-results.sh "jacoco-results/${UNIQUE_ID}" - run: name: Debug jacoco-results folder command: pwd && ls -R ./jacoco-results && cd ./jacoco-results @@ -285,7 +290,12 @@ jobs: at: dtest-jars - run: ./scripts/install-shaded-dtest-jar-local.sh - run: ./gradlew --no-daemon -PdtestVersion=4.1.8 -Dcassandra.sidecar.versions_to_test="4.0" integrationTestHeavyWeight --stacktrace - - run: ./scripts/get-jacoco-results.sh jacoco-results/<> + - run: + name: Move Jacoco results to unique folder + command: | + UNIQUE_ID="${CIRCLE_WORKFLOW_ID}-${CIRCLE_JOB}-${CIRCLE_NODE_INDEX}" + echo "Unique ID: $UNIQUE_ID" + ./scripts/get-jacoco-results.sh "jacoco-results/${UNIQUE_ID}" - run: name: Debug jacoco-results folder command: pwd && ls -R ./jacoco-results && cd ./jacoco-results @@ -320,7 +330,12 @@ jobs: at: dtest-jars - run: ./scripts/install-shaded-dtest-jar-local.sh - run: ./gradlew --no-daemon -PdtestVersion=5.0.3 -Dcassandra.sidecar.versions_to_test="5.0" checkstyleIntegrationTest spotbugsIntegrationTest integrationTestLightWeight --stacktrace - - run: ./scripts/get-jacoco-results.sh jacoco-results/<> + - run: + name: Move Jacoco results to unique folder + command: | + UNIQUE_ID="${CIRCLE_WORKFLOW_ID}-${CIRCLE_JOB}-${CIRCLE_NODE_INDEX}" + echo "Unique ID: $UNIQUE_ID" + ./scripts/get-jacoco-results.sh "jacoco-results/${UNIQUE_ID}" - run: name: Debug jacoco-results folder command: pwd && ls -R ./jacoco-results && cd ./jacoco-results @@ -355,7 +370,12 @@ jobs: at: dtest-jars - run: ./scripts/install-shaded-dtest-jar-local.sh - run: ./gradlew --no-daemon -PdtestVersion=5.0.3 -Dcassandra.sidecar.versions_to_test="5.0" integrationTestHeavyWeight --stacktrace - - run: ./scripts/get-jacoco-results.sh jacoco-results/<> + - run: + name: Move Jacoco results to unique folder + command: | + UNIQUE_ID="${CIRCLE_WORKFLOW_ID}-${CIRCLE_JOB}-${CIRCLE_NODE_INDEX}" + echo "Unique ID: $UNIQUE_ID" + ./scripts/get-jacoco-results.sh "jacoco-results/${UNIQUE_ID}" - run: name: Debug jacoco-results folder command: pwd && ls -R ./jacoco-results && cd ./jacoco-results @@ -390,7 +410,12 @@ jobs: at: dtest-jars - run: ./scripts/install-shaded-dtest-jar-local.sh - run: ./gradlew --no-daemon -PdtestVersion=5.1 -Dcassandra.sidecar.versions_to_test="5.1" checkstyleIntegrationTest spotbugsIntegrationTest integrationTestLightWeight --stacktrace - - run: ./scripts/get-jacoco-results.sh jacoco-results/<> + - run: + name: Move Jacoco results to unique folder + command: | + UNIQUE_ID="${CIRCLE_WORKFLOW_ID}-${CIRCLE_JOB}-${CIRCLE_NODE_INDEX}" + echo "Unique ID: $UNIQUE_ID" + ./scripts/get-jacoco-results.sh "jacoco-results/${UNIQUE_ID}" - run: name: Debug jacoco-results folder command: pwd && ls -R ./jacoco-results && cd ./jacoco-results @@ -425,7 +450,12 @@ jobs: at: dtest-jars - run: ./scripts/install-shaded-dtest-jar-local.sh - run: ./gradlew --no-daemon -PdtestVersion=5.1 -Dcassandra.sidecar.versions_to_test="5.1" integrationTestHeavyWeight --stacktrace - - run: ./scripts/get-jacoco-results.sh jacoco-results/<> + - run: + name: Move Jacoco results to unique folder + command: | + UNIQUE_ID="${CIRCLE_WORKFLOW_ID}-${CIRCLE_JOB}-${CIRCLE_NODE_INDEX}" + echo "Unique ID: $UNIQUE_ID" + ./scripts/get-jacoco-results.sh "jacoco-results/${UNIQUE_ID}" - run: name: Debug jacoco-results folder command: pwd && ls -R ./jacoco-results && cd ./jacoco-results From f5842158f30fca6e164a75ec5eee2dd30150f198 Mon Sep 17 00:00:00 2001 From: Bernardo Botella Corbi Date: Mon, 23 Dec 2024 09:45:13 -0800 Subject: [PATCH 20/20] Remove debug --- .circleci/config.yml | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8af044ebe..6d32c975d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -257,10 +257,6 @@ jobs: UNIQUE_ID="${CIRCLE_WORKFLOW_ID}-${CIRCLE_JOB}-${CIRCLE_NODE_INDEX}" echo "Unique ID: $UNIQUE_ID" ./scripts/get-jacoco-results.sh "jacoco-results/${UNIQUE_ID}" - - run: - name: Debug jacoco-results folder - command: pwd && ls -R ./jacoco-results && cd ./jacoco-results - - store_artifacts: path: build/reports destination: test-reports @@ -296,10 +292,6 @@ jobs: UNIQUE_ID="${CIRCLE_WORKFLOW_ID}-${CIRCLE_JOB}-${CIRCLE_NODE_INDEX}" echo "Unique ID: $UNIQUE_ID" ./scripts/get-jacoco-results.sh "jacoco-results/${UNIQUE_ID}" - - run: - name: Debug jacoco-results folder - command: pwd && ls -R ./jacoco-results && cd ./jacoco-results - - store_artifacts: path: build/reports destination: test-reports @@ -336,10 +328,6 @@ jobs: UNIQUE_ID="${CIRCLE_WORKFLOW_ID}-${CIRCLE_JOB}-${CIRCLE_NODE_INDEX}" echo "Unique ID: $UNIQUE_ID" ./scripts/get-jacoco-results.sh "jacoco-results/${UNIQUE_ID}" - - run: - name: Debug jacoco-results folder - command: pwd && ls -R ./jacoco-results && cd ./jacoco-results - - store_artifacts: path: build/reports destination: test-reports @@ -376,10 +364,6 @@ jobs: UNIQUE_ID="${CIRCLE_WORKFLOW_ID}-${CIRCLE_JOB}-${CIRCLE_NODE_INDEX}" echo "Unique ID: $UNIQUE_ID" ./scripts/get-jacoco-results.sh "jacoco-results/${UNIQUE_ID}" - - run: - name: Debug jacoco-results folder - command: pwd && ls -R ./jacoco-results && cd ./jacoco-results - - store_artifacts: path: build/reports destination: test-reports @@ -416,10 +400,6 @@ jobs: UNIQUE_ID="${CIRCLE_WORKFLOW_ID}-${CIRCLE_JOB}-${CIRCLE_NODE_INDEX}" echo "Unique ID: $UNIQUE_ID" ./scripts/get-jacoco-results.sh "jacoco-results/${UNIQUE_ID}" - - run: - name: Debug jacoco-results folder - command: pwd && ls -R ./jacoco-results && cd ./jacoco-results - - store_artifacts: path: build/reports destination: test-reports @@ -456,10 +436,6 @@ jobs: UNIQUE_ID="${CIRCLE_WORKFLOW_ID}-${CIRCLE_JOB}-${CIRCLE_NODE_INDEX}" echo "Unique ID: $UNIQUE_ID" ./scripts/get-jacoco-results.sh "jacoco-results/${UNIQUE_ID}" - - run: - name: Debug jacoco-results folder - command: pwd && ls -R ./jacoco-results && cd ./jacoco-results - - store_artifacts: path: build/reports destination: test-reports