From 090dbe9e28d61b36e71545e43af18f39f5ac0458 Mon Sep 17 00:00:00 2001 From: Markus Duft Date: Thu, 20 Jun 2024 09:52:48 +0200 Subject: [PATCH] Disable server side validation for now Bug: CT_BDEPLOY-56 Change-Id: I698185baf8cc63d6f47319ea1d2fd96c5cc26622 --- .../io/bdeploy/ui/ProductUpdateService.java | 31 ++++++++++--------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/ui/src/main/java/io/bdeploy/ui/ProductUpdateService.java b/ui/src/main/java/io/bdeploy/ui/ProductUpdateService.java index 30321cacd..4e062496b 100644 --- a/ui/src/main/java/io/bdeploy/ui/ProductUpdateService.java +++ b/ui/src/main/java/io/bdeploy/ui/ProductUpdateService.java @@ -352,21 +352,22 @@ public List validate(InstanceUpdateDto instance, List< SystemConfiguration system) { List result = new ArrayList<>(); - if (instance.files != null && !instance.config.nodeDtos.isEmpty()) { - InstanceNodeConfigurationDto nodeConfig = instance.config.nodeDtos.getFirst(); - VariableResolver resolver = createResolver(nodeConfig, null); - for (FileStatusDto file : instance.files) { - if (file.type == FileStatusType.DELETE) { - continue; - } - try { - String content = new String(Base64.decodeBase64(file.content), StandardCharsets.UTF_8); - TemplateHelper.process(content, resolver, str -> true, file.file); - } catch (Exception e) { - result.add(new ApplicationValidationDto(file.file, null, e.getMessage())); - } - } - } + // TODO: CT_BDEPLOY-56 - skip validation on server side for 7.1.0. + // if (instance.files != null && !instance.config.nodeDtos.isEmpty()) { + // InstanceNodeConfigurationDto nodeConfig = instance.config.nodeDtos.getFirst(); + // VariableResolver resolver = createResolver(nodeConfig, null); + // for (FileStatusDto file : instance.files) { + // if (file.type == FileStatusType.DELETE) { + // continue; + // } + // try { + // String content = new String(Base64.decodeBase64(file.content), StandardCharsets.UTF_8); + // TemplateHelper.process(content, resolver, str -> true, file.file); + // } catch (Exception e) { + // result.add(new ApplicationValidationDto(file.file, null, e.getMessage())); + // } + // } + // } // there is nothing in the base config which requires excessive validation right now. mandatory fields are // validated in the client(s) individually.