{"action":"opened","number":35,"pull_request":{"url":"https://api.github.com/repos/krux/aws-analysis-tools/pulls/35","id":215392941,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE1MzkyOTQx","html_url":"https://github.com/krux/aws-analysis-tools/pull/35","diff_url":"https://github.com/krux/aws-analysis-tools/pull/35.diff","patch_url":"https://github.com/krux/aws-analysis-tools/pull/35.patch","issue_url":"https://api.github.com/repos/krux/aws-analysis-tools/issues/35","number":35,"state":"open","locked":false,"title":"PE-6426: Bug fix","user":{"login":"hanpeter","id":13791788,"node_id":"MDQ6VXNlcjEzNzkxNzg4","avatar_url":"https://avatars0.githubusercontent.com/u/13791788?v=4","gravatar_id":"","url":"https://api.github.com/users/hanpeter","html_url":"https://github.com/hanpeter","followers_url":"https://api.github.com/users/hanpeter/followers","following_url":"https://api.github.com/users/hanpeter/following{/other_user}","gists_url":"https://api.github.com/users/hanpeter/gists{/gist_id}","starred_url":"https://api.github.com/users/hanpeter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hanpeter/subscriptions","organizations_url":"https://api.github.com/users/hanpeter/orgs","repos_url":"https://api.github.com/users/hanpeter/repos","events_url":"https://api.github.com/users/hanpeter/events{/privacy}","received_events_url":"https://api.github.com/users/hanpeter/received_events","type":"User","site_admin":false},"body":"## What does this PR do?\r\n\r\nThis PR fixes a bug where the `krux-ec2-instance` script fails when it tries to display a terminated, but visible instance.\r\n\r\n## Why is this change being made?\r\n\r\nThis is a bug fix.\r\n\r\n## How does this PR do it?\r\n\r\n`i.groups` is a list of security groups. If an instance is terminated, this list is empty. `i.groups[0]` causes a `KeyError`. \r\n\r\n## How was this tested? How can the reviewer verify your testing?\r\n\r\nThe change was tested on the local development environment.\r\n\r\n```bash\r\n$ krux-ec2-instances -G Elastic -G krux-periodic -G nat-erin --no-name -H --boto-region us-east-1\r\nTraceback (most recent call last):\r\n  File \"/Users/phan/.virtualenvs/aws-analysis-tools-X-8mCMP0/bin/krux-ec2-instances\", line 11, in <module>\r\n    load_entry_point('aws-analysis-tools', 'console_scripts', 'krux-ec2-instances')()\r\n  File \"/Users/phan/projects/aws-analysis-tools/aws_analysis_tools/cli/instances.py\", line 262, in main\r\n    app.run()\r\n  File \"/Users/phan/projects/aws-analysis-tools/aws_analysis_tools/cli/instances.py\", line 256, in run\r\n    self.output_table(instances)\r\n  File \"/Users/phan/projects/aws-analysis-tools/aws_analysis_tools/cli/instances.py\", line 241, in output_table\r\n    i.groups[0].name,\r\nIndexError: list index out of range\r\n$ krux-ec2-instances -G Elastic -G krux-periodic -G nat-erin --no-name -H --boto-region us-east-1\r\ni-0b6b1d818c1697458       c3.8xlarge   us-east-1a   None   terminated   ebs   -\r\ni-068bce60f7fb15cff       c3.4xlarge   us-east-1a   None   terminated   ebs   -\r\ni-08b1b635e06a648b5       c3.4xlarge   us-east-1a   None   terminated   ebs   -\r\ni-05d3a61711836819f       c3.4xlarge   us-east-1a   None   terminated   ebs   -\r\ni-07575d2dfaf9c639f       c3.4xlarge   us-east-1a   None   terminated   ebs   -\r\n```\r\n\r\n## What gif best describes this PR or how it makes you feel?\r\n\r\n![](https://media.giphy.com/media/xT5LMKgAu0SqZ4BUSk/giphy.gif)\r\n\r\n## Completion checklist\r\n\r\n- [ ] The pull request has been appropriately labeled according to\r\n  our [conventions](https://kruxdigital.jira.com/wiki/display/EN/Changes+and+Peer+Review).\r\n- [ ] The version of the package has been updated according to [Semantic Versioning](http://semver.org/).\r\n- [ ] The change has unit & integration tests as appropriate.\r\n- [ ] Documentation is up to date and correct.\r\n- [ ] Dependencies are correctly listed under `requirements.pip` and\r\n      are up to date without going over a major version.\r\n- [ ] Stakeholders have been notified. Workflow-impacting changes have\r\n      been appropriately socialized to avoid surprises.\r\n- [ ] The change is either small or have been canaried in the appropriate environment(s).","created_at":"2018-09-13T19:38:30Z","updated_at":"2018-09-13T19:38:30Z","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/krux/aws-analysis-tools/pulls/35/commits","review_comments_url":"https://api.github.com/repos/krux/aws-analysis-tools/pulls/35/comments","review_comment_url":"https://api.github.com/repos/krux/aws-analysis-tools/pulls/comments{/number}","comments_url":"https://api.github.com/repos/krux/aws-analysis-tools/issues/35/comments","statuses_url":"https://api.github.com/repos/krux/aws-analysis-tools/statuses/1da5f5f1e20c0456f6582829e038fe43330e5c30","head":{"label":"krux:phan_bugfix","ref":"phan_bugfix","sha":"1da5f5f1e20c0456f6582829e038fe43330e5c30","user":{"login":"krux","id":72871,"node_id":"MDEyOk9yZ2FuaXphdGlvbjcyODcx","avatar_url":"https://avatars1.githubusercontent.com/u/72871?v=4","gravatar_id":"","url":"https://api.github.com/users/krux","html_url":"https://github.com/krux","followers_url":"https://api.github.com/users/krux/followers","following_url":"https://api.github.com/users/krux/following{/other_user}","gists_url":"https://api.github.com/users/krux/gists{/gist_id}","starred_url":"https://api.github.com/users/krux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krux/subscriptions","organizations_url":"https://api.github.com/users/krux/orgs","repos_url":"https://api.github.com/users/krux/repos","events_url":"https://api.github.com/users/krux/events{/privacy}","received_events_url":"https://api.github.com/users/krux/received_events","type":"Organization","site_admin":false},"repo":{"id":15554922,"node_id":"MDEwOlJlcG9zaXRvcnkxNTU1NDkyMg==","name":"aws-analysis-tools","full_name":"krux/aws-analysis-tools","owner":{"login":"krux","id":72871,"node_id":"MDEyOk9yZ2FuaXphdGlvbjcyODcx","avatar_url":"https://avatars1.githubusercontent.com/u/72871?v=4","gravatar_id":"","url":"https://api.github.com/users/krux","html_url":"https://github.com/krux","followers_url":"https://api.github.com/users/krux/followers","following_url":"https://api.github.com/users/krux/following{/other_user}","gists_url":"https://api.github.com/users/krux/gists{/gist_id}","starred_url":"https://api.github.com/users/krux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krux/subscriptions","organizations_url":"https://api.github.com/users/krux/orgs","repos_url":"https://api.github.com/users/krux/repos","events_url":"https://api.github.com/users/krux/events{/privacy}","received_events_url":"https://api.github.com/users/krux/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/krux/aws-analysis-tools","description":null,"fork":true,"url":"https://api.github.com/repos/krux/aws-analysis-tools","forks_url":"https://api.github.com/repos/krux/aws-analysis-tools/forks","keys_url":"https://api.github.com/repos/krux/aws-analysis-tools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/krux/aws-analysis-tools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/krux/aws-analysis-tools/teams","hooks_url":"https://api.github.com/repos/krux/aws-analysis-tools/hooks","issue_events_url":"https://api.github.com/repos/krux/aws-analysis-tools/issues/events{/number}","events_url":"https://api.github.com/repos/krux/aws-analysis-tools/events","assignees_url":"https://api.github.com/repos/krux/aws-analysis-tools/assignees{/user}","branches_url":"https://api.github.com/repos/krux/aws-analysis-tools/branches{/branch}","tags_url":"https://api.github.com/repos/krux/aws-analysis-tools/tags","blobs_url":"https://api.github.com/repos/krux/aws-analysis-tools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/krux/aws-analysis-tools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/krux/aws-analysis-tools/git/refs{/sha}","trees_url":"https://api.github.com/repos/krux/aws-analysis-tools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/krux/aws-analysis-tools/statuses/{sha}","languages_url":"https://api.github.com/repos/krux/aws-analysis-tools/languages","stargazers_url":"https://api.github.com/repos/krux/aws-analysis-tools/stargazers","contributors_url":"https://api.github.com/repos/krux/aws-analysis-tools/contributors","subscribers_url":"https://api.github.com/repos/krux/aws-analysis-tools/subscribers","subscription_url":"https://api.github.com/repos/krux/aws-analysis-tools/subscription","commits_url":"https://api.github.com/repos/krux/aws-analysis-tools/commits{/sha}","git_commits_url":"https://api.github.com/repos/krux/aws-analysis-tools/git/commits{/sha}","comments_url":"https://api.github.com/repos/krux/aws-analysis-tools/comments{/number}","issue_comment_url":"https://api.github.com/repos/krux/aws-analysis-tools/issues/comments{/number}","contents_url":"https://api.github.com/repos/krux/aws-analysis-tools/contents/{+path}","compare_url":"https://api.github.com/repos/krux/aws-analysis-tools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/krux/aws-analysis-tools/merges","archive_url":"https://api.github.com/repos/krux/aws-analysis-tools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/krux/aws-analysis-tools/downloads","issues_url":"https://api.github.com/repos/krux/aws-analysis-tools/issues{/number}","pulls_url":"https://api.github.com/repos/krux/aws-analysis-tools/pulls{/number}","milestones_url":"https://api.github.com/repos/krux/aws-analysis-tools/milestones{/number}","notifications_url":"https://api.github.com/repos/krux/aws-analysis-tools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/krux/aws-analysis-tools/labels{/name}","releases_url":"https://api.github.com/repos/krux/aws-analysis-tools/releases{/id}","deployments_url":"https://api.github.com/repos/krux/aws-analysis-tools/deployments","created_at":"2013-12-31T18:35:02Z","updated_at":"2018-02-07T00:20:27Z","pushed_at":"2018-09-13T19:27:29Z","git_url":"git://github.com/krux/aws-analysis-tools.git","ssh_url":"git@github.com:krux/aws-analysis-tools.git","clone_url":"https://github.com/krux/aws-analysis-tools.git","svn_url":"https://github.com/krux/aws-analysis-tools","homepage":null,"size":201,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1,"open_issues":1,"watchers":2,"default_branch":"master"}},"base":{"label":"krux:master","ref":"master","sha":"371b70fe4ccc9faccbc55a2b20aa0672aadd99c9","user":{"login":"krux","id":72871,"node_id":"MDEyOk9yZ2FuaXphdGlvbjcyODcx","avatar_url":"https://avatars1.githubusercontent.com/u/72871?v=4","gravatar_id":"","url":"https://api.github.com/users/krux","html_url":"https://github.com/krux","followers_url":"https://api.github.com/users/krux/followers","following_url":"https://api.github.com/users/krux/following{/other_user}","gists_url":"https://api.github.com/users/krux/gists{/gist_id}","starred_url":"https://api.github.com/users/krux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krux/subscriptions","organizations_url":"https://api.github.com/users/krux/orgs","repos_url":"https://api.github.com/users/krux/repos","events_url":"https://api.github.com/users/krux/events{/privacy}","received_events_url":"https://api.github.com/users/krux/received_events","type":"Organization","site_admin":false},"repo":{"id":15554922,"node_id":"MDEwOlJlcG9zaXRvcnkxNTU1NDkyMg==","name":"aws-analysis-tools","full_name":"krux/aws-analysis-tools","owner":{"login":"krux","id":72871,"node_id":"MDEyOk9yZ2FuaXphdGlvbjcyODcx","avatar_url":"https://avatars1.githubusercontent.com/u/72871?v=4","gravatar_id":"","url":"https://api.github.com/users/krux","html_url":"https://github.com/krux","followers_url":"https://api.github.com/users/krux/followers","following_url":"https://api.github.com/users/krux/following{/other_user}","gists_url":"https://api.github.com/users/krux/gists{/gist_id}","starred_url":"https://api.github.com/users/krux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krux/subscriptions","organizations_url":"https://api.github.com/users/krux/orgs","repos_url":"https://api.github.com/users/krux/repos","events_url":"https://api.github.com/users/krux/events{/privacy}","received_events_url":"https://api.github.com/users/krux/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/krux/aws-analysis-tools","description":null,"fork":true,"url":"https://api.github.com/repos/krux/aws-analysis-tools","forks_url":"https://api.github.com/repos/krux/aws-analysis-tools/forks","keys_url":"https://api.github.com/repos/krux/aws-analysis-tools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/krux/aws-analysis-tools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/krux/aws-analysis-tools/teams","hooks_url":"https://api.github.com/repos/krux/aws-analysis-tools/hooks","issue_events_url":"https://api.github.com/repos/krux/aws-analysis-tools/issues/events{/number}","events_url":"https://api.github.com/repos/krux/aws-analysis-tools/events","assignees_url":"https://api.github.com/repos/krux/aws-analysis-tools/assignees{/user}","branches_url":"https://api.github.com/repos/krux/aws-analysis-tools/branches{/branch}","tags_url":"https://api.github.com/repos/krux/aws-analysis-tools/tags","blobs_url":"https://api.github.com/repos/krux/aws-analysis-tools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/krux/aws-analysis-tools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/krux/aws-analysis-tools/git/refs{/sha}","trees_url":"https://api.github.com/repos/krux/aws-analysis-tools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/krux/aws-analysis-tools/statuses/{sha}","languages_url":"https://api.github.com/repos/krux/aws-analysis-tools/languages","stargazers_url":"https://api.github.com/repos/krux/aws-analysis-tools/stargazers","contributors_url":"https://api.github.com/repos/krux/aws-analysis-tools/contributors","subscribers_url":"https://api.github.com/repos/krux/aws-analysis-tools/subscribers","subscription_url":"https://api.github.com/repos/krux/aws-analysis-tools/subscription","commits_url":"https://api.github.com/repos/krux/aws-analysis-tools/commits{/sha}","git_commits_url":"https://api.github.com/repos/krux/aws-analysis-tools/git/commits{/sha}","comments_url":"https://api.github.com/repos/krux/aws-analysis-tools/comments{/number}","issue_comment_url":"https://api.github.com/repos/krux/aws-analysis-tools/issues/comments{/number}","contents_url":"https://api.github.com/repos/krux/aws-analysis-tools/contents/{+path}","compare_url":"https://api.github.com/repos/krux/aws-analysis-tools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/krux/aws-analysis-tools/merges","archive_url":"https://api.github.com/repos/krux/aws-analysis-tools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/krux/aws-analysis-tools/downloads","issues_url":"https://api.github.com/repos/krux/aws-analysis-tools/issues{/number}","pulls_url":"https://api.github.com/repos/krux/aws-analysis-tools/pulls{/number}","milestones_url":"https://api.github.com/repos/krux/aws-analysis-tools/milestones{/number}","notifications_url":"https://api.github.com/repos/krux/aws-analysis-tools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/krux/aws-analysis-tools/labels{/name}","releases_url":"https://api.github.com/repos/krux/aws-analysis-tools/releases{/id}","deployments_url":"https://api.github.com/repos/krux/aws-analysis-tools/deployments","created_at":"2013-12-31T18:35:02Z","updated_at":"2018-02-07T00:20:27Z","pushed_at":"2018-09-13T19:27:29Z","git_url":"git://github.com/krux/aws-analysis-tools.git","ssh_url":"git@github.com:krux/aws-analysis-tools.git","clone_url":"https://github.com/krux/aws-analysis-tools.git","svn_url":"https://github.com/krux/aws-analysis-tools","homepage":null,"size":201,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1,"open_issues":1,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/krux/aws-analysis-tools/pulls/35"},"html":{"href":"https://github.com/krux/aws-analysis-tools/pull/35"},"issue":{"href":"https://api.github.com/repos/krux/aws-analysis-tools/issues/35"},"comments":{"href":"https://api.github.com/repos/krux/aws-analysis-tools/issues/35/comments"},"review_comments":{"href":"https://api.github.com/repos/krux/aws-analysis-tools/pulls/35/comments"},"review_comment":{"href":"https://api.github.com/repos/krux/aws-analysis-tools/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/krux/aws-analysis-tools/pulls/35/commits"},"statuses":{"href":"https://api.github.com/repos/krux/aws-analysis-tools/statuses/1da5f5f1e20c0456f6582829e038fe43330e5c30"}},"author_association":"MEMBER","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":2,"additions":2,"deletions":2,"changed_files":2}}
{"actor":{"display_login":"hanpeter"}}