Merge pull request #261 from mesosphere/taskfailure

add comment for validation cleanup
This commit is contained in:
José Armando García Sancio
2015-07-09 21:36:16 -07:00

View File

@@ -656,6 +656,10 @@ def _clean_up_resource_definition(properties):
if v:
if k in ["apps", "groups"]:
clean_properties[k] = [_clean_up_resource_definition(v[0])]
# Remove fields that marathon adds. These arent in the json-schema
# because a user should not specify them. When we do a `get` to see
# the current schema, we may see these fields, but leaving them
# will cause us to unnecessarily fail the schema validation.
elif not k.startswith("task") and k != "lastTaskFailure":
clean_properties[k] = v