From 47d0d84ac895594789ffa7b1b07779e4d72ce310 Mon Sep 17 00:00:00 2001 From: YogyaGamage <47789154+YogyaGamage@users.noreply.github.com> Date: Thu, 12 Oct 2023 14:48:50 +0200 Subject: [PATCH] Update failure types in the pipeline --- ...76fa1446ee6c34e234e0a3c6103d84274e395.json | 2 +- ...2498bff0636c4e6e0cfd24b86874de402a827.json | 2 +- ...67194a0df3fc948d270c46cb7d4d44d20f7ae.json | 2 +- ...7de4d1bf0ecb21460c6531ea646de0f7c41c9.json | 2 +- ...15316429cac969e560d5428540db93ecb89e8.json | 2 +- ...836e601fceb54972203e03e56474379e20e74.json | 2 +- .../breaking-update.schema.json | 5 ----- .../miner/ReproducibleBreakingUpdate.java | 21 ++----------------- src/main/java/reproducer/ResultManager.java | 13 +++--------- 9 files changed, 11 insertions(+), 40 deletions(-) diff --git a/data/sanity-check-failures/0b776fa1446ee6c34e234e0a3c6103d84274e395.json b/data/sanity-check-failures/0b776fa1446ee6c34e234e0a3c6103d84274e395.json index 87ca99c0d4b5..d3eead347fe4 100644 --- a/data/sanity-check-failures/0b776fa1446ee6c34e234e0a3c6103d84274e395.json +++ b/data/sanity-check-failures/0b776fa1446ee6c34e234e0a3c6103d84274e395.json @@ -22,5 +22,5 @@ "preCommitReproductionCommand" : "docker run ghcr.io/chains-project/breaking-updates:0b776fa1446ee6c34e234e0a3c6103d84274e395-pre", "breakingUpdateReproductionCommand" : "docker run ghcr.io/chains-project/breaking-updates:0b776fa1446ee6c34e234e0a3c6103d84274e395-breaking", "javaVersionUsedForReproduction" : "11", - "failureCategory" : "JENKINS_PLUGIN_FAILURE" + "failureCategory" : "ENFORCER_FAILURE" } \ No newline at end of file diff --git a/data/sanity-check-failures/3d92498bff0636c4e6e0cfd24b86874de402a827.json b/data/sanity-check-failures/3d92498bff0636c4e6e0cfd24b86874de402a827.json index 98aa7ae7c160..7ac38ef63899 100644 --- a/data/sanity-check-failures/3d92498bff0636c4e6e0cfd24b86874de402a827.json +++ b/data/sanity-check-failures/3d92498bff0636c4e6e0cfd24b86874de402a827.json @@ -22,5 +22,5 @@ "preCommitReproductionCommand" : "docker run ghcr.io/chains-project/breaking-updates:3d92498bff0636c4e6e0cfd24b86874de402a827-pre", "breakingUpdateReproductionCommand" : "docker run ghcr.io/chains-project/breaking-updates:3d92498bff0636c4e6e0cfd24b86874de402a827-breaking", "javaVersionUsedForReproduction" : "11", - "failureCategory" : "JENKINS_PLUGIN_FAILURE" + "failureCategory" : "ENFORCER_FAILURE" } \ No newline at end of file diff --git a/data/sanity-check-failures/b8b67194a0df3fc948d270c46cb7d4d44d20f7ae.json b/data/sanity-check-failures/b8b67194a0df3fc948d270c46cb7d4d44d20f7ae.json index 123b2f057576..27ee5822e2b5 100644 --- a/data/sanity-check-failures/b8b67194a0df3fc948d270c46cb7d4d44d20f7ae.json +++ b/data/sanity-check-failures/b8b67194a0df3fc948d270c46cb7d4d44d20f7ae.json @@ -22,5 +22,5 @@ "preCommitReproductionCommand" : "docker run ghcr.io/chains-project/breaking-updates:b8b67194a0df3fc948d270c46cb7d4d44d20f7ae-pre", "breakingUpdateReproductionCommand" : "docker run ghcr.io/chains-project/breaking-updates:b8b67194a0df3fc948d270c46cb7d4d44d20f7ae-breaking", "javaVersionUsedForReproduction" : "11", - "failureCategory" : "MAVEN_ENFORCER_FAILURE" + "failureCategory" : "ENFORCER_FAILURE" } \ No newline at end of file diff --git a/data/sanity-check-failures/cae7de4d1bf0ecb21460c6531ea646de0f7c41c9.json b/data/sanity-check-failures/cae7de4d1bf0ecb21460c6531ea646de0f7c41c9.json index caaefb3323da..f253aec4ea8b 100644 --- a/data/sanity-check-failures/cae7de4d1bf0ecb21460c6531ea646de0f7c41c9.json +++ b/data/sanity-check-failures/cae7de4d1bf0ecb21460c6531ea646de0f7c41c9.json @@ -22,5 +22,5 @@ "preCommitReproductionCommand" : "docker run ghcr.io/chains-project/breaking-updates:cae7de4d1bf0ecb21460c6531ea646de0f7c41c9-pre", "breakingUpdateReproductionCommand" : "docker run ghcr.io/chains-project/breaking-updates:cae7de4d1bf0ecb21460c6531ea646de0f7c41c9-breaking", "javaVersionUsedForReproduction" : "11", - "failureCategory" : "MAVEN_ENFORCER_FAILURE" + "failureCategory" : "ENFORCER_FAILURE" } \ No newline at end of file diff --git a/data/sanity-check-failures/d0515316429cac969e560d5428540db93ecb89e8.json b/data/sanity-check-failures/d0515316429cac969e560d5428540db93ecb89e8.json index 1078f7f3a420..fc7af4f86011 100644 --- a/data/sanity-check-failures/d0515316429cac969e560d5428540db93ecb89e8.json +++ b/data/sanity-check-failures/d0515316429cac969e560d5428540db93ecb89e8.json @@ -22,5 +22,5 @@ "preCommitReproductionCommand" : "docker run ghcr.io/chains-project/breaking-updates:d0515316429cac969e560d5428540db93ecb89e8-pre", "breakingUpdateReproductionCommand" : "docker run ghcr.io/chains-project/breaking-updates:d0515316429cac969e560d5428540db93ecb89e8-breaking", "javaVersionUsedForReproduction" : "11", - "failureCategory" : "MAVEN_ENFORCER_FAILURE" + "failureCategory" : "ENFORCER_FAILURE" } \ No newline at end of file diff --git a/data/sanity-check-failures/d37836e601fceb54972203e03e56474379e20e74.json b/data/sanity-check-failures/d37836e601fceb54972203e03e56474379e20e74.json index 09cf2657674e..efb83a16a117 100644 --- a/data/sanity-check-failures/d37836e601fceb54972203e03e56474379e20e74.json +++ b/data/sanity-check-failures/d37836e601fceb54972203e03e56474379e20e74.json @@ -22,5 +22,5 @@ "preCommitReproductionCommand" : "docker run ghcr.io/chains-project/breaking-updates:d37836e601fceb54972203e03e56474379e20e74-pre", "breakingUpdateReproductionCommand" : "docker run ghcr.io/chains-project/breaking-updates:d37836e601fceb54972203e03e56474379e20e74-breaking", "javaVersionUsedForReproduction" : "11", - "failureCategory" : "MAVEN_ENFORCER_FAILURE" + "failureCategory" : "ENFORCER_FAILURE" } \ No newline at end of file diff --git a/schemas/successful-reproduction-schemas/breaking-update.schema.json b/schemas/successful-reproduction-schemas/breaking-update.schema.json index 5341a498debb..6918246d3f4a 100644 --- a/schemas/successful-reproduction-schemas/breaking-update.schema.json +++ b/schemas/successful-reproduction-schemas/breaking-update.schema.json @@ -93,12 +93,7 @@ "enum": [ "DEPENDENCY_RESOLUTION_FAILURE", "DEPENDENCY_LOCK_FAILURE", - "MAVEN_ENFORCER_FAILURE", "ENFORCER_FAILURE", - "JENKINS_PLUGIN_FAILURE", - "JAXB_FAILURE", - "SCM_CHECKOUT_FAILURE", - "CHECKSTYLE_FAILURE", "COMPILATION_FAILURE", "TEST_FAILURE", "UNKNOWN_FAILURE" diff --git a/src/main/java/miner/ReproducibleBreakingUpdate.java b/src/main/java/miner/ReproducibleBreakingUpdate.java index 54f8890dc1fa..698f33fd03b2 100644 --- a/src/main/java/miner/ReproducibleBreakingUpdate.java +++ b/src/main/java/miner/ReproducibleBreakingUpdate.java @@ -114,27 +114,10 @@ public enum FailureCategory { */ DEPENDENCY_LOCK_FAILURE, /** - * There were Jenkins plugin failures after updating the dependency because the updated dependency - * requires a higher version of parent POM. - */ - JENKINS_PLUGIN_FAILURE, - /** - * There were JAXB plugin failures after updating the dependency. - */ - JAXB_FAILURE, - /** - * There were SCM plugin failures at checkout step after updating the dependency. - */ - SCM_CHECKOUT_FAILURE, - /** - * There were Checkstyle plugin failures after updating the dependency. - */ - CHECKSTYLE_FAILURE, - /** - * The compilation failed due to failing maven enforcer rules after updating the dependency, + * The compilation failed due to failing enforcer rules after updating the dependency, * but in the previous commit there were no failures. */ - MAVEN_ENFORCER_FAILURE, + ENFORCER_FAILURE, /** * The compilation failed after updating the dependency, but succeeded for the previous commit. */ diff --git a/src/main/java/reproducer/ResultManager.java b/src/main/java/reproducer/ResultManager.java index 684e80a1fc91..5e8cabd5ca6d 100644 --- a/src/main/java/reproducer/ResultManager.java +++ b/src/main/java/reproducer/ResultManager.java @@ -84,16 +84,9 @@ public class ResultManager { FAILURE_PATTERNS.put(Pattern.compile("(?i)(\\[ERROR] Tests run:|There are test failures|There were test failures|" + "Failed to execute goal org\\.apache\\.maven\\.plugins:maven-surefire-plugin)"), FailureCategory.TEST_FAILURE); - FAILURE_PATTERNS.put(Pattern.compile("(?i)(Failed to execute goal org\\.jenkins-ci\\.tools:maven-hpi-plugin)"), - FailureCategory.JENKINS_PLUGIN_FAILURE); - FAILURE_PATTERNS.put(Pattern.compile("(?i)(Failed to execute goal org\\.jvnet\\.jaxb2\\.maven2:maven-jaxb2-plugin)"), - FailureCategory.JAXB_FAILURE); - FAILURE_PATTERNS.put(Pattern.compile("(?i)(Failed to execute goal org\\.apache\\.maven\\.plugins:maven-scm-plugin:.*?:checkout)"), - FailureCategory.SCM_CHECKOUT_FAILURE); - FAILURE_PATTERNS.put(Pattern.compile("(?i)(Failed to execute goal org\\.apache\\.maven\\.plugins:maven-checkstyle-plugin:.*?:check)"), - FailureCategory.CHECKSTYLE_FAILURE); - FAILURE_PATTERNS.put(Pattern.compile("(?i)(Failed to execute goal org\\.apache\\.maven\\.plugins:maven-enforcer-plugin)"), - FailureCategory.MAVEN_ENFORCER_FAILURE); + FAILURE_PATTERNS.put(Pattern.compile("(?i)(Failed to execute goal org\\.apache\\.maven\\.plugins:maven-enforcer-plugin|" + + "Failed to execute goal org\\.jenkins-ci\\.tools:maven-hpi-plugin)"), + FailureCategory.ENFORCER_FAILURE); FAILURE_PATTERNS.put(Pattern.compile("(?i)(Could not resolve dependencies|\\[ERROR] Some problems were encountered while processing the POMs|" + "\\[ERROR] .*?The following artifacts could not be resolved)"), FailureCategory.DEPENDENCY_RESOLUTION_FAILURE);