{"action":"created","comment":{"url":"https://api.github.com/repos/gomods/athens/pulls/comments/223485262","pull_request_review_id":162624530,"id":223485262,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMzQ4NTI2Mg==","diff_hunk":"@@ -0,0 +1,40 @@\n+package s3\n+\n+import (\n+\t\"context\"\n+\t\"github.com/aws/aws-sdk-go/aws\"\n+\t\"github.com/aws/aws-sdk-go/aws/awserr\"\n+\t\"github.com/aws/aws-sdk-go/service/s3\"\n+\t\"github.com/gomods/athens/pkg/config\"\n+\t\"github.com/gomods/athens/pkg/errors\"\n+\t\"github.com/gomods/athens/pkg/observ\"\n+)\n+\n+const (\n+\ts3ErrorCodeNotFound = \"NotFound\"\n+)\n+\n+// Exists implements the (./pkg/storage).Checker interface\n+// returning true if the module at version exists in storage\n+func (s *Storage) Exists(ctx context.Context, module, version string) (bool, error) {\n+\tconst op errors.Op = \"s3.Exists\"\n+\tctx, span := observ.StartSpan(ctx, op.String())\n+\tdefer span.End()\n+\n+\tpkgName := config.PackageVersionedName(module, version, \"mod\")\n+\thoParams := &s3.HeadObjectInput{\n+\t\tBucket: aws.String(s.bucket),\n+\t\tKey:    aws.String(pkgName),\n+\t}\n+\n+\t_, err := s.s3API.HeadObjectWithContext(ctx, hoParams)\n+\tif err != nil {\n+\t\tif err.(awserr.Error).Code() == s3ErrorCodeNotFound {","path":"pkg/storage/s3/checker.go","position":32,"original_position":32,"commit_id":"52e9b490643465c35d3181380333d54a5215578f","original_commit_id":"52e9b490643465c35d3181380333d54a5215578f","user":{"login":"t-tomalak","id":12939493,"node_id":"MDQ6VXNlcjEyOTM5NDkz","avatar_url":"https://avatars1.githubusercontent.com/u/12939493?v=4","gravatar_id":"","url":"https://api.github.com/users/t-tomalak","html_url":"https://github.com/t-tomalak","followers_url":"https://api.github.com/users/t-tomalak/followers","following_url":"https://api.github.com/users/t-tomalak/following{/other_user}","gists_url":"https://api.github.com/users/t-tomalak/gists{/gist_id}","starred_url":"https://api.github.com/users/t-tomalak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/t-tomalak/subscriptions","organizations_url":"https://api.github.com/users/t-tomalak/orgs","repos_url":"https://api.github.com/users/t-tomalak/repos","events_url":"https://api.github.com/users/t-tomalak/events{/privacy}","received_events_url":"https://api.github.com/users/t-tomalak/received_events","type":"User","site_admin":false},"body":"Yeah, i was thinking that it should have that but couldn't find it ","created_at":"2018-10-08T20:18:39Z","updated_at":"2018-10-08T20:18:39Z","html_url":"https://github.com/gomods/athens/pull/750#discussion_r223485262","pull_request_url":"https://api.github.com/repos/gomods/athens/pulls/750","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/gomods/athens/pulls/comments/223485262"},"html":{"href":"https://github.com/gomods/athens/pull/750#discussion_r223485262"},"pull_request":{"href":"https://api.github.com/repos/gomods/athens/pulls/750"}},"in_reply_to_id":223459655},"pull_request":{"url":"https://api.github.com/repos/gomods/athens/pulls/750","id":220840229,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIwODQwMjI5","html_url":"https://github.com/gomods/athens/pull/750","diff_url":"https://github.com/gomods/athens/pull/750.diff","patch_url":"https://github.com/gomods/athens/pull/750.patch","issue_url":"https://api.github.com/repos/gomods/athens/issues/750","number":750,"state":"open","locked":false,"title":"Implement storage.Backend for S3 storage","user":{"login":"t-tomalak","id":12939493,"node_id":"MDQ6VXNlcjEyOTM5NDkz","avatar_url":"https://avatars1.githubusercontent.com/u/12939493?v=4","gravatar_id":"","url":"https://api.github.com/users/t-tomalak","html_url":"https://github.com/t-tomalak","followers_url":"https://api.github.com/users/t-tomalak/followers","following_url":"https://api.github.com/users/t-tomalak/following{/other_user}","gists_url":"https://api.github.com/users/t-tomalak/gists{/gist_id}","starred_url":"https://api.github.com/users/t-tomalak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/t-tomalak/subscriptions","organizations_url":"https://api.github.com/users/t-tomalak/orgs","repos_url":"https://api.github.com/users/t-tomalak/repos","events_url":"https://api.github.com/users/t-tomalak/events{/privacy}","received_events_url":"https://api.github.com/users/t-tomalak/received_events","type":"User","site_admin":false},"body":"**What is the problem I am trying to address?**\r\n\r\nMissing s3 integration\r\n\r\n**How is the fix applied?**\r\n\r\nIntegrated S3 storage that is compatiblewith storage.Backend interface. For unit test minio is used to mock AWS service. Also fixed tests for minio that where skiped after #727 because of missing env variable\r\n\r\n**Fixes issue:  #704 \r\n\r\n","created_at":"2018-10-05T22:34:18Z","updated_at":"2018-10-08T20:18:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7bb34536eda1b6f4f675c23840cc8073d7045e51","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/gomods/athens/pulls/750/commits","review_comments_url":"https://api.github.com/repos/gomods/athens/pulls/750/comments","review_comment_url":"https://api.github.com/repos/gomods/athens/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gomods/athens/issues/750/comments","statuses_url":"https://api.github.com/repos/gomods/athens/statuses/52e9b490643465c35d3181380333d54a5215578f","head":{"label":"t-tomalak:704-s3storage","ref":"704-s3storage","sha":"52e9b490643465c35d3181380333d54a5215578f","user":{"login":"t-tomalak","id":12939493,"node_id":"MDQ6VXNlcjEyOTM5NDkz","avatar_url":"https://avatars1.githubusercontent.com/u/12939493?v=4","gravatar_id":"","url":"https://api.github.com/users/t-tomalak","html_url":"https://github.com/t-tomalak","followers_url":"https://api.github.com/users/t-tomalak/followers","following_url":"https://api.github.com/users/t-tomalak/following{/other_user}","gists_url":"https://api.github.com/users/t-tomalak/gists{/gist_id}","starred_url":"https://api.github.com/users/t-tomalak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/t-tomalak/subscriptions","organizations_url":"https://api.github.com/users/t-tomalak/orgs","repos_url":"https://api.github.com/users/t-tomalak/repos","events_url":"https://api.github.com/users/t-tomalak/events{/privacy}","received_events_url":"https://api.github.com/users/t-tomalak/received_events","type":"User","site_admin":false},"repo":{"id":151239225,"node_id":"MDEwOlJlcG9zaXRvcnkxNTEyMzkyMjU=","name":"athens","full_name":"t-tomalak/athens","private":false,"owner":{"login":"t-tomalak","id":12939493,"node_id":"MDQ6VXNlcjEyOTM5NDkz","avatar_url":"https://avatars1.githubusercontent.com/u/12939493?v=4","gravatar_id":"","url":"https://api.github.com/users/t-tomalak","html_url":"https://github.com/t-tomalak","followers_url":"https://api.github.com/users/t-tomalak/followers","following_url":"https://api.github.com/users/t-tomalak/following{/other_user}","gists_url":"https://api.github.com/users/t-tomalak/gists{/gist_id}","starred_url":"https://api.github.com/users/t-tomalak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/t-tomalak/subscriptions","organizations_url":"https://api.github.com/users/t-tomalak/orgs","repos_url":"https://api.github.com/users/t-tomalak/repos","events_url":"https://api.github.com/users/t-tomalak/events{/privacy}","received_events_url":"https://api.github.com/users/t-tomalak/received_events","type":"User","site_admin":false},"html_url":"https://github.com/t-tomalak/athens","description":"A Go module datastore and proxy","fork":true,"url":"https://api.github.com/repos/t-tomalak/athens","forks_url":"https://api.github.com/repos/t-tomalak/athens/forks","keys_url":"https://api.github.com/repos/t-tomalak/athens/keys{/key_id}","collaborators_url":"https://api.github.com/repos/t-tomalak/athens/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/t-tomalak/athens/teams","hooks_url":"https://api.github.com/repos/t-tomalak/athens/hooks","issue_events_url":"https://api.github.com/repos/t-tomalak/athens/issues/events{/number}","events_url":"https://api.github.com/repos/t-tomalak/athens/events","assignees_url":"https://api.github.com/repos/t-tomalak/athens/assignees{/user}","branches_url":"https://api.github.com/repos/t-tomalak/athens/branches{/branch}","tags_url":"https://api.github.com/repos/t-tomalak/athens/tags","blobs_url":"https://api.github.com/repos/t-tomalak/athens/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/t-tomalak/athens/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/t-tomalak/athens/git/refs{/sha}","trees_url":"https://api.github.com/repos/t-tomalak/athens/git/trees{/sha}","statuses_url":"https://api.github.com/repos/t-tomalak/athens/statuses/{sha}","languages_url":"https://api.github.com/repos/t-tomalak/athens/languages","stargazers_url":"https://api.github.com/repos/t-tomalak/athens/stargazers","contributors_url":"https://api.github.com/repos/t-tomalak/athens/contributors","subscribers_url":"https://api.github.com/repos/t-tomalak/athens/subscribers","subscription_url":"https://api.github.com/repos/t-tomalak/athens/subscription","commits_url":"https://api.github.com/repos/t-tomalak/athens/commits{/sha}","git_commits_url":"https://api.github.com/repos/t-tomalak/athens/git/commits{/sha}","comments_url":"https://api.github.com/repos/t-tomalak/athens/comments{/number}","issue_comment_url":"https://api.github.com/repos/t-tomalak/athens/issues/comments{/number}","contents_url":"https://api.github.com/repos/t-tomalak/athens/contents/{+path}","compare_url":"https://api.github.com/repos/t-tomalak/athens/compare/{base}...{head}","merges_url":"https://api.github.com/repos/t-tomalak/athens/merges","archive_url":"https://api.github.com/repos/t-tomalak/athens/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/t-tomalak/athens/downloads","issues_url":"https://api.github.com/repos/t-tomalak/athens/issues{/number}","pulls_url":"https://api.github.com/repos/t-tomalak/athens/pulls{/number}","milestones_url":"https://api.github.com/repos/t-tomalak/athens/milestones{/number}","notifications_url":"https://api.github.com/repos/t-tomalak/athens/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/t-tomalak/athens/labels{/name}","releases_url":"https://api.github.com/repos/t-tomalak/athens/releases{/id}","deployments_url":"https://api.github.com/repos/t-tomalak/athens/deployments","created_at":"2018-10-02T10:47:12Z","updated_at":"2018-10-02T10:47:15Z","pushed_at":"2018-10-05T22:23:33Z","git_url":"git://github.com/t-tomalak/athens.git","ssh_url":"git@github.com:t-tomalak/athens.git","clone_url":"https://github.com/t-tomalak/athens.git","svn_url":"https://github.com/t-tomalak/athens","homepage":"https://docs.gomods.io","size":51443,"stargazers_count":0,"watchers_count":0,"language":"Go","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":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"gomods:master","ref":"master","sha":"89d9dd26091fc334fedfd8aa04364c750e6fba45","user":{"login":"gomods","id":36861827,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2ODYxODI3","avatar_url":"https://avatars3.githubusercontent.com/u/36861827?v=4","gravatar_id":"","url":"https://api.github.com/users/gomods","html_url":"https://github.com/gomods","followers_url":"https://api.github.com/users/gomods/followers","following_url":"https://api.github.com/users/gomods/following{/other_user}","gists_url":"https://api.github.com/users/gomods/gists{/gist_id}","starred_url":"https://api.github.com/users/gomods/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gomods/subscriptions","organizations_url":"https://api.github.com/users/gomods/orgs","repos_url":"https://api.github.com/users/gomods/repos","events_url":"https://api.github.com/users/gomods/events{/privacy}","received_events_url":"https://api.github.com/users/gomods/received_events","type":"Organization","site_admin":false},"repo":{"id":122872932,"node_id":"MDEwOlJlcG9zaXRvcnkxMjI4NzI5MzI=","name":"athens","full_name":"gomods/athens","private":false,"owner":{"login":"gomods","id":36861827,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2ODYxODI3","avatar_url":"https://avatars3.githubusercontent.com/u/36861827?v=4","gravatar_id":"","url":"https://api.github.com/users/gomods","html_url":"https://github.com/gomods","followers_url":"https://api.github.com/users/gomods/followers","following_url":"https://api.github.com/users/gomods/following{/other_user}","gists_url":"https://api.github.com/users/gomods/gists{/gist_id}","starred_url":"https://api.github.com/users/gomods/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gomods/subscriptions","organizations_url":"https://api.github.com/users/gomods/orgs","repos_url":"https://api.github.com/users/gomods/repos","events_url":"https://api.github.com/users/gomods/events{/privacy}","received_events_url":"https://api.github.com/users/gomods/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/gomods/athens","description":"A Go module datastore and proxy","fork":false,"url":"https://api.github.com/repos/gomods/athens","forks_url":"https://api.github.com/repos/gomods/athens/forks","keys_url":"https://api.github.com/repos/gomods/athens/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gomods/athens/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gomods/athens/teams","hooks_url":"https://api.github.com/repos/gomods/athens/hooks","issue_events_url":"https://api.github.com/repos/gomods/athens/issues/events{/number}","events_url":"https://api.github.com/repos/gomods/athens/events","assignees_url":"https://api.github.com/repos/gomods/athens/assignees{/user}","branches_url":"https://api.github.com/repos/gomods/athens/branches{/branch}","tags_url":"https://api.github.com/repos/gomods/athens/tags","blobs_url":"https://api.github.com/repos/gomods/athens/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gomods/athens/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gomods/athens/git/refs{/sha}","trees_url":"https://api.github.com/repos/gomods/athens/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gomods/athens/statuses/{sha}","languages_url":"https://api.github.com/repos/gomods/athens/languages","stargazers_url":"https://api.github.com/repos/gomods/athens/stargazers","contributors_url":"https://api.github.com/repos/gomods/athens/contributors","subscribers_url":"https://api.github.com/repos/gomods/athens/subscribers","subscription_url":"https://api.github.com/repos/gomods/athens/subscription","commits_url":"https://api.github.com/repos/gomods/athens/commits{/sha}","git_commits_url":"https://api.github.com/repos/gomods/athens/git/commits{/sha}","comments_url":"https://api.github.com/repos/gomods/athens/comments{/number}","issue_comment_url":"https://api.github.com/repos/gomods/athens/issues/comments{/number}","contents_url":"https://api.github.com/repos/gomods/athens/contents/{+path}","compare_url":"https://api.github.com/repos/gomods/athens/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gomods/athens/merges","archive_url":"https://api.github.com/repos/gomods/athens/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gomods/athens/downloads","issues_url":"https://api.github.com/repos/gomods/athens/issues{/number}","pulls_url":"https://api.github.com/repos/gomods/athens/pulls{/number}","milestones_url":"https://api.github.com/repos/gomods/athens/milestones{/number}","notifications_url":"https://api.github.com/repos/gomods/athens/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gomods/athens/labels{/name}","releases_url":"https://api.github.com/repos/gomods/athens/releases{/id}","deployments_url":"https://api.github.com/repos/gomods/athens/deployments","created_at":"2018-02-25T20:19:41Z","updated_at":"2018-10-08T19:58:01Z","pushed_at":"2018-10-08T19:57:57Z","git_url":"git://github.com/gomods/athens.git","ssh_url":"git@github.com:gomods/athens.git","clone_url":"https://github.com/gomods/athens.git","svn_url":"https://github.com/gomods/athens","homepage":"https://docs.gomods.io","size":51439,"stargazers_count":1107,"watchers_count":1107,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":114,"mirror_url":null,"archived":false,"open_issues_count":105,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":114,"open_issues":105,"watchers":1107,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gomods/athens/pulls/750"},"html":{"href":"https://github.com/gomods/athens/pull/750"},"issue":{"href":"https://api.github.com/repos/gomods/athens/issues/750"},"comments":{"href":"https://api.github.com/repos/gomods/athens/issues/750/comments"},"review_comments":{"href":"https://api.github.com/repos/gomods/athens/pulls/750/comments"},"review_comment":{"href":"https://api.github.com/repos/gomods/athens/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gomods/athens/pulls/750/commits"},"statuses":{"href":"https://api.github.com/repos/gomods/athens/statuses/52e9b490643465c35d3181380333d54a5215578f"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"t-tomalak"}}