Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(core): prevent null outputContent (#1134)
* test(core): demonstrate current behavior of JobExecutorLocal with empty output This test currently fails. The next commit fixes it. * fix(core): prevent null outputContent in the BakeStatus that JobExecutorLocal.updateStatus returns. Before this change, if the output of e.g. helm template is an empty string, the BakeStatus object that JobExecutorLocal.updateStatus returns is null, and HelmTemplateUtils.removeTestsDirectoryTemplates throws a NullPointerException. HelmBakeManifestService.bake calls BakeManifestService.doBake which calls JobExecutorLocal.updateStatus, and then HelmBakeManifestService.bake calls HelmTemplateUtils.removeTestsDirectoryTemplates with the resulting String. With this change, removeTestsDirectoryTemplates gets an empty string, and so the bake manifest endpoint (e.g. POST /api/v2/manifest/bake/helm) returns an empty Artifact. Without a corresponding change to clouddriver to handle a null KubernetesManifest, there's still a clouddriver crash in a deploy manifest that consumes the output of this bake, but it's progress.
- Loading branch information