GitHub PullRequestReviewCommentEvent at 2014-09-30 18:58:54
Repository: aws-cli
Actor: jamesls
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/aws/aws-cli/pulls/comments/18239088","id":18239088,"diff_hunk":"@@ -1134,6 +1135,42 @@ def test_transfer_single_large_file(self):\n         self.assert_max_memory_used(p, self.max_mem_allowed,\n                                     download_full_command)\n \n+    def test_stream_large_file(self):\n+        \"\"\"\n+        This tests to ensure that streaming files for both uploads and\n+        downloads do not use too much memory.  Note that streaming uploads\n+        will use slightly more memory than usual but should not put the\n+        entire file into memory.\n+        \"\"\"\n+        bucket_name = self.create_bucket()\n+\n+        # Create a 200 MB file that will be streamed\n+        file_size = 1024 * 1024 * 200\n+        file_contents = 'a' * file_size\n+        foo_txt = self.files.create_file('foo.txt', file_contents)\n+\n+        # Set the maximum memory to about 2/3 of the size of the file.\n+        # This test is to ensure that the whole file is not put into memory.\n+        # The current memory threshold is set at about the peak amount for\n+        # performing a streaming upload of a file larger than 100 MB. So\n+        # this maximum needs to be bumped up.\n+        max_mem_allowed = file_size * 2/3","path":"tests/integration/customizations/s3/test_plugin.py","position":48,"original_position":48,"commit_id":"e65b02f4bdabb3717a93bfe4011f243f8608bd23","original_commit_id":"e65b02f4bdabb3717a93bfe4011f243f8608bd23","user":{"login":"jamesls","id":368057,"avatar_url":"https://avatars.githubusercontent.com/u/368057?v=2","gravatar_id":"","url":"https://api.github.com/users/jamesls","html_url":"https://github.com/jamesls","followers_url":"https://api.github.com/users/jamesls/followers","following_url":"https://api.github.com/users/jamesls/following{/other_user}","gists_url":"https://api.github.com/users/jamesls/gists{/gist_id}","starred_url":"https://api.github.com/users/jamesls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamesls/subscriptions","organizations_url":"https://api.github.com/users/jamesls/orgs","repos_url":"https://api.github.com/users/jamesls/repos","events_url":"https://api.github.com/users/jamesls/events{/privacy}","received_events_url":"https://api.github.com/users/jamesls/received_events","type":"User","site_admin":false},"body":"Can you explain this? I'm not following the logic here.  In the other memory utilization tests we want to explicitly verify that the memory usage is *not* dependent on the file size.","created_at":"2014-09-30T18:58:54Z","updated_at":"2014-09-30T18:58:54Z","html_url":"https://github.com/aws/aws-cli/pull/924#discussion_r18239088","pull_request_url":"https://api.github.com/repos/aws/aws-cli/pulls/924","_links":{"self":{"href":"https://api.github.com/repos/aws/aws-cli/pulls/comments/18239088"},"html":{"href":"https://github.com/aws/aws-cli/pull/924#discussion_r18239088"},"pull_request":{"href":"https://api.github.com/repos/aws/aws-cli/pulls/924"}}},"pull_request":{"url":"https://api.github.com/repos/aws/aws-cli/pulls/924","id":22019138,"html_url":"https://github.com/aws/aws-cli/pull/924","diff_url":"https://github.com/aws/aws-cli/pull/924.diff","patch_url":"https://github.com/aws/aws-cli/pull/924.patch","issue_url":"https://api.github.com/repos/aws/aws-cli/issues/924","number":924,"state":"open","locked":false,"title":"Fixed too much memory usage for s3 streaming","user":{"login":"kyleknap","id":4605355,"avatar_url":"https://avatars.githubusercontent.com/u/4605355?v=2","gravatar_id":"","url":"https://api.github.com/users/kyleknap","html_url":"https://github.com/kyleknap","followers_url":"https://api.github.com/users/kyleknap/followers","following_url":"https://api.github.com/users/kyleknap/following{/other_user}","gists_url":"https://api.github.com/users/kyleknap/gists{/gist_id}","starred_url":"https://api.github.com/users/kyleknap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyleknap/subscriptions","organizations_url":"https://api.github.com/users/kyleknap/orgs","repos_url":"https://api.github.com/users/kyleknap/repos","events_url":"https://api.github.com/users/kyleknap/events{/privacy}","received_events_url":"https://api.github.com/users/kyleknap/received_events","type":"User","site_admin":false},"body":"Added memory usage tests as well for streaming uploads and downloads.  The actual snippet of code that I changed was in my original pull request before I rebased off of develop.  I added test for memory usage for both streaming uploads and streaming downloads so that this does not happen again.\r\n\r\nFixes https://github.com/aws/aws-cli/issues/923\r\n\r\ncc @jamesls @danielgtaylor \r\n","created_at":"2014-09-30T17:01:29Z","updated_at":"2014-09-30T18:58:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c50b9fbeee9873874c8b958e55ad9ce75b3dd40a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/aws/aws-cli/pulls/924/commits","review_comments_url":"https://api.github.com/repos/aws/aws-cli/pulls/924/comments","review_comment_url":"https://api.github.com/repos/aws/aws-cli/pulls/comments/{number}","comments_url":"https://api.github.com/repos/aws/aws-cli/issues/924/comments","statuses_url":"https://api.github.com/repos/aws/aws-cli/statuses/e65b02f4bdabb3717a93bfe4011f243f8608bd23","head":{"label":"kyleknap:stream-memory","ref":"stream-memory","sha":"e65b02f4bdabb3717a93bfe4011f243f8608bd23","user":{"login":"kyleknap","id":4605355,"avatar_url":"https://avatars.githubusercontent.com/u/4605355?v=2","gravatar_id":"","url":"https://api.github.com/users/kyleknap","html_url":"https://github.com/kyleknap","followers_url":"https://api.github.com/users/kyleknap/followers","following_url":"https://api.github.com/users/kyleknap/following{/other_user}","gists_url":"https://api.github.com/users/kyleknap/gists{/gist_id}","starred_url":"https://api.github.com/users/kyleknap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyleknap/subscriptions","organizations_url":"https://api.github.com/users/kyleknap/orgs","repos_url":"https://api.github.com/users/kyleknap/repos","events_url":"https://api.github.com/users/kyleknap/events{/privacy}","received_events_url":"https://api.github.com/users/kyleknap/received_events","type":"User","site_admin":false},"repo":{"id":12092925,"name":"aws-cli","full_name":"kyleknap/aws-cli","owner":{"login":"kyleknap","id":4605355,"avatar_url":"https://avatars.githubusercontent.com/u/4605355?v=2","gravatar_id":"","url":"https://api.github.com/users/kyleknap","html_url":"https://github.com/kyleknap","followers_url":"https://api.github.com/users/kyleknap/followers","following_url":"https://api.github.com/users/kyleknap/following{/other_user}","gists_url":"https://api.github.com/users/kyleknap/gists{/gist_id}","starred_url":"https://api.github.com/users/kyleknap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyleknap/subscriptions","organizations_url":"https://api.github.com/users/kyleknap/orgs","repos_url":"https://api.github.com/users/kyleknap/repos","events_url":"https://api.github.com/users/kyleknap/events{/privacy}","received_events_url":"https://api.github.com/users/kyleknap/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kyleknap/aws-cli","description":"Universal Command Line Interface for Amazon Web Services","fork":true,"url":"https://api.github.com/repos/kyleknap/aws-cli","forks_url":"https://api.github.com/repos/kyleknap/aws-cli/forks","keys_url":"https://api.github.com/repos/kyleknap/aws-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kyleknap/aws-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kyleknap/aws-cli/teams","hooks_url":"https://api.github.com/repos/kyleknap/aws-cli/hooks","issue_events_url":"https://api.github.com/repos/kyleknap/aws-cli/issues/events{/number}","events_url":"https://api.github.com/repos/kyleknap/aws-cli/events","assignees_url":"https://api.github.com/repos/kyleknap/aws-cli/assignees{/user}","branches_url":"https://api.github.com/repos/kyleknap/aws-cli/branches{/branch}","tags_url":"https://api.github.com/repos/kyleknap/aws-cli/tags","blobs_url":"https://api.github.com/repos/kyleknap/aws-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kyleknap/aws-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kyleknap/aws-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/kyleknap/aws-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kyleknap/aws-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/kyleknap/aws-cli/languages","stargazers_url":"https://api.github.com/repos/kyleknap/aws-cli/stargazers","contributors_url":"https://api.github.com/repos/kyleknap/aws-cli/contributors","subscribers_url":"https://api.github.com/repos/kyleknap/aws-cli/subscribers","subscription_url":"https://api.github.com/repos/kyleknap/aws-cli/subscription","commits_url":"https://api.github.com/repos/kyleknap/aws-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/kyleknap/aws-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/kyleknap/aws-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/kyleknap/aws-cli/issues/comments/{number}","contents_url":"https://api.github.com/repos/kyleknap/aws-cli/contents/{+path}","compare_url":"https://api.github.com/repos/kyleknap/aws-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kyleknap/aws-cli/merges","archive_url":"https://api.github.com/repos/kyleknap/aws-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kyleknap/aws-cli/downloads","issues_url":"https://api.github.com/repos/kyleknap/aws-cli/issues{/number}","pulls_url":"https://api.github.com/repos/kyleknap/aws-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/kyleknap/aws-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/kyleknap/aws-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kyleknap/aws-cli/labels{/name}","releases_url":"https://api.github.com/repos/kyleknap/aws-cli/releases{/id}","created_at":"2013-08-13T21:03:11Z","updated_at":"2014-07-28T21:42:02Z","pushed_at":"2014-09-30T04:54:34Z","git_url":"git://github.com/kyleknap/aws-cli.git","ssh_url":"git@github.com:kyleknap/aws-cli.git","clone_url":"https://github.com/kyleknap/aws-cli.git","svn_url":"https://github.com/kyleknap/aws-cli","homepage":null,"size":5586,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"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":"develop"}},"base":{"label":"aws:develop","ref":"develop","sha":"23a1aac47c6833c02154333f7aee4c5c0db95f4a","user":{"login":"aws","id":2232217,"avatar_url":"https://avatars.githubusercontent.com/u/2232217?v=2","gravatar_id":"","url":"https://api.github.com/users/aws","html_url":"https://github.com/aws","followers_url":"https://api.github.com/users/aws/followers","following_url":"https://api.github.com/users/aws/following{/other_user}","gists_url":"https://api.github.com/users/aws/gists{/gist_id}","starred_url":"https://api.github.com/users/aws/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aws/subscriptions","organizations_url":"https://api.github.com/users/aws/orgs","repos_url":"https://api.github.com/users/aws/repos","events_url":"https://api.github.com/users/aws/events{/privacy}","received_events_url":"https://api.github.com/users/aws/received_events","type":"Organization","site_admin":false},"repo":{"id":6780767,"name":"aws-cli","full_name":"aws/aws-cli","owner":{"login":"aws","id":2232217,"avatar_url":"https://avatars.githubusercontent.com/u/2232217?v=2","gravatar_id":"","url":"https://api.github.com/users/aws","html_url":"https://github.com/aws","followers_url":"https://api.github.com/users/aws/followers","following_url":"https://api.github.com/users/aws/following{/other_user}","gists_url":"https://api.github.com/users/aws/gists{/gist_id}","starred_url":"https://api.github.com/users/aws/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aws/subscriptions","organizations_url":"https://api.github.com/users/aws/orgs","repos_url":"https://api.github.com/users/aws/repos","events_url":"https://api.github.com/users/aws/events{/privacy}","received_events_url":"https://api.github.com/users/aws/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aws/aws-cli","description":"Universal Command Line Interface for Amazon Web Services","fork":false,"url":"https://api.github.com/repos/aws/aws-cli","forks_url":"https://api.github.com/repos/aws/aws-cli/forks","keys_url":"https://api.github.com/repos/aws/aws-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aws/aws-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aws/aws-cli/teams","hooks_url":"https://api.github.com/repos/aws/aws-cli/hooks","issue_events_url":"https://api.github.com/repos/aws/aws-cli/issues/events{/number}","events_url":"https://api.github.com/repos/aws/aws-cli/events","assignees_url":"https://api.github.com/repos/aws/aws-cli/assignees{/user}","branches_url":"https://api.github.com/repos/aws/aws-cli/branches{/branch}","tags_url":"https://api.github.com/repos/aws/aws-cli/tags","blobs_url":"https://api.github.com/repos/aws/aws-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aws/aws-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aws/aws-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/aws/aws-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aws/aws-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/aws/aws-cli/languages","stargazers_url":"https://api.github.com/repos/aws/aws-cli/stargazers","contributors_url":"https://api.github.com/repos/aws/aws-cli/contributors","subscribers_url":"https://api.github.com/repos/aws/aws-cli/subscribers","subscription_url":"https://api.github.com/repos/aws/aws-cli/subscription","commits_url":"https://api.github.com/repos/aws/aws-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/aws/aws-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/aws/aws-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/aws/aws-cli/issues/comments/{number}","contents_url":"https://api.github.com/repos/aws/aws-cli/contents/{+path}","compare_url":"https://api.github.com/repos/aws/aws-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aws/aws-cli/merges","archive_url":"https://api.github.com/repos/aws/aws-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aws/aws-cli/downloads","issues_url":"https://api.github.com/repos/aws/aws-cli/issues{/number}","pulls_url":"https://api.github.com/repos/aws/aws-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/aws/aws-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/aws/aws-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aws/aws-cli/labels{/name}","releases_url":"https://api.github.com/repos/aws/aws-cli/releases{/id}","created_at":"2012-11-20T16:07:36Z","updated_at":"2014-09-29T23:02:53Z","pushed_at":"2014-09-29T21:03:51Z","git_url":"git://github.com/aws/aws-cli.git","ssh_url":"git@github.com:aws/aws-cli.git","clone_url":"https://github.com/aws/aws-cli.git","svn_url":"https://github.com/aws/aws-cli","homepage":null,"size":15010,"stargazers_count":2183,"watchers_count":2183,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":261,"mirror_url":null,"open_issues_count":103,"forks":261,"open_issues":103,"watchers":2183,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/aws/aws-cli/pulls/924"},"html":{"href":"https://github.com/aws/aws-cli/pull/924"},"issue":{"href":"https://api.github.com/repos/aws/aws-cli/issues/924"},"comments":{"href":"https://api.github.com/repos/aws/aws-cli/issues/924/comments"},"review_comments":{"href":"https://api.github.com/repos/aws/aws-cli/pulls/924/comments"},"review_comment":{"href":"https://api.github.com/repos/aws/aws-cli/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/aws/aws-cli/pulls/924/commits"},"statuses":{"href":"https://api.github.com/repos/aws/aws-cli/statuses/e65b02f4bdabb3717a93bfe4011f243f8608bd23"}}}}