Stephan Erb created AURORA-1645:
-----------------------------------
Summary: Deschedule cron should not fail if the job is not
scheduled
Key: AURORA-1645
URL: https://issues.apache.org/jira/browse/AURORA-1645
Project: Aurora
Issue Type: Task
Components: Scheduler
Reporter: Stephan Erb
Assignee: Stephan Erb
Aurora treats killing non-existing jobs differently from descheduling
non-existing cronjobs (mind the `returnCode`):
{code}
>>> api.kill_job(jobkey)
Response(details=[ResponseDetail(message='The TaskQuery field is deprecated.'),
ResponseDetail(message='No tasks to kill.')], result=None, responseCode=1,
serverInfo=ServerInfo(clusterName='test', statsUrlPrefix=''))
>>> api.deschedule_cron(jobkey)
Response(details=[ResponseDetail(message='Job user/test/dummyjob is not
scheduled with cron')], result=None, responseCode=0,
serverInfo=ServerInfo(clusterName='test', statsUrlPrefix=''))
{code}
Responsible is this [exception
path|https://github.com/apache/aurora/blob/ec0f38a7528f8adb8f0769112a1043b98598c03f/src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java#L346].
I propose to remove the throw.
This would allow clients to be more declarative rather than imperative when
expressing that the given job should not be scheduled.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)