{"action":"opened","number":4329,"pull_request":{"url":"https://api.github.com/repos/pypa/warehouse/pulls/4329","id":202890209,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAyODkwMjA5","html_url":"https://github.com/pypa/warehouse/pull/4329","diff_url":"https://github.com/pypa/warehouse/pull/4329.diff","patch_url":"https://github.com/pypa/warehouse/pull/4329.patch","issue_url":"https://api.github.com/repos/pypa/warehouse/issues/4329","number":4329,"state":"open","locked":false,"title":"Use alpine equivalent of Docker Compose services to reduce size and startup time","user":{"login":"mschwager","id":1724818,"node_id":"MDQ6VXNlcjE3MjQ4MTg=","avatar_url":"https://avatars1.githubusercontent.com/u/1724818?v=4","gravatar_id":"","url":"https://api.github.com/users/mschwager","html_url":"https://github.com/mschwager","followers_url":"https://api.github.com/users/mschwager/followers","following_url":"https://api.github.com/users/mschwager/following{/other_user}","gists_url":"https://api.github.com/users/mschwager/gists{/gist_id}","starred_url":"https://api.github.com/users/mschwager/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mschwager/subscriptions","organizations_url":"https://api.github.com/users/mschwager/orgs","repos_url":"https://api.github.com/users/mschwager/repos","events_url":"https://api.github.com/users/mschwager/events{/privacy}","received_events_url":"https://api.github.com/users/mschwager/received_events","type":"User","site_admin":false},"body":"Hi all,\r\n\r\nThis is my first PR against `warehouse`! Let me know if anything is out of order.\r\n\r\nTo reduce the size of dependencies pulled in for Docker Compose services I've changed the image's to be their Alpine equivalent. This should save something like ~400MB when downloading the images:\r\n\r\n```\r\n$ docker images | grep -E \"postgres|redis|rabbitmq\" | grep -Ev \"<none>|latest\" | sort\r\npostgres                                        10.1-alpine          e6c5e6a76255        6 months ago        38.2MB\r\npostgres                                        10.1                 ec61d13c8566        7 months ago        287MB\r\nrabbitmq                                        3.7-alpine           23917a8e0e82        9 days ago          48MB\r\nrabbitmq                                        3.7                  dc1744b237f9        3 days ago          125MB\r\nredis                                           4.0-alpine           80581db8c700        9 days ago          28.6MB\r\nredis                                           4.0                  f06a5773f01e        3 days ago          83.4MB\r\n```\r\n\r\nOne thing I noticed, though, is a couple of tests fail after the move from `postgres:10.1` -> `postgres:10.1-alpine`. Perhaps this is just an oddity with my dev environment, so I'll be curious to see if the TravisCI tests fail. Here are the failures in question:\r\n\r\n```\r\n============================================== FAILURES ===============================================\r\n____________________________________ TestProjectList.test_no_query ____________________________________\r\n\r\nself = <tests.unit.admin.views.test_projects.TestProjectList object at 0x7f4697e716a0>\r\ndb_request = <pyramid.testing.DummyRequest object at 0x7f4694c8f1d0>\r\n\r\n    def test_no_query(self, db_request):\r\n        projects = sorted(\r\n            [ProjectFactory.create() for _ in range(30)],\r\n            key=lambda p: p.normalized_name,\r\n        )\r\n        result = views.project_list(db_request)\r\n    \r\n>       assert result == {\"projects\": projects[:25], \"query\": None}\r\nE       AssertionError: assert {'projects': ...'query': None} == {'projects': [...'query': None}\r\nE         Common items:\r\nE         {'query': None}\r\nE         Differing items:\r\nE         {'projects': <paginate.Page: Page 1/2>} != {'projects': [Project(name='buGkrZztOVdJ'), Project(name='CUSRSHwyrWYS'), Project(name='DQYmKgwGbDWN'), Project(name='EZSwnoLaZDBP'), Project(name='fGYqTjDlvGzs'), Project(name='fhRNAXlQsSPb'), ...]}\r\nE         Full diff:\r\nE         - {'projects': <paginate.Page: Page 1/2>, 'query': None}\r\nE         + {'projects': [Project(name='buGkrZztOVdJ'),\r\nE         +               Project(name='CUSRSHwyrWYS'),\r\nE         +               Project(name='DQYmKgwGbDWN'),\r\nE         +               Project(name='EZSwnoLaZDBP'),\r\nE         +               Project(name='fGYqTjDlvGzs'),\r\nE         +               Project(name='fhRNAXlQsSPb'),\r\nE         +               Project(name='GLinWsOkojkz'),\r\nE         +               Project(name='gOrRfJDhcYfq'),\r\nE         +               Project(name='HEFdmcDNAyrG'),\r\nE         +               Project(name='hGINavLJVZma'),\r\nE         +               Project(name='hIenNBvaBTCF'),\r\nE         +               Project(name='lioPBgmNzTGj'),\r\nE         +               Project(name='mglUjgSIumKu'),\r\nE         +               Project(name='MNwUhtYjNBTX'),\r\nE         +               Project(name='MPPpqZvLqrwG'),\r\nE         +               Project(name='mPVlJqlpJXWO'),\r\nE         +               Project(name='mzpiabwWpmkw'),\r\nE         +               Project(name='oMDIktqhGEqJ'),\r\nE         +               Project(name='OTEYViBAKZfk'),\r\nE         +               Project(name='PzpfZMoMsAgf'),\r\nE         +               Project(name='QWKRstFHveKi'),\r\nE         +               Project(name='SelaTfofhpsB'),\r\nE         +               Project(name='tKRYkXvtVlDW'),\r\nE         +               Project(name='tXgrnOXiYWKc'),\r\nE         +               Project(name='tYlRgnNjegiv')],\r\nE         +  'query': None}\r\n\r\ntests/unit/admin/views/test_projects.py:38\r\n___________________________________ TestProjectList.test_with_page ____________________________________\r\n\r\nself = <tests.unit.admin.views.test_projects.TestProjectList object at 0x7f468f899ac8>\r\ndb_request = <pyramid.testing.DummyRequest object at 0x7f468f899d68>\r\n\r\n    def test_with_page(self, db_request):\r\n        projects = sorted(\r\n            [ProjectFactory.create() for _ in range(30)],\r\n            key=lambda p: p.normalized_name,\r\n        )\r\n        db_request.GET[\"page\"] = \"2\"\r\n        result = views.project_list(db_request)\r\n    \r\n>       assert result == {\"projects\": projects[25:], \"query\": None}\r\nE       AssertionError: assert {'projects': ...'query': None} == {'projects': [...'query': None}\r\nE         Common items:\r\nE         {'query': None}\r\nE         Differing items:\r\nE         {'projects': <paginate.Page: Page 2/2>} != {'projects': [Project(name='UYEuGqrPAsdI'), Project(name='VGjnNowaWLFS'), Project(name='VJSpPMJWvdha'), Project(name='wBPbUpitYyCJ'), Project(name='WSuUehNTmuFp')]}\r\nE         Full diff:\r\nE         - {'projects': <paginate.Page: Page 2/2>, 'query': None}\r\nE         + {'projects': [Project(name='UYEuGqrPAsdI'),\r\nE         +               Project(name='VGjnNowaWLFS'),\r\nE         +               Project(name='VJSpPMJWvdha'),\r\nE         +               Project(name='wBPbUpitYyCJ'),\r\nE         +               Project(name='WSuUehNTmuFp')],\r\nE         +  'query': None}\r\n\r\ntests/unit/admin/views/test_projects.py:48: AssertionError\r\n================================= 2 failed, 27 passed in 7.38 seconds =================================\r\n```\r\n\r\nI'm especially confused because `tests/unit/admin/views/test_users.py` has very similar tests, but those pass.\r\n\r\nThoughts?","created_at":"2018-07-20T15:55:17Z","updated_at":"2018-07-20T15:55:17Z","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/pypa/warehouse/pulls/4329/commits","review_comments_url":"https://api.github.com/repos/pypa/warehouse/pulls/4329/comments","review_comment_url":"https://api.github.com/repos/pypa/warehouse/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pypa/warehouse/issues/4329/comments","statuses_url":"https://api.github.com/repos/pypa/warehouse/statuses/a4d3f432999c4cd31666eec45ab84c32aa9a6a4a","head":{"label":"mschwager:alpine-services-equivalent","ref":"alpine-services-equivalent","sha":"a4d3f432999c4cd31666eec45ab84c32aa9a6a4a","user":{"login":"mschwager","id":1724818,"node_id":"MDQ6VXNlcjE3MjQ4MTg=","avatar_url":"https://avatars1.githubusercontent.com/u/1724818?v=4","gravatar_id":"","url":"https://api.github.com/users/mschwager","html_url":"https://github.com/mschwager","followers_url":"https://api.github.com/users/mschwager/followers","following_url":"https://api.github.com/users/mschwager/following{/other_user}","gists_url":"https://api.github.com/users/mschwager/gists{/gist_id}","starred_url":"https://api.github.com/users/mschwager/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mschwager/subscriptions","organizations_url":"https://api.github.com/users/mschwager/orgs","repos_url":"https://api.github.com/users/mschwager/repos","events_url":"https://api.github.com/users/mschwager/events{/privacy}","received_events_url":"https://api.github.com/users/mschwager/received_events","type":"User","site_admin":false},"repo":{"id":141726157,"node_id":"MDEwOlJlcG9zaXRvcnkxNDE3MjYxNTc=","name":"warehouse","full_name":"mschwager/warehouse","owner":{"login":"mschwager","id":1724818,"node_id":"MDQ6VXNlcjE3MjQ4MTg=","avatar_url":"https://avatars1.githubusercontent.com/u/1724818?v=4","gravatar_id":"","url":"https://api.github.com/users/mschwager","html_url":"https://github.com/mschwager","followers_url":"https://api.github.com/users/mschwager/followers","following_url":"https://api.github.com/users/mschwager/following{/other_user}","gists_url":"https://api.github.com/users/mschwager/gists{/gist_id}","starred_url":"https://api.github.com/users/mschwager/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mschwager/subscriptions","organizations_url":"https://api.github.com/users/mschwager/orgs","repos_url":"https://api.github.com/users/mschwager/repos","events_url":"https://api.github.com/users/mschwager/events{/privacy}","received_events_url":"https://api.github.com/users/mschwager/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mschwager/warehouse","description":"The Python Package Repository","fork":true,"url":"https://api.github.com/repos/mschwager/warehouse","forks_url":"https://api.github.com/repos/mschwager/warehouse/forks","keys_url":"https://api.github.com/repos/mschwager/warehouse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mschwager/warehouse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mschwager/warehouse/teams","hooks_url":"https://api.github.com/repos/mschwager/warehouse/hooks","issue_events_url":"https://api.github.com/repos/mschwager/warehouse/issues/events{/number}","events_url":"https://api.github.com/repos/mschwager/warehouse/events","assignees_url":"https://api.github.com/repos/mschwager/warehouse/assignees{/user}","branches_url":"https://api.github.com/repos/mschwager/warehouse/branches{/branch}","tags_url":"https://api.github.com/repos/mschwager/warehouse/tags","blobs_url":"https://api.github.com/repos/mschwager/warehouse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mschwager/warehouse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mschwager/warehouse/git/refs{/sha}","trees_url":"https://api.github.com/repos/mschwager/warehouse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mschwager/warehouse/statuses/{sha}","languages_url":"https://api.github.com/repos/mschwager/warehouse/languages","stargazers_url":"https://api.github.com/repos/mschwager/warehouse/stargazers","contributors_url":"https://api.github.com/repos/mschwager/warehouse/contributors","subscribers_url":"https://api.github.com/repos/mschwager/warehouse/subscribers","subscription_url":"https://api.github.com/repos/mschwager/warehouse/subscription","commits_url":"https://api.github.com/repos/mschwager/warehouse/commits{/sha}","git_commits_url":"https://api.github.com/repos/mschwager/warehouse/git/commits{/sha}","comments_url":"https://api.github.com/repos/mschwager/warehouse/comments{/number}","issue_comment_url":"https://api.github.com/repos/mschwager/warehouse/issues/comments{/number}","contents_url":"https://api.github.com/repos/mschwager/warehouse/contents/{+path}","compare_url":"https://api.github.com/repos/mschwager/warehouse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mschwager/warehouse/merges","archive_url":"https://api.github.com/repos/mschwager/warehouse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mschwager/warehouse/downloads","issues_url":"https://api.github.com/repos/mschwager/warehouse/issues{/number}","pulls_url":"https://api.github.com/repos/mschwager/warehouse/pulls{/number}","milestones_url":"https://api.github.com/repos/mschwager/warehouse/milestones{/number}","notifications_url":"https://api.github.com/repos/mschwager/warehouse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mschwager/warehouse/labels{/name}","releases_url":"https://api.github.com/repos/mschwager/warehouse/releases{/id}","deployments_url":"https://api.github.com/repos/mschwager/warehouse/deployments","created_at":"2018-07-20T15:04:46Z","updated_at":"2018-07-20T15:04:50Z","pushed_at":"2018-07-20T15:45:24Z","git_url":"git://github.com/mschwager/warehouse.git","ssh_url":"git@github.com:mschwager/warehouse.git","clone_url":"https://github.com/mschwager/warehouse.git","svn_url":"https://github.com/mschwager/warehouse","homepage":"https://pypi.org/","size":112454,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"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":0,"watchers":0,"default_branch":"master"}},"base":{"label":"pypa:master","ref":"master","sha":"8d336d87a94f68c7465424adc831640b3d95d0e9","user":{"login":"pypa","id":647025,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY0NzAyNQ==","avatar_url":"https://avatars2.githubusercontent.com/u/647025?v=4","gravatar_id":"","url":"https://api.github.com/users/pypa","html_url":"https://github.com/pypa","followers_url":"https://api.github.com/users/pypa/followers","following_url":"https://api.github.com/users/pypa/following{/other_user}","gists_url":"https://api.github.com/users/pypa/gists{/gist_id}","starred_url":"https://api.github.com/users/pypa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pypa/subscriptions","organizations_url":"https://api.github.com/users/pypa/orgs","repos_url":"https://api.github.com/users/pypa/repos","events_url":"https://api.github.com/users/pypa/events{/privacy}","received_events_url":"https://api.github.com/users/pypa/received_events","type":"Organization","site_admin":false},"repo":{"id":9120498,"node_id":"MDEwOlJlcG9zaXRvcnk5MTIwNDk4","name":"warehouse","full_name":"pypa/warehouse","owner":{"login":"pypa","id":647025,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY0NzAyNQ==","avatar_url":"https://avatars2.githubusercontent.com/u/647025?v=4","gravatar_id":"","url":"https://api.github.com/users/pypa","html_url":"https://github.com/pypa","followers_url":"https://api.github.com/users/pypa/followers","following_url":"https://api.github.com/users/pypa/following{/other_user}","gists_url":"https://api.github.com/users/pypa/gists{/gist_id}","starred_url":"https://api.github.com/users/pypa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pypa/subscriptions","organizations_url":"https://api.github.com/users/pypa/orgs","repos_url":"https://api.github.com/users/pypa/repos","events_url":"https://api.github.com/users/pypa/events{/privacy}","received_events_url":"https://api.github.com/users/pypa/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pypa/warehouse","description":"The Python Package Repository","fork":false,"url":"https://api.github.com/repos/pypa/warehouse","forks_url":"https://api.github.com/repos/pypa/warehouse/forks","keys_url":"https://api.github.com/repos/pypa/warehouse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pypa/warehouse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pypa/warehouse/teams","hooks_url":"https://api.github.com/repos/pypa/warehouse/hooks","issue_events_url":"https://api.github.com/repos/pypa/warehouse/issues/events{/number}","events_url":"https://api.github.com/repos/pypa/warehouse/events","assignees_url":"https://api.github.com/repos/pypa/warehouse/assignees{/user}","branches_url":"https://api.github.com/repos/pypa/warehouse/branches{/branch}","tags_url":"https://api.github.com/repos/pypa/warehouse/tags","blobs_url":"https://api.github.com/repos/pypa/warehouse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pypa/warehouse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pypa/warehouse/git/refs{/sha}","trees_url":"https://api.github.com/repos/pypa/warehouse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pypa/warehouse/statuses/{sha}","languages_url":"https://api.github.com/repos/pypa/warehouse/languages","stargazers_url":"https://api.github.com/repos/pypa/warehouse/stargazers","contributors_url":"https://api.github.com/repos/pypa/warehouse/contributors","subscribers_url":"https://api.github.com/repos/pypa/warehouse/subscribers","subscription_url":"https://api.github.com/repos/pypa/warehouse/subscription","commits_url":"https://api.github.com/repos/pypa/warehouse/commits{/sha}","git_commits_url":"https://api.github.com/repos/pypa/warehouse/git/commits{/sha}","comments_url":"https://api.github.com/repos/pypa/warehouse/comments{/number}","issue_comment_url":"https://api.github.com/repos/pypa/warehouse/issues/comments{/number}","contents_url":"https://api.github.com/repos/pypa/warehouse/contents/{+path}","compare_url":"https://api.github.com/repos/pypa/warehouse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pypa/warehouse/merges","archive_url":"https://api.github.com/repos/pypa/warehouse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pypa/warehouse/downloads","issues_url":"https://api.github.com/repos/pypa/warehouse/issues{/number}","pulls_url":"https://api.github.com/repos/pypa/warehouse/pulls{/number}","milestones_url":"https://api.github.com/repos/pypa/warehouse/milestones{/number}","notifications_url":"https://api.github.com/repos/pypa/warehouse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pypa/warehouse/labels{/name}","releases_url":"https://api.github.com/repos/pypa/warehouse/releases{/id}","deployments_url":"https://api.github.com/repos/pypa/warehouse/deployments","created_at":"2013-03-30T19:03:53Z","updated_at":"2018-07-20T13:16:06Z","pushed_at":"2018-07-20T14:24:07Z","git_url":"git://github.com/pypa/warehouse.git","ssh_url":"git@github.com:pypa/warehouse.git","clone_url":"https://github.com/pypa/warehouse.git","svn_url":"https://github.com/pypa/warehouse","homepage":"https://pypi.org/","size":112454,"stargazers_count":1847,"watchers_count":1847,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":383,"mirror_url":null,"archived":false,"open_issues_count":269,"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":383,"open_issues":269,"watchers":1847,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pypa/warehouse/pulls/4329"},"html":{"href":"https://github.com/pypa/warehouse/pull/4329"},"issue":{"href":"https://api.github.com/repos/pypa/warehouse/issues/4329"},"comments":{"href":"https://api.github.com/repos/pypa/warehouse/issues/4329/comments"},"review_comments":{"href":"https://api.github.com/repos/pypa/warehouse/pulls/4329/comments"},"review_comment":{"href":"https://api.github.com/repos/pypa/warehouse/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pypa/warehouse/pulls/4329/commits"},"statuses":{"href":"https://api.github.com/repos/pypa/warehouse/statuses/a4d3f432999c4cd31666eec45ab84c32aa9a6a4a"}},"author_association":"NONE","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":3,"deletions":3,"changed_files":1}}
{"actor":{"display_login":"mschwager"}}