Skip to content

Commit

Permalink
fix(persistence): requisiteStageRefIds can be null in Redis (#1584)
Browse files Browse the repository at this point in the history
  • Loading branch information
robfletcher authored and robzienert committed Aug 29, 2017
1 parent bebf1a7 commit ce08d92
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ import static com.google.common.collect.Maps.filterValues
import static com.netflix.spinnaker.orca.pipeline.model.Execution.DEFAULT_EXECUTION_ENGINE
import static com.netflix.spinnaker.orca.pipeline.model.SyntheticStageOwner.STAGE_BEFORE
import static java.lang.System.currentTimeMillis
import static java.util.Collections.emptyList
import static java.util.Collections.emptyMap
import static java.util.Collections.*
import static redis.clients.jedis.BinaryClient.LIST_POSITION.AFTER
import static redis.clients.jedis.BinaryClient.LIST_POSITION.BEFORE

Expand Down Expand Up @@ -650,7 +649,7 @@ class JedisExecutionRepository implements ExecutionRepository {
stage.status = ExecutionStatus.valueOf(map["stage.${stageId}.status".toString()])
stage.syntheticStageOwner = map["stage.${stageId}.syntheticStageOwner".toString()] ? SyntheticStageOwner.valueOf(map["stage.${stageId}.syntheticStageOwner".toString()]) : null
stage.parentStageId = map["stage.${stageId}.parentStageId".toString()]
stage.requisiteStageRefIds = map["stage.${stageId}.requisiteStageRefIds".toString()]?.tokenize(",")
stage.requisiteStageRefIds = map["stage.${stageId}.requisiteStageRefIds".toString()]?.tokenize(",") ?: emptySet()
stage.scheduledTime = map["stage.${stageId}.scheduledTime".toString()]?.toLong()
stage.context = map["stage.${stageId}.context".toString()] ? mapper.readValue(map["stage.${stageId}.context".toString()], MAP_STRING_TO_OBJECT) : emptyMap()
stage.outputs = map["stage.${stageId}.outputs".toString()] ? mapper.readValue(map["stage.${stageId}.outputs".toString()], MAP_STRING_TO_OBJECT) : emptyMap()
Expand Down

0 comments on commit ce08d92

Please sign in to comment.