{"action":"created","issue":{"url":"https://api.github.com/repos/cylc/cylc/issues/1538","labels_url":"https://api.github.com/repos/cylc/cylc/issues/1538/labels{/name}","comments_url":"https://api.github.com/repos/cylc/cylc/issues/1538/comments","events_url":"https://api.github.com/repos/cylc/cylc/issues/1538/events","html_url":"https://github.com/cylc/cylc/issues/1538","id":95562418,"number":1538,"title":"Task proxy spawn-on-submit not always ideal.","user":{"login":"hjoliver","id":2362137,"avatar_url":"https://avatars.githubusercontent.com/u/2362137?v=3","gravatar_id":"","url":"https://api.github.com/users/hjoliver","html_url":"https://github.com/hjoliver","followers_url":"https://api.github.com/users/hjoliver/followers","following_url":"https://api.github.com/users/hjoliver/following{/other_user}","gists_url":"https://api.github.com/users/hjoliver/gists{/gist_id}","starred_url":"https://api.github.com/users/hjoliver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hjoliver/subscriptions","organizations_url":"https://api.github.com/users/hjoliver/orgs","repos_url":"https://api.github.com/users/hjoliver/repos","events_url":"https://api.github.com/users/hjoliver/events{/privacy}","received_events_url":"https://api.github.com/users/hjoliver/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/cylc/cylc/milestones/6","html_url":"https://github.com/cylc/cylc/milestones/later","labels_url":"https://api.github.com/repos/cylc/cylc/milestones/6/labels","id":262615,"number":6,"title":"later","description":"6 months or so in the future.  Medium priority issues and fixes that require major work should initially be marked against this milestone. They can be moved up to *soon* or *next-release* if work progresses quickly enough.","creator":{"login":"hjoliver","id":2362137,"avatar_url":"https://avatars.githubusercontent.com/u/2362137?v=3","gravatar_id":"","url":"https://api.github.com/users/hjoliver","html_url":"https://github.com/hjoliver","followers_url":"https://api.github.com/users/hjoliver/followers","following_url":"https://api.github.com/users/hjoliver/following{/other_user}","gists_url":"https://api.github.com/users/hjoliver/gists{/gist_id}","starred_url":"https://api.github.com/users/hjoliver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hjoliver/subscriptions","organizations_url":"https://api.github.com/users/hjoliver/orgs","repos_url":"https://api.github.com/users/hjoliver/repos","events_url":"https://api.github.com/users/hjoliver/events{/privacy}","received_events_url":"https://api.github.com/users/hjoliver/received_events","type":"User","site_admin":false},"open_issues":72,"closed_issues":0,"state":"open","created_at":"2013-02-08T07:09:28Z","updated_at":"2015-07-22T02:59:15Z","due_on":"2015-12-31T00:00:00Z","closed_at":null},"comments":6,"created_at":"2015-07-17T01:06:04Z","updated_at":"2015-07-23T01:47:43Z","closed_at":null,"body":"In a cycling suite, task proxies spawn their next instance (at the next cycle point) when they enter the 'submit' state, so even if a task fails its successor will still be ready for action.    However, the successors of any tasks downstream of the failed one will not be available, because the instance that depends on the failed task will not trigger, and thus will not spawn.\r\n\r\nE.g. consider a clock-triggered task that retrieves obs, followed by another tasks that processes them:\r\n```\r\n[[[PT6H]]]\r\n    graph = get_obs => proc_obs\r\n```\r\n\r\nIf ```get_obs``` fails at cycle point T, obs retrieval will still run in subsequent cycles, but obs processing won't.\r\n\r\nIt's easy to get around this manually:\r\n * GUI: right-click on the waiting ```proc_obs[T]``` and choose \"Force spawn\".\r\n * CLI: ```cylc reset --state=spawn SUITE proc_obs T``` (this is not intuitive, we should probably have a ```cylc spawn``` command - subject to #1249)\r\n\r\nIt's also possible to get around this automatically, e.g.:\r\n ```\r\n    graph = \"\"\"get_obs => proc_obs & !spawner\r\n                     get_obs:fail => spawner\"\"\"\r\n```\r\nwhere ```spawner``` uses the CLI to force-spawn ```proc_obs``` (and potentially to retrigger get_obs and reset itself to waiting as well, to effect a full retry):\r\n```sh\r\n[runtime]\r\n   [[spawner]]\r\n       script = \"\"\"\r\n# Spawn proc_obs successor if it hasn't already spawned.\r\ncylc reset --state=spawn $CYLC_SUITE_NAME proc_obs $CYLC_TASK_CYCLE_POINT\r\n# Make get_obs retry as well (note get_obs should do it's own retries before failing too).\r\ncylc trigger $CYLC_SUITE_NAME get_obs $CYLC_TASK_CYCLE_POINT\r\n# Reset myself to wait on the re-triggered get_obs.\r\ncylc reset --state=waiting $CYLC_SUITE_NAME spawner $CYLC_TASK_CYCLE_POINT\"\"\"\r\n```\r\n\r\nHowever, it would be nice if cylc could just do the right thing here, with no intervention or extra tasks required."},"comment":{"url":"https://api.github.com/repos/cylc/cylc/issues/comments/123927927","html_url":"https://github.com/cylc/cylc/issues/1538#issuecomment-123927927","issue_url":"https://api.github.com/repos/cylc/cylc/issues/1538","id":123927927,"user":{"login":"hjoliver","id":2362137,"avatar_url":"https://avatars.githubusercontent.com/u/2362137?v=3","gravatar_id":"","url":"https://api.github.com/users/hjoliver","html_url":"https://github.com/hjoliver","followers_url":"https://api.github.com/users/hjoliver/followers","following_url":"https://api.github.com/users/hjoliver/following{/other_user}","gists_url":"https://api.github.com/users/hjoliver/gists{/gist_id}","starred_url":"https://api.github.com/users/hjoliver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hjoliver/subscriptions","organizations_url":"https://api.github.com/users/hjoliver/orgs","repos_url":"https://api.github.com/users/hjoliver/repos","events_url":"https://api.github.com/users/hjoliver/events{/privacy}","received_events_url":"https://api.github.com/users/hjoliver/received_events","type":"User","site_admin":false},"created_at":"2015-07-23T01:47:43Z","updated_at":"2015-07-23T01:47:43Z","body":"Even if no failure occurs, spawn-on-submit means that task X[T2] cannot run before X[T1] where T2 > T1 even X[T2]'s prerequisites are satisfied before then.  This sort of scenario is unlikely to occur normally, but it's possible. \r\n\r\n> The task pool should be responsible to generate new task proxies.\r\n\r\nSo, yes, I agree with this."}}