mesosphere / marathon

Deploy and manage containers (including Docker) on top of Apache Mesos at scale.
https://mesosphere.github.io/marathon/
Apache License 2.0
4.07k stars 845 forks source link

app id within group requires / #3529

Closed tamarrow-zz closed 8 years ago

tamarrow-zz commented 8 years ago

Marathon recently started complaining about app id within groups that don't start with forward /.

cli (master)$ cat tests/data/marathon/groups/good.json
{
    "groups": [
        {
            "apps": [
                {
                    "id": "goodnight",
                    "cmd": "sleep 1",
                    "instances": 0
                }
            ],
            "id": "sleep"
        }
    ],
    "id": "test-group"
}

cli (master)$ cat tests/data/marathon/groups/good.json | http POST  http://52.37.18.244/service/marathon/v2/groups
HTTP/1.1 422
Cache-Control: no-cache, no-store, must-revalidate
Connection: keep-alive
Content-Type: application/json; qs=2
Date: Fri, 18 Mar 2016 18:12:39 GMT
Expires: 0
Pragma: no-cache
Server: openresty/1.7.10.2
Transfer-Encoding: chunked
X-Marathon-Leader: http://10.0.5.250:8080

{
    "details": [
        {
            "errors": [
                "Path needs to be absolute"
            ],
            "path": "/groups(0)/apps(0)/id"
        }
    ],
    "message": "Object is not valid"
}

And when I change id "goodnight" to "/goodnight" everything works fine.

gkleiman commented 8 years ago

This was fixed by #3547