{"action":"created","issue":{"url":"https://api.github.com/repos/StackStorm/st2/issues/1052","labels_url":"https://api.github.com/repos/StackStorm/st2/issues/1052/labels{/name}","comments_url":"https://api.github.com/repos/StackStorm/st2/issues/1052/comments","events_url":"https://api.github.com/repos/StackStorm/st2/issues/1052/events","html_url":"https://github.com/StackStorm/st2/issues/1052","id":56992539,"number":1052,"title":"Better stdout support","user":{"login":"jtopjian","id":46959,"avatar_url":"https://avatars.githubusercontent.com/u/46959?v=3","gravatar_id":"","url":"https://api.github.com/users/jtopjian","html_url":"https://github.com/jtopjian","followers_url":"https://api.github.com/users/jtopjian/followers","following_url":"https://api.github.com/users/jtopjian/following{/other_user}","gists_url":"https://api.github.com/users/jtopjian/gists{/gist_id}","starred_url":"https://api.github.com/users/jtopjian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtopjian/subscriptions","organizations_url":"https://api.github.com/users/jtopjian/orgs","repos_url":"https://api.github.com/users/jtopjian/repos","events_url":"https://api.github.com/users/jtopjian/events{/privacy}","received_events_url":"https://api.github.com/users/jtopjian/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-09T06:07:30Z","updated_at":"2015-02-09T10:08:17Z","closed_at":null,"body":"Unless I've missed something in the docs, the stdout of runners is restricted to a sub-portion of the overall runner output.\r\n\r\nWhile most tools that we would house under st2 are cron, batch, daemon, and other types of non-interactive actions, there are some reporting tools where the full, unaltered output is necessary.\r\n\r\nThe best I've been able to come up with is reviewing the results of the last runner through the audit history.\r\n\r\nI noticed that the [Roadmap](http://docs.stackstorm.com/roadmap.html) includes better output support -- is this the same thing?"},"comment":{"url":"https://api.github.com/repos/StackStorm/st2/issues/comments/73484186","html_url":"https://github.com/StackStorm/st2/issues/1052#issuecomment-73484186","issue_url":"https://api.github.com/repos/StackStorm/st2/issues/1052","id":73484186,"user":{"login":"Kami","id":125088,"avatar_url":"https://avatars.githubusercontent.com/u/125088?v=3","gravatar_id":"","url":"https://api.github.com/users/Kami","html_url":"https://github.com/Kami","followers_url":"https://api.github.com/users/Kami/followers","following_url":"https://api.github.com/users/Kami/following{/other_user}","gists_url":"https://api.github.com/users/Kami/gists{/gist_id}","starred_url":"https://api.github.com/users/Kami/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kami/subscriptions","organizations_url":"https://api.github.com/users/Kami/orgs","repos_url":"https://api.github.com/users/Kami/repos","events_url":"https://api.github.com/users/Kami/events{/privacy}","received_events_url":"https://api.github.com/users/Kami/received_events","type":"User","site_admin":false},"created_at":"2015-02-09T10:08:17Z","updated_at":"2015-02-09T10:08:17Z","body":"I believe all the runners (local, remote and python) should return a full output unless the script / action being executed does some weird buffering.\r\n\r\nIf you can share the action (and the expected output) where you encountered this problem I can have a look and try to reproduce it.\r\n\r\nOn a related note, I believe there is a known limitation with a remote runner with an action which uses sudo (stdout and stderr are combined):\r\n\r\n```\r\n # XXX: For sudo, fabric requires to set pty=True. This basically combines stdout and\r\n# stderr into a single stdout stream. So if the command fails, we explictly set stderr\r\n# to stdout and stdout to ''.\r\n if result['failed'] and result.get('stdout', None):\r\n    result['stderr'] = result['stdout']\r\n    result['stdout'] = ''\r\n```"}}