mesos / chronos

Fault tolerant job scheduler for Mesos which handles dependencies and ISO8601 based schedules
http://mesos.github.io/chronos/
Apache License 2.0
4.39k stars 529 forks source link

REST route v1/scheduler/jobs gives duplicated uris #827

Open r7ar7a opened 7 years ago

r7ar7a commented 7 years ago
{
    "name": "temporara",
    "command": "sleep 300",
    "owner": "r7ar7a@gmail.com",
    "ownerName": "Rara",
    "fetch": [
        {
            "uri": "http://uri.com/uri/route"
        }
    ],
    "container": {
        "type": "DOCKER",
        "image": "ubuntu:latest",
        "network": "BRIDGE",
        "forcePullImage": true
    },
    "schedule": "R/2100-01-01T00:00:00.000Z/P12M"
}

curl $CHRONOS_HOST/v1/scheduler/jobs

If one deploys the job above and executes the REST query, he gets a result where both the "uris" and the "fetch" keys present:

...
        "fetch": [
            {
                "uri": "http://uri.com/uri/route",
                "executable": false,
                "cache": false,
                "extract": true
            }
        ],
        "uris": [
            "http://uri.com/uri/route"
        ],
...

This is annoying, because if one needs to modify only one parameter of a deployed chronos job, intuitively he fetches the current configuration, replaces the parameter and submits it again. But this will lead to an "File Exists" error when mesos fetches the files(two times).

BTW curl $CHRONOS_HOST/v1/scheduler/jobs/search?name=temporara works just fine, but it is not supported by the current frmework that I use (chronos-python==1.0.0).