From: Ioakeim Samaras Date: Tue, 3 Dec 2019 01:56:30 +0000 (-0800) Subject: [UI] Ignore malformed results X-Git-Tag: 2.0.1~2 X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F87%2F2087%2F1;p=validation.git [UI] Ignore malformed results Validation results are ignored when there are no robot test results associated with them Signed-off-by: Ioakeim Samaras Change-Id: Ia27c20022105e202e24f0281b7a7f69a6212fcc4 --- diff --git a/ui/CHANGELOG.md b/ui/CHANGELOG.md index 6983f2e..6ea7dfc 100644 --- a/ui/CHANGELOG.md +++ b/ui/CHANGELOG.md @@ -251,3 +251,11 @@ All notable changes to this project will be documented in this file. - The files 'server.xml' and index.jsp are embedded inside the UI docker image during build stage ### Removed + +## [0.4.6-SNAPSHOT] - 02 December 2019 +### Added + +### Changed +- Validation results are ignored when there are no robot test results associated with them + +### Removed diff --git a/ui/pom.xml b/ui/pom.xml index 281781e..1a77fc8 100644 --- a/ui/pom.xml +++ b/ui/pom.xml @@ -14,7 +14,7 @@ org.akraino.validation ui - 0.4.5-SNAPSHOT + 0.4.6-SNAPSHOT Bluval UI Maven Webapp war diff --git a/ui/src/main/java/org/akraino/validation/ui/client/nexus/NexusExecutorClient.java b/ui/src/main/java/org/akraino/validation/ui/client/nexus/NexusExecutorClient.java index 38c653d..ffd27a8 100644 --- a/ui/src/main/java/org/akraino/validation/ui/client/nexus/NexusExecutorClient.java +++ b/ui/src/main/java/org/akraino/validation/ui/client/nexus/NexusExecutorClient.java @@ -254,7 +254,7 @@ public final class NexusExecutorClient { vDbResult.setTimestamp(timestamp); vDbResults.add(vDbResult); } - } catch (IllegalArgumentException | HttpException | NullPointerException | NoSuchElementException ex) { + } catch (HttpException | RuntimeException ex) { LOGGER.warn(EELFLoggerDelegate.auditLogger, "Exception occured while retrieving timestamp : " + timestamp + " result." + UserUtils.getStackTrace(ex)); continue; @@ -287,7 +287,7 @@ public final class NexusExecutorClient { timestamp = timestamp.substring(0, timestamp.length() - 1); ValidationDbTestResult vDbResult = this.getResult(name, version, siloText, timestamp); vDbResults.add(vDbResult); - } catch (IllegalArgumentException | HttpException | NullPointerException ex) { + } catch (HttpException | RuntimeException ex) { LOGGER.warn(EELFLoggerDelegate.auditLogger, "Exception occured while retrieving timestamp results. " + UserUtils.getStackTrace(ex)); continue; @@ -351,7 +351,7 @@ public final class NexusExecutorClient { } } return vDbResult; - } catch (IllegalArgumentException | HttpException | NullPointerException ex) { + } catch (HttpException | RuntimeException ex) { LOGGER.warn(EELFLoggerDelegate.auditLogger, "Error when trying to retrieve results. " + UserUtils.getStackTrace(ex)); continue; @@ -409,7 +409,7 @@ public final class NexusExecutorClient { continue; } return vDbResult; - } catch (IllegalArgumentException | HttpException | NullPointerException ex) { + } catch (HttpException | RuntimeException ex) { LOGGER.warn(EELFLoggerDelegate.auditLogger, "Error when trying to retrieve results. " + UserUtils.getStackTrace(ex)); continue; @@ -444,6 +444,9 @@ public final class NexusExecutorClient { continue; } List robotTestResults = getRobotTestResults(nexusUrl + "/" + layer); + if (robotTestResults.size() < 1) { + continue; + } WRobotNexusTestResult wrapper = new WRobotNexusTestResult(); wrapper.setLayer(layer); wrapper.setRobotNexusTestResults(robotTestResults); diff --git a/ui/src/main/java/org/akraino/validation/ui/service/IntegratedResultService.java b/ui/src/main/java/org/akraino/validation/ui/service/IntegratedResultService.java index 555b948..5ad2201 100644 --- a/ui/src/main/java/org/akraino/validation/ui/service/IntegratedResultService.java +++ b/ui/src/main/java/org/akraino/validation/ui/service/IntegratedResultService.java @@ -198,7 +198,7 @@ public class IntegratedResultService { } List vNexusResults = new ArrayList(); List vResults = nexusService.getResults(name, version, labInfo.getSilo(), date); - if (vResults != null && vResults.size() > 1) { + if (vResults != null && vResults.size() >= 1) { for (ValidationDbTestResult vNexusResult : vResults) { if (dbAdapter.checkValidityOfNexusResult(vNexusResult)) { vNexusResult.setLab(labInfo); diff --git a/ui/src/main/webapp/app/BluvalUI/ValidationResults/ValidationResults.Services.js b/ui/src/main/webapp/app/BluvalUI/ValidationResults/ValidationResults.Services.js index eb545eb..46d1543 100644 --- a/ui/src/main/webapp/app/BluvalUI/ValidationResults/ValidationResults.Services.js +++ b/ui/src/main/webapp/app/BluvalUI/ValidationResults/ValidationResults.Services.js @@ -78,11 +78,20 @@ app } svc.filterWithResult = function(validationDbTestResults, filterResult) { + var validationDbTestResultsWithNoErrors = []; + angular + .forEach( + validationDbTestResults, + function(validationDbTestResult) { + if (validationDbTestResult.submission || (validationDbTestResult.wrobotDbTestResults && validationDbTestResult.wrobotDbTestResults.length > 0)) { + validationDbTestResultsWithNoErrors.push(validationDbTestResult); + } + }); if (filterResult === undefined || filterResult === '') { - return validationDbTestResults; + return validationDbTestResultsWithNoErrors; } var filteredResults = []; - angular.forEach(validationDbTestResults, function( + angular.forEach(validationDbTestResultsWithNoErrors, function( validationDbTestResult) { if (validationDbTestResult.result === true && 'success'.includes(filterResult