From d5fb9da24fd35c8dc02349d8deb0af0ff743eb9b Mon Sep 17 00:00:00 2001 From: Piotr Marcinkiewicz Date: Wed, 2 Jun 2021 16:15:20 +0200 Subject: Add logging ValidationResult Issue-ID: SDC-3185 Signed-off-by: Piotr Marcinkiewicz Change-Id: Ifd20b83e50c5069899ef53a0049ab07ab4394a8e --- Changelog.md | 4 ++++ pom.xml | 2 +- .../org/onap/sdc/helmvalidator/api/ValidationController.java | 1 + .../helm/validation/model/ValidationResult.java | 12 ++++++++++++ version.properties | 2 +- 5 files changed, 19 insertions(+), 2 deletions(-) diff --git a/Changelog.md b/Changelog.md index 3127917..836eb31 100644 --- a/Changelog.md +++ b/Changelog.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [1.2.1] - 07/06/2021 + +- Add logging validation response in debug mode + ## [1.2.0] - 21/04/2021 - Add a configuration of logging level by 'LOG_LEVEL' system environment variable diff --git a/pom.xml b/pom.xml index 2ae90bf..96cf0ff 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ org.onap.sdc sdc-helm-validator - 1.2.0-SNAPSHOT + 1.2.1-SNAPSHOT helmvalidator Spring-Boot application for validating helm charts diff --git a/src/main/java/org/onap/sdc/helmvalidator/api/ValidationController.java b/src/main/java/org/onap/sdc/helmvalidator/api/ValidationController.java index 7ce2656..ba7b591 100644 --- a/src/main/java/org/onap/sdc/helmvalidator/api/ValidationController.java +++ b/src/main/java/org/onap/sdc/helmvalidator/api/ValidationController.java @@ -106,6 +106,7 @@ public class ValidationController { file.getOriginalFilename(), file.getSize(), version); ValidationResult result = validationService .process(version, file, isLinted, isStrictLinted); + LOGGER.debug("Processed file: {}, validation result: {}" , file.getOriginalFilename(), result); return new ResponseEntity<>(result, HttpStatus.OK); } } diff --git a/src/main/java/org/onap/sdc/helmvalidator/helm/validation/model/ValidationResult.java b/src/main/java/org/onap/sdc/helmvalidator/helm/validation/model/ValidationResult.java index bb4fccc..eb608f4 100644 --- a/src/main/java/org/onap/sdc/helmvalidator/helm/validation/model/ValidationResult.java +++ b/src/main/java/org/onap/sdc/helmvalidator/helm/validation/model/ValidationResult.java @@ -95,4 +95,16 @@ public class ValidationResult { public String getVersionUsed() { return versionUsed; } + + @Override + public String toString() { + return "ValidationResult{" + + " isDeployable=" + isDeployable + + ", renderErrors=" + renderErrors + + ", isValid=" + isValid + + ", lintWarning=" + lintWarning + + ", lintError=" + lintError + + ", versionUsed=" + versionUsed + + " }"; + } } diff --git a/version.properties b/version.properties index 00ef564..755adf7 100644 --- a/version.properties +++ b/version.properties @@ -1,6 +1,6 @@ major=1 minor=2 -patch=0 +patch=1 base_version=${major}.${minor}.${patch} release_version=${base_version} snapshot_version=${base_version}-SNAPSHOT -- cgit 1.2.3-korg