diff --git a/frameworks/helloworld/src/main/dist/svc.yml b/frameworks/helloworld/src/main/dist/svc.yml index 156fa67720b..894c253e9bf 100644 --- a/frameworks/helloworld/src/main/dist/svc.yml +++ b/frameworks/helloworld/src/main/dist/svc.yml @@ -21,6 +21,7 @@ pods: type: ROOT size: {{HELLO_DISK}} env: + PARSE_EMPTY_KEY_AS_BLANK_TEST: SLEEP_DURATION: {{SLEEP_DURATION}} health-check: cmd: stat hello-container-path/output diff --git a/sdk/scheduler/src/main/java/com/mesosphere/sdk/specification/yaml/RawTask.java b/sdk/scheduler/src/main/java/com/mesosphere/sdk/specification/yaml/RawTask.java index ae0da80dc8e..75342355884 100644 --- a/sdk/scheduler/src/main/java/com/mesosphere/sdk/specification/yaml/RawTask.java +++ b/sdk/scheduler/src/main/java/com/mesosphere/sdk/specification/yaml/RawTask.java @@ -1,6 +1,8 @@ package com.mesosphere.sdk.specification.yaml; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; import org.apache.mesos.Protos; import java.util.Collections; @@ -20,7 +22,8 @@ public final class RawTask { private final String labelsCsv; - private final Map env; + @JsonSetter(contentNulls = Nulls.AS_EMPTY) + private Map env; private final WriteOnceLinkedHashMap configs; @@ -57,7 +60,6 @@ private RawTask( @JsonProperty("essential") Boolean essential, @JsonProperty("cmd") String cmd, @JsonProperty("labels") String labels, - @JsonProperty("env") Map env, @JsonProperty("configs") WriteOnceLinkedHashMap configs, @JsonProperty("cpus") Double cpus, @JsonProperty("gpus") Double gpus, @@ -78,7 +80,6 @@ private RawTask( this.essential = essential; this.cmd = cmd; this.labelsCsv = labels; - this.env = env; this.configs = configs; this.cpus = cpus; this.gpus = gpus;