From 372bb898abd039a046376d9dc266b25b83496004 Mon Sep 17 00:00:00 2001 From: Emily Burns Date: Wed, 22 Aug 2018 09:54:26 -0700 Subject: [PATCH] fix(metrics): null value is string null, optional values actually optional (#2385) * fix(metrics): null value is string null * fix(pipelineStarter): don't throw exception when optional not present --- .../spinnaker/orca/front50/DependentPipelineStarter.groovy | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/orca-front50/src/main/groovy/com/netflix/spinnaker/orca/front50/DependentPipelineStarter.groovy b/orca-front50/src/main/groovy/com/netflix/spinnaker/orca/front50/DependentPipelineStarter.groovy index 7186f99ba9..99f6c240a5 100644 --- a/orca-front50/src/main/groovy/com/netflix/spinnaker/orca/front50/DependentPipelineStarter.groovy +++ b/orca-front50/src/main/groovy/com/netflix/spinnaker/orca/front50/DependentPipelineStarter.groovy @@ -58,8 +58,8 @@ class DependentPipelineStarter implements ApplicationContextAware { this.applicationContext = applicationContext this.objectMapper = objectMapper this.contextParameterProcessor = contextParameterProcessor - this.pipelinePreprocessors = pipelinePreprocessors.get() - this.artifactResolver = artifactResolver.get() + this.pipelinePreprocessors = pipelinePreprocessors.orElse(null) + this.artifactResolver = artifactResolver.orElse(null) this.registry = registry } @@ -143,7 +143,7 @@ class DependentPipelineStarter implements ApplicationContextAware { pipeline = executionLauncher().start(PIPELINE, json) Id id = registry.createId("pipelines.triggered") - .withTag("application", Optional.ofNullable(pipeline.getApplication()).orElse("NULL_APPLICATION")) + .withTag("application", Optional.ofNullable(pipeline.getApplication()).orElse("null")) .withTag("monitor", getClass().getSimpleName()) registry.counter(id).increment()