.executionId(canaryExecutionStatusResponse.getPipelineId()) .executionStatus(ExecutionStatus.valueOf(canaryExecutionStatusResponse.getStatus().toUpperCase())) .exception(runStage.getContext().getOrDefault("exception", null)) .warnings(kayentaObjectMapper.convertValue(runStage.getContext() .getOrDefault("warnings", new LinkedList<>()), new TypeReference<LinkedList<String>>() {})) .result(canaryExecutionStatusResponse.getResult()) .metricSetPairListId(canaryExecutionStatusResponse.getMetricSetPairListId()) .judgementStartTimeIso(Optional.ofNullable( (String) runStage.getContext() .getOrDefault("judgementStartTimeIso", null)) .orElseThrow(() -> new IllegalStateException("Expected completed runCanaryStage to have judgementStartTimeIso in context"))) .judgementStartTimeMillis(Optional.ofNullable( (Long) runStage.getContext() .getOrDefault("judgementStartTimeMillis", null)) .orElseThrow(() -> new IllegalStateException("Expected completed runCanaryStage to have judgementStartTimeIso in context"))) .judgementEndTimeIso(Optional.ofNullable( (String) runStage.getContext() .getOrDefault("judgementEndTimeIso", null)) .orElseThrow(() -> new IllegalStateException("Expected completed runCanaryStage to have judgementStartTimeIso in context"))) .judgementEndTimeMillis(Optional.ofNullable( (Long) runStage.getContext() .getOrDefault("judgementEndTimeMillis", null)) .orElseThrow(() -> new IllegalStateException("Expected completed runCanaryStage to have judgementStartTimeIso in context"))) .buildTimeMillis(canaryExecutionStatusResponse.getBuildTimeMillis()) .buildTimeIso(canaryExecutionStatusResponse.getBuildTimeIso()) .startTimeMillis(canaryExecutionStatusResponse.getStartTimeMillis()) .startTimeIso(canaryExecutionStatusResponse.getStartTimeIso()) .endTimeMillis(canaryExecutionStatusResponse.getEndTimeMillis())
.executionId(canaryExecutionStatusResponse.getPipelineId()) .executionStatus(ExecutionStatus.valueOf(canaryExecutionStatusResponse.getStatus().toUpperCase())) .exception(runStage.getContext().getOrDefault("exception", null)) .warnings(kayentaObjectMapper.convertValue(runStage.getContext() .getOrDefault("warnings", new LinkedList<>()), new TypeReference<LinkedList<String>>() {})) .result(canaryExecutionStatusResponse.getResult()) .metricSetPairListId(canaryExecutionStatusResponse.getMetricSetPairListId()) .judgementStartTimeIso(Optional.ofNullable( (String) runStage.getContext() .getOrDefault("judgementStartTimeIso", null)) .orElseThrow(() -> new IllegalStateException("Expected completed runCanaryStage to have judgementStartTimeIso in context"))) .judgementStartTimeMillis(Optional.ofNullable( (Long) runStage.getContext() .getOrDefault("judgementStartTimeMillis", null)) .orElseThrow(() -> new IllegalStateException("Expected completed runCanaryStage to have judgementStartTimeIso in context"))) .judgementEndTimeIso(Optional.ofNullable( (String) runStage.getContext() .getOrDefault("judgementEndTimeIso", null)) .orElseThrow(() -> new IllegalStateException("Expected completed runCanaryStage to have judgementStartTimeIso in context"))) .judgementEndTimeMillis(Optional.ofNullable( (Long) runStage.getContext() .getOrDefault("judgementEndTimeMillis", null)) .orElseThrow(() -> new IllegalStateException("Expected completed runCanaryStage to have judgementStartTimeIso in context"))) .buildTimeMillis(canaryExecutionStatusResponse.getBuildTimeMillis()) .buildTimeIso(canaryExecutionStatusResponse.getBuildTimeIso()) .startTimeMillis(canaryExecutionStatusResponse.getStartTimeMillis()) .startTimeIso(canaryExecutionStatusResponse.getStartTimeIso()) .endTimeMillis(canaryExecutionStatusResponse.getEndTimeMillis())