Skip to content

Commit

Permalink
Merge "Disable server side validation for now"
Browse files Browse the repository at this point in the history
  • Loading branch information
mduft authored and Gerrit committed Jun 20, 2024
2 parents 93e4ed1 + 090dbe9 commit 5634424
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions ui/src/main/java/io/bdeploy/ui/ProductUpdateService.java
Original file line number Diff line number Diff line change
Expand Up @@ -352,21 +352,22 @@ public List<ApplicationValidationDto> validate(InstanceUpdateDto instance, List<
SystemConfiguration system) {
List<ApplicationValidationDto> 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.
Expand Down

0 comments on commit 5634424

Please sign in to comment.