{"action":"created","comment":{"url":"https://api.github.com/repos/azkaban/azkaban/pulls/comments/94928212","pull_request_review_id":15470453,"id":94928212,"diff_hunk":"@@ -300,6 +300,8 @@ azkaban.FlowExecuteDialogView = Backbone.View.extend({\n         if (node.type == \"flow\" && statusNode.type == \"flow\") {\n           this.assignInitialStatus(node, statusNode);\n         }\n+      } else {","path":"azkaban-web-server/src/web/js/azkaban/view/flow-execute-dialog.js","position":4,"original_position":4,"commit_id":"0ecf6fd22b8d1dfce26a7336f6888b83fb3ae6d9","original_commit_id":"0ecf6fd22b8d1dfce26a7336f6888b83fb3ae6d9","user":{"login":"juhoautio","id":4446608,"avatar_url":"https://avatars.githubusercontent.com/u/4446608?v=3","gravatar_id":"","url":"https://api.github.com/users/juhoautio","html_url":"https://github.com/juhoautio","followers_url":"https://api.github.com/users/juhoautio/followers","following_url":"https://api.github.com/users/juhoautio/following{/other_user}","gists_url":"https://api.github.com/users/juhoautio/gists{/gist_id}","starred_url":"https://api.github.com/users/juhoautio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juhoautio/subscriptions","organizations_url":"https://api.github.com/users/juhoautio/orgs","repos_url":"https://api.github.com/users/juhoautio/repos","events_url":"https://api.github.com/users/juhoautio/events{/privacy}","received_events_url":"https://api.github.com/users/juhoautio/received_events","type":"User","site_admin":false},"body":"This function (`assignInitialStatus`) traverses the jobs in the flow and looks up the same job in original flow to assign an initial status. If that lookup fails, it means that a new job has been added to the flow since the original execution. In that case there is no initial status to copy from the original execution, so we set `node.missing=true` to mark that.\r\n\r\nI don't know if adding a comment in the code is the best way to improve. How about I rename this flag? For example, `node.noInitialStatus` or `node.notPresentInOriginalExecution`. What would you prefer?","created_at":"2017-01-06T10:36:57Z","updated_at":"2017-01-06T10:36:57Z","html_url":"https://github.com/azkaban/azkaban/pull/861#discussion_r94928212","pull_request_url":"https://api.github.com/repos/azkaban/azkaban/pulls/861","_links":{"self":{"href":"https://api.github.com/repos/azkaban/azkaban/pulls/comments/94928212"},"html":{"href":"https://github.com/azkaban/azkaban/pull/861#discussion_r94928212"},"pull_request":{"href":"https://api.github.com/repos/azkaban/azkaban/pulls/861"}}},"pull_request":{"url":"https://api.github.com/repos/azkaban/azkaban/pulls/861","id":99656756,"html_url":"https://github.com/azkaban/azkaban/pull/861","diff_url":"https://github.com/azkaban/azkaban/pull/861.diff","patch_url":"https://github.com/azkaban/azkaban/pull/861.patch","issue_url":"https://api.github.com/repos/azkaban/azkaban/issues/861","number":861,"state":"open","locked":false,"title":"Fix bugs in prepare execution","user":{"login":"juhoautio","id":4446608,"avatar_url":"https://avatars.githubusercontent.com/u/4446608?v=3","gravatar_id":"","url":"https://api.github.com/users/juhoautio","html_url":"https://github.com/juhoautio","followers_url":"https://api.github.com/users/juhoautio/followers","following_url":"https://api.github.com/users/juhoautio/following{/other_user}","gists_url":"https://api.github.com/users/juhoautio/gists{/gist_id}","starred_url":"https://api.github.com/users/juhoautio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juhoautio/subscriptions","organizations_url":"https://api.github.com/users/juhoautio/orgs","repos_url":"https://api.github.com/users/juhoautio/repos","events_url":"https://api.github.com/users/juhoautio/events{/privacy}","received_events_url":"https://api.github.com/users/juhoautio/received_events","type":"User","site_admin":false},"body":"The major problems that this fixes:\r\n- Wasn't enabling jobs inside sub-flows in case of certain flow statuses\r\n- Wasn't enabling jobs if they were left in running or queued state\r\n\r\nSo the following changes:\r\n- Always handle statuses of jobs inside all sub-flows\r\n- Also enable for rerun if job was left in running or queued state\r\n- Disable if job wasn't present in the flow during the original execution (see node.missing in the code)\r\n- Simplify code\r\n\r\nI don't know why sometimes jobs get left in running / queued state even after the execution has been killed. That's some other bug. This fix makes the UI behave nicely also with that kind of executions.\r\n\r\nThis fix was validated against some existing killed & failed executions. Some jobs/sub-flows that were not present in the flow during the original execution were enabled - after this fix they are not. Some jobs/subflows that were left in running or queued (although the flow itself has killed status) were disabled - with these fixes they are enabled as desired.","created_at":"2016-12-29T13:40:47Z","updated_at":"2017-01-06T10:36:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"25a709344d72b9e5644478ceb97212e7095f8ae9","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/azkaban/azkaban/pulls/861/commits","review_comments_url":"https://api.github.com/repos/azkaban/azkaban/pulls/861/comments","review_comment_url":"https://api.github.com/repos/azkaban/azkaban/pulls/comments{/number}","comments_url":"https://api.github.com/repos/azkaban/azkaban/issues/861/comments","statuses_url":"https://api.github.com/repos/azkaban/azkaban/statuses/0ecf6fd22b8d1dfce26a7336f6888b83fb3ae6d9","head":{"label":"juhoautio:fix_prepare_execution","ref":"fix_prepare_execution","sha":"0ecf6fd22b8d1dfce26a7336f6888b83fb3ae6d9","user":{"login":"juhoautio","id":4446608,"avatar_url":"https://avatars.githubusercontent.com/u/4446608?v=3","gravatar_id":"","url":"https://api.github.com/users/juhoautio","html_url":"https://github.com/juhoautio","followers_url":"https://api.github.com/users/juhoautio/followers","following_url":"https://api.github.com/users/juhoautio/following{/other_user}","gists_url":"https://api.github.com/users/juhoautio/gists{/gist_id}","starred_url":"https://api.github.com/users/juhoautio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juhoautio/subscriptions","organizations_url":"https://api.github.com/users/juhoautio/orgs","repos_url":"https://api.github.com/users/juhoautio/repos","events_url":"https://api.github.com/users/juhoautio/events{/privacy}","received_events_url":"https://api.github.com/users/juhoautio/received_events","type":"User","site_admin":false},"repo":{"id":47544338,"name":"azkaban","full_name":"juhoautio/azkaban","owner":{"login":"juhoautio","id":4446608,"avatar_url":"https://avatars.githubusercontent.com/u/4446608?v=3","gravatar_id":"","url":"https://api.github.com/users/juhoautio","html_url":"https://github.com/juhoautio","followers_url":"https://api.github.com/users/juhoautio/followers","following_url":"https://api.github.com/users/juhoautio/following{/other_user}","gists_url":"https://api.github.com/users/juhoautio/gists{/gist_id}","starred_url":"https://api.github.com/users/juhoautio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juhoautio/subscriptions","organizations_url":"https://api.github.com/users/juhoautio/orgs","repos_url":"https://api.github.com/users/juhoautio/repos","events_url":"https://api.github.com/users/juhoautio/events{/privacy}","received_events_url":"https://api.github.com/users/juhoautio/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/juhoautio/azkaban","description":"Azkaban workflow manager.","fork":true,"url":"https://api.github.com/repos/juhoautio/azkaban","forks_url":"https://api.github.com/repos/juhoautio/azkaban/forks","keys_url":"https://api.github.com/repos/juhoautio/azkaban/keys{/key_id}","collaborators_url":"https://api.github.com/repos/juhoautio/azkaban/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/juhoautio/azkaban/teams","hooks_url":"https://api.github.com/repos/juhoautio/azkaban/hooks","issue_events_url":"https://api.github.com/repos/juhoautio/azkaban/issues/events{/number}","events_url":"https://api.github.com/repos/juhoautio/azkaban/events","assignees_url":"https://api.github.com/repos/juhoautio/azkaban/assignees{/user}","branches_url":"https://api.github.com/repos/juhoautio/azkaban/branches{/branch}","tags_url":"https://api.github.com/repos/juhoautio/azkaban/tags","blobs_url":"https://api.github.com/repos/juhoautio/azkaban/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/juhoautio/azkaban/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/juhoautio/azkaban/git/refs{/sha}","trees_url":"https://api.github.com/repos/juhoautio/azkaban/git/trees{/sha}","statuses_url":"https://api.github.com/repos/juhoautio/azkaban/statuses/{sha}","languages_url":"https://api.github.com/repos/juhoautio/azkaban/languages","stargazers_url":"https://api.github.com/repos/juhoautio/azkaban/stargazers","contributors_url":"https://api.github.com/repos/juhoautio/azkaban/contributors","subscribers_url":"https://api.github.com/repos/juhoautio/azkaban/subscribers","subscription_url":"https://api.github.com/repos/juhoautio/azkaban/subscription","commits_url":"https://api.github.com/repos/juhoautio/azkaban/commits{/sha}","git_commits_url":"https://api.github.com/repos/juhoautio/azkaban/git/commits{/sha}","comments_url":"https://api.github.com/repos/juhoautio/azkaban/comments{/number}","issue_comment_url":"https://api.github.com/repos/juhoautio/azkaban/issues/comments{/number}","contents_url":"https://api.github.com/repos/juhoautio/azkaban/contents/{+path}","compare_url":"https://api.github.com/repos/juhoautio/azkaban/compare/{base}...{head}","merges_url":"https://api.github.com/repos/juhoautio/azkaban/merges","archive_url":"https://api.github.com/repos/juhoautio/azkaban/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/juhoautio/azkaban/downloads","issues_url":"https://api.github.com/repos/juhoautio/azkaban/issues{/number}","pulls_url":"https://api.github.com/repos/juhoautio/azkaban/pulls{/number}","milestones_url":"https://api.github.com/repos/juhoautio/azkaban/milestones{/number}","notifications_url":"https://api.github.com/repos/juhoautio/azkaban/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/juhoautio/azkaban/labels{/name}","releases_url":"https://api.github.com/repos/juhoautio/azkaban/releases{/id}","deployments_url":"https://api.github.com/repos/juhoautio/azkaban/deployments","created_at":"2015-12-07T10:05:59Z","updated_at":"2016-01-11T08:35:28Z","pushed_at":"2016-12-29T13:39:12Z","git_url":"git://github.com/juhoautio/azkaban.git","ssh_url":"git@github.com:juhoautio/azkaban.git","clone_url":"https://github.com/juhoautio/azkaban.git","svn_url":"https://github.com/juhoautio/azkaban","homepage":"https://azkaban.github.io","size":33231,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"azkaban:master","ref":"master","sha":"d32d0d9a352fa70cb2cb6b27faf01239520dd6c1","user":{"login":"azkaban","id":213618,"avatar_url":"https://avatars.githubusercontent.com/u/213618?v=3","gravatar_id":"","url":"https://api.github.com/users/azkaban","html_url":"https://github.com/azkaban","followers_url":"https://api.github.com/users/azkaban/followers","following_url":"https://api.github.com/users/azkaban/following{/other_user}","gists_url":"https://api.github.com/users/azkaban/gists{/gist_id}","starred_url":"https://api.github.com/users/azkaban/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azkaban/subscriptions","organizations_url":"https://api.github.com/users/azkaban/orgs","repos_url":"https://api.github.com/users/azkaban/repos","events_url":"https://api.github.com/users/azkaban/events{/privacy}","received_events_url":"https://api.github.com/users/azkaban/received_events","type":"Organization","site_admin":false},"repo":{"id":6271421,"name":"azkaban","full_name":"azkaban/azkaban","owner":{"login":"azkaban","id":213618,"avatar_url":"https://avatars.githubusercontent.com/u/213618?v=3","gravatar_id":"","url":"https://api.github.com/users/azkaban","html_url":"https://github.com/azkaban","followers_url":"https://api.github.com/users/azkaban/followers","following_url":"https://api.github.com/users/azkaban/following{/other_user}","gists_url":"https://api.github.com/users/azkaban/gists{/gist_id}","starred_url":"https://api.github.com/users/azkaban/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azkaban/subscriptions","organizations_url":"https://api.github.com/users/azkaban/orgs","repos_url":"https://api.github.com/users/azkaban/repos","events_url":"https://api.github.com/users/azkaban/events{/privacy}","received_events_url":"https://api.github.com/users/azkaban/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/azkaban/azkaban","description":"Azkaban workflow manager.","fork":false,"url":"https://api.github.com/repos/azkaban/azkaban","forks_url":"https://api.github.com/repos/azkaban/azkaban/forks","keys_url":"https://api.github.com/repos/azkaban/azkaban/keys{/key_id}","collaborators_url":"https://api.github.com/repos/azkaban/azkaban/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/azkaban/azkaban/teams","hooks_url":"https://api.github.com/repos/azkaban/azkaban/hooks","issue_events_url":"https://api.github.com/repos/azkaban/azkaban/issues/events{/number}","events_url":"https://api.github.com/repos/azkaban/azkaban/events","assignees_url":"https://api.github.com/repos/azkaban/azkaban/assignees{/user}","branches_url":"https://api.github.com/repos/azkaban/azkaban/branches{/branch}","tags_url":"https://api.github.com/repos/azkaban/azkaban/tags","blobs_url":"https://api.github.com/repos/azkaban/azkaban/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/azkaban/azkaban/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/azkaban/azkaban/git/refs{/sha}","trees_url":"https://api.github.com/repos/azkaban/azkaban/git/trees{/sha}","statuses_url":"https://api.github.com/repos/azkaban/azkaban/statuses/{sha}","languages_url":"https://api.github.com/repos/azkaban/azkaban/languages","stargazers_url":"https://api.github.com/repos/azkaban/azkaban/stargazers","contributors_url":"https://api.github.com/repos/azkaban/azkaban/contributors","subscribers_url":"https://api.github.com/repos/azkaban/azkaban/subscribers","subscription_url":"https://api.github.com/repos/azkaban/azkaban/subscription","commits_url":"https://api.github.com/repos/azkaban/azkaban/commits{/sha}","git_commits_url":"https://api.github.com/repos/azkaban/azkaban/git/commits{/sha}","comments_url":"https://api.github.com/repos/azkaban/azkaban/comments{/number}","issue_comment_url":"https://api.github.com/repos/azkaban/azkaban/issues/comments{/number}","contents_url":"https://api.github.com/repos/azkaban/azkaban/contents/{+path}","compare_url":"https://api.github.com/repos/azkaban/azkaban/compare/{base}...{head}","merges_url":"https://api.github.com/repos/azkaban/azkaban/merges","archive_url":"https://api.github.com/repos/azkaban/azkaban/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/azkaban/azkaban/downloads","issues_url":"https://api.github.com/repos/azkaban/azkaban/issues{/number}","pulls_url":"https://api.github.com/repos/azkaban/azkaban/pulls{/number}","milestones_url":"https://api.github.com/repos/azkaban/azkaban/milestones{/number}","notifications_url":"https://api.github.com/repos/azkaban/azkaban/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/azkaban/azkaban/labels{/name}","releases_url":"https://api.github.com/repos/azkaban/azkaban/releases{/id}","deployments_url":"https://api.github.com/repos/azkaban/azkaban/deployments","created_at":"2012-10-18T01:34:53Z","updated_at":"2017-01-05T06:53:29Z","pushed_at":"2017-01-06T03:16:41Z","git_url":"git://github.com/azkaban/azkaban.git","ssh_url":"git@github.com:azkaban/azkaban.git","clone_url":"https://github.com/azkaban/azkaban.git","svn_url":"https://github.com/azkaban/azkaban","homepage":"https://azkaban.github.io","size":33441,"stargazers_count":918,"watchers_count":918,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":523,"mirror_url":null,"open_issues_count":285,"forks":523,"open_issues":285,"watchers":918,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/azkaban/azkaban/pulls/861"},"html":{"href":"https://github.com/azkaban/azkaban/pull/861"},"issue":{"href":"https://api.github.com/repos/azkaban/azkaban/issues/861"},"comments":{"href":"https://api.github.com/repos/azkaban/azkaban/issues/861/comments"},"review_comments":{"href":"https://api.github.com/repos/azkaban/azkaban/pulls/861/comments"},"review_comment":{"href":"https://api.github.com/repos/azkaban/azkaban/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/azkaban/azkaban/pulls/861/commits"},"statuses":{"href":"https://api.github.com/repos/azkaban/azkaban/statuses/0ecf6fd22b8d1dfce26a7336f6888b83fb3ae6d9"}}}}
{"actor":{"display_login":"juhoautio"}}