{"action":"opened","number":2016,"pull_request":{"url":"https://api.github.com/repos/azkaban/azkaban/pulls/2016","id":228504475,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI4NTA0NDc1","html_url":"https://github.com/azkaban/azkaban/pull/2016","diff_url":"https://github.com/azkaban/azkaban/pull/2016.diff","patch_url":"https://github.com/azkaban/azkaban/pull/2016.patch","issue_url":"https://api.github.com/repos/azkaban/azkaban/issues/2016","number":2016,"state":"open","locked":false,"title":"Finalize execution if executor doesn't exist","user":{"login":"juhoautio","id":4446608,"node_id":"MDQ6VXNlcjQ0NDY2MDg=","avatar_url":"https://avatars3.githubusercontent.com/u/4446608?v=4","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":"Problem scenario:\r\n1. An executor is stopped [1]\r\n2. Executor is removed from DB table: `executors` [2]\r\n3. Updater thread tries to get an update of an execution that was running on the removed executor\r\n  - Request fails as executor is not running any more\r\n  - Updater sends alert emails about unresponsive executor\r\n\r\nFix (this PR):\r\n- **If update call fails against an executor, check from the DB directly if the executor still exists or not. If not, finalize the execution.** \r\n- If executor still exists, do as before, ie. periodically alert about unresponsive executor.\r\n\r\n----\r\n\r\n[1] This can be a graceful shutdown or a sudden crash, doesn't matter\r\n\r\n[2] Executor can be removed from the DB in the following ways\r\n- Graceful shutdown: executor removes itself\r\n- Unexpected shutdown – admin removes executor from DB manually, or external monitoring software does it after seeing that the instance has been stopped ","created_at":"2018-11-05T21:55:12Z","updated_at":"2018-11-05T21:55:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/azkaban/azkaban/pulls/2016/commits","review_comments_url":"https://api.github.com/repos/azkaban/azkaban/pulls/2016/comments","review_comment_url":"https://api.github.com/repos/azkaban/azkaban/pulls/comments{/number}","comments_url":"https://api.github.com/repos/azkaban/azkaban/issues/2016/comments","statuses_url":"https://api.github.com/repos/azkaban/azkaban/statuses/464d800ca5fee78480edc197b34536b7e00c4421","head":{"label":"juhoautio:updater_check_for_missing_executor","ref":"updater_check_for_missing_executor","sha":"464d800ca5fee78480edc197b34536b7e00c4421","user":{"login":"juhoautio","id":4446608,"node_id":"MDQ6VXNlcjQ0NDY2MDg=","avatar_url":"https://avatars3.githubusercontent.com/u/4446608?v=4","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,"node_id":"MDEwOlJlcG9zaXRvcnk0NzU0NDMzOA==","name":"azkaban","full_name":"juhoautio/azkaban","private":false,"owner":{"login":"juhoautio","id":4446608,"node_id":"MDQ6VXNlcjQ0NDY2MDg=","avatar_url":"https://avatars3.githubusercontent.com/u/4446608?v=4","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},"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":"2018-11-05T19:35:42Z","pushed_at":"2018-11-05T21:45:17Z","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":50332,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"azkaban:master","ref":"master","sha":"cf940c6462fe32d7ee3175d40372e4e9fb528f84","user":{"login":"azkaban","id":213618,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIxMzYxOA==","avatar_url":"https://avatars0.githubusercontent.com/u/213618?v=4","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,"node_id":"MDEwOlJlcG9zaXRvcnk2MjcxNDIx","name":"azkaban","full_name":"azkaban/azkaban","private":false,"owner":{"login":"azkaban","id":213618,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIxMzYxOA==","avatar_url":"https://avatars0.githubusercontent.com/u/213618?v=4","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},"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":"2018-11-05T19:21:29Z","pushed_at":"2018-11-05T19:42:45Z","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":49960,"stargazers_count":2112,"watchers_count":2112,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":934,"mirror_url":null,"archived":false,"open_issues_count":496,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":934,"open_issues":496,"watchers":2112,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/azkaban/azkaban/pulls/2016"},"html":{"href":"https://github.com/azkaban/azkaban/pull/2016"},"issue":{"href":"https://api.github.com/repos/azkaban/azkaban/issues/2016"},"comments":{"href":"https://api.github.com/repos/azkaban/azkaban/issues/2016/comments"},"review_comments":{"href":"https://api.github.com/repos/azkaban/azkaban/pulls/2016/comments"},"review_comment":{"href":"https://api.github.com/repos/azkaban/azkaban/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/azkaban/azkaban/pulls/2016/commits"},"statuses":{"href":"https://api.github.com/repos/azkaban/azkaban/statuses/464d800ca5fee78480edc197b34536b7e00c4421"}},"author_association":"COLLABORATOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":48,"deletions":17,"changed_files":4}}
{"actor":{"display_login":"juhoautio"}}