{"action":"closed","number":31,"pull_request":{"url":"https://api.github.com/repos/lyft/discovery/pulls/31","id":143255387,"html_url":"https://github.com/lyft/discovery/pull/31","diff_url":"https://github.com/lyft/discovery/pull/31.diff","patch_url":"https://github.com/lyft/discovery/pull/31.patch","issue_url":"https://api.github.com/repos/lyft/discovery/issues/31","number":31,"state":"closed","locked":false,"title":"Fix HostService.is_expired TZ bug and add unit test","user":{"login":"wjackson","id":315342,"avatar_url":"https://avatars0.githubusercontent.com/u/315342?v=4","gravatar_id":"","url":"https://api.github.com/users/wjackson","html_url":"https://github.com/wjackson","followers_url":"https://api.github.com/users/wjackson/followers","following_url":"https://api.github.com/users/wjackson/following{/other_user}","gists_url":"https://api.github.com/users/wjackson/gists{/gist_id}","starred_url":"https://api.github.com/users/wjackson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wjackson/subscriptions","organizations_url":"https://api.github.com/users/wjackson/orgs","repos_url":"https://api.github.com/users/wjackson/repos","events_url":"https://api.github.com/users/wjackson/events{/privacy}","received_events_url":"https://api.github.com/users/wjackson/received_events","type":"User","site_admin":false},"body":"When testing with `InMemory` and `InFile` backends, I noticed that my hosts weren't expiring. Looks like that's because `now` is set to `datetime.now()` in `HostService._is_expired()` but `last_check_in` is set to `datetime.utcnow()` at registration time. \r\n\r\nLooks like there's an attempt to address this by calling `pytz.utc.localize()` but that just assigns tzinfo without changing any of the datetime's fields.\r\n\r\nThis PR has a unit test that excises this bug and a fix.","created_at":"2017-09-26T22:10:25Z","updated_at":"2017-09-28T22:20:07Z","closed_at":"2017-09-28T22:20:07Z","merged_at":"2017-09-28T22:20:07Z","merge_commit_sha":"3d6528152a9b5b5c378b32fd3986d59517d922c8","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/lyft/discovery/pulls/31/commits","review_comments_url":"https://api.github.com/repos/lyft/discovery/pulls/31/comments","review_comment_url":"https://api.github.com/repos/lyft/discovery/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lyft/discovery/issues/31/comments","statuses_url":"https://api.github.com/repos/lyft/discovery/statuses/20062f43c51eda6564a058e1306197ea7b9f7124","head":{"label":"wjackson:tz-fix","ref":"tz-fix","sha":"20062f43c51eda6564a058e1306197ea7b9f7124","user":{"login":"wjackson","id":315342,"avatar_url":"https://avatars0.githubusercontent.com/u/315342?v=4","gravatar_id":"","url":"https://api.github.com/users/wjackson","html_url":"https://github.com/wjackson","followers_url":"https://api.github.com/users/wjackson/followers","following_url":"https://api.github.com/users/wjackson/following{/other_user}","gists_url":"https://api.github.com/users/wjackson/gists{/gist_id}","starred_url":"https://api.github.com/users/wjackson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wjackson/subscriptions","organizations_url":"https://api.github.com/users/wjackson/orgs","repos_url":"https://api.github.com/users/wjackson/repos","events_url":"https://api.github.com/users/wjackson/events{/privacy}","received_events_url":"https://api.github.com/users/wjackson/received_events","type":"User","site_admin":false},"repo":{"id":104940866,"name":"discovery","full_name":"wjackson/discovery","owner":{"login":"wjackson","id":315342,"avatar_url":"https://avatars0.githubusercontent.com/u/315342?v=4","gravatar_id":"","url":"https://api.github.com/users/wjackson","html_url":"https://github.com/wjackson","followers_url":"https://api.github.com/users/wjackson/followers","following_url":"https://api.github.com/users/wjackson/following{/other_user}","gists_url":"https://api.github.com/users/wjackson/gists{/gist_id}","starred_url":"https://api.github.com/users/wjackson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wjackson/subscriptions","organizations_url":"https://api.github.com/users/wjackson/orgs","repos_url":"https://api.github.com/users/wjackson/repos","events_url":"https://api.github.com/users/wjackson/events{/privacy}","received_events_url":"https://api.github.com/users/wjackson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wjackson/discovery","description":"This service provides a REST interface for querying for the list of hosts that belong to all microservices.","fork":true,"url":"https://api.github.com/repos/wjackson/discovery","forks_url":"https://api.github.com/repos/wjackson/discovery/forks","keys_url":"https://api.github.com/repos/wjackson/discovery/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wjackson/discovery/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wjackson/discovery/teams","hooks_url":"https://api.github.com/repos/wjackson/discovery/hooks","issue_events_url":"https://api.github.com/repos/wjackson/discovery/issues/events{/number}","events_url":"https://api.github.com/repos/wjackson/discovery/events","assignees_url":"https://api.github.com/repos/wjackson/discovery/assignees{/user}","branches_url":"https://api.github.com/repos/wjackson/discovery/branches{/branch}","tags_url":"https://api.github.com/repos/wjackson/discovery/tags","blobs_url":"https://api.github.com/repos/wjackson/discovery/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wjackson/discovery/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wjackson/discovery/git/refs{/sha}","trees_url":"https://api.github.com/repos/wjackson/discovery/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wjackson/discovery/statuses/{sha}","languages_url":"https://api.github.com/repos/wjackson/discovery/languages","stargazers_url":"https://api.github.com/repos/wjackson/discovery/stargazers","contributors_url":"https://api.github.com/repos/wjackson/discovery/contributors","subscribers_url":"https://api.github.com/repos/wjackson/discovery/subscribers","subscription_url":"https://api.github.com/repos/wjackson/discovery/subscription","commits_url":"https://api.github.com/repos/wjackson/discovery/commits{/sha}","git_commits_url":"https://api.github.com/repos/wjackson/discovery/git/commits{/sha}","comments_url":"https://api.github.com/repos/wjackson/discovery/comments{/number}","issue_comment_url":"https://api.github.com/repos/wjackson/discovery/issues/comments{/number}","contents_url":"https://api.github.com/repos/wjackson/discovery/contents/{+path}","compare_url":"https://api.github.com/repos/wjackson/discovery/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wjackson/discovery/merges","archive_url":"https://api.github.com/repos/wjackson/discovery/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wjackson/discovery/downloads","issues_url":"https://api.github.com/repos/wjackson/discovery/issues{/number}","pulls_url":"https://api.github.com/repos/wjackson/discovery/pulls{/number}","milestones_url":"https://api.github.com/repos/wjackson/discovery/milestones{/number}","notifications_url":"https://api.github.com/repos/wjackson/discovery/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wjackson/discovery/labels{/name}","releases_url":"https://api.github.com/repos/wjackson/discovery/releases{/id}","deployments_url":"https://api.github.com/repos/wjackson/discovery/deployments","created_at":"2017-09-26T21:44:04Z","updated_at":"2017-09-26T21:44:06Z","pushed_at":"2017-09-28T14:52:38Z","git_url":"git://github.com/wjackson/discovery.git","ssh_url":"git@github.com:wjackson/discovery.git","clone_url":"https://github.com/wjackson/discovery.git","svn_url":"https://github.com/wjackson/discovery","homepage":null,"size":36,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"lyft:master","ref":"master","sha":"8f8afa8e14276ed1d2e1cba98bcb8446d825f6a2","user":{"login":"lyft","id":4269340,"avatar_url":"https://avatars2.githubusercontent.com/u/4269340?v=4","gravatar_id":"","url":"https://api.github.com/users/lyft","html_url":"https://github.com/lyft","followers_url":"https://api.github.com/users/lyft/followers","following_url":"https://api.github.com/users/lyft/following{/other_user}","gists_url":"https://api.github.com/users/lyft/gists{/gist_id}","starred_url":"https://api.github.com/users/lyft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lyft/subscriptions","organizations_url":"https://api.github.com/users/lyft/orgs","repos_url":"https://api.github.com/users/lyft/repos","events_url":"https://api.github.com/users/lyft/events{/privacy}","received_events_url":"https://api.github.com/users/lyft/received_events","type":"Organization","site_admin":false},"repo":{"id":65575590,"name":"discovery","full_name":"lyft/discovery","owner":{"login":"lyft","id":4269340,"avatar_url":"https://avatars2.githubusercontent.com/u/4269340?v=4","gravatar_id":"","url":"https://api.github.com/users/lyft","html_url":"https://github.com/lyft","followers_url":"https://api.github.com/users/lyft/followers","following_url":"https://api.github.com/users/lyft/following{/other_user}","gists_url":"https://api.github.com/users/lyft/gists{/gist_id}","starred_url":"https://api.github.com/users/lyft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lyft/subscriptions","organizations_url":"https://api.github.com/users/lyft/orgs","repos_url":"https://api.github.com/users/lyft/repos","events_url":"https://api.github.com/users/lyft/events{/privacy}","received_events_url":"https://api.github.com/users/lyft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/lyft/discovery","description":"This service provides a REST interface for querying for the list of hosts that belong to all microservices.","fork":false,"url":"https://api.github.com/repos/lyft/discovery","forks_url":"https://api.github.com/repos/lyft/discovery/forks","keys_url":"https://api.github.com/repos/lyft/discovery/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lyft/discovery/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lyft/discovery/teams","hooks_url":"https://api.github.com/repos/lyft/discovery/hooks","issue_events_url":"https://api.github.com/repos/lyft/discovery/issues/events{/number}","events_url":"https://api.github.com/repos/lyft/discovery/events","assignees_url":"https://api.github.com/repos/lyft/discovery/assignees{/user}","branches_url":"https://api.github.com/repos/lyft/discovery/branches{/branch}","tags_url":"https://api.github.com/repos/lyft/discovery/tags","blobs_url":"https://api.github.com/repos/lyft/discovery/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lyft/discovery/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lyft/discovery/git/refs{/sha}","trees_url":"https://api.github.com/repos/lyft/discovery/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lyft/discovery/statuses/{sha}","languages_url":"https://api.github.com/repos/lyft/discovery/languages","stargazers_url":"https://api.github.com/repos/lyft/discovery/stargazers","contributors_url":"https://api.github.com/repos/lyft/discovery/contributors","subscribers_url":"https://api.github.com/repos/lyft/discovery/subscribers","subscription_url":"https://api.github.com/repos/lyft/discovery/subscription","commits_url":"https://api.github.com/repos/lyft/discovery/commits{/sha}","git_commits_url":"https://api.github.com/repos/lyft/discovery/git/commits{/sha}","comments_url":"https://api.github.com/repos/lyft/discovery/comments{/number}","issue_comment_url":"https://api.github.com/repos/lyft/discovery/issues/comments{/number}","contents_url":"https://api.github.com/repos/lyft/discovery/contents/{+path}","compare_url":"https://api.github.com/repos/lyft/discovery/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lyft/discovery/merges","archive_url":"https://api.github.com/repos/lyft/discovery/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lyft/discovery/downloads","issues_url":"https://api.github.com/repos/lyft/discovery/issues{/number}","pulls_url":"https://api.github.com/repos/lyft/discovery/pulls{/number}","milestones_url":"https://api.github.com/repos/lyft/discovery/milestones{/number}","notifications_url":"https://api.github.com/repos/lyft/discovery/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lyft/discovery/labels{/name}","releases_url":"https://api.github.com/repos/lyft/discovery/releases{/id}","deployments_url":"https://api.github.com/repos/lyft/discovery/deployments","created_at":"2016-08-12T18:34:59Z","updated_at":"2017-09-28T06:53:52Z","pushed_at":"2017-09-28T22:20:07Z","git_url":"git://github.com/lyft/discovery.git","ssh_url":"git@github.com:lyft/discovery.git","clone_url":"https://github.com/lyft/discovery.git","svn_url":"https://github.com/lyft/discovery","homepage":null,"size":34,"stargazers_count":60,"watchers_count":60,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":17,"mirror_url":null,"open_issues_count":11,"forks":17,"open_issues":11,"watchers":60,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lyft/discovery/pulls/31"},"html":{"href":"https://github.com/lyft/discovery/pull/31"},"issue":{"href":"https://api.github.com/repos/lyft/discovery/issues/31"},"comments":{"href":"https://api.github.com/repos/lyft/discovery/issues/31/comments"},"review_comments":{"href":"https://api.github.com/repos/lyft/discovery/pulls/31/comments"},"review_comment":{"href":"https://api.github.com/repos/lyft/discovery/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lyft/discovery/pulls/31/commits"},"statuses":{"href":"https://api.github.com/repos/lyft/discovery/statuses/20062f43c51eda6564a058e1306197ea7b9f7124"}},"author_association":"NONE","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"danielhochman","id":4712430,"avatar_url":"https://avatars3.githubusercontent.com/u/4712430?v=4","gravatar_id":"","url":"https://api.github.com/users/danielhochman","html_url":"https://github.com/danielhochman","followers_url":"https://api.github.com/users/danielhochman/followers","following_url":"https://api.github.com/users/danielhochman/following{/other_user}","gists_url":"https://api.github.com/users/danielhochman/gists{/gist_id}","starred_url":"https://api.github.com/users/danielhochman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielhochman/subscriptions","organizations_url":"https://api.github.com/users/danielhochman/orgs","repos_url":"https://api.github.com/users/danielhochman/repos","events_url":"https://api.github.com/users/danielhochman/events{/privacy}","received_events_url":"https://api.github.com/users/danielhochman/received_events","type":"User","site_admin":false},"comments":0,"review_comments":2,"maintainer_can_modify":false,"commits":1,"additions":26,"deletions":3,"changed_files":2}}
{"actor":{"display_login":"danielhochman"}}